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
38b4efdc66b2eccdd02a4324cf9beeee9bd3f6bc
2,801
py
Python
expense_record/apps/api/migrations/0002_auto_20210915_1906.py
vieirafrancisco/InvoiceRegister
e98baf8db85c1ed17a69c0930c4e07e23814972b
[ "MIT" ]
null
null
null
expense_record/apps/api/migrations/0002_auto_20210915_1906.py
vieirafrancisco/InvoiceRegister
e98baf8db85c1ed17a69c0930c4e07e23814972b
[ "MIT" ]
5
2020-07-23T22:54:45.000Z
2021-09-16T19:58:47.000Z
expense_record/apps/api/migrations/0002_auto_20210915_1906.py
vieirafrancisco/InvoiceRegister
e98baf8db85c1ed17a69c0930c4e07e23814972b
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-15 22:06 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), ('api', '0001_initial'), ...
45.918033
171
0.626205
7768152fd42f25bd67798e0907e4431ff6554c61
3,500
py
Python
Algorithm.Python/MarginCallEventsAlgorithm.py
BlackBoxAM/Lean
5ea9f04b104d27f0fcfe3a383a3a60ca12206d99
[ "Apache-2.0" ]
6,580
2015-01-12T16:48:44.000Z
2022-03-31T22:05:09.000Z
Algorithm.Python/MarginCallEventsAlgorithm.py
BlackBoxAM/Lean
5ea9f04b104d27f0fcfe3a383a3a60ca12206d99
[ "Apache-2.0" ]
3,392
2015-01-12T17:44:07.000Z
2022-03-30T20:34:03.000Z
Algorithm.Python/MarginCallEventsAlgorithm.py
BlackBoxAM/Lean
5ea9f04b104d27f0fcfe3a383a3a60ca12206d99
[ "Apache-2.0" ]
3,354
2015-01-12T16:58:31.000Z
2022-03-31T00:56:03.000Z
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
50.724638
173
0.724286
6ef1a4f9e1afd2418cdb813a6b5b028f267f82f6
11,923
py
Python
discord/components.py
rldnyt/discord.pyc
e9d190b79ce6df798f144d1abea19f863e3fdbb9
[ "MIT" ]
23
2021-08-28T10:14:19.000Z
2021-12-24T15:10:58.000Z
discord/components.py
Sengolda/discord.py
5cd31dd6c2fe1a7b5d9538ff949fc371e92ec26b
[ "MIT" ]
2
2021-08-31T08:16:17.000Z
2021-08-31T15:21:40.000Z
discord/components.py
Sengolda/discord.py
5cd31dd6c2fe1a7b5d9538ff949fc371e92ec26b
[ "MIT" ]
3
2021-08-31T07:37:40.000Z
2021-09-14T11:59:47.000Z
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
29.733167
104
0.610249
60eb4ee0ef17e0cd9c15fd42ca2b7c15bc3eb40a
325
py
Python
ulinalg/tests/test_torch.py
MridulS/uarray
09d6ad25eebd5547ac30bd3b5c93b10697156413
[ "BSD-3-Clause" ]
null
null
null
ulinalg/tests/test_torch.py
MridulS/uarray
09d6ad25eebd5547ac30bd3b5c93b10697156413
[ "BSD-3-Clause" ]
null
null
null
ulinalg/tests/test_torch.py
MridulS/uarray
09d6ad25eebd5547ac30bd3b5c93b10697156413
[ "BSD-3-Clause" ]
null
null
null
import pytest import ulinalg as ula import ulinalg.torch_backend torch = pytest.importorskip('torch') def test_svd(): arr = torch.eye(5) assert all(isinstance(obj, torch.Tensor) for obj in ula.svd(arr)) def test_svd2(): arr = torch.eye(5) assert isinstance(ula.svd(arr, compute_uv=False), torch.Ten...
19.117647
69
0.713846
90ad56b779801644c87811afa95f8954b3f6ea39
89
py
Python
genius_purchase/__init__.py
antoniodavid/addons_genius
9838ee523e39b3db22a3c03016100d7696403d48
[ "MIT" ]
1
2019-02-10T21:29:14.000Z
2019-02-10T21:29:14.000Z
genius_purchase/__init__.py
antoniodavid/addons_genius
9838ee523e39b3db22a3c03016100d7696403d48
[ "MIT" ]
null
null
null
genius_purchase/__init__.py
antoniodavid/addons_genius
9838ee523e39b3db22a3c03016100d7696403d48
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from . import api from . import controllers from . import models
17.8
25
0.674157
5932f469d03f4d1a13f57854e2cf399e357a6797
7,755
py
Python
examples/asr/emformer_rnnt/mustc/lightning.py
LaudateCorpus1/audio
a007e922d34028270197c0549bf452b79499d039
[ "BSD-2-Clause" ]
null
null
null
examples/asr/emformer_rnnt/mustc/lightning.py
LaudateCorpus1/audio
a007e922d34028270197c0549bf452b79499d039
[ "BSD-2-Clause" ]
null
null
null
examples/asr/emformer_rnnt/mustc/lightning.py
LaudateCorpus1/audio
a007e922d34028270197c0549bf452b79499d039
[ "BSD-2-Clause" ]
null
null
null
from functools import partial from typing import List import sentencepiece as spm import torch import torchaudio from common import ( Batch, FunctionalModule, GlobalStatsNormalization, WarmupLR, batch_by_token_count, piecewise_linear_log, post_process_hypos, spectrogram_transform, ) fro...
39.974227
105
0.674404
6a62b1244a102629d257be1553abb87512d886eb
22,875
py
Python
ckanext/issues/controller/controller.py
rhabbachi/ckanext-issues
d8c3dde8372e88dd5dc173023df34c90034ca777
[ "MIT" ]
null
null
null
ckanext/issues/controller/controller.py
rhabbachi/ckanext-issues
d8c3dde8372e88dd5dc173023df34c90034ca777
[ "MIT" ]
null
null
null
ckanext/issues/controller/controller.py
rhabbachi/ckanext-issues
d8c3dde8372e88dd5dc173023df34c90034ca777
[ "MIT" ]
null
null
null
import collections from logging import getLogger import re from sqlalchemy import func from pylons.i18n import _ from pylons import request, config, tmpl_context as c from ckan.lib.base import BaseController, render, abort import ckan.lib.helpers as h from ckan.lib import mailer import ckan.model as model import ckan...
39.439655
87
0.541727
60f808dd83f212992375ab334aa1635ed70aaeba
403
py
Python
coding_challenge/ship_manager/admin.py
jojacobsen/coding_challenge
94335f00f57a6c4d64cbc2b282a0ca099445e866
[ "MIT" ]
1
2022-03-06T15:40:56.000Z
2022-03-06T15:40:56.000Z
coding_challenge/ship_manager/admin.py
jojacobsen/coding_challenge
94335f00f57a6c4d64cbc2b282a0ca099445e866
[ "MIT" ]
null
null
null
coding_challenge/ship_manager/admin.py
jojacobsen/coding_challenge
94335f00f57a6c4d64cbc2b282a0ca099445e866
[ "MIT" ]
null
null
null
from django.contrib import admin from coding_challenge.ship_manager.models import Ship @admin.register(Ship) class ShipAdmin(admin.ModelAdmin): """ Register the Ship model within the admin interface, for easy maintenance and manual object creation. """ list_display = ["code", "name", "length", "...
25.1875
55
0.694789
079668f6b5a9c6adf905f75543b3c3a3bd83b8f9
266
py
Python
inventory/fill_db.py
Tallot/FilmStore
ca4ca749397470fee204838790266a9dc60f578f
[ "MIT" ]
null
null
null
inventory/fill_db.py
Tallot/FilmStore
ca4ca749397470fee204838790266a9dc60f578f
[ "MIT" ]
16
2020-04-22T15:24:18.000Z
2021-06-10T22:55:58.000Z
inventory/fill_db.py
Tallot/FilmStore
ca4ca749397470fee204838790266a9dc60f578f
[ "MIT" ]
null
null
null
import json import django django.setup() from service_app.models import Film with open('fixtures/mongo_init_data.json') as data_file: json_data = json.loads(data_file.read()) for film_data in json_data: film = Film(**film_data) film.save()
22.166667
56
0.710526
4df5ad99c7bc3e967cb51970fc520f9a7d0f100f
7,255
py
Python
django_cas_ng/views.py
clavay/django-cas-ng
a0ef1fdf1667e1d9439657fbf956d8f432e7ff1b
[ "MIT" ]
null
null
null
django_cas_ng/views.py
clavay/django-cas-ng
a0ef1fdf1667e1d9439657fbf956d8f432e7ff1b
[ "MIT" ]
null
null
null
django_cas_ng/views.py
clavay/django-cas-ng
a0ef1fdf1667e1d9439657fbf956d8f432e7ff1b
[ "MIT" ]
null
null
null
"""CAS login/logout replacement views""" from __future__ import absolute_import from __future__ import unicode_literals import sys import types from django.utils.six.moves import urllib_parse from django.conf import settings from django.http import HttpResponseRedirect from django.core.exceptions import PermissionDe...
37.015306
88
0.660924
37480afbf3c63aea2ffc2c31f0de900dec306904
523
py
Python
nativeconfig/exceptions.py
GreatFruitAndy/nativeconfig
02a538ce6945e09291c319c99268dce641f14e7e
[ "MIT" ]
null
null
null
nativeconfig/exceptions.py
GreatFruitAndy/nativeconfig
02a538ce6945e09291c319c99268dce641f14e7e
[ "MIT" ]
null
null
null
nativeconfig/exceptions.py
GreatFruitAndy/nativeconfig
02a538ce6945e09291c319c99268dce641f14e7e
[ "MIT" ]
null
null
null
class Error(Exception): pass class InitializationError(Error): def __init__(self, msg): super().__init__(msg) class ValidationError(Error): def __init__(self, msg, value): self.value = value super().__init__(msg) class SerializationError(Error): def __init__(self, msg, valu...
20.115385
39
0.650096
7ef678445c4fe411cb00d4757ca5a8a331312fac
6,712
py
Python
run_all_scripts.py
phenylazide/MolecularSimilarity
429f64c3c18daa5d341110380f761aa003ad290b
[ "MIT" ]
1
2020-09-14T16:01:50.000Z
2020-09-14T16:01:50.000Z
run_all_scripts.py
phenylazide/MolecularSimilarity
429f64c3c18daa5d341110380f761aa003ad290b
[ "MIT" ]
5
2019-04-20T06:23:01.000Z
2019-07-25T17:28:05.000Z
run_all_scripts.py
phenylazide/MolecularSimilarity
429f64c3c18daa5d341110380f761aa003ad290b
[ "MIT" ]
1
2020-07-07T14:55:14.000Z
2020-07-07T14:55:14.000Z
#!/usr/bin/env python3 """" runs all scripts Usage: python run_all_scripts.py -a (optional input file with active molecules) -i (optional input file with inactive molecules) -t (optional input file with test molecules) -c (optional input file with activity of test molecules...
44.157895
125
0.619934
71c27b940f6078047fc0c2b7726b0718e791514d
574
py
Python
backend/selic/views.py
felipemaion/financial-management-gate-django
5f93a7d28a55852fed0a16d1830f92b0ee065948
[ "MIT" ]
2
2019-04-15T20:36:48.000Z
2020-02-09T23:20:27.000Z
backend/selic/views.py
felipemaion/financial-management-gate-django
5f93a7d28a55852fed0a16d1830f92b0ee065948
[ "MIT" ]
5
2020-02-12T00:06:06.000Z
2020-06-05T05:09:45.000Z
backend/selic/views.py
felipemaion/financial-management-gate-django
5f93a7d28a55852fed0a16d1830f92b0ee065948
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from selic.models import Selic # Create your views here. class Corrige(APIView): def get(self, request): request = request.GET amount = request['amount'] date...
24.956522
60
0.639373
eaa5964139bd2cd616033fc0072b19604c1d541c
39
py
Python
tarkov/inventory_dispatcher/__init__.py
JustEmuTarkov/jet_py
2f352b5e6f5d88594d08afc46e9458e919271788
[ "MIT" ]
14
2021-02-24T02:32:48.000Z
2022-01-03T05:51:45.000Z
tarkov/inventory_dispatcher/__init__.py
JustEmuTarkov/jet_py
2f352b5e6f5d88594d08afc46e9458e919271788
[ "MIT" ]
1
2021-03-08T09:02:29.000Z
2021-03-08T09:02:29.000Z
tarkov/inventory_dispatcher/__init__.py
JustEmuTarkov/jet_py
2f352b5e6f5d88594d08afc46e9458e919271788
[ "MIT" ]
4
2021-04-14T01:47:01.000Z
2021-11-29T02:18:32.000Z
from .manager import DispatcherManager
19.5
38
0.871795
607e12344a467b2d02ca4e5a3610811c4c6ff69f
5,494
py
Python
QGNN_pytorch/train_node_cls.py
bojesomo/QGNN
c289708a7fc90ccdb6390b084abda1e359179664
[ "MIT" ]
1
2021-11-26T17:24:33.000Z
2021-11-26T17:24:33.000Z
QGNN_pytorch/train_node_cls.py
bojesomo/QGNN
c289708a7fc90ccdb6390b084abda1e359179664
[ "MIT" ]
null
null
null
QGNN_pytorch/train_node_cls.py
bojesomo/QGNN
c289708a7fc90ccdb6390b084abda1e359179664
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import print_function import time from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter import numpy as np import torch import torch.nn.functional as F import torch.optim as optim np.random.seed(123) torch.manual_seed(123) device = torch.device("cuda" if t...
40.10219
142
0.7004
e1d43e9681fd79622b312fb67d916724e60e9218
15,245
py
Python
twilio/rest/verify/v1/service/__init__.py
ethan-schaffer/MassMessenger
3042ed98864d012a7276a6a365f81690431d5157
[ "MIT" ]
null
null
null
twilio/rest/verify/v1/service/__init__.py
ethan-schaffer/MassMessenger
3042ed98864d012a7276a6a365f81690431d5157
[ "MIT" ]
2
2019-09-20T19:08:16.000Z
2021-04-02T13:28:29.000Z
twilio/rest/verify/v1/service/__init__.py
ethan-schaffer/MassMessenger
3042ed98864d012a7276a6a365f81690431d5157
[ "MIT" ]
null
null
null
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base....
32.926566
113
0.63083
bf4e1dc8cd05f667adf0da0da06f8e6993411e5d
34,141
py
Python
mmdet/core/bbox/transforms_rbbox.py
Zebraside/RRPDet
31dd0b3e158dcd18edb9890ff1ac84b639a9e3e9
[ "Apache-2.0" ]
null
null
null
mmdet/core/bbox/transforms_rbbox.py
Zebraside/RRPDet
31dd0b3e158dcd18edb9890ff1ac84b639a9e3e9
[ "Apache-2.0" ]
null
null
null
mmdet/core/bbox/transforms_rbbox.py
Zebraside/RRPDet
31dd0b3e158dcd18edb9890ff1ac84b639a9e3e9
[ "Apache-2.0" ]
1
2021-12-17T12:39:36.000Z
2021-12-17T12:39:36.000Z
import mmcv import numpy as np import torch import math import cv2 import copy # TODO: check the angle and module operation def dbbox2delta(proposals, gt, means = [0, 0, 0, 0, 0], stds=[1, 1, 1, 1, 1]): """ :param proposals: (x_ctr, y_ctr, w, h, angle) shape (n, 5) :param gt: (x_ctr, y_ctr, w,...
34.87334
124
0.566943
bce7d96c9a7aa747eebfe1c95558baf99a2a6b5d
3,326
py
Python
tests/unit/returners/test_smtp_return.py
edusperoni/salt
c9bfb00c2a81a9d4734fa7d1aa80e893d5ef790b
[ "Apache-2.0" ]
1
2017-06-26T18:14:56.000Z
2017-06-26T18:14:56.000Z
tests/unit/returners/test_smtp_return.py
edusperoni/salt
c9bfb00c2a81a9d4734fa7d1aa80e893d5ef790b
[ "Apache-2.0" ]
1
2015-10-05T22:03:10.000Z
2015-10-05T22:03:10.000Z
tests/unit/returners/test_smtp_return.py
edusperoni/salt
c9bfb00c2a81a9d4734fa7d1aa80e893d5ef790b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place (mp@saltstack.com)` tests.unit.returners.smtp_return_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing libs from tests.support.mixi...
38.229885
97
0.492183
9b964fd9dc0f99e4da561a45971153b1aa80f1eb
661
py
Python
tcfcli/cmds/native/generate_event/cli.py
tencentyun/scfcli
ef15508ad34a851cf0d2750dfaa5202f6a600887
[ "Apache-2.0" ]
103
2019-06-11T06:09:56.000Z
2021-12-18T22:48:59.000Z
tcfcli/cmds/native/generate_event/cli.py
TencentCloud/Serverless-cli
57f98b24cfd10712770a4806212cfb69d981a11a
[ "Apache-2.0" ]
8
2019-07-12T12:08:40.000Z
2020-10-20T07:18:17.000Z
tcfcli/cmds/native/generate_event/cli.py
TencentCloud/Serverless-cli
57f98b24cfd10712770a4806212cfb69d981a11a
[ "Apache-2.0" ]
49
2019-06-11T06:26:05.000Z
2020-02-19T08:13:36.000Z
# -*- coding: utf-8 -*- import click from tcfcli.cmds.local.generate_event.generate_event_service import GenerateEventService @click.command(name="generate-event", cls=GenerateEventService, short_help="Simulate a service generation event.") def generate_event(): """ \b Simulate a service generation event...
27.541667
114
0.647504
448093d395bfbfece5527a5ae64e86454f7f65cd
1,031
py
Python
main.py
jpstroop/issue-reporter
974e3f2534c15b8674c80cdca2e39dcab81a555b
[ "BSD-2-Clause" ]
null
null
null
main.py
jpstroop/issue-reporter
974e3f2534c15b8674c80cdca2e39dcab81a555b
[ "BSD-2-Clause" ]
4
2019-10-28T19:23:00.000Z
2021-04-30T21:42:14.000Z
main.py
jpstroop/issue-reporter
974e3f2534c15b8674c80cdca2e39dcab81a555b
[ "BSD-2-Clause" ]
null
null
null
from github_reporter import timestamp from github_reporter.app_setup import load_config, load_secrets from github_reporter.github_reporter import GithubReporter from sys import stderr def main(event={}, context={}): try: is_google_run = event.get("is_google_run", True) dump_to_stdout = event.get("...
36.821429
73
0.673133
0e4a7b68bc112675b898fdce3dc63184655446a2
2,271
py
Python
python_app/tenhou-bot/main.py
0xsuu/Project-Mahjong
e82edc67651ff93c8ec158b590cd728f28504be9
[ "Apache-2.0" ]
9
2018-06-08T00:09:08.000Z
2021-11-17T11:05:11.000Z
python_app/tenhou-bot/main.py
0xsuu/Project-Mahjong
e82edc67651ff93c8ec158b590cd728f28504be9
[ "Apache-2.0" ]
1
2020-04-25T12:43:26.000Z
2020-04-25T12:43:26.000Z
python_app/tenhou-bot/main.py
0xsuu/Project-Mahjong
e82edc67651ff93c8ec158b590cd728f28504be9
[ "Apache-2.0" ]
2
2019-05-30T07:18:45.000Z
2019-11-05T09:15:13.000Z
# -*- coding: utf-8 -*- """ Endpoint to run bot. It will play a game on tenhou.net """ from optparse import OptionParser from tenhou.main import connect_and_play from utils.logger import set_up_logging from utils.settings_handler import settings from mahjong.myAI.slcnn_player import SLCNNPlayer def parse_args_and_se...
32.913043
118
0.587847
ceb3e1f51ed76dc34f4fc959fe56fccd6321e5cf
12,357
py
Python
Packs/RemoteAccess/Integrations/RemoteAccessv2/RemoteAccessv2.py
mazmat-panw/content
024a65c1dea2548e2637a9cbbe54966e9e34a722
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/RemoteAccess/Integrations/RemoteAccessv2/RemoteAccessv2.py
mazmat-panw/content
024a65c1dea2548e2637a9cbbe54966e9e34a722
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/RemoteAccess/Integrations/RemoteAccessv2/RemoteAccessv2.py
henry-sue-pa/content
043c6badfb4f9c80673cad9242fdea72efe301f7
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
import tempfile from io import StringIO import paramiko from paramiko import SSHClient, AutoAddPolicy, transport, Transport from paramiko.ssh_exception import NoValidConnectionsError from scp import SCPClient, SCPException from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonSer...
42.463918
127
0.658655
27b1d1c830175c294f891ea1bfb100948decab4c
5,701
py
Python
bindsnet_master/bindsnet/conversion/nodes.py
Singular-Brain/ProjectBrain
2d22d45c13a86825c0dcaf517a59e02f2c4f6164
[ "MIT" ]
6
2021-06-01T03:43:35.000Z
2022-02-11T10:41:06.000Z
bindsnet_master/bindsnet/conversion/nodes.py
Singular-Brain/ProjectBrain
2d22d45c13a86825c0dcaf517a59e02f2c4f6164
[ "MIT" ]
1
2022-03-31T03:22:14.000Z
2022-03-31T03:22:14.000Z
bindsnet_master/bindsnet/conversion/nodes.py
Singular-Brain/ProjectBrain
2d22d45c13a86825c0dcaf517a59e02f2c4f6164
[ "MIT" ]
3
2021-10-30T02:30:40.000Z
2021-11-16T04:23:12.000Z
from typing import Optional, Iterable, Union import torch from bindsnet.network import nodes class SubtractiveResetIFNodes(nodes.Nodes): # language=rst """ Layer of `integrate-and-fire (IF) neurons <https://bit.ly/2EOk6YN>` using reset by subtraction. """ def __init__( self, ...
32.20904
87
0.591651
a64bfdc4c8b28d9a26f518d1dc1545bb7a66f797
3,770
py
Python
pynsor/sensors/diskstats.py
dunkelstern/pynsor
4fc528ccf59cb1fd8ca69ab40fcd41241b285676
[ "BSD-3-Clause" ]
2
2021-05-02T06:28:32.000Z
2021-05-14T15:44:40.000Z
pynsor/sensors/diskstats.py
dunkelstern/pynsor
4fc528ccf59cb1fd8ca69ab40fcd41241b285676
[ "BSD-3-Clause" ]
2
2021-04-26T18:26:20.000Z
2021-04-29T23:50:06.000Z
pynsor/sensors/diskstats.py
dunkelstern/pynsor
4fc528ccf59cb1fd8ca69ab40fcd41241b285676
[ "BSD-3-Clause" ]
null
null
null
from typing import Optional, Dict, Any, List from datetime import datetime from .sensor import Sensor from pynsor.postgres import Connection class DiskStats(Sensor): def init(self, config: Dict[str, Any]) -> None: super().init(config) def create_datamodel(self, connection: Connection) -> None: ...
41.428571
81
0.472149
7865d1f8a448f4e483793c37a7963781a3e4b27b
15,947
py
Python
tests/integration/test_modelldcatnofactory.py
Informasjonsforvaltning/jsonschematordf
dfeb039411b5a9797ad3b7769e0dd3489abc5502
[ "Apache-2.0" ]
null
null
null
tests/integration/test_modelldcatnofactory.py
Informasjonsforvaltning/jsonschematordf
dfeb039411b5a9797ad3b7769e0dd3489abc5502
[ "Apache-2.0" ]
24
2021-08-19T08:33:39.000Z
2021-10-06T07:43:28.000Z
tests/integration/test_modelldcatnofactory.py
Informasjonsforvaltning/jsonschematordf
dfeb039411b5a9797ad3b7769e0dd3489abc5502
[ "Apache-2.0" ]
null
null
null
"""Pytests.""" # flake8: noqa import pytest from pytest_mock.plugin import MockerFixture from rdflib.graph import Graph from jsonschematordf.modelldcatnofactory import create_model_element from jsonschematordf.schema import Schema from jsonschematordf.utils import add_elements_to_graph from tests.testutils import asse...
35.755605
102
0.630965
914a271e81805a398cf6e562e2ff20db45ef84e5
1,153
py
Python
Chapter10/example5.py
DeeMATT/AdvancedPythonProgramming
97091dae4f177fd2c06b20265be2aedf9d1c41e7
[ "MIT" ]
66
2018-11-21T02:07:16.000Z
2021-11-08T13:13:31.000Z
Chapter10/example5.py
DeeMATT/AdvancedPythonProgramming
97091dae4f177fd2c06b20265be2aedf9d1c41e7
[ "MIT" ]
2
2020-03-11T19:56:39.000Z
2021-11-15T14:07:05.000Z
Chapter10/example5.py
DeeMATT/AdvancedPythonProgramming
97091dae4f177fd2c06b20265be2aedf9d1c41e7
[ "MIT" ]
58
2018-11-03T14:06:10.000Z
2022-03-17T14:06:55.000Z
# ch3/example5.py import queue import threading import time class MyThread(threading.Thread): def __init__(self, name): threading.Thread.__init__(self) self.name = name def run(self): print('Starting thread %s.' % self.name) process_queue() print('Exiting thread %s.' ...
18.301587
54
0.60451
449c73af3bb15205bed8d6e74ee4afda47a00675
246,010
py
Python
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_1_preview/operations/_key_vault_client_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-05-12T23:29:15.000Z
2020-05-12T23:29:15.000Z
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_1_preview/operations/_key_vault_client_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_1_preview/operations/_key_vault_client_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-07-31T16:33:51.000Z
2020-07-31T16:33:51.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 ...
47.083254
264
0.669139
0857a3279f118bca48d762e00248a2908f2a180e
45,074
py
Python
tensorflow/python/keras/callbacks.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
3
2018-07-16T09:11:12.000Z
2018-07-17T13:38:16.000Z
tensorflow/python/keras/callbacks.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/callbacks.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
null
null
null
# 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...
35.379906
95
0.647158
58233f07d55a5270f6c2c9b4e2dae84a45f80b57
123
py
Python
habet/__init__.py
odra/habet
cb791c3367f06fff0a6557fe5697033b2262bfc8
[ "MIT" ]
null
null
null
habet/__init__.py
odra/habet
cb791c3367f06fff0a6557fe5697033b2262bfc8
[ "MIT" ]
null
null
null
habet/__init__.py
odra/habet
cb791c3367f06fff0a6557fe5697033b2262bfc8
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from .application import Application from .response import Response from .handler import Handler
24.6
36
0.764228
eeefc062c308b9adda22326d250e90a170325888
791,176
py
Python
gen/CPP14Parser.py
badrinath-reddy/PPL
c72d005719692f82769ad24a49f54d0075c8ffda
[ "MIT" ]
null
null
null
gen/CPP14Parser.py
badrinath-reddy/PPL
c72d005719692f82769ad24a49f54d0075c8ffda
[ "MIT" ]
null
null
null
gen/CPP14Parser.py
badrinath-reddy/PPL
c72d005719692f82769ad24a49f54d0075c8ffda
[ "MIT" ]
null
null
null
# encoding: utf-8 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u0098") buf.write("\u09a...
40.700448
3,212
0.594921
d5dcd199f6c59c5a2c6d928d378af6822f48b174
387
py
Python
setup.py
MULCIA/PLNFinalWork
b73cdef018240d2fbda94fbfaaa03a931f3f9e6e
[ "Apache-2.0" ]
null
null
null
setup.py
MULCIA/PLNFinalWork
b73cdef018240d2fbda94fbfaaa03a931f3f9e6e
[ "Apache-2.0" ]
null
null
null
setup.py
MULCIA/PLNFinalWork
b73cdef018240d2fbda94fbfaaa03a931f3f9e6e
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages setup( name='PLNFinalWork', version='0.0.1', url='https://github.com/MULCIA/PLNFinalWork', license='MIT License', author='Sergio Rodriguez', author_email='sergiorodriguezcalvo@gmail.com', keywords='End work of PLN for MULCIA master', packages=...
27.642857
50
0.69509
20216bcd23f61f6c64a8eb9becc833683e994234
19,986
py
Python
tensorflow_probability/python/sts/components/semilocal_linear_trend.py
axch/probability
b112faafc593d18e6adf4c85fa8e0ce37b29f400
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/sts/components/semilocal_linear_trend.py
axch/probability
b112faafc593d18e6adf4c85fa8e0ce37b29f400
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/sts/components/semilocal_linear_trend.py
axch/probability
b112faafc593d18e6adf4c85fa8e0ce37b29f400
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
43.733042
89
0.677124
4d85e9e5cbd22e286bfa4228f1fcc76f79f7246e
10,007
py
Python
luafun/utils/parse_valve.py
Delaunay/LuaFun
bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39
[ "BSD-3-Clause" ]
1
2021-02-06T06:42:29.000Z
2021-02-06T06:42:29.000Z
luafun/utils/parse_valve.py
Delaunay/LuaFun
bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39
[ "BSD-3-Clause" ]
6
2021-04-08T21:46:06.000Z
2021-05-09T01:40:04.000Z
luafun/utils/parse_valve.py
Delaunay/LuaFun
bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict import logging log = logging.getLogger(__name__) class StartObject: def __repr__(self): return 'StartObj' class EndObject: def __repr__(self): return 'EndObj' class EndLine: def __repr__(self): return 'EndLine' class NewValue: def __i...
26.196335
88
0.551014
cabd9714bfa69165f634d046005748e9f5199a98
415
py
Python
problem_92.py
renxiaoyi/project_euler
2566482209cd225fce39887fe869f839cf88330e
[ "Unlicense" ]
null
null
null
problem_92.py
renxiaoyi/project_euler
2566482209cd225fce39887fe869f839cf88330e
[ "Unlicense" ]
null
null
null
problem_92.py
renxiaoyi/project_euler
2566482209cd225fce39887fe869f839cf88330e
[ "Unlicense" ]
null
null
null
ans = {} cnt = 0 def Next(n): digits = map(int, str(n)) squares = [x*x for x in digits] return sum(squares) for i in range(1, 10000000): n = i chain = [n] while True: if n == 1 or n == 89: for j in chain: ans[j] = n break if n in ans: for j in chain: ans[j] = an...
14.821429
33
0.493976
5ed6ea0bf57404c3e62268af87cae5e19dd13d0d
2,340
py
Python
tests/views.py
motius/django-gitlab-boilerplate
b10e0096b8760d4d001a3ba9c19dd909267a4334
[ "MIT" ]
13
2017-05-08T13:00:37.000Z
2019-10-07T16:35:38.000Z
tests/views.py
motius/django-gitlab-boilerplate
b10e0096b8760d4d001a3ba9c19dd909267a4334
[ "MIT" ]
null
null
null
tests/views.py
motius/django-gitlab-boilerplate
b10e0096b8760d4d001a3ba9c19dd909267a4334
[ "MIT" ]
1
2020-10-01T21:06:57.000Z
2020-10-01T21:06:57.000Z
import json import logging from django.contrib.auth import get_user_model from hamcrest import assert_that, has_key from django.core.urlresolvers import reverse from apps.core.urls import router from libs.tests import BaseAPITestCase from tests.recipes import UserRecipe from .recipes import EmailAddressRecipe log =...
30.38961
82
0.603846
7c163f85d65271c772c90ebb9abe1df1e657299e
2,914
py
Python
bann/b_test_train_prepare/pytorch/p_test/functions/pr_fun.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
bann/b_test_train_prepare/pytorch/p_test/functions/pr_fun.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
bann/b_test_train_prepare/pytorch/p_test/functions/pr_fun.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """.. moduleauthor:: Artur Lissin""" from typing import List, Tuple, Dict from bann.b_test_train_prepare.pytorch.p_test.functions.auc_calc import calc_auc from bann.b_test_train_prepare.container.test.rttff_c import merge_ttff_fun, RtTfF, \ check_ttff_merged from bann.b_test_train_prepare.p...
42.231884
96
0.576184
3580d127a7685cb591059f03fc9f99612f02ea60
3,607
py
Python
PWGJE/EMCALJetTasks/Tracks/analysis/old/TriggerCorrelation.py
maroozm/AliPhysics
22ec256928cfdf8f800e05bfc1a6e124d90b6eaf
[ "BSD-3-Clause" ]
114
2017-03-03T09:12:23.000Z
2022-03-03T20:29:42.000Z
PWGJE/EMCALJetTasks/Tracks/analysis/old/TriggerCorrelation.py
maroozm/AliPhysics
22ec256928cfdf8f800e05bfc1a6e124d90b6eaf
[ "BSD-3-Clause" ]
19,637
2017-01-16T12:34:41.000Z
2022-03-31T22:02:40.000Z
PWGJE/EMCALJetTasks/Tracks/analysis/old/TriggerCorrelation.py
maroozm/AliPhysics
22ec256928cfdf8f800e05bfc1a6e124d90b6eaf
[ "BSD-3-Clause" ]
1,021
2016-07-14T22:41:16.000Z
2022-03-31T05:15:51.000Z
#! /usr/bin/env python from ROOT import TFile, TH1F, TCanvas, gPad, gDirectory, kBlack, kRed, kBlue, kGreen, kMagenta from Helper import FileReaderException, HistNotFoundException, ReadHistList from Graphics import Style from SpectrumContainer import SpectrumContainer import sys gObjects = [] class TriggerCorrelati...
37.572917
144
0.665096
2c453a7df801c9d79eb4b374ce59afe1ec32a49e
1,441
py
Python
src/durus_importer.py
Oire/TheQube
fcfd8a68b15948e0740642d635db24adef8cc314
[ "MIT" ]
21
2015-08-02T21:26:14.000Z
2019-12-27T09:57:44.000Z
src/durus_importer.py
Oire/TheQube
fcfd8a68b15948e0740642d635db24adef8cc314
[ "MIT" ]
34
2015-01-12T00:38:14.000Z
2020-08-31T11:19:37.000Z
src/durus_importer.py
Oire/TheQube
fcfd8a68b15948e0740642d635db24adef8cc314
[ "MIT" ]
15
2015-03-24T15:42:30.000Z
2020-09-24T20:26:42.000Z
import re import paths import sessions import misc import output class SessionImporter(object): def __init__(self, filename=None): self.session = sessions.current_session if self.session.type != 'Twitter': raise TypeError if filename: self.load_file(filename) def load_file(self, file...
28.82
75
0.69882
5159ee4c27a4cdb6a52d676d1e851ef207216548
13,819
py
Python
dulwich/contrib/diffstat.py
dish59742/dulwich
d7f1331cba0ca959e8b701265b0c1547191a4726
[ "Apache-2.0" ]
624
2018-01-25T02:40:53.000Z
2022-02-02T12:38:55.000Z
dulwich/contrib/diffstat.py
dish59742/dulwich
d7f1331cba0ca959e8b701265b0c1547191a4726
[ "Apache-2.0" ]
312
2018-01-25T02:56:49.000Z
2022-02-02T22:06:29.000Z
dulwich/contrib/diffstat.py
dish59742/dulwich
d7f1331cba0ca959e8b701265b0c1547191a4726
[ "Apache-2.0" ]
132
2018-01-25T22:54:22.000Z
2022-02-02T18:42:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Copyright (c) 2020 Kevin B. Hendricks, Stratford Ontario Canada # All rights reserved. # # This diffstat code was extracted and heavily modified from: # # https://github.com/techtonik/python-patch # Under the followi...
39.482857
123
0.64585
35812ed6972c3be13a09cbe7488c2d0cf986f213
700
py
Python
bgx/families/smart_bgt_python/smart_bgt/__init__.py
DGT-Network/DGT-Kawartha-1.0
dfe177f1a10d260949075f96422df34620d0bd54
[ "Apache-2.0" ]
2
2018-09-27T04:43:33.000Z
2019-10-23T14:32:31.000Z
bgx/families/smart_bgt_python/smart_bgt/__init__.py
DGT-Network/DGT-Kawartha-1.0
dfe177f1a10d260949075f96422df34620d0bd54
[ "Apache-2.0" ]
10
2020-05-12T06:58:15.000Z
2022-02-26T23:59:35.000Z
bgx/families/smart_bgt_python/smart_bgt/__init__.py
DGT-Network/DGT-Mississauga
52b5f1f4015db2aa7196e727a25b399de5fbf3c3
[ "Apache-2.0" ]
1
2021-03-09T03:36:36.000Z
2021-03-09T03:36:36.000Z
# Copyright 2018 NTRlab # # 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, softw...
35
80
0.658571
3a2351db69cdf81ecfdda939928a1ee02f370d2c
6,625
py
Python
python/seldon_core/storage.py
SandhyaaGopchandani/seldon-core
00360bd7c90e85da980730c34e55318997907d44
[ "Apache-2.0" ]
null
null
null
python/seldon_core/storage.py
SandhyaaGopchandani/seldon-core
00360bd7c90e85da980730c34e55318997907d44
[ "Apache-2.0" ]
null
null
null
python/seldon_core/storage.py
SandhyaaGopchandani/seldon-core
00360bd7c90e85da980730c34e55318997907d44
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 kubeflow.org. # # 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,...
40.151515
99
0.622943
a00a1981999d928605ba042a4ce1d539137e62a0
37
py
Python
Part_2_intermediate/mod_1/lesson_7/ex_5_relative_import_main/estudent_book/grades/promotion_status.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_1/lesson_7/ex_5_relative_import_main/estudent_book/grades/promotion_status.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_1/lesson_7/ex_5_relative_import_main/estudent_book/grades/promotion_status.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
FAILED = "FAILED" PASSED = "PASSED"
9.25
17
0.648649
a1f1c76cef88930f2b45de8f247485be9d98cb83
5,600
py
Python
docker/sane-doc-reports/src/sane_doc_reports/elements/table.py
glicht/dockerfiles
7dff92792a7ec6ac1e04950a41927867af5f147c
[ "MIT" ]
1
2020-06-16T16:32:42.000Z
2020-06-16T16:32:42.000Z
docker/sane-doc-reports/src/sane_doc_reports/elements/table.py
glicht/dockerfiles
7dff92792a7ec6ac1e04950a41927867af5f147c
[ "MIT" ]
25
2018-12-24T22:40:45.000Z
2021-06-25T15:26:39.000Z
docker/sane-doc-reports/src/sane_doc_reports/elements/table.py
glicht/dockerfiles
7dff92792a7ec6ac1e04950a41927867af5f147c
[ "MIT" ]
1
2019-02-06T06:39:57.000Z
2019-02-06T06:39:57.000Z
from sane_doc_reports.domain.CellObject import CellObject from sane_doc_reports.domain.Element import Element from sane_doc_reports.conf import DEBUG, PYDOCX_FONT_SIZE, \ DEFAULT_TABLE_FONT_SIZE, DEFAULT_TABLE_STYLE, PYDOCX_FONT_NAME, \ PYDOCX_FONT_COLOR, DEFAULT_FONT_COLOR, DEFAULT_TITLE_FONT_SIZE, \ PYDOC...
36.363636
80
0.586607
2dc1f58b1c0ee4fb9d501c0e68e13f9e6f558f62
1,081
py
Python
ovl/target_filters/shape_filters/rotated_rectangle_filter.py
ofekashery/Ovl-Python
117e3f4ae1a8a5624c41792bd36b760afbe86c8e
[ "Apache-2.0" ]
1
2020-10-11T16:14:46.000Z
2020-10-11T16:14:46.000Z
ovl/target_filters/shape_filters/rotated_rectangle_filter.py
ofekashery/Ovl-Python
117e3f4ae1a8a5624c41792bd36b760afbe86c8e
[ "Apache-2.0" ]
1
2020-10-18T05:00:06.000Z
2020-12-24T20:03:44.000Z
ovl/target_filters/shape_filters/rotated_rectangle_filter.py
ofekashery/Ovl-Python
117e3f4ae1a8a5624c41792bd36b760afbe86c8e
[ "Apache-2.0" ]
null
null
null
import cv2 from ..contour_filter import contour_filter from ...math.shape_fill_ratios import rotating_rectangle_fill_ratio from ...helpers.types import RangedNumber @contour_filter def rotated_rectangle_filter(contour_list, min_area_ratio: RangedNumber(0, 1) = 0.8): """ Receives a list of contours and return...
38.607143
100
0.736355
8900014d6fcb2a6062353605c7143cbc9a9cdae1
34,131
py
Python
samples/client/petstore/python-experimental/petstore_api/api/user_api.py
0x4a616e/openapi-generator
99f522cdd367471e5057895c339f5f1804290e8a
[ "Apache-2.0" ]
1
2018-07-12T10:56:05.000Z
2018-07-12T10:56:05.000Z
samples/client/petstore/python-experimental/petstore_api/api/user_api.py
0x4a616e/openapi-generator
99f522cdd367471e5057895c339f5f1804290e8a
[ "Apache-2.0" ]
null
null
null
samples/client/petstore/python-experimental/petstore_api/api/user_api.py
0x4a616e/openapi-generator
99f522cdd367471e5057895c339f5f1804290e8a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
35.114198
174
0.450646
c6cde9be589afb2c5b91ac3d37ca38e2ff9adb29
13,906
py
Python
python/cudf/cudf/tests/test_replace.py
williamBlazing/cudf
072785e24fd59b6f4eeaad3b54592a8c803ee96b
[ "Apache-2.0" ]
2
2019-12-25T14:20:17.000Z
2019-12-25T14:33:02.000Z
python/cudf/cudf/tests/test_replace.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
null
null
null
python/cudf/cudf/tests/test_replace.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
1
2021-10-03T20:29:10.000Z
2021-10-03T20:29:10.000Z
import numpy as np import pandas as pd import pytest from cudf.core import DataFrame, Series from cudf.tests.utils import assert_eq def test_series_replace(): a1 = np.array([0, 1, 2, 3, 4]) # Numerical a2 = np.array([5, 1, 2, 3, 4]) sr1 = Series(a1) sr2 = sr1.replace(0, 5) np.testing.assert_...
32.189815
78
0.608442
4c7cd2884399cf4366ac1d8a92c6c0946aae4595
6,633
py
Python
tools/git_batch_proc.py
Joejiong/Paddle_AST_Infrastructure
7c56e41da55c354610317821ec970f8a376001a4
[ "Apache-2.0" ]
1
2020-09-08T02:35:57.000Z
2020-09-08T02:35:57.000Z
tools/git_batch_proc.py
Joejiong/Paddle_AST_Infrastructure
7c56e41da55c354610317821ec970f8a376001a4
[ "Apache-2.0" ]
null
null
null
tools/git_batch_proc.py
Joejiong/Paddle_AST_Infrastructure
7c56e41da55c354610317821ec970f8a376001a4
[ "Apache-2.0" ]
2
2020-09-07T13:21:16.000Z
2020-09-28T04:01:34.000Z
from git import Repo, InvalidGitRepositoryError, GitCommandError, Git from os import listdir from os.path import join import argparse # 暂存列表 stash_repos = [] def path_to_repo(path): """将路径转换成Repo对象,若非Git目录,则抛出异常""" try: return Repo(path) except InvalidGitRepositoryError: return None def...
28.467811
117
0.619629
293b6f80e00145c13251a978277291ff3459ec09
2,572
py
Python
networkit/linkprediction.py
clintg6/networkit
b4cba9a82436cd7ebc139c1a612f593fca9892c6
[ "MIT" ]
1
2019-02-26T14:59:50.000Z
2019-02-26T14:59:50.000Z
networkit/linkprediction.py
cndolo/networkit
eb52ec5e62a13f4a259fc2e7cf116b2fd2acfbee
[ "MIT" ]
null
null
null
networkit/linkprediction.py
cndolo/networkit
eb52ec5e62a13f4a259fc2e7cf116b2fd2acfbee
[ "MIT" ]
null
null
null
from _NetworKit import KatzIndex, CommonNeighborsIndex, JaccardIndex, PreferentialAttachmentIndex, AdamicAdarIndex, UDegreeIndex, VDegreeIndex, AlgebraicDistanceIndex, NeighborhoodDistanceIndex, TotalNeighborsIndex, NeighborsMeasureIndex, SameCommunityIndex, AdjustedRandIndex, ResourceAllocationIndex, RandomLinkSampler...
38.969697
417
0.770218
41d880c1bd1db60e2f16e1234f002885e4cd14f5
641
py
Python
third_party/webrtc/src/chromium/src/tools/perf/benchmarks/image_decoding.py
bopopescu/webrtc-streaming-node
727a441204344ff596401b0253caac372b714d91
[ "MIT" ]
27
2016-04-27T01:02:03.000Z
2021-12-13T08:53:19.000Z
third_party/webrtc/src/chromium/src/tools/perf/benchmarks/image_decoding.py
bopopescu/webrtc-streaming-node
727a441204344ff596401b0253caac372b714d91
[ "MIT" ]
2
2017-03-09T09:00:50.000Z
2017-09-21T15:48:20.000Z
third_party/webrtc/src/chromium/src/tools/perf/benchmarks/image_decoding.py
bopopescu/webrtc-streaming-node
727a441204344ff596401b0253caac372b714d91
[ "MIT" ]
17
2016-04-27T02:06:39.000Z
2019-12-18T08:07:00.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from core import perf_benchmark from measurements import image_decoding import page_sets from telemetry import benchmark @benchmark.Disabled('xp') # http:...
30.52381
72
0.806552
ced519b869232eeb9a7f2a171aefc654787d60ce
878
py
Python
setup.py
rbiswas4/calibrate_spectra
78264f81c8d38876226253630e3af56e458bc86d
[ "MIT" ]
null
null
null
setup.py
rbiswas4/calibrate_spectra
78264f81c8d38876226253630e3af56e458bc86d
[ "MIT" ]
8
2015-08-12T17:37:52.000Z
2015-08-29T07:27:45.000Z
setup.py
rbiswas4/calibrate_spectra
78264f81c8d38876226253630e3af56e458bc86d
[ "MIT" ]
null
null
null
#from ez_setup import use_setuptools #use_setuptools() from distutils.core import setup setup(# package information name="transientSources", version="0.0.1dev", description='', long_description=''' ''', # What code to include as packages packages=['transientSources'], packaged...
38.173913
76
0.514806
934b282cdafd98b009b3b8df4f63a5b684527153
2,303
py
Python
ros_ws/src/crazyswarm/scripts/perceived-safety-study/cmdPositionTest.py
rasmus-rudling/degree-thesis
d74581491ec9618149c582059e290dca9957951d
[ "MIT" ]
null
null
null
ros_ws/src/crazyswarm/scripts/perceived-safety-study/cmdPositionTest.py
rasmus-rudling/degree-thesis
d74581491ec9618149c582059e290dca9957951d
[ "MIT" ]
null
null
null
ros_ws/src/crazyswarm/scripts/perceived-safety-study/cmdPositionTest.py
rasmus-rudling/degree-thesis
d74581491ec9618149c582059e290dca9957951d
[ "MIT" ]
null
null
null
import os import sys from matplotlib import pyplot as plt import numpy as np import rospy sys.path.append("..") from pycrazyswarm import Crazyswarm from tf import TransformListener def tf_callback(self, data): transform = data.transforms[0] pose = transform.transform def main(): crazyflies_yaml = str({...
28.432099
84
0.615284
5162b7543bd120e6532b15ff47b9d6e2bb66282b
7,275
py
Python
utilities.py
aws-samples/gain_customer_insights
8287fa463f5fc673da57ddc3b81b0121764986a5
[ "MIT-0" ]
2
2021-06-08T22:38:42.000Z
2021-11-03T01:00:55.000Z
utilities.py
aws-samples/gain_customer_insights
8287fa463f5fc673da57ddc3b81b0121764986a5
[ "MIT-0" ]
null
null
null
utilities.py
aws-samples/gain_customer_insights
8287fa463f5fc673da57ddc3b81b0121764986a5
[ "MIT-0" ]
4
2020-06-26T10:07:37.000Z
2021-11-03T01:00:48.000Z
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # 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 wi...
40.416667
106
0.662955
7e7eec1c4895645d679edbec6ae59842ae7ec540
559
py
Python
src/olympia/activity/admin.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
10
2018-08-16T04:55:06.000Z
2022-01-08T16:09:39.000Z
src/olympia/activity/admin.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
171
2018-05-20T00:27:59.000Z
2022-03-21T13:34:27.000Z
src/olympia/activity/admin.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
12
2018-08-01T16:46:09.000Z
2022-01-08T16:09:46.000Z
from django.contrib import admin from .models import ActivityLog class ActivityLogAdmin(admin.ModelAdmin): list_display = ('created', 'user', '__unicode__',) raw_id_fields = ('user',) readonly_fields = ('created', 'user', '__unicode__',) date_hierarchy = 'created' fields = ('user', 'created', '__...
25.409091
57
0.68873
da2851ab30d7ee5849c7cd1678284a5fd0c7c293
34,136
py
Python
src/QMCTools/PyscfToQmcpack_Spline.py
kayahans/qmcpack
c25d77702e36363ff7368ded783bf31c1b1c5f17
[ "NCSA" ]
null
null
null
src/QMCTools/PyscfToQmcpack_Spline.py
kayahans/qmcpack
c25d77702e36363ff7368ded783bf31c1b1c5f17
[ "NCSA" ]
null
null
null
src/QMCTools/PyscfToQmcpack_Spline.py
kayahans/qmcpack
c25d77702e36363ff7368ded783bf31c1b1c5f17
[ "NCSA" ]
null
null
null
###################################################################################### ## This file is distributed under the University of Illinois/NCSA Open Source License. ## See LICENSE file in top directory for details. ## ## Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. ## ## File developed by: Yubo "Pau...
36.431163
140
0.625088
4d3b42b6905589a1499902fe1f7f53116bfe58be
1,437
py
Python
scripts/hotwords.py
mazika90/roboy_snapchat
010a595cac9be51599ec68a4dffc032aabec21c8
[ "BSD-3-Clause" ]
1
2020-12-20T07:50:38.000Z
2020-12-20T07:50:38.000Z
scripts/hotwords.py
mazika90/roboy_snapchat
010a595cac9be51599ec68a4dffc032aabec21c8
[ "BSD-3-Clause" ]
1
2018-07-07T12:08:00.000Z
2018-07-10T15:36:18.000Z
scripts/hotwords.py
mazika90/roboy_snapchat
010a595cac9be51599ec68a4dffc032aabec21c8
[ "BSD-3-Clause" ]
1
2020-10-18T03:56:52.000Z
2020-10-18T03:56:52.000Z
#!/usr/bin/env python import snowboydecoder import sys import signal import rospy from std_msgs.msg import String # Demo code for listening two hotwords at the same time import rospkg import atexit interrupted = False def signal_handler(signal, frame): global interrupted interrupted = True def interrupt...
22.107692
82
0.742519
9e3b21aa433cc69e7941a689db40884b50ae08ec
8,451
py
Python
tfim_spin_bath_MF.py
weinbe58/tfim_noise
36e9e569eb92a9a48277eb53ffb24cc3dae8a9b1
[ "BSD-3-Clause" ]
null
null
null
tfim_spin_bath_MF.py
weinbe58/tfim_noise
36e9e569eb92a9a48277eb53ffb24cc3dae8a9b1
[ "BSD-3-Clause" ]
null
null
null
tfim_spin_bath_MF.py
weinbe58/tfim_noise
36e9e569eb92a9a48277eb53ffb24cc3dae8a9b1
[ "BSD-3-Clause" ]
null
null
null
from quspin.basis import spin_basis_1d,tensor_basis,boson_basis_1d from quspin.operators import hamiltonian from quspin.tools.evolution import evolve import numpy as np import cProfile,os,sys,time import matplotlib.pyplot as plt def anneal_bath_1(L,Nb,T,gamma=0.2,omega=1.0,path="."): ti = time.time() filename = os...
27.708197
114
0.645604
444a4ecd85289cf57059c6b530d09c65be7b146e
169
py
Python
PalndromeCheck/IsPalindrome.py
mmmallick/LeetCode_Python
bf81f2ab5034cd611c5017681ad68533dcc60761
[ "MIT" ]
null
null
null
PalndromeCheck/IsPalindrome.py
mmmallick/LeetCode_Python
bf81f2ab5034cd611c5017681ad68533dcc60761
[ "MIT" ]
null
null
null
PalndromeCheck/IsPalindrome.py
mmmallick/LeetCode_Python
bf81f2ab5034cd611c5017681ad68533dcc60761
[ "MIT" ]
null
null
null
class Solution(object): def isPalindrome(self, s) : s = ''.join(filter(unicode.isalnum, s)) s=s.upper() print(s) return s == s[::-1]
24.142857
47
0.514793
396b74032cd6b9f34b32c35d6af2e54c56057df9
3,368
py
Python
filething/server.py
lnmds/filething
70f438371c8346e3b47f2507bfcfaa2ee22c9b5f
[ "MIT" ]
null
null
null
filething/server.py
lnmds/filething
70f438371c8346e3b47f2507bfcfaa2ee22c9b5f
[ "MIT" ]
null
null
null
filething/server.py
lnmds/filething
70f438371c8346e3b47f2507bfcfaa2ee22c9b5f
[ "MIT" ]
null
null
null
import logging import random import string from aiohttp import web log = logging.getLogger(__name__) class Server: """Main Filething server class. This class holds all the server state to continue operating Attributes ---------- ready: bool If the server is in a ready state for startup....
27.606557
96
0.549881
e78a7e11a0f43f104f83be672dee222ad848b94a
3,774
py
Python
tests_recording/test_api.py
sturivny/packit
ba06fb080eb8ab309ad92489f1f8985bdb61668e
[ "MIT" ]
null
null
null
tests_recording/test_api.py
sturivny/packit
ba06fb080eb8ab309ad92489f1f8985bdb61668e
[ "MIT" ]
1
2020-08-17T07:20:13.000Z
2020-08-17T07:20:13.000Z
tests_recording/test_api.py
sturivny/packit
ba06fb080eb8ab309ad92489f1f8985bdb61668e
[ "MIT" ]
null
null
null
import os import unittest from subprocess import check_output import rebasehelper from rebasehelper.exceptions import RebaseHelperError from flexmock import flexmock from packit.api import PackitAPI from requre.cassette import DataTypes from tests_recording.testbase import PackitUnittestOgr @unittest.skip("Not work...
36.640777
85
0.622682
8f719e52178c41985d3aa06e3ba048073dd243a6
38
py
Python
snmp/__init__.py
stanislavb/snmp-lldp
66d1f418a05de3b3d74685a069b5a84035178b38
[ "Unlicense" ]
25
2015-02-10T18:38:33.000Z
2021-07-31T11:22:37.000Z
snmp/__init__.py
tsingliu1007/snmp-lldp
66d1f418a05de3b3d74685a069b5a84035178b38
[ "Unlicense" ]
1
2015-07-03T18:01:29.000Z
2015-07-03T18:01:29.000Z
snmp/__init__.py
tsingliu1007/snmp-lldp
66d1f418a05de3b3d74685a069b5a84035178b38
[ "Unlicense" ]
7
2017-05-25T07:02:28.000Z
2020-10-05T07:36:55.000Z
__all__ = ['snmp'] from snmp import *
12.666667
18
0.657895
c559da5c1a1bf0c44d7d790beb72caa26f25f934
3,408
py
Python
server/djangobackend/settings.py
roiPG08/agfzb-CloudAppDevelopment_Capstone
94f5e8b59f843153ddd3731546e0e820094096bf
[ "Apache-2.0" ]
null
null
null
server/djangobackend/settings.py
roiPG08/agfzb-CloudAppDevelopment_Capstone
94f5e8b59f843153ddd3731546e0e820094096bf
[ "Apache-2.0" ]
null
null
null
server/djangobackend/settings.py
roiPG08/agfzb-CloudAppDevelopment_Capstone
94f5e8b59f843153ddd3731546e0e820094096bf
[ "Apache-2.0" ]
null
null
null
""" Django settings for djangobackend project. Generated by 'django-admin startproject' using Django 3.1.3. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import ...
26.215385
91
0.694249
00f88c0d7a62f04e2872123537ddddbf9b0dc249
5,396
py
Python
hc_128.py
gbanegas/cryp
0a46d8dcce1068a018f4b1e760040d9060a82be5
[ "Apache-2.0" ]
null
null
null
hc_128.py
gbanegas/cryp
0a46d8dcce1068a018f4b1e760040d9060a82be5
[ "Apache-2.0" ]
null
null
null
hc_128.py
gbanegas/cryp
0a46d8dcce1068a018f4b1e760040d9060a82be5
[ "Apache-2.0" ]
null
null
null
class hc128: KEY_SIZE = 32 def __init__(self): self.P = [] self.Q = [] self.W = [] self.count = 0 self.current_stream = 0 self.current_in_stream = 0 def set_key(self, key): """ " Set the key for this stream cipher. <TT>key</TT> must be an a...
46.517241
217
0.453855
7f1c4712cacbad0366f8059566d89e214b12ba25
4,839
py
Python
src/markdown.py
xylophone21/gist-sync
0d14a4e8e560401f308a60031d02bbd5d20f78a8
[ "Apache-2.0" ]
null
null
null
src/markdown.py
xylophone21/gist-sync
0d14a4e8e560401f308a60031d02bbd5d20f78a8
[ "Apache-2.0" ]
null
null
null
src/markdown.py
xylophone21/gist-sync
0d14a4e8e560401f308a60031d02bbd5d20f78a8
[ "Apache-2.0" ]
null
null
null
import re import os import shutil import urllib.parse from zlib import compress import base64 import string plantuml_alphabet = string.digits + string.ascii_uppercase + string.ascii_lowercase + '-_' base64_alphabet = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/' b64_to_plantuml = bytes.maket...
37.511628
113
0.49597
f1504436af41e18a6e4df3637aa1eee2ed2129ae
8,574
py
Python
qiskit/extensions/unitary.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
1
2021-08-04T21:53:02.000Z
2021-08-04T21:53:02.000Z
qiskit/extensions/unitary.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
null
null
null
qiskit/extensions/unitary.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
37.441048
92
0.629111
7f9ec2a349c4dfc509a49044b2117867f9d099c0
841
py
Python
opennem/db/migrations/versions/109f0ddd92ad_indexes_on_facility_scada.py
paulculmsee/opennem
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
[ "MIT" ]
null
null
null
opennem/db/migrations/versions/109f0ddd92ad_indexes_on_facility_scada.py
paulculmsee/opennem
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
[ "MIT" ]
null
null
null
opennem/db/migrations/versions/109f0ddd92ad_indexes_on_facility_scada.py
paulculmsee/opennem
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
[ "MIT" ]
null
null
null
# pylint: disable=no-member """ Indexes on facility_scada Revision ID: 109f0ddd92ad Revises: df1a9890f5c8 Create Date: 2021-11-24 09:35:08.922469 """ from alembic import op # revision identifiers, used by Alembic. revision = "109f0ddd92ad" down_revision = "df1a9890f5c8" branch_labels = None depends_on = None def u...
22.72973
110
0.701546
859ff0b9d3d4c38b74086c3a801a25642d1bf4d0
11,180
py
Python
python_modules/dagster-graphql/dagster_graphql_tests/test_cli.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/dagster-graphql/dagster_graphql_tests/test_cli.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/dagster-graphql/dagster_graphql_tests/test_cli.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
import json import os import tempfile import time from contextlib import contextmanager from click.testing import CliRunner from dagster import seven from dagster.core.storage.pipeline_run import PipelineRunStatus from dagster.core.test_utils import instance_for_test from dagster.utils import file_relative_path from d...
33.878788
211
0.556977
599d5b319d3b4b742fbd4bc67264033524d1cc88
727
py
Python
app/custom_widgets.py
Pavel-Maksimov/shift_logs_flask
69e8772e216cedad20ac6a8867252f55bf754baf
[ "MIT" ]
null
null
null
app/custom_widgets.py
Pavel-Maksimov/shift_logs_flask
69e8772e216cedad20ac6a8867252f55bf754baf
[ "MIT" ]
null
null
null
app/custom_widgets.py
Pavel-Maksimov/shift_logs_flask
69e8772e216cedad20ac6a8867252f55bf754baf
[ "MIT" ]
null
null
null
from wtforms.widgets import html_params def select_multi_checkbox(field, ul_class='dropdown-menu', **kwargs): kwargs.setdefault('type', 'checkbox') field_id = kwargs.pop('id', field.id) html = ['<ul %s aria-labelledby="dropdownMenu1">' % html_params(id=field_id, class_=ul_class)] for value, label, che...
42.764706
98
0.631362
d086098aa964155b72ee9d2f0f0922a9492d195f
1,818
py
Python
sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_resource_spec.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
1
2021-08-23T19:09:56.000Z
2021-08-23T19:09:56.000Z
sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_resource_spec.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
2
2021-06-01T10:02:51.000Z
2021-06-07T07:19:14.000Z
sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_resource_spec.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
3
2022-01-10T13:40:24.000Z
2022-03-21T08:46:14.000Z
# Copyright 2020 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
35.647059
74
0.714521
803bf550bfc8fbb9d1a0fe1eb797cabfe277219c
3,850
py
Python
scpp_base/scpp_base/src/utils/crypto_utils.py
scorelab/social-currency
f539893104bdfe098cfa58c8d9fabcbb00874c52
[ "Apache-2.0" ]
4
2018-10-02T06:31:18.000Z
2019-11-16T15:21:34.000Z
scpp_base/scpp_base/src/utils/crypto_utils.py
horizon00/social-currency
f539893104bdfe098cfa58c8d9fabcbb00874c52
[ "Apache-2.0" ]
2
2017-12-06T11:54:14.000Z
2019-11-11T11:34:06.000Z
scpp_base/scpp_base/src/utils/crypto_utils.py
horizon00/social-currency
f539893104bdfe098cfa58c8d9fabcbb00874c52
[ "Apache-2.0" ]
5
2017-02-27T10:10:41.000Z
2019-11-11T11:45:37.000Z
import os.path import logging from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 from base64 import b64encode from config.config import clientname logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) filehandler = logging.FileHandler('logs/stock_excha...
29.389313
85
0.624935
94ab1530813abe09a4cf310d3b3fbba99a04d2e1
32,281
py
Python
da_unidirectional_training.py
mlnotebook/domain_adapation_istn
83ff3c5265d433cc5076392ddc9ae62b0193eaa3
[ "MIT" ]
9
2020-07-01T21:56:52.000Z
2022-03-01T05:21:36.000Z
da_unidirectional_training.py
mlnotebook/domain_adapation_istn
83ff3c5265d433cc5076392ddc9ae62b0193eaa3
[ "MIT" ]
1
2020-10-03T08:26:10.000Z
2020-10-03T08:59:35.000Z
da_unidirectional_training.py
mlnotebook/domain_adapation_istn
83ff3c5265d433cc5076392ddc9ae62b0193eaa3
[ "MIT" ]
1
2020-12-28T21:21:25.000Z
2020-12-28T21:21:25.000Z
import os import json import argparse import torch import logging import time import numpy as np import shutil from tqdm import tqdm from itertools import cycle from models.task_models import LeNet3D_regressor, LeNet3D_classifier, Discriminator from models.itn import ITN3D from models.stn import BSplineSTN3D, AffineST...
50.439063
170
0.573712
127de0a861338e1016fe8787a1ac276c8663bb30
3,258
py
Python
firmware/centralNodesDataRead.py
mi3nts/mqttSubscribers
c5891f85a14a2e12fa68be3d9c25f83c5934511d
[ "MIT" ]
null
null
null
firmware/centralNodesDataRead.py
mi3nts/mqttSubscribers
c5891f85a14a2e12fa68be3d9c25f83c5934511d
[ "MIT" ]
null
null
null
firmware/centralNodesDataRead.py
mi3nts/mqttSubscribers
c5891f85a14a2e12fa68be3d9c25f83c5934511d
[ "MIT" ]
null
null
null
# MQTT Client demo # Continuously monitor two different MQTT topics for data, # check if the received data matches two predefined 'commands' import paho.mqtt.client as mqtt import ast import datetime import yaml import collections import json import ssl from mintsXU4 import mintsSensorReader as mSR from mintsXU4 im...
34.659574
104
0.677716
b3db455b5d7cba8d4985eefad687e425837790c5
12,227
py
Python
batchglm/unit_test/test_acc_glm_all_numpy.py
le-ander/batchglm
31b905b99b6baa7c94b82550d6a74f00d81966ea
[ "BSD-3-Clause" ]
null
null
null
batchglm/unit_test/test_acc_glm_all_numpy.py
le-ander/batchglm
31b905b99b6baa7c94b82550d6a74f00d81966ea
[ "BSD-3-Clause" ]
null
null
null
batchglm/unit_test/test_acc_glm_all_numpy.py
le-ander/batchglm
31b905b99b6baa7c94b82550d6a74f00d81966ea
[ "BSD-3-Clause" ]
null
null
null
import logging import numpy as np import scipy.sparse import unittest import batchglm.api as glm glm.setup_logging(verbosity="WARNING", stream="STDOUT") logger = logging.getLogger(__name__) class _TestAccuracyGlmAllEstim: def __init__( self, simulator, quick_scale, ...
33.683196
100
0.594831
2d4e58e65c13021b6aef301648f4edb2f65c41db
608
py
Python
doc/samples/custom_loader.py
m4ta1l/doit
d1a1b7b3abc7641d977d3b78b580d97aea4e27ea
[ "MIT" ]
1,390
2015-01-01T21:11:47.000Z
2022-03-31T11:35:44.000Z
doc/samples/custom_loader.py
m4ta1l/doit
d1a1b7b3abc7641d977d3b78b580d97aea4e27ea
[ "MIT" ]
393
2015-01-05T11:18:29.000Z
2022-03-20T11:46:46.000Z
doc/samples/custom_loader.py
m4ta1l/doit
d1a1b7b3abc7641d977d3b78b580d97aea4e27ea
[ "MIT" ]
176
2015-01-07T16:58:56.000Z
2022-03-28T12:12:11.000Z
#! /usr/bin/env python3 import sys from doit.task import dict_to_task from doit.cmd_base import TaskLoader2 from doit.doit_cmd import DoitMain my_builtin_task = { 'name': 'sample_task', 'actions': ['echo hello from built in'], 'doc': 'sample doc', } class MyLoader(TaskLoader2): def setup(self, opt_...
20.266667
52
0.669408
32d9cda0338d1c232b876f78fc4c71fa21a9997f
2,461
py
Python
adbForTest/Utils/PackUtils.py
LiuTianen/PackManage
4b067954cc223baa14569a6f1517954b9cdb968f
[ "MIT" ]
null
null
null
adbForTest/Utils/PackUtils.py
LiuTianen/PackManage
4b067954cc223baa14569a6f1517954b9cdb968f
[ "MIT" ]
null
null
null
adbForTest/Utils/PackUtils.py
LiuTianen/PackManage
4b067954cc223baa14569a6f1517954b9cdb968f
[ "MIT" ]
null
null
null
#!/usr/bin/env python #coding=utf-8 """ 使用Python获取待测APP的相关参数信息 """ import os import subprocess from Utils.Common import Common class APP: # 获取APP的文件大小 def get_apk_size(self): size = os.path.getsize(Common().apkPath()) / (1024 * 1000) return('%.2f' % size)+ "M" #保留小数点后两位 # 获取APP的版本信息 ...
31.151899
69
0.536774
3283f4830199367a1dc3a0e987a97f9320ab55ba
1,548
py
Python
end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py
barjomet/openapi-python-client
3d0b96478a81a84468f9f34e70c715a486915108
[ "MIT" ]
null
null
null
end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py
barjomet/openapi-python-client
3d0b96478a81a84468f9f34e70c715a486915108
[ "MIT" ]
null
null
null
end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py
barjomet/openapi-python-client
3d0b96478a81a84468f9f34e70c715a486915108
[ "MIT" ]
null
null
null
from typing import Any, Dict, Union import httpx from ...client import Client from ...types import UNSET, Response, Unset def _get_kwargs( *, client: Client, common: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: url = "{}/common_parameters".format(client.base_url) headers: Dict[str, Any] = cl...
21.205479
82
0.609173
fe63e9208c4c60b5bd16357a5e115d0f987793cf
11,307
py
Python
Pyrado/pyrado/algorithms/step_based/a2c.py
swami1995/SimuRLacra
795e6ea45fbb722242ddb0c0ea5c62432826411e
[ "DOC", "Zlib", "BSD-3-Clause" ]
52
2020-05-02T13:55:09.000Z
2022-03-09T14:49:36.000Z
Pyrado/pyrado/algorithms/step_based/a2c.py
swami1995/SimuRLacra
795e6ea45fbb722242ddb0c0ea5c62432826411e
[ "DOC", "Zlib", "BSD-3-Clause" ]
40
2020-09-01T15:19:22.000Z
2021-11-02T14:51:41.000Z
Pyrado/pyrado/algorithms/step_based/a2c.py
swami1995/SimuRLacra
795e6ea45fbb722242ddb0c0ea5c62432826411e
[ "DOC", "Zlib", "BSD-3-Clause" ]
13
2020-07-03T11:39:21.000Z
2022-02-20T01:12:42.000Z
# Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source ...
47.1125
119
0.683824
e8705f68c8d3fe2062eff1bb0ad8737418dd2f6d
3,253
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/_configuration.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/_configuration.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
null
null
null
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/_configuration.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.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 ...
47.838235
130
0.701506
3abad2a6cb91b98718b33d5d90d6b544a6ff781b
3,494
py
Python
onnx/backend/test/case/node/cumsum.py
justinchuby/onnx
805ae1e634697e37b43701e585c9c253a29ce076
[ "Apache-2.0" ]
1
2022-03-04T03:29:37.000Z
2022-03-04T03:29:37.000Z
onnx/backend/test/case/node/cumsum.py
justinchuby/onnx
805ae1e634697e37b43701e585c9c253a29ce076
[ "Apache-2.0" ]
null
null
null
onnx/backend/test/case/node/cumsum.py
justinchuby/onnx
805ae1e634697e37b43701e585c9c253a29ce076
[ "Apache-2.0" ]
1
2022-03-27T19:17:02.000Z
2022-03-27T19:17:02.000Z
# SPDX-License-Identifier: Apache-2.0 import numpy as np # type: ignore import onnx from ..base import Base from . import expect class CumSum(Base): @staticmethod def export_cumsum_1d() -> None: node = onnx.helper.make_node( 'CumSum', inputs=['x', 'axis'], outpu...
32.962264
82
0.495993
950980ee6f78b97a9e8ddadee24e2942a883396d
5,004
py
Python
julesDataHandler.py
tquaife/julesML
5b3c01a7c947c2798cc15e74356eb08918701b80
[ "Apache-2.0" ]
1
2020-06-09T18:58:07.000Z
2020-06-09T18:58:07.000Z
julesDataHandler.py
tquaife/julesML
5b3c01a7c947c2798cc15e74356eb08918701b80
[ "Apache-2.0" ]
null
null
null
julesDataHandler.py
tquaife/julesML
5b3c01a7c947c2798cc15e74356eb08918701b80
[ "Apache-2.0" ]
2
2021-01-14T18:34:41.000Z
2021-01-19T23:18:45.000Z
from datetime import datetime from copy import copy import numpy as np class julesData(object): def __init__(self, file_name): """Class to hold jules data and provide samples for machine learning """ self.file_name=file_name self.read_data() self.lags=[0,] ...
29.964072
88
0.559752
32d81a0ecbadbbab64d8b6e915da51e5ea7039c8
7,725
py
Python
tests/python/pants_test/tasks/test_ivy_utils.py
WamBamBoozle/pants
98cadfa1a5d337146903eb66548cfe955f2627b3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/tasks/test_ivy_utils.py
WamBamBoozle/pants
98cadfa1a5d337146903eb66548cfe955f2627b3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/tasks/test_ivy_utils.py
WamBamBoozle/pants
98cadfa1a5d337146903eb66548cfe955f2627b3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
33.297414
113
0.633916
25ff02bd25c5e1275b30ea1a58a0b007701b2b75
483
py
Python
autogram/commons/models/models.py
ohduran/autogram
e24c7ff40c44cd0eabf8018e61ad5fe0b422a6a1
[ "MIT" ]
null
null
null
autogram/commons/models/models.py
ohduran/autogram
e24c7ff40c44cd0eabf8018e61ad5fe0b422a6a1
[ "MIT" ]
null
null
null
autogram/commons/models/models.py
ohduran/autogram
e24c7ff40c44cd0eabf8018e61ad5fe0b422a6a1
[ "MIT" ]
null
null
null
from django.db import models class HasUser(models.Model): user = models.ForeignKey('users.User', on_delete=models.CASCADE) class Meta: abstract = True class NaturalKeyable(models.Model): class Meta: abstract = True def natural_key(self): natural_key = getattr(self, self._...
17.25
68
0.666667
40161cd396626fccc0b721d7dbe339b0fb6802db
367
py
Python
color_tol/__init__.py
lazarillo/color_tol
a8a63f4756bc45e0151e480eec36059f93f08ffc
[ "MIT" ]
3
2020-08-06T22:19:22.000Z
2021-08-04T11:30:29.000Z
color_tol/__init__.py
lazarillo/color_tol
a8a63f4756bc45e0151e480eec36059f93f08ffc
[ "MIT" ]
null
null
null
color_tol/__init__.py
lazarillo/color_tol
a8a63f4756bc45e0151e480eec36059f93f08ffc
[ "MIT" ]
null
null
null
""" color_tol is a pure Python package for accessing Paul Tol-style colormaps. See personal.sron.nl/~pault/colourschemes.pdf for more information. (colourschemes.pdf is also added under /docs in this package.) """ __version__ = '0.1' __all__ = [] from color_tol.funcs import diverging from color_tol.funcs import sequ...
26.214286
74
0.787466
026906c89e299b16b806c1526c20d3272ef1ee42
15,959
py
Python
cloudify_agent/shell/commands/daemons.py
cloudify-cosmo/cloudify-agent
9036842a31a31e0f5a25895dc9097a2f37c3eba9
[ "Apache-2.0" ]
12
2016-01-23T00:54:47.000Z
2021-11-23T19:04:02.000Z
cloudify_agent/shell/commands/daemons.py
cloudify-cosmo/cloudify-agent
9036842a31a31e0f5a25895dc9097a2f37c3eba9
[ "Apache-2.0" ]
122
2015-08-18T19:34:44.000Z
2022-02-03T13:16:19.000Z
cloudify_agent/shell/commands/daemons.py
cloudify-cosmo/cloudify-agent
9036842a31a31e0f5a25895dc9097a2f37c3eba9
[ "Apache-2.0" ]
22
2015-07-15T14:28:18.000Z
2021-05-11T02:18:02.000Z
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
37.200466
79
0.612131
051cb68d86a9353a0a28d7d80f94f12cde503ae3
3,623
py
Python
ProcessMaker_PMIO/models/result_success.py
ProcessMaker/pmio-sdk-python
49ddf9e6444c77a35ce51aa052059b254e0f5299
[ "Apache-2.0" ]
2
2017-11-10T05:10:44.000Z
2020-05-14T14:20:01.000Z
ProcessMaker_PMIO/models/result_success.py
ProcessMaker/pmio-sdk-python
49ddf9e6444c77a35ce51aa052059b254e0f5299
[ "Apache-2.0" ]
null
null
null
ProcessMaker_PMIO/models/result_success.py
ProcessMaker/pmio-sdk-python
49ddf9e6444c77a35ce51aa052059b254e0f5299
[ "Apache-2.0" ]
4
2017-07-01T22:04:18.000Z
2020-05-14T14:33:41.000Z
# coding: utf-8 """ ProcessMaker API This ProcessMaker I/O API provides access to a BPMN 2.0 compliant workflow engine api that is designed to be used as a microservice to support enterprise cloud applications.  The current Alpha 1.0 version supports most of the descriptive class of the BPMN 2.0 specification...
28.527559
278
0.577698
ae9041f31946a19ee5fb03b77eb88e5d7002b3e5
3,436
py
Python
scripts/test_one.py
sealionkat/sn-built-up-area
44ec9da0bcf314f22f7b0ee27bf8c8c39f97ab73
[ "MIT" ]
null
null
null
scripts/test_one.py
sealionkat/sn-built-up-area
44ec9da0bcf314f22f7b0ee27bf8c8c39f97ab73
[ "MIT" ]
null
null
null
scripts/test_one.py
sealionkat/sn-built-up-area
44ec9da0bcf314f22f7b0ee27bf8c8c39f97ab73
[ "MIT" ]
null
null
null
from sys import argv, exit from PIL import Image import sys sys.path.insert(0, '../caffe/python/') import caffe PREFIX_DIR = '' IN_DIR = PREFIX_DIR + 'maps/' OUT_DIR = PREFIX_DIR + 'data/' TESTS_DIR = PREFIX_DIR + 'tests/' TRAIN_DB_FILENAME = OUT_DIR + 'train.txt' MODEL_FILE = PREFIX_DIR + 'snapshots/_iter_10000...
29.118644
103
0.548312
786a09900fcdedcbca480719366d7095c5f3a8ed
256
py
Python
Python/TDD/test_even.py
JosephAMumford/CodingDojo
505be74d18d7a8f41c4b3576ca050b97f840f0a3
[ "MIT" ]
2
2018-08-18T15:14:45.000Z
2019-10-16T16:14:13.000Z
Python/TDD/test_even.py
JosephAMumford/CodingDojo
505be74d18d7a8f41c4b3576ca050b97f840f0a3
[ "MIT" ]
null
null
null
Python/TDD/test_even.py
JosephAMumford/CodingDojo
505be74d18d7a8f41c4b3576ca050b97f840f0a3
[ "MIT" ]
6
2018-05-05T18:13:05.000Z
2021-05-20T11:32:48.000Z
import unittest def isEven(n): return n % 2 == 0 class IsEvenTests(unittest.TestCase): def testTwo(self): self.failUnless(isEven(2)) def testThree(self): self.failIf(isEven(3)) if __name__ == '__main__': unittest.main()
17.066667
37
0.636719
7c71df3cbca1eb38ba9bd581284b996435e8707c
197
py
Python
django_libs/utils_email.py
Reston/django-libs
8c44a0851e3be564a100df50d257c1ce5b30dc25
[ "MIT" ]
30
2016-11-24T21:37:36.000Z
2021-09-18T11:29:44.000Z
django_libs/utils_email.py
Reston/django-libs
8c44a0851e3be564a100df50d257c1ce5b30dc25
[ "MIT" ]
8
2018-12-08T16:58:21.000Z
2021-01-05T14:44:50.000Z
django_libs/utils_email.py
Reston/django-libs
8c44a0851e3be564a100df50d257c1ce5b30dc25
[ "MIT" ]
15
2018-04-25T07:07:38.000Z
2021-08-02T13:17:32.000Z
"""Kept for backwards compatibility.""" import warnings from .utils.email import * # NOQA warnings.warn('Please import from django_libs.utils.email instead.', DeprecationWarning)
21.888889
68
0.715736
c35f7fedaa9316de57d13fd24e27eb1b2a7b4cae
2,260
py
Python
ad_api/api/sb/snapshots.py
matt-behrens-1/python-amazon-ad-api
257a0ff2366fed04b12f3491e689e3a52994b1ca
[ "MIT" ]
null
null
null
ad_api/api/sb/snapshots.py
matt-behrens-1/python-amazon-ad-api
257a0ff2366fed04b12f3491e689e3a52994b1ca
[ "MIT" ]
null
null
null
ad_api/api/sb/snapshots.py
matt-behrens-1/python-amazon-ad-api
257a0ff2366fed04b12f3491e689e3a52994b1ca
[ "MIT" ]
1
2022-02-03T18:46:27.000Z
2022-02-03T18:46:27.000Z
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse class Snapshots(Client): """ Use the Amazon Advertising API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the Sponsore...
52.55814
293
0.684956
28629d69c5787873f5f59ec5162f2115ac08fbaf
135
py
Python
codegen.py
macrat/PyIMDB
28c8f6f4aa2b8bb875ce42205ecb0ed70970d4f5
[ "MIT" ]
1
2021-09-10T01:24:31.000Z
2021-09-10T01:24:31.000Z
codegen.py
macrat/PyIMDB
28c8f6f4aa2b8bb875ce42205ecb0ed70970d4f5
[ "MIT" ]
null
null
null
codegen.py
macrat/PyIMDB
28c8f6f4aa2b8bb875ce42205ecb0ed70970d4f5
[ "MIT" ]
1
2021-09-10T01:24:32.000Z
2021-09-10T01:24:32.000Z
from grpc.tools import protoc protoc.main({ '', '-I.', '--python_out=.', '--grpc_python_out=.', './msg.proto', })
13.5
29
0.511111
2f4d0d6e0679f1eb10e5d7bcaed2abde67ee9e39
1,237
py
Python
sea_agents.py
newc4/aiTest
a6ab4450cc992d0a68a7a3673b63b52ebb020ff1
[ "MIT" ]
null
null
null
sea_agents.py
newc4/aiTest
a6ab4450cc992d0a68a7a3673b63b52ebb020ff1
[ "MIT" ]
null
null
null
sea_agents.py
newc4/aiTest
a6ab4450cc992d0a68a7a3673b63b52ebb020ff1
[ "MIT" ]
null
null
null
from env import SeaWarEnv import numpy as np import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('--camp', type=int, default=1, help='None') args = parser.parse_args() if args.camp == 1: env = SeaWarEnv(camp=1) elif args.camp == 2: env = SeaWarEnv(ca...
27.488889
96
0.587712
633382653f1688ad4275653226bda6f1ab3eecfd
390
py
Python
app/api/service/transform.py
tanimutomo/app-on-gpu
7a4ca5b962f249be1f0932bd96b2980c2ec9537c
[ "MIT" ]
1
2020-09-04T02:38:43.000Z
2020-09-04T02:38:43.000Z
app/api/service/transform.py
tanimutomo/app-on-gpu
7a4ca5b962f249be1f0932bd96b2980c2ec9537c
[ "MIT" ]
null
null
null
app/api/service/transform.py
tanimutomo/app-on-gpu
7a4ca5b962f249be1f0932bd96b2980c2ec9537c
[ "MIT" ]
null
null
null
import torch from torchvision import transforms IMAGENET_MEAN = (0.485, 0.456, 0.406) IMAGENET_STD = (0.229, 0.224, 0.225) def get_transform(): return transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize( ...
19.5
37
0.617949
ce0da36f21550039552712d2fceb5097bf828bb9
14,818
py
Python
endaq/ide/info.py
MideTechnology/endaq-python
a878efdd65f718c1324d92d467b19fd3b4142cd0
[ "MIT" ]
5
2021-12-02T04:41:52.000Z
2022-02-01T19:44:41.000Z
endaq/ide/info.py
MideTechnology/endaq-python
a878efdd65f718c1324d92d467b19fd3b4142cd0
[ "MIT" ]
136
2021-09-28T17:45:20.000Z
2022-03-30T11:35:15.000Z
endaq/ide/info.py
MideTechnology/endaq-python
a878efdd65f718c1324d92d467b19fd3b4142cd0
[ "MIT" ]
2
2021-11-08T19:22:17.000Z
2021-12-15T20:25:04.000Z
""" Functions for retrieving summary data from a dataset. """ from __future__ import annotations import typing from collections import defaultdict import datetime import warnings import numpy as np import pandas as pd import pandas.io.formats.style import idelib.dataset from .measurement import MeasurementType, ANY,...
40.376022
123
0.597112
c296255648a97e7a9fbf38aa4342cdeb1bd66de1
2,498
py
Python
contrail-opserver/setup.py
toha10/contrail-analytics
f5c84afd13ecb10062f960d02b2c4f10a5c3f11b
[ "Apache-2.0" ]
null
null
null
contrail-opserver/setup.py
toha10/contrail-analytics
f5c84afd13ecb10062f960d02b2c4f10a5c3f11b
[ "Apache-2.0" ]
2
2018-12-04T02:20:52.000Z
2018-12-22T06:16:30.000Z
contrail-opserver/setup.py
toha10/contrail-analytics
f5c84afd13ecb10062f960d02b2c4f10a5c3f11b
[ "Apache-2.0" ]
1
2018-12-04T02:07:47.000Z
2018-12-04T02:07:47.000Z
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import re from setuptools import setup, find_packages, Command import distutils class RunTestsCommand(Command): description = "Test command to run testr in virtualenv" user_options = [ ('coverage', 'c', "Generate code cove...
32.441558
73
0.577262
0aadc299d3f0e19ba5bf1f043b65975adf7929c8
2,809
py
Python
src/model/common.py
sheepc/DRBAESR-PyTorch-master
fab85e73a368b487691887c393a261208fc55d4b
[ "MIT" ]
40
2019-12-04T09:28:31.000Z
2022-01-03T09:08:15.000Z
src/model/common.py
sheepc/DRBAESR-PyTorch-master
fab85e73a368b487691887c393a261208fc55d4b
[ "MIT" ]
3
2020-01-06T13:26:51.000Z
2021-11-11T05:36:59.000Z
src/model/common.py
sheepc/DRBAESR-PyTorch-master
fab85e73a368b487691887c393a261208fc55d4b
[ "MIT" ]
8
2019-12-13T12:17:28.000Z
2021-08-06T19:18:37.000Z
import math import torch import torch.nn as nn import torch.nn.functional as F def default_conv(in_channels, out_channels, kernel_size, bias=True): return nn.Conv2d( in_channels, out_channels, kernel_size, padding=(kernel_size // 2), bias=bias) class MeanShift(nn.Conv2d): def __init__( ...
30.532609
85
0.543254
77b3553aafc4553d34e0064cbcecac4a5bf75387
16,523
py
Python
vunit/vhdl/check/tools/generate_check_match.py
eataesierp/vunit
96a24b38ba1553f520beb81f26753ca85dafb707
[ "Artistic-2.0", "Apache-2.0" ]
507
2016-02-10T16:45:16.000Z
2022-03-26T13:22:51.000Z
vunit/vhdl/check/tools/generate_check_match.py
eataesierp/vunit
96a24b38ba1553f520beb81f26753ca85dafb707
[ "Artistic-2.0", "Apache-2.0" ]
572
2016-01-27T11:31:10.000Z
2022-03-23T11:46:56.000Z
vunit/vhdl/check/tools/generate_check_match.py
eataesierp/vunit
96a24b38ba1553f520beb81f26753ca85dafb707
[ "Artistic-2.0", "Apache-2.0" ]
224
2016-01-29T09:09:53.000Z
2022-03-28T12:10:56.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (c) 2014-2021, Lars Asplund lars.anders.asplund@gmail.com from pathlib import Path from string import Temp...
35.230277
120
0.604733
2e5ba1d17ad984e74356f1269202bb07d05a6d3a
6,680
py
Python
src/transformers/models/herbert/tokenization_herbert_fast.py
JadeMaveric/transformers
fb2b89840bf2ab9f74702bf83af8ddf92b61efb3
[ "Apache-2.0" ]
34
2021-07-05T02:44:31.000Z
2022-03-28T14:39:57.000Z
src/transformers/models/herbert/tokenization_herbert_fast.py
JadeMaveric/transformers
fb2b89840bf2ab9f74702bf83af8ddf92b61efb3
[ "Apache-2.0" ]
3
2021-07-22T15:49:44.000Z
2022-03-19T08:46:27.000Z
src/transformers/models/herbert/tokenization_herbert_fast.py
JadeMaveric/transformers
fb2b89840bf2ab9f74702bf83af8ddf92b61efb3
[ "Apache-2.0" ]
6
2021-07-05T02:44:32.000Z
2022-02-14T10:10:13.000Z
# coding=utf-8 # Copyright 2020 The Google AI Language Team Authors, Allegro.pl, Facebook Inc. and the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
38.837209
119
0.642964
c743a54a27af11f0962aa19e49053476ab1b8815
29,997
py
Python
konrad/cloud.py
Stella-B/konrad
195e242f9ef20acd6cd8eb6068ae07632b66fe83
[ "MIT" ]
null
null
null
konrad/cloud.py
Stella-B/konrad
195e242f9ef20acd6cd8eb6068ae07632b66fe83
[ "MIT" ]
null
null
null
konrad/cloud.py
Stella-B/konrad
195e242f9ef20acd6cd8eb6068ae07632b66fe83
[ "MIT" ]
null
null
null
"""This module contains a choice of clouds, which can be used either in the RCE simulations or simply for radiative flux or heating rate calculations. Depending on the choice of cloud, a certain set-up of the RRTMG radiation scheme must be used. **In an RCE simulation** Create an instance of a cloud class, *e.g.* a :...
39.007802
90
0.619895
8fa3e72cd56d9b3f31d9d7c2df89c23cc23b5974
1,605
py
Python
handsome/opencl_api.py
bracket/handsome
c93d34f94d0eea24f5514efc9bc423eb28b44a6b
[ "BSD-2-Clause" ]
null
null
null
handsome/opencl_api.py
bracket/handsome
c93d34f94d0eea24f5514efc9bc423eb28b44a6b
[ "BSD-2-Clause" ]
null
null
null
handsome/opencl_api.py
bracket/handsome
c93d34f94d0eea24f5514efc9bc423eb28b44a6b
[ "BSD-2-Clause" ]
null
null
null
__all__ = [ 'fill_micropolygon_mesh' ] from pathlib import Path from .util import memoize import numpy as np import pyopencl as cl def fill_micropolygon_mesh(mesh, tile): from .capi import generate_numpy_begin, print_vertices rows, columns = mesh.buffer.shape buffer_ptr = generate_numpy_begin(mesh...
22.928571
102
0.706542
d86f3671864ec9ef1ee9d5888433b7c3df8f2c5d
1,988
py
Python
examples/spend_p2wsh_to_p2wpkh.py
doersf/python-bitcoin-utils
ab558513aba706d0215463fffc615772a955a142
[ "MIT" ]
null
null
null
examples/spend_p2wsh_to_p2wpkh.py
doersf/python-bitcoin-utils
ab558513aba706d0215463fffc615772a955a142
[ "MIT" ]
null
null
null
examples/spend_p2wsh_to_p2wpkh.py
doersf/python-bitcoin-utils
ab558513aba706d0215463fffc615772a955a142
[ "MIT" ]
2
2021-09-20T23:55:53.000Z
2021-12-14T16:06:25.000Z
# Copyright (C) 2018-2020 The python-bitcoin-utils developers # # This file is part of python-bitcoin-utils # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoin-utils, including this file, may be copied, # modified, propagated,...
35.5
110
0.753018
2db2955a69b511f0c7b8e3f01bf69012fa848255
2,520
py
Python
mpcontribs-api/mpcontribs/api/notebooks/__init__.py
rkingsbury/MPContribs
8427cb09a389706e4a4249374afa2faa51bb340e
[ "MIT" ]
null
null
null
mpcontribs-api/mpcontribs/api/notebooks/__init__.py
rkingsbury/MPContribs
8427cb09a389706e4a4249374afa2faa51bb340e
[ "MIT" ]
null
null
null
mpcontribs-api/mpcontribs/api/notebooks/__init__.py
rkingsbury/MPContribs
8427cb09a389706e4a4249374afa2faa51bb340e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from uuid import uuid1 from flask import current_app from tornado.escape import json_encode, json_decode from mpcontribs.api import create_kernel_connection, get_logger logger = get_logger(__name__) def run_cells(kernel_id, cid, cells): logger.debug(f"running {cid} on {kernel_id}") ws...
38.181818
78
0.424206