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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
957390234204d2cc7e8b745122d1f4cd14ea465e | 335 | py | Python | bin/wait_for_postgres.py | interactivemap/interactive-map-backend | 6f5ecf4e186f972bedb6757cc04ac14c0491b65b | [
"MIT"
] | 1 | 2018-03-05T06:41:08.000Z | 2018-03-05T06:41:08.000Z | bin/wait_for_postgres.py | interactivemap/interactive-map-backend | 6f5ecf4e186f972bedb6757cc04ac14c0491b65b | [
"MIT"
] | null | null | null | bin/wait_for_postgres.py | interactivemap/interactive-map-backend | 6f5ecf4e186f972bedb6757cc04ac14c0491b65b | [
"MIT"
] | null | null | null | import time
import sys
import psycopg2
dbname = sys.argv[1]
host = sys.argv[2]
port = int(sys.argv[3])
user = sys.argv[4]
password = sys.argv[5]
while True:
try:
conn = psycopg2.connect(host=host, port=port, dbname=dbname, user=user, password=password)
conn.close()
break
except:
... | 19.705882 | 98 | 0.641791 |
0bea63419a06ecb9ee2bcf81941c43e643e1c3e4 | 7,004 | py | Python | setup/configure_hostapd.py | Mihaylov93/tbng | 0758b02577a2a11d18590f16298fe02ee7279e89 | [
"Unlicense"
] | 34 | 2017-10-10T14:06:24.000Z | 2021-11-15T16:31:15.000Z | setup/configure_hostapd.py | Mihaylov93/tbng | 0758b02577a2a11d18590f16298fe02ee7279e89 | [
"Unlicense"
] | 6 | 2018-03-05T19:05:28.000Z | 2019-12-14T15:26:52.000Z | setup/configure_hostapd.py | Mihaylov93/tbng | 0758b02577a2a11d18590f16298fe02ee7279e89 | [
"Unlicense"
] | 6 | 2017-11-14T17:41:34.000Z | 2022-01-16T12:34:31.000Z | #!/usr/bin/env python3
#
# import modules used here -- sys is a very standard one
import argparse,json
import urllib.request
import tempfile
import gzip
import random
import netifaces as ni
from libtbngsetup import *
#Dictionary for random name/password geneation
Adjectives=[
'perfect','soft','hurt','zonked',
'sp... | 35.917949 | 141 | 0.679897 |
88010a675e55c170caf560427b77fdeb7ff18b6a | 4,013 | py | Python | py_src/yolov4/tflite/__init__.py | lbcsept/tensorflow-yolov4 | 7ec8b2463a45a579b27b0d4439268560440b190e | [
"MIT"
] | 1 | 2021-05-28T16:49:17.000Z | 2021-05-28T16:49:17.000Z | py_src/yolov4/tflite/__init__.py | waltpeng/tensorflow-yolov4 | fd45eea11d2de86664978184e6b798daf2546cdc | [
"MIT"
] | null | null | null | py_src/yolov4/tflite/__init__.py | waltpeng/tensorflow-yolov4 | fd45eea11d2de86664978184e6b798daf2546cdc | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 Hyeonki Hong <hhk7734@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modi... | 34.895652 | 80 | 0.651134 |
9db53d821d86d16c3405034753625c3f44caaa8c | 12,188 | py | Python | torch_collections/models/_retinanet.py | mingruimingrui/torch-collections | f7c20b28b63de76c763983338aa4c825904ef4cd | [
"MIT"
] | 3 | 2018-08-14T19:40:58.000Z | 2018-10-22T15:41:39.000Z | torch_collections/models/_retinanet.py | mingruimingrui/torch-collections | f7c20b28b63de76c763983338aa4c825904ef4cd | [
"MIT"
] | 2 | 2018-08-14T19:40:41.000Z | 2018-10-29T14:46:40.000Z | torch_collections/models/_retinanet.py | mingruimingrui/torch-collections | f7c20b28b63de76c763983338aa4c825904ef4cd | [
"MIT"
] | null | null | null | """ RetinaNet submodules """
import math
import torch
from ..modules import Anchors, ConvBlock2d, DenseBlock2d
from ..losses import DetectionFocalLoss, DetectionSmoothL1Loss
from ..utils import anchors as utils_anchors
def compute_targets(
batch_annotations,
image_shape,
anchors,
num_classes,
r... | 34.922636 | 120 | 0.624138 |
484a7d4efb683b31095d1a0e61a514ae1279ff11 | 575 | py | Python | server/apps/utils/rest/exceptions.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/utils/rest/exceptions.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/utils/rest/exceptions.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | from rest_framework.exceptions import APIException
class ApiIllegalFilterOrTargetException(APIException):
status_code = 400
default_detail = 'Bad Request: Illegal filter/target string'
default_code = 'bad_request'
class ApiIllegalSlugException(APIException):
status_code = 400
default_detail = 'B... | 26.136364 | 74 | 0.766957 |
20273378ee7c76fd73d74298d8ec3936faf2c7de | 6,735 | py | Python | tools/ci/python_packages/ttfw_idf/CIScanTests.py | git4Chub/esp-idf | 39cbf2f7ed4810913031055065da08227020e8b4 | [
"Apache-2.0"
] | 1 | 2021-06-16T04:18:02.000Z | 2021-06-16T04:18:02.000Z | tools/ci/python_packages/ttfw_idf/CIScanTests.py | git4Chub/esp-idf | 39cbf2f7ed4810913031055065da08227020e8b4 | [
"Apache-2.0"
] | null | null | null | tools/ci/python_packages/ttfw_idf/CIScanTests.py | git4Chub/esp-idf | 39cbf2f7ed4810913031055065da08227020e8b4 | [
"Apache-2.0"
] | null | null | null | import argparse
import errno
import json
import logging
import os
from collections import defaultdict
from copy import deepcopy
from find_apps import find_apps
from find_build_apps import BUILD_SYSTEMS, BUILD_SYSTEM_CMAKE
from ttfw_idf.IDFAssignTest import ExampleAssignTest, TestAppsAssignTest
from idf_py_actions.cons... | 37.005495 | 120 | 0.624796 |
67a13907a3594cc419cc74fcfbb781679f3ddf9b | 7,980 | py | Python | instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py | toumorokoshi/opentelemetry-python-contrib | 7159372e3b381119715c99a37603b3d2d6b9ea46 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py | toumorokoshi/opentelemetry-python-contrib | 7159372e3b381119715c99a37603b3d2d6b9ea46 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py | toumorokoshi/opentelemetry-python-contrib | 7159372e3b381119715c99a37603b3d2d6b9ea46 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# 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 ... | 32.839506 | 79 | 0.674436 |
a442c40c058cc7b8d4761158650b82804d3cf1ec | 1,719 | py | Python | desist/eventhandler/eventhandler.py | UvaCsl/desist | 932616447329682f2276d1d4619058fd18b73807 | [
"BSD-3-Clause"
] | null | null | null | desist/eventhandler/eventhandler.py | UvaCsl/desist | 932616447329682f2276d1d4619058fd18b73807 | [
"BSD-3-Clause"
] | null | null | null | desist/eventhandler/eventhandler.py | UvaCsl/desist | 932616447329682f2276d1d4619058fd18b73807 | [
"BSD-3-Clause"
] | null | null | null | """Command-line utility for the eventhandling.
This provides a basic ``click``-based command-line utility that uses a
concrete API of the abstract ``desist.eventhander.api.API`` implementation.
The utility attaches the ``event``, ``example``, and ``test`` commands.
"""
import click
from .api import API
@click.comma... | 28.180328 | 78 | 0.686446 |
79a277910c3f61ce22c0a990b22b93f0b6596264 | 4,240 | py | Python | dort-core/protocols/full_node_protocol.py | Dortchain/dort-blockchian | 14f16e321a60f9d70f849f58e4e9964fa337a084 | [
"Apache-2.0"
] | 1 | 2021-09-05T18:21:09.000Z | 2021-09-05T18:21:09.000Z | dort-core/protocols/full_node_protocol.py | Dortchain/dort-blockchian | 14f16e321a60f9d70f849f58e4e9964fa337a084 | [
"Apache-2.0"
] | 1 | 2021-07-11T03:04:25.000Z | 2021-07-11T03:04:25.000Z | dort-core/protocols/full_node_protocol.py | Dortchain/dort-blockchian | 14f16e321a60f9d70f849f58e4e9964fa337a084 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from typing import List, Optional
from Dort.types.blockchain_format.sized_bytes import bytes32
from Dort.types.blockchain_format.vdf import VDFInfo, VDFProof
from Dort.types.end_of_slot_bundle import EndOfSubSlotBundle
from Dort.types.full_block import FullBlock
from Dort.types.peer_i... | 20.784314 | 116 | 0.788679 |
dd6a637c6721e52ba37a0ab12d09289531306a0c | 183 | py | Python | api_server/__init__.py | CjwRiver/apiAutoTest | 35f1c2475e76dd34089e2cee33b351a1ca97c168 | [
"MIT"
] | null | null | null | api_server/__init__.py | CjwRiver/apiAutoTest | 35f1c2475e76dd34089e2cee33b351a1ca97c168 | [
"MIT"
] | null | null | null | api_server/__init__.py | CjwRiver/apiAutoTest | 35f1c2475e76dd34089e2cee33b351a1ca97c168 | [
"MIT"
] | null | null | null | #!/usr/bin/env/python3
# -*- coding:utf-8 -*-
"""
@project: apiAutoTest
@author: cjw
@file: __init__.py
@ide: PyCharm
@time: 2020/11/20
@desc: 提供一些测试用的api接口,接口代码 请前往FastAPI官网查看学习
"""
| 16.636364 | 42 | 0.688525 |
a3379b1d283c8baac90cab57284b3f9ade4b5cc3 | 1,688 | py | Python | tensorflow_io/audio/python/ops/audio_ops.py | HubBucket-Team/io | de05464e53672389119a6215fea9ceacf7f77203 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:11:23.000Z | 2019-10-10T06:11:23.000Z | tensorflow_io/audio/python/ops/audio_ops.py | VonRosenchild/io | de05464e53672389119a6215fea9ceacf7f77203 | [
"Apache-2.0"
] | null | null | null | tensorflow_io/audio/python/ops/audio_ops.py | VonRosenchild/io | de05464e53672389119a6215fea9ceacf7f77203 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:11:24.000Z | 2019-10-10T06:11:24.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.44898 | 80 | 0.689573 |
c6872aca2ade777b820febc8633a3fb1da68f492 | 771 | py | Python | main3.py | alexandreib/Stock-Trading-Environment | 229a38812fe8d3527fff2b21bb2af3866c316d42 | [
"MIT"
] | null | null | null | main3.py | alexandreib/Stock-Trading-Environment | 229a38812fe8d3527fff2b21bb2af3866c316d42 | [
"MIT"
] | null | null | null | main3.py | alexandreib/Stock-Trading-Environment | 229a38812fe8d3527fff2b21bb2af3866c316d42 | [
"MIT"
] | null | null | null | import gym
import gym_anytrading
from gym_anytrading.envs import TradingEnv, ForexEnv, StocksEnv, Actions, Positions
from gym_anytrading.datasets import FOREX_EURUSD_1H_ASK, STOCKS_GOOGL
import matplotlib.pyplot as plt
from stable_baselines3.common.vec_env import DummyVecEnv
from stable_baselines3 import PPO
env = gy... | 28.555556 | 83 | 0.750973 |
7ee0ca54c9a950547f152af02751f743b6cb7ee8 | 2,228 | py | Python | scripts/rnnlm/get_special_symbol_opts.py | LanceaKing/kaldi | eb205a83f08fb8056ba1deb03c505ec8b722d4d9 | [
"Apache-2.0"
] | 116 | 2016-10-25T06:04:49.000Z | 2022-03-13T02:30:52.000Z | scripts/rnnlm/get_special_symbol_opts.py | LanceaKing/kaldi | eb205a83f08fb8056ba1deb03c505ec8b722d4d9 | [
"Apache-2.0"
] | 8 | 2017-09-06T00:12:00.000Z | 2019-03-22T08:03:19.000Z | scripts/rnnlm/get_special_symbol_opts.py | LanceaKing/kaldi | eb205a83f08fb8056ba1deb03c505ec8b722d4d9 | [
"Apache-2.0"
] | 52 | 2016-04-21T13:38:21.000Z | 2022-02-16T08:33:13.000Z | #!/usr/bin/env python3
# Copyright 2017 Jian Wang
# License: Apache 2.0.
import io
import os
import argparse
import sys
import re
parser = argparse.ArgumentParser(description="This script checks whether the special symbols "
"appear in words.txt with expected values, if not, it w... | 36.52459 | 132 | 0.596499 |
5c95da400786a046bc44ec320932bc5e58b85a06 | 509 | py | Python | scripts/droptables.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | null | null | null | scripts/droptables.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | 25 | 2018-03-25T05:25:22.000Z | 2021-06-10T19:51:12.000Z | scripts/droptables.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | 2 | 2018-07-02T02:59:24.000Z | 2018-08-21T02:58:21.000Z | from authenticationjwt.models import User
from swot.models import Swot
from swot_item.models import SwotItem
from swot_item_vote.models import Vote
from swot_members.models import SwotMember, Invite
print 'deleting all rows in all tables ...'
Invite.objects.all().delete()
SwotMember.objects.all().delete()
Vote.object... | 31.8125 | 83 | 0.785855 |
85d3347d7e6ead270294123e513589d58aa32418 | 728 | py | Python | source/_static/code/optgrowth/solve_model.py | tuttugu-ryo/lecture-source-py | 9ce84044c2cc421775ea63a004556d7ae3b4e504 | [
"BSD-3-Clause"
] | null | null | null | source/_static/code/optgrowth/solve_model.py | tuttugu-ryo/lecture-source-py | 9ce84044c2cc421775ea63a004556d7ae3b4e504 | [
"BSD-3-Clause"
] | null | null | null | source/_static/code/optgrowth/solve_model.py | tuttugu-ryo/lecture-source-py | 9ce84044c2cc421775ea63a004556d7ae3b4e504 | [
"BSD-3-Clause"
] | null | null | null | def solve_model(og,
use_parallel=True,
tol=1e-4,
max_iter=1000,
verbose=True,
print_skip=25):
T, _ = operator_factory(og, parallel_flag=use_parallel)
# Set up loop
v = np.log(og.grid) # Initial condition
i = 0
error =... | 24.266667 | 59 | 0.513736 |
e90349e6313912f64dd6db492520cc98f26a0c2c | 1,790 | py | Python | tranny/notification/email.py | bobbintb/tranny | 9d46c56ff2d878f262e0a24e3dbe6b0926a805aa | [
"BSD-3-Clause"
] | null | null | null | tranny/notification/email.py | bobbintb/tranny | 9d46c56ff2d878f262e0a24e3dbe6b0926a805aa | [
"BSD-3-Clause"
] | null | null | null | tranny/notification/email.py | bobbintb/tranny | 9d46c56ff2d878f262e0a24e3dbe6b0926a805aa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from contextlib import contextmanager
import smtplib
from email.mime.text import MIMEText
from tranny.app import config
from tranny import plugin
from tranny.events import EventHandler, EVENT_NOTIFICATION
_config_key = 'notification_email'
def send_event(event, payload=None):
if payload ... | 26.716418 | 76 | 0.637989 |
36094dbab5bcbbc8059f8602420aa640b73cf352 | 3,219 | py | Python | targets/minispartan6/crg.py | skiphansen/litex-buildenv | a6ea4aa281a79f4ea2a03e89dcfd8bf08819617b | [
"BSD-2-Clause"
] | 198 | 2018-01-17T05:39:54.000Z | 2022-03-15T08:59:16.000Z | targets/minispartan6/crg.py | skiphansen/litex-buildenv | a6ea4aa281a79f4ea2a03e89dcfd8bf08819617b | [
"BSD-2-Clause"
] | 610 | 2017-12-31T01:32:32.000Z | 2022-03-19T22:07:28.000Z | targets/minispartan6/crg.py | skiphansen/litex-buildenv | a6ea4aa281a79f4ea2a03e89dcfd8bf08819617b | [
"BSD-2-Clause"
] | 85 | 2018-01-13T05:51:38.000Z | 2022-02-11T18:54:14.000Z | # Support for the MiniSpartan6+ - https://www.scarabhardware.com/minispartan6/
from fractions import Fraction
from migen import *
from migen.genlib.resetsync import AsyncResetSynchronizer
class _CRG(Module):
def __init__(self, platform, clk_freq):
self.clock_domains.cd_sys = ClockDomain()
self.c... | 55.5 | 101 | 0.508232 |
394305a65e82214ca2b97adcaebb56bb5bddb9a3 | 8,091 | py | Python | index.py | upenderrreddy/Downloder-App | bb33811ede6c9f6b21d3a2d2e031fe37621b1ea9 | [
"MIT"
] | 1 | 2020-07-16T03:58:31.000Z | 2020-07-16T03:58:31.000Z | index.py | upenderrreddy/Downloder-App | bb33811ede6c9f6b21d3a2d2e031fe37621b1ea9 | [
"MIT"
] | null | null | null | index.py | upenderrreddy/Downloder-App | bb33811ede6c9f6b21d3a2d2e031fe37621b1ea9 | [
"MIT"
] | null | null | null | import sys
from urllib import request
import humanize
import pafy
import os
from PyQt5.QtWidgets import QMainWindow, QApplication, QFileDialog, QMessageBox
from PyQt5.uic import loadUiType
ui, _ = loadUiType('main.ui')
class MainApp(QMainWindow, ui):
def __init__(self, parent=None):
super(MainApp, self... | 35.800885 | 139 | 0.636263 |
ee252ce24d9df688c26985206965a9e6322174a0 | 1,538 | py | Python | docs/doc_check/test/test_same-as-file.py | gperrotta/onnx-mlir | 75930ffbcf14cfbaccd8417c47c3598f56342926 | [
"Apache-2.0"
] | 25 | 2019-12-24T09:22:09.000Z | 2021-09-09T17:10:09.000Z | docs/doc_check/test/test_same-as-file.py | gperrotta/onnx-mlir | 75930ffbcf14cfbaccd8417c47c3598f56342926 | [
"Apache-2.0"
] | 69 | 2019-12-24T06:24:38.000Z | 2020-03-16T14:42:53.000Z | docs/doc_check/test/test_same-as-file.py | gperrotta/onnx-mlir | 75930ffbcf14cfbaccd8417c47c3598f56342926 | [
"Apache-2.0"
] | 10 | 2019-12-24T01:41:42.000Z | 2021-09-09T17:11:31.000Z | # ===------- test-same-as-file.py - Test for same-as-file directive -------===//
#
# Copyright 2019-2020 The IBM Research Authors.
#
# =============================================================================
#
# ===----------------------------------------------------------------------===//
import unittest
import ... | 34.177778 | 114 | 0.605982 |
cf9d2a631c6573a152f3cb592f0128ae78c7ce49 | 20,973 | py | Python | venv/lib/python3.6/site-packages/cssutils/tests/test_util.py | Amirh24/monKey-s | 10afccb07dc47c9239de07c5bbcdb95008f5f0e5 | [
"MIT"
] | 53 | 2018-10-02T05:58:54.000Z | 2020-09-15T08:58:26.000Z | venv/Lib/site-packages/cssutils/tests/test_util.py | DoesArt-Studios/RamBrowse | a81da53e04d265d17e76855e7affc11130ee6120 | [
"MIT"
] | 52 | 2018-09-26T05:16:09.000Z | 2022-03-11T23:51:14.000Z | venv/Lib/site-packages/cssutils/tests/test_util.py | DoesArt-Studios/RamBrowse | a81da53e04d265d17e76855e7affc11130ee6120 | [
"MIT"
] | 10 | 2019-03-11T16:35:14.000Z | 2019-10-23T08:03:54.000Z | # -*- coding: utf-8 -*-
"""Testcases for cssutils.util"""
import cgi
from email import message_from_string, message_from_file
import io
import re
import sys
import urllib.request, urllib.error, urllib.parse
import xml.dom
try:
import mock
except ImportError:
mock = None
print("install mock library to run... | 40.962891 | 95 | 0.466886 |
80d1c6b01db44a23fb8b740ed320007517fc1828 | 46 | py | Python | src/models/menu.py | pepell/min_web2py_app | 2a906545f06a1e4152f989b1e12f15af01672a46 | [
"MIT"
] | null | null | null | src/models/menu.py | pepell/min_web2py_app | 2a906545f06a1e4152f989b1e12f15af01672a46 | [
"MIT"
] | null | null | null | src/models/menu.py | pepell/min_web2py_app | 2a906545f06a1e4152f989b1e12f15af01672a46 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
response.title = ''
| 9.2 | 23 | 0.5 |
53abc4dadf613a48680facb22cc27e2f540729b9 | 860 | py | Python | setup.py | trilleplay/fortnite-replay-reader | 55919ae9519737944e4fe197f1759d65d9fd0f51 | [
"MIT"
] | 30 | 2018-11-08T16:33:50.000Z | 2022-03-06T20:52:54.000Z | setup.py | trilleplay/fortnite-replay-reader | 55919ae9519737944e4fe197f1759d65d9fd0f51 | [
"MIT"
] | 20 | 2018-11-22T20:42:32.000Z | 2021-08-07T00:09:39.000Z | setup.py | trilleplay/fortnite-replay-reader | 55919ae9519737944e4fe197f1759d65d9fd0f51 | [
"MIT"
] | 20 | 2018-11-12T22:31:46.000Z | 2022-03-06T20:52:45.000Z | from setuptools import setup
import ray
def readme():
with open('README.md') as f:
return f.read()
setup(name='fortnite-replay-reader',
version=ray.__version__,
description='Parse fortnite .replay files',
long_description=readme(),
long_description_content_type='text/markdown',
... | 26.060606 | 60 | 0.60814 |
dbf54102f431d24d62a40a2df52953c36165e909 | 751 | py | Python | tests/plugins/trackers/tapochek/tapochektracker_helper.py | DmitryRibalka/monitorrent | f329d4bca151360d29e93d5369a1d21268d8998f | [
"WTFPL"
] | 465 | 2015-08-31T09:16:41.000Z | 2022-03-12T10:33:04.000Z | tests/plugins/trackers/tapochek/tapochektracker_helper.py | DmitryRibalka/monitorrent | f329d4bca151360d29e93d5369a1d21268d8998f | [
"WTFPL"
] | 340 | 2015-07-18T17:31:54.000Z | 2022-03-30T15:16:25.000Z | tests/plugins/trackers/tapochek/tapochektracker_helper.py | DmitryRibalka/monitorrent | f329d4bca151360d29e93d5369a1d21268d8998f | [
"WTFPL"
] | 87 | 2015-07-18T10:52:24.000Z | 2022-03-27T09:52:35.000Z | from builtins import object
# coding=utf-8
class TapochekHelper(object):
# real values
real_login = None
real_password = None
real_uid = None
real_bb_data = None
# fake values
fake_login = 'fakelogin'
fake_password = 'p@$$w0rd'
fake_uid = '407039'
fake_bb_data = u'a%3A3%3A%7Bs%... | 32.652174 | 98 | 0.6751 |
c32caa675ef4cffe8a71d833eb88b1d8d70769de | 1,506 | py | Python | applications/adversarial_rl/parse_adv_rl.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-19T11:46:48.000Z | 2021-11-19T11:46:48.000Z | applications/adversarial_rl/parse_adv_rl.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-22T07:48:03.000Z | 2021-11-22T07:48:03.000Z | applications/adversarial_rl/parse_adv_rl.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2022-03-26T10:18:01.000Z | 2022-03-26T10:18:01.000Z | """Parse Adversarial RL experiments."""
import os
import pandas as pd
class Experiment(object):
"""Experiment class to parse."""
def __init__(self, file_name):
splits = file_name[:-5].split("_")
self.environment = splits[0][2:-3]
self.alpha = float(splits[1])
self.agent = spl... | 26.421053 | 72 | 0.598274 |
c0b7bbfe9f083059bca8cfd7f82390cfe017fb85 | 2,453 | py | Python | Conputional_Genonics/Assignment/assignment1/src/indexer.py | infinityglow/Unimelb-CS-Subjects | 07bdb49fd4c50035b7f2e80ca218ac2b620098e4 | [
"MIT"
] | 1 | 2022-02-14T16:31:07.000Z | 2022-02-14T16:31:07.000Z | Conputional_Genonics/Assignment/assignment1/src/indexer.py | hidara2000/Unimelb-CS-Subjects | 07bdb49fd4c50035b7f2e80ca218ac2b620098e4 | [
"MIT"
] | null | null | null | Conputional_Genonics/Assignment/assignment1/src/indexer.py | hidara2000/Unimelb-CS-Subjects | 07bdb49fd4c50035b7f2e80ca218ac2b620098e4 | [
"MIT"
] | 1 | 2021-06-14T11:59:13.000Z | 2021-06-14T11:59:13.000Z | #!usr/lib/python2.7
# Auther : Haonan Li <haonanl5@student.unimelb.edu.au>
# Porpuse : Build a k-mer index for a FASTA reference file
import os
import sys
import getopt
# Read the FASTA reference, build a k-mer dictionary with positions
def get_kmer_dict(ref_file, k):
# Read reference information
ref_fil... | 28.523256 | 79 | 0.561761 |
5cdb28aa68bc5ced7fd1f1339e8128214f2738c4 | 469 | py | Python | ex077.py | pepev123/PythonEx | 8f39751bf87a9099d7b733aa829988595dab2344 | [
"MIT"
] | null | null | null | ex077.py | pepev123/PythonEx | 8f39751bf87a9099d7b733aa829988595dab2344 | [
"MIT"
] | null | null | null | ex077.py | pepev123/PythonEx | 8f39751bf87a9099d7b733aa829988595dab2344 | [
"MIT"
] | null | null | null | a = e = i = o = u = ""
lista = ('pao', 'bacon', 'cenoura', 'mel', 'uva')
for c in range(0, len(lista)):
palavra = lista[c]
if palavra.count('a') > 0:
a = "a"
if palavra.count('e') > 0:
e = "e"
if palavra.count('i') > 0:
i = "i"
if palavra.count('o') > 0:
o = "o"
i... | 27.588235 | 79 | 0.439232 |
55a85439b9416300e9af8bce36822e9494b0a96c | 5,983 | py | Python | tools/remoteserver/robotremoteserverB.py | gdw2/robot-framework | f25068edf1502e76ba8664d4b5ed1aebe0ee2434 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tools/remoteserver/robotremoteserverB.py | gdw2/robot-framework | f25068edf1502e76ba8664d4b5ed1aebe0ee2434 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tools/remoteserver/robotremoteserverB.py | gdw2/robot-framework | f25068edf1502e76ba8664d4b5ed1aebe0ee2434 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2010 Nokia Siemens Networks Oyj
#
# 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... | 35.613095 | 79 | 0.620257 |
f3173cc05bb85762ec2a8f6cb55d8a4b0025dfcb | 1,528 | py | Python | tnmlearn/datasets/dog_cat_dataset.py | t2wain/machine-learning | 4b5e1a24fab7c4ab42f646f7785191ff3d3283ba | [
"MIT"
] | null | null | null | tnmlearn/datasets/dog_cat_dataset.py | t2wain/machine-learning | 4b5e1a24fab7c4ab42f646f7785191ff3d3283ba | [
"MIT"
] | null | null | null | tnmlearn/datasets/dog_cat_dataset.py | t2wain/machine-learning | 4b5e1a24fab7c4ab42f646f7785191ff3d3283ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import zipfile
import tarfile
import os
import re
from tnmlearn.other import paths
def extract_file(filePath, to_directory):
if filePath.endswith('.zip'):
opener, mode = zipfile.ZipFile, 'r'
elif filePath.endswith('.tar.gz') or filePath.endswith('.tgz'):
opener, mode =... | 29.384615 | 80 | 0.639398 |
8353a6a0442ab4863b198da50889478a69bf8c77 | 471 | py | Python | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_armor_mandalorian_helmet.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_armor_mandalorian_helmet.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_armor_mandalorian_helmet.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/clothing/shared_clothing_armor_mandalorian_helmet.iff"
res... | 27.705882 | 97 | 0.740977 |
ed5de3615ac11bcd32477b8711511b6158f658a5 | 6,280 | py | Python | python/led.py | Shyamranny/audio-reactive-led-strip | 8e0cc0ee9737563ea3ad09897b7017da9aa75a16 | [
"MIT"
] | null | null | null | python/led.py | Shyamranny/audio-reactive-led-strip | 8e0cc0ee9737563ea3ad09897b7017da9aa75a16 | [
"MIT"
] | null | null | null | python/led.py | Shyamranny/audio-reactive-led-strip | 8e0cc0ee9737563ea3ad09897b7017da9aa75a16 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
import platform
import numpy as np
import config
# ESP8266 uses WiFi communication
if config.DEVICE == 'esp8266':
import socket
_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Raspberry Pi controls the LED strip directly
elif con... | 35.885714 | 112 | 0.645382 |
fca4787d63d5c744297f12e8eaf44573826eecbb | 1,990 | py | Python | controllers/notes/NewNote.py | heminsatya/free_notes | 88272a34c48e60d1a82e28b0b2d56883fa724bb3 | [
"MIT"
] | null | null | null | controllers/notes/NewNote.py | heminsatya/free_notes | 88272a34c48e60d1a82e28b0b2d56883fa724bb3 | [
"MIT"
] | null | null | null | controllers/notes/NewNote.py | heminsatya/free_notes | 88272a34c48e60d1a82e28b0b2d56883fa724bb3 | [
"MIT"
] | null | null | null | # Dependencies
from aurora import Controller, View, Forms
from models import Users, Notes
from aurora.security import login_required, get_session
from flask import request
from datetime import datetime
# The controller class
class NewNote(Controller):
# POST Method
@login_required(app='users')
def post(se... | 29.264706 | 105 | 0.529648 |
847463f3dfa7a0310a42f9aa0f1b7e033b2cbd6b | 3,387 | bzl | Python | project/workspace_defs.bzl | googleinterns/dagger-query | 3c5fa44e1cb66f2369929e64920fc765af59fb11 | [
"Apache-2.0"
] | 4 | 2020-07-22T13:03:39.000Z | 2021-09-14T11:38:41.000Z | project/workspace_defs.bzl | googleinterns/dagger-query | 3c5fa44e1cb66f2369929e64920fc765af59fb11 | [
"Apache-2.0"
] | 17 | 2020-07-30T13:15:38.000Z | 2020-09-25T12:45:30.000Z | project/workspace_defs.bzl | googleinterns/dagger-query | 3c5fa44e1cb66f2369929e64920fc765af59fb11 | [
"Apache-2.0"
] | 1 | 2020-07-14T10:00:32.000Z | 2020-07-14T10:00:32.000Z | # Copyright (C) 2018 The Google Bazel Common Authors.
#
# 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... | 35.28125 | 100 | 0.678477 |
b294393fd551ddde417f5681caa78fb5ec91cd71 | 312 | py | Python | snippets - machine learning sklearn/evaluating-classification-metrics.py | bjfisica/MachineLearning | 20349301ae7f82cd5048410b0cf1f7a5f7d7e5a2 | [
"MIT"
] | 52 | 2019-02-15T16:37:13.000Z | 2022-02-17T18:34:30.000Z | snippets - machine learning sklearn/evaluating-classification-metrics.py | RodeoBlues/Complete-Data-Science-Toolkits | c5e83889e24af825ec3baed6e8198debb135f1ff | [
"MIT"
] | null | null | null | snippets - machine learning sklearn/evaluating-classification-metrics.py | RodeoBlues/Complete-Data-Science-Toolkits | c5e83889e24af825ec3baed6e8198debb135f1ff | [
"MIT"
] | 22 | 2019-02-25T23:52:09.000Z | 2021-09-21T03:09:35.000Z | #accuracy score
from sklearn.metrics import accuracy_score
accuracy_score(y_test, y_pred)
#classification report
from sklearn.metrics import classification_report
print(classification_report(y_test, y_pred))
#confusion matrix
from sklearn.metrics import confusion_matrix
print(confusion_matrix(y_test, y_pred)) | 28.363636 | 49 | 0.858974 |
a105b88723330ddc75ba26c37c6a449d4c4a6599 | 358 | bzl | Python | bazel/data_view_cc.bzl | chokobole/data_view | db482b10dce44e4a775d45835ed689c77bc440ea | [
"BSD-3-Clause"
] | 2 | 2019-12-28T05:49:07.000Z | 2021-05-09T10:05:12.000Z | bazel/data_view_cc.bzl | chokobole/data_view | db482b10dce44e4a775d45835ed689c77bc440ea | [
"BSD-3-Clause"
] | null | null | null | bazel/data_view_cc.bzl | chokobole/data_view | db482b10dce44e4a775d45835ed689c77bc440ea | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019 The DataView Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def data_view_copts():
return select({
"@data_view//:windows": [
"/std:c++14",
],
"//conditions:default": [
... | 27.538462 | 72 | 0.561453 |
da04cab5bb973f2d8f5fe582c00bcb80b1d9be65 | 293 | py | Python | main.py | YunzheZJU/CardinalSpline | bb54251a8c4558baec0b467b36313247d463071f | [
"MIT"
] | null | null | null | main.py | YunzheZJU/CardinalSpline | bb54251a8c4558baec0b467b36313247d463071f | [
"MIT"
] | null | null | null | main.py | YunzheZJU/CardinalSpline | bb54251a8c4558baec0b467b36313247d463071f | [
"MIT"
] | 1 | 2021-02-21T00:46:05.000Z | 2021-02-21T00:46:05.000Z | # -*- coding: utf-8 -*-
from flask import Flask, request, session, g, redirect, url_for, abort, render_template
app = Flask(__name__)
@app.route('/', methods=['GET'])
def demo():
return render_template('Spline.html')
if __name__ == '__main__':
app.run(host='127.0.0.1', port=8080)
| 22.538462 | 87 | 0.662116 |
a8672fff0ecdf0b91231b34ba6ebfcc3ec4448b1 | 6,761 | py | Python | graphzoo/manifolds/hyperboloid.py | oom-debugger/GraphZoo-1 | 7ef1184c0016090597e56b8706a87539a3f62fd6 | [
"MIT"
] | 2 | 2022-03-30T01:11:39.000Z | 2022-03-30T11:08:12.000Z | graphzoo/manifolds/hyperboloid.py | oom-debugger/GraphZoo-1 | 7ef1184c0016090597e56b8706a87539a3f62fd6 | [
"MIT"
] | null | null | null | graphzoo/manifolds/hyperboloid.py | oom-debugger/GraphZoo-1 | 7ef1184c0016090597e56b8706a87539a3f62fd6 | [
"MIT"
] | 2 | 2022-01-27T21:03:40.000Z | 2022-03-15T20:20:12.000Z | """Hyperboloid manifold"""
import torch
from graphzoo.manifolds.base import Manifold
from graphzoo.utils.math_utils import arcosh, cosh, sinh
from graphzoo.utils.train_utils import broadcast_shapes
from graphzoo.manifolds.poincare import PoincareBall
class Hyperboloid(Manifold):
"""
Hyperboloid manifold class... | 35.584211 | 135 | 0.536903 |
25f96612a7c806c1083eef1b2122623c706f4abe | 419 | py | Python | ex7.py | cohadar/learn-python-the-hard-way | 10d88fe59a8abc5303661cfe91c6db9fa71bdd56 | [
"MIT"
] | null | null | null | ex7.py | cohadar/learn-python-the-hard-way | 10d88fe59a8abc5303661cfe91c6db9fa71bdd56 | [
"MIT"
] | null | null | null | ex7.py | cohadar/learn-python-the-hard-way | 10d88fe59a8abc5303661cfe91c6db9fa71bdd56 | [
"MIT"
] | null | null | null | print "Oh I disagree, I shall skip some"
print "But not all"
print "XY" * 10 # seems nice but might be used once in 5 years
end1 = "C"
end2 = "h"
end3 = "e"
end4 = "e"
end5 = "s"
end6 = "e"
end7 = "B"
end8 = "u"
end9 = "r"
endA = "g"
endB = "e"
endC = "r"
# comma at the end, seriously how many obscure syntax do we n... | 17.458333 | 64 | 0.610979 |
001dbcb1c37db3dea65d883cc149943ca9543c10 | 657 | py | Python | tests/core/dataset/test_history.py | UCSFMemoryAndAging/macpie | 524ffe47c2270ef52299a893c6d28a9c21d96903 | [
"BSD-2-Clause"
] | null | null | null | tests/core/dataset/test_history.py | UCSFMemoryAndAging/macpie | 524ffe47c2270ef52299a893c6d28a9c21d96903 | [
"BSD-2-Clause"
] | null | null | null | tests/core/dataset/test_history.py | UCSFMemoryAndAging/macpie | 524ffe47c2270ef52299a893c6d28a9c21d96903 | [
"BSD-2-Clause"
] | null | null | null | from pathlib import Path
from macpie.core.dataset import LavaDataset
current_dir = Path(__file__).parent.absolute()
def test_history():
primary = LavaDataset.from_file(current_dir / "primary.xlsx")
secondary = LavaDataset.from_file(current_dir / "secondary.xlsx")
secondary.date_proximity(
prim... | 22.655172 | 69 | 0.69102 |
ad6b0a1bf1d60bf263f1275c90f1260def6bac6d | 1,352 | py | Python | gunicorn_conf.py | albert-lii/myzone | 401acb84320b717e59860d95ad4aa4742b762158 | [
"MIT"
] | null | null | null | gunicorn_conf.py | albert-lii/myzone | 401acb84320b717e59860d95ad4aa4742b762158 | [
"MIT"
] | 1 | 2021-03-31T19:51:33.000Z | 2021-03-31T19:51:33.000Z | gunicorn_conf.py | albert-lii/myzone | 401acb84320b717e59860d95ad4aa4742b762158 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
:author: Albert Li
:copyright: © 2019 Albert Li
:time: 2019/10/26 10:13
"""
import os
import multiprocessing
path_of_current_file = os.path.abspath(__file__) # 获取当前该配置文件的绝对路径
path_of_current_dir = os.path.split(path_of_current_file)[0]
chdir = path_of_current_dir # 项目的根目录,加载应用... | 36.540541 | 83 | 0.724852 |
61a55261d7ae187a4926773ca0b7ffd5df1ba5cb | 4,115 | py | Python | arcesetc/tests/test_utils.py | bmorris3/arcesetc | 514504715ba7a1dad59cc54cf89f649d8ff10718 | [
"MIT",
"BSD-3-Clause"
] | 3 | 2019-03-27T20:00:42.000Z | 2021-12-17T20:59:33.000Z | arcesetc/tests/test_utils.py | bmorris3/arcesetc | 514504715ba7a1dad59cc54cf89f649d8ff10718 | [
"MIT",
"BSD-3-Clause"
] | 10 | 2018-12-21T19:18:40.000Z | 2020-10-29T19:52:08.000Z | arcesetc/tests/test_utils.py | bmorris3/arcesetc | 514504715ba7a1dad59cc54cf89f649d8ff10718 | [
"MIT",
"BSD-3-Clause"
] | 2 | 2019-01-31T20:08:14.000Z | 2019-01-31T20:22:09.000Z | import os
import astropy.units as u
import numpy as np
import pytest
from astropy.io import fits
from .legacy_specutils import readspec
from ..util import (reconstruct_order, closest_sptype, archive, scale_flux,
signal_to_noise_to_exp_time)
path = os.path.dirname(__file__)
@pytest.mark.parametr... | 36.415929 | 87 | 0.595383 |
995bab68ecd55cef5b28aa2efd3fc2c8737ec48d | 1,014 | py | Python | openwater/tests/test_split.py | flowmatters/openwater | 8c48fc1694f54c2735a7ac451fcce56df498e520 | [
"MIT"
] | 1 | 2020-02-12T11:17:02.000Z | 2020-02-12T11:17:02.000Z | openwater/tests/test_split.py | flowmatters/openwater | 8c48fc1694f54c2735a7ac451fcce56df498e520 | [
"MIT"
] | null | null | null | openwater/tests/test_split.py | flowmatters/openwater | 8c48fc1694f54c2735a7ac451fcce56df498e520 | [
"MIT"
] | 1 | 2020-02-27T13:58:14.000Z | 2020-02-27T13:58:14.000Z |
from openwater.split import split_time_series
import numpy as np
def test_create_split_windows():
grp = {
'DummyModel':{
'inputs':np.zeros((1,1,10000))
}
}
BREAKS = [
[100,1000,5000],
[0,100,1000,5000],
[100,1000,5000,10000],
[0,100,1000,5000,1... | 22.043478 | 50 | 0.545365 |
bd59c0e033868b8a13a407ea787bbb9a65ce1431 | 15,570 | py | Python | oscar_ecomenv/Scripts/pildriver.py | PamilerinId/Ecommerce-Boiler | 1d706f88c8c828e86309793cb33ea102f385bf2f | [
"Apache-2.0"
] | null | null | null | oscar_ecomenv/Scripts/pildriver.py | PamilerinId/Ecommerce-Boiler | 1d706f88c8c828e86309793cb33ea102f385bf2f | [
"Apache-2.0"
] | null | null | null | oscar_ecomenv/Scripts/pildriver.py | PamilerinId/Ecommerce-Boiler | 1d706f88c8c828e86309793cb33ea102f385bf2f | [
"Apache-2.0"
] | null | null | null | #!c:\users\pi\documents\batcave\web\ecommerce\oscar_ecomenv\scripts\python.exe
"""PILdriver, an image-processing calculator using PIL.
An instance of class PILDriver is essentially a software stack machine
(Polish-notation interpreter) for sequencing PIL image
transformations. The state of the instance is the interpr... | 29.544592 | 79 | 0.5921 |
f271ecd28a210a5c9907ba23fd82a1d3179c1279 | 9,852 | py | Python | farm/modeling/tokenization.py | Yakonick/KONVENS2019_and_LREC2020 | c0c5afa00d37a6e90bc5674378b908afd6aa286d | [
"Apache-2.0"
] | 4 | 2020-07-22T02:22:52.000Z | 2021-12-27T22:26:37.000Z | farm/modeling/tokenization.py | cgsee1/FARM | afdb91a4a182faa110e7bb82fd93745ea0621d10 | [
"Apache-2.0"
] | null | null | null | farm/modeling/tokenization.py | cgsee1/FARM | afdb91a4a182faa110e7bb82fd93745ea0621d10 | [
"Apache-2.0"
] | 1 | 2021-04-07T19:30:02.000Z | 2021-04-07T19:30:02.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | 42.649351 | 207 | 0.624137 |
f6f852adfcdcbd6b2ff30fffcd2b981e549c1f5b | 7,976 | py | Python | jishaku/features/root_command.py | Dorukyum/jishaku | 8d62bfe6bbd8945ce96cb80613c979413e7c9ad7 | [
"MIT"
] | null | null | null | jishaku/features/root_command.py | Dorukyum/jishaku | 8d62bfe6bbd8945ce96cb80613c979413e7c9ad7 | [
"MIT"
] | null | null | null | jishaku/features/root_command.py | Dorukyum/jishaku | 8d62bfe6bbd8945ce96cb80613c979413e7c9ad7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jishaku.features.root_command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The jishaku root command.
:copyright: (c) 2021 Devon (Gorialis) R
:license: MIT, see LICENSE for more details.
"""
import math
import sys
import typing
import discord
from discord.ext import commands
from jishaku.features.ba... | 34.678261 | 132 | 0.568079 |
21397b518ac2a288c7f6d09c8bf80755c105536e | 88,744 | py | Python | tests/tensor/test_blas.py | ionuttamas/Theano-PyMC | b666bdbb35aec21ac83936bfc91c573ef5ccf741 | [
"BSD-3-Clause"
] | null | null | null | tests/tensor/test_blas.py | ionuttamas/Theano-PyMC | b666bdbb35aec21ac83936bfc91c573ef5ccf741 | [
"BSD-3-Clause"
] | null | null | null | tests/tensor/test_blas.py | ionuttamas/Theano-PyMC | b666bdbb35aec21ac83936bfc91c573ef5ccf741 | [
"BSD-3-Clause"
] | null | null | null | from copy import copy
from itertools import product
import numpy as np
import pytest
from numpy import (
arange,
array,
common_type,
complex64,
complex128,
float32,
float64,
newaxis,
shape,
transpose,
zeros,
)
from numpy.testing import assert_array_almost_equal
import thean... | 35.943297 | 89 | 0.525365 |
7f943af1f38b47d5e26b9cffcd23ec803a3fa083 | 11,325 | py | Python | daal4py/sklearn/cluster/k_means.py | Surfndez/daal4py | f0dfd8684e45bf298a61ca9efb0cea8314952b3f | [
"Apache-2.0"
] | 1 | 2020-06-07T23:23:25.000Z | 2020-06-07T23:23:25.000Z | daal4py/sklearn/cluster/k_means.py | masdevas/daal4py | 8530377aac4c629102f9cad62a569f18d33e4458 | [
"Apache-2.0"
] | 1 | 2021-01-21T12:13:36.000Z | 2021-01-21T12:13:36.000Z | daal4py/sklearn/cluster/k_means.py | masdevas/daal4py | 8530377aac4c629102f9cad62a569f18d33e4458 | [
"Apache-2.0"
] | null | null | null | #
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | 40.446429 | 131 | 0.664371 |
56c93daf82647235685fde6d9502de3c44bedb5b | 451 | py | Python | ads_maker/admin.py | abi83/kromm.info | cbdc91627ba4afb6151109668d8b05fea93f3dc3 | [
"MIT"
] | null | null | null | ads_maker/admin.py | abi83/kromm.info | cbdc91627ba4afb6151109668d8b05fea93f3dc3 | [
"MIT"
] | null | null | null | ads_maker/admin.py | abi83/kromm.info | cbdc91627ba4afb6151109668d8b05fea93f3dc3 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import WSite, SiteMap
class SiteAdmin(admin.ModelAdmin):
list_display = ('pk', 'url', 'created_at',)
search_fields = ('url',)
list_filter = ('created_at',)
class SiteMapAdmin(admin.ModelAdmin):
list_display = ('pk', 'url', 'created_at', 'site',)
sear... | 25.055556 | 55 | 0.687361 |
f294e7077213c17678b46cb42431baa45305c6c5 | 9,192 | py | Python | tensorflow_quantum/python/differentiators/linear_combination_test.py | dlyongemallo/tensorflow-quantum | 22cf3058ae5bfb4f0ca7ed70cb691bd7be650e61 | [
"Apache-2.0"
] | 1 | 2020-03-10T04:12:46.000Z | 2020-03-10T04:12:46.000Z | tensorflow_quantum/python/differentiators/linear_combination_test.py | dlyongemallo/tensorflow-quantum | 22cf3058ae5bfb4f0ca7ed70cb691bd7be650e61 | [
"Apache-2.0"
] | null | null | null | tensorflow_quantum/python/differentiators/linear_combination_test.py | dlyongemallo/tensorflow-quantum | 22cf3058ae5bfb4f0ca7ed70cb691bd7be650e61 | [
"Apache-2.0"
] | 1 | 2020-03-12T07:19:12.000Z | 2020-03-12T07:19:12.000Z | # Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 46.659898 | 80 | 0.625109 |
a3c76ab901a039027611b0843f414a5a3c72f748 | 1,334 | py | Python | jdcloud_sdk/services/waf/models/ListRiskCommonReq.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/waf/models/ListRiskCommonReq.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/waf/models/ListRiskCommonReq.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 35.105263 | 104 | 0.697151 |
b0ab08f7e799fd2fff48cd2e303a8153d5b63d0e | 2,899 | py | Python | images_to_video.py | ZekeMedley/joy-divisions-cover-generation | a69ba13a737f11dc83aef9e3bad97d8f5c776725 | [
"MIT"
] | 3 | 2018-07-28T22:11:20.000Z | 2019-09-10T17:50:44.000Z | images_to_video.py | ZekeMedley/joy-divisions-cover-generation | a69ba13a737f11dc83aef9e3bad97d8f5c776725 | [
"MIT"
] | null | null | null | images_to_video.py | ZekeMedley/joy-divisions-cover-generation | a69ba13a737f11dc83aef9e3bad97d8f5c776725 | [
"MIT"
] | null | null | null | # take filenames and output filename
def images_to_video(filenames, output, fps):
'''
builds a video from a list of images
IN: list of filenames for images, where to output, , frames per second
OUT: filename for output video
'''
from cv2 import VideoWriter, VideoWriter_fourcc, imread, destroyAll... | 30.840426 | 80 | 0.64229 |
2f0e7553d0d72552b3a6210e5e6f31bc44ceb14c | 1,299 | py | Python | SummaryRanges.py | pravindra01/DS_And_AlgorithmsPractice | 1f6a1c7d206676d0e1ffcd77b64c4732ec7763d8 | [
"MIT"
] | null | null | null | SummaryRanges.py | pravindra01/DS_And_AlgorithmsPractice | 1f6a1c7d206676d0e1ffcd77b64c4732ec7763d8 | [
"MIT"
] | null | null | null | SummaryRanges.py | pravindra01/DS_And_AlgorithmsPractice | 1f6a1c7d206676d0e1ffcd77b64c4732ec7763d8 | [
"MIT"
] | null | null | null | class Solution(object):
def summaryRanges(self, nums):
"""
:type nums: List[int]
:rtype: List[str]
"""
if (len(nums) == 0):
return []
incrementCounter = nums[0]
retList = []
add = True
lindex = 0
for i in range(0, len(nums))... | 31.682927 | 62 | 0.428022 |
7db4a009b5b82182e1cddae25b3e1302482ae9a5 | 1,385 | py | Python | nlabot/stickers.py | maremun/nlabot | f28e93ff6b3a16a22f28aad2054b2b7364e39b60 | [
"MIT"
] | 7 | 2017-11-02T21:33:23.000Z | 2018-10-26T11:37:54.000Z | nlabot/stickers.py | maremun/nlabot | f28e93ff6b3a16a22f28aad2054b2b7364e39b60 | [
"MIT"
] | 3 | 2017-11-12T10:58:36.000Z | 2017-11-26T10:47:05.000Z | nlabot/stickers.py | maremun/nlabot | f28e93ff6b3a16a22f28aad2054b2b7364e39b60 | [
"MIT"
] | null | null | null | # encoding: utf-8
# stickers.py
from random import randint
# TODO: use getStickers to get sticker pack with ids
SUCCESS = ['CAADBAAD0gIAAlI5kwbFm0b9e6ezGQI',
'CAADAgAD4QADNuwbBW5uM6aRdOCbAg',
'CAADBAADuAMAAlI5kwbThupzSIc0CQI',
'CAADAgADdAcAAlOx9wP2aGQDAAEeKfQC',
'CAADBQ... | 44.677419 | 79 | 0.760289 |
5be48407e02bac96946526e1bf9bcc05e9788447 | 3,379 | py | Python | tests/test_background_poke.py | standanley/fault | 7418103744e3ec5b5d142e0a152f08b7feef6a1e | [
"BSD-3-Clause"
] | null | null | null | tests/test_background_poke.py | standanley/fault | 7418103744e3ec5b5d142e0a152f08b7feef6a1e | [
"BSD-3-Clause"
] | null | null | null | tests/test_background_poke.py | standanley/fault | 7418103744e3ec5b5d142e0a152f08b7feef6a1e | [
"BSD-3-Clause"
] | null | null | null | import magma as m
import fault
import tempfile
import pytest
from pathlib import Path
from .common import pytest_sim_params, TestBasicCircuit
def plot(xs, ys):
import matplotlib.pyplot as plt
plt.plot(xs, ys, '*')
plt.grid()
plt.show()
def pytest_generate_tests(metafunc):
#pytest_sim_params(metafu... | 25.216418 | 80 | 0.603137 |
276463d984ce35042c314d5d665d37a55639fe39 | 3,414 | py | Python | xos/tosca/tests/servicetest.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/tosca/tests/servicetest.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | 5 | 2020-06-05T17:47:15.000Z | 2021-09-23T23:21:27.000Z | xos/tosca/tests/servicetest.py | pan2za/xos | c2a4da2ccaa12360b2718be303b247866aefdfe6 | [
"Apache-2.0"
] | null | null | null | from basetest import BaseToscaTest
from core.models import Service
class ServiceTest(BaseToscaTest):
tests = ["create_service_minimal",
"create_service_notpublished",
"create_service_notenabled",
"create_service_public_key",
"update_service_notpublished",
... | 45.52 | 111 | 0.618922 |
44016960a958fd779052b1d67b817962f3609f1c | 7,520 | py | Python | main.py | Techget/gail-tf-sc2 | b10ad198b6f3b91b1281a2a35ed0635a56c6cf8d | [
"MIT"
] | 10 | 2018-04-14T14:16:32.000Z | 2022-02-21T05:46:56.000Z | main.py | Techget/gail-tf-sc2 | b10ad198b6f3b91b1281a2a35ed0635a56c6cf8d | [
"MIT"
] | null | null | null | main.py | Techget/gail-tf-sc2 | b10ad198b6f3b91b1281a2a35ed0635a56c6cf8d | [
"MIT"
] | 1 | 2019-08-20T14:34:04.000Z | 2019-08-20T14:34:04.000Z | import argparse
from gailtf.baselines.common import set_global_seeds, tf_util as U
import gym, logging, sys
from gailtf.baselines import bench
import os.path as osp
from gailtf.baselines import logger
from gailtf.dataset.mujoco import Mujoco_Dset
from gailtf.dataset.sc2_dataset import SC2Dataset
import numpy as np
impo... | 49.801325 | 135 | 0.685106 |
6b0dd46d6e0ac8d9a46f1a883d0a90e3f20d43fc | 1,207 | py | Python | QRSMS/faculty_portal/models.py | Srishti-Ahuja/QRSMS-V1 | 1f2fa82e8ddaeb62e633fcd6a136696355317bba | [
"Apache-2.0"
] | 4 | 2020-06-16T09:42:20.000Z | 2021-11-24T08:18:16.000Z | QRSMS/faculty_portal/models.py | Srishti-Ahuja/QRSMS-V1 | 1f2fa82e8ddaeb62e633fcd6a136696355317bba | [
"Apache-2.0"
] | 7 | 2021-04-08T21:57:34.000Z | 2022-02-27T06:41:15.000Z | QRSMS/faculty_portal/models.py | Srishti-Ahuja/QRSMS-V1 | 1f2fa82e8ddaeb62e633fcd6a136696355317bba | [
"Apache-2.0"
] | 7 | 2020-11-29T09:45:44.000Z | 2022-03-30T15:27:33.000Z | from django.db import models
from django.core.validators import RegexValidator, ValidationError
from django.urls import reverse
from actor.models import User
from django.contrib.auth.models import Group
# Create your models here.
class Faculty(models.Model):
user = models.OneToOneField('actor.User', on_delete=mod... | 28.738095 | 85 | 0.636288 |
cfe262b1f22fefb84be53804a52523c6e115fe25 | 1,533 | py | Python | structlog_wrapper/django/celery/steps.py | ankitkr/structlog-wrapper | bc085937656ef6aec5f485d95c9d761f4a3c0299 | [
"MIT"
] | null | null | null | structlog_wrapper/django/celery/steps.py | ankitkr/structlog-wrapper | bc085937656ef6aec5f485d95c9d761f4a3c0299 | [
"MIT"
] | null | null | null | structlog_wrapper/django/celery/steps.py | ankitkr/structlog-wrapper | bc085937656ef6aec5f485d95c9d761f4a3c0299 | [
"MIT"
] | null | null | null | from celery import bootsteps
from . import receivers
class DjangoStructLogInitStep(bootsteps.Step):
"""``celery`` worker boot step to initialize ``django_structlog``.
>>> from celery import Celery
>>> from structlog_wrapper.django.celery.steps import DjangoStructLogInitStep
>>>
>>> app = Celery(... | 34.066667 | 81 | 0.688845 |
fc60ffa7ad9e05c303a7b2aa731d0ab35ac594c1 | 5,740 | py | Python | src/diamond/handler/mqtt.py | hermdog/Diamond | 0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 | [
"MIT"
] | 1,795 | 2015-01-05T11:14:55.000Z | 2022-03-25T12:07:15.000Z | src/diamond/handler/mqtt.py | hermdog/Diamond | 0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 | [
"MIT"
] | 671 | 2015-01-02T05:57:27.000Z | 2022-03-29T22:39:05.000Z | src/diamond/handler/mqtt.py | hermdog/Diamond | 0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 | [
"MIT"
] | 793 | 2015-01-03T01:39:02.000Z | 2022-02-18T05:12:27.000Z | # coding=utf-8
"""
Send metrics to an MQTT broker.
### Dependencies
* [mosquitto](http://mosquitto.org/documentation/python/)
* Python `ssl` module (and Python >= 2.7)
In order for this to do something useful, you'll need an
MQTT broker (e.g. [mosquitto](http://mosquitto.org) and
a `diamond.conf` containing somethi... | 28.7 | 78 | 0.577003 |
f19eac5d24f039746bc864fcd0bb9bc35dc8c683 | 23,690 | py | Python | apps/oozie/src/oozie/old_migrations/0006_auto__chg_field_java_files__chg_field_java_archives__chg_field_sqoop_f.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | apps/oozie/src/oozie/old_migrations/0006_auto__chg_field_java_files__chg_field_java_archives__chg_field_sqoop_f.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | apps/oozie/src/oozie/old_migrations/0006_auto__chg_field_java_files__chg_field_java_archives__chg_field_sqoop_f.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Java.files'
db.alter_column('oozie_java', 'files', self.gf('django.db.models.fields.TextField')(... | 70.928144 | 206 | 0.56336 |
0991fd30d8045d6a0ce16e6ff1eede5019e3cc0a | 4,388 | py | Python | library/views.py | xpokers/AiOps | 40eb6d8ef93d35a79df23dabb88fc034e1ce975c | [
"Apache-2.0"
] | null | null | null | library/views.py | xpokers/AiOps | 40eb6d8ef93d35a79df23dabb88fc034e1ce975c | [
"Apache-2.0"
] | 4 | 2021-04-07T23:18:56.000Z | 2021-09-23T23:22:47.000Z | library/views.py | xpokers/CMDB | 6c402dcf30bfd74453a5efaa8d0de69d938632b9 | [
"Apache-2.0"
] | null | null | null |
from django.shortcuts import render, redirect, HttpResponse, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from library.models import librarys
from .form import LibrarysForm
import json
from django.contrib.auth.models import User,... | 29.648649 | 109 | 0.660665 |
a9e2461f464b19702bfad38fdab6994629be3ad9 | 2,124 | py | Python | graph-algorithms/seminary/parse.py | vampy/university | 9496cb63594dcf1cc2cec8650b8eee603f85fdab | [
"MIT"
] | 6 | 2015-06-22T19:43:13.000Z | 2019-07-15T18:08:41.000Z | graph-algorithms/seminary/parse.py | vampy/university | 9496cb63594dcf1cc2cec8650b8eee603f85fdab | [
"MIT"
] | null | null | null | graph-algorithms/seminary/parse.py | vampy/university | 9496cb63594dcf1cc2cec8650b8eee603f85fdab | [
"MIT"
] | 1 | 2015-09-26T09:01:54.000Z | 2015-09-26T09:01:54.000Z | import graph
def dfsIter(g, s, prev, tree):
tree[s] = []
q = [s]
visited = set()
visited.add(s)
while len(q) > 0:
x = q[-1]
q = q[: -1]
# print x
for y in g.parseNout(x):
if y not in visited:
visited.add(y)
q.append(y)
... | 19.486239 | 60 | 0.484934 |
4063390b6be5e45ec60a374b850904ab435daec3 | 1,047 | py | Python | osmnx/globals.py | tanvim/test | 3fc7deab27a33183e49e7868aac361a650727ff3 | [
"MIT"
] | null | null | null | osmnx/globals.py | tanvim/test | 3fc7deab27a33183e49e7868aac361a650727ff3 | [
"MIT"
] | null | null | null | osmnx/globals.py | tanvim/test | 3fc7deab27a33183e49e7868aac361a650727ff3 | [
"MIT"
] | null | null | null | ###################################################################################################
# Module: globals.py
# Description: Global defaults, can be configured by user by passing values to utils.config()
# License: MIT, see full license in LICENSE.txt
# Web: https://github.com/gboeing/osmnx
#################... | 33.774194 | 158 | 0.586437 |
307b2543c4a49ebc1f8ed2471787af9d2e4a9052 | 5,878 | py | Python | fn_ldap_utilities/tests/test_ldap_search.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2020-08-25T03:43:07.000Z | 2020-08-25T03:43:07.000Z | fn_ldap_utilities/tests/test_ldap_search.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2019-07-08T16:57:48.000Z | 2019-07-08T16:57:48.000Z | fn_ldap_utilities/tests/test_ldap_search.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
"""Tests using pytest_resilient_circuits"""
from __future__ import print_function
import functools
import pytest
from helper import TestingHelper, get_mock_config_data
from mock import patch
from resilient_circuits.util import get_config_data... | 43.540741 | 213 | 0.691222 |
ea27d515298484c83dd39e8af7b9341ae0074dcf | 936 | py | Python | setup.py | derlih/async-fsm | 1a9b25a7fe2373e221a38c1c78d2ea2707c9206a | [
"MIT"
] | 1 | 2021-02-04T10:50:18.000Z | 2021-02-04T10:50:18.000Z | setup.py | derlih/async-fsm | 1a9b25a7fe2373e221a38c1c78d2ea2707c9206a | [
"MIT"
] | null | null | null | setup.py | derlih/async-fsm | 1a9b25a7fe2373e221a38c1c78d2ea2707c9206a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(name='async-fsm',
version='0.1',
description='Python FSM implementation that supports asyncio',
author='Dmitry Erlikh',
author_email='derlih@gmail.com',
url='https://github.com/derlih/async-fsm',
packages=['async_fsm'],
... | 34.666667 | 68 | 0.584402 |
07fa4ae26074bad4578ccdcf7900c822d207ef13 | 2,645 | py | Python | src/mysite/urls.py | shubhampcvn/django_blog_app | c6885504abe53dd19c7bd386daa1f26e37685351 | [
"MIT"
] | null | null | null | src/mysite/urls.py | shubhampcvn/django_blog_app | c6885504abe53dd19c7bd386daa1f26e37685351 | [
"MIT"
] | null | null | null | src/mysite/urls.py | shubhampcvn/django_blog_app | c6885504abe53dd19c7bd386daa1f26e37685351 | [
"MIT"
] | null | null | null | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 44.083333 | 118 | 0.732325 |
d734f5a849e22e6f35699c81977cfbdab1246dd1 | 490 | py | Python | dealscore/urls.py | lh15/dealscore_django | 0f17cc5c399d28d89ea1db9b4f978515d8f29334 | [
"MIT"
] | null | null | null | dealscore/urls.py | lh15/dealscore_django | 0f17cc5c399d28d89ea1db9b4f978515d8f29334 | [
"MIT"
] | 3 | 2021-03-19T11:32:01.000Z | 2022-02-10T11:43:56.000Z | dealscore/urls.py | lh15/dealscore_django | 0f17cc5c399d28d89ea1db9b4f978515d8f29334 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('users/', include('django.contrib.auth.urls')),
path('accounts/', include('allauth.urls')),
path('', include('pages.urls')),
path('engine/', ... | 27.222222 | 56 | 0.677551 |
917aa7a412823a22cbd703f51d5b109f0987e5c8 | 4,344 | py | Python | benchmark/startQiskit_noisy2852.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy2852.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy2852.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=42
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 35.032258 | 140 | 0.655387 |
f9e82998a166cbf4ae8b90555296c1c29873aaf0 | 1,336 | py | Python | NodeCore/Sockets/OutSocket.py | FaderKing/NodeEditor | 37e5d193ff08c834ba5e901af20a48fa2adfe133 | [
"BSD-2-Clause"
] | 4 | 2020-03-15T08:13:46.000Z | 2021-06-19T02:33:35.000Z | NodeCore/Sockets/OutSocket.py | bloomv/NodeEditor | e1bfb3d77cc5fbb409dca0ee14a5779255377c33 | [
"BSD-2-Clause"
] | null | null | null | NodeCore/Sockets/OutSocket.py | bloomv/NodeEditor | e1bfb3d77cc5fbb409dca0ee14a5779255377c33 | [
"BSD-2-Clause"
] | 2 | 2020-05-21T22:55:59.000Z | 2021-10-06T03:45:07.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file was created using the DirectGUI Designer
from .SocketBase import SocketBase, OUTSOCKET
from direct.gui.DirectFrame import DirectFrame
from direct.gui.DirectLabel import DirectLabel
from panda3d.core import TextNode
class OutSocket(SocketBase):
def __init__(s... | 27.833333 | 79 | 0.569611 |
23805252c3ee61dd977e334816fc3a61840a15a9 | 4,900 | py | Python | grr/lib/authorization/client_approval_auth_test.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | 1 | 2020-12-18T00:47:19.000Z | 2020-12-18T00:47:19.000Z | grr/lib/authorization/client_approval_auth_test.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | null | null | null | grr/lib/authorization/client_approval_auth_test.py | ethicalhackeragnidhra/Grr | 9ff9178396d9d16575e42dded33627cb09ac3af1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests for grr.lib.authorization.client_approval_auth."""
from grr.lib import access_control
from grr.lib import flags
from grr.lib import test_lib
from grr.lib.authorization import client_approval_auth
from grr.lib.rdfvalues import client as rdf_client
from grr.lib.rdfvalues import test_base
... | 35 | 80 | 0.701633 |
8f2ba62d07dbfd69784228702015160e81964348 | 406 | py | Python | tests/test_examples.py | cscorley/triage | b7a2de8c5955418acf2b9bd93953a83327052257 | [
"MIT"
] | 3 | 2019-01-13T13:03:53.000Z | 2020-05-03T21:34:43.000Z | tests/test_examples.py | cscorley/triage | b7a2de8c5955418acf2b9bd93953a83327052257 | [
"MIT"
] | null | null | null | tests/test_examples.py | cscorley/triage | b7a2de8c5955418acf2b9bd93953a83327052257 | [
"MIT"
] | 1 | 2018-09-30T13:42:10.000Z | 2018-09-30T13:42:10.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
if __name__ == '__main__':
import nose
nose.main()
from nose.tools import *
import unittest
import src
class TestExample(unittest.TestCase):
def setUp(self):
self.is_setup = True
def test_truth(self):
assert self.is_setup
@raises(A... | 17.652174 | 37 | 0.662562 |
19106bc74941bc660bd54a5270fea0e02fdf2a76 | 771 | py | Python | fastestimator/dataset/__init__.py | AriChow/fastestimator | d381d9acc1d42c6cf88a4424e083375cf98140bf | [
"Apache-2.0"
] | null | null | null | fastestimator/dataset/__init__.py | AriChow/fastestimator | d381d9acc1d42c6cf88a4424e083375cf98140bf | [
"Apache-2.0"
] | null | null | null | fastestimator/dataset/__init__.py | AriChow/fastestimator | d381d9acc1d42c6cf88a4424e083375cf98140bf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The FastEstimator Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 48.1875 | 80 | 0.693904 |
e99fff3cd40abb1d632585fb55560368993c51ac | 15,849 | py | Python | posthog/api/action.py | brave-care/posthog | 8edd14a16ad936fb241dcf856925e9f2ea87cba4 | [
"MIT"
] | 1 | 2021-07-28T19:44:48.000Z | 2021-07-28T19:44:48.000Z | posthog/api/action.py | brave-care/posthog | 8edd14a16ad936fb241dcf856925e9f2ea87cba4 | [
"MIT"
] | null | null | null | posthog/api/action.py | brave-care/posthog | 8edd14a16ad936fb241dcf856925e9f2ea87cba4 | [
"MIT"
] | null | null | null | import json
from typing import Any, Dict, List, Union, cast
import posthoganalytics
from django.core.cache import cache
from django.db.models import Count, Exists, OuterRef, Prefetch, QuerySet
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.timezone import now
from... | 39.523691 | 137 | 0.641302 |
b62836f99b8108cc1787fe43725534a12bea39f8 | 601 | py | Python | app/db/repositories/dividend_records.py | Chaoyingz/paper_trading | cd3af81c932e8f4b1586f2b9bf86b5b252bec896 | [
"MIT"
] | null | null | null | app/db/repositories/dividend_records.py | Chaoyingz/paper_trading | cd3af81c932e8f4b1586f2b9bf86b5b252bec896 | [
"MIT"
] | null | null | null | app/db/repositories/dividend_records.py | Chaoyingz/paper_trading | cd3af81c932e8f4b1586f2b9bf86b5b252bec896 | [
"MIT"
] | null | null | null | from app import settings
from app.db.repositories.base import BaseRepository
from app.models.domain.dividend_records import DividendRecordsInDB
class DividendRecordsRepository(BaseRepository):
COLLECTION_NAME = settings.db.collections.dividend_records
async def create_dividend_records(
self, dividen... | 33.388889 | 66 | 0.765391 |
1ece9cb5b492d3c23013154bba4db3c35ecce1e2 | 1,834 | py | Python | robot/BCI.py | mluyuchen/wukong-robot | 67f5cdb06db9e5e256017925a5efe6721cb2bd1d | [
"MIT"
] | 8 | 2021-02-01T06:33:49.000Z | 2022-02-02T11:06:58.000Z | robot/BCI.py | mluyuchen/wukong-robot | 67f5cdb06db9e5e256017925a5efe6721cb2bd1d | [
"MIT"
] | 1 | 2020-06-10T10:59:02.000Z | 2020-06-10T10:59:02.000Z | robot/BCI.py | mluyuchen/wukong-robot | 67f5cdb06db9e5e256017925a5efe6721cb2bd1d | [
"MIT"
] | 6 | 2021-01-20T03:22:19.000Z | 2022-03-21T14:19:32.000Z | import importlib
import multiprocessing
from robot import config, logging
from datetime import datetime, timedelta
logger = logging.getLogger(__name__)
class MuseBCI(object):
def __init__(self, event):
self._wakeup_event = event
self.last_blink = datetime.now() - timedelta(days=1.5)
self.... | 33.962963 | 105 | 0.626499 |
ecd713934fccf98b8272fb5533c44478927e85f6 | 4,540 | py | Python | tests/test_efro/test_dataclasses.py | ritiek/ballistica | 5f909d0b91bfbed3e96c21dbf342616a2d2e7b41 | [
"MIT"
] | null | null | null | tests/test_efro/test_dataclasses.py | ritiek/ballistica | 5f909d0b91bfbed3e96c21dbf342616a2d2e7b41 | [
"MIT"
] | null | null | null | tests/test_efro/test_dataclasses.py | ritiek/ballistica | 5f909d0b91bfbed3e96c21dbf342616a2d2e7b41 | [
"MIT"
] | null | null | null | # Released under the MIT License. See LICENSE for details.
#
"""Testing dataclasses functionality."""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import TYPE_CHECKING
import pytest
from efro.dataclasses import dataclass_assign, dataclass_validate
if TYPE_CHECKING:
fr... | 25.795455 | 65 | 0.578855 |
02c067c8d2f2b56794f9af7cc2db0dc186afe018 | 916 | py | Python | dciclient/v1/api/identity.py | redhat-cip/python-dciclient | 0169e3872a64e614c2655626b04361b165f8513b | [
"Apache-2.0"
] | 6 | 2015-12-18T14:03:02.000Z | 2017-08-03T14:09:05.000Z | dciclient/v1/api/identity.py | redhat-cip/python-dciclient | 0169e3872a64e614c2655626b04361b165f8513b | [
"Apache-2.0"
] | 13 | 2015-12-23T22:27:23.000Z | 2018-05-14T20:51:42.000Z | dciclient/v1/api/identity.py | redhat-cip/python-dciclient | 0169e3872a64e614c2655626b04361b165f8513b | [
"Apache-2.0"
] | 2 | 2016-01-26T23:30:24.000Z | 2020-06-18T16:33:19.000Z | # -*- encoding: utf-8 -*-
#
# Copyright 2017 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 30.533333 | 75 | 0.718341 |
a57ba20608552dbfba71da128a022ca442bd0a3b | 966 | py | Python | mypyc/crash.py | ooprathamm/mypy | 1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac | [
"PSF-2.0"
] | null | null | null | mypyc/crash.py | ooprathamm/mypy | 1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac | [
"PSF-2.0"
] | null | null | null | mypyc/crash.py | ooprathamm/mypy | 1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac | [
"PSF-2.0"
] | null | null | null | from typing import Iterator
from typing_extensions import NoReturn
import sys
import traceback
from contextlib import contextmanager
@contextmanager
def catch_errors(module_path: str, line: int) -> Iterator[None]:
try:
yield
except Exception:
crash_report(module_path, line)
... | 30.1875 | 78 | 0.636646 |
a89efe5a93ff0944d56b9089d106b6844092491f | 393 | py | Python | momments/asgi.py | Ahmed-moringa/Moments | 90fe23e58274039d1dc8fa848129018d2369d06d | [
"MIT"
] | null | null | null | momments/asgi.py | Ahmed-moringa/Moments | 90fe23e58274039d1dc8fa848129018d2369d06d | [
"MIT"
] | null | null | null | momments/asgi.py | Ahmed-moringa/Moments | 90fe23e58274039d1dc8fa848129018d2369d06d | [
"MIT"
] | null | null | null | """
ASGI config for momments project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
2b7e7e5d9eaae166c12a74329098b4dcbdc04137 | 35,710 | py | Python | run_siamese.py | houpanpan/BERT-flow | b1ed085f0bae111fd5625b51320ace60cbb1908c | [
"Apache-2.0"
] | 482 | 2020-11-10T15:04:35.000Z | 2022-03-24T13:23:11.000Z | run_siamese.py | houpanpan/BERT-flow | b1ed085f0bae111fd5625b51320ace60cbb1908c | [
"Apache-2.0"
] | 16 | 2020-11-13T03:33:33.000Z | 2021-08-28T09:27:51.000Z | run_siamese.py | houpanpan/BERT-flow | b1ed085f0bae111fd5625b51320ace60cbb1908c | [
"Apache-2.0"
] | 57 | 2020-11-23T03:01:32.000Z | 2022-03-03T01:51:58.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 38.773073 | 112 | 0.683338 |
267e75fc185a254126deac2705ef8741f636e8ab | 5,747 | py | Python | arkouda/sorting.py | ak47mrj/arkouda | a9167e674aff57e02e1bed49fbb0c3cf1b2f2707 | [
"MIT"
] | 75 | 2019-10-21T17:20:41.000Z | 2021-05-10T22:01:19.000Z | arkouda/sorting.py | ak47mrj/arkouda | a9167e674aff57e02e1bed49fbb0c3cf1b2f2707 | [
"MIT"
] | 424 | 2019-10-21T16:48:45.000Z | 2021-05-12T11:49:18.000Z | arkouda/sorting.py | ak47mrj/arkouda | a9167e674aff57e02e1bed49fbb0c3cf1b2f2707 | [
"MIT"
] | 36 | 2019-10-23T17:45:44.000Z | 2021-04-17T01:15:03.000Z | from __future__ import annotations
from typing import cast, Sequence, Union
from typeguard import typechecked, check_type
from arkouda.client import generic_msg
from arkouda.pdarrayclass import pdarray, create_pdarray
from arkouda.pdarraycreation import zeros
from arkouda.strings import Strings
from arkouda.dtypes impo... | 31.576923 | 111 | 0.62102 |
10bf9fd981a4617a5a75b25950bf046ee77236c9 | 1,063 | py | Python | share/lib/python/neuron/gui.py | adamjhn/rxdtests | 86504f8cc363baef583166c8033694eb9b4b78e3 | [
"BSD-3-Clause"
] | null | null | null | share/lib/python/neuron/gui.py | adamjhn/rxdtests | 86504f8cc363baef583166c8033694eb9b4b78e3 | [
"BSD-3-Clause"
] | null | null | null | share/lib/python/neuron/gui.py | adamjhn/rxdtests | 86504f8cc363baef583166c8033694eb9b4b78e3 | [
"BSD-3-Clause"
] | null | null | null | """
Import this module if you would like to use the NEURON GUI.
It loads nrngui.hoc, and starts a thread to periodically process
the NEURON GUI event loop.
"""
from neuron import h
import threading
import time
def process_events() :
try:
h.doNotify()
except:
print ("Exception in gui thread")
class Loop... | 21.693878 | 64 | 0.673565 |
16f849fd86eeb3312308e4c89e105a601d88416b | 22,767 | py | Python | src/coreclr/scripts/genLttngProvider.py | pyracanda/runtime | 72bee25ab532a4d0636118ec2ed3eabf3fd55245 | [
"MIT"
] | 9,402 | 2019-11-25T23:26:24.000Z | 2022-03-31T23:19:41.000Z | src/coreclr/scripts/genLttngProvider.py | pyracanda/runtime | 72bee25ab532a4d0636118ec2ed3eabf3fd55245 | [
"MIT"
] | 37,522 | 2019-11-25T23:30:32.000Z | 2022-03-31T23:58:30.000Z | src/coreclr/scripts/genLttngProvider.py | pyracanda/runtime | 72bee25ab532a4d0636118ec2ed3eabf3fd55245 | [
"MIT"
] | 3,629 | 2019-11-25T23:29:16.000Z | 2022-03-31T21:52:28.000Z | ##
## Licensed to the .NET Foundation under one or more agreements.
## The .NET Foundation licenses this file to you under the MIT license.
##
## Sample LTTng Instrumentation code that is generated:
##
## HEADER:
## #define GCFinalizersEnd_TRACEPOINT_ARGS \
##TP_ARGS(\
## const unsigned int ,Count\
##)
##TRACEP... | 36.661836 | 238 | 0.599069 |
7e8d7c999c89cb4bf81647b10dc9f9cb24cb845d | 413 | py | Python | CouchdbApplication/wsgi.py | dendgau/access-couchdb-application | c5e1e541d904800f77530f208bb5ed0c0bf93440 | [
"MIT"
] | null | null | null | CouchdbApplication/wsgi.py | dendgau/access-couchdb-application | c5e1e541d904800f77530f208bb5ed0c0bf93440 | [
"MIT"
] | null | null | null | CouchdbApplication/wsgi.py | dendgau/access-couchdb-application | c5e1e541d904800f77530f208bb5ed0c0bf93440 | [
"MIT"
] | null | null | null | """
WSGI config for CouchdbApplication project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("D... | 24.294118 | 78 | 0.79661 |
dd1cd34765ed862b3e23c936f2c546f063d1e9b9 | 1,859 | py | Python | transport.py | KingCprey/ncit.py | 25ffa9c5317bbcdcc8ef367bb7900bff910d792c | [
"MIT"
] | null | null | null | transport.py | KingCprey/ncit.py | 25ffa9c5317bbcdcc8ef367bb7900bff910d792c | [
"MIT"
] | null | null | null | transport.py | KingCprey/ncit.py | 25ffa9c5317bbcdcc8ef367bb7900bff910d792c | [
"MIT"
] | null | null | null | import socket,os,tarfile
from utils import *
def establish_connection(recv_host,recv_port,local_host=None,local_port=0,retry=True,retry_count=3,timeout=5,silent=False):
retries=0
while True:
try:
if not silent:log(Log.LOG_CONNECTION,"Attempting TCP connection to {0}:{1}",recv_host,recv_port)... | 51.638889 | 123 | 0.691232 |
0c6c8b46ba5013d91ff867ba0d69ad080950cade | 124,239 | py | Python | distributed/worker.py | abduhbm/distributed | d99752e030e2534c1f064865e2241289fedfe5a9 | [
"BSD-3-Clause"
] | null | null | null | distributed/worker.py | abduhbm/distributed | d99752e030e2534c1f064865e2241289fedfe5a9 | [
"BSD-3-Clause"
] | null | null | null | distributed/worker.py | abduhbm/distributed | d99752e030e2534c1f064865e2241289fedfe5a9 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import bisect
from collections import defaultdict, deque, namedtuple
from collections.abc import MutableMapping
from datetime import timedelta
from functools import partial
import heapq
from inspect import isawaitable
import logging
import os
from pickle import PicklingError
import random
import threadin... | 34.918212 | 104 | 0.543469 |
553b30d54060e4ef460932e0345413f2c29aaef2 | 11,408 | py | Python | perception/evaluation/model_evaluation.py | jostl/masters-thesis | 211e1f12a07428d37507e2bddc808f6da1149efb | [
"MIT"
] | 3 | 2021-06-19T10:49:26.000Z | 2022-03-26T11:31:28.000Z | perception/evaluation/model_evaluation.py | jostl/masters-thesis | 211e1f12a07428d37507e2bddc808f6da1149efb | [
"MIT"
] | 1 | 2021-10-12T15:40:55.000Z | 2021-10-12T15:40:55.000Z | perception/evaluation/model_evaluation.py | jostl/masters-thesis | 211e1f12a07428d37507e2bddc808f6da1149efb | [
"MIT"
] | null | null | null | import functools
from collections import defaultdict
from pathlib import Path
import numpy as np
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from perception.custom_datasets import ComparisonDataset
from perception.utils.visualization import plot_segmentation, plot_image, display_images_... | 49.816594 | 180 | 0.693022 |
0f1e7989cec68aa304b0a7ebc239511f88493830 | 2,694 | py | Python | tests/terraform/runner/test_runner.py | fossabot/checkov | d09938cffe3588dd1f472bcf2382e07fa7f9010b | [
"Apache-2.0"
] | null | null | null | tests/terraform/runner/test_runner.py | fossabot/checkov | d09938cffe3588dd1f472bcf2382e07fa7f9010b | [
"Apache-2.0"
] | null | null | null | tests/terraform/runner/test_runner.py | fossabot/checkov | d09938cffe3588dd1f472bcf2382e07fa7f9010b | [
"Apache-2.0"
] | null | null | null | import os
import unittest
from checkov.terraform.runner import Runner
from checkov.terraform.context_parsers.registry import parser_registry
class TestRunnerValid(unittest.TestCase):
def test_runner_valid_tf(self):
current_dir = os.path.dirname(os.path.realpath(__file__))
valid_dir_path = curren... | 39.043478 | 101 | 0.697105 |
368d0fc024a84a21b4703d6949b60e4e1ed84f04 | 1,732 | py | Python | server/kraken/migrations/versions/8200318b9e18_added_several_stats_fields_to_run.py | fossabot/kraken-3 | 7ac472de8ff6f44aac4dbd231f896f00e6f3b278 | [
"Apache-2.0"
] | 66 | 2020-08-14T12:52:39.000Z | 2022-03-31T13:56:25.000Z | server/kraken/migrations/versions/8200318b9e18_added_several_stats_fields_to_run.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | 110 | 2020-07-23T07:12:09.000Z | 2022-03-26T05:54:18.000Z | server/kraken/migrations/versions/8200318b9e18_added_several_stats_fields_to_run.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | 4 | 2021-03-10T05:25:03.000Z | 2022-01-24T10:12:33.000Z | """added several stats fields to Run
Revision ID: 8200318b9e18
Revises: b908e219f07f
Create Date: 2020-02-08 11:50:24.255977
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8200318b9e18'
down_revision = 'b908e219f07f'
branch_labels = None
depends_on = None
de... | 40.27907 | 100 | 0.674942 |
e2e3d64709e71213834b4ba808443d21fcf847d4 | 1,234 | py | Python | process_by_group.py | greenmoon55/yangpu8k | 2d306d0a06aa1c29a4b76136786a46cb6875733d | [
"MIT"
] | null | null | null | process_by_group.py | greenmoon55/yangpu8k | 2d306d0a06aa1c29a4b76136786a46cb6875733d | [
"MIT"
] | null | null | null | process_by_group.py | greenmoon55/yangpu8k | 2d306d0a06aa1c29a4b76136786a46cb6875733d | [
"MIT"
] | null | null | null | import csv
from collections import defaultdict
import datetime
import pygal
def hms_to_seconds(t):
h, m, s = [int(i) for i in t.split(':')]
return 3600*h + 60*m + s
def get_tuples():
tuples = []
with open('result.csv', 'rb') as csvfile:
r = csv.reader(csvfile, delimiter=',', quotechar='|')
... | 26.255319 | 99 | 0.5859 |
16682c4663abe0aae7379f74ca3ee01ce07b13a4 | 1,626 | py | Python | autogluon/searcher/grid_searcher.py | jhutchings1/autogluon | 9a0eb8a8f7c88cd09b081adf5d4c6c281d113d75 | [
"Apache-2.0"
] | null | null | null | autogluon/searcher/grid_searcher.py | jhutchings1/autogluon | 9a0eb8a8f7c88cd09b081adf5d4c6c281d113d75 | [
"Apache-2.0"
] | null | null | null | autogluon/searcher/grid_searcher.py | jhutchings1/autogluon | 9a0eb8a8f7c88cd09b081adf5d4c6c281d113d75 | [
"Apache-2.0"
] | 2 | 2020-12-13T16:40:04.000Z | 2021-03-08T09:14:16.000Z | __all__ = ['GridSearcher']
from .searcher import BaseSearcher
from sklearn.model_selection import ParameterGrid
class GridSearcher(BaseSearcher):
"""Grid Searcher that exhaustively tries all possible configurations.
This Searcher can only be used for discrete search spaces of type :class:`autogluon.space... | 35.347826 | 109 | 0.634071 |
0da451172ea694551e075692451622bb538c1dad | 2,932 | py | Python | apps/data_taking_scripts/2016-06-jpl-hex-271/heterodyne_scan_with_blackbody.py | danielflanigan/kid_readout | 07202090d468669200cab78297122880c1c03e87 | [
"BSD-2-Clause"
] | null | null | null | apps/data_taking_scripts/2016-06-jpl-hex-271/heterodyne_scan_with_blackbody.py | danielflanigan/kid_readout | 07202090d468669200cab78297122880c1c03e87 | [
"BSD-2-Clause"
] | null | null | null | apps/data_taking_scripts/2016-06-jpl-hex-271/heterodyne_scan_with_blackbody.py | danielflanigan/kid_readout | 07202090d468669200cab78297122880c1c03e87 | [
"BSD-2-Clause"
] | null | null | null | import time
import numpy as np
from kid_readout.interactive import *
from kid_readout.measurement import acquire
from kid_readout.roach import r2heterodyne, attenuator, hardware_tools
from equipment.custom import mmwave_source
from equipment.hittite import signal_generator
from equipment.srs import lockin
from kid_r... | 30.863158 | 119 | 0.706003 |
b15065cd4e50700f8d98873d6212b5adb7b68956 | 1,968 | py | Python | gnuradio-3.7.13.4/gr-audio/examples/python/noise.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | 1 | 2021-03-09T07:32:37.000Z | 2021-03-09T07:32:37.000Z | gnuradio-3.7.13.4/gr-audio/examples/python/noise.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | gnuradio-3.7.13.4/gr-audio/examples/python/noise.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# ... | 34.526316 | 83 | 0.675813 |
f72b045654dc44f3155f6d877133a3202b759449 | 5,054 | py | Python | python-lib/dku_error_analysis_mpp/dku_error_visualizer.py | dataiku/dss-plugin-model-error-analysis | 4c0f42a5c0aa1710005db3d81ca9bd9d7f829e6b | [
"Apache-2.0"
] | null | null | null | python-lib/dku_error_analysis_mpp/dku_error_visualizer.py | dataiku/dss-plugin-model-error-analysis | 4c0f42a5c0aa1710005db3d81ca9bd9d7f829e6b | [
"Apache-2.0"
] | 2 | 2021-09-29T15:08:25.000Z | 2022-01-13T11:20:58.000Z | python-lib/dku_error_analysis_mpp/dku_error_visualizer.py | dataiku/dss-plugin-model-error-analysis | 4c0f42a5c0aa1710005db3d81ca9bd9d7f829e6b | [
"Apache-2.0"
] | 1 | 2021-09-10T12:25:08.000Z | 2021-09-10T12:25:08.000Z | # -*- coding: utf-8 -*-
import numpy as np
from graphviz import Source
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
from dku_error_analysis_mpp.dku_error_analyzer import DkuErrorAnalyzer
from mealy import _BaseErrorVisualizer, ErrorAnalyzerConstants
from dku_error_analysis_utils import safe_s... | 49.54902 | 149 | 0.609616 |
4ca448669f486e9b4a60650e476f18ebb46f3575 | 7,326 | py | Python | Chapter04/bitcoin_address_lookup.py | raminfp/Learning-Python-for-Forensics-Second-Edition | 6643d6a809c2b6d391e49babd34f2b84fa9f5e89 | [
"MIT"
] | 30 | 2019-02-08T09:43:52.000Z | 2021-12-19T09:35:11.000Z | Chapter04/bitcoin_address_lookup.py | raminfp/Learning-Python-for-Forensics-Second-Edition | 6643d6a809c2b6d391e49babd34f2b84fa9f5e89 | [
"MIT"
] | 11 | 2021-02-22T12:33:03.000Z | 2022-03-11T23:39:34.000Z | Chapter04/bitcoin_address_lookup.py | cheahengsoon/Learning-Python-for-Forensics-Second-Edition | 97612919073599c8cb107ea3c6a9f27a3a938fad | [
"MIT"
] | 22 | 2019-02-01T18:11:17.000Z | 2022-03-09T06:49:03.000Z | """Final iteration of the Bitcoin JSON transaction parser."""
from __future__ import print_function
import argparse
import csv
import json
import logging
import sys
import os
if sys.version_info[0] == 2:
from urllib2 import urlopen
from urllib2 import URLError
elif sys.version_info[0] == 3:
from urllib.request impor... | 31.714286 | 68 | 0.733279 |
92e0db5f7e996c35a559678b91cc5268fe8e1bba | 49,022 | py | Python | .history/src/_fighter_20190423010657.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:25:30.000Z | 2019-12-25T10:25:30.000Z | .history/src/_fighter_20190423010657.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:27:15.000Z | 2019-12-25T10:27:15.000Z | .history/src/_fighter_20190423010657.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
import LifeBars
import projectile
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... | 47.455954 | 197 | 0.512178 |
a453bc165c45aacde7e3235a89db59af5f4e2e82 | 64,290 | py | Python | test/ext/declarative/test_inheritance.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | 1 | 2018-11-15T16:02:17.000Z | 2018-11-15T16:02:17.000Z | test/ext/declarative/test_inheritance.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | null | null | null | test/ext/declarative/test_inheritance.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | null | null | null |
from sqlalchemy.testing import eq_, le_, assert_raises, \
assert_raises_message, is_, is_true, is_false
from sqlalchemy.ext import declarative as decl
import sqlalchemy as sa
from sqlalchemy import testing
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy.testing.schema import Table, Column
from s... | 36.077441 | 79 | 0.563602 |
b0f27810008b82d91a2006adfc44ca52b30aca74 | 622 | py | Python | runs/par-bro-iter00900.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null | runs/par-bro-iter00900.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null | runs/par-bro-iter00900.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null |
# Write results to this file
OUTFILE = 'runs/par-bro-iter00900.result.csv'
# Source computers for the requests
SOURCE = ['10.0.0.1']
# Should Bro be enabled on the source machines?
SOURCE_BRO = [True]
# Target machines for the requests (aka server)
TARGET = ['10.0.0.2']
# Should Bro be enabled on the target machin... | 21.448276 | 68 | 0.720257 |
c1672d851f5eb2f58a859a7aa9e3ce9e1a6c270a | 1,592 | py | Python | marco/portal/data_catalog/views.py | MidAtlanticPortal/marco-portal2 | b47e7bfa171e98a6cf499b2d411fc743caae91c2 | [
"0BSD"
] | 4 | 2016-09-24T00:57:45.000Z | 2019-07-28T23:35:15.000Z | marco/portal/data_catalog/views.py | MidAtlanticPortal/marco-portal2 | b47e7bfa171e98a6cf499b2d411fc743caae91c2 | [
"0BSD"
] | 146 | 2016-09-27T23:16:52.000Z | 2022-03-09T16:55:32.000Z | marco/portal/data_catalog/views.py | MidAtlanticPortal/marco-portal2 | b47e7bfa171e98a6cf499b2d411fc743caae91c2 | [
"0BSD"
] | 1 | 2019-07-03T23:42:05.000Z | 2019-07-03T23:42:05.000Z | from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from data_manager.models import *
from portal.base.models import PortalImage
# hack for POR-224, until POR-206
def wagtail_feature_image(self):
image = PortalImage.objects.filter(tags__name__in=["th... | 41.894737 | 214 | 0.702889 |
ddeade03ba9e76b62326181f3af9f929ee2ada59 | 9,132 | py | Python | aiokafka/conn.py | vineet-rh/aiokafka | 485351d7f9e583debd628de72062b4fd4f7c2d65 | [
"Apache-2.0"
] | null | null | null | aiokafka/conn.py | vineet-rh/aiokafka | 485351d7f9e583debd628de72062b4fd4f7c2d65 | [
"Apache-2.0"
] | 1 | 2018-06-12T18:44:26.000Z | 2018-06-12T18:44:26.000Z | aiokafka/conn.py | vineet-rh/aiokafka | 485351d7f9e583debd628de72062b4fd4f7c2d65 | [
"Apache-2.0"
] | null | null | null | import asyncio
import struct
import logging
from kafka.protocol.api import RequestHeader
from kafka.protocol.commit import (
GroupCoordinatorResponse_v0 as GroupCoordinatorResponse)
import aiokafka.errors as Errors
from aiokafka import ensure_future
__all__ = ['AIOKafkaConnection', 'create_conn']
READER_LIMIT ... | 37.273469 | 79 | 0.597459 |
e4755b3d1f8697f9766a2ec817d280ae0ba07d6f | 41,871 | py | Python | yt_dlp/extractor/extractors.py | ITZNEON12/yt-dlp | d76d15a6699dc41eea26a96d054a1b7bcb12c69b | [
"Unlicense"
] | 2 | 2021-08-24T16:53:31.000Z | 2021-12-17T16:55:04.000Z | yt_dlp/extractor/extractors.py | ITZNEON12/yt-dlp | d76d15a6699dc41eea26a96d054a1b7bcb12c69b | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/extractors.py | ITZNEON12/yt-dlp | d76d15a6699dc41eea26a96d054a1b7bcb12c69b | [
"Unlicense"
] | 1 | 2021-07-20T14:58:10.000Z | 2021-07-20T14:58:10.000Z | # flake8: noqa
from __future__ import unicode_literals
from .abc import (
ABCIE,
ABCIViewIE,
)
from .abcnews import (
AbcNewsIE,
AbcNewsVideoIE,
)
from .abcotvs import (
ABCOTVSIE,
ABCOTVSClipsIE,
)
from .academicearth import AcademicEarthCourseIE
from .acast import (
ACastIE,
ACastChan... | 21.505393 | 90 | 0.760765 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.