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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a376644b006550492365c205290dcf9402b67d66 | 82 | py | Python | tests/periodicities/Minute/Cycle_Minute_400_T_12.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/periodicities/Minute/Cycle_Minute_400_T_12.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/periodicities/Minute/Cycle_Minute_400_T_12.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.periodicities.period_test as per
per.buildModel((12 , 'T' , 400));
| 16.4 | 45 | 0.719512 |
ba705ce2f9456ec22b59273263a7892263c286a5 | 268 | py | Python | 07/python/07.py | serialphotog/ProjectEuler | 56354f679663d818e47330d7120e5614f7b14e41 | [
"WTFPL"
] | null | null | null | 07/python/07.py | serialphotog/ProjectEuler | 56354f679663d818e47330d7120e5614f7b14e41 | [
"WTFPL"
] | null | null | null | 07/python/07.py | serialphotog/ProjectEuler | 56354f679663d818e47330d7120e5614f7b14e41 | [
"WTFPL"
] | null | null | null | import itertools
def gen_primes():
D = {}
q = 2
while 1:
if q not in D:
yield q
D[q*q] = [q]
else:
for p in D[q]:
D.setdefault(p+q, []).append(p)
del D[q]
q += 1
primes = gen_primes()
print(next(itertools.islice(primes, 10000, None), None)) | 14.888889 | 56 | 0.574627 |
c09873b5ff313f04119b72c458644a06b003f98a | 2,819 | py | Python | fantastico/oauth2/tokengenerator_factory.py | bopopescu/fantastico | 7c95f244f0cf0239ac5408146612dd72f88d35ea | [
"MIT"
] | 2 | 2016-12-18T02:42:25.000Z | 2018-01-30T16:32:29.000Z | fantastico/oauth2/tokengenerator_factory.py | bopopescu/fantastico | 7c95f244f0cf0239ac5408146612dd72f88d35ea | [
"MIT"
] | 1 | 2020-07-28T07:16:35.000Z | 2020-07-28T07:16:35.000Z | fantastico/oauth2/tokengenerator_factory.py | bopopescu/fantastico | 7c95f244f0cf0239ac5408146612dd72f88d35ea | [
"MIT"
] | 1 | 2020-07-24T05:55:28.000Z | 2020-07-24T05:55:28.000Z | '''
Copyright 2013 Cosnita Radu Viorel
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, distribute... | 52.203704 | 130 | 0.766584 |
8e59ca5a3d6926b66ab4aedb0de4045e5dc4d165 | 207 | py | Python | Lib/site-packages/rails/tools.py | FredyJoelSis/herokuapi | e203e1c7ba70ff384d43db27f6fa8b1d56c73b76 | [
"BSD-3-Clause"
] | 15 | 2015-11-19T03:56:51.000Z | 2022-03-06T06:24:52.000Z | Lib/site-packages/rails/tools.py | FredyJoelSis/herokuapi | e203e1c7ba70ff384d43db27f6fa8b1d56c73b76 | [
"BSD-3-Clause"
] | 4 | 2015-07-31T22:12:08.000Z | 2015-09-08T17:19:00.000Z | rails/tools.py | PythonRails/pythonrails | 1e199b9da4da5b24fef39fc6212d71fc9fbb18a5 | [
"MIT"
] | 2 | 2021-09-15T02:30:27.000Z | 2022-03-23T14:13:41.000Z | """
Set of useful tools.
"""
import sys
def import_module(module_name):
"""
Improt module and return it.
"""
__import__(module_name)
module = sys.modules[module_name]
return module
| 14.785714 | 37 | 0.652174 |
50d5a8df9fb6de713247f3453c68e69aba4a17af | 1,201 | py | Python | tf/common.py | zdq0394/tflearning | 74169043c8ef6a096da2bb2235e6e1aea6c3b9b8 | [
"Apache-2.0"
] | null | null | null | tf/common.py | zdq0394/tflearning | 74169043c8ef6a096da2bb2235e6e1aea6c3b9b8 | [
"Apache-2.0"
] | null | null | null | tf/common.py | zdq0394/tflearning | 74169043c8ef6a096da2bb2235e6e1aea6c3b9b8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 27 11:26:14 2019
@author: zhangdongqi
"""
from tensorflow.python.keras.utils import get_file
import gzip
import numpy as np
def load_data(fashion=False):
base = "file:///C:/mydev/dataset/mnist/"
if fashion:
base = "file:///C:/mydev/dataset/fashion_mnist/"... | 30.794872 | 78 | 0.623647 |
82d19f1eaa4d6a0f147df51090e6af6525bd1145 | 803 | py | Python | dedoc/converters/concrete_converters/docx_converter.py | kirillskor/dedoc | 7793a1be2220a26e7520521306351dfc0a9c8d98 | [
"Apache-2.0"
] | null | null | null | dedoc/converters/concrete_converters/docx_converter.py | kirillskor/dedoc | 7793a1be2220a26e7520521306351dfc0a9c8d98 | [
"Apache-2.0"
] | null | null | null | dedoc/converters/concrete_converters/docx_converter.py | kirillskor/dedoc | 7793a1be2220a26e7520521306351dfc0a9c8d98 | [
"Apache-2.0"
] | null | null | null | import os
from dedoc.converters.concrete_converters.abstract_converter import AbstractConverter
from dedoc.extensions import converted_mimes, converted_extensions
class DocxConverter(AbstractConverter):
def __init__(self):
super().__init__()
def can_convert(self, extension: str, mime: str) -> bool:
... | 38.238095 | 115 | 0.728518 |
ca3c324032c6838e7b070c40b8d0b9151d354cde | 1,614 | py | Python | scanpipe/pipes/debian.py | msobocinsk/scancode.io | 1d7f801362faa8d13a0cad7d8987c223ee43e761 | [
"Apache-2.0"
] | 55 | 2020-09-11T11:18:18.000Z | 2022-03-26T20:47:59.000Z | scanpipe/pipes/debian.py | msobocinsk/scancode.io | 1d7f801362faa8d13a0cad7d8987c223ee43e761 | [
"Apache-2.0"
] | 327 | 2020-09-11T12:50:48.000Z | 2022-03-30T18:28:40.000Z | scanpipe/pipes/debian.py | msobocinsk/scancode.io | 1d7f801362faa8d13a0cad7d8987c223ee43e761 | [
"Apache-2.0"
] | 50 | 2020-09-15T20:34:58.000Z | 2022-03-20T07:21:57.000Z | # SPDX-License-Identifier: Apache-2.0
#
# http://nexb.com and https://github.com/nexB/scancode.io
# The ScanCode.io software is licensed under the Apache License version 2.0.
# Data generated with ScanCode.io is provided as-is without warranties.
# ScanCode is a trademark of nexB Inc.
#
# You may not use this software ... | 44.833333 | 85 | 0.762701 |
acd4c567e96363d66fb4fff8842369a7ee04ece4 | 4,282 | py | Python | create_bdd_dataset.py | hendrycks/anomaly-seg | 186ba446855207b11c3dbd3527662a9f2850c8af | [
"MIT"
] | 102 | 2019-11-25T21:16:06.000Z | 2022-03-15T02:21:29.000Z | create_bdd_dataset.py | hendrycks/anomaly-seg | 186ba446855207b11c3dbd3527662a9f2850c8af | [
"MIT"
] | 24 | 2019-12-09T03:10:33.000Z | 2022-03-21T07:22:37.000Z | create_bdd_dataset.py | hendrycks/anomaly-seg | 186ba446855207b11c3dbd3527662a9f2850c8af | [
"MIT"
] | 21 | 2019-12-04T23:09:53.000Z | 2022-03-29T10:13:08.000Z | import numpy as np
import scipy
import scipy.io as sio
import scipy.misc
from scipy.misc import imread, imsave
import matplotlib
import matplotlib.pyplot as plt
import json
import os
import os.path
from tqdm import tqdm
# replace the colors with our colors
#a = sio.loadmat("data_ADE/color150.mat")
# print(a)
colors =... | 26.109756 | 90 | 0.595283 |
b890dc03f9094790956b80d1d9ae7df2cb719431 | 459 | py | Python | validation/ref/neuron/simple_exp_synapse.py | kabicm/arbor | cfab5fd6a2e6a211c097659c96dcc098ee806e68 | [
"BSD-3-Clause"
] | null | null | null | validation/ref/neuron/simple_exp_synapse.py | kabicm/arbor | cfab5fd6a2e6a211c097659c96dcc098ee806e68 | [
"BSD-3-Clause"
] | null | null | null | validation/ref/neuron/simple_exp_synapse.py | kabicm/arbor | cfab5fd6a2e6a211c097659c96dcc098ee806e68 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#coding: utf-8
import json
import nrn_validation as V
V.override_defaults_from_args()
# dendrite geometry: 200 µm long, 1 µm diameter.
geom = [(0,1), (200, 1)]
model = V.VModel()
model.add_soma(12.6157)
model.add_dendrite('dend', geom)
model.add_exp_syn('dend')
model.add_spike(10, 0.04)
model... | 19.125 | 54 | 0.723312 |
f62cd4afa7b7b8671bec9d2aaee832efc58dc9ea | 2,070 | py | Python | aifeynman/S_brute_force.py | lacava/AI-Feynman | d53c055ca17d0684fd7ba7d72df8856668e2e132 | [
"MIT"
] | null | null | null | aifeynman/S_brute_force.py | lacava/AI-Feynman | d53c055ca17d0684fd7ba7d72df8856668e2e132 | [
"MIT"
] | null | null | null | aifeynman/S_brute_force.py | lacava/AI-Feynman | d53c055ca17d0684fd7ba7d72df8856668e2e132 | [
"MIT"
] | null | null | null |
# all the .dat files are created after I run this script
# the .scr are needed to run the fortran code
import csv
import os
import shutil
import subprocess
import sys
from subprocess import call
import numpy as np
import sympy as sp
from sympy.parsing.sympy_parser import parse_expr
from .resources import _get_resou... | 25.243902 | 97 | 0.621739 |
4692a8ef31931164db8249b4e3a34190d57bb612 | 8,631 | py | Python | salt/proxy/cimc.py | dmyerscough/salt | d7b19ab64f0695568f78c12b4ba209e033903804 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | salt/proxy/cimc.py | dmyerscough/salt | d7b19ab64f0695568f78c12b4ba209e033903804 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | salt/proxy/cimc.py | dmyerscough/salt | d7b19ab64f0695568f78c12b4ba209e033903804 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Proxy Minion interface module for managing Cisco Integrated Management Controller devices.
:codeauthor: :email:`Spencer Ervin <spencer_ervin@hotmail.com>`
:maturity: new
:depends: none
:platform: unix
This proxy minion enables Cisco Integrated Management Controller devices (hereaft... | 29.659794 | 116 | 0.592168 |
9c3be18a4a56330110fb1a82f8de528189d1382b | 933 | py | Python | test/demo_bindings.py | hujiawei-sjtu/sdf_tools | deefe5f03c062b8f312d35b3d30202f7462b3000 | [
"BSD-2-Clause"
] | 159 | 2017-04-27T00:30:13.000Z | 2022-03-16T01:35:19.000Z | test/demo_bindings.py | hujiawei-sjtu/sdf_tools | deefe5f03c062b8f312d35b3d30202f7462b3000 | [
"BSD-2-Clause"
] | 21 | 2017-08-22T23:45:30.000Z | 2021-03-04T01:59:59.000Z | test/demo_bindings.py | hujiawei-sjtu/sdf_tools | deefe5f03c062b8f312d35b3d30202f7462b3000 | [
"BSD-2-Clause"
] | 36 | 2017-03-16T23:01:20.000Z | 2022-03-29T12:50:23.000Z | #! /usr/bin/env python
import numpy as np
from time import time
import matplotlib.pyplot as plt
from sdf_tools import utils_2d
def main():
res = 0.01
x_width = 100
y_height = 100
grid_world = np.zeros([y_height, x_width], dtype=np.uint8)
grid_world[0:10, 0:10] = 1
grid_world[90:100, 90:100] =... | 23.923077 | 86 | 0.625938 |
beeba22f9fed8a30f29c586c70136ea29ccc6d7a | 583 | py | Python | app/api/v2/schemas/meetup_schema.py | erick-maina/Questioner_API | 0ffad203fd525e22b52e861ce574803a844cc3b3 | [
"MIT"
] | null | null | null | app/api/v2/schemas/meetup_schema.py | erick-maina/Questioner_API | 0ffad203fd525e22b52e861ce574803a844cc3b3 | [
"MIT"
] | 7 | 2019-01-15T12:23:59.000Z | 2019-01-20T17:32:45.000Z | app/api/v2/schemas/meetup_schema.py | erick-maina/Questioner_API | 0ffad203fd525e22b52e861ce574803a844cc3b3 | [
"MIT"
] | null | null | null | """
This contains the schema for posting meetups
"""
from marshmallow import Schema, fields
from ..utils.validations import Not_null_string
class MeetupSchema(Schema):
""" Class to validate schema for Meetup object """
location = fields.Str(required=True, validate=Not_null_string)
images = fields.List(fi... | 36.4375 | 77 | 0.766724 |
327ff82f1e07c192aa270fda9f6656d0d08d3819 | 2,249 | py | Python | sample/predator_prey/environment_simple.py | sc420/pygame-rl | f81da559385876616d99c74b43e4345f53d086d2 | [
"MIT"
] | 6 | 2019-02-18T09:34:34.000Z | 2021-11-09T06:58:02.000Z | sample/predator_prey/environment_simple.py | ebola777/pygame-soccer | f81da559385876616d99c74b43e4345f53d086d2 | [
"MIT"
] | 3 | 2019-03-14T03:10:48.000Z | 2019-07-15T08:11:25.000Z | sample/predator_prey/environment_simple.py | ebola777/pygame-soccer | f81da559385876616d99c74b43e4345f53d086d2 | [
"MIT"
] | 4 | 2019-02-13T13:41:17.000Z | 2019-07-22T13:33:15.000Z | #!/usr/bin/env python3
"""Sample: Interacting with the environment with minimal setup.
"""
# Native modules
import os
import random
# Third-party modules
import scipy.misc
# User-defined modules
import pygame_rl.scenario.predator_prey_environment as predator_prey_environment
def main():
# Initialize the random... | 33.073529 | 80 | 0.64651 |
9527ad4089fbe1f99e2c47cb80b68ba5158f38de | 8,370 | py | Python | datasets/fuss/utils.py | JustKowalski/sound_separation | 001d5d0be0b15f534cad6a5a8d31f45702505ba5 | [
"Apache-2.0"
] | 8 | 2020-06-21T06:45:28.000Z | 2021-07-21T03:24:33.000Z | datasets/fuss/utils.py | JustKowalski/sound_separation | 001d5d0be0b15f534cad6a5a8d31f45702505ba5 | [
"Apache-2.0"
] | null | null | null | datasets/fuss/utils.py | JustKowalski/sound_separation | 001d5d0be0b15f534cad6a5a8d31f45702505ba5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 40.047847 | 79 | 0.673118 |
4694499325adbc83372ba144ed4ac796d913f397 | 2,212 | py | Python | src/sentry_dingding/plugin.py | YogaXiong1/sentry-dingding | 1313a533f1ffdeca5f86353b824f9f45b1f5648d | [
"MIT"
] | null | null | null | src/sentry_dingding/plugin.py | YogaXiong1/sentry-dingding | 1313a533f1ffdeca5f86353b824f9f45b1f5648d | [
"MIT"
] | null | null | null | src/sentry_dingding/plugin.py | YogaXiong1/sentry-dingding | 1313a533f1ffdeca5f86353b824f9f45b1f5648d | [
"MIT"
] | null | null | null | # coding: utf-8
import json
import requests
from sentry.plugins.bases.notify import NotificationPlugin
import sentry_dingding
from .forms import DingDingOptionsForm
DingTalk_API = "https://oapi.dingtalk.com/robot/send?access_token={token}"
class DingDingPlugin(NotificationPlugin):
"""
Sentry plugin to sen... | 30.722222 | 90 | 0.594937 |
0ce97e3e55a4886120992445540923d534bc5b18 | 4,228 | py | Python | backend/reserve_app/migrations/0002_auto_20191213_0038.py | mmohajer9/reserve-system | 30415deb64fd6671aa4898f4374c22f642b009f5 | [
"MIT"
] | 3 | 2021-02-28T17:08:23.000Z | 2022-02-22T08:43:32.000Z | backend/reserve_app/migrations/0002_auto_20191213_0038.py | mmohajer9/reserve-system | 30415deb64fd6671aa4898f4374c22f642b009f5 | [
"MIT"
] | 8 | 2021-04-08T22:03:58.000Z | 2022-03-12T00:54:46.000Z | backend/reserve_app/migrations/0002_auto_20191213_0038.py | mmohajer9/reserve-system | 30415deb64fd6671aa4898f4374c22f642b009f5 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-12-13 00:38
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('reserve_app', '0001_init... | 47.505618 | 170 | 0.602412 |
451ccd92aee1f1bd8df4046ebf8e653719c147b0 | 217 | py | Python | src/authentication/permissions.py | Svjard/bonvoyage | 608c44bbfda0305bf2c71de84ff27c340d389288 | [
"MIT"
] | 1 | 2016-05-17T02:55:14.000Z | 2016-05-17T02:55:14.000Z | src/authentication/permissions.py | Svjard/flightpath | 608c44bbfda0305bf2c71de84ff27c340d389288 | [
"MIT"
] | null | null | null | src/authentication/permissions.py | Svjard/flightpath | 608c44bbfda0305bf2c71de84ff27c340d389288 | [
"MIT"
] | null | null | null | from rest_framework import permissions
class IsAccountOwner(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
if request.user:
return obj == request.user
return False
| 24.111111 | 54 | 0.760369 |
ee7dd6fea151b5f74628c49a2be20cb3eeb1d7dc | 203 | py | Python | lycheepy/configuration/configuration/serializers/parametric.py | gabrielbazan/lycheepy | f314d3f591f4a449b37ead9baf26b9f5d58d9f0d | [
"MIT"
] | 17 | 2018-08-14T02:42:43.000Z | 2022-02-25T00:38:47.000Z | lycheepy/configuration/configuration/serializers/parametric.py | gabrielbazan/lycheepy | f314d3f591f4a449b37ead9baf26b9f5d58d9f0d | [
"MIT"
] | 1 | 2018-11-01T02:55:01.000Z | 2018-11-01T02:55:01.000Z | lycheepy/configuration/configuration/serializers/parametric.py | gabrielbazan/lycheepy | f314d3f591f4a449b37ead9baf26b9f5d58d9f0d | [
"MIT"
] | 4 | 2018-10-30T16:01:49.000Z | 2021-06-08T20:21:07.000Z | from simplyrestful.serializers import Serializer
from models import Format, DataType
class FormatSerializer(Serializer):
model = Format
class DataTypeSerializer(Serializer):
model = DataType
| 18.454545 | 48 | 0.79803 |
7a8b9bc8c83018223580b28db60854c71ccc69e4 | 1,826 | py | Python | fabfile.py | zzz123-tech/zhanzhenblog | 0faafe4f1977b4d42bc9c5b992ab7f42bf3bfe0d | [
"MIT"
] | null | null | null | fabfile.py | zzz123-tech/zhanzhenblog | 0faafe4f1977b4d42bc9c5b992ab7f42bf3bfe0d | [
"MIT"
] | 5 | 2021-04-08T19:40:57.000Z | 2021-09-22T19:40:18.000Z | fabfile.py | zzz123-tech/zhanzhenblog | 0faafe4f1977b4d42bc9c5b992ab7f42bf3bfe0d | [
"MIT"
] | null | null | null | from fabric import task
from invoke import Responder
from _credentials import github_username, github_password
def _get_github_auth_responders():
"""
返回 GitHub 用户名密码自动填充器
"""
username_responder = Responder(
pattern="Username for 'https://github.com':",
r... | 38.041667 | 120 | 0.535597 |
67d2b6e1b642423323157bfb7c6a66d4c920cfea | 1,147 | py | Python | util/registry/aufs.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | null | null | null | util/registry/aufs.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | null | null | null | util/registry/aufs.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | null | null | null | import os
AUFS_METADATA = u".wh..wh."
AUFS_WHITEOUT = u".wh."
AUFS_WHITEOUT_PREFIX_LENGTH = len(AUFS_WHITEOUT)
def is_aufs_metadata(absolute):
""" Returns whether the given absolute references an AUFS metadata file. """
filename = os.path.basename(absolute)
return filename.startswith(AUFS_METADATA) or ab... | 32.771429 | 91 | 0.736704 |
fc95c448d2bf00d1733d739791ed16533b283a4a | 762 | py | Python | jobs.py | csothen/discord-bot | 0b770c5cc1bac4589c41da1d0157b378dd1138b9 | [
"MIT"
] | null | null | null | jobs.py | csothen/discord-bot | 0b770c5cc1bac4589c41da1d0157b378dd1138b9 | [
"MIT"
] | null | null | null | jobs.py | csothen/discord-bot | 0b770c5cc1bac4589c41da1d0157b378dd1138b9 | [
"MIT"
] | null | null | null | import os
import schedule
import datetime
import json
import discord
from dotenv import load_dotenv
ANNOUNCEMENTS_CHANNEL_ID = 835549538889891870
def check_birthday():
load_dotenv()
client = discord.Client()
client.run(os.getenv('TOKEN'))
with open('./assets/birthdays.json') as f:
birthdays ... | 27.214286 | 72 | 0.648294 |
45d2b9095b8de5c9413bc7da3b4d69fd1a344de6 | 667 | py | Python | Lambda Python - Stop & Start EC2/lambda-function-stop-ec2.py | yuelchen/AWS-Lambda | 836b82c0d70073bdd6c4890b81ed34b811477201 | [
"MIT"
] | 1 | 2020-03-24T21:09:56.000Z | 2020-03-24T21:09:56.000Z | Lambda Python - Stop & Start EC2/lambda-function-stop-ec2.py | yuelchen/aws-development | 836b82c0d70073bdd6c4890b81ed34b811477201 | [
"MIT"
] | 5 | 2021-12-14T21:00:53.000Z | 2022-01-04T16:50:56.000Z | Lambda Python - Stop & Start EC2/lambda-function-stop-ec2.py | yuelchen/starting-aws-sdk | 836b82c0d70073bdd6c4890b81ed34b811477201 | [
"MIT"
] | null | null | null | from __future__ import print_function
# importing required modules
import boto3
import logging
# setting logger configurations
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# initialize function variables
awsRegion = '' #string value of aws region (i.e. us-west-1, us-east-1, etc...)
instances = [''] #... | 29 | 80 | 0.752624 |
4716333ec78bc5d6d2b0abe075a557d20848eb39 | 20,392 | py | Python | tests/deconvolution_test.py | krishnapalS/NiftyNet | c31019b14137d5a39d59c81221fe2b8e066b38b4 | [
"Apache-2.0"
] | null | null | null | tests/deconvolution_test.py | krishnapalS/NiftyNet | c31019b14137d5a39d59c81221fe2b8e066b38b4 | [
"Apache-2.0"
] | null | null | null | tests/deconvolution_test.py | krishnapalS/NiftyNet | c31019b14137d5a39d59c81221fe2b8e066b38b4 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, print_function
import tensorflow as tf
from tensorflow.contrib.layers.python.layers import regularizers
from niftynet.layer.deconvolution import DeconvLayer
from niftynet.layer.deconvolution import DeconvolutionalLayer
from tests.niftynet_testcase import NiftyNetTestCase... | 51.236181 | 79 | 0.418056 |
9eb6b85a267950be5114933621de050ab8e571e0 | 2,056 | py | Python | synth.py | hannahrogers-google/python-pubsublite | 2af6cbbd324d9c5515e4bd68c119f1516ebf8c39 | [
"Apache-2.0"
] | null | null | null | synth.py | hannahrogers-google/python-pubsublite | 2af6cbbd324d9c5515e4bd68c119f1516ebf8c39 | [
"Apache-2.0"
] | null | null | null | synth.py | hannahrogers-google/python-pubsublite | 2af6cbbd324d9c5515e4bd68c119f1516ebf8c39 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.125 | 78 | 0.614786 |
cad69df459a3ebb37da21e5c7b13cbe31cd180da | 12,466 | py | Python | defect-location-server/algorithm/src/defect_features/features/history.py | clsaa/dop | cea6e17c8cf718de601df3991f88830fdb2e2b67 | [
"Apache-2.0"
] | 10 | 2018-12-25T02:55:54.000Z | 2019-04-15T10:04:36.000Z | defect-location-server/algorithm/src/defect_features/features/history.py | clsaa/dop | cea6e17c8cf718de601df3991f88830fdb2e2b67 | [
"Apache-2.0"
] | 100 | 2019-01-03T05:37:55.000Z | 2019-05-17T07:11:40.000Z | defect-location-server/algorithm/src/defect_features/features/history.py | nju-softeng/dop-server | cea6e17c8cf718de601df3991f88830fdb2e2b67 | [
"Apache-2.0"
] | 5 | 2018-12-24T01:51:25.000Z | 2019-03-15T01:58:56.000Z | #-*- coding: utf-8 -*-
import sys
import pdb
import psutil
import tracemalloc
from .git_commit_features import GitCommitFeatures
from copy import deepcopy
from defect_features.git_analysis.analyze_git_logs import retrieve_git_logs
from defect_features.git_analysis.analyze_git_logs import retrieve_git_log
from defect_fe... | 43.587413 | 134 | 0.535938 |
b454d749be2e79e4286c5065302da87b122cf2a0 | 7,383 | py | Python | fcn/keras_fcn/blocks.py | NickleDave/fcn-syl-seg | 90f66cc716d5564dc297ba70720b31ada2ff062c | [
"BSD-3-Clause"
] | null | null | null | fcn/keras_fcn/blocks.py | NickleDave/fcn-syl-seg | 90f66cc716d5564dc297ba70720b31ada2ff062c | [
"BSD-3-Clause"
] | null | null | null | fcn/keras_fcn/blocks.py | NickleDave/fcn-syl-seg | 90f66cc716d5564dc297ba70720b31ada2ff062c | [
"BSD-3-Clause"
] | null | null | null | import keras.backend as K
from keras.layers import (
Dropout,
Lambda
)
from keras.layers.convolutional import (
Conv2D,
Conv2DTranspose,
MaxPooling2D,
ZeroPadding2D
)
from keras.layers.merge import add
from keras.regularizers import l2
from .layers import CroppingLike2D, BilinearUpSampling2D
... | 41.477528 | 93 | 0.563863 |
66068f00bdbb26a68070128e79f3bcc060fe2e4b | 1,080 | py | Python | lang/py/cookbook/v2/source/cb2_18_7_sol_1.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_18_7_sol_1.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_18_7_sol_1.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | import UserDict
class FifoCache(object, UserDict.DictMixin):
''' A mapping that remembers the last `num_entries' items that were set '''
def __init__(self, num_entries, dct=()):
self.num_entries = num_entries
self.dct = dict(dct)
self.lst = []
def __repr__(self):
return '%r(%... | 32.727273 | 79 | 0.6 |
ee63a099c5ffdce938169dfc6fd5da2273cab3d0 | 1,058 | py | Python | nmfamv2/stan_process/stan_pre_processing_functions.py | gmarupilla/NMRFAMv2 | 2e9e7e1f43dbf1d8bcdbcff044bb686db3af09e0 | [
"MIT"
] | null | null | null | nmfamv2/stan_process/stan_pre_processing_functions.py | gmarupilla/NMRFAMv2 | 2e9e7e1f43dbf1d8bcdbcff044bb686db3af09e0 | [
"MIT"
] | null | null | null | nmfamv2/stan_process/stan_pre_processing_functions.py | gmarupilla/NMRFAMv2 | 2e9e7e1f43dbf1d8bcdbcff044bb686db3af09e0 | [
"MIT"
] | null | null | null | import numpy as np
def get_names(metabolites):
names = []
for metab in metabolites:
names.append(metab.name)
return names
def get_area_factors(metabolites):
area_factors = []
for metab in metabolites:
metab.calc_riemann_sum()
area_factors.append(metab.riemannSum)
retu... | 25.804878 | 73 | 0.718336 |
98175eb89a51c21b3b0a66740024afb0be2cb5bd | 353 | py | Python | contentcuration/contentcuration/migrations/0053_merge.py | Tlazypanda/studio | cd1c2f169c705027cdd808cbbcae907d0a9b21d2 | [
"MIT"
] | 1 | 2019-03-30T18:14:25.000Z | 2019-03-30T18:14:25.000Z | contentcuration/contentcuration/migrations/0053_merge.py | Tlazypanda/studio | cd1c2f169c705027cdd808cbbcae907d0a9b21d2 | [
"MIT"
] | 4 | 2016-05-06T17:19:30.000Z | 2019-03-15T01:51:24.000Z | contentcuration/contentcuration/migrations/0053_merge.py | Tlazypanda/studio | cd1c2f169c705027cdd808cbbcae907d0a9b21d2 | [
"MIT"
] | 4 | 2016-10-18T22:49:08.000Z | 2019-09-17T11:20:51.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-02-07 02:05
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0051_auto_20170126_1012'),
('contentcuration', '0052_auto_20170201_1155'),... | 20.764706 | 55 | 0.677054 |
c50dbc0e8eaed45ae638210962b9fc340987aec4 | 308 | py | Python | dataent/patches/v7_0/replace_upgrade_link_limit.py | dataent/dataent | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | [
"MIT"
] | null | null | null | dataent/patches/v7_0/replace_upgrade_link_limit.py | dataent/dataent | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | [
"MIT"
] | 6 | 2020-03-24T17:15:56.000Z | 2022-02-10T18:41:31.000Z | dataent/patches/v7_0/replace_upgrade_link_limit.py | dataent/dataent | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import dataent
from dataent.limits import get_limits, clear_limit, update_limits
def execute():
limits = get_limits()
if limits and limits.upgrade_link:
upgrade_url = limits.upgrade_link
clear_limit('upgrade_link')
update_limits({'upgrade_url': upgrade_url})
| 28 | 65 | 0.805195 |
f48bdc2776d7bfc3918a5d3ece1e85983e914708 | 10,770 | py | Python | schematizer/models/types/time.py | Yelp/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 86 | 2016-11-17T17:39:13.000Z | 2021-06-01T15:19:05.000Z | schematizer/models/types/time.py | tomzhang/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 2 | 2016-12-01T20:57:43.000Z | 2021-09-28T09:26:25.000Z | schematizer/models/types/time.py | tomzhang/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 26 | 2016-11-29T22:38:11.000Z | 2021-03-02T19:44:17.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ag... | 31.863905 | 80 | 0.671495 |
d0d0972a00a685426caf041a9422781b7dc3ab39 | 2,912 | py | Python | tmt/templates.py | optak/tmt | 3d4f6d19d0b7aea9980a62b5c161b1ea205c979a | [
"MIT"
] | null | null | null | tmt/templates.py | optak/tmt | 3d4f6d19d0b7aea9980a62b5c161b1ea205c979a | [
"MIT"
] | null | null | null | tmt/templates.py | optak/tmt | 3d4f6d19d0b7aea9980a62b5c161b1ea205c979a | [
"MIT"
] | 1 | 2020-05-09T07:25:19.000Z | 2020-05-09T07:25:19.000Z | # coding: utf-8
""" Default Templates """
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Test Templates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TEST = dict()
TEST_METADATA = """
summary: Concise summary describing what the test does
contact... | 22.929134 | 79 | 0.551168 |
64255a63913a925cfed2e60d5259cc4924e84564 | 13,076 | py | Python | distillation_experiments/cifar_t_resnet152_s_resnet50_ce_cd_gkd_no_edt/train.py | uvipen/pytorch-ImageNet-CIFAR-COCO-VOC-training | 87549fd4bff3b17b1716a248a115112ee8d05e4d | [
"MIT"
] | 1 | 2020-09-16T14:27:19.000Z | 2020-09-16T14:27:19.000Z | distillation_experiments/cifar_t_resnet152_s_resnet50_ce_kd/train.py | uvipen/pytorch-ImageNet-CIFAR-COCO-VOC-training | 87549fd4bff3b17b1716a248a115112ee8d05e4d | [
"MIT"
] | null | null | null | distillation_experiments/cifar_t_resnet152_s_resnet50_ce_kd/train.py | uvipen/pytorch-ImageNet-CIFAR-COCO-VOC-training | 87549fd4bff3b17b1716a248a115112ee8d05e4d | [
"MIT"
] | null | null | null | import os
import random
import argparse
import time
import sys
import warnings
BASE_DIR = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(BASE_DIR)
warnings.filterwarnings('ignore')
from apex import amp
import torch
import torch.nn as nn
import torch.backends.cudnn as... | 36.730337 | 218 | 0.561257 |
81571b5bc4094f5c5f9c0211f578011eeeee2884 | 2,539 | py | Python | src/robotide/application/pluginconnector.py | ludovicurbain/SWIFT-RIDE | ab72df08a57101c433bfa5ad44949d9983e4e611 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-30T21:24:19.000Z | 2021-11-30T21:24:19.000Z | src/robotide/application/pluginconnector.py | ludovicurbain/SWIFT-RIDE | ab72df08a57101c433bfa5ad44949d9983e4e611 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-07-16T19:27:56.000Z | 2019-07-16T19:27:56.000Z | src/robotide/application/pluginconnector.py | ludovicurbain/SWIFT-RIDE | ab72df08a57101c433bfa5ad44949d9983e4e611 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework 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
... | 32.974026 | 81 | 0.677038 |
380293f36cea78a3561943887f92365af72c37c4 | 1,269 | py | Python | tests/basics/struct1_intbig.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 692 | 2016-12-19T23:25:35.000Z | 2022-03-31T14:20:48.000Z | tests/basics/struct1_intbig.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 509 | 2017-03-28T19:37:18.000Z | 2022-03-31T20:31:43.000Z | tests/basics/struct1_intbig.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 228 | 2016-12-19T05:03:30.000Z | 2022-03-22T18:13:00.000Z | try:
import ustruct as struct
except:
try:
import struct
except ImportError:
print("SKIP")
raise SystemExit
# check maximum pack on 32-bit machine
print(struct.pack("<I", 2**32 - 1))
print(struct.pack("<I", 0xffffffff))
# long long ints
print(struct.pack("<Q", 1))
print(struct.pack... | 32.538462 | 63 | 0.669031 |
0c0d775c0c65e2961376342a980dcfe96c4f5814 | 149 | py | Python | historic_hebrew_dates/__init__.py | UUDigitalHumanitieslab/historic-hebrew-dates | 5ace44d9b1315a96a96ea296383f0b618d994212 | [
"BSD-3-Clause"
] | 1 | 2020-06-24T10:29:17.000Z | 2020-06-24T10:29:17.000Z | historic_hebrew_dates/__init__.py | UUDigitalHumanitieslab/historic-hebrew-dates | 5ace44d9b1315a96a96ea296383f0b618d994212 | [
"BSD-3-Clause"
] | 11 | 2019-10-10T08:50:01.000Z | 2022-03-02T05:23:55.000Z | historic_hebrew_dates/__init__.py | UUDigitalHumanitieslab/historic-hebrew-dates | 5ace44d9b1315a96a96ea296383f0b618d994212 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from .pattern_factory import create_parsers
from .chart_parser import ChartParser
from .pattern_matcher import PatternMatcher
| 29.8 | 43 | 0.852349 |
7a58f32ff2afe5fd17d0f90235a53613759f17cf | 5,323 | py | Python | sentiment_bert.py | oraziorillo/AppliedDataAnalysisProject | 13633a114c2eba085c7b3ca7fd7b496f998d98a4 | [
"MIT"
] | 1 | 2020-11-25T00:18:27.000Z | 2020-11-25T00:18:27.000Z | sentiment_bert.py | epfl-ada/ada-2020-project-milestone-p3-p3_thot | 123f2cee5af5b002ec8143c477ff01bed36e6fa8 | [
"MIT"
] | null | null | null | sentiment_bert.py | epfl-ada/ada-2020-project-milestone-p3-p3_thot | 123f2cee5af5b002ec8143c477ff01bed36e6fa8 | [
"MIT"
] | null | null | null | import transformers
from transformers import BertModel, BertTokenizer, AdamW
import torch
import numpy as np
import pandas as pd
import warnings
from torch import nn
from torch.utils.data import Dataset, DataLoader
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
... | 24.417431 | 104 | 0.696224 |
ffd73cfb7b8a9da44b9ed692cbe9e26fd9843c76 | 8,258 | py | Python | BaseTools/Plugin/Edk2ToolHelper/Edk2ToolHelper.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Plugin/Edk2ToolHelper/Edk2ToolHelper.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Plugin/Edk2ToolHelper/Edk2ToolHelper.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | null | null | null | from MuEnvironment import PluginManager
import logging
import os
from MuPythonLibrary.UtilityFunctions import RunCmd
from MuPythonLibrary.UtilityFunctions import RunPythonScript
from MuPythonLibrary.UtilityFunctions import CatalogSignWithSignTool
import shutil
import datetime
class Edk2ToolHelper(PluginManager.IUefiH... | 48.011628 | 180 | 0.625938 |
636669d7a6db6da7b3091e9ae064c8be768c69b5 | 1,752 | py | Python | src/avd/plugins/generic/OutOfBounds.py | Traxes/zeno | 48e72e8884838a171a217336923beec2983853b5 | [
"BSD-3-Clause"
] | 35 | 2019-03-21T08:56:16.000Z | 2022-03-24T07:55:44.000Z | src/avd/plugins/generic/OutOfBounds.py | bkerler/zeno | d1e51e0226474a81d96de26f36ffc2d39065ba87 | [
"BSD-3-Clause"
] | 5 | 2019-02-27T17:15:35.000Z | 2019-03-21T16:32:32.000Z | src/avd/plugins/generic/OutOfBounds.py | bkerler/zeno | d1e51e0226474a81d96de26f36ffc2d39065ba87 | [
"BSD-3-Clause"
] | 5 | 2019-03-21T13:31:33.000Z | 2019-08-17T01:32:24.000Z | from src.avd.plugins import Plugin
#from ..reporter.vulnerability import Vulnerability
#from ..helper import binjaWrapper, sources
#import re
#import collections
#import traceback
#from src.avd.core.sliceEngine import slice
from src.avd.core.sliceEngine.loopDetection import loop_analysis
#from binaryninja import Medium... | 35.04 | 98 | 0.638128 |
a9ef25b554b5f5a38f849075ea69a4e59cd4384f | 9,927 | py | Python | easyfsl/methods/abstract_meta_learner.py | lnowakow/easy-few-shot-learning | 487531ce1a7c1d58d74cd5aa21e336aa2c5df883 | [
"MIT"
] | 208 | 2021-02-23T16:36:21.000Z | 2022-03-31T08:39:38.000Z | easyfsl/methods/abstract_meta_learner.py | lnowakow/easy-few-shot-learning | 487531ce1a7c1d58d74cd5aa21e336aa2c5df883 | [
"MIT"
] | 14 | 2021-03-02T16:27:54.000Z | 2022-03-29T08:43:35.000Z | easyfsl/methods/abstract_meta_learner.py | lnowakow/easy-few-shot-learning | 487531ce1a7c1d58d74cd5aa21e336aa2c5df883 | [
"MIT"
] | 36 | 2021-06-01T12:51:35.000Z | 2022-03-30T17:58:23.000Z | from abc import abstractmethod
from pathlib import Path
from statistics import mean
from typing import Union
import torch
from torch import nn, optim
from torch.utils.data import DataLoader
from tqdm import tqdm
from easyfsl.utils import sliding_average, compute_backbone_output_shape
class AbstractMetaLearner(nn.Mo... | 35.580645 | 100 | 0.603707 |
6e6770a4f9a7633d24a1d89e82ae46ecb7f75608 | 435 | py | Python | Python_OOP/Unit_Testing/Test_Cat/cat.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | 1 | 2021-05-27T07:59:17.000Z | 2021-05-27T07:59:17.000Z | Python_OOP/Unit_Testing/Test_Cat/cat.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | Python_OOP/Unit_Testing/Test_Cat/cat.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | class Cat:
def __init__(self, name):
self.name = name
self.fed = False
self.sleepy = False
self.size = 0
def eat(self):
if self.fed:
raise Exception('Already fed.')
self.fed = True
self.sleepy = True
self.size += 1
def sleep(sel... | 19.772727 | 56 | 0.521839 |
79d80d7b929ca783e6014ca9338aa9d5875d403a | 38,764 | py | Python | sdk/python/pulumi_auth0/resource_server.py | kevinschoonover/pulumi-auth0 | 18a1ae8fde65291d9e49d6bbc9bb6a5b0eb5dd8a | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2020-05-19T13:46:53.000Z | 2022-02-24T05:09:57.000Z | sdk/python/pulumi_auth0/resource_server.py | kevinschoonover/pulumi-auth0 | 18a1ae8fde65291d9e49d6bbc9bb6a5b0eb5dd8a | [
"ECL-2.0",
"Apache-2.0"
] | 71 | 2020-05-18T22:56:21.000Z | 2022-03-31T15:19:49.000Z | sdk/python/pulumi_auth0/resource_server.py | kevinschoonover/pulumi-auth0 | 18a1ae8fde65291d9e49d6bbc9bb6a5b0eb5dd8a | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-10-30T10:06:00.000Z | 2022-02-26T02:39:40.000Z | # 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 ... | 50.871391 | 236 | 0.677613 |
b1aa0eb87b81de015fc25ff81d5e2ea9348da191 | 527 | py | Python | src/olympia/zadmin/migrations/0001_initial.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/zadmin/migrations/0001_initial.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/zadmin/migrations/0001_initial.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | # Generated by Django 2.2.5 on 2019-09-12 15:04
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Config',
fields=[
('key', models.CharField(... | 21.08 | 93 | 0.516129 |
c132753758e29a1c453584daffdc10dfb2c070f3 | 32,226 | py | Python | scapy/contrib/gtp_v2.py | kosciolek/J-Tracert | 89ed802f700e02600138ad7132e6a856463620dd | [
"MIT"
] | 3 | 2019-04-09T22:59:33.000Z | 2019-06-14T09:23:24.000Z | scapy/contrib/gtp_v2.py | kosciolek/J-Tracert | 89ed802f700e02600138ad7132e6a856463620dd | [
"MIT"
] | null | null | null | scapy/contrib/gtp_v2.py | kosciolek/J-Tracert | 89ed802f700e02600138ad7132e6a856463620dd | [
"MIT"
] | 1 | 2018-11-15T12:37:04.000Z | 2018-11-15T12:37:04.000Z | #! /usr/bin/env python
# Copyright (C) 2017 Alessio Deiana <adeiana@gmail.com>
# 2017 Alexis Sultan <alexis.sultan@sfr.com>
# This file is part of Scapy
# Scapy 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... | 34.614393 | 79 | 0.566406 |
d0a2ac141a6f08d494236fab7cafa776ada3fd9a | 1,466 | py | Python | bundle/ddr2fpga.py | davidbrochart/bundle | 9e6a14fa48e4d22a2cbc8239b13e600a86c5e5b0 | [
"MIT"
] | 4 | 2018-09-15T08:30:14.000Z | 2019-03-11T20:56:25.000Z | bundle/ddr2fpga.py | davidbrochart/bundle | 9e6a14fa48e4d22a2cbc8239b13e600a86c5e5b0 | [
"MIT"
] | null | null | null | bundle/ddr2fpga.py | davidbrochart/bundle | 9e6a14fa48e4d22a2cbc8239b13e600a86c5e5b0 | [
"MIT"
] | 1 | 2022-03-14T02:01:16.000Z | 2022-03-14T02:01:16.000Z | from pyclk import Sig, Reg, In, Out, List, Module
class ddr2fpga(Module):
def __init__(self):
self.IDLE, self.COUNTING, self.COMPLETE = range(3)
self.r_state = Reg()
self.r_addr = Reg()
self.r_wena = Reg()
self.r_done = Reg()
# I/O
self.array... | 31.191489 | 60 | 0.500682 |
4441ce3c865c1a36b82677062cda49388dbdfc7c | 8,877 | py | Python | saharaclient/osc/v2/node_group_templates.py | openstack/python-saharaclient | 2f01b878a9e07bc712fae9c6c2c5f823bd986dd6 | [
"Apache-2.0"
] | 34 | 2015-01-26T21:39:46.000Z | 2021-01-16T17:30:25.000Z | saharaclient/osc/v2/node_group_templates.py | openstack/python-saharaclient | 2f01b878a9e07bc712fae9c6c2c5f823bd986dd6 | [
"Apache-2.0"
] | null | null | null | saharaclient/osc/v2/node_group_templates.py | openstack/python-saharaclient | 2f01b878a9e07bc712fae9c6c2c5f823bd986dd6 | [
"Apache-2.0"
] | 15 | 2015-03-13T23:24:59.000Z | 2017-06-22T12:15:46.000Z | # Copyright (c) 2018 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 writi... | 38.098712 | 79 | 0.637152 |
a2123fd57b83527131c44844de445f4a7a8563e9 | 10,173 | py | Python | vembrane/representations.py | tedil/varfilter | 6b67fa888d6e092c614d660c351ee97851f2e871 | [
"MIT"
] | 17 | 2020-08-11T08:27:48.000Z | 2022-02-05T14:00:24.000Z | vembrane/representations.py | tedil/varfilter | 6b67fa888d6e092c614d660c351ee97851f2e871 | [
"MIT"
] | 20 | 2020-07-09T16:26:32.000Z | 2022-03-21T14:20:12.000Z | vembrane/representations.py | vembrane/vembrane | f09f1bd300a2b9f69810bc206c65c08da03d9044 | [
"MIT"
] | 2 | 2020-07-09T15:01:25.000Z | 2020-07-20T11:23:26.000Z | import ast
from itertools import chain
from typing import Dict, List, Tuple, Set
from pysam.libcbcf import (
VariantRecordSamples,
VariantRecordFormat,
VariantRecordInfo,
VariantHeader,
VariantRecord,
)
from .ann_types import (
NA,
type_info,
ANN_TYPER,
MoreThanOneAltAllele,
)
from... | 30.827273 | 87 | 0.580655 |
112516d60d006ca0793f89d926f3112ba280634b | 19,839 | py | Python | calico/felix/devices.py | ozdanborne/felix | 5eff313e6498b3a7d775aa16cb09fd4578331701 | [
"Apache-2.0"
] | null | null | null | calico/felix/devices.py | ozdanborne/felix | 5eff313e6498b3a7d775aa16cb09fd4578331701 | [
"Apache-2.0"
] | null | null | null | calico/felix/devices.py | ozdanborne/felix | 5eff313e6498b3a7d775aa16cb09fd4578331701 | [
"Apache-2.0"
] | 2 | 2018-10-31T08:55:19.000Z | 2019-04-16T02:14:50.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2014-2016 Tigera, 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
#
# Unle... | 37.573864 | 79 | 0.600081 |
a9f9ad23d5aa7987227cd9c07ee1e61642087299 | 1,447 | py | Python | examples/well_path_ident.py | bs-eagle/bs-eagle | b1017a4f6ac2dcafba2deafec84052ddde792671 | [
"BSD-3-Clause"
] | 7 | 2015-07-16T22:30:36.000Z | 2020-02-06T10:16:42.000Z | examples/well_path_ident.py | bs-eagle/bs-eagle | b1017a4f6ac2dcafba2deafec84052ddde792671 | [
"BSD-3-Clause"
] | null | null | null | examples/well_path_ident.py | bs-eagle/bs-eagle | b1017a4f6ac2dcafba2deafec84052ddde792671 | [
"BSD-3-Clause"
] | 3 | 2017-01-05T20:06:28.000Z | 2021-12-20T16:19:10.000Z | #!/usr/bin/python
import bs
import numpy as np
import bs.wpi as bm
# generate initial mesh
cell_x = 25; cell_y = 25; cell_z = 1;
dx = np.array([cell_x], dtype='d') # Lx
dy = np.array([cell_y], dtype='d') # Ly
dz = np.array([cell_z], dtype='d') # Lz
Nx = 500
Ny = 50
Nz = 10
[c, z] = bm.gen_coord_zcorn(Nx, Ny, Nz, dx, d... | 28.94 | 139 | 0.597789 |
cfdbffe0c7937f3a032e6785936f31b589ac5446 | 6,461 | py | Python | analyze/analyze_results.py | MatthewWolff/tusv3 | fbae71ebe5c0d203600110fbab5f0457aed45955 | [
"MIT"
] | null | null | null | analyze/analyze_results.py | MatthewWolff/tusv3 | fbae71ebe5c0d203600110fbab5f0457aed45955 | [
"MIT"
] | null | null | null | analyze/analyze_results.py | MatthewWolff/tusv3 | fbae71ebe5c0d203600110fbab5f0457aed45955 | [
"MIT"
] | null | null | null | # file: analyze_results.py
# author: Jesse Eaton
# created: 1/28/2018
# modified: 1/28/2018
# purpose: analyzing results from TCGA data run through tusv for purpose of differentiating
# recurring versus non recurring tumors
# # # # # # # # # # #
# I M P O R T S #
# # # # # # # # # # #
import ... | 30.620853 | 301 | 0.603157 |
00938d3bf51dd2aeb915604d791233e8c4679c05 | 6,026 | py | Python | models_old.py | aidanjdonohue/squad | 706a567b562aaed51c229061f2c50894c97b71f4 | [
"MIT"
] | null | null | null | models_old.py | aidanjdonohue/squad | 706a567b562aaed51c229061f2c50894c97b71f4 | [
"MIT"
] | null | null | null | models_old.py | aidanjdonohue/squad | 706a567b562aaed51c229061f2c50894c97b71f4 | [
"MIT"
] | null | null | null | """Top-level model classes.
Author:
Chris Chute (chute@stanford.edu)
"""
import layers_old
import torch
import torch.nn as nn
class BiDAFplus(nn.Module):
# word_vectors -> word_embeddings
# char_vectors -> char_embeddings
# word_embeddings + char_embeddings -> encoder / (phrase embeddings)
... | 36.083832 | 82 | 0.575008 |
e427aef9d4cf2d61d6c75ee040658052caa6819b | 16,102 | py | Python | gui/kivy/uix/screens.py | bitcoinpostquantum/electrumpq | dbbc2a493aff904923cd8112fc5bb07802df272c | [
"MIT"
] | 1 | 2019-04-15T04:30:12.000Z | 2019-04-15T04:30:12.000Z | gui/kivy/uix/screens.py | bitcoinpostquantum/electrumpq | dbbc2a493aff904923cd8112fc5bb07802df272c | [
"MIT"
] | 3 | 2019-06-20T11:55:27.000Z | 2019-08-03T09:03:41.000Z | gui/kivy/uix/screens.py | bitcoinpostquantum/electrumpq | dbbc2a493aff904923cd8112fc5bb07802df272c | [
"MIT"
] | null | null | null | from weakref import ref
from decimal import Decimal
import re
import datetime
import traceback, sys
from kivy.app import App
from kivy.cache import Cache
from kivy.clock import Clock
from kivy.compat import string_types
from kivy.properties import (ObjectProperty, DictProperty, NumericProperty,
... | 33.827731 | 130 | 0.601789 |
8096ea7e2d848a29599f649d20fec899eedce897 | 2,628 | py | Python | lambda_functions/tests/test_queued_docs.py | uk-gov-mirror/ministryofjustice.opg-digideps | 326e775e651317bf94db4b3c52b099cc2b76dffe | [
"MIT"
] | 9 | 2020-02-24T15:51:12.000Z | 2021-08-12T10:37:22.000Z | lambda_functions/tests/test_queued_docs.py | uk-gov-mirror/ministryofjustice.opg-digideps | 326e775e651317bf94db4b3c52b099cc2b76dffe | [
"MIT"
] | 297 | 2020-02-11T15:21:40.000Z | 2022-03-31T14:37:40.000Z | lambda_functions/tests/test_queued_docs.py | uk-gov-mirror/ministryofjustice.opg-digideps | 326e775e651317bf94db4b3c52b099cc2b76dffe | [
"MIT"
] | 3 | 2020-07-20T14:10:30.000Z | 2021-04-11T06:13:30.000Z | # import json
import pytest
import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from lambda_functions.functions.monitoring.monitoring import (
get_secret,
queued_documents
)
import boto3
from moto import (mock_secretsmanager)
@pytest.mark.parametrize(
"secret_code, environment, reg... | 27.663158 | 101 | 0.675038 |
9284a59ea516609124ede36b273e60df3a7d6d0e | 23,839 | py | Python | main.py | zzw0929/PetPlatform | 5f4d196eb4cf0f74ec4d1dba10e50c6aba326104 | [
"MIT"
] | null | null | null | main.py | zzw0929/PetPlatform | 5f4d196eb4cf0f74ec4d1dba10e50c6aba326104 | [
"MIT"
] | null | null | null | main.py | zzw0929/PetPlatform | 5f4d196eb4cf0f74ec4d1dba10e50c6aba326104 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*-coding:utf-8-*-
import math
import os
from flask import Flask, request, jsonify
import json
import uuid
from werkzeug.utils import secure_filename
from sqlalchemy import or_
from model import User, db, Pet, Collection, Admin
from flask.ext.cors import CORS
# from flask_cors import CORS
from... | 23.30303 | 119 | 0.492512 |
4400249b61a8296d7e653ee04465d76539fecc6a | 1,165 | py | Python | lang/py/pylib/code/inspect/inspect_getsource_class.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | lang/py/pylib/code/inspect/inspect_getsource_class.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | lang/py/pylib/code/inspect/inspect_getsource_class.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | #!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
#
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and tha... | 31.486486 | 70 | 0.765665 |
b32887e026e78878531cf12edb9b4314cb098686 | 19 | py | Python | posthog/version.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | posthog/version.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | posthog/version.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | VERSION = "1.17.0"
| 9.5 | 18 | 0.578947 |
5ba4238c80570d9ce87989600e8f08464f428d02 | 147 | py | Python | examples/apps/django_multi_apps/sliders/pn_app.py | datalayer-contrib/holoviz-panel | c97b57e8eaff4b5f542add41f496395da2483b23 | [
"BSD-3-Clause"
] | 1,130 | 2019-11-23T09:53:37.000Z | 2022-03-31T11:30:07.000Z | examples/apps/django_multi_apps/sliders/pn_app.py | datalayer-contrib/holoviz-panel | c97b57e8eaff4b5f542add41f496395da2483b23 | [
"BSD-3-Clause"
] | 2,265 | 2019-11-20T17:09:09.000Z | 2022-03-31T22:09:38.000Z | examples/apps/django_multi_apps/sliders/pn_app.py | datalayer-contrib/holoviz-panel | c97b57e8eaff4b5f542add41f496395da2483b23 | [
"BSD-3-Clause"
] | 215 | 2019-11-26T11:49:04.000Z | 2022-03-30T10:23:11.000Z | import panel as pn
from .pn_model import SineWave
def app(doc):
sw = SineWave()
row = pn.Row(sw.param, sw.plot)
row.server_doc(doc)
| 14.7 | 35 | 0.659864 |
79b3626bc7b8bd708137ed6555d332119c3b0020 | 6,779 | py | Python | python/cudf/cudf/comm/gpuarrow.py | jwyles/cudf | 1ba84a1354c33aac0a9851e15321c6d9a2fca956 | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/comm/gpuarrow.py | jwyles/cudf | 1ba84a1354c33aac0a9851e15321c6d9a2fca956 | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/comm/gpuarrow.py | jwyles/cudf | 1ba84a1354c33aac0a9851e15321c6d9a2fca956 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
from collections import OrderedDict
from collections.abc import Sequence
import numba.cuda.cudadrv.driver
import numpy as np
import pandas as pd
import pyarrow as pa
import rmm
from cudf._lib.arrow._cuda import CudaBuffer
from cudf._lib.gpuarrow import (
CudaRecordBatch... | 28.364017 | 78 | 0.6439 |
a95f059c346f7ef6212b69ccd3b1ca82ce889e07 | 2,654 | py | Python | evaluation/cipic_test.py | oesst/Sound_Analytics | 4008c43b82e0b991bb3b37d8e61d63208fd67a69 | [
"MIT"
] | null | null | null | evaluation/cipic_test.py | oesst/Sound_Analytics | 4008c43b82e0b991bb3b37d8e61d63208fd67a69 | [
"MIT"
] | null | null | null | evaluation/cipic_test.py | oesst/Sound_Analytics | 4008c43b82e0b991bb3b37d8e61d63208fd67a69 | [
"MIT"
] | null | null | null | from scipy import signal, fft
import numpy as np
import matplotlib.pyplot as plt
import soundfile as sf
from scipy.fftpack import irfft
from scipy.signal import welch,butter,lfilter,savgol_filter
RATE = 44100
def get_spectrum( data):
T = 1.0 / RATE
N = data.shape[0]
Pxx = (1. / N) * np.fft.rfft(data)
... | 30.505747 | 178 | 0.75358 |
cb8910a132e8c67302ef39ada5f9dbcd0a30942f | 11,126 | py | Python | python/paddle_fl/paddle_fl/core/trainer/fl_trainer.py | kaih70/PaddleFL | 515906e2c61ee90f8a1c3f8e8210aac2f4177a4a | [
"Apache-2.0"
] | 379 | 2019-09-27T14:26:42.000Z | 2022-03-29T14:28:12.000Z | python/paddle_fl/paddle_fl/core/trainer/fl_trainer.py | Sprate/PaddleFL | 583691acd5db0a7ca331cc9a72415017b18669b8 | [
"Apache-2.0"
] | 132 | 2019-10-16T03:22:03.000Z | 2022-03-23T08:54:29.000Z | python/paddle_fl/paddle_fl/core/trainer/fl_trainer.py | Sprate/PaddleFL | 583691acd5db0a7ca331cc9a72415017b18669b8 | [
"Apache-2.0"
] | 106 | 2019-09-27T12:47:18.000Z | 2022-03-29T09:07:25.000Z | # Copyright (c) 2019 PaddlePaddle 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 app... | 36.359477 | 149 | 0.617113 |
f88f2cd3a036cc4beefb61bd8d1929757a62cc31 | 4,959 | py | Python | src/lib/tracker/matching.py | fuqichen1998/MHT | 9b8894d5be43eb8361284d520a436cd7f4588750 | [
"MIT"
] | 132 | 2020-05-15T23:59:17.000Z | 2022-02-21T05:40:26.000Z | src/lib/tracker/matching.py | dreadlord1984/FairMOT-1 | 8e6f5c6a82f15bf951f35bbd8592e558938dfd2f | [
"MIT"
] | 9 | 2020-06-16T06:01:16.000Z | 2022-03-12T00:29:46.000Z | src/lib/tracker/matching.py | dreadlord1984/FairMOT-1 | 8e6f5c6a82f15bf951f35bbd8592e558938dfd2f | [
"MIT"
] | 26 | 2020-06-25T08:13:05.000Z | 2021-12-11T21:33:17.000Z | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# ------------------------------------------------------------------------------
import lap
import numpy as np
import scipy
from cython_bbox imp... | 35.421429 | 124 | 0.651341 |
09f9f949286b63da3a151b8af3840580482bdc33 | 110 | py | Python | lib/constant.py | taesiri/ANCNet | 28b1c887c2016b06c9639f93e79752dcb6ec3a23 | [
"BSD-2-Clause"
] | 23 | 2020-06-29T13:31:03.000Z | 2022-02-24T21:14:35.000Z | lib/constant.py | taesiri/ANCNet | 28b1c887c2016b06c9639f93e79752dcb6ec3a23 | [
"BSD-2-Clause"
] | 2 | 2020-08-18T12:50:08.000Z | 2021-07-15T16:51:25.000Z | lib/constant.py | taesiri/ANCNet | 28b1c887c2016b06c9639f93e79752dcb6ec3a23 | [
"BSD-2-Clause"
] | 5 | 2020-06-27T06:45:57.000Z | 2022-02-24T21:14:56.000Z | _colors = ['b', 'y', 'g', 'r', 'c', 'm', 'k']
_markers = ['o','v','s','p','P','*','+','x','D']
_eps = 1e-10
| 22 | 48 | 0.336364 |
f8ea0c583619b20e586adfd0456c26296e07f6b1 | 4,227 | py | Python | flexget/plugins/metainfo/rottentomatoes_lookup.py | martina-if/Flexget | 87c253551b5b81f4d32c2edadbc31d37a308c094 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/rottentomatoes_lookup.py | martina-if/Flexget | 87c253551b5b81f4d32c2edadbc31d37a308c094 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/rottentomatoes_lookup.py | martina-if/Flexget | 87c253551b5b81f4d32c2edadbc31d37a308c094 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import logging
from flexget import plugin
from flexget.event import event
from flexget.utils.log import log_once
try:
from flexget.plugins.api_rottentomatoes import lookup_movie, API_KEY
except ImportError:
raise plugin.DependencyError(issued_... | 35.225 | 99 | 0.629051 |
1a9f91d8a7ed22b7e710078bbb79524e7dbc8bb4 | 47,686 | py | Python | train_adni_warp.py | ZucksLiu/DeepInterpret | edd65866ea6e6f89fb86b0ab59dbd8f422c6d64b | [
"MIT"
] | 5 | 2021-06-28T04:56:18.000Z | 2022-03-31T08:34:08.000Z | train_adni_warp.py | ZucksLiu/DeepInterpret | edd65866ea6e6f89fb86b0ab59dbd8f422c6d64b | [
"MIT"
] | null | null | null | train_adni_warp.py | ZucksLiu/DeepInterpret | edd65866ea6e6f89fb86b0ab59dbd8f422c6d64b | [
"MIT"
] | 1 | 2022-01-05T20:38:27.000Z | 2022-01-05T20:38:27.000Z | import argparse
import tqdm
import os
import pickle as pkl
import scipy as sp
import torch
from pprint import pprint
import utils as ut
from torchvision import datasets, transforms
from model import Classifier, CD_Simu, Cycle_Cons, Encoder, Decoder, Discriminator
from unet_model_cond_warp import Cycle_Cons_... | 48.560081 | 268 | 0.578723 |
a04b4df7f0a652b11740516cf3a8a713ddc9cfab | 18,486 | py | Python | custom_components/besmart/climate.py | faxbio/ha-besmart | abe483898f7c612246048240f3e55da2b5b179f6 | [
"MIT"
] | null | null | null | custom_components/besmart/climate.py | faxbio/ha-besmart | abe483898f7c612246048240f3e55da2b5b179f6 | [
"MIT"
] | null | null | null | custom_components/besmart/climate.py | faxbio/ha-besmart | abe483898f7c612246048240f3e55da2b5b179f6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Support for Riello's Besmart thermostats.
Be aware the thermostat may require more then 3 minute to refresh its states.
The thermostats support the season switch however this control will be managed with a
different control.
version: 2
tested with home-assistant >= 0.96
Configuration exa... | 31.65411 | 124 | 0.561506 |
32b94123123aaf029936beffdef757e86851b621 | 344 | py | Python | safe_relay_service/relay/migrations/0026_auto_20200626_1531.py | gnosis/safe-relay-service | e4db2f9b85aab612653785766d4c1f4d16197197 | [
"MIT"
] | 48 | 2018-07-22T16:02:27.000Z | 2022-03-31T17:46:20.000Z | safe_relay_service/relay/migrations/0026_auto_20200626_1531.py | gnosis/safe-relay-service | e4db2f9b85aab612653785766d4c1f4d16197197 | [
"MIT"
] | 264 | 2018-06-11T11:37:55.000Z | 2022-03-30T18:29:38.000Z | safe_relay_service/relay/migrations/0026_auto_20200626_1531.py | gnosis/safe-relay-service | e4db2f9b85aab612653785766d4c1f4d16197197 | [
"MIT"
] | 24 | 2018-11-07T19:28:59.000Z | 2022-03-19T16:46:59.000Z | # Generated by Django 3.0.7 on 2020-06-26 15:31
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("relay", "0025_auto_20200429_1101"),
]
operations = [
migrations.AlterUniqueTogether(
name="safemultisigtx",
unique_together=... | 19.111111 | 47 | 0.610465 |
1b221e43f1b8b06422ce904cb57c47209e3b28a6 | 18,858 | py | Python | qa/rpc-tests/test_framework/comptool.py | Bitcoin-OLD/Bitcoin-OLD | 16627f390aa418a99103843f9d94c48931fad826 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/comptool.py | Bitcoin-OLD/Bitcoin-OLD | 16627f390aa418a99103843f9d94c48931fad826 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/comptool.py | Bitcoin-OLD/Bitcoin-OLD | 16627f390aa418a99103843f9d94c48931fad826 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoinold Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from .mininode import *
from .blockstore import BlockStore, TxStore
from .util import p2p_port
'''
Th... | 45.223022 | 145 | 0.599533 |
ad35401fd442218d82c8705b477a6774e348ec0d | 3,000 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdccs/models/AlarmHistory.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdccs/models/AlarmHistory.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdccs/models/AlarmHistory.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | # 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 ... | 41.666667 | 379 | 0.673 |
b2cf4a2e3952294f5fe26b79a1265fb24634304f | 8,556 | py | Python | tests/output_collector_test.py | elias-1/NiftyNet | 05cd2ffbff5043d9a40b524a6d72f6bd5cd072d2 | [
"Apache-2.0"
] | 6 | 2018-10-18T15:36:52.000Z | 2021-03-03T18:39:41.000Z | tests/output_collector_test.py | elias-1/NiftyNet | 05cd2ffbff5043d9a40b524a6d72f6bd5cd072d2 | [
"Apache-2.0"
] | 9 | 2020-11-13T19:08:08.000Z | 2022-02-10T02:25:56.000Z | tests/output_collector_test.py | elias-1/NiftyNet | 05cd2ffbff5043d9a40b524a6d72f6bd5cd072d2 | [
"Apache-2.0"
] | 2 | 2020-11-23T22:08:02.000Z | 2021-01-20T00:45:34.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
import tensorflow as tf
from niftynet.engine.application_variables import \
NETWORK_OUTPUT, CONSOLE, TF_SUMMARIES
from niftynet.engine.application_variables import OutputsCollector
# def get_test_network():
# net = ToyNet(num_clas... | 48.067416 | 80 | 0.475573 |
7b52b5b73d9c6d1f4c5cc9012e1c4190eea7729d | 557 | py | Python | alembic_dvc/versions/1ca68590acc1_add_restrictednametb.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | alembic_dvc/versions/1ca68590acc1_add_restrictednametb.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | alembic_dvc/versions/1ca68590acc1_add_restrictednametb.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | """add RestrictedNameTbl
Revision ID: 1ca68590acc1
Revises: 4e1a5a724f61
Create Date: 2016-05-18 10:52:28.807242
"""
# revision identifiers, used by Alembic.
revision = '1ca68590acc1'
down_revision = '4e1a5a724f61'
import sqlalchemy as sa
from alembic import op
def upgrade():
op.create_table('RestrictedNameTb... | 21.423077 | 62 | 0.658887 |
49f463d2a9ed1ee3c43c85d3aceb5f058caf11ad | 4,240 | py | Python | tools/wpt/wpt.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/wpt/wpt.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/wpt/wpt.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | import argparse
import json
import logging
import os
import sys
from tools import localpaths
from six import iteritems
from . import virtualenv
here = os.path.dirname(__file__)
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
def load_commands():
rv = {}
with open(os.path.join(here, "p... | 29.041096 | 104 | 0.582311 |
a3c88fce0793f4173e8229af6fea8f7af227590b | 5,060 | py | Python | util/tushareUtil.py | tianlangbsg/stockHacker | 9b8929523aa488ee7bb51ee80a3b4738f0092d47 | [
"Apache-2.0"
] | 1 | 2021-12-08T09:10:32.000Z | 2021-12-08T09:10:32.000Z | util/tushareUtil.py | tianlangbsg/stockHacker | 9b8929523aa488ee7bb51ee80a3b4738f0092d47 | [
"Apache-2.0"
] | null | null | null | util/tushareUtil.py | tianlangbsg/stockHacker | 9b8929523aa488ee7bb51ee80a3b4738f0092d47 | [
"Apache-2.0"
] | null | null | null | import datetime
import operator
import time
import tushare as tushare
from config import configManager
from util import stockUtil
# 初始化
TUSHARE_TOKEN = configManager.get(section='tushare', option='tushare_token')
tushare.set_token(TUSHARE_TOKEN)
tspro = tushare.pro_api(TUSHARE_TOKEN)
# 计算过去n个交易日内最低价格
def get_history... | 35.384615 | 113 | 0.654941 |
d2bdd1f5d9d4ad5abc4f29f7e31ddb9bd2d86e3f | 9,252 | py | Python | reviews/data.py | ravellom/moodle_csv_prof | d604fc28a9388768edcc6c420e31d018a3a934ae | [
"MIT"
] | null | null | null | reviews/data.py | ravellom/moodle_csv_prof | d604fc28a9388768edcc6c420e31d018a3a934ae | [
"MIT"
] | 2 | 2021-12-16T16:55:12.000Z | 2021-12-20T22:53:06.000Z | reviews/data.py | ravellom/moodle_csv_prof | d604fc28a9388768edcc6c420e31d018a3a934ae | [
"MIT"
] | null | null | null | ### Módulo de creación y consultas al dataframe a partir de un Reporte de Moodle
### Autor: Raidell Avello, Universidad de Cienfuegos
###
import pandas as pd
#from . import my_globals
from django.conf import settings
import os
import IP2Location
from . import moodle_backup, cluster
######## VARIABLES GLOBALES ······... | 37.763265 | 121 | 0.64505 |
697f88f09bbbe0246be10447f82e86e1fc916f57 | 2,599 | py | Python | custom_components/hacs/repositories/theme.py | GeorgeSG/hacs-integration | 027a1ba5e0b5f86a3e227be14230a83561c67051 | [
"MIT"
] | 167 | 2018-10-20T13:52:58.000Z | 2022-02-15T06:06:19.000Z | custom_components/hacs/repositories/theme.py | GeorgeSG/hacs-integration | 027a1ba5e0b5f86a3e227be14230a83561c67051 | [
"MIT"
] | 28 | 2018-03-13T04:59:07.000Z | 2020-07-13T14:33:22.000Z | custom_components/hacs/repositories/theme.py | GeorgeSG/hacs-integration | 027a1ba5e0b5f86a3e227be14230a83561c67051 | [
"MIT"
] | 34 | 2018-03-13T10:55:37.000Z | 2022-02-15T06:06:22.000Z | """Class for themes in HACS."""
from integrationhelper import Logger
from .repository import HacsRepository
from ..hacsbase.exceptions import HacsException
from ..helpers.information import find_file_name
class HacsTheme(HacsRepository):
"""Themes in HACS."""
def __init__(self, full_name):
... | 33.753247 | 99 | 0.596768 |
1588741bb9d1d8340c48ae3f3541cb0f8273644f | 2,387 | py | Python | ding/model/template/ppg.py | L-Net-1992/DI-engine | 06803b4e18fa64bbed0fd1d44952242c0c063b0f | [
"Apache-2.0"
] | 1 | 2022-03-21T16:15:39.000Z | 2022-03-21T16:15:39.000Z | ding/model/template/ppg.py | jiaruonan/DI-engine | 268d77db3cb54401b2cfc83e2bc3ec87c31e7b83 | [
"Apache-2.0"
] | null | null | null | ding/model/template/ppg.py | jiaruonan/DI-engine | 268d77db3cb54401b2cfc83e2bc3ec87c31e7b83 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, Dict, Union
import copy
import torch
import torch.nn as nn
from ding.utils import SequenceType, MODEL_REGISTRY
from .vac import VAC
@MODEL_REGISTRY.register('ppg')
class PPG(nn.Module):
mode = ['compute_actor', 'compute_critic', 'compute_actor_critic']
def __init__(
self,... | 32.69863 | 91 | 0.598659 |
011a4263c6f5afee85c421c5a05854eaf0a76b31 | 3,424 | py | Python | app/app/settings.py | kmotseki/recipe-app-api | bc168a13516e09f0cc45319f0615195a1d5e6437 | [
"MIT"
] | null | null | null | app/app/settings.py | kmotseki/recipe-app-api | bc168a13516e09f0cc45319f0615195a1d5e6437 | [
"MIT"
] | 1 | 2020-07-01T20:30:00.000Z | 2020-07-01T20:30:00.000Z | app/app/settings.py | kmotseki/recipe-app-api | bc168a13516e09f0cc45319f0615195a1d5e6437 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.15.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | 25.362963 | 91 | 0.686916 |
8d2f746d56008874d71273a33a3494b2ef7f3eb9 | 22,191 | py | Python | gamelib.py | dessaya/python-gamelib | 9cb0d87ef88712091560deb5d74295ae78461fb0 | [
"MIT"
] | 13 | 2020-05-10T21:17:14.000Z | 2021-11-23T13:57:20.000Z | gamelib.py | dessaya/python-gamelib | 9cb0d87ef88712091560deb5d74295ae78461fb0 | [
"MIT"
] | 2 | 2021-05-19T22:48:39.000Z | 2021-12-07T09:28:33.000Z | gamelib.py | dessaya/python-gamelib | 9cb0d87ef88712091560deb5d74295ae78461fb0 | [
"MIT"
] | 5 | 2021-04-05T04:34:38.000Z | 2022-02-23T04:30:45.000Z | """
Gamelib is a pure-Python single-file library/framework for writing simple games. It is
intended for educational purposes (e.g. to be used in basic programming courses).
https://github.com/dessaya/python-gamelib
"""
import tkinter as tk
from tkinter.font import Font
from tkinter import simpledialog, messagebox
fro... | 32.633824 | 135 | 0.589383 |
886e5a4c20c9f77770a166088a33146de6071415 | 777 | py | Python | article_site/users/migrations/0001_initial.py | Nitin1901/ArtiCults | 5b70d6c840b72518995179830481ac810058c930 | [
"MIT"
] | null | null | null | article_site/users/migrations/0001_initial.py | Nitin1901/ArtiCults | 5b70d6c840b72518995179830481ac810058c930 | [
"MIT"
] | null | null | null | article_site/users/migrations/0001_initial.py | Nitin1901/ArtiCults | 5b70d6c840b72518995179830481ac810058c930 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-06-08 10:37
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 29.884615 | 121 | 0.646075 |
03e5631e256fc20352954a3e420bd77e9f0dce6f | 4,962 | py | Python | pygfunction/examples/load_aggregation.py | j-c-cook/pygfunction | 73cb9292fc39a068bd3d4ebe66b07ec9c8903c8d | [
"BSD-3-Clause"
] | null | null | null | pygfunction/examples/load_aggregation.py | j-c-cook/pygfunction | 73cb9292fc39a068bd3d4ebe66b07ec9c8903c8d | [
"BSD-3-Clause"
] | 2 | 2021-04-10T05:17:18.000Z | 2021-08-10T22:08:54.000Z | pygfunction/examples/load_aggregation.py | j-c-cook/pygfunction | 73cb9292fc39a068bd3d4ebe66b07ec9c8903c8d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
""" Example of simulation of a geothermal system.
The g-function of a single borehole is calculated for boundary condition of
uniform borehole wall temperature along the borehole. Then, the borehole
wall temperature variations resulting from a time-varying load profile
are simul... | 30.441718 | 79 | 0.512092 |
8c3b887a39778b84dee391878820438ae6c9c470 | 714 | py | Python | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/conversion_value_rule_set_service/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/conversion_value_rule_set_service/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/conversion_value_rule_set_service/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 34 | 74 | 0.757703 |
92e9c17df12cb076fcff31f9f34eceef9798e4ef | 174,926 | py | Python | tensorflow/python/eager/function_test.py | rainwoodman/tensorflow | 9b7ff60faa841f0473facf618cb5b66b9cb99b5e | [
"Apache-2.0"
] | 4 | 2016-07-14T15:15:05.000Z | 2017-03-02T15:17:22.000Z | tensorflow/python/eager/function_test.py | rainwoodman/tensorflow | 9b7ff60faa841f0473facf618cb5b66b9cb99b5e | [
"Apache-2.0"
] | 7 | 2021-11-10T20:21:23.000Z | 2022-03-22T19:18:39.000Z | tensorflow/python/eager/function_test.py | rainwoodman/tensorflow | 9b7ff60faa841f0473facf618cb5b66b9cb99b5e | [
"Apache-2.0"
] | 5 | 2016-11-07T21:17:45.000Z | 2020-05-31T00:16:59.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.111934 | 86 | 0.658364 |
fba390fffdf9ac7e569fcb0a3857e7655bca985c | 3,532 | py | Python | server/synthesizer/parser.py | AlessandraBotto/ruler | 57112a414165a92ae56d145ee9f6a301c32e0765 | [
"Apache-2.0"
] | 20 | 2020-11-13T21:20:42.000Z | 2022-01-11T08:28:53.000Z | server/synthesizer/parser.py | AlessandraBotto/ruler | 57112a414165a92ae56d145ee9f6a301c32e0765 | [
"Apache-2.0"
] | 6 | 2020-11-26T19:49:17.000Z | 2021-06-17T13:24:33.000Z | server/synthesizer/parser.py | AlessandraBotto/ruler | 57112a414165a92ae56d145ee9f6a301c32e0765 | [
"Apache-2.0"
] | 4 | 2020-12-22T11:07:44.000Z | 2021-09-29T04:45:03.000Z | import re
import spacy
from synthesizer.gll import Token
from typing import List
nlp = spacy.load("en_core_web_sm")
nlp.add_pipe(nlp.create_pipe('sentencizer'), first=True)
def parse(annotations: List[dict], origin_text: str, delimiter: str, concepts: dict):
token_list = []
rel_code_list = []
origin_do... | 30.188034 | 110 | 0.628822 |
c96776f51f893779aae3a31222ba61ef1b67d109 | 7,031 | py | Python | vlab_quota/libs/notify.py | willnx/vlab_quota | 512d52bfaf9f0187cf475188a2b68bec7228730e | [
"Apache-2.0"
] | null | null | null | vlab_quota/libs/notify.py | willnx/vlab_quota | 512d52bfaf9f0187cf475188a2b68bec7228730e | [
"Apache-2.0"
] | null | null | null | vlab_quota/libs/notify.py | willnx/vlab_quota | 512d52bfaf9f0187cf475188a2b68bec7228730e | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
"""For sending email notifications to users about quota violations"""
import ssl
import time
import smtplib
import os.path
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from datetime import datetime, timezone
import jinja2
from vlab_api_common.std_logger im... | 31.248889 | 108 | 0.686673 |
b884dc96cbc7c77d61149a3299642d45b4cfa695 | 2,373 | py | Python | var/spack/repos/builtin/packages/pthreadpool/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2019-03-29T10:13:11.000Z | 2019-03-29T10:13:11.000Z | var/spack/repos/builtin/packages/pthreadpool/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-05-12T06:29:51.000Z | 2022-03-31T04:13:35.000Z | var/spack/repos/builtin/packages/pthreadpool/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Pthreadpool(CMakePackage):
"""pthreadpool is a portable and efficient thread pool implemen... | 39.55 | 96 | 0.665402 |
b7e2966fa06294ed580672fcaef5004088d80186 | 831 | py | Python | QuickPotato/profiling/instrumentation.py | afparsons/QuickPotato | 6d0b967c506bb9db5adf7d3d4983bfcfd726b030 | [
"MIT"
] | 130 | 2020-11-19T00:19:53.000Z | 2022-01-18T21:16:40.000Z | QuickPotato/profiling/instrumentation.py | afparsons/QuickPotato | 6d0b967c506bb9db5adf7d3d4983bfcfd726b030 | [
"MIT"
] | 16 | 2020-11-22T14:27:11.000Z | 2022-01-19T17:38:57.000Z | QuickPotato/profiling/instrumentation.py | afparsons/QuickPotato | 6d0b967c506bb9db5adf7d3d4983bfcfd726b030 | [
"MIT"
] | 11 | 2020-12-02T08:36:46.000Z | 2021-12-27T06:52:23.000Z | from time import time
import cProfile
import pstats
class Profiler(object):
def __init__(self):
self.functional_output = None
self.total_response_time = None
self.performance_statistics = None
def profile_method_under_test(self, method, *args, **kwargs):
"""
Returns... | 24.441176 | 76 | 0.635379 |
01a1ce9b1db5858ec5c40c029edc3e03aea10cd3 | 9,331 | py | Python | test_lang.py | StefanHeng/test_ECG-Signal-Viewer | 4fc1849aa5d8ff9bf18d3662bc405d7f20663b64 | [
"MIT"
] | null | null | null | test_lang.py | StefanHeng/test_ECG-Signal-Viewer | 4fc1849aa5d8ff9bf18d3662bc405d7f20663b64 | [
"MIT"
] | null | null | null | test_lang.py | StefanHeng/test_ECG-Signal-Viewer | 4fc1849aa5d8ff9bf18d3662bc405d7f20663b64 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from bisect import bisect_left, bisect_right
from functools import reduce
import re
import json
import dash
import dash_html_components as html
import dash_core_components as dcc
import dash_bootstrap_components as dbc
from data_link import *
from dev_helper import *
from ecg_de... | 29.528481 | 107 | 0.472832 |
438d00f3174adb101d8f4407385b67e71fa648e5 | 376 | py | Python | pytest_reana/__init__.py | VMois/pytest-reana | cbdd56b829fa8c703c59588d6e2392a6c37168dd | [
"MIT"
] | 1 | 2021-09-28T12:28:06.000Z | 2021-09-28T12:28:06.000Z | pytest_reana/__init__.py | VMois/pytest-reana | cbdd56b829fa8c703c59588d6e2392a6c37168dd | [
"MIT"
] | 33 | 2018-10-16T12:20:49.000Z | 2022-03-30T07:35:20.000Z | pytest_reana/__init__.py | VMois/pytest-reana | cbdd56b829fa8c703c59588d6e2392a6c37168dd | [
"MIT"
] | 22 | 2018-10-15T11:10:33.000Z | 2022-02-04T10:30:32.000Z | # -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2018, 2020, 2021 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""pytest-REANA."""
from __future__ import absolute_import, print_function
from ... | 23.5 | 72 | 0.720745 |
e7e856f2e9710503cfefb3b444f0e8a142759837 | 800 | py | Python | my_package/SeparableConv/setup.py | zhhezhhe/DAIN | a7b703ab0bf78c4d19654b4468f1aef43c005360 | [
"MIT"
] | null | null | null | my_package/SeparableConv/setup.py | zhhezhhe/DAIN | a7b703ab0bf78c4d19654b4468f1aef43c005360 | [
"MIT"
] | null | null | null | my_package/SeparableConv/setup.py | zhhezhhe/DAIN | a7b703ab0bf78c4d19654b4468f1aef43c005360 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import torch
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
cxx_args = ['-std=c++11']
nvcc_args = [
'-gencode', 'arch=compute_50,code=sm_50',
'-gencode', 'arch=compute_52,code=sm_52',
'-gencode', 'arch=compu... | 26.666667 | 67 | 0.6625 |
c487b62feac16a73088ab7a128dfe33890603750 | 569 | py | Python | sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.727273 | 94 | 0.586995 |
eaebd46354ab6a02bf18d060098e535bcf4958b2 | 1,030 | py | Python | cross_link/LogBase.py | brucewxh/IntraArchiveDeduplicator | 7b0c07cc9fffa75e1b7be285f42b0a8fad42dcfb | [
"BSD-3-Clause"
] | 86 | 2015-01-13T15:02:08.000Z | 2021-12-24T02:13:03.000Z | cross_link/LogBase.py | brucewxh/IntraArchiveDeduplicator | 7b0c07cc9fffa75e1b7be285f42b0a8fad42dcfb | [
"BSD-3-Clause"
] | 4 | 2016-11-18T20:08:50.000Z | 2018-03-08T23:05:37.000Z | cross_link/LogBase.py | brucewxh/IntraArchiveDeduplicator | 7b0c07cc9fffa75e1b7be285f42b0a8fad42dcfb | [
"BSD-3-Clause"
] | 12 | 2015-05-03T07:56:50.000Z | 2021-03-11T12:38:56.000Z |
import logging
import threading
import abc
class LoggerMixin(metaclass=abc.ABCMeta):
@abc.abstractproperty
def loggerPath(self):
pass
@property
def log(self):
if not hasattr(self, 'loggers'):
self.loggers = {}
if not hasattr(self, 'lastLoggerIndex'):
self.lastLoggerIndex = 1
threadName = threadin... | 20.6 | 106 | 0.708738 |
379f8298108bf9fe3fb7d3ba02aefbc8916de1e5 | 1,409 | py | Python | var/spack/repos/builtin/packages/exabayes/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/exabayes/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/exabayes/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Exabayes(AutotoolsPackage):
"""ExaBayes is a software package for Bayesian tree inference.... | 36.128205 | 94 | 0.674237 |
1afaad364db803cd66a5dfb08b0968a0b14b9039 | 274 | py | Python | client/accounts_services/doctype/bank/test_bank.py | mhbu50/client | b99003b872a1599ba8c4b0ca948610a1f49d527f | [
"MIT"
] | null | null | null | client/accounts_services/doctype/bank/test_bank.py | mhbu50/client | b99003b872a1599ba8c4b0ca948610a1f49d527f | [
"MIT"
] | null | null | null | client/accounts_services/doctype/bank/test_bank.py | mhbu50/client | b99003b872a1599ba8c4b0ca948610a1f49d527f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Bank')
class TestBank(unittest.TestCase):
pass
| 21.076923 | 68 | 0.762774 |
4b8ae87de7572abcfd08c3f65c74d6067e01f9b4 | 5,145 | py | Python | file_repository_sdk/model/collector_center/target_range_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | file_repository_sdk/model/collector_center/target_range_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | file_repository_sdk/model/collector_center/target_range_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: target_range.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobu... | 51.45 | 722 | 0.81691 |
2925f10a4dbbc5aa67ec9953cd63d4adb2b8c3ef | 1,473 | py | Python | program/spam-bot/bot.py | Los-had/spam_toolbox | d87082749b9fc614749addbe15b99d7f50936eee | [
"MIT"
] | 5 | 2021-06-10T18:46:45.000Z | 2021-06-26T10:52:04.000Z | program/spam-bot/bot.py | Los-had/spam_toolbox | d87082749b9fc614749addbe15b99d7f50936eee | [
"MIT"
] | 1 | 2021-06-27T14:12:06.000Z | 2021-06-27T14:12:06.000Z | program/spam-bot/bot.py | Los-had/spam_toolbox | d87082749b9fc614749addbe15b99d7f50936eee | [
"MIT"
] | null | null | null | import pyautogui, time
import time
import sys
banner_text = '''
██████╗██████╗ █████╗ ███╗ ███╗███╗ ███╗███████╗██████╗
██╔════╝██╔══██╗██╔══██╗████╗ ████║████╗ ████║██╔════╝██╔══██╗
███████╗██████╔╝███████║██╔████╔██║██╔████╔██║█████╗ ██████╔╝
╚════██║██╔═══╝ ██╔══██║██║╚██╔╝██║██║╚██╔╝██║██╔══╝ ██╔══██╗
███... | 33.477273 | 77 | 0.473863 |
a8be62e13de0636d0775cb29fd92cc6f8a7ebb5a | 2,714 | py | Python | bookclubs/tests/views/post_comment_views/test_create_comment_view.py | hihi-itsann/SEG_Major_Group | bec3d333da59361fd3036f20bb4d7aa82bc3fa5e | [
"MIT"
] | 6 | 2022-02-05T23:03:59.000Z | 2022-02-08T03:08:58.000Z | bookclubs/tests/views/post_comment_views/test_create_comment_view.py | hihi-itsann/SEG_Major_Group | bec3d333da59361fd3036f20bb4d7aa82bc3fa5e | [
"MIT"
] | 2 | 2022-03-13T04:18:25.000Z | 2022-03-16T20:49:53.000Z | bookclubs/tests/views/post_comment_views/test_create_comment_view.py | hihi-itsann/SEG_Major_Group | bec3d333da59361fd3036f20bb4d7aa82bc3fa5e | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.urls import reverse
from bookclubs.models import Post, User, Comment, Club, Role
from bookclubs.tests.helpers import reverse_with_next
class CreateCommentTest(TestCase):
fixtures = [
'bookclubs/tests/fixtures/default_user.json',
'bookclubs/tests/fixtur... | 42.40625 | 93 | 0.677598 |
58b0bc3f2f2fab412486f325587c8d8bfc2be1f9 | 85 | py | Python | pyffs/automaton_management/__init__.py | rominf/pyffs | 6c805fbfd7771727138b169b32484b53c0b0fad1 | [
"MIT"
] | 21 | 2018-07-17T13:21:11.000Z | 2022-03-07T03:00:37.000Z | pyffs/automaton_management/__init__.py | rominf/pyffs | 6c805fbfd7771727138b169b32484b53c0b0fad1 | [
"MIT"
] | 10 | 2016-09-23T20:30:18.000Z | 2021-03-07T12:56:56.000Z | pyffs/automaton_management/__init__.py | antoinewdg/pyffs | 6ac2b6cac67422cbfd34ad0896d6faf35be9ccb9 | [
"MIT"
] | 3 | 2018-08-21T12:08:36.000Z | 2020-11-12T19:32:54.000Z | from .automaton_manager import manager
from .utils import generate_automaton_to_file
| 28.333333 | 45 | 0.882353 |
6dd17ae1dd495c5ab465b7a07fc70a8543d3f606 | 363 | py | Python | tests/test_one_csv_to_json.py | open-contracting/ocdskit-web | affa0df1ff7aa08b1fa1a1969f015d670794b0d7 | [
"BSD-3-Clause"
] | 3 | 2020-01-22T13:11:57.000Z | 2020-12-25T10:48:12.000Z | tests/test_one_csv_to_json.py | open-contracting/toucan | affa0df1ff7aa08b1fa1a1969f015d670794b0d7 | [
"BSD-3-Clause"
] | 88 | 2019-08-06T18:29:31.000Z | 2021-04-28T19:43:23.000Z | tests/test_one_csv_to_json.py | open-contracting/toucan | affa0df1ff7aa08b1fa1a1969f015d670794b0d7 | [
"BSD-3-Clause"
] | 5 | 2019-11-01T17:39:59.000Z | 2021-05-05T13:39:36.000Z | from tests import ViewTestCase, ViewTests
class OneCsvToJsonTestCase(ViewTestCase, ViewTests):
url = '/to-json/'
files = [
'1.1/spreadsheets/flattened.csv',
]
def test_go_with_files(self):
self.assertResults({'type': '.csv .xlsx .zip'}, {}, {
'result.json': 'results/unflat... | 25.928571 | 62 | 0.61708 |
5aa9b43db2311c5d1f6c7dc8f79093eeee81a879 | 2,517 | py | Python | mosspy/moss_report/moss_html_parser.py | thedpws/moss_report.py | c1a624dac74a56fbd6b808574e61f79db1d799fd | [
"MIT"
] | null | null | null | mosspy/moss_report/moss_html_parser.py | thedpws/moss_report.py | c1a624dac74a56fbd6b808574e61f79db1d799fd | [
"MIT"
] | null | null | null | mosspy/moss_report/moss_html_parser.py | thedpws/moss_report.py | c1a624dac74a56fbd6b808574e61f79db1d799fd | [
"MIT"
] | null | null | null | import os
import re
from html.parser import HTMLParser
import requests
class MossFrameParser(HTMLParser):
def error(self, message):
pass
def handle_starttag(self, tag, attrs):
if not hasattr(self, '_codes'):
self._codes = list()
if tag == 'font':
self._captu... | 27.966667 | 115 | 0.584823 |
46ce62893789733c059c44f1a7ed1b659e60035a | 11,562 | py | Python | run_grtrans_test_problems_public.py | HerculesJack/grtrans | bc005307d81dac1bdb9520e776e7627126dd690a | [
"MIT"
] | 25 | 2016-02-11T01:52:14.000Z | 2021-06-16T02:15:42.000Z | run_grtrans_test_problems_public.py | RAnantua/grtrans | a0353a8516335412b27fe4866eabafcfc0fe498f | [
"MIT"
] | 6 | 2016-11-10T15:25:20.000Z | 2018-01-18T15:15:57.000Z | run_grtrans_test_problems_public.py | RAnantua/grtrans | a0353a8516335412b27fe4866eabafcfc0fe498f | [
"MIT"
] | 6 | 2016-02-11T14:13:01.000Z | 2022-03-10T01:56:02.000Z | from __future__ import print_function
import grtrans_batch as gr
import pickle
import numpy as np
import copy
import sys
def load_pickle(file):
with open(file, 'rb') as f:
if sys.version_info.major > 2:
data = pickle.load(f, encoding='latin1')
else:
data = pickle.load(f)
... | 56.126214 | 376 | 0.625324 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.