hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
095cbd232c26ef5dc95418fa6f5dfdff8df44a43 | 717 | py | Python | examples/other_api_requests.py | miguelmartinez1024/adobe_analytics | f32ac71ce1d25478fd3085c0136b8c4f49027b58 | [
"MIT"
] | 32 | 2018-01-26T19:17:25.000Z | 2019-12-05T14:26:20.000Z | examples/other_api_requests.py | miguelmartinez1024/adobe_analytics | f32ac71ce1d25478fd3085c0136b8c4f49027b58 | [
"MIT"
] | 14 | 2018-01-22T08:41:46.000Z | 2018-12-06T06:12:24.000Z | examples/other_api_requests.py | miguelmartinez1024/adobe_analytics | f32ac71ce1d25478fd3085c0136b8c4f49027b58 | [
"MIT"
] | 15 | 2018-07-12T17:25:22.000Z | 2020-03-12T16:28:15.000Z | """
The client class has a request method that allows all sorts of generic API requests to Adobe's v1.4 REST API.
To get a comprehensive overview of available APIs and methods check out the official Adobe Analytics API Explorer:
https://marketing.adobe.com/developer/api-explorer
"""
from adobe_analytics import Client
... | 28.68 | 114 | 0.684798 | """
The client class has a request method that allows all sorts of generic API requests to Adobe's v1.4 REST API.
To get a comprehensive overview of available APIs and methods check out the official Adobe Analytics API Explorer:
https://marketing.adobe.com/developer/api-explorer
"""
from adobe_analytics import Client
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
724703dadf3641357af57821f330c5eb0d47c98b | 10,438 | py | Python | nets/joint_cnn.py | redwankarimsony/UniFAD | 0edd851573313bdf013ca8f8844f45413dfd5373 | [
"MIT"
] | null | null | null | nets/joint_cnn.py | redwankarimsony/UniFAD | 0edd851573313bdf013ca8f8844f45413dfd5373 | [
"MIT"
] | null | null | null | nets/joint_cnn.py | redwankarimsony/UniFAD | 0edd851573313bdf013ca8f8844f45413dfd5373 | [
"MIT"
] | 1 | 2022-02-11T05:02:46.000Z | 2022-02-11T05:02:46.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import tensorflow.contrib.slim as slim
model_params = {
'basic': ([0, 0, 0, 0], [16, 32, 64, 128]),
'test': ([0, 1, 2, 3, 2], [64, [64,128], [128,256], [256,512], [256,512]], 3, ... | 55.227513 | 120 | 0.587469 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow as tf
import tensorflow.contrib.slim as slim
model_params = {
'basic': ([0, 0, 0, 0], [16, 32, 64, 128]),
'test': ([0, 1, 2, 3, 2], [64, [64,128], [128,256], [256,512], [2... | 0 | 0 | 0 | 0 | 0 | 5,041 | 0 | -10 | 138 |
c68cb9d7cbf1af2d8ca985b14341bae9e6bc9925 | 6,099 | py | Python | bin/decode-kubeconfig.py | dmrub/kubespray | b9801a61d2bd82cbca68fbf2b5e25362feb44733 | [
"Apache-2.0"
] | null | null | null | bin/decode-kubeconfig.py | dmrub/kubespray | b9801a61d2bd82cbca68fbf2b5e25362feb44733 | [
"Apache-2.0"
] | null | null | null | bin/decode-kubeconfig.py | dmrub/kubespray | b9801a61d2bd82cbca68fbf2b5e25362feb44733 | [
"Apache-2.0"
] | 1 | 2020-02-12T15:50:15.000Z | 2020-02-12T15:50:15.000Z | #!/usr/bin/env python
from __future__ import print_function
import logging
import sys
import yaml
import subprocess
import tempfile
logger = logging.getLogger()
def run_command(command, env=None, cwd=None, stdin=None,
get_stdout=True, get_stderr=True):
"""returns triple (returncode, stdout, stde... | 34.653409 | 89 | 0.513691 | #!/usr/bin/env python
from __future__ import print_function
import logging
import sys
import os
import yaml
import base64
import subprocess
import tempfile
logger = logging.getLogger()
def run_command(command, env=None, cwd=None, stdin=None,
get_stdout=True, get_stderr=True):
"""returns triple (... | 0 | 0 | 0 | 266 | 0 | 2,137 | 0 | -20 | 136 |
7dbca43a3679dcbd7e5e666dbd9f4bab888170b5 | 218 | py | Python | app/api.py | darrenvong/local-lead-finder | 2391b46549b30eda237578f17c8f499536dd6a17 | [
"MIT"
] | 2 | 2022-02-13T08:22:56.000Z | 2022-02-14T01:31:28.000Z | app/api.py | darrenvong/local-lead-finder | 2391b46549b30eda237578f17c8f499536dd6a17 | [
"MIT"
] | null | null | null | app/api.py | darrenvong/local-lead-finder | 2391b46549b30eda237578f17c8f499536dd6a17 | [
"MIT"
] | null | null | null | from app import app
if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0")
| 18.166667 | 40 | 0.665138 | from flask import render_template
from app import app
@app.route('/', methods=['GET', 'POST'])
def home():
return render_template('home.html')
if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0")
| 0 | 71 | 0 | 0 | 0 | 0 | 0 | 12 | 45 |
1384aeebc5e42d066a37d9cabd196e83c0c37c35 | 12,239 | py | Python | tests/unit/pipelines/test_base_pipeline.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | tests/unit/pipelines/test_base_pipeline.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | tests/unit/pipelines/test_base_pipeline.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. 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 applic... | 33.809392 | 80 | 0.745731 | # Copyright (c) ZenML GmbH 2021. 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 applic... | 0 | 680 | 0 | 27 | 0 | 0 | 0 | 53 | 314 |
0da39b11eb48f74048d82c3a79d5b8d12a4a9d56 | 5,454 | py | Python | mmaction/models/heads/osbp_tsm_head.py | Haawron/mmaction2 | 5927ccc2936759df8977fb588640cbf158264afc | [
"Apache-2.0"
] | null | null | null | mmaction/models/heads/osbp_tsm_head.py | Haawron/mmaction2 | 5927ccc2936759df8977fb588640cbf158264afc | [
"Apache-2.0"
] | null | null | null | mmaction/models/heads/osbp_tsm_head.py | Haawron/mmaction2 | 5927ccc2936759df8977fb588640cbf158264afc | [
"Apache-2.0"
] | 1 | 2022-03-29T13:22:40.000Z | 2022-03-29T13:22:40.000Z | import torch.nn as nn
| 35.415584 | 83 | 0.563073 | import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from torch.autograd import Function
import numpy as np
from ..builder import HEADS
from ...core import top_k_accuracy
from .base import AvgConsensus, BaseHead
class GradReverse(Function):
@staticmethod
def forward(ctx, x, target_idx_mask):
... | 0 | 5,119 | 0 | 7 | 0 | 0 | 0 | 51 | 254 |
dac48f3495e352413ea7eecbbc73238e87ac1463 | 1,169 | py | Python | better_tree/parser.py | antoniouaa/better-tree | d2030e23cf5eb2d94966741fb2917759afecd9fe | [
"MIT"
] | null | null | null | better_tree/parser.py | antoniouaa/better-tree | d2030e23cf5eb2d94966741fb2917759afecd9fe | [
"MIT"
] | 2 | 2021-11-05T12:24:39.000Z | 2021-11-29T14:37:45.000Z | better_tree/parser.py | antoniouaa/better-tree | d2030e23cf5eb2d94966741fb2917759afecd9fe | [
"MIT"
] | null | null | null |
PROG = "tree"
USAGE = "%(prog)s <Path> [options]"
DESCRIPTION = "Featureful tree utility in Python"
| 21.648148 | 55 | 0.558597 | import sys
import argparse
PROG = "tree"
USAGE = "%(prog)s <Path> [options]"
DESCRIPTION = "Featureful tree utility in Python"
class CLIParser(argparse.ArgumentParser):
def error(self, *args, **kwargs):
self.print_help()
sys.exit(1)
def assemble_parser() -> CLIParser:
parser = CLIParser(
... | 0 | 0 | 0 | 104 | 0 | 889 | 0 | -17 | 90 |
ac31baa26e1d3c94895d8932cf2b535d4808d75c | 638 | py | Python | backend/src/gloader/xml/sax/drivers2/drv_pyexpat.py | anrl/gini4 | d26649c8c02a1737159e48732cf1ee15ba2a604d | [
"MIT"
] | 11 | 2019-03-02T20:39:34.000Z | 2021-09-02T19:47:38.000Z | backend/src/gloader/xml/sax/drivers2/drv_pyexpat.py | anrl/gini4 | d26649c8c02a1737159e48732cf1ee15ba2a604d | [
"MIT"
] | 29 | 2019-01-17T15:44:48.000Z | 2021-06-02T00:19:40.000Z | backend/src/gloader/xml/sax/drivers2/drv_pyexpat.py | anrl/gini4 | d26649c8c02a1737159e48732cf1ee15ba2a604d | [
"MIT"
] | 11 | 2019-01-28T05:00:55.000Z | 2021-11-12T03:08:32.000Z | """
SAX driver for the Pyexpat C module, based on xml.sax.expatdriver.
$Id: drv_pyexpat.py,v 1.6 2000/09/26 19:53:43 loewis Exp $
"""
# XXX: todo list of old drv_pyexpat.py, check whether any of these
# have been fixed.
# Todo on driver:
# - make it support external entities (wait for pyexpat.c)
# - enable configur... | 30.380952 | 74 | 0.741379 | """
SAX driver for the Pyexpat C module, based on xml.sax.expatdriver.
$Id: drv_pyexpat.py,v 1.6 2000/09/26 19:53:43 loewis Exp $
"""
# XXX: todo list of old drv_pyexpat.py, check whether any of these
# have been fixed.
# Todo on driver:
# - make it support external entities (wait for pyexpat.c)
# - enable configur... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 23 |
dd220118b8a22188a6ab29bd9ce5820c867c1eb0 | 17,321 | py | Python | HW1/Roomba/Roomba.py | AnarchyKitten/AI-HOMEWORK | 79e4aa9ce897c9d83e526128fbfe57433f31d2d4 | [
"MIT"
] | 2 | 2020-02-10T19:06:20.000Z | 2020-04-01T18:23:05.000Z | HW1/Roomba/Roomba.py | AnarchyKitten/AI-HOMEWORK | 79e4aa9ce897c9d83e526128fbfe57433f31d2d4 | [
"MIT"
] | null | null | null | HW1/Roomba/Roomba.py | AnarchyKitten/AI-HOMEWORK | 79e4aa9ce897c9d83e526128fbfe57433f31d2d4 | [
"MIT"
] | 1 | 2022-03-09T19:33:22.000Z | 2022-03-09T19:33:22.000Z |
global env
env= {
"BATTERY_LEVEL": 100,
"SPOT": False,
"SPOT_LOCATION": (3.0, 7.0),
"GENERAL": False,
"DUSTY_SPOT": False,
"DUSTY_SPOT_LOCATION": (0.0, -4.0),
"HOME_PATH": [],
"LOCATION": (-3.0, 5.0),
"FACING": (0, 1)
}
NODE_INITIALIZED = -1
NODE_SUCCEED = 0
NODE_RUNNING = 1
NODE_F... | 29.307953 | 119 | 0.553836 | import time
import random
from pprint import pprint
global env
env= {
"BATTERY_LEVEL": 100,
"SPOT": False,
"SPOT_LOCATION": (3.0, 7.0),
"GENERAL": False,
"DUSTY_SPOT": False,
"DUSTY_SPOT_LOCATION": (0.0, -4.0),
"HOME_PATH": [],
"LOCATION": (-3.0, 5.0),
"FACING": (0, 1)
}
NODE_INITI... | 0 | 0 | 0 | 13,042 | 0 | 3,010 | 0 | -14 | 733 |
37546ff764e016562d941b3ee20057f64c4e4b6c | 387 | py | Python | 2020/noxfile.py | danoscarmike/adventofcode | 1395dd8dd684e4b23697c53e445b2114d64c2791 | [
"MIT"
] | null | null | null | 2020/noxfile.py | danoscarmike/adventofcode | 1395dd8dd684e4b23697c53e445b2114d64c2791 | [
"MIT"
] | null | null | null | 2020/noxfile.py | danoscarmike/adventofcode | 1395dd8dd684e4b23697c53e445b2114d64c2791 | [
"MIT"
] | null | null | null |
BLACK_PATHS = ["helpers", "."]
| 16.826087 | 36 | 0.591731 | import nox
BLACK_PATHS = ["helpers", "."]
@nox.session(python="3.8")
def blacken(session):
"""Run black.
Format code to uniform standard.
"""
session.install("black")
session.run(
"black",
*BLACK_PATHS,
)
@nox.session(python="3.8")
def unit(session):
"""Run the unit test... | 0 | 296 | 0 | 0 | 0 | 0 | 0 | -11 | 68 |
a5a9574abdde11cd0e70b802e9c87737ec3086a4 | 4,303 | py | Python | aioevent/emitter.py | travigd/aioevent | 1338e052664d0bb0767a5809f2c4fe5903b9a78f | [
"MIT"
] | null | null | null | aioevent/emitter.py | travigd/aioevent | 1338e052664d0bb0767a5809f2c4fe5903b9a78f | [
"MIT"
] | null | null | null | aioevent/emitter.py | travigd/aioevent | 1338e052664d0bb0767a5809f2c4fe5903b9a78f | [
"MIT"
] | null | null | null | """
Provides EventEmitter class.
"""
from typing import (Callable, Union, Coroutine)
from .event import BaseEvent
# pylint: disable=invalid-name
EventCallbackType = Callable[[BaseEvent], Union[None, Coroutine[None, None, None]]]
| 33.88189 | 97 | 0.633279 | """
Provides EventEmitter class.
"""
import asyncio
from functools import partial
from typing import (
Callable,
Dict,
Type,
Union,
Coroutine,
Set,
)
from .event import BaseEvent
from .subscription import Subscription
# pylint: disable=invalid-name
EventCallbackType = Callable[[BaseEvent], U... | 0 | 0 | 0 | 3,918 | 0 | 0 | 0 | 62 | 90 |
f5058bb46b1b8ce6b5bbfce558362f47d32b3f33 | 9,251 | py | Python | sandbox/src/CEDARDispersionTXTFixer.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 5 | 2016-05-28T14:12:28.000Z | 2021-04-22T10:23:12.000Z | sandbox/src/CEDARDispersionTXTFixer.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | null | null | null | sandbox/src/CEDARDispersionTXTFixer.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 2 | 2015-07-13T10:04:10.000Z | 2021-04-22T10:23:23.000Z | #! /usr/bin/env python
'''
A script to fix CEDAR's ASCII dispersion solution output.
ABOUT:
This script can be used to modify .txt files that CEDAR produce when
dispersion solution output has been saved.
USAGE:
CEDARDispersionTXTFixer.py [-h] [-v] [-r] [-c] [-f] string [-o] srtring
... | 38.227273 | 125 | 0.535726 | #! /usr/bin/env python
'''
A script to fix CEDAR's ASCII dispersion solution output.
ABOUT:
This script can be used to modify .txt files that CEDAR produce when
dispersion solution output has been saved.
USAGE:
CEDARDispersionTXTFixer.py [-h] [-v] [-r] [-c] [-f] string [-o] srtring
... | 0 | 0 | 0 | 0 | 0 | 1,391 | 0 | 0 | 45 |
c83e1a47a5b871d41b07e55fee7a24c1853ca798 | 1,731 | py | Python | tutorial/bn/ip_bn.py | Xiaoming-Wang1/yambopy | 5b8cb6882657a4ff70dc3cf450d7ac0b5effc952 | [
"BSD-3-Clause"
] | 21 | 2016-04-07T20:53:29.000Z | 2021-05-14T08:06:02.000Z | tutorial/bn/ip_bn.py | Xiaoming-Wang1/yambopy | 5b8cb6882657a4ff70dc3cf450d7ac0b5effc952 | [
"BSD-3-Clause"
] | 22 | 2016-06-14T22:29:47.000Z | 2021-09-16T15:36:26.000Z | tutorial/bn/ip_bn.py | Xiaoming-Wang1/yambopy | 5b8cb6882657a4ff70dc3cf450d7ac0b5effc952 | [
"BSD-3-Clause"
] | 15 | 2016-06-14T18:40:57.000Z | 2021-08-07T13:17:43.000Z | #
# Author: Henrique Pereira Coutada Miranda
# Run a IP calculation using yambo
#
from __future__ import print_function
import sys
import argparse
#parse options
parser = argparse.ArgumentParser(description='Test the yambopy script.')
parser.add_argument('-dg','--doublegrid', action="store_true", help='Use double grid... | 26.227273 | 92 | 0.656268 | #
# Author: Henrique Pereira Coutada Miranda
# Run a IP calculation using yambo
#
from __future__ import print_function
import sys
from yambopy import *
from qepy import *
import argparse
#parse options
parser = argparse.ArgumentParser(description='Test the yambopy script.')
parser.add_argument('-dg','--doublegrid', a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 44 |
f1f7ec5076f3b1117487b59e537c55f9effc9a82 | 392 | py | Python | posthog/migrations/0169_person_properties_last_updated_at.py | asherf/posthog | 1e50704d76cba484e80b83f1e1f658bd6e98743a | [
"MIT"
] | null | null | null | posthog/migrations/0169_person_properties_last_updated_at.py | asherf/posthog | 1e50704d76cba484e80b83f1e1f658bd6e98743a | [
"MIT"
] | null | null | null | posthog/migrations/0169_person_properties_last_updated_at.py | asherf/posthog | 1e50704d76cba484e80b83f1e1f658bd6e98743a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.12 on 2021-09-21 16:11
| 23.058824 | 105 | 0.665816 | # Generated by Django 3.1.12 on 2021-09-21 16:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0168_action_step_empty_string_reset"),
]
operations = [
migrations.AddField(
model_name="person", name="properties_l... | 0 | 0 | 0 | 277 | 0 | 0 | 0 | 19 | 46 |
b05a163fdb441b5073b8b789628c28f2e21a779e | 939 | py | Python | src/lib/datasets/dataset_factory.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | src/lib/datasets/dataset_factory.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | src/lib/datasets/dataset_factory.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .sample.ddd import DddDataset
from .sample.exdet import EXDetDataset
from .sample.ctdet import CTDetDataset
from .sample.multi_pose import MultiPoseDataset
from .dataset.coco import COCO
from .dataset.pas... | 23.475 | 65 | 0.779553 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .sample.ddd import DddDataset
from .sample.exdet import EXDetDataset
from .sample.ctdet import CTDetDataset
from .sample.multi_pose import MultiPoseDataset
from .dataset.coco import COCO
from .dataset.pas... | 0 | 0 | 0 | 51 | 0 | 51 | 0 | 0 | 23 |
5e3497501962f190bafae73c2c0a96641f61d801 | 637 | py | Python | submitify/migrations/0003_auto_20161124_0055.py | OpenFurry/submitify | 10ff1961fb76b100a5087197760611c925f295a7 | [
"MIT"
] | null | null | null | submitify/migrations/0003_auto_20161124_0055.py | OpenFurry/submitify | 10ff1961fb76b100a5087197760611c925f295a7 | [
"MIT"
] | 14 | 2016-11-20T22:07:56.000Z | 2021-06-10T18:26:45.000Z | submitify/migrations/0003_auto_20161124_0055.py | OpenFurry/submitify | 10ff1961fb76b100a5087197760611c925f295a7 | [
"MIT"
] | 1 | 2016-11-20T21:58:29.000Z | 2016-11-20T21:58:29.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-24 00:55
from __future__ import unicode_literals
| 23.592593 | 48 | 0.585557 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-24 00:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('submitify', '0002_call_invite_only'),
]
operations = [
migrations.RenameFie... | 0 | 0 | 0 | 458 | 0 | 0 | 0 | 19 | 46 |
3651acbfff4d1dc6104b1163d9bcf7633f3d1ddf | 1,397 | py | Python | hata/discord/message/message_activity.py | Multiface24111/hata | cd28f9ef158e347363669cc8d1d49db0ff41aba0 | [
"0BSD"
] | 173 | 2019-06-14T20:25:00.000Z | 2022-03-21T19:36:10.000Z | hata/discord/message/message_activity.py | Tari-dev/hata | a5c3199c845858f997af3b0b2c18770fdc691897 | [
"0BSD"
] | 52 | 2020-01-03T17:05:14.000Z | 2022-03-31T11:39:50.000Z | hata/discord/message/message_activity.py | Tari-dev/hata | a5c3199c845858f997af3b0b2c18770fdc691897 | [
"0BSD"
] | 47 | 2019-11-09T08:46:45.000Z | 2022-03-31T14:33:34.000Z | __all__ = ('MessageActivity', )
| 31.044444 | 115 | 0.582677 | __all__ = ('MessageActivity', )
from .preinstanced import MessageActivityType
class MessageActivity:
"""
Might be sent with a ``Message``, if it has rich presence-related chat embeds.
Attributes
----------
party_id : `str`
The message application's party's id. Can be empty string.
... | 0 | 0 | 0 | 1,295 | 0 | 0 | 0 | 24 | 46 |
69d66d320bc54e270f4be98c63a8ea8984c25c33 | 19 | py | Python | venv/Lib/site-packages/suit/__init__.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/suit/__init__.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | 12 | 2019-12-04T23:48:45.000Z | 2022-03-11T23:53:30.000Z | venv/Lib/site-packages/suit/__init__.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | null | null | null | VERSION = '0.2.26'
| 9.5 | 18 | 0.578947 | VERSION = '0.2.26'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4608e090dd04c4c1000dee1d9306310138ac2957 | 1,050 | py | Python | setup.py | deepraj1729/TChatBot | f6800d1cb4a6a33d182022056d5b2a13b5ce5499 | [
"MIT"
] | 13 | 2020-06-22T12:48:32.000Z | 2021-09-22T16:39:37.000Z | setup.py | deepraj1729/TChatBot | f6800d1cb4a6a33d182022056d5b2a13b5ce5499 | [
"MIT"
] | 4 | 2020-06-22T12:46:51.000Z | 2022-02-09T23:27:23.000Z | setup.py | deepraj1729/TChatBot | f6800d1cb4a6a33d182022056d5b2a13b5ce5499 | [
"MIT"
] | 1 | 2020-06-29T04:06:31.000Z | 2020-06-29T04:06:31.000Z | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.readlines()
setup(
name ='TChatBot',
version ='0.1.0',
author ='Deepraj Baidya',
author_email ='bdeeprajrkm1@gmail.com',
url ='https://github.com/deepraj1729/TChatBot',
description ='A ChatBot framew... | 28.378378 | 124 | 0.691429 | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.readlines()
def readme():
with open('README.md') as f:
README = f.read()
return README
setup(
name ='TChatBot',
version ='0.1.0',
author ='Deepraj Baidya',
author_email ='bdeeprajrkm1@gmail.com',
u... | 0 | 0 | 0 | 0 | 0 | 57 | 0 | 0 | 23 |
5860ee09204a4ac6d863ab5a06ec4a591bd5a665 | 7,435 | py | Python | fast_calvo_trainer.py | DDMAL/Calvo-classifier | 06e9a74b2221e130ec7eae1dfe462f9de1a5ffa3 | [
"MIT"
] | null | null | null | fast_calvo_trainer.py | DDMAL/Calvo-classifier | 06e9a74b2221e130ec7eae1dfe462f9de1a5ffa3 | [
"MIT"
] | 25 | 2017-07-17T19:49:57.000Z | 2021-05-21T14:29:34.000Z | fast_calvo_trainer.py | DDMAL/Calvo-classifier | 06e9a74b2221e130ec7eae1dfe462f9de1a5ffa3 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Program Name: calvo_trainer.py
# Program Description: Rodan wrapper for Fast Calvo's classifier training
# -----------------------------------------------------------------------------
# Core
# Third-party
from celery.utils.log... | 30.850622 | 139 | 0.456086 | # -----------------------------------------------------------------------------
# Program Name: calvo_trainer.py
# Program Description: Rodan wrapper for Fast Calvo's classifier training
# -----------------------------------------------------------------------------
# Core
import logging
import sys
# Third-p... | 0 | 0 | 0 | 6,792 | 0 | 0 | 0 | 53 | 133 |
41e4704bc53fa0011b5050b556c86a41c1d91375 | 1,955 | py | Python | integration/tests_ok/assert_xpath.py | jleverenz/hurl | b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3 | [
"Apache-2.0"
] | null | null | null | integration/tests_ok/assert_xpath.py | jleverenz/hurl | b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3 | [
"Apache-2.0"
] | null | null | null | integration/tests_ok/assert_xpath.py | jleverenz/hurl | b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
| 32.04918 | 125 | 0.638875 | # coding=utf-8
from flask import Response
from app import app
@app.route("/assert-xpath")
def assert_xpath():
body = "<data>café</data>"
return Response(body, mimetype="text/xml")
@app.route("/assert-xpath-svg")
def assert_xpath_svg():
body = """<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SV... | 2 | 1,796 | 0 | 0 | 0 | 0 | 0 | 3 | 136 |
0cc2ebc4ec9efcdb4db40c889232a078bc8dd01c | 587 | py | Python | labs/lab11/ex1/ex1.py | jamestiotio/dbsys | 26f545a51626ce232c0dc26b70ef206e71b273fc | [
"MIT"
] | null | null | null | labs/lab11/ex1/ex1.py | jamestiotio/dbsys | 26f545a51626ce232c0dc26b70ef206e71b273fc | [
"MIT"
] | null | null | null | labs/lab11/ex1/ex1.py | jamestiotio/dbsys | 26f545a51626ce232c0dc26b70ef206e71b273fc | [
"MIT"
] | null | null | null | # The `pyspark` shell command can be used to run an interactive shell for debugging purposes (preferably only on smaller datasets)
from pyspark import SparkContext, SparkConf
conf = SparkConf().setAppName("Ex1")
sc = SparkContext(conf=conf)
text_file = sc.textFile("hdfs://localhost:9000/input/")
output = text_file.... | 27.952381 | 130 | 0.708688 | # The `pyspark` shell command can be used to run an interactive shell for debugging purposes (preferably only on smaller datasets)
import sys
from pyspark import SparkContext, SparkConf
conf = SparkConf().setAppName("Ex1")
sc = SparkContext(conf=conf)
def foreach(record):
cols = record.split(",")
if len(cols... | 0 | 0 | 0 | 0 | 0 | 155 | 0 | -11 | 45 |
d867c00519f15569813bbab583a8d3dc80c57f7f | 23,428 | py | Python | sdk/yapily/models/payment_response.py | bs-yapily/yapily-sdk-python | 0bba45e351b674eb655425a51190f539c4e9896f | [
"MIT"
] | null | null | null | sdk/yapily/models/payment_response.py | bs-yapily/yapily-sdk-python | 0bba45e351b674eb655425a51190f539c4e9896f | [
"MIT"
] | null | null | null | sdk/yapily/models/payment_response.py | bs-yapily/yapily-sdk-python | 0bba45e351b674eb655425a51190f539c4e9896f | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
OpenAPI spec version: 0.0.155
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
| 32.403873 | 599 | 0.658827 | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
OpenAPI spec version: 0.0.155
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pp... | 0 | 13,548 | 0 | 9,133 | 0 | 0 | 0 | 125 | 311 |
4436123fe12faadfcf9bf87e38c7f22b95826828 | 12,769 | py | Python | twitter_virtual/twitter.py | juuuuuulian/twitter-virtual | 2a5eece80f6f832aa8a8d2355ed61eabd41d5126 | [
"MIT"
] | null | null | null | twitter_virtual/twitter.py | juuuuuulian/twitter-virtual | 2a5eece80f6f832aa8a8d2355ed61eabd41d5126 | [
"MIT"
] | null | null | null | twitter_virtual/twitter.py | juuuuuulian/twitter-virtual | 2a5eece80f6f832aa8a8d2355ed61eabd41d5126 | [
"MIT"
] | null | null | null | """Classes for interacting with the Twitter API."""
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize"
ACCESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token"
LIST_FRIENDS_URL = "https://api.twitter.com/1.1/friends/ids.json"
CREATE_LIST_U... | 43.431973 | 138 | 0.672331 | """Classes for interacting with the Twitter API."""
import datetime
import oauth2
from urllib.parse import urlencode
import json
from typing import Any
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize"
ACCESS_TOKEN_URL = "https://api.twitter.com... | 0 | 335 | 0 | 11,253 | 0 | 0 | 0 | -10 | 317 |
0dc6e784914d2db2c7185e846d66295cb4f75743 | 2,566 | py | Python | Ene-Jun-2018/Ejemplos/SOLID/liskov-substitution.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ene-Jun-2018/Ejemplos/SOLID/liskov-substitution.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ene-Jun-2018/Ejemplos/SOLID/liskov-substitution.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | #snake_case
#camelCase
#StudlyCase
#kebab-case o slug
# Clase A
# Clase B
# Clase C
# Cliente utiliza Clase A o un contenedor con objetos tipo Clase A
# e.g. lista = [] de solo tipo Clase A
integrantes = ['Ana', 'Claudia', 'Sleiman', 'Irving', 'Raul']
grupo = Grupo(nombre="Diseo y Arquitectura de Software ... | 28.511111 | 103 | 0.644583 | #snake_case
#camelCase
#StudlyCase
#kebab-case o slug
# Clase A
# Clase B
# Clase C
# Cliente utiliza Clase A o un contenedor con objetos tipo Clase A
# e.g. lista = [] de solo tipo Clase A
from typing import List
class Grupo:
"""docstring for Banda"""
def __init__(self, **args):
self.nombr... | 6 | 0 | 0 | 1,555 | 0 | 0 | 0 | 2 | 92 |
1c5fd36ae0b1a46a987890321b0748ee13ed63f6 | 7,739 | py | Python | navrep/envs/rosnavtrainencodedenv.py | ReykCS/navrep | 22ee4727268188414a8121f069e45c2ab798ca19 | [
"MIT"
] | null | null | null | navrep/envs/rosnavtrainencodedenv.py | ReykCS/navrep | 22ee4727268188414a8121f069e45c2ab798ca19 | [
"MIT"
] | null | null | null | navrep/envs/rosnavtrainencodedenv.py | ReykCS/navrep | 22ee4727268188414a8121f069e45c2ab798ca19 | [
"MIT"
] | null | null | null | from navrep.rosnav_models.utils.reward import RewardCalculator | 35.663594 | 127 | 0.580178 | from gym import spaces
import numpy as np
from scipy import interpolate
import yaml
from navrep.envs.navreptrainenv import NavRepTrainEnv
from navrep.rosnav_models.utils.reward import RewardCalculator
from navrep.rosnav_models.utils.reward import RewardCalculator
class RosnavTrainEncodedEnv(NavRepTrainEnv):
""" ... | 0 | 244 | 0 | 7,207 | 0 | 0 | 0 | 69 | 157 |
750d4d54e1b253e23bab9ee8400fd616fe262f8d | 3,303 | py | Python | preprocess_graph.py | HongyiZhu/EHI | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | [
"MIT"
] | null | null | null | preprocess_graph.py | HongyiZhu/EHI | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | [
"MIT"
] | null | null | null | preprocess_graph.py | HongyiZhu/EHI | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | [
"MIT"
] | null | null | null | from ehi_utils import load_json, dict2dotdict
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Parser feature file generator")
parser.add_argument("--json_path", type=str, required=True,help="Path to the json config file")
args = parser.parse_args()
configs = lo... | 40.777778 | 108 | 0.604299 | from ehi_utils import load_json, dict2dotdict
from mygraph import Graph_Int, Graph_Str
import argparse
import copy
import pickle
def main(configs):
timespells = configs.timespells
# load topology
graphs = []
graphs_str = []
for ts in range(1, int(timespells)+1):
... | 0 | 0 | 0 | 0 | 0 | 2,810 | 0 | 29 | 89 |
7c564ae4197ee90a4317cec74fc34502972ffc25 | 711 | py | Python | src/samples/pymxs/sphere_borg.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 88 | 2020-03-19T20:24:08.000Z | 2022-03-23T23:13:54.000Z | src/samples/pymxs/sphere_borg.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 5 | 2020-04-09T19:56:47.000Z | 2021-11-12T20:02:18.000Z | src/samples/pymxs/sphere_borg.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 22 | 2020-03-19T19:24:36.000Z | 2022-03-18T21:55:19.000Z | '''
Demonstrates creating objects, object instancing, and object translation.
'''
from pymxs import runtime as rt # pylint: disable=import-error
INST = rt.Name("instance")
def create_borg(obj, num, spacing):
"""Create a bunch of clones of the provided object"""
for i in range(num):
for j in range(... | 29.625 | 77 | 0.603376 | '''
Demonstrates creating objects, object instancing, and object translation.
'''
from pymxs import runtime as rt # pylint: disable=import-error
INST = rt.Name("instance")
def create_borg(obj, num, spacing):
"""Create a bunch of clones of the provided object"""
for i in range(num):
for j in range(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e0bc0b030eda160521fc09b4031b333f5a25bc4b | 7,515 | py | Python | code/GA/mGA_2opt_numpyGA_2.py | KGJsGit/my_Optimization-studio | 1f3f78c22c58017f439c7be8b716a233be872ccc | [
"Apache-2.0"
] | 4 | 2020-06-02T08:27:36.000Z | 2022-03-16T15:09:46.000Z | code/GA/mGA_2opt_numpyGA_2.py | KGJsGit/my_Optimization-studio | 1f3f78c22c58017f439c7be8b716a233be872ccc | [
"Apache-2.0"
] | null | null | null | code/GA/mGA_2opt_numpyGA_2.py | KGJsGit/my_Optimization-studio | 1f3f78c22c58017f439c7be8b716a233be872ccc | [
"Apache-2.0"
] | 5 | 2021-04-21T11:52:33.000Z | 2022-01-15T09:14:45.000Z | import timeit
dist_ar = [] # (global)
# limit_time = 36 # (global)
cities_count = 0 # (global)
dots_list = [] # (global)
# Hyper Parameter
limits = (60) * 36 #
MUT = 0.2 #
SEL = 0.85 #
chrCOUNT = 50 #
selCOUNT = 25 # selection
#
# (param : ) : dist_df
#
# 2opt-algorithm
# 0 ~ ranges-1 ... | 30.925926 | 118 | 0.578709 | import math
import numpy as np
import random
import timeit
from threading import Thread
import functools
dist_ar = [] # 거리표(global)
# limit_time = 36 # 제한시간(global)
cities_count = 0 # 도시 수(global)
dots_list = [] # 도시 리스트(global)
# Hyper Parameter
limits = (60) * 36 # 제한시간
MUT = 0.2 # 변이확률
SEL = 0.85 # 선택압
chrCOUNT = ... | 1,521 | 769 | 0 | 0 | 0 | 4,772 | 0 | -19 | 266 |
2bed9ddb6ad3a9d58c7b0651dc53406b3042e361 | 295 | py | Python | 0001/python3/euler_0001.py | jhanschoo/project_euler | 9bba193996aa6a7c39d7b254198903af2e84904c | [
"Apache-2.0"
] | null | null | null | 0001/python3/euler_0001.py | jhanschoo/project_euler | 9bba193996aa6a7c39d7b254198903af2e84904c | [
"Apache-2.0"
] | null | null | null | 0001/python3/euler_0001.py | jhanschoo/project_euler | 9bba193996aa6a7c39d7b254198903af2e84904c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
if __name__ == "__main__":
target = 999
answer = sum_divisible_upto(target, 3) + sum_divisible_upto(target, 5) - sum_divisible_upto(target, 3 * 5)
print(answer)
| 24.583333 | 110 | 0.627119 | #!/usr/bin/env python3
def sum_divisible_upto(target, d):
n = target // d
s = d * n * (n + 1) // 2
return s
if __name__ == "__main__":
target = 999
answer = sum_divisible_upto(target, 3) + sum_divisible_upto(target, 5) - sum_divisible_upto(target, 3 * 5)
print(answer)
| 0 | 0 | 0 | 0 | 0 | 75 | 0 | 0 | 23 |
eb0ca335a4680d238b42ee15cd2910e10d6942cc | 3,158 | py | Python | crawler/crawlers.py | CirXe0N/WebCrawler-Code-Challenge | 7a597759beaabf96e88ba852b883de6195bcb283 | [
"MIT"
] | null | null | null | crawler/crawlers.py | CirXe0N/WebCrawler-Code-Challenge | 7a597759beaabf96e88ba852b883de6195bcb283 | [
"MIT"
] | null | null | null | crawler/crawlers.py | CirXe0N/WebCrawler-Code-Challenge | 7a597759beaabf96e88ba852b883de6195bcb283 | [
"MIT"
] | null | null | null | import logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s: %(message)s",
datefmt="%H:%M:%S",
)
| 28.196429 | 79 | 0.569031 | import asyncio
import json
import logging
from pathlib import Path
from crawler.queues import UniqueQueue
from crawler.scrapers import URLScraper
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s: %(message)s",
datefmt="%H:%M:%S",
)
class Crawler:
def __init__(self, initial_... | 0 | 0 | 1,469 | 1,393 | 0 | 0 | 0 | 21 | 134 |
c069958fbf792e5e39ba289824eccf81eabed4b8 | 2,491 | py | Python | server/simsvc/__init__.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | server/simsvc/__init__.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | server/simsvc/__init__.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | """Distributed simulation service.
"""
# Ensure .config is loaded - it sets up our Dask config.
from .config import Config
def create_app(**kws):
"""Create and return the simulation server Flask app.
kws is passed to the SocketIO constructor.
Also start up coroutines to periodically sync tasks a... | 36.632353 | 79 | 0.659173 | """Distributed simulation service.
"""
# Ensure .config is loaded - it sets up our Dask config.
from .config import Config
def create_app(**kws):
"""Create and return the simulation server Flask app.
kws is passed to the SocketIO constructor.
Also start up coroutines to periodically sync tasks a... | 0 | 0 | 0 | 0 | 0 | 247 | 0 | 14 | 86 |
2258584dfde8e66b7e016573d08f52b0d4c15a5c | 788 | py | Python | boboleetcode/Play-Leetcode-master/0226-Invert-Binary-Tree/py-0226/Solution2.py | yaominzh/CodeLrn2019 | adc727d92904c5c5d445a2621813dfa99474206d | [
"Apache-2.0"
] | 2 | 2021-03-25T05:26:55.000Z | 2021-04-20T03:33:24.000Z | boboleetcode/Play-Leetcode-master/0226-Invert-Binary-Tree/py-0226/Solution2.py | mcuallen/CodeLrn2019 | adc727d92904c5c5d445a2621813dfa99474206d | [
"Apache-2.0"
] | 6 | 2019-12-04T06:08:32.000Z | 2021-05-10T20:22:47.000Z | boboleetcode/Play-Leetcode-master/0226-Invert-Binary-Tree/py-0226/Solution2.py | mcuallen/CodeLrn2019 | adc727d92904c5c5d445a2621813dfa99474206d | [
"Apache-2.0"
] | null | null | null | # Source : https://leetcode.com/problems/invert-binary-tree/
# Author : penpenps
# Time : 2019-08-01
# BFS, iterative
# Time Complexity: O(n), the number of tree's nodes
# Space Complexity: O(n), the max node number by level
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# ... | 28.142857 | 60 | 0.57868 | # Source : https://leetcode.com/problems/invert-binary-tree/
# Author : penpenps
# Time : 2019-08-01
# BFS, iterative
# Time Complexity: O(n), the number of tree's nodes
# Space Complexity: O(n), the max node number by level
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# ... | 0 | 0 | 0 | 369 | 0 | 0 | 0 | 0 | 23 |
1dc3915d669aa9bfc68047f334962a2e28668c8c | 1,083 | py | Python | alipay/aop/api/response/AlipaySocialBaseQuestInstancesQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipaySocialBaseQuestInstancesQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipaySocialBaseQuestInstancesQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 32.818182 | 116 | 0.682364 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.QuestInstanceDTO import QuestInstanceDTO
class AlipaySocialBaseQuestInstancesQueryResponse(AlipayResponse):
def __init__(self):
super(AlipaySocialBaseQue... | 0 | 374 | 0 | 492 | 0 | 0 | 0 | 80 | 90 |
f7707bffeea7f123fa38fc412bc9a7d48ca9988e | 10,700 | py | Python | tacotron/models.py | rhoposit/tacotron2 | 2dad8df5ea50459789e16d9effb83fc2a25e42ed | [
"BSD-3-Clause"
] | null | null | null | tacotron/models.py | rhoposit/tacotron2 | 2dad8df5ea50459789e16d9effb83fc2a25e42ed | [
"BSD-3-Clause"
] | null | null | null | tacotron/models.py | rhoposit/tacotron2 | 2dad8df5ea50459789e16d9effb83fc2a25e42ed | [
"BSD-3-Clause"
] | null | null | null | # ==============================================================================
# Copyright (c) 2018, Yamagishi Laboratory, National Institute of Informatics
# Author: Yusuke Yasuda (yasuda@nii.ac.jp)
# All rights reserved.
# ==============================================================================
""" Models. ""... | 57.219251 | 152 | 0.538505 | # ==============================================================================
# Copyright (c) 2018, Yamagishi Laboratory, National Institute of Informatics
# Author: Yusuke Yasuda (yasuda@nii.ac.jp)
# All rights reserved.
# ==============================================================================
""" Models. ""... | 0 | 2,117 | 0 | 8,028 | 0 | 0 | 0 | 97 | 134 |
a014f0d726ae5f8dc4a25ff35886e47de774496b | 21,523 | py | Python | mirari/INT/models.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | null | null | null | mirari/INT/models.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | 18 | 2019-12-27T19:58:20.000Z | 2022-02-27T08:17:49.000Z | mirari/INT/models.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
########################################################################################
########################################################################################
VARS = {
'NAME':'Catlogo',
'PLURAL':'Catlogos',
'MODEL':'Catalogue',
'NEW':'NUEVO',
'NEW_GENDER'... | 40.609434 | 222 | 0.565256 | # -*- coding: utf-8 -*-
from mirari.mirari.models import *
from .vars import *
########################################################################################
########################################################################################
VARS = {
'NAME':'Catálogo',
'PLURAL':'Catálogos',
... | 48 | 296 | 0 | 13,455 | 0 | 302 | 0 | 11 | 265 |
4394303aa2a3be1178c47d1ef15a6995ca8b3adb | 5,786 | py | Python | plateseg/predict.py | Pablo1990/platelet-unet-watershed | 66aab7620d2e1646e3d4d33fe85c1691c63353cb | [
"BSD-3-Clause"
] | null | null | null | plateseg/predict.py | Pablo1990/platelet-unet-watershed | 66aab7620d2e1646e3d4d33fe85c1691c63353cb | [
"BSD-3-Clause"
] | null | null | null | plateseg/predict.py | Pablo1990/platelet-unet-watershed | 66aab7620d2e1646e3d4d33fe85c1691c63353cb | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import os
import torch
import numpy as np
import napari
from napari.qt import thread_worker
from skimage.exposure import rescale_intensity
from . import unet
u_state_fn = os.path.join(
os.path.dirname(__file__), 'data/unet-210525-zyxmc.pt'
)
u = unet.UNet(in_channels=1, out_channels=... | 31.107527 | 90 | 0.614587 | # coding: utf-8
import os
import itertools
import torch
from tqdm import tqdm
import numpy as np
import toolz as tz
import napari
from napari.qt import thread_worker
from skimage.exposure import rescale_intensity
from . import unet
from . import watershed as ws
u_state_fn = os.path.join(
os.path.dirname(__fi... | 0 | 583 | 0 | 0 | 1,180 | 932 | 0 | 0 | 210 |
dceca2c42994a429c1b0e9cd4184414aa609bdac | 184 | py | Python | caixiya/20180402/3.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | caixiya/20180402/3.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | caixiya/20180402/3.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | '''
3. map(),,
1) ["lambDA", LILY, aliCe]
'''
l=["lambDA","LILY","aliCe"]
print(list(map([i[:1].upper()+i[1:].lower()for i in l,l])))
| 26.285714 | 60 | 0.608696 | '''
3. 利用map()函数将用户输入的不规范的英文名字,变为首字母大写,其他字符小写的形式
1) 假定用户输入的是["lambDA", “LILY”, “aliCe”]
'''
l=["lambDA","LILY","aliCe"]
print(list(map([i[:1].upper()+i[1:].lower()for i in l,l])))
| 138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1a60b05152fee6b8e79a1c93f39d5b6df1b11044 | 1,267 | py | Python | Python/103 ZigzagLevelOrderTraversalB.py | Fiona08/leetcode | cee3da122e1703cfde811a8f69c207d5ae780d37 | [
"MIT"
] | null | null | null | Python/103 ZigzagLevelOrderTraversalB.py | Fiona08/leetcode | cee3da122e1703cfde811a8f69c207d5ae780d37 | [
"MIT"
] | null | null | null | Python/103 ZigzagLevelOrderTraversalB.py | Fiona08/leetcode | cee3da122e1703cfde811a8f69c207d5ae780d37 | [
"MIT"
] | null | null | null | #103
# Time: O(n)
# Space: O(n)
# Given a binary tree, return the zigzag level order traversal of
# its nodes' values. (ie, from left to right, then right to left
# for the next level and alternate between).
#
# For example:
# Given binary tree [3,9,20,null,null,15,7],
# 3
# / \
# 9 20
# / \
# 1... | 25.34 | 66 | 0.58011 | #103
# Time: O(n)
# Space: O(n)
# Given a binary tree, return the zigzag level order traversal of
# its nodes' values. (ie, from left to right, then right to left
# for the next level and alternate between).
#
# For example:
# Given binary tree [3,9,20,null,null,15,7],
# 3
# / \
# 9 20
# / \
# 1... | 0 | 0 | 0 | 808 | 0 | 0 | 0 | 0 | 46 |
012e78c449d04b20ba8352cfe81717ccea4c5e45 | 1,050 | py | Python | setup.py | Marcdnd/electrum-server-cesc | 6e8c107b0994e032a92f0d7c4da7cb430294d6f3 | [
"MIT"
] | null | null | null | setup.py | Marcdnd/electrum-server-cesc | 6e8c107b0994e032a92f0d7c4da7cb430294d6f3 | [
"MIT"
] | null | null | null | setup.py | Marcdnd/electrum-server-cesc | 6e8c107b0994e032a92f0d7c4da7cb430294d6f3 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="electrum-server-cesc",
version="1.0.20160803",
scripts=['run_electrum_server_cesc','electrum-server-cesc'],
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0'],
package_dir={
'electrumservercesc':'src'
},
py_modules=[
... | 33.870968 | 82 | 0.67619 | from setuptools import setup
setup(
name="electrum-server-cesc",
version="1.0.20160803",
scripts=['run_electrum_server_cesc','electrum-server-cesc'],
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0'],
package_dir={
'electrumservercesc':'src'
},
py_modules=[
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5b03553fcf79469b760d1f2bea0a15ae5bbd561b | 13,549 | py | Python | toontown/estate/EstateLoader.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 8 | 2017-10-10T11:41:01.000Z | 2021-02-23T12:55:47.000Z | toontown/estate/EstateLoader.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/estate/EstateLoader.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 2 | 2019-04-06T16:18:23.000Z | 2021-02-25T06:25:01.000Z | import random
| 39.15896 | 158 | 0.624548 | from pandac.PandaModules import *
from toontown.toonbase.ToontownGlobals import *
from direct.interval.IntervalGlobal import *
from direct.fsm import ClassicFSM, State
from toontown.safezone import SafeZoneLoader
import random
from toontown.launcher import DownloadForceAcknowledge
import House
import Estate
import Hous... | 0 | 0 | 0 | 13,078 | 0 | 0 | 0 | 148 | 309 |
82f9d171ce9b99f1e448f065ffdf32684add905c | 22,630 | py | Python | theseus/geometry/se3.py | facebookresearch/theseus | 8e7756d88fe85a02f948c3a9337f8704f4cebda3 | [
"MIT"
] | 236 | 2021-12-03T15:59:29.000Z | 2022-03-30T23:18:33.000Z | theseus/geometry/se3.py | facebookresearch/theseus | 8e7756d88fe85a02f948c3a9337f8704f4cebda3 | [
"MIT"
] | 85 | 2021-12-06T07:04:11.000Z | 2022-03-31T20:29:26.000Z | theseus/geometry/se3.py | facebookresearch/theseus | 8e7756d88fe85a02f948c3a9337f8704f4cebda3 | [
"MIT"
] | 12 | 2021-12-03T22:02:44.000Z | 2022-03-20T14:58:27.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import theseus
rand_se3 = SE3.rand
randn_se3 = SE3.randn
| 37.037643 | 94 | 0.537826 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Optional, Union, cast
import torch
import theseus
import theseus.constants
from .lie_group import LieGroup
from ... | 0 | 9,665 | 0 | 12,529 | 0 | 0 | 0 | 38 | 158 |
e08170c920599293ff53c51e1245c2ecc19f92ac | 1,231 | py | Python | appengine/src/greenday_core/tests/test_youtube_thumbnails_cache_client.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 6 | 2018-07-31T16:48:07.000Z | 2020-02-01T03:17:51.000Z | appengine/src/greenday_core/tests/test_youtube_thumbnails_cache_client.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 41 | 2018-08-07T16:43:07.000Z | 2020-06-05T18:54:50.000Z | appengine/src/greenday_core/tests/test_youtube_thumbnails_cache_client.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 1 | 2018-08-07T16:40:18.000Z | 2018-08-07T16:40:18.000Z | """
Tests for :mod:`greenday_core.youtube_thumbnails_cache <greenday_core.youtube_thumbnails_cache>`
"""
| 41.033333 | 205 | 0.74411 | """
Tests for :mod:`greenday_core.youtube_thumbnails_cache <greenday_core.youtube_thumbnails_cache>`
"""
from greenday_core.tests.base import AppengineTestBed
from greenday_core.youtube_thumbnails_cache import YTThumbnailsCache
class YTThumbnailClientTestCase(AppengineTestBed):
"""
Tests for :class:`g... | 0 | 0 | 0 | 975 | 0 | 0 | 0 | 79 | 67 |
327770f23fbdf7de1641f8b54d4885dd27c86561 | 61,679 | py | Python | run_nerf_helpers.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | 1 | 2022-02-22T13:54:41.000Z | 2022-02-22T13:54:41.000Z | run_nerf_helpers.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | null | null | null | run_nerf_helpers.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | null | null | null | import torch
# torch.autograd.set_detect_anomaly(True)
import torch.nn as nn
import numpy as np
# Misc
img2mse = lambda x, y : torch.mean((x - y) ** 2)
img2L1 = lambda x, y : torch.mean(0.01 * (torch.sqrt(1 + ((x-y)**2).sum(dim=-1)/0.0001) - 1))
img2mse_with_uncertainty = lambda x, y, u : torch.mean(((x - y) ** 2)/(2... | 49.781275 | 169 | 0.564147 | import torch
# torch.autograd.set_detect_anomaly(True)
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pdb
from skimage.metrics import structural_similarity, peak_signal_noise_ratio
from lpips import LPIPS
from hash_encoding import HashEmbedder, SHEncoder, XYZplusT_HashEmbedder
from tim... | 0 | 1,260 | 0 | 51,289 | 0 | 7,474 | 0 | 159 | 612 |
6284b2b3c014222e9b83ab9f6a59216c9c7e1517 | 1,482 | py | Python | tests/test_instruction.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 9 | 2019-07-22T23:54:05.000Z | 2020-11-05T06:26:04.000Z | tests/test_instruction.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 389 | 2019-07-03T04:39:11.000Z | 2022-03-28T14:06:11.000Z | tests/test_instruction.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 1 | 2021-08-30T14:22:04.000Z | 2021-08-30T14:22:04.000Z | import configparser
import os
from pathlib import Path
import annofabapi
out_dir = Path("./tests/out/instruction")
data_dir = Path("./tests/data/instruction")
#
os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/../")
inifile = configparser.ConfigParser()
inifile.read("./pytest.ini", "UTF-8")
annofab_config = ... | 26.464286 | 88 | 0.566802 | import configparser
import os
from pathlib import Path
import annofabapi
from annofabcli.__main__ import main
out_dir = Path("./tests/out/instruction")
data_dir = Path("./tests/data/instruction")
# プロジェクトトップに移動する
os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/../")
inifile = configparser.ConfigParser()
ini... | 42 | 0 | 0 | 983 | 0 | 0 | 0 | 15 | 46 |
308da623381a511c3b36a31d7f59d74d631166a4 | 435 | py | Python | pacote-download/Ex65.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex65.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex65.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | soma = 0
count = 0
maior = 0
menor = 0
r = 'Y'
while r=='Y':
n = int(input('Digite um numero: '))
if count == 0 or n > maior:
maior = n
if count == 0 or n < menor:
menor = n
soma = soma + n
count = count + 1
r = str(input('Quer continuar? [Y/N]: ')).upper().strip()
media = soma/c... | 25.588235 | 70 | 0.551724 | soma = 0
count = 0
maior = 0
menor = 0
r = 'Y'
while r=='Y':
n = int(input('Digite um numero: '))
if count == 0 or n > maior:
maior = n
if count == 0 or n < menor:
menor = n
soma = soma + n
count = count + 1
r = str(input('Quer continuar? [Y/N]: ')).upper().strip()
media = soma/c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9e73b1031062b8ac79a2adf8eaf63209234ac6e0 | 17,345 | py | Python | stackinawsgi/test/test_admin_admin.py | BenjamenMeyer/stackInAWSGI | 8ac6be173bb08addc09214ba7dc9f91727d0221a | [
"Apache-2.0"
] | 2 | 2016-08-12T19:11:13.000Z | 2017-11-19T20:52:47.000Z | stackinawsgi/test/test_admin_admin.py | BenjamenMeyer/stackInAWSGI | 8ac6be173bb08addc09214ba7dc9f91727d0221a | [
"Apache-2.0"
] | 16 | 2016-05-22T05:11:12.000Z | 2016-07-14T00:57:07.000Z | stackinawsgi/test/test_admin_admin.py | BenjamenMeyer/stackInAWSGI | 8ac6be173bb08addc09214ba7dc9f91727d0221a | [
"Apache-2.0"
] | 1 | 2016-05-15T19:01:35.000Z | 2016-05-15T19:01:35.000Z | """
Stack-In-A-WSGI: stackinawsgi.admin.admin.StackInAWsgiSessionManager
"""
| 30.808171 | 75 | 0.589853 | """
Stack-In-A-WSGI: stackinawsgi.admin.admin.StackInAWsgiSessionManager
"""
import datetime
import json
import unittest
import ddt
from stackinabox.services.service import StackInABoxService
from stackinabox.services.hello import HelloService
from stackinawsgi.admin.admin import StackInAWsgiAdmin
from stackinawsgi.... | 0 | 16,773 | 0 | 0 | 0 | 0 | 0 | 226 | 268 |
ea62194839d143d2c84ffdc76fc2a59e091dbad7 | 3,077 | py | Python | validation/prep_rm_subset.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 339 | 2015-01-04T13:23:04.000Z | 2022-03-25T23:09:09.000Z | validation/prep_rm_subset.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 39 | 2015-01-14T21:31:09.000Z | 2021-11-18T15:15:33.000Z | validation/prep_rm_subset.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 176 | 2015-01-10T17:40:44.000Z | 2022-03-25T05:14:21.000Z | """Prepare subset regions of full NIST NA12878 reference materials for evaluation.
Allows preparation of exome or targeted reference materials from
the full NIST NA12878 genome.
Requires:
vcflib: https://github.com/ekg/vcflib
bedtools: http://bedtools.readthedocs.org/en/latest/
Usage:
prep_rm_subset.py <input_... | 37.072289 | 89 | 0.588885 | """Prepare subset regions of full NIST NA12878 reference materials for evaluation.
Allows preparation of exome or targeted reference materials from
the full NIST NA12878 genome.
Requires:
vcflib: https://github.com/ekg/vcflib
bedtools: http://bedtools.readthedocs.org/en/latest/
Usage:
prep_rm_subset.py <input_... | 0 | 0 | 0 | 0 | 0 | 2,505 | 0 | -30 | 204 |
7eee2fbdb615744d318d8742d8eca13f0229393c | 2,768 | py | Python | biblification.py | olivierkes/bible_libre | 84c60e424c00da6171705b3e613240886640f3e5 | [
"Unlicense"
] | 1 | 2021-11-16T14:25:35.000Z | 2021-11-16T14:25:35.000Z | biblification.py | olivierkes/bible_libre | 84c60e424c00da6171705b3e613240886640f3e5 | [
"Unlicense"
] | null | null | null | biblification.py | olivierkes/bible_libre | 84c60e424c00da6171705b3e613240886640f3e5 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf8 -*-
import csv
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='This generates a t2t bible.')
parser.add_argument('-p', '--plan', help='plan to be used',
default="nouveau-testament-commente")
#parser.add_... | 32.186047 | 109 | 0.501445 | #!/usr/bin/python
# -*- coding: utf8 -*-
import csv
import argparse
def parseText(t):
t = t.replace("\\n\\q", " \n\n\t")
t = t.replace("\\n", " \n")
t = t.replace("\\q", "\t")
t = t.replace("\\p", " \n\n")
return t
def addMark(t):
i = -1
while t[i] in ["\n", "\t"]:
i -= 1
re... | 2 | 0 | 0 | 0 | 0 | 1,142 | 0 | 0 | 92 |
5471538f7c2ee28507998ade17fdbcced5321a8c | 1,087 | py | Python | src/foxdot/sandbox/180811_0506_compo_032.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | 4 | 2018-06-29T18:39:34.000Z | 2021-06-20T16:44:29.000Z | src/foxdot/sandbox/180811_0506_compo_032.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | src/foxdot/sandbox/180811_0506_compo_032.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | Scale.default = 'indian'
Root.default = 0
Clock.bpm = 80
print(Scale.names())
print(SynthDefs)
print(FxList)
print(PatternMethods)
print(Samples)
print(Clock.playing)
var.ch = var([0,1],[15,3])
~p1 >> play('W', amp=.5, dur=6, shape=.5, rate=.5, room=1, formant=[1,1,2])
~p2 >> play('m', amp=.8, dur=2/3, sample=[0,1,0... | 31.057143 | 120 | 0.582337 | Scale.default = 'indian'
Root.default = 0
Clock.bpm = 80
print(Scale.names())
print(SynthDefs)
print(FxList)
print(PatternMethods)
print(Samples)
print(Clock.playing)
var.ch = var([0,1],[15,3])
~p1 >> play('W', amp=.5, dur=6, shape=.5, rate=.5, room=1, formant=[1,1,2])
~p2 >> play('m', amp=.8, dur=2/3, sample=[0,1,0... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8219ece2a6ff254575b95ea24d0cd5a196a8f886 | 4,237 | py | Python | graphene_auto/graphql_auto/query.py | ssshier/meta-realize | cc13309fa9e7e59044fb1c8e6e6b0a62caa7ca8c | [
"MIT"
] | 1 | 2021-12-18T09:12:58.000Z | 2021-12-18T09:12:58.000Z | graphene_auto/graphql_auto/query.py | ssshier/meta-realize | cc13309fa9e7e59044fb1c8e6e6b0a62caa7ca8c | [
"MIT"
] | null | null | null | graphene_auto/graphql_auto/query.py | ssshier/meta-realize | cc13309fa9e7e59044fb1c8e6e6b0a62caa7ca8c | [
"MIT"
] | null | null | null |
# first lower
| 33.896 | 98 | 0.628275 | from collections import OrderedDict
import graphene
from graphene.types.generic import GenericScalar
from graphene.types.objecttype import ObjectTypeOptions
from graphene_sqlalchemy import SQLAlchemyConnectionField
from graphene_sqlalchemy.types import sort_argument_for_object_type
from graphene_sqlalchemy_auto.filter... | 0 | 2,021 | 0 | 1,207 | 0 | 390 | 0 | 259 | 340 |
ef4b06b997fac916729f1f37fe5a226c6c148e96 | 1,392 | py | Python | cms/stacks/templatetags/stack_tags.py | mightyiam/django-cms | 09bf76d2f3d81fdaebcfb7e9ed4ecd4769fa8c25 | [
"BSD-3-Clause"
] | 2 | 2018-05-17T02:49:49.000Z | 2019-08-20T02:07:44.000Z | cms/stacks/templatetags/stack_tags.py | mightyiam/django-cms | 09bf76d2f3d81fdaebcfb7e9ed4ecd4769fa8c25 | [
"BSD-3-Clause"
] | 2 | 2019-02-13T07:58:23.000Z | 2019-02-13T07:58:27.000Z | cms/stacks/templatetags/stack_tags.py | mightyiam/django-cms | 09bf76d2f3d81fdaebcfb7e9ed4ecd4769fa8c25 | [
"BSD-3-Clause"
] | null | null | null | from django import template
register = template.Library()
register.tag(StackNode)
| 33.95122 | 112 | 0.658764 | from classytags.arguments import Argument
from classytags.core import Tag, Options
from django import template
from cms.plugin_rendering import render_placeholder
from cms.stacks.models import Stack
register = template.Library()
class StackNode(Tag):
name = 'stack'
options = Options(
Argument('code... | 0 | 0 | 0 | 1,110 | 0 | 0 | 0 | 83 | 113 |
e5466609c1e8a5716819e3a17f2a6558dd33f7ad | 6,135 | py | Python | utils/lib/rr_graph/tracks.py | Fleker/symbiflow-arch-defs | 0be4b3ec85e4614b29258116492299f39cf59ae3 | [
"ISC"
] | null | null | null | utils/lib/rr_graph/tracks.py | Fleker/symbiflow-arch-defs | 0be4b3ec85e4614b29258116492299f39cf59ae3 | [
"ISC"
] | null | null | null | utils/lib/rr_graph/tracks.py | Fleker/symbiflow-arch-defs | 0be4b3ec85e4614b29258116492299f39cf59ae3 | [
"ISC"
] | null | null | null | from collections import namedtuple
Track = namedtuple('Track', 'direction x_low x_high y_low y_high')
def make_tracks(xs, ys, points):
""" Give a list of xs columns and ys rows and points, return a list of
Track's and connections between the tracks.
An assert will fail if each point in the point ... | 29.354067 | 90 | 0.545884 | from collections import namedtuple
import pprint
from enum import Enum
class Direction(Enum):
NO_SIDE = 0
LEFT = 1
RIGHT = 2
TOP = 3
BOTTOM = 4
Track = namedtuple('Track', 'direction x_low x_high y_low y_high')
def print_tracks(tracks):
pprint.pprint(tracks)
def make_tracks(xs, ys, points):
... | 0 | 0 | 0 | 2,662 | 0 | 142 | 0 | -8 | 136 |
d5efc68128591aad4024897c7fc12d3343ac12cf | 3,708 | py | Python | easypyqt/widget/buttongroupwidget.py | mafster/easypyqt4 | e3681de1a974741e74cc3b77cad3e599acef20ae | [
"MIT"
] | null | null | null | easypyqt/widget/buttongroupwidget.py | mafster/easypyqt4 | e3681de1a974741e74cc3b77cad3e599acef20ae | [
"MIT"
] | null | null | null | easypyqt/widget/buttongroupwidget.py | mafster/easypyqt4 | e3681de1a974741e74cc3b77cad3e599acef20ae | [
"MIT"
] | null | null | null | from PyQt4 import QtGui
if __name__ == '__main__':
import sys
app = QtGui.QApplication(sys.argv)
buttonList = [('test1', 'TestONE'), ('test2', 'TestTWO')]
fw = ButtonGroupWidget(button_list=buttonList, label='My Test', exclusive=True)
fw.show()
sys.exit(app.exec_())
| 31.423729 | 121 | 0.608414 | from PyQt4 import QtGui, QtCore
from easypyqt.widget import basicwidget
class ButtonGroupWidget(basicwidget.BasicWidget):
"""
A group of widgets with horizontal or vertical layout.
EXAMPLE::
buttonList = [('test1', 'TestONE'), ('test2', 'TestTWO')]
fw = ButtonGroupWidget(button_... | 0 | 0 | 0 | 3,339 | 0 | 0 | 0 | 26 | 46 |
e8a7f3571cb178642df008d0c5562b9905d3d883 | 3,610 | py | Python | core/model/metric/proto_net.py | RuiBai1999/myrepo | 1cf51db063b922ef58ff11da998c3f12f643420d | [
"MIT"
] | 471 | 2021-09-13T11:28:34.000Z | 2022-03-30T07:26:54.000Z | core/model/metric/proto_net.py | liuwenqi528/LibFewShot | ea8d618995a51079c79a6291af2ca02b01b846ea | [
"MIT"
] | 24 | 2021-09-22T02:34:05.000Z | 2022-02-19T07:26:39.000Z | core/model/metric/proto_net.py | liuwenqi528/LibFewShot | ea8d618995a51079c79a6291af2ca02b01b846ea | [
"MIT"
] | 82 | 2021-09-16T12:48:01.000Z | 2022-03-28T06:57:47.000Z | # -*- coding: utf-8 -*-
"""
@inproceedings{DBLP:conf/nips/SnellSZ17,
author = {Jake Snell and
Kevin Swersky and
Richard S. Zemel},
title = {Prototypical Networks for Few-shot Learning},
booktitle = {Advances in Neural Information Processing Systems 30: Annual Conference
... | 33.425926 | 109 | 0.599446 | # -*- coding: utf-8 -*-
"""
@inproceedings{DBLP:conf/nips/SnellSZ17,
author = {Jake Snell and
Kevin Swersky and
Richard S. Zemel},
title = {Prototypical Networks for Few-shot Learning},
booktitle = {Advances in Neural Information Processing Systems 30: Annual Conference
... | 0 | 0 | 0 | 2,698 | 0 | 0 | 0 | 26 | 157 |
2c0168386a31aecebe6e4bac70dbabb40b6a6459 | 12,337 | py | Python | amfast/class_def/__init__.py | limscoder/amfast | e77162615090b6a1ad03565afcc4bec4b46f6a11 | [
"MIT"
] | 4 | 2015-12-12T04:34:34.000Z | 2021-07-30T22:11:26.000Z | amfast/class_def/__init__.py | limscoder/amfast | e77162615090b6a1ad03565afcc4bec4b46f6a11 | [
"MIT"
] | 3 | 2015-03-23T23:45:30.000Z | 2016-08-17T01:32:51.000Z | amfast/class_def/__init__.py | limscoder/amfast | e77162615090b6a1ad03565afcc4bec4b46f6a11 | [
"MIT"
] | 8 | 2015-03-23T23:45:34.000Z | 2018-01-25T16:16:43.000Z | """Provides an interface for determining how Python objects are serialized and de-serialized."""
# ---- module attributes ---- #
def get_dynamic_attr_vals(obj, ignore_attrs=None, include_private=False):
"""Returns a dict of attribute values to encode.
keys = attribute names, values = attribute values.
a... | 34.752113 | 101 | 0.638162 | """Provides an interface for determining how Python objects are serialized and de-serialized."""
import threading
from amfast import AmFastError
class ClassDefError(AmFastError):
"""ClassDef related errors."""
pass
class ClassDef(object):
"""Defines how objects of a given class are serialized and de-seri... | 0 | 0 | 0 | 9,873 | 0 | 0 | 0 | 4 | 229 |
af40a8496ad76d848c92c910a587cb63d768c727 | 696 | py | Python | components/mpas-seaice/testing_and_setup/testcases/single_cell/run_testcase.py | katsmith133/E3SM | 996c7e7aa3150822b81b0e34c427b820c74268a2 | [
"BSD-3-Clause"
] | 1 | 2022-03-03T19:09:42.000Z | 2022-03-03T19:09:42.000Z | components/mpas-seaice/testing_and_setup/testcases/single_cell/run_testcase.py | katsmith133/E3SM | 996c7e7aa3150822b81b0e34c427b820c74268a2 | [
"BSD-3-Clause"
] | 7 | 2021-11-16T23:50:53.000Z | 2022-03-21T17:00:30.000Z | components/mpas-seaice/testing_and_setup/testcases/single_cell/run_testcase.py | katsmith133/E3SM | 996c7e7aa3150822b81b0e34c427b820c74268a2 | [
"BSD-3-Clause"
] | null | null | null |
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if __name__ == "__main__":
run_testcase()
| 26.769231 | 87 | 0.524425 | import os
from plot_testcase import plot_testcase
#-------------------------------------------------------------------------------
def run_testcase():
# copy namelist and streams file
os.system("cp ../../configurations/standard_physics_single_cell/namelist.seaice .")
os.system("cp ../../configurations/st... | 0 | 0 | 0 | 0 | 0 | 411 | 0 | 6 | 67 |
f50fe79d406abfe3d682d940fe0258fd5f8c1809 | 1,911 | py | Python | audio_split.py | grahamheather/MINT-Speech-Recognition | 51c0a56088b3b2020be2e125e523df25c0e82621 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | audio_split.py | grahamheather/MINT-Speech-Recognition | 51c0a56088b3b2020be2e125e523df25c0e82621 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | audio_split.py | grahamheather/MINT-Speech-Recognition | 51c0a56088b3b2020be2e125e523df25c0e82621 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import os
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, description="Split an audio file on silence.")
parser.add_argument('audio_file', help='the audio file to split')
parser.add_argument('--min_silence_len', default=400)
parse... | 36.75 | 177 | 0.773417 | import os
import argparse
from pydub import AudioSegment
from pydub.silence import split_on_silence
class AudioSettingsContainer:
def __init__(self, min_silence_len, silence_thresh, keep_silence):
self.min_silence_len = min_silence_len
self.silence_thresh = silence_thresh
self.keep_silence = keep_silence
def... | 0 | 0 | 0 | 191 | 0 | 882 | 0 | 30 | 91 |
c30631a2186e2da2987d31b03216293e8a47c2b1 | 16,866 | py | Python | tests/unit/async_/work/test_result.py | artcg/neo4j-python-driver | 97185f7e435d8f541d8b1445b3164668e56db177 | [
"Apache-2.0"
] | null | null | null | tests/unit/async_/work/test_result.py | artcg/neo4j-python-driver | 97185f7e435d8f541d8b1445b3164668e56db177 | [
"Apache-2.0"
] | null | null | null | tests/unit/async_/work/test_result.py | artcg/neo4j-python-driver | 97185f7e435d8f541d8b1445b3164668e56db177 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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... | 35.733051 | 83 | 0.61206 | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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... | 0 | 8,705 | 4,426 | 2,348 | 0 | 7 | 0 | 198 | 526 |
296c37c82ec0c80065e417707dc0dac24a4cc265 | 2,484 | py | Python | smtpdfix/smtp.py | jeremysprofile/smtpdfix | 46ead66aafbda18d83b583dff1c4dc0430c85306 | [
"MIT"
] | null | null | null | smtpdfix/smtp.py | jeremysprofile/smtpdfix | 46ead66aafbda18d83b583dff1c4dc0430c85306 | [
"MIT"
] | null | null | null | smtpdfix/smtp.py | jeremysprofile/smtpdfix | 46ead66aafbda18d83b583dff1c4dc0430c85306 | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger(__name__)
| 34.985915 | 80 | 0.623591 | import logging
from aiosmtpd.smtp import MISSING, SMTP, Session, syntax
from .config import Config
from .handlers import AUTH_REQUIRED
log = logging.getLogger(__name__)
class AuthSession(Session):
def __init__(self, loop):
super().__init__(loop)
self.authenticated = False
clas... | 0 | 396 | 1,260 | 595 | 0 | 0 | 0 | 54 | 122 |
c6f6a44fa1725d55f292b7501c236447623f2d46 | 942 | py | Python | data/external/repositories_2to3/119820/kaggle-seizure-prediction-master/thesis_scripts/params_calc.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/119820/kaggle-seizure-prediction-master/thesis_scripts/params_calc.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/119820/kaggle-seizure-prediction-master/thesis_scripts/params_calc.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | nfreq_bands = 7
win_length_sec = 120
stride_sec = 120
n_channels = 16
n_timesteps = (600-win_length_sec)/stride_sec + 1
global_pooling = 1
nkerns = [16, 32, 512]
recept_width = [1, 1]
stride = [1, 1]
pool_width = [1, 1]
n_params = 0
c1_input_width = n_timesteps
print('c1:', nkerns[0], '@', ((n_timeste... | 30.387097 | 99 | 0.653928 | nfreq_bands = 7
win_length_sec = 120
stride_sec = 120
n_channels = 16
n_timesteps = (600-win_length_sec)/stride_sec + 1
global_pooling = 1
nkerns = [16, 32, 512]
recept_width = [1, 1]
stride = [1, 1]
pool_width = [1, 1]
n_params = 0
c1_input_width = n_timesteps
print('c1:', nkerns[0], '@', ((n_timeste... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4393f5f0ca144b153266589c66804471f7553fc2 | 221 | py | Python | source/gps/algorithm/dynamics/config.py | shercklo/LTO-CMA | 9ce5cf4a07f9d85360de3bc40c0699ea476a0b39 | [
"Apache-2.0"
] | 7 | 2020-08-06T08:59:23.000Z | 2021-06-01T08:46:22.000Z | source/gps/algorithm/dynamics/config.py | shercklo/LTO-CMA | 9ce5cf4a07f9d85360de3bc40c0699ea476a0b39 | [
"Apache-2.0"
] | 4 | 2020-12-08T22:23:16.000Z | 2022-02-10T05:12:05.000Z | source/gps/algorithm/dynamics/config.py | shercklo/LTO-CMA | 9ce5cf4a07f9d85360de3bc40c0699ea476a0b39 | [
"Apache-2.0"
] | 1 | 2021-03-05T14:18:28.000Z | 2021-03-05T14:18:28.000Z | """ Default configuration and hyperparameter values for dynamics objects. """
# DynamicsPriorGMM
DYN_PRIOR_GMM = {
'min_samples_per_cluster': 20,
'max_clusters': 50,
'max_samples': 20,
'strength': 1.0,
}
| 22.1 | 77 | 0.687783 | """ Default configuration and hyperparameter values for dynamics objects. """
# DynamicsPriorGMM
DYN_PRIOR_GMM = {
'min_samples_per_cluster': 20,
'max_clusters': 50,
'max_samples': 20,
'strength': 1.0,
}
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
296f623cabb173a3999c60c4ec4b232e1bd4e2ad | 455 | py | Python | Task1B.py | cued-ia-computing/flood-pj354-ystt2 | d03644430d3a9b6f52d76129a5854d7eb298715b | [
"MIT"
] | null | null | null | Task1B.py | cued-ia-computing/flood-pj354-ystt2 | d03644430d3a9b6f52d76129a5854d7eb298715b | [
"MIT"
] | null | null | null | Task1B.py | cued-ia-computing/flood-pj354-ystt2 | d03644430d3a9b6f52d76129a5854d7eb298715b | [
"MIT"
] | null | null | null | from floodsystem.stationdata import build_station_list
from floodsystem.geo import stations_by_distance
stations = build_station_list()
p = (52.2053, 0.1218) # coords of cambridge
print("closest 10 stations from cambridge: {}".format(stations_by_distance(stations, p)[0:10]))
print("furthest 10 stations from cambridg... | 50.555556 | 111 | 0.806593 | from floodsystem.stationdata import build_station_list
from floodsystem.geo import stations_by_distance, stations_with_radius, rivers_with_stations, stations_by_river
import itertools
stations = build_station_list()
p = (52.2053, 0.1218) # coords of cambridge
print("closest 10 stations from cambridge: {}".format(sta... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 22 |
e05c17b9367d48d846795ae4d0215a7b2482006d | 811 | py | Python | examples/02_simple_attractor_ring_network.py | marsgr6/ann | 64c051263fd1f80d8f596b217fe733e0e1b4c2fa | [
"MIT"
] | 1 | 2021-05-25T23:43:44.000Z | 2021-05-25T23:43:44.000Z | examples/02_simple_attractor_ring_network.py | marsgr6/ann | 64c051263fd1f80d8f596b217fe733e0e1b4c2fa | [
"MIT"
] | null | null | null | examples/02_simple_attractor_ring_network.py | marsgr6/ann | 64c051263fd1f80d8f596b217fe733e0e1b4c2fa | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from ann import attractor_network as AA
from ann import pattern as p
import numpy as np
N = 1024 # Number of neurons
K = 4 # Degree
a = 0.5 # Sparseness
T = 800 # Steps
# Create network with same parameters as above
activity_net = AA.SimpleAttractor(N, K, a, "ring")
print(activity_net... | 25.34375 | 62 | 0.760789 | import matplotlib.pyplot as plt
from ann import attractor_network as AA
from ann import pattern as p
import numpy as np
N = 1024 # Number of neurons
K = 4 # Degree
a = 0.5 # Sparseness
T = 800 # Steps
# Create network with same parameters as above
activity_net = AA.SimpleAttractor(N, K, a, "ring")
print(activity_net... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f739c519bdff3ea0513a876d0a9b7c47e6b5da68 | 3,963 | py | Python | ClassifierCode/classifier_builder.py | annaw3558/BankNoteClassifier | 18605b44f949a84bf78b43dec741ca003d17209c | [
"MIT"
] | null | null | null | ClassifierCode/classifier_builder.py | annaw3558/BankNoteClassifier | 18605b44f949a84bf78b43dec741ca003d17209c | [
"MIT"
] | null | null | null | ClassifierCode/classifier_builder.py | annaw3558/BankNoteClassifier | 18605b44f949a84bf78b43dec741ca003d17209c | [
"MIT"
] | null | null | null | '''This program contains the functions averageFinder and midpointFinder. AverageData calculates the averages of the
"columns" of a list of numbers (a list of lists of numbers) for real and fake samples (separately) and midpointFinder
finds the midpoint between the real and fake averages.
Data is either given from the t... | 43.076087 | 123 | 0.685592 | '''This program contains the functions averageFinder and midpointFinder. AverageData calculates the averages of the
"columns" of a list of numbers (a list of lists of numbers) for real and fake samples (separately) and midpointFinder
finds the midpoint between the real and fake averages.
Data is either given from the t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
818bf3509597a12f4d23f992682047ce4d0bec6f | 7,334 | py | Python | scripts/git_remotes_setting.py | lonsty/gitclk | df70bee793225905053066d3b71380908e883a58 | [
"MIT"
] | null | null | null | scripts/git_remotes_setting.py | lonsty/gitclk | df70bee793225905053066d3b71380908e883a58 | [
"MIT"
] | null | null | null | scripts/git_remotes_setting.py | lonsty/gitclk | df70bee793225905053066d3b71380908e883a58 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# @Author: allen
# @Date: Nov 29 11:07 2019
import os
import sys
import click
__author__ = 'Allen Shaw'
__version__ = '0.1.1'
CONFIG = os.path.expanduser('~/.config/gitclk/config/config.json')
TEMPERATE_CONFIG = os.path.expanduser('~/.config/gitclk/config/temperate.json')
cli.add_command... | 35.95098 | 108 | 0.593128 | #! /usr/bin/python3
# @Author: allen
# @Date: Nov 29 11:07 2019
import configparser
import json
import locale
import os
import re
import sys
from collections import OrderedDict
import click
from dialog import Dialog
__author__ = 'Allen Shaw'
__version__ = '0.1.1'
CONFIG = os.path.expanduser('~/.config/gitclk/config/c... | 0 | 636 | 0 | 0 | 0 | 5,863 | 0 | -14 | 316 |
670abde2985288602ad77426b29b42b8ec93d122 | 7,279 | py | Python | python3/test/test_validators.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | python3/test/test_validators.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | python3/test/test_validators.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 27.996154 | 69 | 0.588955 | import unittest
from src import validators
class TestNotNull(unittest.TestCase):
def test_none(self):
try:
validators.NotNull(None, ['node'])
self.assertTrue(False)
except ValueError as ex:
self.assertEqual('node: Cannot be null', ex.args[0])
def test_not_... | 0 | 0 | 0 | 6,899 | 0 | 0 | 0 | 5 | 298 |
8823920343f8d62db6c24a665dd5433c43476792 | 4,498 | py | Python | pytilemap/maplegenditem.py | allebacco/PyTileMap | 3e83b11b5e023d7ac0f14dd50515250dd020547e | [
"MIT"
] | 6 | 2018-06-13T00:41:05.000Z | 2020-10-12T19:48:24.000Z | pytilemap/maplegenditem.py | allebacco/PyTileMap | 3e83b11b5e023d7ac0f14dd50515250dd020547e | [
"MIT"
] | 1 | 2017-10-15T20:05:29.000Z | 2017-11-20T16:04:17.000Z | pytilemap/maplegenditem.py | allebacco/PyTileMap | 3e83b11b5e023d7ac0f14dd50515250dd020547e | [
"MIT"
] | 5 | 2016-04-21T11:59:20.000Z | 2020-07-16T03:45:30.000Z | from __future__ import print_function, absolute_import
| 29.592105 | 84 | 0.63695 | from __future__ import print_function, absolute_import
from qtpy.QtCore import Qt, Slot, QRectF, QPointF
from qtpy.QtGui import QPen, QBrush, QColor
from qtpy.QtWidgets import QGraphicsObject, QGraphicsRectItem, QGraphicsItemGroup, \
QGraphicsSimpleTextItem, QGraphicsEllipseItem, QGraphicsLineItem
from .mapitems ... | 0 | 80 | 0 | 3,952 | 0 | 0 | 0 | 228 | 180 |
861affe4f349d0e3e1a09843566f499469ee4d61 | 139,634 | py | Python | src/genie/libs/parser/iosxe/show_lisp.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | 2 | 2021-01-27T03:37:39.000Z | 2021-01-27T03:40:50.000Z | src/genie/libs/parser/iosxe/show_lisp.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/show_lisp.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | null | null | null | ''' show_lisp.py
IOSXE parsers for the following show commands:
* show lisp session
* show lisp platform
* show lisp all extranet <extranet> instance-id <instance_id>
* show lisp all instance-id <instance_id> dynamic-eid detail
* show lisp all service ipv4
* show lisp all service ipv6
* sho... | 42.990764 | 105 | 0.406513 | ''' show_lisp.py
IOSXE parsers for the following show commands:
* show lisp session
* show lisp platform
* show lisp all extranet <extranet> instance-id <instance_id>
* show lisp all instance-id <instance_id> dynamic-eid detail
* show lisp all service ipv4
* show lisp all service ipv6
* sho... | 0 | 0 | 0 | 131,548 | 0 | 0 | 0 | 85 | 660 |
5e78f403cc852ace716d8b2f648ee3e2ff373ed8 | 1,771 | py | Python | alipay/aop/api/domain/AftFinsecureRiskplusSecurityPolicyQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AftFinsecureRiskplusSecurityPolicyQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AftFinsecureRiskplusSecurityPolicyQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 29.516667 | 89 | 0.644833 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.EventInfo import EventInfo
class AftFinsecureRiskplusSecurityPolicyQueryModel(object):
def __init__(self):
self._event_info = None
self._product... | 0 | 699 | 0 | 866 | 0 | 0 | 0 | 67 | 90 |
296da7520a82e6b39740ad3971be880ce675dc15 | 265 | py | Python | widget_periodictable/tests/test_example.py | osscar-org/widget-periodictable | 35264ce79e6b9e82dcdfe17558a7a17ac6c24e96 | [
"BSD-3-Clause"
] | 2 | 2020-03-27T04:20:55.000Z | 2020-08-25T18:20:57.000Z | widget_periodictable/tests/test_example.py | osscar-org/widget-periodictable | 35264ce79e6b9e82dcdfe17558a7a17ac6c24e96 | [
"BSD-3-Clause"
] | 15 | 2020-05-06T17:03:16.000Z | 2021-11-08T15:41:51.000Z | widget_periodictable/tests/test_example.py | osscar-org/widget-periodictable | 35264ce79e6b9e82dcdfe17558a7a17ac6c24e96 | [
"BSD-3-Clause"
] | 2 | 2020-07-07T19:07:04.000Z | 2022-03-01T02:52:58.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Dou Du.
# Distributed under the terms of the Modified BSD License.
| 17.666667 | 58 | 0.724528 | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Dou Du.
# Distributed under the terms of the Modified BSD License.
import pytest
from ..periodic_table import PTableWidget
def test_example_creation_blank():
w = PTableWidget()
assert w.states == 1
| 0 | 0 | 0 | 0 | 0 | 61 | 0 | 12 | 69 |
6d19afbc06ea546d7bf71d5095659e63bc2f564e | 1,634 | py | Python | scripts/datasets/mvsec_convert_night_groundtruth.py | SensorsINI/v2e_exps_public | d3ec8c2ecda29eb8cae8dd47869449f8cdcbd87a | [
"MIT"
] | 3 | 2022-01-03T15:29:24.000Z | 2022-03-04T13:43:37.000Z | scripts/datasets/mvsec_convert_night_groundtruth.py | SensorsINI/v2e_exps_public | d3ec8c2ecda29eb8cae8dd47869449f8cdcbd87a | [
"MIT"
] | null | null | null | scripts/datasets/mvsec_convert_night_groundtruth.py | SensorsINI/v2e_exps_public | d3ec8c2ecda29eb8cae8dd47869449f8cdcbd87a | [
"MIT"
] | null | null | null | """Groundtruth saved in XML, saved as compatible format in txt.
Author: Yuhuang Hu
Email : yuhuang.hu@ini.uch.ch
"""
import argparse
import os
import glob
import xmltodict
from v2e_exps.utils import expandpath
parser = argparse.ArgumentParser()
parser.add_argument("--data_root", type=expandpath)
parser.add_argumen... | 23.681159 | 75 | 0.596083 | """Groundtruth saved in XML, saved as compatible format in txt.
Author: Yuhuang Hu
Email : yuhuang.hu@ini.uch.ch
"""
import argparse
import os
import glob
import json
import xmltodict
from v2e_exps.utils import expandpath
parser = argparse.ArgumentParser()
parser.add_argument("--data_root", type=expandpath)
parser... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 22 |
a6ae443d9b80e2602554220cec23dc5bc418d79f | 4,712 | py | Python | xga/models/__init__.py | DavidT3/XGA | cde51c3f29f98b5f1e981fb6d327c04072b0ba38 | [
"BSD-3-Clause"
] | 12 | 2020-05-16T09:45:45.000Z | 2022-02-14T14:41:46.000Z | xga/models/__init__.py | DavidT3/XGA | cde51c3f29f98b5f1e981fb6d327c04072b0ba38 | [
"BSD-3-Clause"
] | 684 | 2020-05-28T08:52:09.000Z | 2022-03-31T10:56:24.000Z | xga/models/__init__.py | DavidT3/XGA | cde51c3f29f98b5f1e981fb6d327c04072b0ba38 | [
"BSD-3-Clause"
] | 2 | 2022-02-04T10:55:55.000Z | 2022-02-04T11:30:56.000Z | # This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (david.turner@sussex.ac.uk) 08/03/2021, 17:29. Copyright (c) David J Turner
import inspect
from types import FunctionType
# Doing star imports just because its more conveni... | 50.666667 | 118 | 0.732598 | # This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (david.turner@sussex.ac.uk) 08/03/2021, 17:29. Copyright (c) David J Turner
import inspect
from types import FunctionType
# Doing star imports just because its more conveni... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 |
3d8fdf51b23b1b165c83279b6f8d9cd73fbc3e82 | 5,308 | py | Python | os3_rll/operations/challenge.py | Erik-Lamers1/OS3-RRL-Python | c1fbc1f2279f1b43290582ee39ed226d8173a101 | [
"MIT"
] | null | null | null | os3_rll/operations/challenge.py | Erik-Lamers1/OS3-RRL-Python | c1fbc1f2279f1b43290582ee39ed226d8173a101 | [
"MIT"
] | null | null | null | os3_rll/operations/challenge.py | Erik-Lamers1/OS3-RRL-Python | c1fbc1f2279f1b43290582ee39ed226d8173a101 | [
"MIT"
] | null | null | null | from logging import getLogger
from datetime import datetime
from os3_rll.models.challenge import Challenge, ChallengeException
from os3_rll.models.player import Player, PlayerException
from os3_rll.models.db import Database
logger = getLogger(__name__)
def do_challenge_sanity_check(p1, p2, may_already_by_challenged... | 43.508197 | 127 | 0.681424 | from logging import getLogger
from datetime import datetime
from os3_rll.models.challenge import Challenge, ChallengeException
from os3_rll.models.player import Player, PlayerException
from os3_rll.models.db import Database
logger = getLogger(__name__)
def do_challenge_sanity_check(p1, p2, may_already_by_challenged... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1654dcf2537d523059b746f07e020438c1477d6 | 10,517 | py | Python | pyod/models/suod.py | BillyGareth/pyod | 4ad1ab8cd88382fe15c237e8db8ad8e3a9302eaf | [
"BSD-2-Clause"
] | 5,126 | 2018-11-09T06:05:38.000Z | 2022-03-31T14:25:14.000Z | pyod/models/suod.py | durgeshsamariya/pyod | dfafc57f74dc3d49d0166f21ab2ddb97e3d1d898 | [
"BSD-2-Clause"
] | 325 | 2018-11-14T20:02:39.000Z | 2022-03-30T22:49:38.000Z | pyod/models/suod.py | durgeshsamariya/pyod | dfafc57f74dc3d49d0166f21ab2ddb97e3d1d898 | [
"BSD-2-Clause"
] | 1,049 | 2018-11-09T06:12:12.000Z | 2022-03-31T06:21:28.000Z | # -*- coding: utf-8 -*-
"""SUOD
"""
# Author: Yue Zhao <zhaoy@cmu.edu>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
try:
except ImportError:
print('please install suod first for SUOD by `pip install suod`')
| 38.383212 | 79 | 0.658458 | # -*- coding: utf-8 -*-
"""SUOD
"""
# Author: Yue Zhao <zhaoy@cmu.edu>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
import numpy as np
from sklearn.utils import check_array
from sklearn.utils.validation import check_is_fitted
try:
import suod
except ImportError:
... | 0 | 0 | 0 | 9,839 | 0 | 0 | 0 | 123 | 293 |
0dc105afeb6b53b12ab37cf4662631842f1f18cb | 2,004 | py | Python | model/evaluate/get_errorrates_direct.py | manojakm/sanskrit-ocr-1 | 4a7b58dd68ef30e8a849acde3fff1595b4c607c9 | [
"MIT"
] | 1 | 2021-08-06T15:29:07.000Z | 2021-08-06T15:29:07.000Z | model/evaluate/get_errorrates_direct.py | Sanskrit-Club/sanskrit-ocr | de908c1a62df8539b22a2458b2dfd4bd07462009 | [
"MIT"
] | null | null | null | model/evaluate/get_errorrates_direct.py | Sanskrit-Club/sanskrit-ocr | de908c1a62df8539b22a2458b2dfd4bd07462009 | [
"MIT"
] | 1 | 2020-11-07T08:37:52.000Z | 2020-11-07T08:37:52.000Z |
import sys
gt_file = sys.argv[1]
pred_file = sys.argv[2]
with open(gt_file) as f:
gt_lines = f.readlines()
gt_lines = [' '.join(x.strip().split()) for x in gt_lines]
print(len(gt_lines))
with open(pred_file) as f:
pred_lines = f.readlines()
pred_lines = [' '.join(x.strip().split()) for x in pred_lines]
... | 25.05 | 94 | 0.613772 | from jiwer import wer
def levenshteinDistance(s1, s2):
if len(s1) > len(s2):
s1, s2 = s2, s1
distances = range(len(s1) + 1)
for i2, c2 in enumerate(s2):
distances_ = [i2+1]
for i1, c1 in enumerate(s1):
if c1 == c2:
distances_.append(distances[i1])
... | 0 | 0 | 0 | 0 | 0 | 1,334 | 0 | -12 | 160 |
a020e88f0a5ea67f5eab54d5d815db2c78b66f2b | 6,109 | py | Python | matrix_tree_theorem.py | bekou/eacl-2017-dataset | 34d86f87b76118253e24bfa48aac1afa8771546f | [
"MIT"
] | 4 | 2017-10-09T14:15:59.000Z | 2021-12-28T20:28:56.000Z | matrix_tree_theorem.py | bekou/eacl-2017-dataset | 34d86f87b76118253e24bfa48aac1afa8771546f | [
"MIT"
] | null | null | null | matrix_tree_theorem.py | bekou/eacl-2017-dataset | 34d86f87b76118253e24bfa48aac1afa8771546f | [
"MIT"
] | 2 | 2019-05-26T15:55:36.000Z | 2021-12-28T20:31:26.000Z |
margFeat=[]
| 28.680751 | 122 | 0.50974 | import networkx as nx
import numpy as np
import math
import pandas as pd
from networkx.drawing.nx_agraph import graphviz_layout
import matplotlib
from time import gmtime, strftime
import scipy
margFeat=[]
def getAdjacency(theta):
adjacency=np.exp(theta)
#print "adjacency max "+str(np.amax(adjacency))
np.f... | 0 | 0 | 0 | 0 | 0 | 5,689 | 0 | 17 | 372 |
53b8cce64b74ac679ed9a39c6abcc9ab434be4f6 | 24,672 | py | Python | pandas/stats/plm.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 652 | 2015-07-26T00:00:17.000Z | 2022-02-24T18:30:04.000Z | pandas/stats/plm.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 8 | 2015-09-07T03:38:19.000Z | 2021-05-23T03:18:51.000Z | pandas/stats/plm.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 40 | 2015-07-24T19:45:08.000Z | 2021-11-01T14:54:56.000Z | """
Linear regression objects for panel data
"""
# pylint: disable-msg=W0231
# pylint: disable-msg=E1101,E1103
from __future__ import division
import numpy as np
import pandas.stats.math as math
def add_intercept(panel, name='intercept'):
"""
Add column of ones to input panel
Parameters
-------... | 29.09434 | 83 | 0.560271 | """
Linear regression objects for panel data
"""
# pylint: disable-msg=W0231
# pylint: disable-msg=E1101,E1103
from __future__ import division
from pandas.compat import range
from pandas import compat
import warnings
import numpy as np
from pandas.core.panel import Panel
from pandas.core.frame import DataFrame
from... | 0 | 6,194 | 0 | 14,071 | 0 | 2,035 | 0 | 161 | 427 |
409610d1dd2cdf8851c1ac5fbe9219d4daecb716 | 2,857 | py | Python | lightning_transformers/task/nlp/question_answering/config.py | mariomeissner/lightning-transformers | 4efda7b4e924b37956c7a008ca01819f5c3f98c8 | [
"Apache-2.0"
] | 451 | 2021-04-21T15:53:59.000Z | 2022-03-29T10:39:45.000Z | lightning_transformers/task/nlp/question_answering/config.py | mathemusician/lightning-transformers | b2ef06113433e6a178ce4d3c9df7ede8064e247f | [
"Apache-2.0"
] | 92 | 2021-04-21T18:42:58.000Z | 2022-03-30T05:29:54.000Z | lightning_transformers/task/nlp/question_answering/config.py | mathemusician/lightning-transformers | b2ef06113433e6a178ce4d3c9df7ede8064e247f | [
"Apache-2.0"
] | 51 | 2021-04-22T05:35:28.000Z | 2022-03-17T13:08:12.000Z | # Copyright 2020 The HuggingFace Team 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 applicable... | 41.405797 | 117 | 0.676234 | # Copyright 2020 The HuggingFace Team 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 applicable... | 0 | 1,992 | 0 | 0 | 0 | 0 | 0 | 65 | 69 |
0e4f69138aecd1313f122259efebb214ee565651 | 19,502 | py | Python | venv/Lib/site-packages/tensorboard/uploader/proto/server_info_pb2.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | venv/Lib/site-packages/tensorboard/uploader/proto/server_info_pb2.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | venv/Lib/site-packages/tensorboard/uploader/proto/server_info_pb2.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorboard/uploader/proto/server_info.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor a... | 40.127572 | 1,788 | 0.762383 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorboard/uploader/proto/server_info.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5dc6cd1f424f32bce276160e04c696e0871379df | 971 | py | Python | PycharmProjects/PythonExercicios/ex051.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | PycharmProjects/PythonExercicios/ex051.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | PycharmProjects/PythonExercicios/ex051.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | # Exerccio Python #051 - Progresso Aritmtica
#
# Desenvolva um programa que leia o PRIMEIRO TERMO e a RAZO de uma PA. No final, mostre os 10 primeiros termos dessa
# progresso.
#
# OBS: Eu tentei realizar esse exercicio, fiz o codgo mas ele apresentou ERRO DE LGICA! Estude mais P.A e
# esse conteudo!
print('\033[0;35m... | 38.84 | 117 | 0.677652 | # Exercício Python #051 - Progressão Aritmética
#
# Desenvolva um programa que leia o PRIMEIRO TERMO e a RAZÃO de uma PA. No final, mostre os 10 primeiros termos dessa
# progressão.
#
# OBS: Eu tentei realizar esse exercicio, fiz o codígo mas ele apresentou ERRO DE LÓGICA! Estude mais P.A e
# esse conteudo!
print('\03... | 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d65cf02411616f4d20773f38a117a5e0f588a6fa | 8,757 | py | Python | app/main/lib/shared_models/audio_model.py | meedan/alegre | ad28736f53b8905882e196e90cac66d39db341a3 | [
"MIT"
] | 11 | 2018-02-07T00:16:54.000Z | 2021-05-13T22:47:07.000Z | app/main/lib/shared_models/audio_model.py | meedan/alegre | ad28736f53b8905882e196e90cac66d39db341a3 | [
"MIT"
] | 47 | 2018-11-26T23:17:37.000Z | 2022-03-25T16:12:05.000Z | app/main/lib/shared_models/audio_model.py | meedan/alegre | ad28736f53b8905882e196e90cac66d39db341a3 | [
"MIT"
] | 9 | 2019-05-23T22:06:03.000Z | 2020-10-27T20:45:04.000Z | import urllib.error
| 40.730233 | 156 | 0.557383 | import json
import binascii
import uuid
import os
import tempfile
import pathlib
import urllib.error
import urllib.request
import shutil
from flask import current_app as app
from sqlalchemy.orm.attributes import flag_modified
from sqlalchemy import text
import tenacity
import numpy as np
from sqlalchemy.orm.exc import ... | 0 | 4,114 | 0 | 4,073 | 0 | 58 | 0 | 67 | 421 |
95ba0fef43d174338ef023c953eae13b890ae3d8 | 4,353 | py | Python | chronosphere/analysis/ublb.py | chzhong25346/Chronosphere | 2db97939be3415ad508de6abe9ac79f3ee1d1eff | [
"Apache-2.0"
] | null | null | null | chronosphere/analysis/ublb.py | chzhong25346/Chronosphere | 2db97939be3415ad508de6abe9ac79f3ee1d1eff | [
"Apache-2.0"
] | null | null | null | chronosphere/analysis/ublb.py | chzhong25346/Chronosphere | 2db97939be3415ad508de6abe9ac79f3ee1d1eff | [
"Apache-2.0"
] | null | null | null | import logging
import pandas as pd
logger = logging.getLogger('main.ublb')
pd.set_option('mode.chained_assignment', None)
| 43.53 | 100 | 0.47875 | import logging
import pandas as pd
from datetime import timedelta
from ..models import Index, Quote, Quote_CSI300, Ublb_cross, Rsi_predict_report
from ..utils.utils import gen_id
from stockstats import StockDataFrame
logger = logging.getLogger('main.ublb')
pd.set_option('mode.chained_assignment', None)
def ublb_cross... | 0 | 0 | 0 | 0 | 0 | 4,025 | 0 | 94 | 111 |
8837c89035b51cf7cab266a420e461edd6e2c565 | 90 | py | Python | wagtailrelevancy/__init__.py | takeflight/wagtail-relevancy | 3f4a9a57ccc19a8c829d67ee0088066b6c8bfc99 | [
"BSD-3-Clause"
] | 6 | 2016-01-11T03:34:51.000Z | 2016-08-09T12:01:49.000Z | wagtailrelevancy/__init__.py | takeflight/wagtail-relevancy | 3f4a9a57ccc19a8c829d67ee0088066b6c8bfc99 | [
"BSD-3-Clause"
] | null | null | null | wagtailrelevancy/__init__.py | takeflight/wagtail-relevancy | 3f4a9a57ccc19a8c829d67ee0088066b6c8bfc99 | [
"BSD-3-Clause"
] | null | null | null | __version__ = '0.1.0'
default_app_config = 'wagtailrelevancy.apps.WagtailRelevancyConfig'
| 30 | 67 | 0.822222 | __version__ = '0.1.0'
default_app_config = 'wagtailrelevancy.apps.WagtailRelevancyConfig'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d38d3934c21b6d276a3e00586b7ed8710fbe726f | 7,815 | py | Python | pysnmp/CISCO-BITS-CLOCK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-BITS-CLOCK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-BITS-CLOCK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-BITS-CLOCK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-BITS-CLOCK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:34:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 128.114754 | 1,123 | 0.773512 | #
# PySNMP MIB module CISCO-BITS-CLOCK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-BITS-CLOCK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:34:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d49f1553d9a98b1b441ec08f4d61a010fb516748 | 582 | py | Python | bin/mining/sendTeamsMiningNoLootPoints.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | null | null | null | bin/mining/sendTeamsMiningNoLootPoints.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | null | null | null | bin/mining/sendTeamsMiningNoLootPoints.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Crabada script to send mining all available teams for
the given user.
Usage:
python3 -m bin.mining.sendTeamsMining <userAddress>
Author:
@coccoinomane (Twitter)
"""
from src.bot.mining.sendTeamsMining import sendTeamsMining
from src.helpers.general import secondOrNone
from src.mode... | 22.384615 | 66 | 0.773196 | #!/usr/bin/env python3
"""
Crabada script to send mining all available teams for
the given user.
Usage:
python3 -m bin.mining.sendTeamsMining <userAddress>
Author:
@coccoinomane (Twitter)
"""
from src.bot.mining.sendTeamsMining import sendTeamsMining
from src.helpers.general import secondOrNone
from src.mode... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a11b678a4820dfd9056a9ce6b6e9288239599809 | 1,238 | py | Python | migrations/versions/e88bc62b6e4_event_tweaks.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 2 | 2019-06-11T20:46:43.000Z | 2020-08-27T22:50:32.000Z | migrations/versions/e88bc62b6e4_event_tweaks.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 70 | 2017-05-26T14:04:06.000Z | 2021-06-30T10:21:58.000Z | migrations/versions/e88bc62b6e4_event_tweaks.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 4 | 2017-08-29T10:09:30.000Z | 2021-05-25T11:29:03.000Z | """event_tweaks
Revision ID: e88bc62b6e4
Revises: 4d3c2b4ceacb
Create Date: 2015-03-17 14:04:09.394924
"""
# revision identifiers, used by Alembic.
revision = 'e88bc62b6e4'
down_revision = '4d3c2b4ceacb'
branch_labels = None
depends_on = None
| 30.195122 | 148 | 0.661551 | """event_tweaks
Revision ID: e88bc62b6e4
Revises: 4d3c2b4ceacb
Create Date: 2015-03-17 14:04:09.394924
"""
# revision identifiers, used by Alembic.
revision = 'e88bc62b6e4'
down_revision = '4d3c2b4ceacb'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects i... | 0 | 0 | 0 | 0 | 0 | 854 | 0 | 24 | 113 |
4a0e5d2b3f07b2545c2c72811134dafe9c142f43 | 1,363 | py | Python | tests/test_json.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | tests/test_json.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | tests/test_json.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import decimal
from jukoro import arrow
A = arrow.JuArrow
D = decimal.Decimal
| 23.912281 | 63 | 0.517241 | # -*- coding: utf-8 -*-
import datetime
import decimal
from unittest import TestCase
from jukoro import arrow
from jukoro import json
from jukoro import pg
A = arrow.JuArrow
D = decimal.Decimal
class TestJson(TestCase):
def test_arrow(self):
utcnow = arrow.utcnow()
now = arrow.now()
a... | 0 | 0 | 0 | 1,141 | 0 | 0 | 0 | 4 | 112 |
34d4876a4f197f9fddc9c4a61d9f7fd1c36bdc9e | 106 | py | Python | cdparacord/appinfo.py | fennekki/cdparacord | 483682bd476631202ae135b296425bc340f57173 | [
"BSD-2-Clause"
] | 1 | 2016-12-07T08:38:53.000Z | 2016-12-07T08:38:53.000Z | cdparacord/appinfo.py | fennekki/cdparacord | 483682bd476631202ae135b296425bc340f57173 | [
"BSD-2-Clause"
] | 49 | 2018-02-24T15:30:35.000Z | 2021-03-25T21:35:40.000Z | cdparacord/appinfo.py | fennekki/cdparacord | 483682bd476631202ae135b296425bc340f57173 | [
"BSD-2-Clause"
] | null | null | null | """Information about the app."""
__version__ = '0.5.0'
__url__ = 'https://github.com/fennekki/cdparacord'
| 26.5 | 50 | 0.707547 | """Information about the app."""
__version__ = '0.5.0'
__url__ = 'https://github.com/fennekki/cdparacord'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5b653ff48646d4879717136503610ccb87ccf792 | 1,289 | py | Python | download_mem.py | KenArck/WebRCP | d3feec9773c8958651f4b050c8aebc3fca4fa2f0 | [
"MIT"
] | null | null | null | download_mem.py | KenArck/WebRCP | d3feec9773c8958651f4b050c8aebc3fca4fa2f0 | [
"MIT"
] | null | null | null | download_mem.py | KenArck/WebRCP | d3feec9773c8958651f4b050c8aebc3fca4fa2f0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import serial, time, sys
#open and configure serial port
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout = .1
)
#first, clear out 210 buffer
count = 0
while (count < 3):
... | 17.186667 | 81 | 0.626067 | #!/usr/bin/python
import serial, time, sys, fileinput
#open and configure serial port
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout = .1
)
#first, clear out 210 buffer
count = 0
while (co... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0 |
4adb0538bbe460de80c2fc2a9268111004a5b82a | 144 | py | Python | level-6/task-1/task-1-8-1.py | avedensky/python-rush-tasks | 61410816dbb55cce3b518f8d76799c01cdec2aa9 | [
"MIT"
] | 14 | 2019-06-13T09:55:25.000Z | 2022-03-19T15:12:36.000Z | level-6/task-1/task-1-8-1.py | avedensky/python-rush-tasks | 61410816dbb55cce3b518f8d76799c01cdec2aa9 | [
"MIT"
] | 1 | 2021-09-26T16:00:51.000Z | 2021-09-26T16:00:51.000Z | level-6/task-1/task-1-8-1.py | avedensky/python-rush-tasks | 61410816dbb55cce3b518f8d76799c01cdec2aa9 | [
"MIT"
] | 4 | 2020-12-12T16:50:31.000Z | 2022-02-08T12:16:11.000Z | #!/usr/bin/env python3
#coding: utf-8
"""
pythonic way
"""
lst = ['aaabb', 'caca', 'dabc', 'acc', 'abbb']
res = ','.join(lst[1:-1])
print(res)
| 14.4 | 46 | 0.555556 | #!/usr/bin/env python3
#coding: utf-8
"""
pythonic way
"""
lst = ['aaabb', 'caca', 'dabc', 'acc', 'abbb']
res = ','.join(lst[1:-1])
print(res)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d89b298120322bb3f2d818e4e9f698ec1a06bc1c | 655 | py | Python | src/neophile/dependency/pre_commit.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | null | null | null | src/neophile/dependency/pre_commit.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | 23 | 2020-07-17T23:27:44.000Z | 2022-03-21T19:39:19.000Z | src/neophile/dependency/pre_commit.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | null | null | null | """A pre-commit hook dependency."""
from __future__ import annotations
__all__ = ["PreCommitDependency"]
| 24.259259 | 74 | 0.714504 | """A pre-commit hook dependency."""
from __future__ import annotations
from dataclasses import dataclass
from neophile.dependency.base import Dependency
__all__ = ["PreCommitDependency"]
@dataclass(frozen=True, order=True)
class PreCommitDependency(Dependency):
"""Represents a single pre-commit dependency."""... | 0 | 440 | 0 | 0 | 0 | 0 | 0 | 38 | 69 |
1ccaa327ed60e19d773d59ccf22806c30fd7ccaf | 16,952 | py | Python | iot/nat64-dpkt.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 28 | 2018-08-09T13:10:34.000Z | 2022-01-07T13:39:31.000Z | iot/nat64-dpkt.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 4 | 2018-08-09T13:18:12.000Z | 2021-04-06T19:04:54.000Z | iot/nat64-dpkt.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 15 | 2018-12-17T09:17:28.000Z | 2021-03-02T11:25:05.000Z | #!/bin/python3
#
# Copyright (c) 2019 Joakim Eriksson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list o... | 36.852174 | 108 | 0.568487 | #!/bin/python3
#
# Copyright (c) 2019 Joakim Eriksson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list o... | 0 | 0 | 0 | 7,077 | 0 | 5,091 | 0 | 4 | 295 |
e737c7becea69fa93f8f5ebee467579a3b47506c | 1,559 | py | Python | setup.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | setup.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | setup.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
from setuptools import setup
import os
import re
dependencies = [
'pandas>=0.16.0',
'numpy>=1.9.2',
'scipy>=1.6.0',
'statsmodels>=0.12.2',
'networkx>=2.5',
]
with open(os.path.join(os.path.dirname(__file__), "fixedeffect", "_version.py")) as file:
f... | 30.568627 | 89 | 0.604875 | from setuptools import setup, find_packages
from setuptools import setup
import os
import re
def readme():
with open('README.md') as f:
return f.read()
dependencies = [
'pandas>=0.16.0',
'numpy>=1.9.2',
'scipy>=1.6.0',
'statsmodels>=0.12.2',
'networkx>=2.5',
]
with open(os.path.join(... | 0 | 0 | 0 | 0 | 0 | 49 | 0 | 0 | 23 |
fec798ba9bb59ea1a3fd09c421f4550be10bc182 | 620 | py | Python | check.py | Natali-bali/git_check | 2683b82fd03ddfbaf57f70b9abfa7e954c307534 | [
"MIT"
] | null | null | null | check.py | Natali-bali/git_check | 2683b82fd03ddfbaf57f70b9abfa7e954c307534 | [
"MIT"
] | null | null | null | check.py | Natali-bali/git_check | 2683b82fd03ddfbaf57f70b9abfa7e954c307534 | [
"MIT"
] | null | null | null | import os
import pandas as pd
if os.path.exists("datapoints.csv"):
data = pd.read_csv("datapoints.csv")
else:
print("File does not exist")
dataY = data['y'].copy()
dataX = data['x'].copy()
sumx = sum1(dataX)
sumy = sum1(dataY)
sumxy = sum2(dataX, dataY)
sumxx = sum2(dataX, dataX)
resultA = (sumxy-sumx*sumy)/(... | 20.666667 | 45 | 0.617742 | import os
import pandas as pd
import matplotlib.pyplot as plt
if os.path.exists("datapoints.csv"):
data = pd.read_csv("datapoints.csv")
else:
print("File does not exist")
dataY = data['y'].copy()
dataX = data['x'].copy()
def sum1(x):
sum = 0
for i in x:
sum = sum + i
return sum/len(x)
def ... | 0 | 0 | 0 | 0 | 0 | 152 | 0 | 10 | 67 |
7b124f955bad4ce242ac0f6f2341c4c7adf1d555 | 1,029 | py | Python | examples/src/Shapes/AccessOLEObjectFrame.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Shapes/AccessOLEObjectFrame.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Shapes/AccessOLEObjectFrame.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | import aspose.slides as slides
| 35.482759 | 89 | 0.659864 | import aspose.slides as slides
def shapes_accessing_ole_object_frame():
dataDir = "./examples/data/"
outDir = "./examples/out/"
# Load the PPTX to Presentation object
with slides.Presentation(dataDir + "shapes_accessing_ole_object_frame.pptx") as pres:
# Access the first slide
sld = p... | 0 | 0 | 0 | 0 | 0 | 975 | 0 | 0 | 23 |
053ebcc69ca0c3e32127ad7b94767a442a29ee38 | 237 | py | Python | pset_basic_data_types/basics/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 5 | 2019-04-08T20:05:37.000Z | 2019-12-04T20:48:45.000Z | pset_basic_data_types/basics/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 8 | 2019-04-15T15:16:05.000Z | 2022-02-12T10:33:32.000Z | pset_basic_data_types/basics/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 2 | 2019-04-10T00:14:42.000Z | 2020-02-26T20:35:21.000Z | """
Placeholders
"""
# You're writing a program, and you don't know what your starting value for your 'initial' variable is yet. The program won't run if you leave it blank, but you don't want to forget you need it! Make a workaround.
| 33.857143 | 213 | 0.734177 | """
Placeholders
"""
# You're writing a program, and you don't know what your starting value for your 'initial' variable is yet. The program won't run if you leave it blank, but you don't want to forget you need it! Make a workaround.
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8d6673d38f5b42b2da78dda9142c78d85572c8de | 3,520 | py | Python | python_nim.py | dfdeshom/nim_log_perf | 66225d5cbd65900702e0fc7e03377ae51e5889f0 | [
"MIT"
] | null | null | null | python_nim.py | dfdeshom/nim_log_perf | 66225d5cbd65900702e0fc7e03377ae51e5889f0 | [
"MIT"
] | null | null | null | python_nim.py | dfdeshom/nim_log_perf | 66225d5cbd65900702e0fc7e03377ae51e5889f0 | [
"MIT"
] | null | null | null |
"""
>>> p = parse_log_line('/plogger/ || 50.73.113.242 || - || 21/Mar/2013:13:22:13 +0000 || GET /plogger/?rand=1363872131875&idsite=deadspin.com&url=http%3A%2F%2Fdeadspin.com%2Frecommended&urlref=http%3A%2F%2Fdeadspin.com%2F&screen=1024x768%7C1024x738%7C24&data=%7B%22parsely_uuid%22%3A%22908932BF-0935-46AD-84BD-1012... | 80 | 1,318 | 0.719034 | from ctypes import *
"""
>>> p = parse_log_line('/plogger/ || 50.73.113.242 || - || 21/Mar/2013:13:22:13 +0000 || GET /plogger/?rand=1363872131875&idsite=deadspin.com&url=http%3A%2F%2Fdeadspin.com%2Frecommended&urlref=http%3A%2F%2Fdeadspin.com%2F&screen=1024x768%7C1024x738%7C24&data=%7B%22parsely_uuid%22%3A%22908932B... | 0 | 0 | 0 | 85 | 0 | 589 | 0 | -1 | 114 |
e51930ab1cbcd988963bd7e470dee26c4f76502d | 1,269 | py | Python | day-8/test.py | PeterPrice06/advent-of-code-2021 | d1af22ee2e4778372e626debca1ae9dc7f2ad47c | [
"MIT"
] | null | null | null | day-8/test.py | PeterPrice06/advent-of-code-2021 | d1af22ee2e4778372e626debca1ae9dc7f2ad47c | [
"MIT"
] | null | null | null | day-8/test.py | PeterPrice06/advent-of-code-2021 | d1af22ee2e4778372e626debca1ae9dc7f2ad47c | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 31.725 | 68 | 0.686367 | import unittest
from typing import List
from decoder import Decoder
class TestDecode(unittest.TestCase):
def setUp(self) -> None:
pass
def test_decode_count_unique_sample(self) -> None:
lines = file_read_helper('day-8/sample_input.txt')
decoder = Decoder(lines)
self.assertEqual... | 0 | 0 | 0 | 924 | 0 | 181 | 0 | 8 | 90 |
425ccd42d489c21633605a6e2026f1ca786d0378 | 1,882 | py | Python | src/ash/gui/checkbox.py | Rolando-Zarate/ash | 6672ec5d2931d39689e712fa476bbadb8733a739 | [
"MIT"
] | 40 | 2020-07-24T06:36:25.000Z | 2022-03-29T11:25:37.000Z | src/ash/gui/checkbox.py | Rolando-Zarate/ash | 6672ec5d2931d39689e712fa476bbadb8733a739 | [
"MIT"
] | 12 | 2020-12-22T02:56:05.000Z | 2022-02-18T17:59:16.000Z | src/ash/gui/checkbox.py | Rolando-Zarate/ash | 6672ec5d2931d39689e712fa476bbadb8733a739 | [
"MIT"
] | 3 | 2021-02-12T11:49:39.000Z | 2021-07-23T21:17:26.000Z | # ---------------------------------------------------------------------------------------------
# Copyright (c) Akash Nag. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license information.
# ------------------------------------------------------------------------------... | 26.138889 | 95 | 0.628055 | # ---------------------------------------------------------------------------------------------
# Copyright (c) Akash Nag. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license information.
# ------------------------------------------------------------------------------... | 0 | 0 | 0 | 1,455 | 0 | 0 | 0 | 0 | 46 |