hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 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 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ae59008d75b0339efe1290aefcf9a7e20a285167 | 146 | py | Python | 1-multiple.py | svamja/learning_assignments | fa1b2279250a6a7f9dbfee86fdacfe8609e6ad7d | [
"MIT"
] | null | null | null | 1-multiple.py | svamja/learning_assignments | fa1b2279250a6a7f9dbfee86fdacfe8609e6ad7d | [
"MIT"
] | null | null | null | 1-multiple.py | svamja/learning_assignments | fa1b2279250a6a7f9dbfee86fdacfe8609e6ad7d | [
"MIT"
] | null | null | null | nums = [3, 5]
maximum = 1000
result = 0
for i in range(0, maximum):
if i % 3 == 0 or i % 5 == 0:
result += i
print(result)
| 14.6 | 33 | 0.486301 |
3de581e4bbb7ee5c98dec1aae357378061eb2597 | 3,806 | py | Python | __init__.py | humairan/speech-rate-skill | 47ca7bff4c928776d906f6b1c5fd9d9df0f65798 | [
"Apache-2.0"
] | null | null | null | __init__.py | humairan/speech-rate-skill | 47ca7bff4c928776d906f6b1c5fd9d9df0f65798 | [
"Apache-2.0"
] | null | null | null | __init__.py | humairan/speech-rate-skill | 47ca7bff4c928776d906f6b1c5fd9d9df0f65798 | [
"Apache-2.0"
] | null | null | null | from mycroft import MycroftSkill, intent_file_handler
from mycroft.util.log import LOG
from mycroft.messagebus.message import Message
class SpeechRate(MycroftSkill):
def __init__(self):
MycroftSkill.__init__(self)
self.fastest = '0.1'
self.fast = "0.5"
self.default = self.normal = ... | 31.716667 | 80 | 0.541513 |
fc95a3a3322bf0cce537cb77bc70271da5081299 | 50,356 | py | Python | src/vnsw/provisioning/contrail_vrouter_provisioning/common.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | 37 | 2020-09-21T10:42:26.000Z | 2022-01-09T10:16:40.000Z | src/vnsw/provisioning/contrail_vrouter_provisioning/common.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | null | null | null | src/vnsw/provisioning/contrail_vrouter_provisioning/common.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | 21 | 2020-08-25T12:48:42.000Z | 2022-03-22T04:32:18.000Z | #!/usr/bin/env python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
from __future__ import print_function
from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
import os
import socket
import netaddr
import logging
import netifaces
impo... | 46.113553 | 144 | 0.533422 |
13a907b30889762024bb9a3d3a5ea7e0e33036e1 | 3,567 | py | Python | tests/test_figures_formating.py | lexman/tuttle | dab07db4a1e3e18c876deb2897c07be3935acd60 | [
"MIT"
] | 26 | 2015-10-08T17:12:56.000Z | 2021-10-21T14:47:22.000Z | tests/test_figures_formating.py | Pandinosaurus/tuttle | dab07db4a1e3e18c876deb2897c07be3935acd60 | [
"MIT"
] | 11 | 2015-10-09T12:37:15.000Z | 2018-04-01T15:47:49.000Z | tests/test_figures_formating.py | Pandinosaurus/tuttle | dab07db4a1e3e18c876deb2897c07be3935acd60 | [
"MIT"
] | 3 | 2016-03-29T17:15:41.000Z | 2018-11-16T13:39:31.000Z | from tuttle.error import TuttleError
from tuttle.figures_formating import nice_size, nice_duration, parse_duration
class TestFileSizeFormating:
def test_nice_size_B(self):
""" A number below 1 000 B should be expressed in B"""
nice = nice_size(12)
assert nice == "12 B", nice
def test... | 33.027778 | 101 | 0.612279 |
3c381a3e6bb61cf2a3a4113d09220b1a47efe4ed | 700 | py | Python | tools/voc_eval_lib/utils/timer.py | Zhen-Dong/CoDeNet | 5f5cb78859a691db532c8318a38c1b124adfb104 | [
"MIT"
] | 15 | 2021-03-03T03:16:32.000Z | 2022-03-25T04:14:57.000Z | rcnn/utils/timer.py | truetqy/lesion_det_dual_att | 5a5a77dd7f3aa195a2f5b84169822eb32c396d65 | [
"Apache-2.0"
] | 3 | 2021-07-12T07:04:12.000Z | 2022-03-30T12:20:47.000Z | tools/voc_eval_lib/utils/timer.py | Zhen-Dong/CoDeNet | 5f5cb78859a691db532c8318a38c1b124adfb104 | [
"MIT"
] | 3 | 2021-03-04T14:50:49.000Z | 2021-12-16T08:38:56.000Z | import time
class Timer(object):
"""A simple timer."""
def __init__(self):
self.total_time = 0.
self.calls = 0
self.start_time = 0.
self.diff = 0.
self.average_time = 0.
def tic(self):
# using time.time instead of time.clock because time time.clock
... | 25.925926 | 71 | 0.58 |
e782335932931acf3167a5d5c633ef68706a3e06 | 983 | py | Python | snakes_on_a_plane/djang_models/migrations/0002_passenger_seats.py | ravewillow6383/django_models | e7f6a641ac30ac347f0561f44f8c33f13df6f3b4 | [
"MIT"
] | null | null | null | snakes_on_a_plane/djang_models/migrations/0002_passenger_seats.py | ravewillow6383/django_models | e7f6a641ac30ac347f0561f44f8c33f13df6f3b4 | [
"MIT"
] | null | null | null | snakes_on_a_plane/djang_models/migrations/0002_passenger_seats.py | ravewillow6383/django_models | e7f6a641ac30ac347f0561f44f8c33f13df6f3b4 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-13 22:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('djang_models', '0001_initial'),
]
operations = [
migrations.CreateModel(
na... | 30.71875 | 134 | 0.585961 |
9994db7b05fe237b424990f9acd5d985e635d89a | 3,679 | py | Python | rpython/rlib/rsre/rsre_constants.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | rpython/rlib/rsre/rsre_constants.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | rpython/rlib/rsre/rsre_constants.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | # Horrible import-time hack.
# Blame CPython for renumbering these OPCODE_* at some point.
from rpython.rlib.objectmodel import specialize
try:
import pypy.module.sys.version
V37 = pypy.module.sys.version.CPYTHON_VERSION >= (3, 7)
except ImportError:
raise ImportError("Cannot import pypy.module.sys.version.... | 32.848214 | 78 | 0.687687 |
ee07a36c87b9e3d7126ff66e8f91316ecb53b733 | 682 | py | Python | models/ConnectToSSH.py | GerardoLozano1423/AWS | 909e940fb194e6ade2b5df60adacaa74d2137ced | [
"Apache-2.0"
] | null | null | null | models/ConnectToSSH.py | GerardoLozano1423/AWS | 909e940fb194e6ade2b5df60adacaa74d2137ced | [
"Apache-2.0"
] | null | null | null | models/ConnectToSSH.py | GerardoLozano1423/AWS | 909e940fb194e6ade2b5df60adacaa74d2137ced | [
"Apache-2.0"
] | null | null | null | #ssh -i "key_pair.pem" ubuntu@ec2-35-164-15-203.us-west-2.compute.amazonaws.com
#ssh -i "key_pair.pem" ubuntu@35.164.15.203
import paramiko
class ConnectToSSH:
def __init__(self, ip = '', key = ''):
self.ip = ip
self.key = key
def Open(self):
self.client = paramiko.SSHClient()
self.client.set_missing_ho... | 29.652174 | 106 | 0.71261 |
6e77eb5a931d9a79b32f4257a9dcb703e54011c9 | 132 | py | Python | configs/fcn/fcn_r50b-d8_769x769_80k_cityscapes.py | Xlinford/mmsegmentation | 8b444de5e6db2af2538a73a93ac75204f5c3bb2f | [
"Apache-2.0"
] | null | null | null | configs/fcn/fcn_r50b-d8_769x769_80k_cityscapes.py | Xlinford/mmsegmentation | 8b444de5e6db2af2538a73a93ac75204f5c3bb2f | [
"Apache-2.0"
] | null | null | null | configs/fcn/fcn_r50b-d8_769x769_80k_cityscapes.py | Xlinford/mmsegmentation | 8b444de5e6db2af2538a73a93ac75204f5c3bb2f | [
"Apache-2.0"
] | null | null | null | _base_ = './fcn_r50-d8_769x769_80k_cityscapes.py'
model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
| 44 | 80 | 0.757576 |
f5221622ed405b966f205fc7ffb680217959e62f | 3,708 | py | Python | tests/nlu/classifiers/test_logistic_regression_classifier.py | mukulbalodi/rasa | 3126ef1148c165f2402f3c7203138d429e46c68c | [
"Apache-2.0"
] | 3,603 | 2017-05-21T18:34:55.000Z | 2019-04-16T11:58:09.000Z | tests/nlu/classifiers/test_logistic_regression_classifier.py | mukulbalodi/rasa | 3126ef1148c165f2402f3c7203138d429e46c68c | [
"Apache-2.0"
] | 2,782 | 2017-05-21T20:36:15.000Z | 2019-04-16T14:35:20.000Z | tests/nlu/classifiers/test_logistic_regression_classifier.py | mukulbalodi/rasa | 3126ef1148c165f2402f3c7203138d429e46c68c | [
"Apache-2.0"
] | 1,337 | 2017-05-21T18:10:33.000Z | 2019-04-16T09:14:42.000Z | import copy
import pytest
import pathlib
import numpy as np
from rasa.shared.nlu.training_data.message import Message
from rasa.engine.storage.resource import Resource
from rasa.engine.storage.local_model_storage import LocalModelStorage
from rasa.engine.graph import ExecutionContext
from rasa.shared.nlu.training_data.... | 33.405405 | 77 | 0.70658 |
ba64f17a6118888b9aa4f89dffda1a902a60e83c | 58 | py | Python | reikna/__init__.py | fjarri/reikna | 171bf233664f5f7ec4f457e826e0b91849e91384 | [
"MIT"
] | 122 | 2015-05-01T12:42:34.000Z | 2021-09-30T22:47:59.000Z | lib/python/reikna-0.7.5/reikna/__init__.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | 42 | 2015-05-04T16:55:47.000Z | 2021-09-18T04:53:34.000Z | lib/python/reikna-0.7.5/reikna/__init__.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | 14 | 2015-05-01T19:22:52.000Z | 2021-09-30T22:48:03.000Z | from reikna.cluda.array_helpers import concatenate, roll
| 19.333333 | 56 | 0.844828 |
c153578be4103dd443c4c79892d7b7d191bb8550 | 1,674 | py | Python | tangos/properties/pynbody/SF.py | j-davies-astro/tangos | ae15578820087765e5180e69310e274c237d3912 | [
"BSD-3-Clause"
] | null | null | null | tangos/properties/pynbody/SF.py | j-davies-astro/tangos | ae15578820087765e5180e69310e274c237d3912 | [
"BSD-3-Clause"
] | null | null | null | tangos/properties/pynbody/SF.py | j-davies-astro/tangos | ae15578820087765e5180e69310e274c237d3912 | [
"BSD-3-Clause"
] | null | null | null | from .. import TimeChunkedProperty
from . import pynbody_handler_module, PynbodyPropertyCalculation
import numpy as np
class StarFormHistogram(TimeChunkedProperty):
works_with_handler = pynbody_handler_module.PynbodyInputHandler
requires_particle_data = True
names = "SFR_histogram",
def plot_xlabel(s... | 34.163265 | 123 | 0.658901 |
f004f01d16056597da911207077df1e2e298cfa7 | 3,473 | py | Python | tools/phenomics/gol_blood/data_utils.py | skitchen19/galaxy_tools | b935f36cfe430263564503ebb71f78dc79315acb | [
"MIT"
] | 3 | 2017-04-05T18:01:59.000Z | 2019-05-03T14:15:31.000Z | tools/phenomics/gol_blood/data_utils.py | skitchen19/galaxy_tools | b935f36cfe430263564503ebb71f78dc79315acb | [
"MIT"
] | 6 | 2019-02-27T15:45:58.000Z | 2021-01-12T15:18:50.000Z | tools/phenomics/gol_blood/data_utils.py | skitchen19/galaxy_tools | b935f36cfe430263564503ebb71f78dc79315acb | [
"MIT"
] | 2 | 2018-10-26T18:36:39.000Z | 2019-01-28T15:12:39.000Z | #!/usr/bin/env python
import numpy as np
from sklearn.decomposition import PCA
import matplotlib.pyplot as plt
def load_raw3d_data(filename):
with open(filename, 'r') as file:
data = np.loadtxt(file, delimiter=',', usecols=(0, 1, 2), skiprows=1)
return data
def normalize_data(data, log_fh):
dat... | 32.157407 | 121 | 0.558307 |
ae805ea1fde8dd52070d7591523be128aedcda0e | 10,967 | py | Python | tests/sources/tools/perception/object_detection_3d/voxel_object_detection_3d/test_object_detection_3d.py | daoran/opendr | bca25f6a43244fe9c219a24576181f94a0726923 | [
"Apache-2.0"
] | null | null | null | tests/sources/tools/perception/object_detection_3d/voxel_object_detection_3d/test_object_detection_3d.py | daoran/opendr | bca25f6a43244fe9c219a24576181f94a0726923 | [
"Apache-2.0"
] | null | null | null | tests/sources/tools/perception/object_detection_3d/voxel_object_detection_3d/test_object_detection_3d.py | daoran/opendr | bca25f6a43244fe9c219a24576181f94a0726923 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2022 OpenDR European Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 37.050676 | 102 | 0.577733 |
34c1772b54b9a0bb871ede4157051530b34321b5 | 4,863 | py | Python | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/search_corp_admins_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/search_corp_admins_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/search_corp_admins_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class SearchCorpAdminsResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (... | 25.328125 | 75 | 0.556652 |
6d0173b30e99a2b2f8938a6f7da5b502a83b046f | 9,182 | py | Python | corehq/messaging/scheduling/scheduling_partitioned/tests/test_dbaccessors_non_partitioned.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/messaging/scheduling/scheduling_partitioned/tests/test_dbaccessors_non_partitioned.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/messaging/scheduling/scheduling_partitioned/tests/test_dbaccessors_non_partitioned.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | import uuid
from corehq.form_processor.tests.utils import only_run_with_non_partitioned_database
from corehq.messaging.scheduling.scheduling_partitioned.dbaccessors import (
get_alert_schedule_instance,
get_timed_schedule_instance,
save_alert_schedule_instance,
save_timed_schedule_instance,
delete_a... | 41.174888 | 108 | 0.716075 |
f9fd8c24782c7f9646f30326366160be9f853da1 | 22,304 | py | Python | src/bioregistry/compare.py | Adafede/bioregistry | 9b6a281354554005d985499f9d61aecb58a0a84c | [
"MIT"
] | null | null | null | src/bioregistry/compare.py | Adafede/bioregistry | 9b6a281354554005d985499f9d61aecb58a0a84c | [
"MIT"
] | null | null | null | src/bioregistry/compare.py | Adafede/bioregistry | 9b6a281354554005d985499f9d61aecb58a0a84c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This script compares what's in each resource."""
import datetime
import itertools as itt
import logging
import math
import random
import sys
import typing
from collections import Counter, defaultdict
from typing import Collection, List, Mapping, Set, Tuple
import click
import bioregistry
... | 31.414085 | 115 | 0.573485 |
e9d5d2b404d4045ed25e6fe30e6496f58c949b30 | 7,475 | py | Python | monitor/core/taps/bgpstreamkafka.py | kruisdraad/artemis | 426e4d2592f8175aafffc8b727ed06e4e16d50be | [
"TCL",
"BSD-3-Clause",
"PostgreSQL"
] | null | null | null | monitor/core/taps/bgpstreamkafka.py | kruisdraad/artemis | 426e4d2592f8175aafffc8b727ed06e4e16d50be | [
"TCL",
"BSD-3-Clause",
"PostgreSQL"
] | null | null | null | monitor/core/taps/bgpstreamkafka.py | kruisdraad/artemis | 426e4d2592f8175aafffc8b727ed06e4e16d50be | [
"TCL",
"BSD-3-Clause",
"PostgreSQL"
] | null | null | null | import argparse
import os
import time
import _pybgpstream
import redis
from kombu import Connection
from kombu import Exchange
from kombu import Producer
from netaddr import IPAddress
from netaddr import IPNetwork
from utils import get_logger
from utils import key_generator
from utils import load_json
from utils impor... | 33.222222 | 88 | 0.482943 |
f30ffbd41de3e8eadd578dbdc628e5a828bd3e12 | 1,831 | py | Python | server/src/ps.py | xraymemory/ar-cutpaste | eb29714818d72c096a7a1121d9e1c939fe9f6431 | [
"MIT"
] | 1 | 2022-01-21T14:12:26.000Z | 2022-01-21T14:12:26.000Z | server/src/ps.py | KonstantinKlepikov/ar-cutpaste | e87916b9f42a42fed4d341a01310480a8cc9fe7a | [
"MIT"
] | 2 | 2022-01-13T02:40:44.000Z | 2022-03-12T00:27:46.000Z | server/src/ps.py | KonstantinKlepikov/ar-cutpaste | e87916b9f42a42fed4d341a01310480a8cc9fe7a | [
"MIT"
] | 1 | 2020-05-21T02:18:03.000Z | 2020-05-21T02:18:03.000Z | from photoshop import PhotoshopConnection
# TODO: This offset should be detected by getTopLeft() but the new version
# of Photoshop doesn't seem to support executeActionGet so we put it
# manually here in the meantime.
SCREEN_PIXELS_DENSITY = 2
DOC_OFFSET_X = 74 * SCREEN_PIXELS_DENSITY
DOC_OFFSET_Y = 130 * SCREEN_PIXE... | 35.901961 | 102 | 0.565811 |
9661c70e6644af46cb4f4ccff1db177768be0e71 | 20,417 | py | Python | oslo_versionedobjects/fixture.py | openstack/oslo.versionedobjects | e7b6d52aa4b1b40e68a21a122c09b968d5959b0e | [
"Apache-2.0"
] | 37 | 2015-02-19T15:53:04.000Z | 2021-04-24T19:16:44.000Z | oslo_versionedobjects/fixture.py | openstack/oslo.versionedobjects | e7b6d52aa4b1b40e68a21a122c09b968d5959b0e | [
"Apache-2.0"
] | null | null | null | oslo_versionedobjects/fixture.py | openstack/oslo.versionedobjects | e7b6d52aa4b1b40e68a21a122c09b968d5959b0e | [
"Apache-2.0"
] | 18 | 2015-03-06T21:20:15.000Z | 2020-05-13T06:21:09.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 43.164905 | 79 | 0.630602 |
94b0d307d583675abc1e0ffe206ae5c377b3724a | 3,619 | py | Python | pysnmp/CISCOSB-SENSORENTMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCOSB-SENSORENTMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCOSB-SENSORENTMIB.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 CISCOSB-SENSORENTMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-SENSORENTMIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:07:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 103.4 | 493 | 0.788063 |
00a0f729a610c72a3fc6f4a934268e4238c638f8 | 3,917 | py | Python | yolo_video.py | mbalty/keras-yolo3 | 8680b0ceec28181a47f5efacd13419ff8fac2ef4 | [
"MIT"
] | null | null | null | yolo_video.py | mbalty/keras-yolo3 | 8680b0ceec28181a47f5efacd13419ff8fac2ef4 | [
"MIT"
] | null | null | null | yolo_video.py | mbalty/keras-yolo3 | 8680b0ceec28181a47f5efacd13419ff8fac2ef4 | [
"MIT"
] | 1 | 2020-03-04T08:26:36.000Z | 2020-03-04T08:26:36.000Z | import sys
import argparse
from yolo import YOLO, detect_video
from PIL import Image
from glob import glob
from os import path
def detect_img(yolo):
while True:
img = input('Input image filename:')
try:
image = Image.open(img)
except:
print('Open Error! Try again!')
... | 30.601563 | 100 | 0.577227 |
c7d98da5229ce36e1915d69dc346a541d27a74a2 | 132 | py | Python | tensorflow/time_series_forecasting/time_series_forecasting/__init__.py | Elkinmt19/data-science-dojo | 9e3d7ca8774474e1ad74138c7215ca3acdabf07c | [
"MIT"
] | 1 | 2022-01-14T03:16:23.000Z | 2022-01-14T03:16:23.000Z | tensorflow/time_series_forecasting/time_series_forecasting/__init__.py | Elkinmt19/data-science-dojo | 9e3d7ca8774474e1ad74138c7215ca3acdabf07c | [
"MIT"
] | null | null | null | tensorflow/time_series_forecasting/time_series_forecasting/__init__.py | Elkinmt19/data-science-dojo | 9e3d7ca8774474e1ad74138c7215ca3acdabf07c | [
"MIT"
] | null | null | null | from .windows_generator import *
__author__ = 'Elkin Javier Guerra Galeano'
__email__ = 'elkinmt19@gmail.com'
__version__ = '0.0.1' | 26.4 | 42 | 0.765152 |
553747297794c310787bc7b6e9a9d8ae4b4b85ca | 408 | py | Python | setup.py | blackvvine/file-path | 091538feb0685185e68f594562051a4775c5d266 | [
"MIT"
] | null | null | null | setup.py | blackvvine/file-path | 091538feb0685185e68f594562051a4775c5d266 | [
"MIT"
] | null | null | null | setup.py | blackvvine/file-path | 091538feb0685185e68f594562051a4775c5d266 | [
"MIT"
] | 1 | 2019-10-13T15:22:23.000Z | 2019-10-13T15:22:23.000Z | from distutils.core import setup
setup(
name='file-path',
packages=['filepath'],
version='0.2',
description='Object-oriented wrapper for paths',
author='Iman Akbari',
author_email='imakbari@gmail.com',
url='https://github.com/blackvvine/file-path',
download_url='https://github.com/black... | 27.2 | 71 | 0.671569 |
c97396826758166a2e8b7aac59c81f04017b466d | 680 | py | Python | notebooks/functions.py | Shrey-WadhwaniAI/LineList-Dashboard | 5937d3fb0f0c2e525952e509e52d7e30bf51dabb | [
"MIT"
] | null | null | null | notebooks/functions.py | Shrey-WadhwaniAI/LineList-Dashboard | 5937d3fb0f0c2e525952e509e52d7e30bf51dabb | [
"MIT"
] | null | null | null | notebooks/functions.py | Shrey-WadhwaniAI/LineList-Dashboard | 5937d3fb0f0c2e525952e509e52d7e30bf51dabb | [
"MIT"
] | null | null | null | from utils import *
import streamlit as st
def pop_filter(x,pops):
if 'gender' in pops :
x = get_valid_gender(x)
return x
@st.cache
def two_pop_groups(data,pop1,pop2):
df = remove_untested(data)
#print("untested filter")
#print(len(df))
df = pop_filter(df,[pop1,pop2])
#print... | 25.185185 | 72 | 0.638235 |
0fbc735ca0c53011ee46344dfd7a4c3b740d3a44 | 2,894 | py | Python | 2021/Python/13.py | hckr/adventofcode-haskell | fa6a7624c68392d45b937c49cc35c17f314ea6e4 | [
"MIT"
] | null | null | null | 2021/Python/13.py | hckr/adventofcode-haskell | fa6a7624c68392d45b937c49cc35c17f314ea6e4 | [
"MIT"
] | null | null | null | 2021/Python/13.py | hckr/adventofcode-haskell | fa6a7624c68392d45b937c49cc35c17f314ea6e4 | [
"MIT"
] | null | null | null | import fileinput
import functools
from typing import List, Optional, Tuple
import numpy as np
def main(input_path: Optional[str] = None):
r"""
>>> from _pytest.monkeypatch import MonkeyPatch
>>> with MonkeyPatch.context() as monkeypatch:
... monkeypatch.setattr(fileinput, "input", lambda x: iter(... | 27.561905 | 86 | 0.43953 |
d17cc1b21a0296aa06d8c002fc4d8d7a40fa01fe | 40,827 | py | Python | tools/stats/print_test_stats.py | LiamZhuuu/pytorch | 0111065c8fd3112706a9ca287b56fb98549f581e | [
"Intel"
] | null | null | null | tools/stats/print_test_stats.py | LiamZhuuu/pytorch | 0111065c8fd3112706a9ca287b56fb98549f581e | [
"Intel"
] | null | null | null | tools/stats/print_test_stats.py | LiamZhuuu/pytorch | 0111065c8fd3112706a9ca287b56fb98549f581e | [
"Intel"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import bz2
import datetime
import json
import math
import os
import re
import statistics
import subprocess
import time
from collections import defaultdict
from pathlib import Path
from typing import (Any, DefaultDict, Dict, Iterable, Iterator, List, Optional,
... | 37.319013 | 129 | 0.586842 |
1ffd656cc852793abdeb198e971428d5a47de6aa | 853 | py | Python | PyCIP/DataTypesModule/Constants.py | cpchrispye/PyCIP | 8cb2ccabbc45ee9eb24b1b4772e517df2b4078bd | [
"MIT"
] | 13 | 2016-06-14T10:35:06.000Z | 2021-03-16T11:42:02.000Z | PyCIP/DataTypesModule/Constants.py | cpchrispye/PyCIP | 8cb2ccabbc45ee9eb24b1b4772e517df2b4078bd | [
"MIT"
] | 1 | 2021-12-21T21:08:27.000Z | 2021-12-21T21:08:27.000Z | PyCIP/DataTypesModule/Constants.py | cpchrispye/PyCIP | 8cb2ccabbc45ee9eb24b1b4772e517df2b4078bd | [
"MIT"
] | 2 | 2020-05-20T14:01:34.000Z | 2020-12-07T02:31:49.000Z | from enum import IntEnum
class CIPServiceCode(IntEnum):
get_att_single = 0x0e
set_att_single = 0x10
get_att_all = 0x01
set_att_all = 0x02
unconnected_Send = 0x52
forward_open = 0x54
forward_close = 0x4E
class SegmentType(IntEnum):
PortSegment = 0
LogicalSegment = 1
... | 18.955556 | 30 | 0.581477 |
3c963860a40bb39d531ce598c6a8e5e76a92f4f2 | 503 | py | Python | zksync/metadata.py | zksync-sdk/schnorr-musig-sdk-python | e853b1fc54fcff1c896a6aaac44b0c72dd393a01 | [
"MIT"
] | 1 | 2021-05-19T10:05:37.000Z | 2021-05-19T10:05:37.000Z | zksync/metadata.py | zksync-sdk/schnorr-musig-sdk-python | e853b1fc54fcff1c896a6aaac44b0c72dd393a01 | [
"MIT"
] | 2 | 2021-03-10T12:38:40.000Z | 2021-05-21T10:28:11.000Z | zksync/metadata.py | zksync-sdk/schnorr-musig-sdk-python | e853b1fc54fcff1c896a6aaac44b0c72dd393a01 | [
"MIT"
] | 1 | 2021-05-19T10:05:38.000Z | 2021-05-19T10:05:38.000Z | # -*- coding: utf-8 -*-
"""Project metadata
Information describing the project.
"""
# The package name, which is also the "UNIX name" for the project.
package = 'zksync'
project = "schnorr-musig-sdk-python"
project_no_spaces = project.replace(' ', '')
version = '0.1'
description = 'TBC Description'
authors = ['kotsub... | 27.944444 | 66 | 0.709742 |
19e831f708b27487092efcd5475de7c7f39a9b80 | 515 | py | Python | answers/Tanmay Jaiswal/Day22/question1.py | sequel-tj/30-DaysOfCode-March-2021 | 0b831d03b7d717310e412f142f5bcfb049c757e9 | [
"MIT"
] | 22 | 2021-03-16T14:07:47.000Z | 2021-08-13T08:52:50.000Z | answers/Tanmay Jaiswal/Day22/question1.py | sequel-tj/30-DaysOfCode-March-2021 | 0b831d03b7d717310e412f142f5bcfb049c757e9 | [
"MIT"
] | 174 | 2021-03-16T21:16:40.000Z | 2021-06-12T05:19:51.000Z | answers/Tanmay Jaiswal/Day22/question1.py | sequel-tj/30-DaysOfCode-March-2021 | 0b831d03b7d717310e412f142f5bcfb049c757e9 | [
"MIT"
] | 135 | 2021-03-16T16:47:12.000Z | 2021-06-27T14:22:38.000Z | print("Input: ",end="")
string = input()
def stack(s):
if (len(s) == 0):
return
x = s[-1]
s.pop()
stack(s)
print(x, end="")
s.append(x)
def min(s):
Stack = []
Stack.append(s[0])
for i in range(1, len(s)):
if (len(Stack) == 0):
Stack.append(s[... | 13.918919 | 35 | 0.413592 |
ac9de92ba6b0982f2a22af3b15658810ce41aa40 | 727 | py | Python | flask_app/app.py | hkato/sample-azure-functions-wsgi-flask | c0bc8da3d8924ee143a93d9ac6109b3e86c328ae | [
"MIT"
] | 2 | 2021-09-27T03:53:53.000Z | 2022-03-13T01:53:41.000Z | flask_app/app.py | hkato/sample-azure-functions-wsgi-flask | c0bc8da3d8924ee143a93d9ac6109b3e86c328ae | [
"MIT"
] | 1 | 2022-03-13T02:04:55.000Z | 2022-03-13T02:04:55.000Z | flask_app/app.py | hkato/sample-azure-functions-wsgi-flask | c0bc8da3d8924ee143a93d9ac6109b3e86c328ae | [
"MIT"
] | null | null | null | from flask import Flask, request
app = Flask(__name__)
@app.route("/hello", methods=['GET', 'POST'])
def hello():
name = request.args.get('name')
if not name:
req_body = request.get_json()
if req_body:
name = req_body['name']
if name:
return f"Hello, {name}. This HTTP... | 22.71875 | 152 | 0.64099 |
329afb7ac79cd6e2f9963b5f85845b472f52dd14 | 2,742 | py | Python | src/awkward/_v2/numba.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | 2 | 2019-09-12T03:07:23.000Z | 2019-09-27T05:32:07.000Z | src/awkward/_v2/numba.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | 1 | 2019-09-26T17:57:45.000Z | 2019-09-26T17:57:45.000Z | src/awkward/_v2/numba.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
import awkward as ak
checked_version = False
def register_and_check():
global checked_version
if not checked_version:
try:
import numba
except ImportError:
raise ImportError(
... | 36.078947 | 87 | 0.724289 |
94399425af9c5392225995b160c8417ba3fc2126 | 44,063 | py | Python | python/ray/serve/api.py | jamesliu/ray | 11ab412db1fa3603a3006e8ed414e80dd1f11c0c | [
"Apache-2.0"
] | 2 | 2022-03-25T04:15:10.000Z | 2022-03-25T04:15:15.000Z | python/ray/serve/api.py | jamesliu/ray | 11ab412db1fa3603a3006e8ed414e80dd1f11c0c | [
"Apache-2.0"
] | 227 | 2021-10-01T08:00:01.000Z | 2021-12-28T16:47:26.000Z | python/ray/serve/api.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 1 | 2020-12-03T20:36:00.000Z | 2020-12-03T20:36:00.000Z | import asyncio
import atexit
import collections
import inspect
import logging
import random
import re
import time
from dataclasses import dataclass
from functools import wraps
from typing import Any, Callable, Dict, Optional, Tuple, Type, Union, overload
from fastapi import APIRouter, FastAPI
from starlette.requests i... | 38.584063 | 83 | 0.623494 |
41a980f4ccf2f9f7ca0d399278915dde01cbde22 | 3,016 | py | Python | src/trial2.py | tkosht/gremlin | 6c3cc8bc3d03c62c7d05662067ef5ccd1d9071b2 | [
"MIT"
] | null | null | null | src/trial2.py | tkosht/gremlin | 6c3cc8bc3d03c62c7d05662067ef5ccd1d9071b2 | [
"MIT"
] | null | null | null | src/trial2.py | tkosht/gremlin | 6c3cc8bc3d03c62c7d05662067ef5ccd1d9071b2 | [
"MIT"
] | null | null | null | from gremlin_python.process.anonymous_traversal import traversal
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
class GremlinProvider(object):
def __init__(self):
self.g = traversal().withRemote(
DriverRemoteConnection("ws://gremlin-server:8182/gremlin", "g")... | 29.281553 | 93 | 0.592175 |
901c000bf0d25fb62609b1f0be80c50019605e34 | 651 | py | Python | src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/__init__.py | 0cool321/azure-cli | fd8e6d46d5cee682aff51e262c06bc40c01636ba | [
"MIT"
] | 2 | 2020-07-22T18:53:05.000Z | 2021-09-11T05:52:33.000Z | src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/__init__.py | 0cool321/azure-cli | fd8e6d46d5cee682aff51e262c06bc40c01636ba | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/__init__.py | 0cool321/azure-cli | fd8e6d46d5cee682aff51e262c06bc40c01636ba | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 50.076923 | 94 | 0.56682 |
6a44bfa11953b348acb0a1a7a2026aad01c9d216 | 2,489 | py | Python | services/web/server/src/simcore_service_webserver/cli.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | null | null | null | services/web/server/src/simcore_service_webserver/cli.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | 1 | 2021-11-29T13:38:09.000Z | 2021-11-29T13:38:09.000Z | services/web/server/src/simcore_service_webserver/cli.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | null | null | null | """ Application's command line .
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -msimcore_service_webserver` python will execute
``__main__.py`` as ... | 29.282353 | 85 | 0.746886 |
6cf4d962335c586d41247dca59535113fd7cf363 | 5,723 | py | Python | tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | 2 | 2019-07-08T20:56:13.000Z | 2020-08-04T17:07:26.000Z | tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. 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 law or a... | 42.080882 | 80 | 0.780884 |
509f8aa5ecd05f97ee4e83b78e517b3690e57c0c | 7,730 | py | Python | pypureclient/flasharray/FA_2_9/models/alert.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_9/models/alert.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_9/models/alert.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.9
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 35.136364 | 130 | 0.557568 |
7196be873262107c9bac44501fc50e6734fd0d98 | 16,074 | py | Python | manila_tempest_tests/tests/api/test_share_group_actions.py | raissaa/manila-tempest-plugin | 3dd627bdec282071450694bf5399d53e9f9abd5b | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/test_share_group_actions.py | raissaa/manila-tempest-plugin | 3dd627bdec282071450694bf5399d53e9f9abd5b | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/test_share_group_actions.py | raissaa/manila-tempest-plugin | 3dd627bdec282071450694bf5399d53e9f9abd5b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2016 Andrew Kerr
# 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
#
#... | 39.985075 | 78 | 0.626291 |
1edcc8373b4e3195a5b88634bcb45964381abcc2 | 19,065 | py | Python | tools/testing/kunit/kunit_tool_test.py | jainsakshi2395/linux | 7ccb860232bb83fb60cd6bcf5aaf0c008d903acb | [
"Linux-OpenIB"
] | null | null | null | tools/testing/kunit/kunit_tool_test.py | jainsakshi2395/linux | 7ccb860232bb83fb60cd6bcf5aaf0c008d903acb | [
"Linux-OpenIB"
] | 1 | 2021-01-27T01:29:47.000Z | 2021-01-27T01:29:47.000Z | tools/testing/kunit/kunit_tool_test.py | jainsakshi2395/linux | 7ccb860232bb83fb60cd6bcf5aaf0c008d903acb | [
"Linux-OpenIB"
] | null | null | null | #!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
#
# A collection of tests for tools/testing/kunit/kunit.py
#
# Copyright (C) 2019, Google LLC.
# Author: Brendan Higgins <brendanhiggins@google.com>
import unittest
from unittest import mock
import tempfile, shutil # Handling test_tmpdir
import itertools
impo... | 38.828921 | 90 | 0.769997 |
bb125a3c8236848728ad9f8f039d2c3973fcda56 | 4,590 | py | Python | src/pyinterp/interpolator/bicubic.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | null | null | null | src/pyinterp/interpolator/bicubic.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | null | null | null | src/pyinterp/interpolator/bicubic.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2022 CNES
#
# All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
"""
Bicubic interpolation
=====================
"""
from typing import Optional, Union
import numpy as np
from .. import core
from .. import grid
from .. import interfac... | 41.727273 | 80 | 0.605664 |
8a62d6ff3e14371b4993203eb2df90f6b5891e77 | 15,181 | py | Python | AustinBot/all_cogs/rpgFunctions/database.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | AustinBot/all_cogs/rpgFunctions/database.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | AustinBot/all_cogs/rpgFunctions/database.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from .. import sql
def initialise_db():
sql('rpg', 'create table players (id integer, guild_id integer, current_character text)')
sql('rpg', '''create table professions (
name text
,primary_stat text
,secondary_stat text
,base_str integer
,base_dex integer
,base_int integer
,base_con integer
... | 88.261628 | 1,668 | 0.629603 |
9cf83b6773ebd981ff4d78f3bd2ecd118cc9dfdc | 159 | py | Python | alento_bot/storage_module/formats/config_format.py | alentoghostflame/StupidEveAppraisalBot | a78adb206efd3a4dc41cbbfb45ee0b8b61aea248 | [
"MIT"
] | null | null | null | alento_bot/storage_module/formats/config_format.py | alentoghostflame/StupidEveAppraisalBot | a78adb206efd3a4dc41cbbfb45ee0b8b61aea248 | [
"MIT"
] | null | null | null | alento_bot/storage_module/formats/config_format.py | alentoghostflame/StupidEveAppraisalBot | a78adb206efd3a4dc41cbbfb45ee0b8b61aea248 | [
"MIT"
] | null | null | null | class ConfigData:
def __init__(self):
self.discord_command_prefix = ";"
self.discord_bot_token = ""
self.data_folder_path = "data"
| 26.5 | 41 | 0.63522 |
79b0812a7041ad301e881c180f2f641b25d1d440 | 127 | py | Python | sandbox/ipython/mydemo.py | rboman/progs | c60b4e0487d01ccd007bcba79d1548ebe1685655 | [
"Apache-2.0"
] | 2 | 2021-12-12T13:26:06.000Z | 2022-03-03T16:14:53.000Z | sandbox/ipython/mydemo.py | rboman/progs | c60b4e0487d01ccd007bcba79d1548ebe1685655 | [
"Apache-2.0"
] | 5 | 2019-03-01T07:08:46.000Z | 2019-04-28T07:32:42.000Z | sandbox/ipython/mydemo.py | rboman/progs | c60b4e0487d01ccd007bcba79d1548ebe1685655 | [
"Apache-2.0"
] | 2 | 2017-12-13T13:13:52.000Z | 2019-03-13T20:08:15.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from IPython.lib.demo import Demo
mydemo = Demo('myscript.py')
#mydemo()
| 10.583333 | 33 | 0.629921 |
01b8d0b1f67ce4439fafa7bbc137ecec5e4d0405 | 8,617 | py | Python | tune_td3.py | clairecw/TD3 | 22840c0ee1620086c2495d859be2c3b7a4c70f3f | [
"MIT"
] | 1 | 2021-04-11T16:52:43.000Z | 2021-04-11T16:52:43.000Z | tune_td3.py | aimless-agents/TD3 | a94d3a2ceba6f4766e1c4ff676c445a0bc418b62 | [
"MIT"
] | null | null | null | tune_td3.py | aimless-agents/TD3 | a94d3a2ceba6f4766e1c4ff676c445a0bc418b62 | [
"MIT"
] | 1 | 2021-02-12T05:01:46.000Z | 2021-02-12T05:01:46.000Z | import numpy as np
import torch
import gym
import argparse
import os
import sys
import pybulletgym
import utils
import TD3
import OurDDPG
import DDPG
import warnings
import ray
from ray import tune
from ray.tune.schedulers import ASHAScheduler
from ray.tune.schedulers import ASHAScheduler
# Runs policy for X episo... | 36.982833 | 139 | 0.628061 |
c3fde8ebaca894ae82bdcc1e6ebef532788af71c | 8,415 | py | Python | python/ccxt/async/nova.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | 1 | 2018-07-06T08:14:13.000Z | 2018-07-06T08:14:13.000Z | python/ccxt/async/nova.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | null | null | null | python/ccxt/async/nova.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
class nova (Exchange):
def d... | 38.076923 | 126 | 0.496019 |
61f7085a335d8b9120325de3b16e3e5faef4471b | 8,382 | py | Python | util/development/old_stats.py | tchlux/util | eff37464c7e913377398025adf76b057f9630b35 | [
"MIT"
] | 4 | 2021-04-22T20:19:40.000Z | 2022-01-30T18:57:23.000Z | util/development/old_stats.py | tchlux/util | eff37464c7e913377398025adf76b057f9630b35 | [
"MIT"
] | 1 | 2022-01-24T14:10:27.000Z | 2022-01-30T16:42:53.000Z | util/development/old_stats.py | tchlux/util | eff37464c7e913377398025adf76b057f9630b35 | [
"MIT"
] | 2 | 2019-05-19T07:44:28.000Z | 2021-04-22T20:20:40.000Z | def modes(data, confidence=.99, tol=1/1000):
from util.optimize import zero
num_samples = len(data)
error = 2*samples(num_samples, confidence=confidence)
cdf = cdf_fit(data, fit="cubic")
print("error: ",error)
# Find all of the zeros of the derivative (mode centers / dividers)
checks = np.li... | 44.823529 | 90 | 0.566571 |
7a4cec8879f0ab12b68f4424111b5015e9868ee9 | 27,137 | py | Python | openstates/openstates-master/openstates/az/bills.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | openstates/openstates-master/openstates/az/bills.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | openstates/openstates-master/openstates/az/bills.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | import re
from billy.scrape import NoDataForPeriod
from billy.scrape.bills import BillScraper, Bill
from billy.scrape.votes import Vote
from . import utils
from .action_utils import get_action_type, get_verbose_action
from lxml import html
BASE_URL = 'http://www.azleg.gov/'
# map to type and official_type (maybe we... | 46.627148 | 113 | 0.496297 |
d7331556d804e523600572a049ea3202458eb9e9 | 1,642 | py | Python | msgbox/main.py | paolo-losi/msgbox | d7a61761ba6606f8ac0fd25429ff94a88811a629 | [
"MIT"
] | null | null | null | msgbox/main.py | paolo-losi/msgbox | d7a61761ba6606f8ac0fd25429ff94a88811a629 | [
"MIT"
] | null | null | null | msgbox/main.py | paolo-losi/msgbox | d7a61761ba6606f8ac0fd25429ff94a88811a629 | [
"MIT"
] | 1 | 2021-08-12T20:10:20.000Z | 2021-08-12T20:10:20.000Z | import argparse
import logging
import signal
import sys
import tornado.ioloop
from msgbox import logger
from msgbox.http import http_server_manager, http_client_manager
from msgbox.serial import SerialPortManager
from msgbox.sim import sim_manager
parser = argparse.ArgumentParser()
parser.add_argument("--debug", ... | 26.483871 | 64 | 0.633983 |
260b66a7be8cd9ab8997da609ca6519967540d06 | 2,458 | py | Python | tests/selectors/test_selector.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | 1 | 2019-08-24T02:26:51.000Z | 2019-08-24T02:26:51.000Z | tests/selectors/test_selector.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | null | null | null | tests/selectors/test_selector.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from zvt.factors.technical_factor import CrossMaFactor
from ..context import init_context
init_context()
from zvt.domain import SecurityType, TradingLevel, Provider
from zvt.selectors.technical_selector import TechnicalSelector
from zvt.selectors.selector import TargetSelector
def test_cross... | 35.114286 | 96 | 0.658666 |
a052b016517f6aacc801103061d8c4b9c33c0bcd | 176 | py | Python | test/cases/nested_function.in.py | eirikurt/sdsort | beb7bf00aad2255daeb3cc6440c5036bc6e6ee02 | [
"MIT"
] | null | null | null | test/cases/nested_function.in.py | eirikurt/sdsort | beb7bf00aad2255daeb3cc6440c5036bc6e6ee02 | [
"MIT"
] | 4 | 2021-05-02T21:41:21.000Z | 2021-05-02T21:47:57.000Z | test/cases/nested_function.in.py | eirikurt/sdsort | beb7bf00aad2255daeb3cc6440c5036bc6e6ee02 | [
"MIT"
] | null | null | null | class FunctionNester:
def nest(self, val: str):
def inner():
print(val)
return inner
def bar(self):
return self.nest("something")
| 17.6 | 37 | 0.545455 |
e5af4290aaf5ef04e01a54db388adcdc02dd1124 | 1,969 | py | Python | z_externals/handson_second_edition/Chapter19/lib/common.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | z_externals/handson_second_edition/Chapter19/lib/common.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | z_externals/handson_second_edition/Chapter19/lib/common.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | 1 | 2021-11-23T12:30:37.000Z | 2021-11-23T12:30:37.000Z | import numpy as np
import torch
import torch.distributions as distribution
import ptan
def unpack_batch_a2c(batch, net, last_val_gamma, device="cpu"):
"""
Convert batch into training tensors
:param batch:
:param net:
:return: states variable, actions tensor, reference values variable
"""
... | 31.758065 | 79 | 0.665312 |
1537b6aaf21e2694745aaefee303a1ee23afa5e0 | 206 | py | Python | event_service/users/tests/test_models.py | theodor85/event_service | 3ecb98ab1121b676914e517125d6d8b02a2c2cd8 | [
"MIT"
] | null | null | null | event_service/users/tests/test_models.py | theodor85/event_service | 3ecb98ab1121b676914e517125d6d8b02a2c2cd8 | [
"MIT"
] | 3 | 2021-05-11T16:12:52.000Z | 2022-02-27T05:55:18.000Z | event_service/users/tests/test_models.py | theodor85/event_service | 3ecb98ab1121b676914e517125d6d8b02a2c2cd8 | [
"MIT"
] | null | null | null | import pytest
from event_service.users.models import User
pytestmark = pytest.mark.django_db
def test_user_get_absolute_url(user: User):
assert user.get_absolute_url() == f"/users/{user.username}/"
| 20.6 | 64 | 0.776699 |
623766aa0a16d0f35bd02bfa21d8cfdd7df17ca7 | 9,404 | py | Python | tests/python/rna_array.py | gunslingster/CSC581-assignement1 | 39012146e142bf400c7140d90ecfd27c45b589ca | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 365 | 2015-02-10T15:10:55.000Z | 2022-03-03T15:50:51.000Z | tests/python/rna_array.py | mmtt1998819/blender | c9c3bf983321990a6960c422e002a372c35a6f76 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 45 | 2015-01-09T15:34:20.000Z | 2021-10-05T14:44:23.000Z | tests/python/rna_array.py | mmtt1998819/blender | c9c3bf983321990a6960c422e002a372c35a6f76 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 172 | 2015-01-25T15:16:53.000Z | 2022-01-31T08:25:36.000Z | # Apache License, Version 2.0
import unittest
import random
test = bpy.data.test
# farr - 1-dimensional array of float
# fdarr - dynamic 1-dimensional array of float
# fmarr - 3-dimensional ([3][4][5]) array of float
# fdmarr - dynamic 3-dimensional (ditto size) array of float
# same as above for other types except... | 31.77027 | 104 | 0.582093 |
0fa709a1a820dc6486394960922ab5ceeb1d5ab6 | 9,411 | py | Python | src/quad_solve_attempt_2.py | yuanagain/seniorthesis | c0ef4d703c286c8562b5ebb4ed0fbe162e0c4cf2 | [
"MIT"
] | null | null | null | src/quad_solve_attempt_2.py | yuanagain/seniorthesis | c0ef4d703c286c8562b5ebb4ed0fbe162e0c4cf2 | [
"MIT"
] | null | null | null | src/quad_solve_attempt_2.py | yuanagain/seniorthesis | c0ef4d703c286c8562b5ebb4ed0fbe162e0c4cf2 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
##
import sys
import random
## equation class
coeffs = [ [4, 5, 6, 7 ],
[0, 9, 10, 11 ],
[0, 0, 12, 13 ],
[0, 0, 0, 14 ]]
def van_der_pol_oscillator_deriv(x, t):
nx0 = x[1]... | 28.779817 | 88 | 0.470088 |
24070bcd774c1c0c7c8d887b581e95d56ea3086d | 5,543 | py | Python | model.py | arbaaz-abz/EAST-TextDetector | 60376ce027fab9f909e4a75530bd89034a182a38 | [
"MIT"
] | 47 | 2019-02-21T02:31:06.000Z | 2021-06-23T10:14:13.000Z | model.py | arbaaz-abz/EAST-TextDetector | 60376ce027fab9f909e4a75530bd89034a182a38 | [
"MIT"
] | 21 | 2020-09-25T22:41:00.000Z | 2022-03-12T00:50:43.000Z | model.py | arbaaz-abz/EAST-TextDetector | 60376ce027fab9f909e4a75530bd89034a182a38 | [
"MIT"
] | 11 | 2019-02-24T01:54:21.000Z | 2022-02-16T09:45:54.000Z | import tensorflow as tf
import numpy as np
from tensorflow.contrib import slim
tf.app.flags.DEFINE_integer('text_scale', 512, '')
from nets import resnet_v1
FLAGS = tf.app.flags.FLAGS
def unpool(inputs):
return tf.image.resize_bilinear(inputs, size=[tf.shape(inputs)[1]*2, tf.shape(inputs)[2]*2])
def mean_i... | 40.459854 | 143 | 0.628721 |
aa86c03ca017a56368254b7623fe0de37544f2d0 | 3,548 | py | Python | imdbSpider.py | Shulun/imdbSpider | 9158977f569c0be22b61f151e2b5c771de7e4d54 | [
"MIT"
] | null | null | null | imdbSpider.py | Shulun/imdbSpider | 9158977f569c0be22b61f151e2b5c771de7e4d54 | [
"MIT"
] | null | null | null | imdbSpider.py | Shulun/imdbSpider | 9158977f569c0be22b61f151e2b5c771de7e4d54 | [
"MIT"
] | null | null | null | #coding:utf-8
from urllib import request
from bs4 import BeautifulSoup as bs
import re
import wordsegment as ws
import pandas as pd
import numpy
import matplotlib
matplotlib.use('Agg')
matplotlib.rcParams['figure.figsize'] = (20.0, 10.0)
import matplotlib.pyplot as plt
# %matplotlib inline
from wordcloud import WordCl... | 32.851852 | 117 | 0.728016 |
6c704136484309a8f16cbf73c98ab65e0794583d | 14,849 | py | Python | cryptoapis/model/add_tokens_to_existing_from_address_rb_token_data.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/add_tokens_to_existing_from_address_rb_token_data.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/add_tokens_to_existing_from_address_rb_token_data.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 46.403125 | 484 | 0.609671 |
34dfdb2dd87b0a786ed6c030aa431d733f0c4e83 | 4,800 | py | Python | src/pypyr/mappings.py | joelphillips/pypyramid | be1b4760235d859755771e55c003396e02b72f91 | [
"BSD-3-Clause"
] | 1 | 2015-01-01T16:26:16.000Z | 2015-01-01T16:26:16.000Z | src/pypyr/mappings.py | joelphillips/pypyramid | be1b4760235d859755771e55c003396e02b72f91 | [
"BSD-3-Clause"
] | null | null | null | src/pypyr/mappings.py | joelphillips/pypyramid | be1b4760235d859755771e55c003396e02b72f91 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on Aug 20, 2010
@author: joel
'''
import numpy
def applyweights(wp, vp):
from numpy import newaxis
wp = wp.reshape(wp.shape + (1,)*(3-len(wp.shape)))
if len(vp.shape) == 2: vp = vp[:,:,newaxis]
wvp = numpy.sum(wp[:,newaxis] * vp[:,:,newaxis,:], axis=3)
# print "applyweights %s, %s, ... | 33.333333 | 138 | 0.571667 |
3b87ca9ce9483f67ad4df1bfbd3273d616e44112 | 12,977 | py | Python | notebooks/17.0-BDP-eda-sep-data.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/17.0-BDP-eda-sep-data.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/17.0-BDP-eda-sep-data.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | #%% Load data
import networkx as nx
import numpy as np
import pandas as pd
from graspy.plot import degreeplot, edgeplot, gridplot, heatmap
from mpl_toolkits.axes_grid1 import make_axes_locatable
from src.data import load_networkx
from src.utils import meta_to_array, savefig
#%%
graph_type = "Gn"
graph = load_networ... | 33.5323 | 89 | 0.672189 |
0bedb04690325914a8e98a31e0d0150042fc0a36 | 2,291 | py | Python | qingcloud/cli/iaas_client/actions/vxnet/create_vxnets.py | shiyuwang-qc/qingcloud-cli | ba89ea2fea1b1a52ac91ce5fe67a5868c860fb5b | [
"Apache-2.0"
] | 11 | 2015-05-27T19:52:36.000Z | 2021-04-15T09:07:39.000Z | qingcloud/cli/iaas_client/actions/vxnet/create_vxnets.py | zhangchi1992/qingcloud-cli | 163549d03e7e2c339a00ea6e7cb8e443881f82e4 | [
"Apache-2.0"
] | 7 | 2017-07-19T05:05:03.000Z | 2019-04-25T07:18:04.000Z | qingcloud/cli/iaas_client/actions/vxnet/create_vxnets.py | zhangchi1992/qingcloud-cli | 163549d03e7e2c339a00ea6e7cb8e443881f82e4 | [
"Apache-2.0"
] | 19 | 2016-03-15T07:31:47.000Z | 2021-07-26T09:31:33.000Z | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | 41.654545 | 91 | 0.564819 |
3a20c0de51a3bc8dcfe315eb873fc1a2808429a2 | 4,614 | py | Python | rlkit/data_management/simple_replay_buffer.py | michaelwan11/hfr | a92c2f46f746cc70c91e7f879c7e2b7c475ba73f | [
"MIT"
] | 2 | 2021-12-29T07:37:15.000Z | 2022-01-19T23:33:33.000Z | rlkit/data_management/simple_replay_buffer.py | michaelwan11/hfr | a92c2f46f746cc70c91e7f879c7e2b7c475ba73f | [
"MIT"
] | null | null | null | rlkit/data_management/simple_replay_buffer.py | michaelwan11/hfr | a92c2f46f746cc70c91e7f879c7e2b7c475ba73f | [
"MIT"
] | 1 | 2021-12-29T07:37:18.000Z | 2021-12-29T07:37:18.000Z | import numpy as np
from rlkit.data_management.replay_buffer import ReplayBuffer
class SimpleReplayBuffer(ReplayBuffer):
def __init__(self, max_replay_buffer_size, observation_dim, action_dim):
self._observation_dim = observation_dim
self._action_dim = action_dim
self._max_replay_buffer_si... | 38.773109 | 88 | 0.657781 |
45c34c4554dbe6d10f99643b48b693751947beb5 | 214 | py | Python | Bible/test.py | LeonelF/Limnoria-Plugins | b8146831a61f62f1e5f1196b8c1915a65c608124 | [
"MIT"
] | null | null | null | Bible/test.py | LeonelF/Limnoria-Plugins | b8146831a61f62f1e5f1196b8c1915a65c608124 | [
"MIT"
] | null | null | null | Bible/test.py | LeonelF/Limnoria-Plugins | b8146831a61f62f1e5f1196b8c1915a65c608124 | [
"MIT"
] | null | null | null | ###
# Copyright (c) 2017, Weasel
# All rights reserved.
#
#
###
from supybot.test import *
class CoinTestCase(PluginTestCase):
plugins = ('Bible',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
| 13.375 | 56 | 0.682243 |
c9cddca8d183dff3cf847b2a59d6a52931514932 | 1,102 | py | Python | portfolio/urls.py | lucasLB7/LucasPortfiolio | 6579c0622f1e071d41b497561e4261605978ffc6 | [
"Unlicense"
] | null | null | null | portfolio/urls.py | lucasLB7/LucasPortfiolio | 6579c0622f1e071d41b497561e4261605978ffc6 | [
"Unlicense"
] | 4 | 2020-02-12T01:07:27.000Z | 2021-06-08T19:10:47.000Z | portfolio/urls.py | lucasLB7/LucasPortfiolio | 6579c0622f1e071d41b497561e4261605978ffc6 | [
"Unlicense"
] | null | null | null | """portfolio URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | 34.4375 | 80 | 0.728675 |
c0adaf6ad907c832dbeefcb4a82bce2fd2f424cf | 39,068 | py | Python | .history/src/_fighter_20190422151622.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:25:30.000Z | 2019-12-25T10:25:30.000Z | .history/src/_fighter_20190422151622.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:27:15.000Z | 2019-12-25T10:27:15.000Z | .history/src/_fighter_20190422151622.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:50:05.000Z | 2019-12-25T10:50:05.000Z |
from pygame_functions import *
import fightScene
import engine
import menu
class Fighter:
fighterNames = ["Sub-Zero", "Scorpion"]
fightMoves = [["w", "s", "a", "d"], ["up", "down", "left", "right"]]
combatMoves = [["j","n","k","m","l","u","f"],["1","4","2","5","3","0","6"]]
danceLimit = 7
walkLi... | 47.013237 | 197 | 0.511595 |
4f8885b8ba9f087163547475db7c935c339cb0ec | 17,721 | py | Python | tests/integration-test/test_cis_splice_effects_identify.py | davidaknowles/regtools | 08042ef017a9606d40618c641044fd1c61982203 | [
"MIT"
] | null | null | null | tests/integration-test/test_cis_splice_effects_identify.py | davidaknowles/regtools | 08042ef017a9606d40618c641044fd1c61982203 | [
"MIT"
] | null | null | null | tests/integration-test/test_cis_splice_effects_identify.py | davidaknowles/regtools | 08042ef017a9606d40618c641044fd1c61982203 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
test_cis_splice_effects_identify.py -- Integration test for `regtools cis-splice-effects identify`
Copyright (c) 2015, The Griffith Lab
Author: Avinash Ramu <aramu@genome.wustl.edu>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and as... | 50.34375 | 164 | 0.635404 |
7f88cf59726e2d42283047c4c36db84794a31356 | 2,334 | py | Python | setup.py | wesinator/synapse | 05bdf27346f259159251c2a36d88ac87f8c09ed2 | [
"Apache-2.0"
] | null | null | null | setup.py | wesinator/synapse | 05bdf27346f259159251c2a36d88ac87f8c09ed2 | [
"Apache-2.0"
] | null | null | null | setup.py | wesinator/synapse | 05bdf27346f259159251c2a36d88ac87f8c09ed2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
VERSION = '2.7.1'
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = 'verify that the git tag matches our ve... | 27.785714 | 86 | 0.525278 |
4216795d37b46daf343784139c605f6d8f0c455f | 7,189 | py | Python | ldtab_demo.py | ontodev/wiring.py | f9986f59badff1d374f656f182f92b063b8d19be | [
"BSD-3-Clause"
] | null | null | null | ldtab_demo.py | ontodev/wiring.py | f9986f59badff1d374f656f182f92b063b8d19be | [
"BSD-3-Clause"
] | null | null | null | ldtab_demo.py | ontodev/wiring.py | f9986f59badff1d374f656f182f92b063b8d19be | [
"BSD-3-Clause"
] | null | null | null | import wiring_rs
import sqlite3
import sys
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
def get_types(connection, subject):
cur = connection.cursor()
query = (
f"SELECT * FROM statement WHERE "
f"subjec... | 28.41502 | 88 | 0.648769 |
3b7dbf9079949da6e1bd2137a9d63b8be12057f7 | 14,193 | py | Python | aioredis/pubsub.py | tclarke/aioredis | d42dd9144ea376b8230786040972419b3ffab3c6 | [
"MIT"
] | null | null | null | aioredis/pubsub.py | tclarke/aioredis | d42dd9144ea376b8230786040972419b3ffab3c6 | [
"MIT"
] | null | null | null | aioredis/pubsub.py | tclarke/aioredis | d42dd9144ea376b8230786040972419b3ffab3c6 | [
"MIT"
] | null | null | null | import asyncio
import json
import types
import collections
import warnings
import sys
from .abc import AbcChannel
from .util import _converters # , _set_result
from .errors import ChannelClosedError
from .log import logger
__all__ = [
"Channel",
"EndOfStream",
"Receiver",
]
# End of pubsub messages st... | 31.125 | 85 | 0.580357 |
13c0ef338bc0cde50e75bffc1dd5493fc1daa420 | 5,044 | py | Python | homeassistant/components/anthemav/media_player.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | homeassistant/components/anthemav/media_player.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | homeassistant/components/anthemav/media_player.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 2 | 2018-08-15T03:59:35.000Z | 2018-10-18T12:20:05.000Z | """Support for Anthem Network Receivers and Processors."""
import logging
import voluptuous as vol
from homeassistant.components.media_player import (
MediaPlayerDevice, PLATFORM_SCHEMA)
from homeassistant.components.media_player.const import (
SUPPORT_SELECT_SOURCE, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
SUP... | 30.756098 | 74 | 0.65682 |
51cb7233ffafd5c9acc895e386deccef72824290 | 6,892 | py | Python | fxp2ardour.py | SpotlightKid/ardour2fxp | 9063c321f0b0f08bcdea0a8e88b47f14dd72f858 | [
"MIT"
] | 11 | 2019-01-03T21:51:40.000Z | 2021-08-07T13:42:31.000Z | fxp2ardour.py | SpotlightKid/ardour2fxp | 9063c321f0b0f08bcdea0a8e88b47f14dd72f858 | [
"MIT"
] | 2 | 2019-01-23T05:59:51.000Z | 2021-01-15T20:59:46.000Z | fxp2ardour.py | SpotlightKid/ardour2fxp | 9063c321f0b0f08bcdea0a8e88b47f14dd72f858 | [
"MIT"
] | 3 | 2020-07-17T14:12:15.000Z | 2021-11-19T11:25:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# fxp2ardour.py
#
"""Convert one or more VST2 FXP preset files to Ardour VST presets XML files.
"""
import argparse
import hashlib
import os
import sys
from base64 import b64encode
from collections import namedtuple
from os.path import exists, isdir, join
from struct im... | 36.855615 | 88 | 0.567324 |
73a893bf28398084bbb5546df1085b8da1b498a6 | 523 | py | Python | webscraping/main.py | MichaelS42/web-scraping | d9ff5ab5fb7a7f5872700cfc51804cbd77607389 | [
"MIT"
] | null | null | null | webscraping/main.py | MichaelS42/web-scraping | d9ff5ab5fb7a7f5872700cfc51804cbd77607389 | [
"MIT"
] | null | null | null | webscraping/main.py | MichaelS42/web-scraping | d9ff5ab5fb7a7f5872700cfc51804cbd77607389 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
html_text = requests.get('https://www.timesjobs.com/candidate/job-search.html?searchType=personalizedSearch&from=submit&txtKeywords=python&txtLocation=')
soup = BeautifulSoup(html_text, 'lxml')
job = soup.find('li', class_ = 'clearfix job-bx wht-shd-bx')
company_name = j... | 43.583333 | 153 | 0.745698 |
f6fbfcdd68f4995e0b0b671c866816317a9e997d | 9,219 | py | Python | sdk/python/pulumi_azure_native/marketplace/get_private_store_offer.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/marketplace/get_private_store_offer.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/marketplace/get_private_store_offer.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 38.898734 | 312 | 0.669053 |
e77a1c0fc79f37b2175b7303eb166f580bc71036 | 1,217 | py | Python | scriptable/ast/variable/assignment.py | c7nw3r/scriptable | b285d865da41774c8321ebf51f5a468ef1c92402 | [
"Apache-2.0"
] | null | null | null | scriptable/ast/variable/assignment.py | c7nw3r/scriptable | b285d865da41774c8321ebf51f5a468ef1c92402 | [
"Apache-2.0"
] | null | null | null | scriptable/ast/variable/assignment.py | c7nw3r/scriptable | b285d865da41774c8321ebf51f5a468ef1c92402 | [
"Apache-2.0"
] | null | null | null | from scriptable.api import AST
from scriptable.api.accessor import Accessor
from scriptable.api.ast_binding import ASTBinding
from scriptable.ast.property import PropertyAccess, Property
class Assignment(AST[None]):
def __init__(self, target: AST, source: AST):
self.source = source
self.target = t... | 32.026316 | 84 | 0.622021 |
ef98bea9d6e53bfdd55ad002fda190a02436d355 | 1,530 | py | Python | bin/compile.py | lihengl/dizu-api | b7c10c4e8594b150792c3634ae5dbf957b23aeb9 | [
"MIT"
] | null | null | null | bin/compile.py | lihengl/dizu-api | b7c10c4e8594b150792c3634ae5dbf957b23aeb9 | [
"MIT"
] | null | null | null | bin/compile.py | lihengl/dizu-api | b7c10c4e8594b150792c3634ae5dbf957b23aeb9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import json
import sys
def translate(cond):
if cond == u"全": return "true"
return "false"
js_head = "function(n){"
js_body = "if(%s)return'%s';"
js_tail = "return'00000';}"
ifile = codecs.open("tmp/weighted.json", "r", encoding="utf-8")
rules = j... | 23.538462 | 63 | 0.533987 |
81f9a5950c6338f7b80eb26c76d1282899861cb8 | 493 | py | Python | pythonteste/desafio42.py | dangiotto/Python | 29a9d18d7595a5c21e65dafc39f7fd4c55d8971c | [
"MIT"
] | 1 | 2020-10-17T03:23:59.000Z | 2020-10-17T03:23:59.000Z | pythonteste/desafio42.py | dangiotto/Python | 29a9d18d7595a5c21e65dafc39f7fd4c55d8971c | [
"MIT"
] | null | null | null | pythonteste/desafio42.py | dangiotto/Python | 29a9d18d7595a5c21e65dafc39f7fd4c55d8971c | [
"MIT"
] | null | null | null | print('=-='*20)
print('Analisador de Triângulo')
print('=-='*20)
a = float(input('Informe o primeiro lado :'))
b = float(input('Informe o segundo lado: '))
c = float(input('Informe o terceiro lado: '))
if a < b + c and b < a + c and c < a + b:
print('Pode ser um triângulo')
if a==b and b==c and c==a:
p... | 29 | 45 | 0.586207 |
997429a4c9e675d40426b33ea034afd9a8b6079c | 62 | py | Python | owl_rdf_utils/__init__.py | Bioprotocols/paml | a1597f9e889be63a7cfb76f869224f200ca0e58f | [
"MIT"
] | 6 | 2021-10-16T04:42:59.000Z | 2022-03-07T18:54:04.000Z | owl_rdf_utils/__init__.py | Bioprotocols/paml | a1597f9e889be63a7cfb76f869224f200ca0e58f | [
"MIT"
] | 56 | 2021-10-15T21:54:30.000Z | 2022-03-31T20:22:26.000Z | owl_rdf_utils/__init__.py | Bioprotocols/paml | a1597f9e889be63a7cfb76f869224f200ca0e58f | [
"MIT"
] | 2 | 2022-01-26T07:14:45.000Z | 2022-02-04T11:27:35.000Z | from .restrictions import *
from .to_sorted_ntriples import *
| 20.666667 | 33 | 0.806452 |
26272c56650518ae3681a957b6d32f7dae17ae5d | 7,815 | py | Python | ArticleCrawler.py | Ohartv1/Programmeer-Project-2015- | 5e92148c59658ec3a6e24e87d579333e46d371c0 | [
"MIT"
] | null | null | null | ArticleCrawler.py | Ohartv1/Programmeer-Project-2015- | 5e92148c59658ec3a6e24e87d579333e46d371c0 | [
"MIT"
] | 1 | 2015-06-03T09:21:36.000Z | 2015-06-26T09:34:48.000Z | ArticleCrawler.py | Ohartv1/Programmeer-Project-2015- | 5e92148c59658ec3a6e24e87d579333e46d371c0 | [
"MIT"
] | null | null | null | # Onno Hartveldt
# 10972935
# visualisation:
# "Wie zijn de nakomelingen van een wetenschappelijke publicatie?"
import json, time, unicodedata, socket
from pattern.web import URL, DOM, plaintext
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
TARGET = "http://apps.webof... | 28.837638 | 107 | 0.612796 |
af28e0a81852bccf75902fbc4eb3bf9ee7b79c7f | 2,344 | py | Python | vanilla_lasso/ex3_confidence_interval.py | vonguyenleduy/parametric_si_generalized_lasso | 3ef9e2d47036b812b9737d4d5b887000dc24ce03 | [
"BSD-3-Clause"
] | null | null | null | vanilla_lasso/ex3_confidence_interval.py | vonguyenleduy/parametric_si_generalized_lasso | 3ef9e2d47036b812b9737d4d5b887000dc24ce03 | [
"BSD-3-Clause"
] | null | null | null | vanilla_lasso/ex3_confidence_interval.py | vonguyenleduy/parametric_si_generalized_lasso | 3ef9e2d47036b812b9737d4d5b887000dc24ce03 | [
"BSD-3-Clause"
] | 1 | 2021-06-04T19:22:37.000Z | 2021-06-04T19:22:37.000Z | import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm
import gen_data
import qp_solver
import util
import parametric_si
import ci
def construct_P_q_G_h_A_b(X, y, p, lamda):
no_vars = 2 * p
# construct P
P = np.zeros((no_vars, no_vars))
XTX = np.dot(X.T, X)
P[0:p, 0:p] =... | 24.673684 | 110 | 0.5593 |
60cacbfd79e682b53f255cfa7899d8e5716ab9c3 | 2,920 | py | Python | conf/implicit/baselines.py | hunterhector/DDSemantics | 883ef1015bd21d9b8575d8000faf3b506a09f21c | [
"Apache-2.0"
] | null | null | null | conf/implicit/baselines.py | hunterhector/DDSemantics | 883ef1015bd21d9b8575d8000faf3b506a09f21c | [
"Apache-2.0"
] | null | null | null | conf/implicit/baselines.py | hunterhector/DDSemantics | 883ef1015bd21d9b8575d8000faf3b506a09f21c | [
"Apache-2.0"
] | 2 | 2018-06-24T17:40:31.000Z | 2020-07-30T19:19:55.000Z | import os
# Model parameters
c.ArgModelPara.model_type = "EventPairComposition"
c.ArgModelPara.event_arg_vocab_size = 58983 # event_frame_embeddings_min500
c.ArgModelPara.event_embedding_dim = 300
c.ArgModelPara.word_vocab_size = 228575
c.ArgModelPara.word_embedding_dim = 300
c.ArgModelPara.arg_composition_layer_size... | 36.049383 | 88 | 0.790068 |
8ab310c930ee051873f8a88555de983d1b860ef6 | 4,060 | py | Python | dispatcher/workers.py | ds-vologdin/dispather | 2496e2207db6353f8cf366df5a1b2866095c3bef | [
"MIT"
] | null | null | null | dispatcher/workers.py | ds-vologdin/dispather | 2496e2207db6353f8cf366df5a1b2866095c3bef | [
"MIT"
] | null | null | null | dispatcher/workers.py | ds-vologdin/dispather | 2496e2207db6353f8cf366df5a1b2866095c3bef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime
import threading
import time
from logger import logger
LOCK_POOL_WORKERS = threading.RLock()
POOL_WORKERS = {}
def _register_new_worker(worker_id, host, port, datetime_now, ttl=600):
""" Нельзя использовать без блокировки LOCK_POOL_WORKERS """
worker = {... | 29 | 71 | 0.653941 |
3c0cd24055e8f817ca9d51cd9f67874241e60369 | 1,583 | py | Python | week2/utilities/xgb_utils.py | justinakiud/search_with_machine_learning_course | 074f6f830eda84150efb4cdd1d3f4f25c0207c76 | [
"Apache-2.0"
] | null | null | null | week2/utilities/xgb_utils.py | justinakiud/search_with_machine_learning_course | 074f6f830eda84150efb4cdd1d3f4f25c0207c76 | [
"Apache-2.0"
] | null | null | null | week2/utilities/xgb_utils.py | justinakiud/search_with_machine_learning_course | 074f6f830eda84150efb4cdd1d3f4f25c0207c76 | [
"Apache-2.0"
] | null | null | null | # Utilities for working with XG Boost
import xgboost as xgb
from xgboost import plot_importance, plot_tree
from matplotlib import pyplot as plt
import json
# Plots useful things like the tree and importance for display
def plots(xgb_model, xgb_model_name, xgb_feat_map, xgb_plot):
print("Plotting model quality data... | 35.977273 | 109 | 0.688566 |
2aae4132fab703cdac27f75f6897c9deb5551879 | 62 | py | Python | app/models.py | parashar-lonewolf/Redditlastic | 6cf4d5c296001c88ca592788e2145d00fa293c8e | [
"MIT"
] | 1 | 2019-03-25T12:40:49.000Z | 2019-03-25T12:40:49.000Z | app/models.py | parashar-lonewolf/Redditlastic | 6cf4d5c296001c88ca592788e2145d00fa293c8e | [
"MIT"
] | null | null | null | app/models.py | parashar-lonewolf/Redditlastic | 6cf4d5c296001c88ca592788e2145d00fa293c8e | [
"MIT"
] | null | null | null | class Post(db.Model):
__searchable__ = ['body']
# ...
| 15.5 | 29 | 0.548387 |
5d0a158f74fd428ee72bd877f642cf73b78da823 | 14,917 | py | Python | stubs/loboris-v3_2_24-frozen/microWebTemplate.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/loboris-v3_2_24-frozen/microWebTemplate.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/loboris-v3_2_24-frozen/microWebTemplate.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright © 2018 Jean-Christophe Bos & HC² (www.hc2.fr)
"""
import re
class MicroWebTemplate:
# ============================================================================
# ===( Constants )============================================================
# ========================... | 47.506369 | 134 | 0.475699 |
e5b6d512ed1aa09ab0a2318cd21095a4dab0f6c4 | 836 | py | Python | analysis/visualizeStats.py | schurterb/kmeansconv | 74912b9fdfc1e688be737ba0117461ef8959207b | [
"Unlicense"
] | 2 | 2016-12-08T02:37:00.000Z | 2017-07-21T01:02:39.000Z | analysis/visualizeStats.py | schurterb/kmeansconv | 74912b9fdfc1e688be737ba0117461ef8959207b | [
"Unlicense"
] | null | null | null | analysis/visualizeStats.py | schurterb/kmeansconv | 74912b9fdfc1e688be737ba0117461ef8959207b | [
"Unlicense"
] | null | null | null | import matplotlib.pyplot as plt
from .makeErrorCurves import makeErrorCurves
from scipy.io import loadmat
def showStats(dataFile):
fig_axes = plt.subplots(nrows=2, ncols=2)
dFile = dataFile[0]
mData = loadmat(dFile + 'errors_new.mat')
data0 = [mData.get('p_thresholds'), mData.get('p_err'), mD... | 41.8 | 94 | 0.643541 |
9506693572202fc19c72f52e02e8e43bb6be8948 | 1,944 | py | Python | dev/tools/leveleditor/direct/p3d/pmerge.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | dev/tools/leveleditor/direct/p3d/pmerge.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | dev/tools/leveleditor/direct/p3d/pmerge.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | #! /usr/bin/env python
usageText = """
This script can be used to merge together the contents of two or more
separately-built stage directories, built independently via ppackage,
or via Packager.py.
This script is actually a wrapper around Panda's PackageMerger.py.
Usage:
%(prog)s [opts] [inputdir1 .. inputdirN]... | 22.870588 | 77 | 0.684671 |
c4ee63f24354e5c03ae90ef8153db47051d8f5f1 | 25,327 | py | Python | src/unicon/plugins/tests/test_plugin_linux.py | TestingBytes/unicon.plugins | 0600956d805deb4fd790aa3ef591c5d659e85de1 | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/tests/test_plugin_linux.py | TestingBytes/unicon.plugins | 0600956d805deb4fd790aa3ef591c5d659e85de1 | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/tests/test_plugin_linux.py | TestingBytes/unicon.plugins | 0600956d805deb4fd790aa3ef591c5d659e85de1 | [
"Apache-2.0"
] | null | null | null | """
Unittests for Linux plugin
Uses the mock_device.py script to test the execute service.
"""
__author__ = "Dave Wapstra <dwapstra@cisco.com>"
from concurrent.futures import ThreadPoolExecutor
import multiprocessing
import os
import re
import yaml
import datetime
import unittest
import importlib
from pprint import... | 34.318428 | 111 | 0.550796 |
587caca061f2a5857f53edeaae6258926b8ccdd6 | 17,708 | py | Python | Need2convert/zzfatranslator-core.py | PersianWikipedia/fawikibot | 30b2e2aa824753cd0927573fa2f7fdb907cb15d2 | [
"MIT"
] | 12 | 2015-07-06T09:51:40.000Z | 2020-07-05T21:27:12.000Z | Need2convert/zzfatranslator-core.py | PersianWikipedia/fawikibot | 30b2e2aa824753cd0927573fa2f7fdb907cb15d2 | [
"MIT"
] | 3 | 2017-01-08T01:12:00.000Z | 2020-09-15T04:25:19.000Z | Need2convert/zzfatranslator-core.py | PersianWikipedia/fawikibot | 30b2e2aa824753cd0927573fa2f7fdb907cb15d2 | [
"MIT"
] | 6 | 2015-07-06T09:53:39.000Z | 2021-07-07T09:12:52.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Reza(User:reza1615), 2011
#
# Distributed under the terms of MIT License (MIT)
# for more information see https://fa.wikipedia.org/wiki/کاربر:Fatranslator/ترجمه_همسنگ
#
from pywikibot.compat import query
import re
import pywikibot
import ref_link_correction_core... | 40.614679 | 238 | 0.529026 |
50a2e75b97c0833b2bcccf09e4d4f15dc816fac6 | 874 | py | Python | build/sick_tim/catkin_generated/pkg.develspace.context.pc.py | 6RiverSystems/darknet_ros | 03c72b96afa99f7cc75f7792b51deb4a7f4ed379 | [
"BSD-3-Clause"
] | null | null | null | build/sick_tim/catkin_generated/pkg.develspace.context.pc.py | 6RiverSystems/darknet_ros | 03c72b96afa99f7cc75f7792b51deb4a7f4ed379 | [
"BSD-3-Clause"
] | null | null | null | build/sick_tim/catkin_generated/pkg.develspace.context.pc.py | 6RiverSystems/darknet_ros | 03c72b96afa99f7cc75f7792b51deb4a7f4ed379 | [
"BSD-3-Clause"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/kalyco/mfp_workspace/devel/.private/sick_tim/include;/home/kalyco/mfp_workspace/src/sick_tim/include;/usr/include;/usr/include/libusb-1.0".split(';') if "/home/kalyco/mfp_workspace/devel/.private... | 97.111111 | 353 | 0.782609 |
a4ab6ac3d387a5282baa0c7eabd009c1b6ad3a14 | 3,227 | py | Python | scripts/ais_liststations.py | rolker/noaadata | 052a4b7d634e0a3a92a348b543e5db536ae24f02 | [
"Apache-2.0"
] | 35 | 2015-02-15T17:23:00.000Z | 2022-01-27T01:49:43.000Z | scripts/ais_liststations.py | rolker/noaadata | 052a4b7d634e0a3a92a348b543e5db536ae24f02 | [
"Apache-2.0"
] | 2 | 2017-10-04T17:24:38.000Z | 2017-10-04T18:22:00.000Z | scripts/ais_liststations.py | rolker/noaadata | 052a4b7d634e0a3a92a348b543e5db536ae24f02 | [
"Apache-2.0"
] | 22 | 2015-02-08T13:29:58.000Z | 2022-03-09T03:03:16.000Z | #!/usr/bin/env python
"""List all of the AIS stations within a set of log files.
@license: Apache 2.0
"""
import os
import sys
def getStation(line, withR=False):
fields=line.split(',')
if '!AIVDM' != fields[0]:
return None
foundChecksum=False
for i,f in enumerate(fields):
if i<5: co... | 36.258427 | 113 | 0.528974 |
5e87c07f63cdda106f2b0b352b2b6e9b85f05d9d | 621 | py | Python | instagram_api/response/reels_tray_feed.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | 13 | 2019-08-07T21:24:34.000Z | 2020-12-12T12:23:50.000Z | instagram_api/response/reels_tray_feed.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | instagram_api/response/reels_tray_feed.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | from .mapper import ApiResponse, ApiResponseInterface
from .mapper.types import Timestamp, AnyType
from .model import Broadcast, PostLive, StoryTray, TraySuggestions
__all__ = ['ReelsTrayFeedResponse']
class ReelsTrayFeedResponseInterface(ApiResponseInterface):
story_ranking_token: str
broadcasts: [Broadcast... | 28.227273 | 73 | 0.798712 |
671b73326327f6d74c02b36cba4b67509b1b9507 | 27,931 | py | Python | pyubx2/ubxtypes_set.py | pjln/pyubx2 | 3d2f414f7f2c3d2e4d40177499228cf438ecf12e | [
"BSD-3-Clause"
] | null | null | null | pyubx2/ubxtypes_set.py | pjln/pyubx2 | 3d2f414f7f2c3d2e4d40177499228cf438ecf12e | [
"BSD-3-Clause"
] | null | null | null | pyubx2/ubxtypes_set.py | pjln/pyubx2 | 3d2f414f7f2c3d2e4d40177499228cf438ecf12e | [
"BSD-3-Clause"
] | null | null | null | # pylint: disable=unused-import
"""
UBX Protocol Input payload definitions
THESE ARE THE PAYLOAD DEFINITIONS FOR _SET_ MESSAGES _TO_ THE RECEIVER
NB: Attribute names must be unique within each message class/id
NB: Repeating groups must be defined as a tuple thus:
'group': ('numr', {dict})
where
- 'numr' ... | 24.783496 | 116 | 0.41377 |
1ef809e6939644a0bdd9be8ac59cf33c010f0280 | 636 | py | Python | migrations/versions/a4f3c426417e_.py | apoorvkhare07/SUMSarizer | ff8264906c380b4d5e6a52a23040bb8bff361c92 | [
"MIT"
] | 9 | 2015-03-08T07:45:30.000Z | 2019-02-10T04:22:34.000Z | migrations/versions/a4f3c426417e_.py | apoorvkhare07/SUMSarizer | ff8264906c380b4d5e6a52a23040bb8bff361c92 | [
"MIT"
] | 45 | 2015-04-09T00:32:09.000Z | 2018-08-22T18:04:53.000Z | migrations/versions/a4f3c426417e_.py | apoorvkhare07/SUMSarizer | ff8264906c380b4d5e6a52a23040bb8bff361c92 | [
"MIT"
] | 13 | 2015-04-08T23:52:05.000Z | 2019-02-20T10:22:33.000Z | """empty message
Revision ID: a4f3c426417e
Revises: 46ae5e506646
Create Date: 2016-07-01 06:25:23.060945
"""
# revision identifiers, used by Alembic.
revision = 'a4f3c426417e'
down_revision = '46ae5e506646'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | 23.555556 | 103 | 0.70283 |
5e41cc55bf954f8a3bec620d1f6880984878be91 | 1,386 | py | Python | redisai/convert.py | dagdelenmustafa/redisai-py | 18837ea67101946613e8e94ec113eababe49f2e1 | [
"BSD-3-Clause"
] | null | null | null | redisai/convert.py | dagdelenmustafa/redisai-py | 18837ea67101946613e8e94ec113eababe49f2e1 | [
"BSD-3-Clause"
] | null | null | null | redisai/convert.py | dagdelenmustafa/redisai-py | 18837ea67101946613e8e94ec113eababe49f2e1 | [
"BSD-3-Clause"
] | null | null | null | from typing import Union, ByteString, Sequence
from .utils import convert_to_num
from .constants import DType
from .containers import Tensor
try:
import numpy as np
except (ImportError, ModuleNotFoundError):
np = None
def from_numpy(tensor: np.ndarray) -> Tensor:
""" Convert the numpy input from user to `... | 31.5 | 87 | 0.664502 |
c241a91827b0590556d77fefcf98261516281f4e | 4,463 | py | Python | ktb/util.py | ABasharEter/KaggleToolbox | bef82f9ffbc1270299d2892aadc56817e2bdf501 | [
"MIT"
] | 1 | 2020-03-30T03:55:03.000Z | 2020-03-30T03:55:03.000Z | ktb/util.py | ABasharEter/KaggleToolbox | bef82f9ffbc1270299d2892aadc56817e2bdf501 | [
"MIT"
] | null | null | null | ktb/util.py | ABasharEter/KaggleToolbox | bef82f9ffbc1270299d2892aadc56817e2bdf501 | [
"MIT"
] | null | null | null | from typing import List, NoReturn, Union, Tuple, Optional, Text, Generic, Callable, Dict
import pandas as pd
import os
import pickle
import gzip
import numpy as np
import random as rn
from datetime import datetime
SEED = 777
output_dir = "../Results"
def write_submission(df, cols = None):
if cols is None:
... | 34.596899 | 122 | 0.562402 |
0a530623e711c043164c93414fa68dec0613d147 | 909 | py | Python | src/data.py | Aradhya-Tripathi/deBlur | 6928b582b5c5ce4f681dfa5baa23f85d8e4d44c6 | [
"MIT"
] | 4 | 2020-12-18T20:52:05.000Z | 2021-04-27T20:15:27.000Z | src/data.py | Aradhya-Tripathi/deBlur | 6928b582b5c5ce4f681dfa5baa23f85d8e4d44c6 | [
"MIT"
] | null | null | null | src/data.py | Aradhya-Tripathi/deBlur | 6928b582b5c5ce4f681dfa5baa23f85d8e4d44c6 | [
"MIT"
] | null | null | null | from PIL import Image, ImageFilter
import pandas as pd
import numpy as np
from torch.utils.data import Dataset
import os
from torchvision import transforms
def get_paths():
path = 'image/'
lst_path = os.listdir(path)
all_paths = [path+x for x in lst_path]
return all_paths
class Data(Dataset):
def... | 24.567568 | 70 | 0.690869 |
ab1ae4c629f202f3849778bc415044a361d0dfa2 | 2,682 | py | Python | settings.py | codeforamerica/transparencyjobs | a9ffec28918cf5a1b18f15ef2b17c6aa2de3e070 | [
"BSD-3-Clause"
] | null | null | null | settings.py | codeforamerica/transparencyjobs | a9ffec28918cf5a1b18f15ef2b17c6aa2de3e070 | [
"BSD-3-Clause"
] | null | null | null | settings.py | codeforamerica/transparencyjobs | a9ffec28918cf5a1b18f15ef2b17c6aa2de3e070 | [
"BSD-3-Clause"
] | 1 | 2021-04-17T15:38:14.000Z | 2021-04-17T15:38:14.000Z | # Django settings for ppp project.
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/L... | 30.477273 | 79 | 0.743475 |
c1f2c98a882e1ff2ac052c015b6b3f8c03333231 | 875 | py | Python | Codefights/arcade/intro/level-4/16.Are-Similar/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codefights/arcade/intro/level-4/16.Are-Similar/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codefights/arcade/intro/level-4/16.Are-Similar/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python3
from solution1 import areSimilar as f
qa = [
([1, 2, 3], [1, 2, 3], True),
([1, 2, 3], [2, 1, 3], True),
([1, 2, 2], [2, 1, 1], False),
([1, 1, 4], [1, 2, 3], False),
([1, 2, 3], [1, 10, 2], False),
([2, 3, 1], [1, 3, 2], True),
([2, 3, 9], [10, 3, 2], False),
([4, 6, 3], [3,... | 29.166667 | 115 | 0.438857 |
1c2c711f45577a76148ae8af191d115d86196cec | 8,486 | py | Python | client/filesystem.py | thatch/pyre-check | 31278b71081ec3a3636f0d94da91dc0e4273ece9 | [
"MIT"
] | null | null | null | client/filesystem.py | thatch/pyre-check | 31278b71081ec3a3636f0d94da91dc0e4273ece9 | [
"MIT"
] | null | null | null | client/filesystem.py | thatch/pyre-check | 31278b71081ec3a3636f0d94da91dc0e4273ece9 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import errno
import fcntl
import functools
import logging
import os
import shutil
import subprocess
from contextlib import contextmanager
from typin... | 30.415771 | 88 | 0.604054 |
3a421437c56640a221e090bcb7ad1b2fec1e05a0 | 79,441 | py | Python | python/ray/services.py | richard4912/ray | c5b88401938c6046f270b1e7f6f763540eb8e538 | [
"Apache-2.0"
] | 1 | 2021-02-08T13:40:58.000Z | 2021-02-08T13:40:58.000Z | python/ray/services.py | richard4912/ray | c5b88401938c6046f270b1e7f6f763540eb8e538 | [
"Apache-2.0"
] | null | null | null | python/ray/services.py | richard4912/ray | c5b88401938c6046f270b1e7f6f763540eb8e538 | [
"Apache-2.0"
] | 2 | 2018-09-04T21:00:36.000Z | 2019-04-03T06:34:26.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import binascii
import json
import logging
import multiprocessing
import os
import random
import resource
import shutil
import signal
import socket
import subprocess
import sys
import threading
import time
from... | 42.779214 | 79 | 0.641004 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.