hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
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
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
248
max_forks_repo_name
stringlengths
5
125
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
1b933659f87b8cf39336c9379fc5288ae062f439
6,714
py
Python
onap_data_provider/resources/sdc_properties_mixins.py
onap/integration-data-provider
0565394ecbd96730bf982909693514ab88703708
[ "Apache-2.0" ]
null
null
null
onap_data_provider/resources/sdc_properties_mixins.py
onap/integration-data-provider
0565394ecbd96730bf982909693514ab88703708
[ "Apache-2.0" ]
null
null
null
onap_data_provider/resources/sdc_properties_mixins.py
onap/integration-data-provider
0565394ecbd96730bf982909693514ab88703708
[ "Apache-2.0" ]
null
null
null
"""SDC properties mixins module.""" """ Copyright 2021 Deutsche Telekom AG 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 r...
40.203593
112
0.613196
5,643
0.840483
0
0
0
0
0
0
2,863
0.426422
1b94671a381123d62794de44e17b4732cff5ed86
3,193
py
Python
simple_kg/discovery/entropy_pmi_new_word_discovery/utils.py
xiangking/simpleKG
d1464ec649022e17b2352b6249749af1b064526e
[ "MIT" ]
1
2021-09-18T18:02:44.000Z
2021-09-18T18:02:44.000Z
simple_kg/discovery/entropy_pmi_new_word_discovery/utils.py
xiangking/simpleKG
d1464ec649022e17b2352b6249749af1b064526e
[ "MIT" ]
null
null
null
simple_kg/discovery/entropy_pmi_new_word_discovery/utils.py
xiangking/simpleKG
d1464ec649022e17b2352b6249749af1b064526e
[ "MIT" ]
null
null
null
import re import math import codecs import random import numpy as np def is_not_chinese(uchar:str): """ 判断一个unicode是否是汉字 :param uchar: (str) 待判断的字符 """ if uchar.isalpha() is True: return False elif uchar >= u'\u4e00' and uchar <= u'\u9fa5': return False else: retur...
24.945313
145
0.561854
2,516
0.716197
377
0.107316
650
0.185027
0
0
1,414
0.402505
1b96072783b482fa73746dbf9752bb1b1b75453f
197
py
Python
ProjectsWithKivy/Projects with Kivy/1. Kivy Layouts/6. PageLayout/pagelayout.py
markgacoka/micro-projects
e8115c8270a115282e7dfda6e24620b3333f8c6b
[ "MIT" ]
null
null
null
ProjectsWithKivy/Projects with Kivy/1. Kivy Layouts/6. PageLayout/pagelayout.py
markgacoka/micro-projects
e8115c8270a115282e7dfda6e24620b3333f8c6b
[ "MIT" ]
null
null
null
ProjectsWithKivy/Projects with Kivy/1. Kivy Layouts/6. PageLayout/pagelayout.py
markgacoka/micro-projects
e8115c8270a115282e7dfda6e24620b3333f8c6b
[ "MIT" ]
null
null
null
import kivy from kivy.app import App from kivy.uix.pagelayout import PageLayout class PageLayoutApp(App): def build(self): return PageLayout() if __name__ == '__main__': PageLayoutApp().run()
19.7
42
0.761421
65
0.329949
0
0
0
0
0
0
10
0.050761
1b9679ab1f843bbdf20a721c6df2300c3a1bbd49
5,988
py
Python
vscvs/cli/train/optimizers.py
fcoclavero/vscvs
27fab0bc62fb68da044cf6f2516e3c1853f77533
[ "MIT" ]
1
2019-07-02T19:07:15.000Z
2019-07-02T19:07:15.000Z
vscvs/cli/train/optimizers.py
fcoclavero/vscvs
27fab0bc62fb68da044cf6f2516e3c1853f77533
[ "MIT" ]
2
2019-10-23T18:05:37.000Z
2020-09-25T14:16:25.000Z
vscvs/cli/train/optimizers.py
fcoclavero/vscvs
27fab0bc62fb68da044cf6f2516e3c1853f77533
[ "MIT" ]
null
null
null
__author__ = ["Francisco Clavero"] __description__ = "Click groups for different optimizers." __email__ = ["fcoclavero32@gmail.com"] __status__ = "Prototype" import click from vscvs.cli.decorators import pass_kwargs_to_context from vscvs.trainers.mixins import ( AdaBoundOptimizerMixin, AdamOptimizerMixin, ...
25.699571
94
0.665832
0
0
0
0
5,428
0.90648
0
0
2,832
0.472946
1b96e763ec1fd38d58bc97efc3d4e768f050096b
5,323
py
Python
data_loader_UAST.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
data_loader_UAST.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
data_loader_UAST.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
import torch from torch.utils.data import Dataset, DataLoader from pre_ast_path import ASTParser from tqdm import tqdm, trange import multiprocessing from multiprocessing import Process, freeze_support import pickle import config import os import re from gen_graph import get_adj, gen_feature from unified_vocab import u...
33.062112
124
0.629344
1,109
0.208341
0
0
0
0
0
0
872
0.163817
1b9791b9dacaa542877d2b291d6238097e8580f1
1,708
py
Python
sdk/python/pulumi_apigateway/_inputs.py
justinvp/pulumi-apigateway
09787a2728f9212d11b155ebeba71d2a95451360
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_apigateway/_inputs.py
justinvp/pulumi-apigateway
09787a2728f9212d11b155ebeba71d2a95451360
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_apigateway/_inputs.py
justinvp/pulumi-apigateway
09787a2728f9212d11b155ebeba71d2a95451360
[ "Apache-2.0" ]
2
2021-04-16T16:39:53.000Z
2021-06-22T13:43:34.000Z
# coding=utf-8 # *** WARNING: this file was generated by Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from . import _utilities, _tables import pul...
29.964912
88
0.64637
1,313
0.768735
0
0
1,332
0.779859
0
0
343
0.20082
1b97dcc4fee182443ecf7a65d71d064d71890c18
847
py
Python
benedict/serializers/json.py
fabiocaccamo/python-benedict
da061049164efab95ee4360a9c971c5be248fbf2
[ "MIT" ]
365
2019-05-21T05:50:30.000Z
2022-03-29T11:35:35.000Z
benedict/serializers/json.py
fabiocaccamo/python-benedict
da061049164efab95ee4360a9c971c5be248fbf2
[ "MIT" ]
78
2019-11-16T12:22:54.000Z
2022-03-14T12:21:30.000Z
benedict/serializers/json.py
fabiocaccamo/python-benedict
da061049164efab95ee4360a9c971c5be248fbf2
[ "MIT" ]
26
2019-12-16T06:34:12.000Z
2022-02-28T07:16:41.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from benedict.serializers.abstract import AbstractSerializer from benedict.utils import type_util from six import text_type import json class JSONSerializer(AbstractSerializer): def __init__(self): super(JSONSerializer, self).__init__() ...
24.911765
60
0.654073
641
0.756789
0
0
0
0
0
0
32
0.03778
1b981f9403e35e3edad1513c56a1d0685d8c02e9
5,148
py
Python
docs/report/fa20-523-349/project/RankNet/indycar/online-lstm.py
mikahla1/cybertraining-dsc.github.io
168cadb2f755cb6ad4907e5656bd879d57e01e43
[ "Apache-2.0" ]
4
2020-10-16T21:59:07.000Z
2021-06-27T16:32:50.000Z
docs/report/fa20-523-349/project/RankNet/indycar/online-lstm.py
mikahla1/cybertraining-dsc.github.io
168cadb2f755cb6ad4907e5656bd879d57e01e43
[ "Apache-2.0" ]
8
2020-09-04T13:14:18.000Z
2021-08-19T09:05:27.000Z
docs/report/fa20-523-349/project/RankNet/indycar/online-lstm.py
mikahla1/cybertraining-dsc.github.io
168cadb2f755cb6ad4907e5656bd879d57e01e43
[ "Apache-2.0" ]
25
2020-08-16T17:17:53.000Z
2021-07-08T22:54:34.000Z
from pandas import DataFrame from pandas import Series from pandas import concat from pandas import read_csv from pandas import datetime from sklearn.metrics import mean_squared_error from sklearn.preprocessing import MinMaxScaler from keras.models import Sequential from keras.layers import Dense from keras.layers impo...
34.32
120
0.668221
0
0
0
0
0
0
0
0
1,031
0.200272
1b9a65a2e9f2cc5df22b0506c5bd68872b48ef7e
11,625
py
Python
src/hpx_dashboard/server/widgets/widgets.py
jokteur/hpx-dashboard
91ca3876dec389e514f89f34acdb6ec9cac9d1b4
[ "BSD-3-Clause" ]
6
2020-07-31T08:12:09.000Z
2022-01-16T03:35:06.000Z
src/hpx_dashboard/server/widgets/widgets.py
jokteur/hpx-dashboard
91ca3876dec389e514f89f34acdb6ec9cac9d1b4
[ "BSD-3-Clause" ]
23
2020-08-12T08:51:12.000Z
2020-09-29T16:45:54.000Z
src/hpx_dashboard/server/widgets/widgets.py
jokteur/hpx-dashboard
91ca3876dec389e514f89f34acdb6ec9cac9d1b4
[ "BSD-3-Clause" ]
2
2020-10-08T13:55:45.000Z
2022-01-16T03:37:13.000Z
# -*- coding: utf-8 -*- # # HPX - dashboard # # Copyright (c) 2020 - ETH Zurich # All rights reserved # # SPDX-License-Identifier: BSD-3-Clause """ """ import copy from datetime import datetime import json from bokeh.layouts import column, row from bokeh.models.widgets import Button, Div, Toggle, TextAreaInput from...
33.598266
100
0.590624
11,062
0.95157
0
0
0
0
0
0
2,681
0.230624
1b9ab88a23de12fc95ac762bd368c0dee895cb3a
2,063
py
Python
akatsuki/thanos/migrations/0003_auto_20210829_1818.py
raun/vigilant-system
f535e16d63c7d48e550b52e4d1e833569cb43669
[ "MIT" ]
null
null
null
akatsuki/thanos/migrations/0003_auto_20210829_1818.py
raun/vigilant-system
f535e16d63c7d48e550b52e4d1e833569cb43669
[ "MIT" ]
8
2021-09-08T14:13:53.000Z
2021-09-09T02:12:44.000Z
akatsuki/thanos/migrations/0003_auto_20210829_1818.py
raun/vigilant-system
f535e16d63c7d48e550b52e4d1e833569cb43669
[ "MIT" ]
1
2021-08-29T05:17:43.000Z
2021-08-29T05:17:43.000Z
# Generated by Django 3.2.6 on 2021-08-29 18:18 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), ('thanos', '0002_auto_2021...
38.924528
152
0.607368
1,904
0.922928
0
0
0
0
0
0
396
0.191953
1b9e89c2c7b2551425e05e9bab467dd513d23999
15,379
py
Python
src/core/uv_edit/prim.py
Epihaius/panda3dstudio
f5c62ca49617cae1aa5aa5b695200027da99e242
[ "BSD-3-Clause" ]
63
2016-01-02T16:28:47.000Z
2022-01-19T11:29:51.000Z
src/core/uv_edit/prim.py
Epihaius/panda3dstudio
f5c62ca49617cae1aa5aa5b695200027da99e242
[ "BSD-3-Clause" ]
12
2016-06-12T14:14:15.000Z
2020-12-18T16:11:45.000Z
src/core/uv_edit/prim.py
Epihaius/panda3dstudio
f5c62ca49617cae1aa5aa5b695200027da99e242
[ "BSD-3-Clause" ]
17
2016-05-23T00:02:27.000Z
2021-04-25T17:48:27.000Z
from .base import * import array class UVPrimitivePart: def __init__(self, picking_color_id, owner, data_row_range, start_positions, default_positions, geom_prim, pos): self.picking_color_id = picking_color_id self.id = picking_color_id self.owner = owner self.da...
36.185882
91
0.63099
15,340
0.997464
0
0
0
0
0
0
506
0.032902
1ba2705eba4f588807811918b9d16b830ce3ae7b
5,185
py
Python
lyrebird/config.py
voodoocooder/lyrebird
02e6ebdcfd646855f9648293d9b5ef6da1c6603b
[ "MIT" ]
1
2020-12-11T03:20:11.000Z
2020-12-11T03:20:11.000Z
lyrebird/config.py
voodoocooder/lyrebird
02e6ebdcfd646855f9648293d9b5ef6da1c6603b
[ "MIT" ]
null
null
null
lyrebird/config.py
voodoocooder/lyrebird
02e6ebdcfd646855f9648293d9b5ef6da1c6603b
[ "MIT" ]
null
null
null
import codecs import json import os from pathlib import Path import shutil from packaging import version from lyrebird.mock.logger_helper import get_logger from .version import IVERSION from typing import List from flask import Response, abort from lyrebird.mock.console_helper import warning_msg, err_msg import subpro...
35.272109
124
0.615043
4,584
0.876649
0
0
0
0
0
0
664
0.126984
1ba28bfe8ab06942b3b06a80f0ac591f457cd467
1,279
py
Python
LeetCode/Python3/Math/313. Super Ugly Number.py
WatsonWangZh/CodingPractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
11
2019-09-01T22:36:00.000Z
2021-11-08T08:57:20.000Z
LeetCode/Python3/Math/313. Super Ugly Number.py
WatsonWangZh/LeetCodePractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
null
null
null
LeetCode/Python3/Math/313. Super Ugly Number.py
WatsonWangZh/LeetCodePractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
2
2020-05-27T14:58:52.000Z
2020-05-27T15:04:17.000Z
# Write a program to find the nth super ugly number. # Super ugly numbers are positive numbers # whose all prime factors are in the given prime list primes of size k. # Example: # Input: n = 12, primes = [2,7,13,19] # Output: 32 # Explanation: [1,2,4,7,8,13,14,16,19,26,28,32] is the sequence of the first 12 # ...
31.975
80
0.526192
654
0.509743
0
0
0
0
0
0
648
0.505066
1ba2f844916c7c55e881bb2eb0b37cadd0f6a906
1,118
py
Python
petfax/server.py
stackdump/factom-hackathon
14ca64428121f4cb7b8aa18c76f452b7b79f0168
[ "MIT" ]
null
null
null
petfax/server.py
stackdump/factom-hackathon
14ca64428121f4cb7b8aa18c76f452b7b79f0168
[ "MIT" ]
null
null
null
petfax/server.py
stackdump/factom-hackathon
14ca64428121f4cb7b8aa18c76f452b7b79f0168
[ "MIT" ]
null
null
null
#!/usr/bin/env python from livereload import Server import bitwrap_io.server from bitwrap_io.api import Config from bitwrap_io.server import app, pnml_editor from flask_restful import Resource, Api class VetChain(Resource): """ save new Petri-Net XML definition """ def post(self, vetid): machine_de...
24.304348
81
0.660107
389
0.347943
0
0
0
0
0
0
298
0.266547
1ba40fa09320088e8373dee62cef5d2fb0a82f5f
3,368
py
Python
third_party_package/RDKit_2015_03_1/rdkit/Chem/EState/EState_VSA.py
Ivy286/cluster_basedfps
7fc216537f570436f008ea567c137d03ba2b6d81
[ "WTFPL" ]
9
2019-04-23T01:46:12.000Z
2021-08-16T07:07:12.000Z
third_party_package/RDKit_2015_03_1/rdkit/Chem/EState/EState_VSA.py
Ivy286/cluster_basedfps
7fc216537f570436f008ea567c137d03ba2b6d81
[ "WTFPL" ]
null
null
null
third_party_package/RDKit_2015_03_1/rdkit/Chem/EState/EState_VSA.py
Ivy286/cluster_basedfps
7fc216537f570436f008ea567c137d03ba2b6d81
[ "WTFPL" ]
5
2016-09-21T03:47:48.000Z
2019-07-30T22:17:35.000Z
# $Id$ # # Copyright (C)2003-2010 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ Hybrid EState-VSA de...
30.618182
102
0.676366
0
0
0
0
0
0
0
0
1,323
0.392815
1ba4de424c82fb446e78a5af5223e59e055c3a6e
266
py
Python
py/cap3/calentamiento.py
dacanizares/IntroCS-ES
1324b59a3bed86559117b01ad85384d593394d4a
[ "MIT" ]
2
2020-03-21T19:12:10.000Z
2020-03-27T03:59:41.000Z
py/cap3/calentamiento.py
dacanizares/IntroCS-ES
1324b59a3bed86559117b01ad85384d593394d4a
[ "MIT" ]
13
2020-03-20T01:27:57.000Z
2020-08-08T18:20:29.000Z
py/cap3/calentamiento.py
dacanizares/IntroCS-ES
1324b59a3bed86559117b01ad85384d593394d4a
[ "MIT" ]
null
null
null
# Punto 1 def multiplicar(a, b): m = 0 for i in range(0, b): m = m + a return m # Punto 2 def potencia(a, b): p = 1 for i in range(0, b): p = multiplicar(p, a) return p # Punto 3 a = input() b = input() print potencia(a, b)
14
29
0.507519
0
0
0
0
0
0
0
0
27
0.101504
1ba69541de6a827ed0694499f2b0ff1f99e24608
2,019
py
Python
examples/extract_clips.py
hannahherbig/gopro-py-api
7f4f87bc34448e95c2ff1230fe85724420db8b4e
[ "MIT" ]
null
null
null
examples/extract_clips.py
hannahherbig/gopro-py-api
7f4f87bc34448e95c2ff1230fe85724420db8b4e
[ "MIT" ]
1
2021-06-11T01:02:30.000Z
2021-06-11T01:02:30.000Z
examples/extract_clips.py
hannahherbig/gopro-py-api
7f4f87bc34448e95c2ff1230fe85724420db8b4e
[ "MIT" ]
null
null
null
import time import numpy as np from goprocam import GoProCamera, constants gpCam = GoProCamera.GoPro() # Extracts clips from latest video latestVideo = gpCam.getVideoInfo() print("Tag count %s" % latestVideo.get(constants.Info.TagCount)) arrayLength = latestVideo[constants.Info.TagCount] if arrayLength % 2 == 0: ...
31.546875
82
0.526003
0
0
0
0
0
0
0
0
305
0.151065
1ba76bd8b43fd2bdb2df468a9e9d41baccb0e88c
1,647
py
Python
gogoedu/management/commands/create-examples.py
tuandang98/gogoedu
f98587f9d315e1253d3a3b9e1e4cd9f148184e29
[ "MIT" ]
2
2021-04-27T16:00:32.000Z
2021-05-30T14:00:07.000Z
gogoedu/management/commands/create-misson.py
tuandang98/gogoedu
f98587f9d315e1253d3a3b9e1e4cd9f148184e29
[ "MIT" ]
null
null
null
gogoedu/management/commands/create-misson.py
tuandang98/gogoedu
f98587f9d315e1253d3a3b9e1e4cd9f148184e29
[ "MIT" ]
null
null
null
from django.core.management import BaseCommand from django_gamification.models import BadgeDefinition, Category, UnlockableDefinition, GamificationInterface from gogoedu.models import myUser class Command(BaseCommand): help = 'Generates fake data for the app' def handle(self, *args, **options): cate...
31.075472
112
0.612629
1,452
0.881603
0
0
0
0
0
0
275
0.16697
1ba9ca4fa4978599705739170468a0038dc28a23
16,675
py
Python
sea/directivity.py
MuriloCardosoSoares/sea
aa105cbbedcde0ddcb1047c28cd4337e7f72ee6d
[ "MIT" ]
5
2020-12-14T14:00:01.000Z
2021-11-22T17:51:55.000Z
sea/directivity.py
MuriloCardosoSoares/sea
aa105cbbedcde0ddcb1047c28cd4337e7f72ee6d
[ "MIT" ]
null
null
null
sea/directivity.py
MuriloCardosoSoares/sea
aa105cbbedcde0ddcb1047c28cd4337e7f72ee6d
[ "MIT" ]
null
null
null
import numpy as np import scipy import scipy.io import pickle from scipy.special import lpmv, spherical_jn, spherical_yn class Directivity: def __init__(self, data_path, rho0, c0, freq_vec, simulated_ir_duration, measurement_radius, sh_order, type, sample_rate=44100, **kwargs): ''...
46.319444
261
0.544168
12,459
0.747166
0
0
0
0
0
0
5,465
0.327736
1baa4fbac611a6d9068bca12c9e9ed78c295f1aa
1,326
py
Python
comp313p_reactive_planner_controller/scripts/map_tester.py
zcabzjs/Robotics-cw2
08a9c56c5507788cfa711de9794afd66cb862af6
[ "BSD-3-Clause" ]
null
null
null
comp313p_reactive_planner_controller/scripts/map_tester.py
zcabzjs/Robotics-cw2
08a9c56c5507788cfa711de9794afd66cb862af6
[ "BSD-3-Clause" ]
null
null
null
comp313p_reactive_planner_controller/scripts/map_tester.py
zcabzjs/Robotics-cw2
08a9c56c5507788cfa711de9794afd66cb862af6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import sys import rospy from nav_msgs.srv import GetMap from comp313p_reactive_planner_controller.occupancy_grid import OccupancyGrid from comp313p_reactive_planner_controller.search_grid import SearchGrid from comp313p_reactive_planner_controller.grid_drawer import GridDrawer # This class pings...
31.571429
106
0.71267
837
0.631222
0
0
0
0
0
0
245
0.184766
1baaf041d42b10f2b9e6bbb77092ffa352a07858
2,808
py
Python
model.py
fluxTH/RadioLogger4
d44c13886c93ec0ba64be8d6fce1d4600b49e993
[ "blessing" ]
null
null
null
model.py
fluxTH/RadioLogger4
d44c13886c93ec0ba64be8d6fce1d4600b49e993
[ "blessing" ]
null
null
null
model.py
fluxTH/RadioLogger4
d44c13886c93ec0ba64be8d6fce1d4600b49e993
[ "blessing" ]
null
null
null
########################################################### # ORM Initialization ########################################################### import json from sqlalchemy import ( Column, ForeignKey, Integer, String, DateTime, Text, Enum, ) from sqlalchemy.orm import relationship from sqlalche...
30.521739
105
0.622863
2,378
0.846866
0
0
0
0
0
0
481
0.171296
1babd018b5acfa8405f4fb134a0f5ed8ad34f2f2
49
py
Python
custom_token.py
Great-Li-Xin/dumb-chatbot
fdf237d7e0c493eb69cbe712b50158f221ccaf0c
[ "MIT" ]
222
2018-01-31T02:06:18.000Z
2020-12-09T08:08:02.000Z
custom_token.py
kevinmel2000/dumb-chatbot
f9ec825997ee45863bb301a9355532bfb09a7cb9
[ "MIT" ]
1
2022-03-15T05:42:01.000Z
2022-03-15T05:42:01.000Z
custom_token.py
realJustinLee/dumb-chatbot
1c67aa3d92913360564b746758820bee310bc06f
[ "MIT" ]
20
2018-04-05T18:10:00.000Z
2020-07-31T09:40:14.000Z
# TOKEN PAD_token = 0 GO_token = 1 EOS_token = 2
9.8
13
0.693878
0
0
0
0
0
0
0
0
7
0.142857
1bac7f2a02209aa3c1416e9cfc5dbdbd50ec2aad
1,151
py
Python
src/spinnaker_ros_lsm/src/jointangle_to_int64.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
2
2020-11-01T13:22:11.000Z
2020-11-01T13:22:20.000Z
src/spinnaker_ros_lsm/src/jointangle_to_int64.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
null
null
null
src/spinnaker_ros_lsm/src/jointangle_to_int64.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python ''' @author Nicolas Berberich @date 07.09.2017 ROS node for converting joint sensor encoder values to degrees and radians. ''' import rospy from std_msgs.msg import Int64 from spinn_ros_msgs.msg import Myo_Joint_Angle import numpy as np def convert_angle(): ''' #topic: /to_spinnaker ...
20.192982
128
0.677672
0
0
0
0
0
0
0
0
590
0.512598
1bacfc265b86cfe88af89507263771e673a9fca6
10,098
py
Python
sdk/python/pulumi_aws_native/timestream/table.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws_native/timestream/table.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws_native/timestream/table.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
44.09607
184
0.653694
9,678
0.958408
0
0
7,510
0.743712
0
0
4,295
0.425332
1bad56ad689387d54b73f03233d0f2cbf354e3cc
1,048
py
Python
migrations/versions/570_create_brief_responses_table.py
uk-gov-mirror/alphagov.digitalmarketplace-api
5a1db63691d0c4a435714837196ab6914badaf62
[ "MIT" ]
25
2015-01-14T10:45:13.000Z
2021-05-26T17:21:41.000Z
migrations/versions/570_create_brief_responses_table.py
uk-gov-mirror/alphagov.digitalmarketplace-api
5a1db63691d0c4a435714837196ab6914badaf62
[ "MIT" ]
641
2015-01-15T11:10:50.000Z
2021-06-15T22:18:42.000Z
migrations/versions/570_create_brief_responses_table.py
uk-gov-mirror/alphagov.digitalmarketplace-api
5a1db63691d0c4a435714837196ab6914badaf62
[ "MIT" ]
22
2015-06-13T15:37:45.000Z
2021-08-19T23:40:49.000Z
"""Create brief responses table Revision ID: 570 Revises: 560 Create Date: 2016-02-10 12:19:22.888832 """ # revision identifiers, used by Alembic. revision = '570' down_revision = '560' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): op.create_table('br...
29.942857
107
0.714695
0
0
0
0
0
0
0
0
405
0.38645
1baf04303536b99a3ebb6d62d4ffeb153d15b182
2,224
py
Python
tests/stages/test_sklearn_stages.py
blakeNaccarato/pdpcli
ad3ca6c2eccb552bfb4450b5cce02b30c5087282
[ "MIT" ]
15
2021-02-24T18:22:45.000Z
2022-01-06T22:08:46.000Z
tests/stages/test_sklearn_stages.py
blakeNaccarato/pdpcli
ad3ca6c2eccb552bfb4450b5cce02b30c5087282
[ "MIT" ]
1
2022-01-07T08:13:07.000Z
2022-01-07T08:13:07.000Z
tests/stages/test_sklearn_stages.py
blakeNaccarato/pdpcli
ad3ca6c2eccb552bfb4450b5cce02b30c5087282
[ "MIT" ]
1
2022-01-06T22:08:44.000Z
2022-01-06T22:08:44.000Z
import numpy import pandas from sklearn.decomposition import PCA from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import LogisticRegression from pdpcli.stages.sklearn_stages import SklearnPredictor, SklearnTransformer def test_sklearn_predictor() -> None: df = pandas.DataFram...
25.563218
77
0.600719
0
0
0
0
0
0
0
0
295
0.132644
1bb0d457e17e75fde37dc7cb2a27e8e10c174a94
49
py
Python
drain3/__init__.py
ieven/Drain3
0e4157bc33462dba7c2a72ba4c3fbfdbdecd2cfa
[ "MIT" ]
175
2020-03-05T10:47:15.000Z
2022-03-31T15:13:08.000Z
drain3/__init__.py
ieven/Drain3
0e4157bc33462dba7c2a72ba4c3fbfdbdecd2cfa
[ "MIT" ]
43
2020-03-09T10:56:58.000Z
2022-03-31T23:12:33.000Z
drain3/__init__.py
ieven/Drain3
0e4157bc33462dba7c2a72ba4c3fbfdbdecd2cfa
[ "MIT" ]
53
2020-03-09T09:59:20.000Z
2022-03-30T18:04:11.000Z
from drain3.template_miner import TemplateMiner
16.333333
47
0.877551
0
0
0
0
0
0
0
0
0
0
1bb5269d4cdf01dc30f6d34313240f2a75be5789
5,043
py
Python
clmm/plotting.py
96RadhikaJadhav/CLMM
cd0508f82f9a6a4692fe785277ac25c73e89d0d7
[ "BSD-3-Clause" ]
null
null
null
clmm/plotting.py
96RadhikaJadhav/CLMM
cd0508f82f9a6a4692fe785277ac25c73e89d0d7
[ "BSD-3-Clause" ]
null
null
null
clmm/plotting.py
96RadhikaJadhav/CLMM
cd0508f82f9a6a4692fe785277ac25c73e89d0d7
[ "BSD-3-Clause" ]
null
null
null
"""A collection of scripts that can be used to plot the various quantities that CLMM models.""" import matplotlib.pyplot as plt from .galaxycluster import GalaxyCluster def plot_profiles(cluster=None, rbins=None, tangential_component=None, tangential_component_error=None, cross_component=None, cross...
45.432432
224
0.676581
0
0
0
0
0
0
0
0
2,827
0.560579
1bb5310f158638846addef3485329fd1186a5a2c
3,823
py
Python
src/naima/tests/test_saveread.py
zblz/naima
4e7b85dfcbc00d5e4474c2f339ace0e565c9ffcd
[ "BSD-3-Clause" ]
32
2015-01-02T03:09:58.000Z
2022-03-04T15:30:53.000Z
src/naima/tests/test_saveread.py
Tyrannosaurusxuan/naima
4e7b85dfcbc00d5e4474c2f339ace0e565c9ffcd
[ "BSD-3-Clause" ]
97
2015-01-28T20:09:44.000Z
2021-11-01T23:16:12.000Z
src/naima/tests/test_saveread.py
Tyrannosaurusxuan/naima
4e7b85dfcbc00d5e4474c2f339ace0e565c9ffcd
[ "BSD-3-Clause" ]
45
2015-01-16T09:17:15.000Z
2022-03-31T08:33:46.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import astropy.units as u import numpy as np from astropy.io import ascii from astropy.tests.helper import pytest from astropy.utils.data import get_pkg_data_filename from ..analysis import read_run, save_run from ..model_fitter import Interact...
30.584
73
0.69762
0
0
0
0
2,973
0.777662
0
0
358
0.093644
1bb7506d3b4ef13debad4f463bd0c3cecc4860d0
7,513
py
Python
twccli/commands/net.py
TW-NCHC/TWCC-CLI
743be786440ff6f9689c6a10cc2131565e51d391
[ "Apache-2.0" ]
12
2019-04-27T07:45:02.000Z
2020-11-13T08:16:18.000Z
twccli/commands/net.py
twcc/TWCC-CLI
743be786440ff6f9689c6a10cc2131565e51d391
[ "Apache-2.0" ]
23
2021-03-05T07:53:37.000Z
2022-03-20T03:12:33.000Z
twccli/commands/net.py
TW-NCHC/TWCC-CLI
743be786440ff6f9689c6a10cc2131565e51d391
[ "Apache-2.0" ]
6
2019-02-27T00:19:11.000Z
2020-11-13T08:16:19.000Z
from twccli.twcc.services.compute import GpuSite, VcsSite, VcsSecurityGroup, VcsServerNet from twccli.twcc.util import isNone, mk_names from twccli.twcc.services.compute import getServerId, getSecGroupList from twccli.twcc.services.compute_util import list_vcs from twccli.twccli import pass_environment, logger from twc...
33.540179
231
0.591508
0
0
0
0
5,226
0.695594
0
0
2,537
0.337681
1bb7f351e87f8b65266319e8795ddb9e3e9b0ea5
4,154
py
Python
apps/users/tests/test_forms.py
bensternthal/affiliates
e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1
[ "BSD-3-Clause" ]
null
null
null
apps/users/tests/test_forms.py
bensternthal/affiliates
e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1
[ "BSD-3-Clause" ]
null
null
null
apps/users/tests/test_forms.py
bensternthal/affiliates
e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.core import mail from django.forms import Form from mock import patch from nose.tools import eq_, ok_ from test_utils import TestCase from users import forms class EditProfileFormTests(TestCase): def _form(self, **kwargs): """Default profile edit form.""" ...
29.884892
78
0.612662
3,931
0.946317
0
0
254
0.061146
0
0
964
0.232065
1bb7fb2a1b9c93628680395b5402a95c58d49234
16,609
py
Python
qsiprep/cli/recon_plot.py
arokem/qsiprep
f0a12fa002ea99cad97f2b5e40c1517d0569e14c
[ "BSD-3-Clause" ]
null
null
null
qsiprep/cli/recon_plot.py
arokem/qsiprep
f0a12fa002ea99cad97f2b5e40c1517d0569e14c
[ "BSD-3-Clause" ]
null
null
null
qsiprep/cli/recon_plot.py
arokem/qsiprep
f0a12fa002ea99cad97f2b5e40c1517d0569e14c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import warnings import os import sys import os.path as op from argparse import ArgumentParser from argparse import RawTextHelpFormatter import nibabel as nb import numpy as np from qsiprep.niworkflows.viz.utils import slices_from_bbox from qsiprep.interfaces.converters import fib2amps, mif2amps fr...
43.252604
90
0.617858
0
0
0
0
0
0
0
0
2,008
0.120898
1bb83da1c4ee56bb7f6b29451e7244bad2be8a01
2,740
py
Python
tests/regressiontests/aggregation_regress/tests.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
tests/regressiontests/aggregation_regress/tests.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
tests/regressiontests/aggregation_regress/tests.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.test import TestCase from django.db.models import Count, Max from regressiontests.aggregation_regress.models import * class AggregationTests(TestCase): def test_aggregates_in_where_clause(self): """ Regression test for #12822: DatabaseError: aggregate...
38.055556
82
0.626642
2,573
0.939051
0
0
0
0
0
0
1,487
0.542701
1bbaf70e6d7277e8e9e2216ee33cc6779be14e8e
3,884
py
Python
Node.py
recep-yildirim/Astar-Algorithm
77936f42fac464d73ef6024ef808a188008801e7
[ "MIT" ]
null
null
null
Node.py
recep-yildirim/Astar-Algorithm
77936f42fac464d73ef6024ef808a188008801e7
[ "MIT" ]
null
null
null
Node.py
recep-yildirim/Astar-Algorithm
77936f42fac464d73ef6024ef808a188008801e7
[ "MIT" ]
null
null
null
class Node () : def __init__ (self , table , index = None) : self.__table = table self.__index = index self.__weight = self.__calculateWeight () self.__left_child = None self.__forward_child = None self.__right_child = None self.__parent = None def getTab...
31.577236
132
0.555098
3,884
1
0
0
0
0
0
0
60
0.015448
1bbb61f6bb7f5635828fad04e429c28202fefb4b
732
py
Python
http/flask/validation.py
hanwhhanwh/python-test
ac97ae83fc9eac3157ff7dc39d6295bc5b15d589
[ "MIT" ]
null
null
null
http/flask/validation.py
hanwhhanwh/python-test
ac97ae83fc9eac3157ff7dc39d6295bc5b15d589
[ "MIT" ]
null
null
null
http/flask/validation.py
hanwhhanwh/python-test
ac97ae83fc9eac3157ff7dc39d6295bc5b15d589
[ "MIT" ]
null
null
null
from jsonschema import validate # A sample schema, like what we'd get from json.load() schema = { "type" : "object", "properties" : { "price" : {"type" : "number", "minimum": 0, "maximum": 39}, "name" : {"type" : "string"}, }, } # If no exception is raised by validate(), the instance is valid. validate(instanc...
28.153846
72
0.61612
0
0
0
0
0
0
0
0
496
0.677596
1bc0771c055dd72e5c309407645ee0f915a8b642
24
py
Python
before/0124/2743.py
Kwak-JunYoung/154Algoritm-5weeks
fa18ae5f68a1ee722a30a05309214247f7fbfda4
[ "MIT" ]
3
2022-01-24T03:06:32.000Z
2022-01-30T08:43:58.000Z
before/0124/2743.py
Kwak-JunYoung/154Algoritm-5weeks
fa18ae5f68a1ee722a30a05309214247f7fbfda4
[ "MIT" ]
null
null
null
before/0124/2743.py
Kwak-JunYoung/154Algoritm-5weeks
fa18ae5f68a1ee722a30a05309214247f7fbfda4
[ "MIT" ]
2
2022-01-24T02:27:40.000Z
2022-01-30T08:57:03.000Z
print(len(str(input())))
24
24
0.666667
0
0
0
0
0
0
0
0
0
0
1bc25d2905a6ec28f877db6a1883fd599be607eb
7,262
py
Python
tests/test_writer.py
hroncok/rst2txt
9a497d7e277df9a84bc9a89f3a19a7736ab78ecb
[ "BSD-2-Clause" ]
2
2019-05-15T12:31:37.000Z
2020-09-09T08:10:17.000Z
tests/test_writer.py
hroncok/rst2txt
9a497d7e277df9a84bc9a89f3a19a7736ab78ecb
[ "BSD-2-Clause" ]
null
null
null
tests/test_writer.py
hroncok/rst2txt
9a497d7e277df9a84bc9a89f3a19a7736ab78ecb
[ "BSD-2-Clause" ]
1
2021-03-31T09:46:33.000Z
2021-03-31T09:46:33.000Z
# -*- coding: utf-8 -*- """ Test for text writer. """ from __future__ import print_function import tempfile import textwrap from docutils.core import publish_string import rst2txt def assert_serialized(source, expected_output, settings=None): source = textwrap.dedent(source) expected_output = textwrap.dede...
23.577922
74
0.441338
0
0
0
0
0
0
0
0
5,426
0.747177
1bc2a0247712998d72a20f9bf18750c0caf78715
247
py
Python
S18/hw2/homework2part2.py
stanleylio/OCN318
98f0329ea38ddd4ed2966f8f845a0bb29e71b923
[ "MIT" ]
1
2018-03-05T23:33:59.000Z
2018-03-05T23:33:59.000Z
S18/hw2/homework2part2.py
stanleylio/OCN318
98f0329ea38ddd4ed2966f8f845a0bb29e71b923
[ "MIT" ]
null
null
null
S18/hw2/homework2part2.py
stanleylio/OCN318
98f0329ea38ddd4ed2966f8f845a0bb29e71b923
[ "MIT" ]
null
null
null
# The goal: Extract the first four columns from serial_log.txt and place them in output1.csv # # Hint: to join a list of strings into one string, use the .join() function: # ','.join(['256', '24.525', '103.70']) # yields # '256,24.525,103.70'
35.285714
92
0.668016
0
0
0
0
0
0
0
0
241
0.975709
1bc382532c3353e71e7dceae633e1c14a30df43c
998
py
Python
stake/migrations/0001_initial.py
lurdray/iotex_staking
cf5886bb92869365b41f4a9ce45be846c9c6ec51
[ "Apache-2.0" ]
null
null
null
stake/migrations/0001_initial.py
lurdray/iotex_staking
cf5886bb92869365b41f4a9ce45be846c9c6ec51
[ "Apache-2.0" ]
null
null
null
stake/migrations/0001_initial.py
lurdray/iotex_staking
cf5886bb92869365b41f4a9ce45be846c9c6ec51
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.7 on 2022-01-24 16:28 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.CreateM...
33.266667
114
0.612224
843
0.844689
0
0
0
0
0
0
177
0.177355
1bc3974da46b2e7222bd0a8f654b8b44516aed96
1,789
py
Python
Python/min-cost-climbing-stairs.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2022-01-30T06:55:28.000Z
2022-01-30T06:55:28.000Z
Python/min-cost-climbing-stairs.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
null
null
null
Python/min-cost-climbing-stairs.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2021-12-31T03:56:39.000Z
2021-12-31T03:56:39.000Z
# Time: O(n) # Space: O(1) # 746 # On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). # # Once you pay the cost, you can either climb one or two steps. # You need to find minimum cost to reach the top of the floor, # and you can either start from the step with index 0, or the step ...
28.396825
88
0.546115
870
0.486305
0
0
0
0
0
0
1,071
0.598658
1bc4943ecdbf1164bdb164129e61d0599e4b4509
398
py
Python
PyMOTW/source/fnmatch/fnmatch_fnmatch.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
PyMOTW/source/fnmatch/fnmatch_fnmatch.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2020-07-18T03:52:03.000Z
2020-07-18T04:18:01.000Z
PyMOTW/source/fnmatch/fnmatch_fnmatch.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
2
2021-03-06T04:28:32.000Z
2021-03-06T04:59:17.000Z
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """Test an individual filename with a pattern. """ #end_pymotw_header import fnmatch import os pattern = 'fnmatch_*.py' print('Pattern :', pattern) print() files = os.listdir('.') for name in sorted(files): print...
18.952381
55
0.678392
0
0
0
0
0
0
0
0
213
0.535176
1bc877b0af569563991836c407b7a62985a32bd0
3,767
py
Python
evaluation_metrics.py
87ZGitHub/sfd.pytorch
66108ab35d8b1c1601c326b151141d9115a1409e
[ "MIT" ]
124
2018-07-08T14:36:06.000Z
2021-04-08T14:01:20.000Z
evaluation_metrics.py
87ZGitHub/sfd.pytorch
66108ab35d8b1c1601c326b151141d9115a1409e
[ "MIT" ]
21
2018-07-09T07:17:40.000Z
2020-08-11T12:26:13.000Z
evaluation_metrics.py
87ZGitHub/sfd.pytorch
66108ab35d8b1c1601c326b151141d9115a1409e
[ "MIT" ]
25
2018-07-09T04:51:21.000Z
2021-04-06T15:40:45.000Z
import numpy as np from anchor import compute_iou import torch def AP(prediction, gt, iou_threshold): """compute average precision of detection, all the coordinate should be (top left bottom right) Args: predict_bboxes (ndarray): should be a N * (4 + 1 + 1) ndarray N is number of boxe...
36.221154
80
0.622511
0
0
0
0
0
0
0
0
1,472
0.390762
1bca0e909e09feec63176d078dcfee15f14ef06a
541
py
Python
src/the_tale/the_tale/game/heroes/migrations/0009_auto_20160319_1712.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
85
2017-11-21T12:22:02.000Z
2022-03-27T23:07:17.000Z
src/the_tale/the_tale/game/heroes/migrations/0009_auto_20160319_1712.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
545
2017-11-04T14:15:04.000Z
2022-03-27T14:19:27.000Z
src/the_tale/the_tale/game/heroes/migrations/0009_auto_20160319_1712.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
45
2017-11-11T12:36:30.000Z
2022-02-25T06:10:44.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-19 17:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('heroes', '0008_change_places_history_format'), ] operations = [ migrations.RemoveField( model_name='hero'...
21.64
56
0.584104
425
0.785582
0
0
0
0
0
0
163
0.301294
1bcaf2077f60c60393a9163a728dc944be68b9aa
4,151
py
Python
ml_src/utils.py
JaredDobry/imdb_scraper
70056e8bbed49470fa6cbb42e930c95c437bdee3
[ "MIT" ]
null
null
null
ml_src/utils.py
JaredDobry/imdb_scraper
70056e8bbed49470fa6cbb42e930c95c437bdee3
[ "MIT" ]
2
2021-11-17T22:43:26.000Z
2021-11-17T22:43:38.000Z
ml_src/utils.py
JaredDobry/imdb_scraper
70056e8bbed49470fa6cbb42e930c95c437bdee3
[ "MIT" ]
null
null
null
import random import pickle import pathlib import numpy as np import pandas as pd from json import loads from os.path import exists from typing import Any, Dict, List, Tuple from metrics import Category, Feature def unpickle_file(file: pathlib.Path) -> Any: abs_path = str(file) if not abs_path.endswith(".pick...
33.208
111
0.631414
0
0
0
0
0
0
0
0
906
0.218261
1bcb75a52c153491e5a8fa2aab5c85e45ee3a1cd
1,564
py
Python
desertbot/modules/commands/Gif.py
Helle-Daryd/DesertBot
0b497db135a4c08dfbdb59108f830ba12fdc6465
[ "MIT", "BSD-3-Clause" ]
7
2018-03-20T17:10:10.000Z
2021-11-17T18:58:04.000Z
desertbot/modules/commands/Gif.py
Helle-Daryd/DesertBot
0b497db135a4c08dfbdb59108f830ba12fdc6465
[ "MIT", "BSD-3-Clause" ]
109
2015-08-20T13:16:35.000Z
2022-01-21T19:40:35.000Z
desertbot/modules/commands/Gif.py
Helle-Daryd/DesertBot
0b497db135a4c08dfbdb59108f830ba12fdc6465
[ "MIT", "BSD-3-Clause" ]
7
2018-03-29T05:55:01.000Z
2021-02-05T19:19:39.000Z
""" Created on Dec 05, 2013 @author: StarlitGhost """ import random from twisted.plugin import IPlugin from zope.interface import implementer from desertbot.message import IRCMessage from desertbot.moduleinterface import IModule from desertbot.modules.commandinterface import BotCommand from desertbot.response import...
28.436364
85
0.621483
1,183
0.756394
0
0
1,214
0.776215
0
0
255
0.163043
1bcbc87a25327faeab5c975e6b8196f74250bcaa
9,457
py
Python
datalad/distribution/drop.py
psychoinformatics-de/datalad
7435edc1d3c73ae2254fa4bfcb8412a8de6d8d4c
[ "MIT" ]
298
2015-01-25T17:36:29.000Z
2022-03-20T03:38:47.000Z
datalad/distribution/drop.py
psychoinformatics-de/datalad
7435edc1d3c73ae2254fa4bfcb8412a8de6d8d4c
[ "MIT" ]
6,387
2015-01-02T18:15:01.000Z
2022-03-31T20:58:58.000Z
datalad/distribution/drop.py
psychoinformatics-de/datalad
7435edc1d3c73ae2254fa4bfcb8412a8de6d8d4c
[ "MIT" ]
109
2015-01-25T17:49:40.000Z
2022-03-06T06:54:54.000Z
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
33.775
91
0.592577
4,719
0.498995
4,836
0.511367
4,730
0.500159
0
0
3,899
0.412287
1bcc04e91758981f791ffbb36211c7f01c585bd9
13,552
py
Python
music-dl.py
SyTemossy/music-dl
ada8ecc92e85e5fbe5936684915bf4fe1bab5583
[ "MIT" ]
null
null
null
music-dl.py
SyTemossy/music-dl
ada8ecc92e85e5fbe5936684915bf4fe1bab5583
[ "MIT" ]
null
null
null
music-dl.py
SyTemossy/music-dl
ada8ecc92e85e5fbe5936684915bf4fe1bab5583
[ "MIT" ]
null
null
null
import argparse import sys import os import urllib import requests import json import random commands = [] path = sys.path[0] dpath = sys.path[0] autocreate = False netease_api = { 'music_url': 'http://music.163.com/song/media/outer/url?id=', 'playlist': 'https://api.surmon.me/music/list/', ...
37.333333
396
0.516824
9,132
0.663566
0
0
0
0
0
0
4,078
0.296323
1bcc76036f4adee6ab1ac6897a215f0d51bec9a3
4,604
py
Python
python/federatedml/param/data_split_param.py
hubert-he/FATE
6758e150bd7ca7d6f788f9a7a8c8aea7e6500363
[ "Apache-2.0" ]
3,787
2019-08-30T04:55:10.000Z
2022-03-31T23:30:07.000Z
python/federatedml/param/data_split_param.py
hubert-he/FATE
6758e150bd7ca7d6f788f9a7a8c8aea7e6500363
[ "Apache-2.0" ]
1,439
2019-08-29T16:35:52.000Z
2022-03-31T11:55:31.000Z
python/federatedml/param/data_split_param.py
hubert-he/FATE
6758e150bd7ca7d6f788f9a7a8c8aea7e6500363
[ "Apache-2.0" ]
1,179
2019-08-29T16:18:32.000Z
2022-03-31T12:55:38.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
43.028037
112
0.691138
3,850
0.836229
0
0
0
0
0
0
2,473
0.537142
1bcf4193f1b507db072e56b4dbd6e181fbe0b7ce
137
py
Python
samples/autodiscover/services/bases.py
ekiro/haps
88d225e0177de0a0373d12d42d1b6a80437b8d5c
[ "MIT" ]
38
2018-06-15T11:32:05.000Z
2020-05-08T17:04:42.000Z
samples/autodiscover/services/bases.py
lunarwings/haps
537222b5c28244ae87d803918e1b7ede3a338cc8
[ "MIT" ]
6
2020-03-02T19:13:56.000Z
2020-12-03T06:00:38.000Z
samples/autodiscover/services/bases.py
ekiro/haps
88d225e0177de0a0373d12d42d1b6a80437b8d5c
[ "MIT" ]
2
2019-05-17T09:58:36.000Z
2019-06-10T08:18:48.000Z
from haps import base @base class IHeater: def heat(self) -> None: raise NotImplementedError @base class IPump: pass
10.538462
33
0.664234
97
0.708029
0
0
109
0.79562
0
0
0
0
1bd10a1e1d8c38d5a012608be42f9224c3b3f533
6,258
py
Python
reid/trainers.py
xueping187/weakly-supervised-person-re-id
3cfe98264dcdb667c132727a57ab80da5a9e6a8f
[ "Apache-2.0" ]
2
2021-09-14T03:39:43.000Z
2021-09-14T03:41:04.000Z
reid/trainers.py
xueping187/weakly-supervised-person-re-id
3cfe98264dcdb667c132727a57ab80da5a9e6a8f
[ "Apache-2.0" ]
null
null
null
reid/trainers.py
xueping187/weakly-supervised-person-re-id
3cfe98264dcdb667c132727a57ab80da5a9e6a8f
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function, absolute_import import time import torch from torch.autograd import Variable import torch.nn.functional as F import numpy as np #from .evaluation_metrics import accuracy from .utils.meters import AverageMeter def MIL(element_logits, seq_len, batch_size, labels): ''' elemen...
42.283784
143
0.592681
3,299
0.527165
0
0
0
0
0
0
1,263
0.201822
1bd1b91cc7621a6826da68a2e74632538595b5f6
6,618
py
Python
basicsr/models/basicvsr_model.py
IanYeung/ReCp
1a7ace0e1ca3c262e24a222f3f0ab0d5674e9410
[ "Apache-2.0", "MIT" ]
null
null
null
basicsr/models/basicvsr_model.py
IanYeung/ReCp
1a7ace0e1ca3c262e24a222f3f0ab0d5674e9410
[ "Apache-2.0", "MIT" ]
null
null
null
basicsr/models/basicvsr_model.py
IanYeung/ReCp
1a7ace0e1ca3c262e24a222f3f0ab0d5674e9410
[ "Apache-2.0", "MIT" ]
null
null
null
import logging from copy import deepcopy import os.path as osp from tqdm import tqdm import torch from torch.nn.parallel import DistributedDataParallel from basicsr.models.video_base_model import VideoBaseModel from basicsr.utils import imwrite, tensor2img from basicsr.utils.dist_util import get_dist_info from basicsr....
39.628743
80
0.531581
6,147
0.92883
0
0
6,174
0.93291
0
0
935
0.141281
1bd1d04bc396f8cff36083c8dfa07a6895302798
733
py
Python
python/mesh/generic/fpgaRadio.py
MinesJA/meshNetwork
5ffada57c13049cb00c2996fe239cdff6edf6f17
[ "NASA-1.3" ]
133
2017-06-24T02:44:28.000Z
2022-03-25T05:17:00.000Z
python/mesh/generic/fpgaRadio.py
MinesJA/meshNetwork
5ffada57c13049cb00c2996fe239cdff6edf6f17
[ "NASA-1.3" ]
null
null
null
python/mesh/generic/fpgaRadio.py
MinesJA/meshNetwork
5ffada57c13049cb00c2996fe239cdff6edf6f17
[ "NASA-1.3" ]
33
2017-06-19T03:24:40.000Z
2022-02-03T20:13:12.000Z
import struct from mesh.generic.radio import Radio from mesh.generic.slipMsg import SLIP_END from mesh.generic.cmds import FPGACmds import crcmod.predefined class FPGARadio(Radio): def __init__(self, serial, config): Radio.__init__(self, serial, config) self.crc16 = crcmod.predefined.mkCr...
38.578947
158
0.684857
564
0.769441
0
0
0
0
0
0
217
0.296044
1bd2c291602bab4b785fdad8e90b37c866fe0baa
28,100
py
Python
service/doc_etl.py
wisebobo/doc_ocr_by_template
299601c9c5275cf6ad1bbdca071060df5ede0c7b
[ "MIT" ]
6
2019-11-29T10:10:58.000Z
2022-01-29T07:01:48.000Z
service/doc_etl.py
wisebobo/doc_ocr_by_template
299601c9c5275cf6ad1bbdca071060df5ede0c7b
[ "MIT" ]
7
2019-12-17T05:14:17.000Z
2022-02-10T01:08:50.000Z
service/doc_etl.py
wisebobo/doc_ocr_by_template
299601c9c5275cf6ad1bbdca071060df5ede0c7b
[ "MIT" ]
3
2019-12-17T09:44:28.000Z
2022-01-12T09:54:00.000Z
# -*- coding:utf-8 -*- import re, sys import time, logging from collections import OrderedDict from util.MRZ import MRZ, MRZOCRCleaner from util.ctc2hanzi import ctc_code from util.name2pinyin import ChineseName from util.CHN_ID_Verify import CHNIdNumber from util.log import logging_elapsed_time class doc_etl(object)...
38.545953
134
0.478221
28,046
0.989416
0
0
0
0
0
0
5,138
0.18126
1bd3506d46da04e4e4dbb22df73bd65177767e36
4,238
py
Python
MidControl.py
qchen59/CSC520_Pente_AI
fa2c3c530ccd59f442c4e448787ef066165a4906
[ "Apache-2.0" ]
null
null
null
MidControl.py
qchen59/CSC520_Pente_AI
fa2c3c530ccd59f442c4e448787ef066165a4906
[ "Apache-2.0" ]
1
2022-03-31T23:06:59.000Z
2022-03-31T23:06:59.000Z
MidControl.py
qchen59/CSC520_Pente_AI
fa2c3c530ccd59f442c4e448787ef066165a4906
[ "Apache-2.0" ]
1
2022-03-31T22:07:46.000Z
2022-03-31T22:07:46.000Z
import ConsecutivePieces as Cp import math import copy def mid_control_streaks(board, turn): """ Uses the 'calculate_streaks' method to work out the heuristic values. Then the heuristic values of the pieces that are in the middle 5x5 area of the board is doubled. This will bump up the final score as well....
47.088889
120
0.522888
0
0
0
0
0
0
0
0
1,511
0.356536
1bd3fe207be02c22aed167def654eb7cdcd195fb
1,259
py
Python
lang/py/rfc/21/SocketServer/async_server.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/21/SocketServer/async_server.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/21/SocketServer/async_server.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding:UTF-8 # 基于SocketServer的服务器 import socket import threading import SocketServer class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): data = self.request.recv(1024) cur_thread = threading.current_thread() response = "{}:{...
25.693878
77
0.69023
361
0.284028
0
0
0
0
0
0
190
0.149489
1bd438755efdfb68b94d3ed6b17ddefd4e151daa
1,237
py
Python
mpi/python/intercomm.py
tyohei/examples
38652f48aca2b668bcc116ba401795d4be2f8f18
[ "MIT" ]
1
2020-09-14T17:29:02.000Z
2020-09-14T17:29:02.000Z
mpi/python/intercomm.py
tyohei/examples
38652f48aca2b668bcc116ba401795d4be2f8f18
[ "MIT" ]
8
2020-09-05T10:19:39.000Z
2021-05-07T10:04:27.000Z
mpi/python/intercomm.py
tyohei/examples
38652f48aca2b668bcc116ba401795d4be2f8f18
[ "MIT" ]
null
null
null
from mpi4py import MPI import common def main(): comm = MPI.COMM_WORLD print_mpi = common.create_print_mpi(comm) print_mpi('Hello World!') if comm.rank == 0 or comm.rank == 1: intracomm = comm.Split(color=0, key=comm.rank) else: intracomm = comm.Split(color=1, key=comm.rank) ...
27.488889
76
0.579628
0
0
0
0
0
0
0
0
168
0.135812
1bd44a975f616274984e478de5da51d0ef63259d
3,151
py
Python
scripts/create_validators.py
ingoha/pilight-1
a319404034e761892a89c7205b6f1aff6ad8e205
[ "MIT" ]
5
2017-10-06T13:16:41.000Z
2021-07-05T06:42:51.000Z
scripts/create_validators.py
ingoha/pilight-1
a319404034e761892a89c7205b6f1aff6ad8e205
[ "MIT" ]
6
2016-10-19T09:46:38.000Z
2022-03-01T18:00:05.000Z
scripts/create_validators.py
ingoha/pilight-1
a319404034e761892a89c7205b6f1aff6ad8e205
[ "MIT" ]
8
2016-12-10T09:03:55.000Z
2019-03-30T18:37:45.000Z
''' This script reverse engineers the protocols defined in pilight. It converts them to voloptuous schemes to allow protocol validation before sending data to the pilight daemon. 'git' python package has to be installed. TODO: use regex for numbers ''' import re import glob import voluptuous as vo...
32.153061
71
0.573786
0
0
123
0.039035
0
0
0
0
1,059
0.336084
1bd491cad9869a11fddfbdfbb033b0459fbd192f
352
py
Python
src/tarski/syntax/transform/__init__.py
phoeft670/tarski
7d955e535fbbca012bfd1a12402b97febc6b35b9
[ "Apache-2.0" ]
29
2018-11-26T20:31:04.000Z
2021-12-29T11:08:40.000Z
src/tarski/syntax/transform/__init__.py
phoeft670/tarski
7d955e535fbbca012bfd1a12402b97febc6b35b9
[ "Apache-2.0" ]
101
2018-06-07T13:10:01.000Z
2022-03-11T11:54:00.000Z
src/tarski/syntax/transform/__init__.py
phoeft670/tarski
7d955e535fbbca012bfd1a12402b97febc6b35b9
[ "Apache-2.0" ]
18
2018-11-01T22:44:39.000Z
2022-02-28T04:57:15.000Z
from .nnf import NNFTransformation, to_negation_normal_form from .cnf import CNFTransformation, to_conjunctive_normal_form from .prenex import PrenexTransformation, to_prenex_negation_normal_form from .quantifier_elimination import QuantifierElimination, QuantifierEliminationMode, remove_quantifiers from .neg_builtin ...
50.285714
104
0.897727
0
0
0
0
0
0
0
0
0
0
1bd55542498a1bd15fdd8d4dd1716525214c8319
10,665
py
Python
psx/_dump_/28/_dump_ida_/overlay_b/set_vars.py
maoa3/scalpel
2e7381b516cded28996d290438acc618d00b2aa7
[ "Unlicense" ]
15
2018-06-28T01:11:25.000Z
2021-09-27T15:57:18.000Z
psx/_dump_/28/_dump_ida_/overlay_b/set_vars.py
maoa3/scalpel
2e7381b516cded28996d290438acc618d00b2aa7
[ "Unlicense" ]
7
2018-06-29T04:08:23.000Z
2019-10-17T13:57:22.000Z
psx/_dump_/28/_dump_ida_/overlay_b/set_vars.py
maoa3/scalpel
2e7381b516cded28996d290438acc618d00b2aa7
[ "Unlicense" ]
7
2018-06-28T01:11:34.000Z
2020-05-23T09:21:48.000Z
del_items(0x80137C50) SetType(0x80137C50, "struct THEME_LOC themeLoc[50]") del_items(0x80138398) SetType(0x80138398, "int OldBlock[4]") del_items(0x801383A8) SetType(0x801383A8, "unsigned char L5dungeon[80][80]") del_items(0x80138038) SetType(0x80138038, "struct ShadowStruct SPATS[37]") del_items(0x8013813C) SetType(0x...
35.431894
55
0.802344
0
0
0
0
0
0
0
0
4,065
0.381153
1bd68b28d8c64dd345a08272eb0f18a524da5c6e
6,255
py
Python
leetcode_python/Stack/baseball-game.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
leetcode_python/Stack/baseball-game.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
leetcode_python/Stack/baseball-game.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
""" 682. Baseball Game Easy You are keeping score for a baseball game with strange rules. The game consists of several rounds, where the scores of past rounds may affect future rounds' scores. At the beginning of the game, you start with an empty record. You are given a list of strings ops, where ops[i] is the ith o...
30.512195
190
0.515108
3,212
0.513509
0
0
0
0
0
0
3,034
0.485052
1bd6a6caa71854d84375e9c67599c513468cd9c2
2,823
py
Python
tests/unit/utils/cache_provider.py
swilde/OpenSlides
23ae32a75892005632784652d108836d1ba09da9
[ "MIT" ]
3
2021-02-11T20:45:58.000Z
2022-02-09T21:59:42.000Z
tests/unit/utils/cache_provider.py
swilde/OpenSlides
23ae32a75892005632784652d108836d1ba09da9
[ "MIT" ]
2
2021-11-02T15:48:16.000Z
2022-03-02T08:38:19.000Z
tests/unit/utils/cache_provider.py
swilde/OpenSlides
23ae32a75892005632784652d108836d1ba09da9
[ "MIT" ]
3
2021-01-18T11:44:05.000Z
2022-01-19T16:00:23.000Z
from typing import Any, Callable, Dict, List from openslides.utils.cache_providers import Cachable, MemoryCacheProvider def restrict_elements(elements: List[Dict[str, Any]]) -> List[Dict[str, Any]]: """ Adds the prefix 'restricted_' to all values except id. """ out = [] for element in elements: ...
28.515152
88
0.601488
1,599
0.566419
0
0
0
0
522
0.18491
675
0.239107
1bd6b6804b0cea77d67b807d4a13da9c6e74fa86
4,780
py
Python
rkqc/tools/gui/ui/ESOPSynthesis.py
clairechingching/ScaffCC
737ae90f85d9fe79819d66219747d27efa4fa5b9
[ "BSD-2-Clause" ]
158
2016-07-21T10:45:05.000Z
2022-03-25T00:56:20.000Z
rkqc/tools/gui/ui/ESOPSynthesis.py
clairechingching/ScaffCC
737ae90f85d9fe79819d66219747d27efa4fa5b9
[ "BSD-2-Clause" ]
35
2016-07-25T01:23:07.000Z
2021-09-27T16:05:50.000Z
rkqc/tools/gui/ui/ESOPSynthesis.py
clairechingching/ScaffCC
737ae90f85d9fe79819d66219747d27efa4fa5b9
[ "BSD-2-Clause" ]
62
2016-08-29T17:28:11.000Z
2021-12-29T17:55:58.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ESOPSynthesis.ui' # # Created: Wed May 11 17:29:16 2011 # by: PyQt4 UI code generator 4.8.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except A...
56.235294
148
0.729079
4,414
0.923431
0
0
0
0
0
0
603
0.126151
1bd6be2fc7c5b1b45e6116789f9a3be537751a34
6,970
py
Python
data/gta5_dataset.py
Jo-wang/ProDA
58910b1fe2bdbf79d0e12708b77b6df4f386bb49
[ "MIT" ]
193
2021-03-25T07:29:56.000Z
2022-03-30T08:56:44.000Z
caco_proda_finetune/data/gta5_dataset.py
jxhuang0508/CaCo
0106d93fd6277ca843572a6aa01bdf2d1caca117
[ "MIT" ]
43
2021-04-13T02:13:18.000Z
2022-03-31T11:14:58.000Z
caco_proda_finetune/data/gta5_dataset.py
jxhuang0508/CaCo
0106d93fd6277ca843572a6aa01bdf2d1caca117
[ "MIT" ]
35
2021-03-26T09:29:58.000Z
2022-01-20T17:40:08.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import sys import torch import numpy as np import scipy.misc as m import matplotlib.pyplot as plt import matplotlib.image as imgs from PIL import Image import random import scipy.io as io from tqdm import tqdm from scipy import stats ...
34.50495
114
0.545194
6,546
0.939168
0
0
0
0
0
0
1,345
0.19297
1bd8344c5079ad7625f96055dc71a256fa657bdc
14,857
py
Python
neural-net/neural-net.py
MrTeuthis/traffic-toronto
9bf33ddc437ec138e78539f35260ec46761f0fd2
[ "MIT" ]
null
null
null
neural-net/neural-net.py
MrTeuthis/traffic-toronto
9bf33ddc437ec138e78539f35260ec46761f0fd2
[ "MIT" ]
null
null
null
neural-net/neural-net.py
MrTeuthis/traffic-toronto
9bf33ddc437ec138e78539f35260ec46761f0fd2
[ "MIT" ]
null
null
null
import tensorflow as tf import random as rand import numpy as np import pickle import random import argparse import pprint from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter from matplotlib.animation import Fu...
39.938172
179
0.622871
0
0
0
0
0
0
0
0
2,907
0.195665
1bd84f91db30e70500d6e6134cbbca69df24cc6b
4,175
py
Python
tests/torch_api/test_process_group.py
woqidaideshi/bagua
0ee96da598685748519d58d24ce983499cb36721
[ "MIT" ]
635
2021-06-11T03:03:11.000Z
2022-03-31T14:52:57.000Z
tests/torch_api/test_process_group.py
zhjc/bagua
eeaa2bf8950248a2e72ce2e471bbf08cb3b8b985
[ "MIT" ]
181
2021-06-10T12:27:19.000Z
2022-03-31T04:08:19.000Z
tests/torch_api/test_process_group.py
shjwudp/bagua
7e1b438e27e3119b23e472f5b9217a9862932bef
[ "MIT" ]
71
2021-06-10T13:16:53.000Z
2022-03-22T09:26:22.000Z
import os import unittest import torch import torch.distributed as c10d import bagua.torch_api as bagua from tests.internal.common_utils import find_free_port from tests.internal.multi_process import MultiProcessTestCase, setup_bagua_env from tests import skip_if_cuda_not_available class Result(object): def __i...
32.617188
87
0.661796
2,321
0.555928
0
0
1,586
0.37988
0
0
488
0.116886
1bd85d1873c4b42c8b465294d73f6fd5c76d77ed
9,292
py
Python
spacekit/skopes/hst/svm/predict.py
hakkeray/spacekit
f57e3bab80efca418b898996366d4dfb186246e0
[ "MIT" ]
1
2020-10-14T18:04:07.000Z
2020-10-14T18:04:07.000Z
spacekit/skopes/hst/svm/predict.py
hakkeray/spacekit
f57e3bab80efca418b898996366d4dfb186246e0
[ "MIT" ]
null
null
null
spacekit/skopes/hst/svm/predict.py
hakkeray/spacekit
f57e3bab80efca418b898996366d4dfb186246e0
[ "MIT" ]
null
null
null
""" This module generates predictions using a pre-trained ensemble neural network for unlabeled SVM regression test data and alignment images. The ensemble model is a combination of two neural networks: a MultiLayerPerceptron (for regression test data) and a 3D Image Convolutional Neural Network (CNN). The script inclu...
33.666667
396
0.62656
0
0
0
0
0
0
0
0
4,754
0.511623
1bd948d6210c3b20eae27d41f0ad6a8b33ca0641
1,209
py
Python
laskarit/viikko2/unicafe/src/kassapaate.py
miikara/landlord
1f9a2ae2485adb8837a9b1d0668cc0708aec4d5f
[ "MIT" ]
1
2021-05-16T22:41:55.000Z
2021-05-16T22:41:55.000Z
laskarit/viikko2/unicafe/src/kassapaate.py
miikara/landlord
1f9a2ae2485adb8837a9b1d0668cc0708aec4d5f
[ "MIT" ]
null
null
null
laskarit/viikko2/unicafe/src/kassapaate.py
miikara/landlord
1f9a2ae2485adb8837a9b1d0668cc0708aec4d5f
[ "MIT" ]
null
null
null
class Kassapaate: def __init__(self): self.kassassa_rahaa = 100000 self.edulliset = 0 self.maukkaat = 0 def syo_edullisesti_kateisella(self, maksu): if maksu >= 240: self.kassassa_rahaa = self.kassassa_rahaa + 240 self.edulliset += 1 return ma...
26.866667
59
0.544251
1,208
0.999173
0
0
0
0
0
0
0
0
1bdb8ff2ab04650c354ff55f8bfdaf2310b0c2ee
4,135
py
Python
multiuploader/utils.py
dicos/django-multiuploader
5fc7c782486bfab367e372b90efadb9c61e6e257
[ "MIT" ]
null
null
null
multiuploader/utils.py
dicos/django-multiuploader
5fc7c782486bfab367e372b90efadb9c61e6e257
[ "MIT" ]
null
null
null
multiuploader/utils.py
dicos/django-multiuploader
5fc7c782486bfab367e372b90efadb9c61e6e257
[ "MIT" ]
null
null
null
import os import time import urllib import logging import mimetypes from hashlib import sha1 from random import choice from wsgiref.util import FileWrapper from django.conf import settings from django.core.files import File from django.http import HttpResponse, StreamingHttpResponse from django.utils.tim...
32.559055
103
0.648126
0
0
0
0
0
0
0
0
1,124
0.271826
59ef80c6d5b9db80f94f7e583695d33684b37cea
672
py
Python
students/K33402/Barabanov Denis/lr1/task2/server.py
dEbAR38/ITMO_ICT_WebDevelopment_2020-2021
208cbc6d2b6d40c3043d35ce773a3433b377f671
[ "MIT" ]
null
null
null
students/K33402/Barabanov Denis/lr1/task2/server.py
dEbAR38/ITMO_ICT_WebDevelopment_2020-2021
208cbc6d2b6d40c3043d35ce773a3433b377f671
[ "MIT" ]
null
null
null
students/K33402/Barabanov Denis/lr1/task2/server.py
dEbAR38/ITMO_ICT_WebDevelopment_2020-2021
208cbc6d2b6d40c3043d35ce773a3433b377f671
[ "MIT" ]
null
null
null
import socket sock = socket.socket() sock.bind(('', 9090)) sock.listen(1) conn, addr = sock.accept() print(conn) while True: data = conn.recv(1024) data = str(data.decode()) print(data) if not data=='pifagor': conn.send('Такой задачи нет'.encode()) break else: conn.send('вве...
24.888889
63
0.541667
0
0
0
0
0
0
0
0
179
0.240915
59f050a0b633204f5e3438dac473652fa6b25572
12,025
py
Python
src/striemann/tests/test_striemann.py
madedotcom/striemann
fc6089bc5f1b96118ffe6474594798763d19c050
[ "MIT" ]
null
null
null
src/striemann/tests/test_striemann.py
madedotcom/striemann
fc6089bc5f1b96118ffe6474594798763d19c050
[ "MIT" ]
16
2018-05-29T14:52:57.000Z
2020-05-14T12:33:32.000Z
src/striemann/tests/test_striemann.py
madedotcom/striemann
fc6089bc5f1b96118ffe6474594798763d19c050
[ "MIT" ]
null
null
null
from expects import expect from icdiff_expects import equal from unittest import mock import striemann.metrics import json class Test: def test_gauges(self): transport = striemann.metrics.InMemoryTransport() metrics = striemann.metrics.Metrics(transport, source="test") metrics.recordGauge(...
30.0625
86
0.490728
11,884
0.988274
0
0
2,844
0.236507
0
0
2,192
0.182287
59f073559061a5de8a0cd772dadf4560b56bd0fb
5,128
py
Python
paper/figures/HD189733/viz.py
j-faria/wobble
041cd58fa8fb87bb5b41ee23bd1ea716bab7051b
[ "MIT" ]
38
2016-06-03T13:15:49.000Z
2021-12-01T00:02:11.000Z
paper/figures/HD189733/viz.py
j-faria/wobble
041cd58fa8fb87bb5b41ee23bd1ea716bab7051b
[ "MIT" ]
63
2016-09-17T13:38:16.000Z
2021-02-05T16:27:10.000Z
paper/figures/HD189733/viz.py
j-faria/wobble
041cd58fa8fb87bb5b41ee23bd1ea716bab7051b
[ "MIT" ]
17
2017-05-04T03:03:16.000Z
2022-01-10T17:56:43.000Z
from ipywidgets import interact, interactive, fixed, interact_manual import ipywidgets as widgets from ipywidgets import Layout import starry from ylm_rot import get_ylm_coeffs import matplotlib.pyplot as pl import numpy as np vslider = \ widgets.FloatSlider( value=0.1, min=0.1, max=10.0, step=0.01, ...
25.89899
88
0.608034
0
0
0
0
0
0
0
0
840
0.163807
59f0dcccc30e5c47e03c3762b37daf71a44fb738
14,101
py
Python
tests/test_simple.py
FFY00/mousebender
df0b7f7408c952ea8d124ab2c8c9b8c24ea77d06
[ "BSD-3-Clause" ]
21
2020-04-10T03:53:44.000Z
2022-01-12T08:31:56.000Z
tests/test_simple.py
FFY00/mousebender
df0b7f7408c952ea8d124ab2c8c9b8c24ea77d06
[ "BSD-3-Clause" ]
34
2020-04-10T19:56:29.000Z
2022-01-27T22:10:22.000Z
tests/test_simple.py
sthagen/mousebender
849844440f024adb9efe19c4774bae1ed45335f6
[ "BSD-3-Clause" ]
8
2020-04-10T03:09:00.000Z
2021-11-04T11:17:38.000Z
"""Tests for mousebender.simple.""" import warnings import importlib_resources import packaging.version import pytest from mousebender import simple from .data import simple as simple_data class TestProjectURLConstruction: """Tests for mousebender.simple.create_project_url().""" @pytest.mark.parametrize(...
37.403183
346
0.556344
13,801
0.978725
0
0
11,368
0.806184
0
0
5,910
0.419119
59f5273b29007b20b07871db2635217e7e4a6330
1,743
py
Python
danceschool/register/forms.py
django-danceschool/django-danceschool
65ae09ffdcb0821e82df0e1f634fe13c0384a525
[ "BSD-3-Clause" ]
32
2017-09-12T04:25:25.000Z
2022-03-21T10:48:07.000Z
danceschool/register/forms.py
django-danceschool/django-danceschool
65ae09ffdcb0821e82df0e1f634fe13c0384a525
[ "BSD-3-Clause" ]
97
2017-09-01T02:43:08.000Z
2022-01-03T18:20:34.000Z
danceschool/register/forms.py
django-danceschool/django-danceschool
65ae09ffdcb0821e82df0e1f634fe13c0384a525
[ "BSD-3-Clause" ]
19
2017-09-26T13:34:46.000Z
2022-03-21T10:48:10.000Z
from django import forms from django.utils.translation import gettext_lazy as _ from django.db.models import F from dal import autocomplete from danceschool.core.models import Customer class CustomerGuestAutocompleteForm(forms.Form): ''' This form can be used to search for customers and names on the guest ...
35.571429
79
0.583477
1,553
0.890993
0
0
0
0
0
0
708
0.406196
59f5db8231e7b5f35e36a4f3a192c0a0e3556e9c
252
py
Python
app/__init__.py
ethpch/api.ethpch
af56354a7e8f5304a5c86dd752577da376f1f1ce
[ "MIT" ]
2
2021-09-23T14:43:10.000Z
2021-09-26T12:01:11.000Z
app/__init__.py
ethpch/api.ethpch
af56354a7e8f5304a5c86dd752577da376f1f1ce
[ "MIT" ]
null
null
null
app/__init__.py
ethpch/api.ethpch
af56354a7e8f5304a5c86dd752577da376f1f1ce
[ "MIT" ]
null
null
null
from .base import APP from utils.config import apps if 'pixiv' in apps: from .pixiv import pixiv_router APP.include_router(pixiv_router) if 'shorturl' in apps: from .shorturl import shorturl_router APP.include_router(shorturl_router)
22.909091
41
0.761905
0
0
0
0
0
0
0
0
17
0.06746
59f6a0718d51a789e27b2f717d206af701b1445f
3,093
py
Python
SIR_functions.py
TheNewExecutor/CoronaVirus
779cd9f8338ce3b9f2a0383a5a526e694c65e3ee
[ "MIT" ]
null
null
null
SIR_functions.py
TheNewExecutor/CoronaVirus
779cd9f8338ce3b9f2a0383a5a526e694c65e3ee
[ "MIT" ]
null
null
null
SIR_functions.py
TheNewExecutor/CoronaVirus
779cd9f8338ce3b9f2a0383a5a526e694c65e3ee
[ "MIT" ]
null
null
null
from scipy.integrate import solve_ivp import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import mean_squared_error from hyperopt import hp, fmin, tpe from typing import Tuple def SIR(t, y, N, kappa, tau, nu): """ Expresses SIR model in initial value ODE format, including time, ...
28.118182
87
0.590365
0
0
0
0
0
0
0
0
1,686
0.545102
59f93eebbd7e541b8c3908f89c9876035051096e
854
py
Python
src/lcm_zmq_integration/xserver.py
bthcode/cmake_scipy_ctypes_example
64a7afdd825f0bb6a50cb174f4ced231b3017c8d
[ "BSD-3-Clause" ]
null
null
null
src/lcm_zmq_integration/xserver.py
bthcode/cmake_scipy_ctypes_example
64a7afdd825f0bb6a50cb174f4ced231b3017c8d
[ "BSD-3-Clause" ]
null
null
null
src/lcm_zmq_integration/xserver.py
bthcode/cmake_scipy_ctypes_example
64a7afdd825f0bb6a50cb174f4ced231b3017c8d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Example Script to show LCM serialized data transported on by very simple ZeroMQ pub/sub message server/client """ import zmq from example_lcm import image_t import time # # Set up a simple ZMQ publisher # - socket type is zmq.PUB, meaning fire and forget publisher # - socket connection...
20.333333
63
0.625293
0
0
0
0
0
0
0
0
394
0.461358
59f95b02645ef93d80f48dd3f5a6fd77148ddf83
6,799
py
Python
python/misc/dataFrameToDatabase/dataFrameToDatabase.py
jlucas-esri/Geospatial-Center-Code
a8a1c7028d254690af788cbdd9cbdf859a422413
[ "Apache-2.0" ]
14
2020-09-22T22:11:35.000Z
2022-02-05T07:50:06.000Z
python/misc/dataFrameToDatabase/dataFrameToDatabase.py
jlucas-esri/Geospatial-Center-Code
a8a1c7028d254690af788cbdd9cbdf859a422413
[ "Apache-2.0" ]
2
2020-09-23T15:14:40.000Z
2021-08-24T15:04:11.000Z
python/misc/dataFrameToDatabase/dataFrameToDatabase.py
apfister/Geospatial-Center
a8a1c7028d254690af788cbdd9cbdf859a422413
[ "Apache-2.0" ]
6
2020-11-20T17:22:30.000Z
2021-11-12T13:22:20.000Z
import logging import time import pandas as pd from pandas.errors import EmptyDataError import sqlalchemy from typing import Union, List class DataFrameToDatabase: def __init__(self, df:Union[pd.DataFrame, pd.io.parsers.TextFileReader], dbTableName:str, driver:str, ...
36.358289
117
0.508016
6,657
0.979115
0
0
0
0
0
0
1,510
0.222091
59fa8411dfa74bbeb8be27d4bcf88306bb7fbf17
5,508
py
Python
pdfstream/servers/xpd_server.py
st3107/pdfstream
6e1829d889e5f5400386513efe993ad0596da8a5
[ "BSD-3-Clause" ]
null
null
null
pdfstream/servers/xpd_server.py
st3107/pdfstream
6e1829d889e5f5400386513efe993ad0596da8a5
[ "BSD-3-Clause" ]
34
2020-07-08T16:24:52.000Z
2020-11-21T17:55:13.000Z
pdfstream/servers/xpd_server.py
st3107/pdfstream
6e1829d889e5f5400386513efe993ad0596da8a5
[ "BSD-3-Clause" ]
1
2020-10-05T14:51:32.000Z
2020-10-05T14:51:32.000Z
"""The analysis server. Process raw image to PDF.""" import typing as tp import databroker from bluesky.callbacks.zmq import Publisher from databroker.v2 import Broker from event_model import RunRouter from ophyd.sim import NumpySeqHandler from pdfstream.callbacks.analysis import AnalysisConfig, VisConfig, ExportConf...
35.535484
112
0.642157
3,981
0.722767
0
0
1,572
0.285403
0
0
1,470
0.266885
59fadeeb36901e3065564a09daa8450d35a9d7e8
2,965
py
Python
src/tests/snn/test_snn.py
ibm-research-tokyo/diffsnn
9299fc5e8542c6fde33a287f81e7ae3682b2fd9d
[ "Apache-2.0" ]
20
2021-06-01T02:42:43.000Z
2022-02-14T07:08:34.000Z
src/tests/snn/test_snn.py
ibm-research-tokyo/diffsnn
9299fc5e8542c6fde33a287f81e7ae3682b2fd9d
[ "Apache-2.0" ]
null
null
null
src/tests/snn/test_snn.py
ibm-research-tokyo/diffsnn
9299fc5e8542c6fde33a287f81e7ae3682b2fd9d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Title ''' __author__ = 'Hiroshi Kajino <KAJINO@jp.ibm.com>' __copyright__ = 'Copyright IBM Corp. 2020, 2021' from copy import deepcopy import unittest import torch from diffsnn.pp.snn import FullyObsSigmoidSNN from .base import (TestBase, GenFullyOb...
31.542553
95
0.568971
2,402
0.810118
0
0
0
0
0
0
570
0.192243
59fbe9b9c44c1dc57ed0a0f530dd480352ca04fe
184
py
Python
crash_course/ch10/exec/favorite_number_reader.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
crash_course/ch10/exec/favorite_number_reader.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
crash_course/ch10/exec/favorite_number_reader.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
import json filename = 'tmp/favorite-number.json' with open(filename) as f_obj: favorite = json.load(f_obj) print('I know your favorite number! It\'s ' + str(favorite) + '.')
16.727273
66
0.679348
0
0
0
0
0
0
0
0
66
0.358696
59fde8656226ce9a5927a84f87c9663b0ac3a0ce
406
py
Python
tests/test_news.py
mugisha-thierry/news_app
b5155182493577d859cd2fa5bcf58d4647bc2dd5
[ "Unlicense" ]
null
null
null
tests/test_news.py
mugisha-thierry/news_app
b5155182493577d859cd2fa5bcf58d4647bc2dd5
[ "Unlicense" ]
null
null
null
tests/test_news.py
mugisha-thierry/news_app
b5155182493577d859cd2fa5bcf58d4647bc2dd5
[ "Unlicense" ]
null
null
null
import unittest from app.models import News class MewsTest(unittest.TestCase): """ Test Class to test the behaviour of the News class """ def setUp(self): """ Set up method that will run before every Test """ self.new_news = News(1234,'bbc','www.you.com','business') ...
25.375
65
0.630542
356
0.876847
0
0
0
0
0
0
163
0.401478
9401e5967de0c4feb25f57d65b0bb881a0b235ab
12,940
py
Python
tacker/sol_refactored/controller/vnflcm_view.py
h1r0mu/tacker
8c69dda51fcfe215c4878a86b82018d2b96e5561
[ "Apache-2.0" ]
116
2015-10-18T02:57:08.000Z
2022-03-15T04:09:18.000Z
tacker/sol_refactored/controller/vnflcm_view.py
h1r0mu/tacker
8c69dda51fcfe215c4878a86b82018d2b96e5561
[ "Apache-2.0" ]
6
2016-11-07T22:15:54.000Z
2021-05-09T06:13:08.000Z
tacker/sol_refactored/controller/vnflcm_view.py
h1r0mu/tacker
8c69dda51fcfe215c4878a86b82018d2b96e5561
[ "Apache-2.0" ]
166
2015-10-20T15:31:52.000Z
2021-11-12T08:39:49.000Z
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation # 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/LICE...
35.258856
79
0.55
11,790
0.911128
0
0
0
0
0
0
2,307
0.178284
940225d04a3a801bd3feb67c187f2cbc8efcab81
2,059
py
Python
project-metrics/metrics_service/apis/codecov.py
rsimha/amp-github-apps
140652c6538e9fc3c3870b12f777c3cba14bf098
[ "Apache-2.0" ]
36
2019-02-07T03:43:54.000Z
2022-03-04T12:55:02.000Z
project-metrics/metrics_service/apis/codecov.py
rsimha/amp-github-apps
140652c6538e9fc3c3870b12f777c3cba14bf098
[ "Apache-2.0" ]
450
2018-11-21T22:36:39.000Z
2022-01-26T18:40:49.000Z
project-metrics/metrics_service/apis/codecov.py
rsimha/amp-github-apps
140652c6538e9fc3c3870b12f777c3cba14bf098
[ "Apache-2.0" ]
42
2018-11-21T22:31:11.000Z
2022-03-08T06:46:20.000Z
"""Module for fetching code coverage info from Codecov.""" from agithub import base as agithub_base from flask_api import status import logging from typing import Any, Dict, Optional, Text import env class CodecovApiError(Exception): """Errors encountered while querying the Codecov API.""" def __init__(self, s...
30.731343
79
0.684798
1,851
0.89898
0
0
177
0.085964
0
0
864
0.419621
940234fb7a7c68381fd595779e6eeb95949ac3b9
2,564
py
Python
src/calibrate.py
modi712/Computer-Vision
a34d3d73f883beae812c50b879f4dc8ef679b3ac
[ "MIT" ]
null
null
null
src/calibrate.py
modi712/Computer-Vision
a34d3d73f883beae812c50b879f4dc8ef679b3ac
[ "MIT" ]
null
null
null
src/calibrate.py
modi712/Computer-Vision
a34d3d73f883beae812c50b879f4dc8ef679b3ac
[ "MIT" ]
null
null
null
# Calibrates camera using chessboard video import numpy as np import cv2 import glob # termination criteria criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) objp = np.zeros((6*7,3), np.float32) objp[:,:2] = np.mgr...
29.136364
101
0.570203
0
0
0
0
0
0
0
0
1,361
0.530811
9404e9100f31206f2975c729bb0ee10df6676295
1,788
py
Python
src/currencycloud/clients/vans.py
icebotariccl/currencycloud-python
03bb0df2743e6669790dee6f2367f9e0500a4610
[ "MIT" ]
null
null
null
src/currencycloud/clients/vans.py
icebotariccl/currencycloud-python
03bb0df2743e6669790dee6f2367f9e0500a4610
[ "MIT" ]
null
null
null
src/currencycloud/clients/vans.py
icebotariccl/currencycloud-python
03bb0df2743e6669790dee6f2367f9e0500a4610
[ "MIT" ]
null
null
null
'''This module provides a class for VANs calls to the CC API''' from currencycloud.http import Http from currencycloud.resources import PaginatedCollection, Van import deprecation class Vans(Http): '''This class provides an interface to the VANs endpoints of the CC API''' def find(self, **kwargs): '...
47.052632
92
0.65604
1,604
0.897092
0
0
1,062
0.59396
0
0
604
0.337808
94076e38767f1fdb24941a14891524bbde794118
5,703
bzl
Python
tests/util/defs.bzl
guw/rules_pkg
0541b09ca8b68c40e8868fd3c4a748e1bb5eafa3
[ "Apache-2.0" ]
62
2021-09-21T18:58:02.000Z
2022-03-07T02:17:43.000Z
third_party/rules_pkg-0.7.0/tests/util/defs.bzl
Vertexwahn/FlatlandRT
37d09fde38b25eff5f802200b43628efbd1e3198
[ "Apache-2.0" ]
null
null
null
third_party/rules_pkg-0.7.0/tests/util/defs.bzl
Vertexwahn/FlatlandRT
37d09fde38b25eff5f802200b43628efbd1e3198
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Bazel 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 applicable la...
32.403409
95
0.639663
0
0
0
0
0
0
0
0
2,638
0.462564
940780137a7561bcd2fdc5e84bbb4666938c7d61
4,799
py
Python
systems/cluster_utils.py
cltl/LongTailIdentity
525f6eb10ce6c8eba1d6f462a900fd0ebd0f97a7
[ "Apache-2.0" ]
1
2019-02-07T06:30:35.000Z
2019-02-07T06:30:35.000Z
systems/cluster_utils.py
cltl/LongTailIdentity
525f6eb10ce6c8eba1d6f462a900fd0ebd0f97a7
[ "Apache-2.0" ]
null
null
null
systems/cluster_utils.py
cltl/LongTailIdentity
525f6eb10ce6c8eba1d6f462a900fd0ebd0f97a7
[ "Apache-2.0" ]
null
null
null
import json from collections import defaultdict import random def transform_to_json(data): a_json = {} cluster_id=1 for pid, separate_ids in data.items(): for spid in separate_ids: a_json[spid]=cluster_id cluster_id+=1 return a_json def create_keys_per_name(data): """ ...
36.633588
171
0.635757
0
0
0
0
0
0
0
0
1,370
0.285476
9407ea96d7707d8b52c8d7cf4a197411ba311970
2,151
py
Python
hypotonic/__init__.py
mscavnicky/hypotonic
499ea821988c34ae5492979f4f8056c4a45b3b1f
[ "MIT" ]
8
2019-01-01T13:50:00.000Z
2020-09-06T16:15:51.000Z
hypotonic/__init__.py
mscavnicky/hypotonic
499ea821988c34ae5492979f4f8056c4a45b3b1f
[ "MIT" ]
1
2019-02-24T12:13:46.000Z
2019-02-24T19:50:49.000Z
hypotonic/__init__.py
mscavnicky/hypotonic
499ea821988c34ae5492979f4f8056c4a45b3b1f
[ "MIT" ]
null
null
null
import logging import importlib import asyncio import aiohttp logger = logging.getLogger('hypotonic') class Hypotonic: def __init__(self, url=None): self.commands = [] self.results = [] self.errors = [] if url: self.commands.append(('get', (url,), {})) async def worker(self, i, session, ...
26.8875
81
0.62901
2,044
0.950256
0
0
0
0
1,477
0.686657
178
0.082752
940830c796f500a7ec43a9e9a73df7a17bb2c403
714
py
Python
03. Programacion orientada a objetos/04. clases y objetos/e1.py
Cidryl/python-desde-cero
fade09d13ab0ed0cbb4f45a49a4ad9e3980f3276
[ "MIT" ]
null
null
null
03. Programacion orientada a objetos/04. clases y objetos/e1.py
Cidryl/python-desde-cero
fade09d13ab0ed0cbb4f45a49a4ad9e3980f3276
[ "MIT" ]
null
null
null
03. Programacion orientada a objetos/04. clases y objetos/e1.py
Cidryl/python-desde-cero
fade09d13ab0ed0cbb4f45a49a4ad9e3980f3276
[ "MIT" ]
null
null
null
class Alumno: def declarar(self,nombre,dato): self.nombre=nombre self.puntuacion=dato def visualizar(self): print("Nombre:",self.nombre) print("Puntuacion:",self.puntuacion) def estadistica(self): if self.puntuacion<=4: print("insuficiente")...
22.3125
45
0.592437
503
0.704482
0
0
0
0
0
0
98
0.137255
9408773ad197cea530dbf06232c18e80bd339f4d
5,487
py
Python
sagas/corpus/searcher.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
3
2020-01-11T13:55:38.000Z
2020-08-25T22:34:15.000Z
sagas/corpus/searcher.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
null
null
null
sagas/corpus/searcher.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
1
2021-01-01T05:21:44.000Z
2021-01-01T05:21:44.000Z
from bert_serving.client import BertClient import pandas as pd import numpy as np import json import sagas.tracker_fn as tc from sagas.conf.conf import cf def search_in(text, lang): with open(f'{cf.conf_dir}/stack/crawlers/langcrs/all_{lang}.json') as json_file: sents=json.load(json_file) return [s...
34.949045
95
0.612539
4,238
0.756651
0
0
218
0.038922
0
0
1,407
0.251205
9408ba6fbe5aa752679b16a7faeb0c1c96aadb6e
882
py
Python
Mobility Algorithms/Test/link_identifier_test.py
James-OHara/NCHRP-BSM-Traffic-Measures
d6842c9dc63de8c2d470482fbfd1ec91a9c2ae56
[ "Apache-2.0" ]
null
null
null
Mobility Algorithms/Test/link_identifier_test.py
James-OHara/NCHRP-BSM-Traffic-Measures
d6842c9dc63de8c2d470482fbfd1ec91a9c2ae56
[ "Apache-2.0" ]
null
null
null
Mobility Algorithms/Test/link_identifier_test.py
James-OHara/NCHRP-BSM-Traffic-Measures
d6842c9dc63de8c2d470482fbfd1ec91a9c2ae56
[ "Apache-2.0" ]
null
null
null
import unittest import numpy as np from bsm_stream_vector import LinkIdentifier """Test LinkIndentifier class in bsm_stream_vector to ensure the BSMs are being assigned to the correct Measures Estimation link """ class LinkIdentifierTest(unittest.TestCase): #This test only works if findLink in LinkIndentifier retur...
30.413793
129
0.727891
617
0.699546
0
0
0
0
0
0
337
0.382086
940bf9f6bcf066af4e32b8cbf37d9f28635da2d5
8,350
py
Python
TSP/model_free.py
machine-reasoning-ufrgs/graph-nn
7489b7b3d6a4750245e3f506982d98b56a74b6bb
[ "MIT" ]
1
2019-11-04T15:56:00.000Z
2019-11-04T15:56:00.000Z
TSP/model_free.py
machine-reasoning-ufrgs/graph-nn
7489b7b3d6a4750245e3f506982d98b56a74b6bb
[ "MIT" ]
null
null
null
TSP/model_free.py
machine-reasoning-ufrgs/graph-nn
7489b7b3d6a4750245e3f506982d98b56a74b6bb
[ "MIT" ]
2
2019-09-21T12:10:56.000Z
2021-04-17T13:55:32.000Z
import sys, os import tensorflow as tf sys.path.insert(1, os.path.join(sys.path[0], '..')) from graphnn_free import GraphNN from mlp import Mlp def build_network(d): # Define hyperparameters d = d learning_rate = 2e-5 l2norm_scaling = 1e-10 global_norm_gradient_clipping_ratio = 0.65 # Defin...
39.57346
183
0.600719
0
0
0
0
0
0
0
0
2,203
0.263548
940c0b72ebd459534046c762a3ab4ce951637c18
1,593
py
Python
ixnetwork_restpy/pytest_tests/tests/test_async_operation.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/pytest_tests/tests/test_async_operation.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/pytest_tests/tests/test_async_operation.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
"""Tests to verify the async=True functionality of operations """ import pytest from ixnetwork_restpy import TestPlatform, BadRequestError def test_async_operation(ixnetwork): # uncomment the following to see the full request and response # from ixnetwork_restpy import TestPlatform # ixnetwork.parent.pare...
37.928571
78
0.750157
0
0
0
0
0
0
0
0
767
0.481481
940ddb5e6655f6d1f74858cf98a8d51ff4dc825b
1,452
py
Python
kodistubs/_publish_docs.py
ogero/Deluge-Manager-XBMC
10c4f2a93ac1fffba01209444ba5e597036b968b
[ "MIT" ]
null
null
null
kodistubs/_publish_docs.py
ogero/Deluge-Manager-XBMC
10c4f2a93ac1fffba01209444ba5e597036b968b
[ "MIT" ]
null
null
null
kodistubs/_publish_docs.py
ogero/Deluge-Manager-XBMC
10c4f2a93ac1fffba01209444ba5e597036b968b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Created on: 24.02.2016 # Author: Roman Miroshnychenko aka Roman V.M. (romanvm@yandex.ua) from __future__ import print_function import os from subprocess import call gh_token = os.environ['GH_TOKEN'] repo_slug= os.environ['TRAVIS_REPO_SLUG'] gh_repo_url = 'https://{gh_token}@git...
33.767442
89
0.631543
0
0
0
0
0
0
0
0
530
0.365014
940ea273ac1efd7b81d8def3cd0c08c7f2a030f1
12,861
py
Python
self_play_train.py
DrVecctor/GameOfGo
ab8b0313372fe380b44dd7021c00895c971b3e54
[ "MIT" ]
null
null
null
self_play_train.py
DrVecctor/GameOfGo
ab8b0313372fe380b44dd7021c00895c971b3e54
[ "MIT" ]
null
null
null
self_play_train.py
DrVecctor/GameOfGo
ab8b0313372fe380b44dd7021c00895c971b3e54
[ "MIT" ]
1
2020-09-11T16:49:01.000Z
2020-09-11T16:49:01.000Z
import warnings warnings.filterwarnings('ignore') import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow.python.util.deprecation as deprecation deprecation._PRINT_DEPRECATION_WARNINGS = False import json import argparse import multiprocessing import random import shutil import time import tempfile from...
32.892583
154
0.643807
75
0.005832
0
0
0
0
0
0
1,278
0.09937
940f0434744074dbc6c913f66fdd1933bcaa8210
16,611
py
Python
src/run_eval.py
Zayat/blockchain-models-simulator
abfb643b1e11424e7874016399b05bdc359eecd4
[ "MIT" ]
3
2021-06-10T08:32:05.000Z
2021-06-11T08:06:27.000Z
src/run_eval.py
Zayat/blockchain-models-simulator
abfb643b1e11424e7874016399b05bdc359eecd4
[ "MIT" ]
null
null
null
src/run_eval.py
Zayat/blockchain-models-simulator
abfb643b1e11424e7874016399b05bdc359eecd4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : run_eval.py # Author : Mohamed Alzayat <alzayat@mpi-sws.org> # Date : 21.10.2020 # Last Modified Date: 21.10.2020 # Last Modified By : Mohamed Alzayat <alzayat@mpi-sws.org> import argparse from bcns import sim from evaluation...
52.566456
155
0.722232
0
0
0
0
0
0
0
0
2,670
0.160737
940f45a74fbe5732957c0a584ead0ec8af62f5f8
1,618
py
Python
mooc_ex/xbaoItemPrice.py
ds17/reptiles
99418624ae4b7548bf4dc1ea834e8c75a47a0557
[ "Apache-2.0" ]
null
null
null
mooc_ex/xbaoItemPrice.py
ds17/reptiles
99418624ae4b7548bf4dc1ea834e8c75a47a0557
[ "Apache-2.0" ]
null
null
null
mooc_ex/xbaoItemPrice.py
ds17/reptiles
99418624ae4b7548bf4dc1ea834e8c75a47a0557
[ "Apache-2.0" ]
1
2021-02-20T13:17:42.000Z
2021-02-20T13:17:42.000Z
#D:\Python\Python35\python.exe # -*- coding:utf-8 -*- '淘宝商品价格定向爬虫' import requests,csv,re,os,time i=1 #全局计数变量 def getHTMLtext(url): try: r=requests.get(url) r.encoding=r.apparent_encoding return r.text except: print('获取页面异常') def parsePage(ilt,html): # info=re.findall(r'...
26.52459
128
0.549444
0
0
0
0
0
0
0
0
763
0.445158
9411e487e97666c6453fbbd22292c525e1819e7a
2,359
py
Python
appCore/apps/replica/cms/views/template.py
jadedgamer/alifewellplayed.com
b7b3dee8d3b9526c7cfe77078570a29394ef7e76
[ "MIT" ]
4
2017-04-22T11:03:01.000Z
2018-01-16T22:28:15.000Z
appCore/apps/replica/cms/views/template.py
alifewellplayed/alifewellplayed.com
b7b3dee8d3b9526c7cfe77078570a29394ef7e76
[ "MIT" ]
10
2017-04-06T19:54:42.000Z
2017-11-07T06:53:10.000Z
appCore/apps/replica/cms/views/template.py
alifewellplayed/alifewellplayed.com
b7b3dee8d3b9526c7cfe77078570a29394ef7e76
[ "MIT" ]
1
2017-12-14T12:49:40.000Z
2017-12-14T12:49:40.000Z
from django.conf import settings from django.template import RequestContext from django.shortcuts import render_to_response, render, get_object_or_404, redirect from django.views.decorators.cache import cache_page from django.views.generic.list import ListView from django.contrib import messages from replica import se...
36.859375
86
0.694786
509
0.215769
0
0
0
0
0
0
391
0.165748
9411f20ddc93846bc9ba0efb924f787c448b3493
1,844
py
Python
cogs.py
Paarf/BoxBot
da323ddf30e368bed077ef75f843eb6e43902bd3
[ "MIT" ]
null
null
null
cogs.py
Paarf/BoxBot
da323ddf30e368bed077ef75f843eb6e43902bd3
[ "MIT" ]
null
null
null
cogs.py
Paarf/BoxBot
da323ddf30e368bed077ef75f843eb6e43902bd3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import discord from discord.ext import commands class Commands: def __init__(self, bot): self.bot = bot # you can use events here too async def on_message(self, msg): print(msg.content) # or commands like this @commands.command() async d...
34.148148
122
0.646421
1,706
0.925163
0
0
1,465
0.794469
1,400
0.759219
468
0.253796
94138d3730f1e927ee57027157b082e4aa899444
85
py
Python
djadmin/ngapp/apps.py
gnud/django-angular-lte-admin
b4bed527aa25184e17deb31eb5987b209dfd9253
[ "MIT" ]
3
2019-03-07T06:11:05.000Z
2019-05-24T13:53:17.000Z
djadmin/ngapp/apps.py
gnud/damjan-dimitrioski.com
6c9cb215ec0878eeb1ed5e1359bb1bd07f774476
[ "MIT" ]
3
2017-03-14T19:02:17.000Z
2017-03-17T16:24:33.000Z
djadmin/ngapp/apps.py
gnud/damjan-dimitrioski.com
6c9cb215ec0878eeb1ed5e1359bb1bd07f774476
[ "MIT" ]
3
2019-01-21T22:39:04.000Z
2019-11-21T22:18:07.000Z
from django.apps import AppConfig class NgappConfig(AppConfig): name = 'ngapp'
14.166667
33
0.741176
48
0.564706
0
0
0
0
0
0
7
0.082353