hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aef9a269a8feefc95b76496302147f489fe59c84 | 6,886 | py | Python | bayesian/utility/v2/stack_analyses.py | mbharatk/fabric8-analytics-server | 5b168e89d3465682e241748da1f6e426e4f3679c | [
"Apache-2.0"
] | 18 | 2017-05-02T22:04:32.000Z | 2021-11-08T10:30:03.000Z | bayesian/utility/v2/stack_analyses.py | mbharatk/fabric8-analytics-server | 5b168e89d3465682e241748da1f6e426e4f3679c | [
"Apache-2.0"
] | 699 | 2017-05-03T14:55:17.000Z | 2022-03-17T05:51:58.000Z | bayesian/utility/v2/stack_analyses.py | mbharatk/fabric8-analytics-server | 5b168e89d3465682e241748da1f6e426e4f3679c | [
"Apache-2.0"
] | 64 | 2017-05-02T05:45:01.000Z | 2021-11-20T12:20:46.000Z | # Copyright © 2020 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 law or agreed to in writin... | 39.803468 | 96 | 0.623729 |
0582bf7b469e79445abea5d3dc520323116a27e1 | 39,310 | py | Python | src/commands.py | Athanasius/miggy-py-ircbot | cac44d65e70e56e11b3fd48cf6eca373d5fcb9a3 | [
"BSD-3-Clause"
] | null | null | null | src/commands.py | Athanasius/miggy-py-ircbot | cac44d65e70e56e11b3fd48cf6eca373d5fcb9a3 | [
"BSD-3-Clause"
] | 4 | 2017-10-23T15:16:40.000Z | 2018-05-27T10:19:52.000Z | src/commands.py | Athanasius/miggy-py-ircbot | cac44d65e70e56e11b3fd48cf6eca373d5fcb9a3 | [
"BSD-3-Clause"
] | null | null | null | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2009-2010,2015, James McCoy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the a... | 34.212359 | 84 | 0.60234 |
c55c0f913a9b984f56a696dac6fcc170262b17ad | 64,372 | py | Python | pysnmp-with-texts/ETH-SWITCH-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/ETH-SWITCH-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/ETH-SWITCH-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ETH-SWITCH-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ETH-SWITCH-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:06:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 145.638009 | 6,252 | 0.79606 |
09e6d712df7af7644c79d5b52cb1767932cdbc89 | 1,303 | py | Python | keras_retinanet/layers/convp3d.py | toosyou/keras-retinanet | c2b5c51e79c5783b5451feaa2d4e1cf9304e724b | [
"Apache-2.0"
] | null | null | null | keras_retinanet/layers/convp3d.py | toosyou/keras-retinanet | c2b5c51e79c5783b5451feaa2d4e1cf9304e724b | [
"Apache-2.0"
] | null | null | null | keras_retinanet/layers/convp3d.py | toosyou/keras-retinanet | c2b5c51e79c5783b5451feaa2d4e1cf9304e724b | [
"Apache-2.0"
] | null | null | null | import keras
from .group_norm import GroupNormalization
def ConvP3D(filters, kernel_size=3, stride=1, batch_norm=False, **kwargs):
if isinstance(kernel_size, int):
first_kernel_size = (kernel_size, kernel_size, 1)
second_kernel_size = (1, 1, kernel_size)
else:
first_kernel_size = (... | 34.289474 | 74 | 0.521873 |
2935bcdd7ac161b12e56cf268d12a96a89ca3bb0 | 1,207 | py | Python | springcloudstream/options.py | dturanski/springcloudstream | 208b542f9eba82e97882d52703af8e965a62a980 | [
"Apache-2.0"
] | 1 | 2017-05-01T20:10:40.000Z | 2017-05-01T20:10:40.000Z | springcloudstream/options.py | dturanski/springcloudstream | 208b542f9eba82e97882d52703af8e965a62a980 | [
"Apache-2.0"
] | 1 | 2018-03-13T00:08:32.000Z | 2018-03-13T00:08:32.000Z | springcloudstream/options.py | dturanski/springcloudstream | 208b542f9eba82e97882d52703af8e965a62a980 | [
"Apache-2.0"
] | null | null | null | __copyright__ = '''
Copyright 2017 the original author or 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 ... | 31.763158 | 75 | 0.702568 |
36d0b542582e5f33765b955a002154aa5f0bbf43 | 45 | py | Python | gamelocker/__init__.py | ClarkThyLord/gamelocker-vg-python | a12a96b507a7a942e4dd7fff9b37b82151bd08d7 | [
"MIT"
] | 1 | 2018-08-18T10:15:18.000Z | 2018-08-18T10:15:18.000Z | gamelocker/__init__.py | ClarkThyLord/gamelocker-vg-python | a12a96b507a7a942e4dd7fff9b37b82151bd08d7 | [
"MIT"
] | null | null | null | gamelocker/__init__.py | ClarkThyLord/gamelocker-vg-python | a12a96b507a7a942e4dd7fff9b37b82151bd08d7 | [
"MIT"
] | null | null | null | """Code directory"""
from .wrapper import *
| 11.25 | 22 | 0.666667 |
8a29ef9315661dfdfee6449816d8e570217ae0b4 | 5,651 | py | Python | Chapter4/Singularity/scripts/logfetch/tail.py | HussainK72/Mastering-Mesos | c34d9822015b73172ad1478b21aa809d7c5c913e | [
"MIT"
] | 11 | 2016-05-25T15:44:34.000Z | 2021-07-24T19:37:30.000Z | Chapter4/Singularity/scripts/logfetch/tail.py | HussainK72/Mastering-Mesos | c34d9822015b73172ad1478b21aa809d7c5c913e | [
"MIT"
] | 1 | 2022-01-21T23:08:28.000Z | 2022-01-21T23:08:28.000Z | Chapter4/Singularity/scripts/logfetch/tail.py | HussainK72/Mastering-Mesos | c34d9822015b73172ad1478b21aa809d7c5c913e | [
"MIT"
] | 6 | 2016-05-30T06:41:24.000Z | 2022-02-27T10:57:58.000Z | import os
import sys
import logfetch_base
import requests
import time
import fnmatch
import threading
from grep import grep_command
from termcolor import colored
from logfetch_base import log, get_json_response
TAIL_LOG_FORMAT = '{0}/sandbox/{1}/read'
READ_INTERVAL = 5
THREAD_TIMEOUT = 100000
BROWSE_FOLDER_FORMAT = '{... | 40.654676 | 206 | 0.615112 |
c123c76347b13fd43ac55c48b0f11aa9e80f2406 | 381 | py | Python | src/CodeLearn/plaintextCode/BloomTech/BTU5W1/U5W1P2_Task14_w1.py | MingjunGeng/Code-Knowledge | 5b376f6b3ff9e7fa0ab41c7b57e3a80313fa0daa | [
"MIT"
] | null | null | null | src/CodeLearn/plaintextCode/BloomTech/BTU5W1/U5W1P2_Task14_w1.py | MingjunGeng/Code-Knowledge | 5b376f6b3ff9e7fa0ab41c7b57e3a80313fa0daa | [
"MIT"
] | null | null | null | src/CodeLearn/plaintextCode/BloomTech/BTU5W1/U5W1P2_Task14_w1.py | MingjunGeng/Code-Knowledge | 5b376f6b3ff9e7fa0ab41c7b57e3a80313fa0daa | [
"MIT"
] | 1 | 2022-03-18T04:52:10.000Z | 2022-03-18T04:52:10.000Z | #!/usr/bin/python3
# --- 001 > U5W2P1_Task13_w1
def solution( a, b, c ):
input = [a, b, c]
larger = -float('inf')
for x in input:
if(larger<x):
larger = x
return larger
if __name__ == "__main__":
print('----------start------------')
a = -2
b = 20
c = 10
print(s... | 19.05 | 40 | 0.43832 |
02e32f888fdd98a3e3abd1a4202188134b946d8b | 22,752 | py | Python | whatshap/threading.py | erikvdp/whatshap-TLA | 1e6cf0181de57ff5d5e0f3edfef2e7b70a4d91ec | [
"MIT"
] | null | null | null | whatshap/threading.py | erikvdp/whatshap-TLA | 1e6cf0181de57ff5d5e0f3edfef2e7b70a4d91ec | [
"MIT"
] | null | null | null | whatshap/threading.py | erikvdp/whatshap-TLA | 1e6cf0181de57ff5d5e0f3edfef2e7b70a4d91ec | [
"MIT"
] | null | null | null | import itertools as it
import logging
from collections import defaultdict
from .core import HaploThreader
logger = logging.getLogger(__name__)
def run_threading(readset, clustering, ploidy, genotypes, block_cut_sensitivity):
"""
Main method for the threading stage of the polyploid phasing algorithm. Takes th... | 40.056338 | 142 | 0.608562 |
4cc975fdb6bef8e5cf0f487270a2272da9b90828 | 6,344 | py | Python | src/covid19/lk_vax_schedule/scrape_vax_schedule.py | nuuuwan/covid19 | 6f6a62e52104ff0579a4787e6ea06beca3eb4c76 | [
"MIT"
] | 5 | 2021-06-11T16:11:58.000Z | 2021-09-02T14:09:41.000Z | src/covid19/lk_vax_schedule/scrape_vax_schedule.py | nuuuwan/covid19 | 6f6a62e52104ff0579a4787e6ea06beca3eb4c76 | [
"MIT"
] | 2 | 2021-07-06T11:11:50.000Z | 2021-08-23T10:35:31.000Z | src/covid19/lk_vax_schedule/scrape_vax_schedule.py | nuuuwan/covid19 | 6f6a62e52104ff0579a4787e6ea06beca3eb4c76 | [
"MIT"
] | 2 | 2021-08-16T15:32:44.000Z | 2021-08-23T03:25:08.000Z | """
Ministry of health seems to have the type
http://health.gov.lk/moh_final/english/news_read_more.php?id=977
@icta_srilanka
has a link
https://vaccine.covid19.gov.lk/sign-in, but it's not updated.
I remember
@Sri_Lanka_Army
having one, but can't seem to find it.
"""
import os
import re
import pandas
from bs4 imp... | 28.195556 | 79 | 0.604193 |
deeb437c67d43c7fe2ff5a1c76eddddee58abf19 | 140 | py | Python | brigadier/home/urls.py | avoevodin/brigadier | c3869e4b526e0eb043146c53b78fda525ecfe5c4 | [
"MIT"
] | 1 | 2021-03-30T05:06:39.000Z | 2021-03-30T05:06:39.000Z | brigadier/home/urls.py | avoevodin/brigadier | c3869e4b526e0eb043146c53b78fda525ecfe5c4 | [
"MIT"
] | 25 | 2021-03-22T12:41:41.000Z | 2021-10-20T10:42:05.000Z | brigadier/home/urls.py | avoevodin/brigadier | c3869e4b526e0eb043146c53b78fda525ecfe5c4 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import HomeView
app_name = 'home'
urlpatterns = [
path('', HomeView.as_view(), name='home')
] | 17.5 | 45 | 0.692857 |
7d90c6046e5ca802e6a1fbd09360439636133990 | 1,237 | py | Python | ppq/executor/op/torch/__init__.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | ppq/executor/op/torch/__init__.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | ppq/executor/op/torch/__init__.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | from .default import (DEFAULT_BACKEND_TABLE, AveragePool_forward,
BatchNormalization_forward, Cast_forward, Clip_forward,
Concat_forward, Constant_forward,
ConstantOfShape_forward, Conv_forward, Eltwise_forward,
Equal_forward, Expan... | 58.904762 | 77 | 0.677445 |
fcc26d514edc1961fe2dc2d4785813e87929e966 | 7,443 | py | Python | userbot/modules/anti_spambot.py | ratnasimatary/bot27 | 6a083db06e24614382b68800c10bbbdf47a86dcf | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 7 | 2020-06-27T20:15:34.000Z | 2021-01-21T12:45:48.000Z | userbot/modules/anti_spambot.py | ratnasimatary/bot27 | 6a083db06e24614382b68800c10bbbdf47a86dcf | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 4 | 2020-07-31T10:23:15.000Z | 2020-08-03T04:56:37.000Z | userbot/modules/anti_spambot.py | ratnasimatary/bot27 | 6a083db06e24614382b68800c10bbbdf47a86dcf | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 70 | 2020-04-26T02:47:50.000Z | 2022-01-26T10:13:13.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
''' A module for helping ban group join spammers. '''
from asyncio import sleep
from requests import get
from teletho... | 39.802139 | 112 | 0.438667 |
35eb0339d03da09716e7b06384a50c429a20c2f2 | 5,382 | py | Python | movingpandas/trajectory_plotter.py | sglvladi/movingpandas | d72141e1a3a22fcaeede77f32bdb7417b5280a45 | [
"BSD-3-Clause"
] | null | null | null | movingpandas/trajectory_plotter.py | sglvladi/movingpandas | d72141e1a3a22fcaeede77f32bdb7417b5280a45 | [
"BSD-3-Clause"
] | null | null | null | movingpandas/trajectory_plotter.py | sglvladi/movingpandas | d72141e1a3a22fcaeede77f32bdb7417b5280a45 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import hvplot.pandas # seems to be necessary for the following import to work
from holoviews import opts, dim
class _TrajectoryPlotter:
"""
Utility class for plotting trajectories
Performs necessary data preprocessing steps and hands over plotting ... | 43.756098 | 152 | 0.642698 |
99dd83b77b264de9770e29d2f67c903eae0722d6 | 235 | py | Python | FrameApp/rainstyApp/py_module/action/rainsty/src/__init__.py | Rainstyd/rainsty | 9a0d5f46c20faf909c4194f315fb9960652cffc6 | [
"Apache-2.0"
] | 1 | 2020-03-25T01:13:35.000Z | 2020-03-25T01:13:35.000Z | FrameApp/rainstyApp/py_module/action/rainsty/src/__init__.py | Rainstyed/rainsty | f74e0ccaf16d1871c9d1870bd8a7c8a63243fcf5 | [
"Apache-2.0"
] | 1 | 2022-01-06T23:49:21.000Z | 2022-01-06T23:49:21.000Z | FrameApp/rainstyApp/py_module/action/rainsty/src/__init__.py | rainstyd/rainsty | 9a0d5f46c20faf909c4194f315fb9960652cffc6 | [
"Apache-2.0"
] | 1 | 2020-03-20T08:48:36.000Z | 2020-03-20T08:48:36.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@author: rainsty
@file: __init__.py
@time: 2020-09-18 17:28:29
@description:
"""
from .do_50000 import do_action as do_action_50000
from .do_50001 import do_action as do_action_50001
| 18.076923 | 50 | 0.706383 |
f1ef03d1b91c542b085307dbbba3931af75745b4 | 52,612 | py | Python | scripts/check_compliance.py | ioannisg/ci-tools | da9a2df574094f52d87a03f6393928bdc7dce17c | [
"Apache-2.0"
] | 7 | 2019-04-10T08:50:06.000Z | 2021-03-21T11:24:43.000Z | scripts/check_compliance.py | ioannisg/ci-tools | da9a2df574094f52d87a03f6393928bdc7dce17c | [
"Apache-2.0"
] | 86 | 2018-12-03T03:48:04.000Z | 2021-07-12T13:35:26.000Z | scripts/check_compliance.py | ioannisg/ci-tools | da9a2df574094f52d87a03f6393928bdc7dce17c | [
"Apache-2.0"
] | 21 | 2018-11-23T17:00:07.000Z | 2021-06-16T10:24:44.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import collections
import sys
import subprocess
import re
import os
from email.utils import parseaddr
import logging
import argparse
from junitparser import TestCase, TestSuite, JUnitXml, Skipped, Error, Failure, Attr
... | 36.359364 | 118 | 0.592793 |
f951268fd6a0904af3baafc0bf7c283eda050976 | 3,393 | py | Python | Poly.py | eidolonFIRE/CarpetBomb | 52d83a2f1d17b88bfd5cbcac5741437ce630a8b5 | [
"MIT"
] | 5 | 2018-05-13T05:01:14.000Z | 2018-05-28T15:08:27.000Z | Poly.py | eidolonFIRE/CarpetBomb | 52d83a2f1d17b88bfd5cbcac5741437ce630a8b5 | [
"MIT"
] | null | null | null | Poly.py | eidolonFIRE/CarpetBomb | 52d83a2f1d17b88bfd5cbcac5741437ce630a8b5 | [
"MIT"
] | null | null | null | import math
def _vertSub(a, b):
return a[0] - b[0], a[1] - b[1]
def _vertAtan2(a, b):
return math.atan2(b[1] - a[1], b[0] - a[0])
def _vertNorm(a, b):
return math.sqrt((b[0] - a[0])**2 + (b[1] - a[1])**2)
class Poly(object):
"""docstring for Poly"""
def __init__(self, bomb_callback=None, display=None, root=No... | 27.811475 | 107 | 0.627763 |
e6e81a903499807c1053b0c6c65f6b608fb50103 | 4,697 | py | Python | blogs/goes16/maria/create_image.py | laurenzberger/training-data-analyst | 3e2ef4668c5088ab50ad50a4f29673c88fb1bcd3 | [
"Apache-2.0"
] | 6,140 | 2016-05-23T16:09:35.000Z | 2022-03-30T19:00:46.000Z | blogs/goes16/maria/create_image.py | laurenzberger/training-data-analyst | 3e2ef4668c5088ab50ad50a4f29673c88fb1bcd3 | [
"Apache-2.0"
] | 1,384 | 2016-07-08T22:26:41.000Z | 2022-03-24T16:39:43.000Z | blogs/goes16/maria/create_image.py | laurenzberger/training-data-analyst | 3e2ef4668c5088ab50ad50a4f29673c88fb1bcd3 | [
"Apache-2.0"
] | 5,110 | 2016-05-27T13:45:18.000Z | 2022-03-31T18:40:42.000Z | #!/usr/bin/env python
"""
Copyright Google Inc. 2017
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 writ... | 38.818182 | 98 | 0.630402 |
157fd55ec2947856d748a12ea0900b1ca9a292f3 | 1,835 | py | Python | fdroid.py | anatolikalysch/APKCrawler | 6d2fde6decb4043a5a838871396f67e33657e893 | [
"MIT"
] | 10 | 2017-12-05T03:49:35.000Z | 2021-01-10T23:51:47.000Z | fdroid.py | anatolikalysch/APKCrawler | 6d2fde6decb4043a5a838871396f67e33657e893 | [
"MIT"
] | null | null | null | fdroid.py | anatolikalysch/APKCrawler | 6d2fde6decb4043a5a838871396f67e33657e893 | [
"MIT"
] | 7 | 2017-11-01T06:17:13.000Z | 2020-04-03T08:42:31.000Z | from crawler import *
class fdroid_crawler(crawler):
def __init__(self):
super().__init__('https://f-droid.org/repository/browse/',
'https://f-droid.org/repository/browse/?fdpage=2')
self.folder_name = 'fdroid/'
if not os.path.exists(self.folder_name):
... | 44.756098 | 116 | 0.497548 |
5a4cd238676b961f71fc2cd613ebf246564f948a | 596 | py | Python | problems/435.Non-overlapping_Intervals/li_1line.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/435.Non-overlapping_Intervals/li_1line.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/435.Non-overlapping_Intervals/li_1line.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | # coding=utf-8
# Author: Jianghan LI
# Question: /Users/mac/Work/LeetCode/problems/435.Non-overlapping_Intervals/li_1line.py
# Date: 2017-04-01
# Complexity: O(NlogN)
class Solution(object):
def eraseOverlapIntervals(self, intervals):
return len(intervals) - reduce(lambda res, i: (res[0] + 1, i[1]) if i[... | 29.8 | 100 | 0.563758 |
9a40c552b551319e2160027626209d71d7c0728f | 3,190 | py | Python | m1k7/views.py | octavioturra/aritial | 499f001d9f308727820736f852faca9f3a3ffed5 | [
"Apache-2.0"
] | null | null | null | m1k7/views.py | octavioturra/aritial | 499f001d9f308727820736f852faca9f3a3ffed5 | [
"Apache-2.0"
] | null | null | null | m1k7/views.py | octavioturra/aritial | 499f001d9f308727820736f852faca9f3a3ffed5 | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8 -*-
# Create your views here.
#from django.template import Context, loader
from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.api import mail
from django.shortcuts import render_to_response, get_list_or_404
from django.http import HttpResponse
from dja... | 25.934959 | 191 | 0.658621 |
60dbdcac5b50be5d7aac8fd426eb612be84284ad | 26,022 | py | Python | src/twisted/test/test_adbapi.py | apjanke/twisted | 22f949f7ce187513f0c218b73186c8a73baa00b4 | [
"Unlicense",
"MIT"
] | 1 | 2021-01-03T01:54:14.000Z | 2021-01-03T01:54:14.000Z | src/twisted/test/test_adbapi.py | zerospam/twisted | e23b5e2040a4d643bc6a43785621358569886a0d | [
"MIT",
"Unlicense"
] | null | null | null | src/twisted/test/test_adbapi.py | zerospam/twisted | e23b5e2040a4d643bc6a43785621358569886a0d | [
"MIT",
"Unlicense"
] | null | null | null | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for twisted.enterprise.adbapi.
"""
from twisted.trial import unittest
import os
import stat
from typing import Dict, Optional
from twisted.enterprise.adbapi import ConnectionPool, ConnectionLost
from twisted.enterprise.adbapi import C... | 30.013841 | 87 | 0.610483 |
35089c1301399779026925afc1ba2cf640c90e1e | 7,908 | py | Python | astroML/density_estimation/histtools.py | larsmans/astroML | 01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d | [
"BSD-2-Clause"
] | 1 | 2018-07-03T12:22:22.000Z | 2018-07-03T12:22:22.000Z | astroML/density_estimation/histtools.py | larsmans/astroML | 01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d | [
"BSD-2-Clause"
] | null | null | null | astroML/density_estimation/histtools.py | larsmans/astroML | 01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d | [
"BSD-2-Clause"
] | 1 | 2018-07-03T12:22:24.000Z | 2018-07-03T12:22:24.000Z | """
Tools for working with distributions
"""
import numpy as np
from astroML.density_estimation import bayesian_blocks
from scipy.special import gammaln
from scipy import optimize
def scotts_bin_width(data, return_bins=False):
r"""Return the optimal histogram bin width using Scott's rule:
Parameters
----... | 26.80678 | 79 | 0.57562 |
d0769b21ad66ec747f3ae882317ac2621cb2f35c | 1,456 | py | Python | django/src/attic/urls.py | SkySchermer/uweclang | c4404b550c8c1e6d22eff0a5ddeb8127080b2ad3 | [
"MIT"
] | null | null | null | django/src/attic/urls.py | SkySchermer/uweclang | c4404b550c8c1e6d22eff0a5ddeb8127080b2ad3 | [
"MIT"
] | null | null | null | django/src/attic/urls.py | SkySchermer/uweclang | c4404b550c8c1e6d22eff0a5ddeb8127080b2ad3 | [
"MIT"
] | null | null | null | """attic URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/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-based... | 46.967742 | 119 | 0.678571 |
597d38ad10d73b7e60178e6403402deab910dfb5 | 4,891 | py | Python | src/harness/cu_pass/dpa_calculator/utilities.py | NSF-Swift/Spectrum-Access-System | 02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf | [
"Apache-2.0"
] | null | null | null | src/harness/cu_pass/dpa_calculator/utilities.py | NSF-Swift/Spectrum-Access-System | 02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf | [
"Apache-2.0"
] | null | null | null | src/harness/cu_pass/dpa_calculator/utilities.py | NSF-Swift/Spectrum-Access-System | 02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf | [
"Apache-2.0"
] | null | null | null | import logging
import os
from dataclasses import dataclass
from pathlib import Path
from statistics import stdev
from typing import Callable, List, Tuple
import numpy
from numpy import asarray
from shapely import geometry
from cu_pass.dpa_calculator.constants import DPA_CALCULATOR_LOGGER_NAME, REGION_TYPE_DENSE_URBAN... | 37.914729 | 140 | 0.757309 |
ec2d4962aa934506378d6b6dbe75c02eb2aec358 | 11,269 | py | Python | conans/test/unittests/client/build/msbuild_test.py | a4z/conan | dec9e0288f81462c53b9222a206002fbc525ea65 | [
"MIT"
] | 1 | 2021-05-29T16:44:56.000Z | 2021-05-29T16:44:56.000Z | conans/test/unittests/client/build/msbuild_test.py | a4z/conan | dec9e0288f81462c53b9222a206002fbc525ea65 | [
"MIT"
] | 1 | 2020-12-21T10:06:30.000Z | 2020-12-21T10:06:30.000Z | conans/test/unittests/client/build/msbuild_test.py | a4z/conan | dec9e0288f81462c53b9222a206002fbc525ea65 | [
"MIT"
] | 1 | 2021-08-20T19:47:51.000Z | 2021-08-20T19:47:51.000Z | import os
import re
import unittest
from parameterized import parameterized
from conans.client import tools
from conans.client.build.msbuild import MSBuild
from conans.test.utils.mocks import MockSettings, MockConanfile
class MSBuildTest(unittest.TestCase):
def test_dont_mess_with_build_type(self):
set... | 46.566116 | 101 | 0.530127 |
8e2bf82ff96feffee1a5763c2a2125411edcdab8 | 4,527 | py | Python | dataio.py | entn-at/lcnn | 797d8847fad6d1179866ac2d7d7402240483123b | [
"BSD-3-Clause"
] | 15 | 2018-11-04T18:35:41.000Z | 2021-01-10T14:18:54.000Z | dataio.py | entn-at/lcnn | 797d8847fad6d1179866ac2d7d7402240483123b | [
"BSD-3-Clause"
] | 2 | 2018-11-02T20:15:53.000Z | 2019-04-13T06:55:01.000Z | dataio.py | entn-at/lcnn | 797d8847fad6d1179866ac2d7d7402240483123b | [
"BSD-3-Clause"
] | 5 | 2018-10-07T12:44:16.000Z | 2019-07-16T08:29:44.000Z | ###########################################################
## reading and saving data #
###########################################################
## Copyright (c) 2018, National Institute of Informatics #
## Author: Fuming Fang #
## Affiliation: Nat... | 34.557252 | 87 | 0.529048 |
143057a8378260c0a815a635b2c576b94e5c220a | 35 | py | Python | fourmis/__init__.py | teodam/openedx-manhill | 01892cab98cac949c0a98940eda6c6ea672c608b | [
"MIT"
] | null | null | null | fourmis/__init__.py | teodam/openedx-manhill | 01892cab98cac949c0a98940eda6c6ea672c608b | [
"MIT"
] | null | null | null | fourmis/__init__.py | teodam/openedx-manhill | 01892cab98cac949c0a98940eda6c6ea672c608b | [
"MIT"
] | null | null | null | from .fourmis import FourmisXBlock
| 17.5 | 34 | 0.857143 |
1ab0cd75cbaac355b51950e5cbb5e1155d753d9e | 39,940 | py | Python | kats/utils/backtesters.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/utils/backtesters.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/utils/backtesters.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
This file defines the BackTester classes for Kats.
Kats supports multiple types of backtesters, including:
- :class:`BackTesterSimple... | 39.50544 | 88 | 0.625138 |
9dd88ffae6284eb501aa84770febebb549d17a7a | 26 | py | Python | pyloraserver/__init__.py | dtony/pychirp | c942b84cf834e0cec3e7f60b3c7b781581478a7b | [
"MIT"
] | null | null | null | pyloraserver/__init__.py | dtony/pychirp | c942b84cf834e0cec3e7f60b3c7b781581478a7b | [
"MIT"
] | null | null | null | pyloraserver/__init__.py | dtony/pychirp | c942b84cf834e0cec3e7f60b3c7b781581478a7b | [
"MIT"
] | null | null | null | __name__ = "pyloraserver"
| 13 | 25 | 0.769231 |
0a7815fff831f5879fa38000bc17cc6db9898320 | 190 | py | Python | projects/WSL/wsl/modeling/meta_arch/__init__.py | shenyunhang/PDSL | ade1e0cf4435c9252b4384100a82bb45b026b7c2 | [
"Apache-2.0"
] | 6 | 2021-11-03T09:07:39.000Z | 2022-02-06T15:36:56.000Z | projects/WSL/wsl/modeling/meta_arch/__init__.py | shenyunhang/PDSL | ade1e0cf4435c9252b4384100a82bb45b026b7c2 | [
"Apache-2.0"
] | 2 | 2021-10-17T16:55:59.000Z | 2022-03-27T02:46:38.000Z | projects/WSL/wsl/modeling/meta_arch/__init__.py | shenyunhang/PDSL | ade1e0cf4435c9252b4384100a82bb45b026b7c2 | [
"Apache-2.0"
] | 4 | 2021-11-03T09:07:41.000Z | 2022-02-06T15:37:03.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .rcnn import GeneralizedRCNNWSL, ProposalNetworkWSL
from .mcnn import GeneralizedMCNNWSL
| 31.666667 | 70 | 0.768421 |
5aec69b4a2978d4ad505b1470112bd6ebb5c6a8b | 559 | py | Python | numberlist.py | akselsd/VisualSort | 26b5505219227c20ac1ca834bc9ec89c989af457 | [
"MIT"
] | null | null | null | numberlist.py | akselsd/VisualSort | 26b5505219227c20ac1ca834bc9ec89c989af457 | [
"MIT"
] | null | null | null | numberlist.py | akselsd/VisualSort | 26b5505219227c20ac1ca834bc9ec89c989af457 | [
"MIT"
] | null | null | null | import random
class Numbers:
def __init__(self, amount):
self.numbers = [x for x in range(1, amount+1)]
random.shuffle(self.numbers)
self.sorted_numbers = sorted(self.numbers)
# 1 is correct
def get_displacement_vector(self):
n = len(self.sorted_numbers)
return li... | 27.95 | 117 | 0.651163 |
f09e1acaedc0107a312f33b2e0b9af94452d349d | 1,799 | py | Python | gui/elements/_window.py | pep8speaks/napari-gui | 86a55ec4707f1775217b35ccef5ba5a2a55fff03 | [
"BSD-3-Clause"
] | null | null | null | gui/elements/_window.py | pep8speaks/napari-gui | 86a55ec4707f1775217b35ccef5ba5a2a55fff03 | [
"BSD-3-Clause"
] | null | null | null | gui/elements/_window.py | pep8speaks/napari-gui | 86a55ec4707f1775217b35ccef5ba5a2a55fff03 | [
"BSD-3-Clause"
] | null | null | null | from PyQt5.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QLabel
from PyQt5.QtCore import Qt
from ._viewer import Viewer
class Window:
"""Application window that contains the menu bar and viewers.
Parameters
----------
viewer : Viewer
Contained viewer.
Attributes
----------
... | 26.455882 | 69 | 0.611451 |
0b1a346534dc65b830cd6d9d6ab70680de82faae | 36 | py | Python | system/__init__.py | philgookang/Simulated_InvertedIndex_TFIDF_PageRank | 612452f50913275b818942f82da098b78956ff3a | [
"MIT"
] | null | null | null | system/__init__.py | philgookang/Simulated_InvertedIndex_TFIDF_PageRank | 612452f50913275b818942f82da098b78956ff3a | [
"MIT"
] | null | null | null | system/__init__.py | philgookang/Simulated_InvertedIndex_TFIDF_PageRank | 612452f50913275b818942f82da098b78956ff3a | [
"MIT"
] | null | null | null | from system.Database import Database | 36 | 36 | 0.888889 |
d3fbdbd22c9361e9ebcd64d2a3d6248cc1e6ec9c | 480 | py | Python | wristband/apps/serializers.py | hmrc/wristband | 35648a15b91dea4a927e486bfe0ace5e00b44dcc | [
"Apache-2.0"
] | 1 | 2015-07-14T14:32:17.000Z | 2015-07-14T14:32:17.000Z | wristband/apps/serializers.py | hmrc/wristband | 35648a15b91dea4a927e486bfe0ace5e00b44dcc | [
"Apache-2.0"
] | 4 | 2015-08-03T11:17:37.000Z | 2015-09-24T10:06:02.000Z | wristband/apps/serializers.py | hmrc/wristband | 35648a15b91dea4a927e486bfe0ace5e00b44dcc | [
"Apache-2.0"
] | 2 | 2020-05-05T13:56:47.000Z | 2021-04-10T23:51:52.000Z | from rest_framework import serializers
class NestedAppSerializer(serializers.Serializer):
name = serializers.CharField()
version = serializers.CharField()
stage = serializers.CharField()
log_url = serializers.URLField(allow_null=True)
class AppSerializer(serializers.Serializer):
name = serialize... | 28.235294 | 56 | 0.727083 |
a77cdbf2fe3c27bb6721a3052888b68fcb98595b | 6,348 | py | Python | word_language_model/model.py | dl-framework-benchmark/pytorch-examples | 9439d83c137f352347494aacf1fc45e8e2373d6e | [
"BSD-3-Clause"
] | 1 | 2020-06-16T14:51:46.000Z | 2020-06-16T14:51:46.000Z | word_language_model/model.py | ArnoutDevos/examples | 4581968193699de14b56527296262dd76ab43557 | [
"BSD-3-Clause"
] | null | null | null | word_language_model/model.py | ArnoutDevos/examples | 4581968193699de14b56527296262dd76ab43557 | [
"BSD-3-Clause"
] | 1 | 2020-07-06T01:37:28.000Z | 2020-07-06T01:37:28.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class RNNModel(nn.Module):
"""Container module with an encoder, a recurrent module, and a decoder."""
def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False):
super(RNNModel, self).__init__... | 42.039735 | 110 | 0.625709 |
79fea646368efa351c54ecefc2c88f7073e6244b | 322 | py | Python | tests/test_dataset_downloader.py | fossabot/spampy | dea667671175a3c6950413154f42298a6b75c5b2 | [
"MIT"
] | 1 | 2018-11-26T07:34:26.000Z | 2018-11-26T07:34:26.000Z | tests/test_dataset_downloader.py | fossabot/spampy | dea667671175a3c6950413154f42298a6b75c5b2 | [
"MIT"
] | null | null | null | tests/test_dataset_downloader.py | fossabot/spampy | dea667671175a3c6950413154f42298a6b75c5b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest
from spampy import dataset_downloader
class DatasetDownloaderTests(unittest.TestCase):
def test_download_enron_dataset(self):
dataset_downloader.download_enron_dataset()
self.assertTrue(os.path.exists('spampy/datasets/enron')... | 24.769231 | 64 | 0.754658 |
fab52478d4534d697a3092e3adcac526d9769fed | 1,096 | py | Python | tools/add_missing_attribution-confidence.py | dekoder/misp-galaxy | b9d54b8ad90ca80681d534c40207d015ebff31fd | [
"BSD-2-Clause",
"CC0-1.0"
] | 361 | 2016-02-29T22:26:55.000Z | 2022-03-28T08:31:09.000Z | tools/add_missing_attribution-confidence.py | dekoder/misp-galaxy | b9d54b8ad90ca80681d534c40207d015ebff31fd | [
"BSD-2-Clause",
"CC0-1.0"
] | 500 | 2016-02-29T21:25:33.000Z | 2022-03-31T10:54:54.000Z | tools/add_missing_attribution-confidence.py | dekoder/misp-galaxy | b9d54b8ad90ca80681d534c40207d015ebff31fd | [
"BSD-2-Clause",
"CC0-1.0"
] | 246 | 2016-02-29T21:13:01.000Z | 2022-03-24T10:54:34.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import argparse
import uuid
parser = argparse.ArgumentParser(description='Add missing attribution-confidence in threat-actor clusters')
parser.add_argument("-f", "--filename", required=True, help="name of the cluster")
args = parser.parse_args()
with open(ar... | 40.592593 | 162 | 0.675182 |
d01894f1ea37609ae3ff77eed8725fd0739be4b5 | 6,065 | py | Python | tracardi/process_engine/action/v1/ux/consent/plugin.py | stefaanneyts/tracardi | 1e393a78e230c2d5afc16fcf0046d7a634507dba | [
"MIT"
] | 1 | 2021-11-17T00:45:29.000Z | 2021-11-17T00:45:29.000Z | tracardi/process_engine/action/v1/ux/consent/plugin.py | stefaanneyts/tracardi | 1e393a78e230c2d5afc16fcf0046d7a634507dba | [
"MIT"
] | null | null | null | tracardi/process_engine/action/v1/ux/consent/plugin.py | stefaanneyts/tracardi | 1e393a78e230c2d5afc16fcf0046d7a634507dba | [
"MIT"
] | null | null | null | from pydantic import BaseModel, validator, AnyHttpUrl
from tracardi_plugin_sdk.domain.register import Plugin, Spec, MetaData, Documentation, PortDoc, Form, FormGroup, \
FormField, FormComponent
from tracardi_plugin_sdk.action_runner import ActionRunner
from tracardi_plugin_sdk.domain.result import Result
class C... | 38.878205 | 114 | 0.50305 |
00ec656b0eb1440fc81a26aad5cbc2d621612cb3 | 4,810 | py | Python | salt/states/slack.py | leifliddy/salt | 22edef4bdaa20502865a6710696c953260fc3f76 | [
"Apache-2.0",
"MIT"
] | null | null | null | salt/states/slack.py | leifliddy/salt | 22edef4bdaa20502865a6710696c953260fc3f76 | [
"Apache-2.0",
"MIT"
] | null | null | null | salt/states/slack.py | leifliddy/salt | 22edef4bdaa20502865a6710696c953260fc3f76 | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Send a message to Slack
=======================
This state is useful for sending messages to Slack during state runs.
.. versionadded:: 2015.5.0
.. code-block:: yaml
slack-message:
slack.post_message:
- channel: '#general'
- from_name: SuperAdmin
- messa... | 28.975904 | 84 | 0.583368 |
e1d1db5c9ede35e734943f8cc71020b6923a4620 | 135 | py | Python | src/ntf/__init__.py | Emil-501/ntf | 106c2a0ecfbdbe1f7a0297e8e86cf668dc291f2e | [
"Apache-2.0"
] | 37 | 2016-07-15T21:56:12.000Z | 2021-11-30T04:16:22.000Z | src/ntf/__init__.py | Emil-501/ntf | 106c2a0ecfbdbe1f7a0297e8e86cf668dc291f2e | [
"Apache-2.0"
] | 7 | 2017-03-12T06:55:41.000Z | 2022-03-15T14:42:23.000Z | src/ntf/__init__.py | Emil-501/ntf | 106c2a0ecfbdbe1f7a0297e8e86cf668dc291f2e | [
"Apache-2.0"
] | 21 | 2016-07-15T21:56:38.000Z | 2022-03-06T06:21:01.000Z | '''Docstring to silence pylint; ignores --ignore option for __init__.py'''
# Global config dictionary
# Populated by ntf.
config = {}
| 22.5 | 74 | 0.725926 |
aa59d870164de7b108b96e6f9d7ce2fc8a49e37c | 33,499 | py | Python | danceschool/stats/stats.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 32 | 2017-09-12T04:25:25.000Z | 2022-03-21T10:48:07.000Z | danceschool/stats/stats.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 97 | 2017-09-01T02:43:08.000Z | 2022-01-03T18:20:34.000Z | danceschool/stats/stats.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 19 | 2017-09-26T13:34:46.000Z | 2022-03-21T10:48:10.000Z | from django.db.models import Count, Avg, Sum, IntegerField, Case, When, Q, Min, FloatField, F
from django.db.models.functions import TruncDate
from django.contrib.admin.views.decorators import staff_member_required
from django.http import HttpResponse, JsonResponse
from django.utils.translation import gettext as _
from... | 35.599362 | 109 | 0.641989 |
45068171cdf2fc665b83f7d263e506d6b5389435 | 4,454 | py | Python | test/test_reversi.py | iBug/PyReversi | a8b469a5d5bf0f1f0bf5ffda1efeb9b55d5808bd | [
"MIT"
] | 1 | 2022-02-22T00:38:30.000Z | 2022-02-22T00:38:30.000Z | test/test_reversi.py | iBug/PyReversi | a8b469a5d5bf0f1f0bf5ffda1efeb9b55d5808bd | [
"MIT"
] | 1 | 2021-02-23T00:03:13.000Z | 2021-02-23T07:49:45.000Z | test/test_reversi.py | iBug/PyReversi | a8b469a5d5bf0f1f0bf5ffda1efeb9b55d5808bd | [
"MIT"
] | null | null | null | import pytest
import reversi
from reversi import Reversi
def test_globals():
assert reversi.BS == 8
assert (reversi.EMPTY, reversi.BLACK, reversi.WHITE) == (0, 1, 2)
def test_reversi_reset():
game = Reversi()
game.reset()
assert game.current == reversi.BLACK
assert len(game.history) == 0
... | 25.597701 | 93 | 0.619892 |
a2141c98d8ed6b02ef8a40b1ea423cca53a94198 | 29,439 | py | Python | integration-test/1491-brazil-shields.py | roman-ianivskyy/vector-datasource | 3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92 | [
"MIT"
] | null | null | null | integration-test/1491-brazil-shields.py | roman-ianivskyy/vector-datasource | 3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92 | [
"MIT"
] | null | null | null | integration-test/1491-brazil-shields.py | roman-ianivskyy/vector-datasource | 3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92 | [
"MIT"
] | null | null | null | from . import FixtureTest
class BrazilShieldTest(FixtureTest):
def test_trans_amazonian(self):
import dsl
z, x, y = (16, 26409, 34070)
self.generate_fixtures(
dsl.is_in('BR', z, x, y),
# https://www.openstreetmap.org/way/258644490
dsl.way(258644490, ds... | 33.955017 | 79 | 0.46007 |
f7d27e24e03dfb6b45a7e1e14c843cabdd03e346 | 39,132 | py | Python | snakemake/executors/google_lifesciences.py | nigiord/snakemake | e5171490749378328799b184e0a1dcd0a984b18f | [
"MIT"
] | 1,326 | 2019-10-04T15:11:20.000Z | 2022-03-31T18:39:40.000Z | snakemake/executors/google_lifesciences.py | nigiord/snakemake | e5171490749378328799b184e0a1dcd0a984b18f | [
"MIT"
] | 1,496 | 2019-10-04T15:15:12.000Z | 2022-03-31T23:14:33.000Z | snakemake/executors/google_lifesciences.py | nigiord/snakemake | e5171490749378328799b184e0a1dcd0a984b18f | [
"MIT"
] | 375 | 2019-10-08T21:28:51.000Z | 2022-03-28T18:44:36.000Z | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2021, Johannes Köster"
__email__ = "johannes.koester@uni-due.de"
__license__ = "MIT"
import logging
import os
import sys
import time
import shutil
import tarfile
import tempfile
from collections import namedtuple
import uuid
import re
import math
from snakemak... | 40.217883 | 338 | 0.603803 |
687fe07e957fa5ac96e11eb2881bb2435c4b5a4a | 166 | py | Python | configs/fanet/fanet_r18_1024x1024_80k_cityscapes.py | Jun-jieChen/real-time-segmentation | 22d0cb1a8a0dfa3b38f25bcd05db15f345be291a | [
"Apache-2.0"
] | 1 | 2022-03-13T11:43:44.000Z | 2022-03-13T11:43:44.000Z | configs/fanet/fanet_r18_1024x1024_80k_cityscapes.py | Jun-jieChen/real-time-segmentation | 22d0cb1a8a0dfa3b38f25bcd05db15f345be291a | [
"Apache-2.0"
] | null | null | null | configs/fanet/fanet_r18_1024x1024_80k_cityscapes.py | Jun-jieChen/real-time-segmentation | 22d0cb1a8a0dfa3b38f25bcd05db15f345be291a | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/fanet.py', '../_base_/datasets/cityscapes_1024x1024.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
]
| 33.2 | 78 | 0.680723 |
7b32bed1f11eb6d25f2d9c222688553c7c442f64 | 9,940 | py | Python | sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py | roderik/pulumi-azure | f6d0c058d6f9111a709bc5f1515d1638f9d615f0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py | roderik/pulumi-azure | f6d0c058d6f9111a709bc5f1515d1638f9d615f0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py | roderik/pulumi-azure | f6d0c058d6f9111a709bc5f1515d1638f9d615f0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 46.666667 | 228 | 0.685211 |
4fe14a5aee12800d8ac0fe3ce542a7517c3bb8e7 | 1,882 | py | Python | counterfactualms/distributions/transforms/affine.py | jcreinhold/counterfactualms | 9be5919c8885354fe1ac91c852d196969cfe16be | [
"Apache-2.0"
] | 14 | 2021-03-08T11:51:34.000Z | 2022-03-21T03:30:21.000Z | counterfactualms/distributions/transforms/affine.py | jcreinhold/counterfactualms | 9be5919c8885354fe1ac91c852d196969cfe16be | [
"Apache-2.0"
] | 1 | 2021-10-03T15:20:30.000Z | 2021-10-03T15:20:30.000Z | counterfactualms/distributions/transforms/affine.py | jcreinhold/counterfactualms | 9be5919c8885354fe1ac91c852d196969cfe16be | [
"Apache-2.0"
] | 4 | 2021-04-03T15:23:24.000Z | 2021-09-30T04:14:28.000Z | from pyro.distributions.conditional import ConditionalTransformModule
from pyro.distributions.torch_transform import TransformModule
from pyro.distributions import transforms as pyro_transforms
import torch
from torch.distributions import transforms
class LearnedAffineTransform(TransformModule, transforms.AffineTrans... | 36.192308 | 93 | 0.663656 |
7e410bf89c7168d9a1e901f2a5ad3a3d72831cfd | 1,307 | py | Python | ENV/lib/python3.5/site-packages/pyrogram/api/types/notify_users.py | block1o1/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | ENV/lib/python3.5/site-packages/pyrogram/api/types/notify_users.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | null | null | null | ENV/lib/python3.5/site-packages/pyrogram/api/types/notify_users.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free S... | 26.673469 | 74 | 0.678653 |
64aa90550ec50dbce6152e69ee40ab9bee708c05 | 8,869 | py | Python | tensorflow/python/training/adam_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 101 | 2016-12-03T11:40:52.000Z | 2017-12-23T02:02:03.000Z | tensorflow/python/training/adam_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 9 | 2016-12-14T03:27:46.000Z | 2017-09-13T02:29:07.000Z | tensorflow/python/training/adam_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 47 | 2016-12-04T12:37:24.000Z | 2018-01-14T18:13:07.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.683486 | 80 | 0.621603 |
3088297c2a2fa7fe9543aae1929c391493cd97c1 | 10,240 | py | Python | src/model/pieces/piece.py | ameyerow/Chesstrainer | 51d273cce9081b24e03a63096b1c0f6c6f0bcab6 | [
"MIT"
] | null | null | null | src/model/pieces/piece.py | ameyerow/Chesstrainer | 51d273cce9081b24e03a63096b1c0f6c6f0bcab6 | [
"MIT"
] | 1 | 2022-01-25T18:29:07.000Z | 2022-01-25T18:29:07.000Z | src/model/pieces/piece.py | ameyerow/Chesstrainer | 51d273cce9081b24e03a63096b1c0f6c6f0bcab6 | [
"MIT"
] | null | null | null | from __future__ import annotations
import abc
from typing import List, Tuple, Type
from ..pos import Pos
from ..player import Player
from ..move import Move
from ..exceptions import PieceNotFoundException
class Piece(metaclass=abc.ABCMeta):
def __init__(self, pos: Pos, player: Player, name: str):
self.po... | 38.496241 | 105 | 0.556348 |
9ee75f09747e4d1fc65b2e1c6186abe0bffc5405 | 23,622 | py | Python | questions.py | elaynelemos/m00dbot | f949a18c85a183a07fab8a884e3c7a00d3a322c8 | [
"MIT"
] | 1 | 2020-03-07T11:23:51.000Z | 2020-03-07T11:23:51.000Z | questions.py | Warlockk/m00dbot | f949a18c85a183a07fab8a884e3c7a00d3a322c8 | [
"MIT"
] | null | null | null | questions.py | Warlockk/m00dbot | f949a18c85a183a07fab8a884e3c7a00d3a322c8 | [
"MIT"
] | null | null | null | HARS_QUESTIONS = {
"ru": {
"answers": ["Отсутствует", "В слабой степени", "В умеренной степени", "В тяжелой степени", "В очень тяжелой степени"],
"questions": [
"Тревожное настроение. (озабоченность, ожидание наихудшего, тревожные опасения, раздражительность)",
"Напряжение. (... | 124.326316 | 500 | 0.709169 |
b4f15431b4f0ec62ca58e495b45e7c131c93af5e | 1,494 | py | Python | deepmosaic/repeatAnnotation.py | Virginiaxu/DeepMosaic | fe5bf9b98e36f0b9ef6bb88345d4afaa55054e96 | [
"MIT"
] | 11 | 2020-09-23T10:38:16.000Z | 2022-02-16T04:19:56.000Z | deepmosaic/repeatAnnotation.py | Virginiaxu/DeepMosaic | fe5bf9b98e36f0b9ef6bb88345d4afaa55054e96 | [
"MIT"
] | 2 | 2020-12-30T19:57:26.000Z | 2021-11-18T08:38:56.000Z | deepmosaic/repeatAnnotation.py | Virginiaxu/DeepMosaic | fe5bf9b98e36f0b9ef6bb88345d4afaa55054e96 | [
"MIT"
] | null | null | null | import sys, os
import pandas as pd
import tempfile
import subprocess
import pkg_resources
import re
#all_repeats_path = pkg_resources.resource_filename('deepmosaic', 'resources/all_repeats.b37.bed')
#segdup_path = pkg_resources.resource_filename('deepmosaic', 'resources/segdup.hg19.bed')
HERE = os.path.abspath(os.path... | 43.941176 | 115 | 0.649933 |
e6a8211dcc299f47b5df0be338e99dea67c24009 | 3,778 | py | Python | examples/01_resources_and_rendering/01_load_and_render_pygame.py | inniyah/pytmxloader | 93a4f8565300663c731b48a7ebe1c9d3b72479b2 | [
"BSD-3-Clause"
] | 1 | 2020-02-22T03:47:09.000Z | 2020-02-22T03:47:09.000Z | examples/01_resources_and_rendering/01_load_and_render_pygame.py | inniyah/pytmxloader | 93a4f8565300663c731b48a7ebe1c9d3b72479b2 | [
"BSD-3-Clause"
] | null | null | null | examples/01_resources_and_rendering/01_load_and_render_pygame.py | inniyah/pytmxloader | 93a4f8565300663c731b48a7ebe1c9d3b72479b2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This is the pygame minimal example.
"""
__revision__ = "$Rev$"
__version__ = "3.0.0." + __revision__[6:-2]
__author__ = 'DR0ID @ 2009-2011'
import sys
import os
import pygame
try:
import _path
except:
pass
import tiledtmxloader
# -------------------------... | 28.406015 | 84 | 0.57729 |
3f28bc18d4a608e91e0931e3c3779b91170e7ac8 | 5,367 | py | Python | base/lib/pythonbin/urwid/tests/test_widget.py | threefoldtech/sandbox_osx | e2a5ea812c3789dea40113719dbad6d6ee7cd720 | [
"Apache-2.0"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | base/lib/pythonbin/urwid/tests/test_widget.py | threefoldtech/sandbox_osx | e2a5ea812c3789dea40113719dbad6d6ee7cd720 | [
"Apache-2.0"
] | 3 | 2020-06-05T18:53:36.000Z | 2021-06-10T20:47:05.000Z | base/lib/pythonbin/urwid/tests/test_widget.py | threefoldtech/sandbox_osx | e2a5ea812c3789dea40113719dbad6d6ee7cd720 | [
"Apache-2.0"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z | # -*- coding: utf-8 -*-
import unittest
from urwid.compat import B
import urwid
class TextTest(unittest.TestCase):
def setUp(self):
self.t = urwid.Text("I walk the\ncity in the night")
def test1_wrap(self):
expected = [B(t) for t in ("I walk the","city in ","the night ")]
got = sel... | 34.850649 | 78 | 0.547233 |
5d71711be07f92a470c6342825830074f2011f3f | 411 | py | Python | utils/blender-export-edges/blender-export-edges.py | jmptable/spinneret | b8b24cdde062c58201329076ca77a35a69837c22 | [
"MIT"
] | 1 | 2019-03-25T13:22:04.000Z | 2019-03-25T13:22:04.000Z | utils/blender-export-edges/blender-export-edges.py | jmptable/spinneret | b8b24cdde062c58201329076ca77a35a69837c22 | [
"MIT"
] | null | null | null | utils/blender-export-edges/blender-export-edges.py | jmptable/spinneret | b8b24cdde062c58201329076ca77a35a69837c22 | [
"MIT"
] | null | null | null | import bpy
outputFile = '/tmp/mesh.csv'
csv = ''
for edge in bpy.context.object.data.edges:
xIndex = edge.vertices[0]
yIndex = edge.vertices[1]
a = bpy.context.object.data.vertices[xIndex]
b = bpy.context.object.data.vertices[yIndex]
csv += ','.join([str(c) for c in [a.co[0], a.co[1], a.co[2], ... | 21.631579 | 100 | 0.613139 |
a9405032574b968ee90e4071a8e4bec2a0a96f45 | 9,929 | py | Python | app/recipe/tests/test_recipe_api.py | reeninja/recipe-app-api | bc35887db7129e844ea177dd26402c494a629a9b | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | reeninja/recipe-app-api | bc35887db7129e844ea177dd26402c494a629a9b | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | reeninja/recipe-app-api | bc35887db7129e844ea177dd26402c494a629a9b | [
"MIT"
] | null | null | null | import tempfile
import os
from PIL import Image
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Recipe, Tag, Ingredient
from recipe.serializers import ... | 32.029032 | 78 | 0.631786 |
993481da1fc7ac36ce5a231b24b6df7e13f676d9 | 646 | py | Python | crawler/data/counter.py | manhph2211/SentimentAnalysis | dc346203137bed9b1f6892c298d9c6d621533582 | [
"MIT"
] | 4 | 2021-06-08T07:59:54.000Z | 2021-12-16T13:16:02.000Z | crawler/data/counter.py | manhph2211/SentimentAnalysis | dc346203137bed9b1f6892c298d9c6d621533582 | [
"MIT"
] | null | null | null | crawler/data/counter.py | manhph2211/SentimentAnalysis | dc346203137bed9b1f6892c298d9c6d621533582 | [
"MIT"
] | null | null | null | import pandas as pd
import glob
import json
def converter(point):
star = 0
if point >=8.5:
star = 5
elif 8.5>point>=7.5:
star = 4
elif 7.5>point>=6:
star = 3
elif 6>point>=4:
star = 2
else:
star = 1
return star
def counter():
counter = {}
for i in range(1,6):
counter[i] = 0
csv_files = gl... | 15.756098 | 55 | 0.614551 |
b5aaa4ea18c4fd57a2cf1a97450b8a7669f678fe | 8,292 | py | Python | tools/test.py | CityU-AIM-Group/HTD | 0be9fd844118c275abc6053b3cbd5ffb589e62ee | [
"MIT"
] | 5 | 2022-02-18T16:26:29.000Z | 2022-03-07T07:25:20.000Z | tools/test.py | CityU-AIM-Group/HTD | 0be9fd844118c275abc6053b3cbd5ffb589e62ee | [
"MIT"
] | 1 | 2022-02-24T12:51:19.000Z | 2022-02-28T06:31:15.000Z | tools/test.py | CityU-AIM-Group/HTD | 0be9fd844118c275abc6053b3cbd5ffb589e62ee | [
"MIT"
] | null | null | null | import argparse
import os
import warnings
import mmcv
import torch
from mmcv import Config, DictAction
from mmcv.cnn import fuse_conv_bn
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (get_dist_info, init_dist, load_checkpoint,
wrap_fp16_model)
fro... | 38.567442 | 108 | 0.63302 |
4f2f1eba21bf8fae474e132af57feccdc0fecab2 | 35,007 | py | Python | sockeye/model.py | ogunoz/sockeye | 26c02b1016b0937714ecd4ab367a6a67761ef2df | [
"Apache-2.0"
] | 3 | 2019-06-03T17:29:49.000Z | 2021-07-11T05:51:53.000Z | sockeye/model.py | ogunoz/sockeye | 26c02b1016b0937714ecd4ab367a6a67761ef2df | [
"Apache-2.0"
] | 1 | 2020-10-12T19:36:02.000Z | 2020-10-12T19:36:02.000Z | sockeye/model.py | DianaLaura/sockeye | e01e4317a1ea42ed6d6a686dbc0782b73611a7c2 | [
"Apache-2.0"
] | 1 | 2021-07-11T05:51:54.000Z | 2021-07-11T05:51:54.000Z | # Copyright 2017--2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fi... | 48.419087 | 132 | 0.632159 |
fd79aa86937eec4d8b3e63d2d9af52c0e3549b16 | 1,316 | py | Python | scTenifold/core/_ko.py | qwerty239qwe/scTenifoldpy | 655787d20c6b9d7176c33752c06d778a62487f54 | [
"MIT"
] | 3 | 2021-11-18T05:49:13.000Z | 2022-02-12T11:21:52.000Z | scTenifold/core/_ko.py | qwerty239qwe/scTenifoldpy | 655787d20c6b9d7176c33752c06d778a62487f54 | [
"MIT"
] | 4 | 2021-11-16T16:28:59.000Z | 2022-01-28T16:30:56.000Z | scTenifold/core/_ko.py | qwerty239qwe/scTenifoldpy | 655787d20c6b9d7176c33752c06d778a62487f54 | [
"MIT"
] | 2 | 2021-12-11T07:09:38.000Z | 2022-02-12T11:21:53.000Z | from typing import List
import numpy as np
import pandas as pd
from scipy.sparse import coo_matrix
from scTenifold.core._networks import make_networks
def ko_propagation(B, x, ko_gene_id, degree: int) -> np.ndarray:
adj_mat = B.copy()
np.fill_diagonal(adj_mat, 0)
x_ko = x.copy()
p = np.zeros(shape=x... | 31.333333 | 77 | 0.591185 |
c103902ec5f295334cf1410ec988b651f21ad444 | 3,351 | py | Python | doc/src/sphinx/conf.py | MBcode/clowder | 86ba0e36a38aed057bd5ca104495c5f3af67613a | [
"NCSA"
] | null | null | null | doc/src/sphinx/conf.py | MBcode/clowder | 86ba0e36a38aed057bd5ca104495c5f3af67613a | [
"NCSA"
] | null | null | null | doc/src/sphinx/conf.py | MBcode/clowder | 86ba0e36a38aed057bd5ca104495c5f3af67613a | [
"NCSA"
] | null | null | null | # Clowder documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 26 13:24:40 2014.
# Required for readthedocs. See https://github.com/readthedocs/readthedocs.org/issues/2569
master_doc = 'index'
# -- Path setup --------------------------------------------------------------
# If extensions ... | 35.648936 | 90 | 0.663682 |
dd6e75d61743072c5681af3cef146b8880c661ca | 484 | py | Python | DJANGO/trainingapp/warehouse/routers.py | NIXON707/Frameworks-7a-2020B | 6892f8dd14b4b6f54eaf06ee5365c95006d815db | [
"MIT"
] | null | null | null | DJANGO/trainingapp/warehouse/routers.py | NIXON707/Frameworks-7a-2020B | 6892f8dd14b4b6f54eaf06ee5365c95006d815db | [
"MIT"
] | null | null | null | DJANGO/trainingapp/warehouse/routers.py | NIXON707/Frameworks-7a-2020B | 6892f8dd14b4b6f54eaf06ee5365c95006d815db | [
"MIT"
] | null | null | null | class WareHouseRouter(object):
def db_for_read(self, model, **hints):
if model._meta.app_label == 'warehose' :
return 'warehouse'
return None
def db_for_write(self, model, **hints):
if model._meta.app_label == 'warehose' :
return 'warehouse'
return None
... | 30.25 | 68 | 0.592975 |
16fc1f9994285481d8ccc79e478ce85824979c61 | 4,278 | py | Python | python/ray/tests/test_get_locations.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 22 | 2018-05-08T05:52:34.000Z | 2020-04-01T10:09:55.000Z | python/ray/tests/test_get_locations.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 73 | 2021-09-25T07:11:39.000Z | 2022-03-26T07:10:59.000Z | python/ray/tests/test_get_locations.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 10 | 2018-04-27T10:50:59.000Z | 2020-02-24T02:41:43.000Z | import numpy as np
import pytest
import time
import ray
def test_uninitialized():
with pytest.raises(RuntimeError):
ray.experimental.get_object_locations([])
def test_get_locations_empty_list(ray_start_regular):
locations = ray.experimental.get_object_locations([])
assert len(locations) == 0
... | 33.162791 | 85 | 0.691211 |
5942408bde7c5235cf35fd246f9540f8ea696f78 | 2,271 | py | Python | tools/convert_from_gluoncv.py | kbyran/poi | 95d7a06c0aaf4a97050247b0d079c9dd4b850724 | [
"Apache-2.0"
] | 6 | 2020-05-28T18:10:47.000Z | 2021-12-20T02:08:08.000Z | tools/convert_from_gluoncv.py | kbyran/poi | 95d7a06c0aaf4a97050247b0d079c9dd4b850724 | [
"Apache-2.0"
] | 3 | 2021-03-22T08:44:22.000Z | 2021-11-28T09:10:30.000Z | tools/convert_from_gluoncv.py | kbyran/poi | 95d7a06c0aaf4a97050247b0d079c9dd4b850724 | [
"Apache-2.0"
] | 2 | 2020-10-09T00:25:39.000Z | 2020-10-09T00:25:40.000Z | import os
import mxnet as mx
from gluoncv.model_zoo.model_store import get_model_file
mxnet_gluon_repo = os.environ.get("MXNET_GLUON_REPO", None)
if not mxnet_gluon_repo:
os.environ["MXNET_GLUON_REPO"] = "https://apache-mxnet.s3.cn-north-1.amazonaws.com.cn"
num_layers = 50
version = 1
pretrained = True
root = "./... | 32.913043 | 93 | 0.534566 |
b560ad180ced689435b794517b00a719e05b1c48 | 18,383 | py | Python | yolov5s/utils/plots.py | funny000/python_project | 190289765d0bdd908ce289c78969b3702a2c4292 | [
"MIT"
] | null | null | null | yolov5s/utils/plots.py | funny000/python_project | 190289765d0bdd908ce289c78969b3702a2c4292 | [
"MIT"
] | null | null | null | yolov5s/utils/plots.py | funny000/python_project | 190289765d0bdd908ce289c78969b3702a2c4292 | [
"MIT"
] | null | null | null | # Plotting utils
import glob
import math
import os
import random
from copy import copy
from pathlib import Path
import cv2
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import torch
import yaml
from PIL import Image, ImageDraw, ImageFont
from scipy.sign... | 42.25977 | 120 | 0.576511 |
342d8c38ec77fd319fa9407adef6d61fd03581e4 | 76 | py | Python | src/masonite/drivers/session/__init__.py | josephmancuso/masonite | e9ed31331268bd4966609fbc1e5c55afa5cb0a79 | [
"MIT"
] | 35 | 2018-01-08T01:20:16.000Z | 2018-02-06T02:37:14.000Z | src/masonite/drivers/session/__init__.py | josephmancuso/masonite | e9ed31331268bd4966609fbc1e5c55afa5cb0a79 | [
"MIT"
] | 55 | 2018-01-03T02:42:03.000Z | 2018-02-06T13:35:54.000Z | src/masonite/drivers/session/__init__.py | josephmancuso/masonite | e9ed31331268bd4966609fbc1e5c55afa5cb0a79 | [
"MIT"
] | 4 | 2018-01-08T13:13:14.000Z | 2018-01-12T19:35:32.000Z | from .CookieDriver import CookieDriver
from .RedisDriver import RedisDriver
| 25.333333 | 38 | 0.868421 |
5be01b88750999d93577e3db462452641696487c | 407 | py | Python | scripts/fig6/fig6.py | julesvidal/wasserstein-pd-barycenter | 1f62a5e1c40700030357b2bfb9a2f86fe4736861 | [
"BSD-Source-Code"
] | 1 | 2019-09-10T12:36:52.000Z | 2019-09-10T12:36:52.000Z | scripts/fig6/fig6.py | julesvidal/wasserstein-pd-barycenter | 1f62a5e1c40700030357b2bfb9a2f86fe4736861 | [
"BSD-Source-Code"
] | null | null | null | scripts/fig6/fig6.py | julesvidal/wasserstein-pd-barycenter | 1f62a5e1c40700030357b2bfb9a2f86fe4736861 | [
"BSD-Source-Code"
] | 1 | 2021-04-28T12:36:58.000Z | 2021-04-28T12:36:58.000Z | import matplotlib.pyplot as plt
import csv
x=[]
y=[]
with open('energy.txt','r') as file:
plots = csv.reader(file,delimiter='\t')
next(plots)
for row in plots:
x.append(float(row[1]))
y.append(float(row[0]))
plt.loglog(x,y,color='orange',linewidth=3)
plt.xlabel('time(s)')
plt.ylabel('ener... | 19.380952 | 43 | 0.641278 |
b104d10100778496972216388b6dfbe70e651aa7 | 420 | py | Python | plugins/sentry/girder_sentry/__init__.py | RemiCecchinato/girder | 455d5c60d59112b65b45daf51c2d2ccda2e84a9a | [
"Apache-2.0"
] | null | null | null | plugins/sentry/girder_sentry/__init__.py | RemiCecchinato/girder | 455d5c60d59112b65b45daf51c2d2ccda2e84a9a | [
"Apache-2.0"
] | null | null | null | plugins/sentry/girder_sentry/__init__.py | RemiCecchinato/girder | 455d5c60d59112b65b45daf51c2d2ccda2e84a9a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sentry_sdk
from girder.plugin import GirderPlugin
from girder.models.setting import Setting
from . import rest
from .settings import PluginSettings
class SentryPlugin(GirderPlugin):
DISPLAY_NAME = 'Sentry'
CLIENT_SOURCE_PATH = 'web_client'
def load(self, info):
inf... | 23.333333 | 62 | 0.721429 |
3c308b5aeafa2ab3fa9a508ee7901e6ab47bf7aa | 5,255 | py | Python | dateparser/data/date_translation_data/ast.py | bsekiewicz/dateparser | babc677372376d933de5542010af3097c26e49e9 | [
"BSD-3-Clause"
] | 1,804 | 2015-01-01T23:01:54.000Z | 2022-03-30T18:36:16.000Z | dateparser/data/date_translation_data/ast.py | bsekiewicz/dateparser | babc677372376d933de5542010af3097c26e49e9 | [
"BSD-3-Clause"
] | 948 | 2015-01-04T22:18:39.000Z | 2022-03-31T16:29:41.000Z | dateparser/data/date_translation_data/ast.py | bsekiewicz/dateparser | babc677372376d933de5542010af3097c26e49e9 | [
"BSD-3-Clause"
] | 463 | 2015-01-10T08:53:39.000Z | 2022-03-18T12:45:49.000Z | info = {
"name": "ast",
"date_order": "DMY",
"january": [
"de xineru",
"xin",
"xineru"
],
"february": [
"de febreru",
"feb",
"febreru"
],
"march": [
"de marzu",
"mar",
"marzu"
],
"april": [
"abr",
... | 18.701068 | 34 | 0.26451 |
d14f626f585c749733b2b7df5ec68076f4976328 | 8,626 | py | Python | tests/test_model.py | tmuntianu/supereeg | cd6e3ca1a898f091ef2696281c9ea32d1baf3eea | [
"MIT"
] | 27 | 2018-03-30T22:15:18.000Z | 2022-03-18T02:53:18.000Z | tests/test_model.py | tmuntianu/supereeg | cd6e3ca1a898f091ef2696281c9ea32d1baf3eea | [
"MIT"
] | 86 | 2018-03-30T02:58:18.000Z | 2021-07-07T01:45:31.000Z | tests/test_model.py | tmuntianu/supereeg | cd6e3ca1a898f091ef2696281c9ea32d1baf3eea | [
"MIT"
] | 16 | 2018-03-30T03:04:00.000Z | 2020-03-20T16:51:29.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
#from builtins import range
import supereeg as se
import numpy as np
import scipy
import pytest
# some example locations
locs = np.array([[-61., -77., -3.],
[-41., -77., -23.],
[-21., -97., 17.],
[-21.,... | 35.792531 | 95 | 0.667633 |
99520d7e42f58e7453927a6f86837ea61248e3e7 | 409 | py | Python | diventi/ebooks/migrations/0044_auto_20190603_1348.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 2 | 2019-06-27T16:00:17.000Z | 2020-08-14T07:46:05.000Z | diventi/ebooks/migrations/0044_auto_20190603_1348.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 26 | 2020-02-15T22:39:35.000Z | 2022-02-19T21:09:01.000Z | diventi/ebooks/migrations/0044_auto_20190603_1348.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 1 | 2021-11-12T22:30:15.000Z | 2021-11-12T22:30:15.000Z | # Generated by Django 2.2.1 on 2019-06-03 11:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ebooks', '0043_auto_20190531_0751'),
]
operations = [
migrations.RemoveField(
model_name='section',
name='category',
... | 19.47619 | 47 | 0.577017 |
2c807dcc1e5c8ce2a775f48566b30cf829f6228a | 911 | py | Python | alipay/aop/api/response/AlipayOpenSearchOrderdetailQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOpenSearchOrderdetailQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOpenSearchOrderdetailQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.SearchOrderDetailData import SearchOrderDetailData
class AlipayOpenSearchOrderdetailQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenSe... | 30.366667 | 113 | 0.713502 |
d37b082bccb118e6c782ea983d185d2b961d774d | 4,802 | py | Python | tool/filter.py | FREEWING-JP/PiDAS | 30295238c23273a266a99547e2862425f9cf0fe1 | [
"Apache-2.0"
] | 1 | 2021-12-06T01:55:19.000Z | 2021-12-06T01:55:19.000Z | tool/filter.py | nrck/PiDAS | 2dfc2982cd497e3c25df988e9ecdc60173c5918e | [
"Apache-2.0"
] | null | null | null | tool/filter.py | nrck/PiDAS | 2dfc2982cd497e3c25df988e9ecdc60173c5918e | [
"Apache-2.0"
] | null | null | null | import math
class Filter():
def __init__(self, sampling_hz):
self.__dt = 1.0 / sampling_hz
self.__f0 = 0.45
self.__f1 = 7.0
self.__f2 = 0.5
self.__f3 = 12.0
self.__f4 = 20.0
self.__f5 = 30.0
self.__h2a = 1.0
self.__h2b = 0.75
... | 35.835821 | 145 | 0.520408 |
c2ea6c45305731a55ec84c58f7c0aaae7e643cf6 | 98 | py | Python | __getPythonSitePackages.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | __getPythonSitePackages.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | __getPythonSitePackages.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | '''a Python program to locate Python site-packages.'''
import site;
print(site.getsitepackages()) | 32.666667 | 54 | 0.755102 |
0e5e054ccccec636c29789a55521e54f03f08bfe | 2,004 | py | Python | reshapr/cli/commands.py | UBC-MOAD/Reshapr | 652e7e7d1b2556f77421d2e6228cf183dfff7d41 | [
"Apache-2.0"
] | null | null | null | reshapr/cli/commands.py | UBC-MOAD/Reshapr | 652e7e7d1b2556f77421d2e6228cf183dfff7d41 | [
"Apache-2.0"
] | 16 | 2022-02-04T22:26:07.000Z | 2022-03-23T17:43:32.000Z | reshapr/cli/commands.py | UBC-MOAD/Reshapr | 652e7e7d1b2556f77421d2e6228cf183dfff7d41 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 – present, UBC EOAS MOAD Group and The University of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# U... | 32.322581 | 96 | 0.683134 |
08e6dbb57d60239cf5dce8b19a78fa8770c40697 | 16,394 | py | Python | tensorflow/tensorboard/backend/event_processing/event_multiplexer.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 22 | 2017-06-26T01:27:45.000Z | 2021-06-23T10:00:31.000Z | tensorflow/tensorboard/backend/event_processing/event_multiplexer.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | tensorflow/tensorboard/backend/event_processing/event_multiplexer.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 38 | 2017-04-28T04:15:48.000Z | 2019-09-28T05:11:46.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.368973 | 80 | 0.685068 |
8b8eb45a222442856a763db264d3838fe2ea53c5 | 21,202 | py | Python | tests/components/hue/test_sensor_base.py | tizzen33/core | 2a1884a1f7a07848b8b63afd29f59c81f1ffaf62 | [
"Apache-2.0"
] | 7 | 2019-08-15T13:36:58.000Z | 2020-03-18T10:46:29.000Z | tests/components/hue/test_sensor_base.py | tizzen33/core | 2a1884a1f7a07848b8b63afd29f59c81f1ffaf62 | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | tests/components/hue/test_sensor_base.py | tizzen33/core | 2a1884a1f7a07848b8b63afd29f59c81f1ffaf62 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Philips Hue sensors platform tests."""
import asyncio
from unittest.mock import Mock
import aiohue
import pytest
from homeassistant.components import hue
from homeassistant.components.hue import sensor_base
from homeassistant.components.hue.hue_event import CONF_HUE_EVENT
from homeassistant.const import ENTITY_CAT... | 34.252019 | 85 | 0.639468 |
959489cd42ab189d493cf2939fae427e1ddc59ed | 2,716 | py | Python | model/cnn.py | dehuachen/mem_cnn_sim | 3262a9b607a5aafccbe4e5a665e74a7cde926da3 | [
"MIT"
] | null | null | null | model/cnn.py | dehuachen/mem_cnn_sim | 3262a9b607a5aafccbe4e5a665e74a7cde926da3 | [
"MIT"
] | null | null | null | model/cnn.py | dehuachen/mem_cnn_sim | 3262a9b607a5aafccbe4e5a665e74a7cde926da3 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
from torch.nn import functional as F
from torch.autograd import Variable as V
class CNN(nn.Module):
def __init__(self, param, embedding=None):
super(CNN, self).__init__()
self.param = param
self.vocab_size = param['cand_vocab_size']
self.embedd... | 36.702703 | 94 | 0.618925 |
99165326b771f2352d0ff5dcf51385da14fedd02 | 5,417 | py | Python | lib/model/dense_align/box_3d.py | mit-drl/Stereo-RCNN | 63c6ab98b7a5e36c7bcfdec4529804fc940ee900 | [
"MIT"
] | 681 | 2019-04-10T08:24:25.000Z | 2022-03-31T20:15:05.000Z | lib/model/dense_align/box_3d.py | xinCNnix/Stereo-RCNN | 63c6ab98b7a5e36c7bcfdec4529804fc940ee900 | [
"MIT"
] | 83 | 2019-04-12T11:19:08.000Z | 2022-03-16T07:02:52.000Z | lib/model/dense_align/box_3d.py | xinCNnix/Stereo-RCNN | 63c6ab98b7a5e36c7bcfdec4529804fc940ee900 | [
"MIT"
] | 182 | 2019-04-10T09:06:08.000Z | 2022-03-15T02:18:52.000Z | import random
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision.models as models
from torch.autograd import Variable
import numpy as np
from model.utils import kitti_utils
import math as m
class Box3d(nn.Module):
def __init__(self, poses):
... | 51.103774 | 128 | 0.525568 |
b179522632a9cedd65fde08bc2acb3a3e2c5337b | 3,593 | py | Python | iss/test/test_generator.py | standage/InSilicoSeq | cd73724c65f2227ff90504f4367f9699840e09e9 | [
"MIT"
] | null | null | null | iss/test/test_generator.py | standage/InSilicoSeq | cd73724c65f2227ff90504f4367f9699840e09e9 | [
"MIT"
] | null | null | null | iss/test/test_generator.py | standage/InSilicoSeq | cd73724c65f2227ff90504f4367f9699840e09e9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from iss import generator
from iss.util import cleanup
from iss.error_models import ErrorModel, basic, kde
from Bio.Seq import Seq
from Bio.Alphabet import IUPAC
from Bio.SeqRecord import SeqRecord
from nose.tools import with_setup... | 28.515873 | 79 | 0.608127 |
a19fc018eed4af406c5975af7066f06e828aeba5 | 18,451 | py | Python | test/functional/test_framework/comptool.py | BradVer/Titan | 69aa5de8e9cdc8b843f11a7fed3a9defe4d9ae22 | [
"MIT"
] | 7 | 2019-04-04T01:15:13.000Z | 2021-11-11T08:19:23.000Z | test/functional/test_framework/comptool.py | BradVer/Titan | 69aa5de8e9cdc8b843f11a7fed3a9defe4d9ae22 | [
"MIT"
] | 3 | 2019-10-16T18:02:29.000Z | 2020-08-18T14:57:45.000Z | test/functional/test_framework/comptool.py | BradVer/Titan | 69aa5de8e9cdc8b843f11a7fed3a9defe4d9ae22 | [
"MIT"
] | 23 | 2019-04-18T05:07:49.000Z | 2021-10-03T04:51:20.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Copyright (c) 2017 The Raven Core developers
# Copyright (c) 2018 The Titancoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Compa... | 45.112469 | 149 | 0.601593 |
736462c9e5f9a883c30ca823dfa3f76c51fda70b | 984 | py | Python | EE.py | boyuanzheng010/bert_clsutering | 3d2193542989fa799d8004f2e386b33c79ca3a1a | [
"MIT"
] | 6 | 2020-08-19T08:38:28.000Z | 2022-02-16T16:00:32.000Z | EE.py | boyuanzheng010/bert_clsutering | 3d2193542989fa799d8004f2e386b33c79ca3a1a | [
"MIT"
] | 2 | 2020-06-27T00:57:26.000Z | 2021-10-31T15:30:34.000Z | EE.py | boyuanzheng010/bert_clsutering | 3d2193542989fa799d8004f2e386b33c79ca3a1a | [
"MIT"
] | 4 | 2020-06-15T15:45:09.000Z | 2022-01-20T03:40:52.000Z | # -*- coding: utf-8 -*-
import os
import ResponseHandler
import subprocess
import urllib
import dist_v2
import urllib.parse
singleton = None
try:
from subprocess import DEVNULL # Python 3.
except ImportError:
DEVNULL = open(os.devnull, 'wb')
class EE(ResponseHandler.ResponseHandler):
def handler(self,write_... | 20.5 | 202 | 0.692073 |
3a414a81176f00e43ddd3ec24ba895d47b628f89 | 8,788 | py | Python | qa/rpc-tests/bip9-softforks.py | mirzaei-ce/core-bbbit | 52b1ba0bd0fc847ba324bd39faf64f4eb40bfb72 | [
"MIT"
] | null | null | null | qa/rpc-tests/bip9-softforks.py | mirzaei-ce/core-bbbit | 52b1ba0bd0fc847ba324bd39faf64f4eb40bfb72 | [
"MIT"
] | null | null | null | qa/rpc-tests/bip9-softforks.py | mirzaei-ce/core-bbbit | 52b1ba0bd0fc847ba324bd39faf64f4eb40bfb72 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from... | 39.945455 | 110 | 0.664087 |
969a2877083c40ecba51c28450913f934e1b140e | 825 | py | Python | pydungeon/utils/config.py | bayleaf1130/pydungeon | fbfa860fdc089d3774b5fa5056458018cff12fc3 | [
"MIT"
] | 1 | 2019-04-18T15:12:20.000Z | 2019-04-18T15:12:20.000Z | pydungeon/utils/config.py | bayleaf1130/pydungeon | fbfa860fdc089d3774b5fa5056458018cff12fc3 | [
"MIT"
] | null | null | null | pydungeon/utils/config.py | bayleaf1130/pydungeon | fbfa860fdc089d3774b5fa5056458018cff12fc3 | [
"MIT"
] | 2 | 2020-03-03T15:02:02.000Z | 2020-04-26T02:05:45.000Z | ''' Configuration file manipulator '''
# Standard Imports
import yaml
# Third Party Imports
# None
# Local Imports
from pydungeon import logger
class Config(object):
def __init__(self, config_name):
self._config_name = config_name
def load(self):
with open(self._config_name, 'r') as stream... | 25 | 92 | 0.624242 |
1354915140d7d7e8eb6791bd17be5654d3bf7a9b | 3,069 | py | Python | qa/rpc-tests/invalidateblock.py | MCLXI/BKS | 6653d0b106151045ac6e3ceb24aab55354ac2e83 | [
"MIT"
] | null | null | null | qa/rpc-tests/invalidateblock.py | MCLXI/BKS | 6653d0b106151045ac6e3ceb24aab55354ac2e83 | [
"MIT"
] | null | null | null | qa/rpc-tests/invalidateblock.py | MCLXI/BKS | 6653d0b106151045ac6e3ceb24aab55354ac2e83 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test InvalidateBlock code
#
from test_framework.test_framework import BKSTestFramework
from test_fra... | 39.857143 | 95 | 0.640925 |
12235fcf3088c328b817a6a0534f4530e9479b62 | 2,640 | py | Python | ansible/environments/prod/dynamic_inventory.py | Otus-DevOps-2021-08/asm-n_infra | 91785da1f83d74794964e405ab2470c046999bc8 | [
"MIT"
] | null | null | null | ansible/environments/prod/dynamic_inventory.py | Otus-DevOps-2021-08/asm-n_infra | 91785da1f83d74794964e405ab2470c046999bc8 | [
"MIT"
] | 1 | 2021-11-03T19:03:08.000Z | 2021-11-03T19:03:08.000Z | ansible/environments/prod/dynamic_inventory.py | Otus-DevOps-2021-08/asm-n_infra | 91785da1f83d74794964e405ab2470c046999bc8 | [
"MIT"
] | 1 | 2021-09-22T22:36:01.000Z | 2021-09-22T22:36:01.000Z | #!/usr/bin/python3
import os
import json
import subprocess
TERRAFORM_STATE_DIR = "../terraform/prod/"
DEFAULT_INVENTORY_FILEPATH = "./dynamic_inventory.json"
def ReadTerraformState(terraformDir: str) -> dict:
oldCwd = os.getcwd()
terraformState = dict()
try:
os.chdir(terraformDir)
terraformStateJson ... | 27.5 | 117 | 0.681439 |
d327f52987e3003554b412cd241d4f6a805307b0 | 430 | py | Python | mysql_connection_pool/default_settings.py | maypimentel/mysql_connection_pool | a6d193ee62d24fbc9aec449dd3bc9bf00375927d | [
"MIT"
] | null | null | null | mysql_connection_pool/default_settings.py | maypimentel/mysql_connection_pool | a6d193ee62d24fbc9aec449dd3bc9bf00375927d | [
"MIT"
] | null | null | null | mysql_connection_pool/default_settings.py | maypimentel/mysql_connection_pool | a6d193ee62d24fbc9aec449dd3bc9bf00375927d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from decouple import config
POOL_NAME = config('POOL_NAME', default='mypool')
MYSQL_HOST = config('MYSQL_HOST', default='mysql')
MYSQL_PORT = config('MYSQL_PORT', default=3306, cast=int)
MYSQL_USER = config('MYSQL_USER', default='user')
MYSQL_PASSWORD ... | 39.090909 | 62 | 0.702326 |
22c56f76cafec045b3f7d48e3025ac499cf16186 | 2,459 | py | Python | gcloud/apigw/views/node_callback.py | DomineCore/bk-sops | 1461d7d80d979778cf9dafb62819c3234387fabc | [
"Apache-2.0"
] | 881 | 2019-03-25T02:45:42.000Z | 2022-03-30T09:10:49.000Z | gcloud/apigw/views/node_callback.py | DomineCore/bk-sops | 1461d7d80d979778cf9dafb62819c3234387fabc | [
"Apache-2.0"
] | 3,303 | 2019-03-25T04:18:03.000Z | 2022-03-31T11:52:03.000Z | gcloud/apigw/views/node_callback.py | DomineCore/bk-sops | 1461d7d80d979778cf9dafb62819c3234387fabc | [
"Apache-2.0"
] | 395 | 2019-03-25T02:53:36.000Z | 2022-03-31T08:37:28.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 39.66129 | 115 | 0.763318 |
c24892c6fc23265fedb1d934dfc26bdf471f58e3 | 2,313 | py | Python | tests/unit_test/hashing/test_hash_generator.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 52 | 2018-08-24T02:28:43.000Z | 2021-07-06T04:44:22.000Z | tests/unit_test/hashing/test_hash_generator.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 62 | 2018-09-17T06:59:16.000Z | 2021-12-15T06:02:51.000Z | tests/unit_test/hashing/test_hash_generator.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 35 | 2018-09-14T02:42:10.000Z | 2022-02-05T10:34:46.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 ICON Foundation
#
# 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 ... | 35.584615 | 129 | 0.629053 |
100ba592ddc854953ab0511026ead31c6f669b75 | 17,732 | py | Python | octaviaclient/osc/v2/pool.py | bizflycloud/python-octaviaclient | bf2ab57bba88f2e0a73c2b76483b8b2249f3773e | [
"Apache-2.0"
] | 17 | 2017-03-24T10:16:08.000Z | 2020-11-04T07:58:34.000Z | octaviaclient/osc/v2/pool.py | bizflycloud/python-octaviaclient | bf2ab57bba88f2e0a73c2b76483b8b2249f3773e | [
"Apache-2.0"
] | 2 | 2019-02-06T12:30:31.000Z | 2021-07-16T06:25:40.000Z | octaviaclient/osc/v2/pool.py | bizflycloud/python-octaviaclient | bf2ab57bba88f2e0a73c2b76483b8b2249f3773e | [
"Apache-2.0"
] | 12 | 2017-04-19T00:28:16.000Z | 2021-07-15T04:58:03.000Z | # Copyright 2017 GoDaddy
# Copyright 2019 Red Hat, Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 33.775238 | 79 | 0.556226 |
a1397727634e6e5a7babbaa5feb3d4f3b1178e90 | 5,103 | py | Python | scripts/Augmentation/bbox_aug.py | GSteinberg/mmdetection | 2306846b7441860592119a9149e24c7707eaa7a7 | [
"Apache-2.0"
] | null | null | null | scripts/Augmentation/bbox_aug.py | GSteinberg/mmdetection | 2306846b7441860592119a9149e24c7707eaa7a7 | [
"Apache-2.0"
] | null | null | null | scripts/Augmentation/bbox_aug.py | GSteinberg/mmdetection | 2306846b7441860592119a9149e24c7707eaa7a7 | [
"Apache-2.0"
] | null | null | null | import albumentations as A
import cv2
import argparse
import os
import json
from progress.bar import IncrementalBar
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Augment images')
parser.add_argument('--input_dir', dest='input_dir',
... | 29.49711 | 114 | 0.550461 |
556102740e629a611281bc0c94979a88674b991c | 2,430 | py | Python | t/compile3_test.py | lmr/Template-Toolkit-Python | 3b1affc79c2f650b057956b0dbf6e0cb51515999 | [
"Artistic-2.0"
] | 2 | 2021-05-07T08:50:06.000Z | 2021-06-12T15:48:23.000Z | t/compile3_test.py | lmr/Template-Toolkit-Python | 3b1affc79c2f650b057956b0dbf6e0cb51515999 | [
"Artistic-2.0"
] | 1 | 2018-11-29T08:49:42.000Z | 2018-11-29T08:49:42.000Z | t/compile3_test.py | lmr/Template-Toolkit-Python | 3b1affc79c2f650b057956b0dbf6e0cb51515999 | [
"Artistic-2.0"
] | null | null | null | import os
import shutil
import time
from template import Template, TemplateException
from template.test import TestCase, main
def append_file(path, text):
time.sleep(2) # Ensure file time stamps are different.
fh = open(path, "a")
fh.write(text)
fh.close()
class CompileTest(TestCase):
def test... | 31.973684 | 78 | 0.619342 |
a11af4b5de0abfe0c9fdd6b51d84a084c93508ad | 3,417 | py | Python | tests.py | UiO-CS/tf-wavelets | 11da39282acc70f38b16330c3473ac43fdfb4353 | [
"MIT"
] | 45 | 2018-09-11T10:12:44.000Z | 2022-01-12T04:21:08.000Z | tests.py | UiO-CS/tf-wavelets | 11da39282acc70f38b16330c3473ac43fdfb4353 | [
"MIT"
] | 7 | 2019-03-02T12:57:07.000Z | 2021-07-24T04:16:30.000Z | tests.py | UiO-CS/tf-wavelets | 11da39282acc70f38b16330c3473ac43fdfb4353 | [
"MIT"
] | 12 | 2019-03-03T14:59:26.000Z | 2022-01-14T19:59:08.000Z | import tfwavelets as tfw
import numpy as np
def check_orthonormality_1d(wavelet, tol=1e-5, N=8):
matrix = np.zeros((N, N))
for i in range(N):
unit = np.zeros(N)
unit[i] = 1
matrix[:, i] = tfw.wrappers.dwt1d(unit, wavelet)
error1 = np.mean(np.abs(matrix.T @ matrix - np.eye(N)))
... | 23.565517 | 69 | 0.671642 |
2237660edc2b315c6d1a8e947bbdd55091f794e0 | 2,765 | py | Python | src/ros_vision_interaction/examples/example_interaction.py | HaaaO/vision-project | 72256af07834195cfe52ac344aee5effcd0da978 | [
"MIT"
] | null | null | null | src/ros_vision_interaction/examples/example_interaction.py | HaaaO/vision-project | 72256af07834195cfe52ac344aee5effcd0da978 | [
"MIT"
] | 21 | 2020-09-09T18:55:58.000Z | 2021-07-26T19:42:46.000Z | src/ros_vision_interaction/examples/example_interaction.py | HaaaO/vision-project | 72256af07834195cfe52ac344aee5effcd0da978 | [
"MIT"
] | 6 | 2020-12-20T17:19:29.000Z | 2021-08-09T22:33:04.000Z | #!/usr/bin/env python
import datetime
import logging
import os
import random
import rospy
import schedule
from interaction_engine.cordial_interface import CordialInterface
from interaction_engine.database import Database
from interaction_engine.int_engine import InteractionEngine
from interaction_engine.message impor... | 24.469027 | 71 | 0.725859 |
ed60f58b3baaeebe8fc9b86b0abd0c6cab8a21fa | 1,726 | py | Python | from_cpython/Lib/test/test_readline.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | from_cpython/Lib/test/test_readline.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | from_cpython/Lib/test/test_readline.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | # expected: fail
"""
Very minimal unittests for parts of the readline module.
These tests were added to check that the libedit emulation on OSX and
the "real" readline have the same interface for history manipulation. That's
why the tests cover only a small subset of the interface.
"""
import unittest
from test.test_s... | 35.22449 | 76 | 0.720742 |
b08e38fa3f85e4cf4a94a1cc281d52f1681920d1 | 1,358 | py | Python | airbyte-integrations/bases/base-normalization/normalization/__init__.py | golf-canada/airbyte | a81b183a6b62d6bb4256347aaf39a3ada061aabe | [
"MIT"
] | null | null | null | airbyte-integrations/bases/base-normalization/normalization/__init__.py | golf-canada/airbyte | a81b183a6b62d6bb4256347aaf39a3ada061aabe | [
"MIT"
] | null | null | null | airbyte-integrations/bases/base-normalization/normalization/__init__.py | golf-canada/airbyte | a81b183a6b62d6bb4256347aaf39a3ada061aabe | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 Airbyte
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, modify, merge, publish, distr... | 38.8 | 78 | 0.804124 |
32b972f75aa109d86605a5334fa0fc49808e9cea | 6,319 | py | Python | modules/ui_splash_screen.py | dho-IOD/futu_algo | f4bdf5edcc261efbd252e9e9c53a89563b0ed68f | [
"Apache-2.0"
] | 66 | 2020-12-29T15:03:21.000Z | 2022-03-29T01:24:59.000Z | modules/ui_splash_screen.py | dho-IOD/futu_algo | f4bdf5edcc261efbd252e9e9c53a89563b0ed68f | [
"Apache-2.0"
] | 22 | 2020-12-29T16:57:03.000Z | 2022-03-01T08:23:37.000Z | modules/ui_splash_screen.py | dho-IOD/futu_algo | f4bdf5edcc261efbd252e9e9c53a89563b0ed68f | [
"Apache-2.0"
] | 30 | 2021-01-07T07:33:22.000Z | 2022-03-17T11:37:02.000Z | # -*- coding: utf-8 -*-
# Futu Algo: Algorithmic High-Frequency Trading Framework
#
# 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
# ... | 43.280822 | 100 | 0.647571 |
e893a13583802296359e7c2d134a28389c736089 | 1,369 | py | Python | python/scrapy/MyScrapers/MyScrapers/spiders/quotes.py | RitamDey/My-Simple-Programs | 147b455a6a40c371ec894ce979e8a61d242e03bd | [
"Unlicense"
] | 2 | 2016-10-14T16:58:05.000Z | 2017-05-04T04:59:18.000Z | python/scrapy/MyScrapers/MyScrapers/spiders/quotes.py | GreenJoey/My-Simple-Programs | 147b455a6a40c371ec894ce979e8a61d242e03bd | [
"Unlicense"
] | null | null | null | python/scrapy/MyScrapers/MyScrapers/spiders/quotes.py | GreenJoey/My-Simple-Programs | 147b455a6a40c371ec894ce979e8a61d242e03bd | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from scrapy import Spider, Request
from ..items import QuotesItem
class QuotesSpider(Spider):
name = 'quotes'
allowed_domains = ['quotes.toscrape.com']
start_urls = ['http://quotes.toscrape.com/']
def parse(self, response):
quotes_selector = '//div[@class="container"]... | 35.102564 | 114 | 0.575603 |
172fa9b9de4016d20009a8277519f349c210dbaa | 1,624 | py | Python | neutron/plugins/embrane/plugins/embrane_ml2_plugin.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 10 | 2015-09-22T10:22:53.000Z | 2016-02-25T06:12:05.000Z | neutron/plugins/embrane/plugins/embrane_ml2_plugin.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 12 | 2015-01-08T18:30:45.000Z | 2015-03-13T21:04:15.000Z | neutron/plugins/embrane/plugins/embrane_ml2_plugin.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 7 | 2015-02-05T10:23:52.000Z | 2019-05-18T17:11:19.000Z | # Copyright 2014 Embrane, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 38.666667 | 78 | 0.696429 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.