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
06bdaaa4c1a548fd01c08096b99f581ed454bb0d
2,407
py
Python
package/spack-revbayes/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-revbayes/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-revbayes/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
38.206349
83
0.638139
bf9cb4d4a1056c0eee321729c65f4b77097821ef
1,841
py
Python
app/recipe/views.py
The-Flash/recipe-app-api
abe8a1c7fa3e06ae268373df1f2e79729080ffd4
[ "MIT" ]
null
null
null
app/recipe/views.py
The-Flash/recipe-app-api
abe8a1c7fa3e06ae268373df1f2e79729080ffd4
[ "MIT" ]
null
null
null
app/recipe/views.py
The-Flash/recipe-app-api
abe8a1c7fa3e06ae268373df1f2e79729080ffd4
[ "MIT" ]
null
null
null
from rest_framework import viewsets, mixins from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from core.models import Tag, Ingredient, Recipe from recipe import serializers class BaseRecipeAttrViewSet(viewsets.GenericViewSet, ...
34.735849
77
0.721347
6278d636d0b30cf802ac162137c684ea333b34ea
3,017
py
Python
fastinference/inference/inference.py
Pak911/fastinference
dd9530b9a99f57a67f62ee3a8d6f23ed1545916e
[ "Apache-2.0" ]
null
null
null
fastinference/inference/inference.py
Pak911/fastinference
dd9530b9a99f57a67f62ee3a8d6f23ed1545916e
[ "Apache-2.0" ]
null
null
null
fastinference/inference/inference.py
Pak911/fastinference
dd9530b9a99f57a67f62ee3a8d6f23ed1545916e
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/00_inference.ipynb (unless otherwise specified). __all__ = [] # Cell from fastai2.vision.all import * from fastai2.tabular.all import * # Cell def _fully_decode(dl, inps, outs, dec_out, is_multi): "Attempt to fully decode the `inp" if is_multi: for i in...
32.793478
99
0.599271
39a93e583f27c86051137b7c056847245716f0a1
125
py
Python
app/core/admin.py
Anahuac-Queretaro/Covid-Tracker
579e7df406ede43f22e2642039e0ae8228678bba
[ "MIT" ]
null
null
null
app/core/admin.py
Anahuac-Queretaro/Covid-Tracker
579e7df406ede43f22e2642039e0ae8228678bba
[ "MIT" ]
1
2021-08-03T04:00:56.000Z
2021-08-03T05:02:25.000Z
app/core/admin.py
Anahuac-Queretaro/Covid-Tracker
579e7df406ede43f22e2642039e0ae8228678bba
[ "MIT" ]
1
2021-08-02T03:57:16.000Z
2021-08-02T03:57:16.000Z
from django.contrib import admin from .models import Building, Room admin.site.register(Building) admin.site.register(Room)
20.833333
34
0.816
b7db34971b5f27063ec64d2232c3a70232e1d601
2,131
py
Python
pgoapi/auth.py
samuelteixeiras/pgoapi
f28a40c2475e158cd8ec4a31c8f1f8633a3737fb
[ "MIT" ]
6
2016-07-21T20:23:29.000Z
2016-10-14T16:50:21.000Z
pgoapi/auth.py
samuelteixeiras/pgoapi
f28a40c2475e158cd8ec4a31c8f1f8633a3737fb
[ "MIT" ]
4
2016-07-21T20:39:19.000Z
2016-07-25T13:51:41.000Z
pgoapi/auth.py
samuelteixeiras/pgoapi
f28a40c2475e158cd8ec4a31c8f1f8633a3737fb
[ "MIT" ]
1
2016-07-21T00:32:59.000Z
2016-07-21T00:32:59.000Z
""" pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> 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...
33.296875
78
0.699202
019041be7b3a2a85080e159774a963b81e73dbd7
2,558
py
Python
data_input/data_input.py
NeuralKnot/algo-trading-pipeline
8b5bf6fb9d0ef2355b7e8191ebc70376dffa6510
[ "Apache-2.0" ]
18
2017-03-18T11:56:32.000Z
2020-12-28T22:26:09.000Z
data_input/data_input.py
NeuralKnot/algo-trading-pipeline
8b5bf6fb9d0ef2355b7e8191ebc70376dffa6510
[ "Apache-2.0" ]
null
null
null
data_input/data_input.py
NeuralKnot/algo-trading-pipeline
8b5bf6fb9d0ef2355b7e8191ebc70376dffa6510
[ "Apache-2.0" ]
5
2017-03-20T10:54:40.000Z
2021-06-08T21:37:45.000Z
from data_input import news_api import time import datetime import arrow from tinydb import * class DataInput: def __init__(self, article_queue, logger, config): self.article_queue = article_queue self.logger = logger self.config = config self.sources = [] for source in c...
35.041096
119
0.546521
99395bdbc65a4cd8ca31668e11d7997ddc0cdfd1
25,313
py
Python
docs/tests/test_limited.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
3
2020-03-13T06:44:23.000Z
2020-11-05T18:25:29.000Z
docs/tests/test_limited.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
2
2021-03-25T23:29:58.000Z
2022-03-21T22:18:37.000Z
docs/tests/test_limited.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
3
2020-10-16T16:25:14.000Z
2021-05-22T12:26:20.000Z
# -*- coding: utf-8 -*- import os from copy import deepcopy from datetime import timedelta from openprocurement.api.utils import get_now from openprocurement.tender.limited.tests.tender import BaseTenderWebTest from tests.base.test import DumpsWebTestApp, MockWebTestMixin from tests.base.constants import DOCS_URL, AU...
47.225746
120
0.602773
3ee091effc077875fc701e2acf2558faa89b40d0
1,325
py
Python
1SiteRanking/Script/BCHjar.py
HCH2CHO/EmotionMap
bc572b4182637dcdd65e9a13c92f2fa0d9a3d680
[ "MIT" ]
3
2021-07-15T15:58:52.000Z
2021-07-16T13:22:47.000Z
1SiteRanking/Script/BCHjar.py
HCH2CHO/EmotionMap
bc572b4182637dcdd65e9a13c92f2fa0d9a3d680
[ "MIT" ]
null
null
null
1SiteRanking/Script/BCHjar.py
HCH2CHO/EmotionMap
bc572b4182637dcdd65e9a13c92f2fa0d9a3d680
[ "MIT" ]
4
2017-08-04T12:41:06.000Z
2019-01-31T14:55:10.000Z
# -*- coding: utf-8 -*- """ Created on Mon Mar 19 23:24:34 2018 @author: HCHO """ import os import time #BCH是用来求放入多个文件的最适宜lambda参数,lambdaTestResult为多个文件一起计算的结果。无需修改config.json的参数。 #将聚类好的文件放到Cluster文件夹下 #result即为最优凹壳结果 filenum=1 for i in range(1,filenum+1): #读取Sample_Input_clustered.csv文件 cluster=open('Cluste...
27.040816
84
0.647547
6b96801a43b9e112685115af5144b151d69b00a0
2,516
py
Python
resources/user.py
Fakorede/flask-api
249454ab1fbfdc98fbc13ee2954ba3ec40863a2d
[ "MIT" ]
null
null
null
resources/user.py
Fakorede/flask-api
249454ab1fbfdc98fbc13ee2954ba3ec40863a2d
[ "MIT" ]
5
2020-05-22T18:21:07.000Z
2020-05-23T12:54:01.000Z
resources/user.py
Fakorede/flask-api
249454ab1fbfdc98fbc13ee2954ba3ec40863a2d
[ "MIT" ]
null
null
null
from flask_restful import Resource from flask import request from flask_jwt_extended import ( create_access_token, create_refresh_token, jwt_required, jwt_refresh_token_required, get_jwt_identity, get_raw_jwt, ) from marshmallow import ValidationError from models.user import UserModel from schem...
28.590909
86
0.687599
594598de6bcb323797827225585942c3749eb908
489
py
Python
tests/test_a0173binarysearchtreeinterator.py
nirofang/pyleet
600d58ad97028c9a14148af4ef468683a011a515
[ "MIT" ]
3
2019-11-06T13:10:38.000Z
2021-11-17T07:29:54.000Z
tests/test_a0173binarysearchtreeinterator.py
nirofang/pyleet
600d58ad97028c9a14148af4ef468683a011a515
[ "MIT" ]
1
2020-12-17T22:18:05.000Z
2020-12-17T22:18:05.000Z
tests/test_a0173binarysearchtreeinterator.py
nirofang/pyleet
600d58ad97028c9a14148af4ef468683a011a515
[ "MIT" ]
1
2019-11-06T13:10:45.000Z
2019-11-06T13:10:45.000Z
from solutions.a0173binarysearchtreeiterator import BSTIterator from utils.tree.TreeNode import TreeNode def test_iterator(): root = TreeNode.stringToTreeNode("[7,3,15,null,null,9,20]") iterator = BSTIterator(root) assert iterator.next() == 3 assert iterator.next() == 7 assert iterator.hasNext() assert it...
28.764706
63
0.736196
eb8df2ee7405ba48425072fa596ce6416509f827
2,180
py
Python
python/Strobe/Test/Concurrence.py
mimoo/strobe-mirror
8fb10c3ab3018ca8ca1d7621417a93dde9ca3494
[ "MIT" ]
null
null
null
python/Strobe/Test/Concurrence.py
mimoo/strobe-mirror
8fb10c3ab3018ca8ca1d7621417a93dde9ca3494
[ "MIT" ]
null
null
null
python/Strobe/Test/Concurrence.py
mimoo/strobe-mirror
8fb10c3ab3018ca8ca1d7621417a93dde9ca3494
[ "MIT" ]
null
null
null
""" Concurrence tester. Tests multiple implementations of the same thing. Error if any of them errors, or if they give difference results. """ from __future__ import absolute_import class ConcurrenceTestFailure(Exception): pass class ConcurrenceTest(object): def __init__(self,*args): self.impls = li...
29.459459
77
0.551835
12f13ae9c90cfa807859bbef1bac622c86e0dca0
68
py
Python
cleaner.py
zmj1316/LK2epub
b402d65bfffbf6f5c2e26666c7ceeb8565ef9d29
[ "MIT" ]
1
2016-12-07T07:37:24.000Z
2016-12-07T07:37:24.000Z
cleaner.py
zmj1316/LK2epub
b402d65bfffbf6f5c2e26666c7ceeb8565ef9d29
[ "MIT" ]
null
null
null
cleaner.py
zmj1316/LK2epub
b402d65bfffbf6f5c2e26666c7ceeb8565ef9d29
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def extractNameFromSubject(subject):
11.333333
36
0.617647
dfbc05ab404c25a981e48bad71ac0d7fc635f6cc
6,231
py
Python
sources/samples/python2/grabcut.py
ovb197310/opencv_2.4.13.2
940159dab8ea8f5ee019d2038b59e1daf4119d1c
[ "BSD-3-Clause" ]
null
null
null
sources/samples/python2/grabcut.py
ovb197310/opencv_2.4.13.2
940159dab8ea8f5ee019d2038b59e1daf4119d1c
[ "BSD-3-Clause" ]
null
null
null
sources/samples/python2/grabcut.py
ovb197310/opencv_2.4.13.2
940159dab8ea8f5ee019d2038b59e1daf4119d1c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python ''' =============================================================================== Interactive Image Segmentation using GrabCut algorithm. This sample shows interactive image segmentation using grabcut algorithm. USAGE : python grabcut.py <filename> README FIRST: Two windows...
35.605714
93
0.580485
c401a002af00b9afb4d5f098232760c60a71ed55
2,873
py
Python
byceps/blueprints/site/snippet/templating.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
23
2015-08-03T23:28:54.000Z
2018-12-12T20:11:45.000Z
byceps/blueprints/site/snippet/templating.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
1
2018-09-30T18:18:24.000Z
2018-09-30T18:18:24.000Z
byceps/blueprints/site/snippet/templating.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
9
2015-08-06T16:41:36.000Z
2018-09-25T11:17:31.000Z
""" byceps.blueprints.site.snippet.templating ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from typing import Any, Dict, Optional from flask import g from jinja2 import Template from...
26.601852
80
0.690219
6b294b7eb68e2d6bd5b60bdc3078c96de6495838
584
py
Python
flask/test/data/qr_code.py
spaudanjo/boxtribute
c29311a38721277a07b5e1dbcf36cf12bcd8b727
[ "Apache-2.0" ]
3
2020-10-17T06:37:10.000Z
2021-06-08T16:58:38.000Z
flask/test/data/qr_code.py
spaudanjo/boxtribute
c29311a38721277a07b5e1dbcf36cf12bcd8b727
[ "Apache-2.0" ]
166
2020-10-25T20:45:32.000Z
2022-03-28T08:18:26.000Z
flask/test/data/qr_code.py
spaudanjo/boxtribute
c29311a38721277a07b5e1dbcf36cf12bcd8b727
[ "Apache-2.0" ]
4
2021-01-01T18:03:57.000Z
2022-03-10T08:43:23.000Z
import pytest from boxwise_flask.models.qr_code import QRCode def default_qr_code_data(): mock_qr_code = {"id": 1, "code": "999"} return mock_qr_code def qr_code_without_box_data(): mock_qr_code = {"id": 2, "code": "555"} return mock_qr_code @pytest.fixture() def default_qr_code(): return defa...
18.83871
47
0.732877
5c22f570f893fa067bb2ef612d8a800f8acc0e06
6,269
py
Python
uw/sign.py
PurpleGuitar/tools
13152bb925b568ed4d4375065ed5a7dbdeee99de
[ "MIT" ]
6
2015-07-27T21:50:39.000Z
2020-06-25T14:32:35.000Z
uw/sign.py
PurpleGuitar/tools
13152bb925b568ed4d4375065ed5a7dbdeee99de
[ "MIT" ]
89
2015-06-24T09:35:40.000Z
2022-02-13T14:40:31.000Z
uw/sign.py
PurpleGuitar/tools
13152bb925b568ed4d4375065ed5a7dbdeee99de
[ "MIT" ]
12
2015-07-13T17:31:04.000Z
2021-08-06T06:50:21.000Z
#!/usr/bin/env python2 # -*- coding: utf8 -*- # # Copyright (c) 2015 unfoldingWord # http://creativecommons.org/licenses/MIT/ # See LICENSE file for details. # # Contributors: # Jesse Griffin <jesse@distantshores.org> # ''' Signs all content in tS catalog. ''' import os import sys import json import time import ...
28.366516
105
0.552401
82ea65d8a85b3d701f841bf60e1fb04fb6d3b770
1,188
py
Python
test/test_phones.py
msergeyx/python_training
ee296479f79647ac3c3d88f0ba1533192500787e
[ "Apache-2.0" ]
null
null
null
test/test_phones.py
msergeyx/python_training
ee296479f79647ac3c3d88f0ba1533192500787e
[ "Apache-2.0" ]
null
null
null
test/test_phones.py
msergeyx/python_training
ee296479f79647ac3c3d88f0ba1533192500787e
[ "Apache-2.0" ]
null
null
null
import re def test_phones_on_home_page(app): contact_from_home_page = app.contact.get_cont_list()[0] contact_from_edit_page = app.contact.get_cont_info_from_edit_page(0) assert contact_from_home_page.all_phones_from_home_page == merge_phones_like_on_home_page(contact_from_edit_page) def test_phones_on_c...
42.428571
121
0.731481
5c228ece651ef70698b74be479bcef0079fa706f
10,017
py
Python
examples/har_extractor.py
gabe-k/mitmproxy
bd6c3f64c1f3102a4e91d4a964757821773781e0
[ "MIT" ]
1
2015-03-02T09:24:11.000Z
2015-03-02T09:24:11.000Z
examples/har_extractor.py
huyphan/mitmproxy
5259aeb3264423204e84072d9e1b3ace4f6e6031
[ "MIT" ]
4
2016-01-07T17:08:27.000Z
2016-06-12T21:12:59.000Z
examples/har_extractor.py
huyphan/mitmproxy
5259aeb3264423204e84072d9e1b3ace4f6e6031
[ "MIT" ]
null
null
null
""" This inline script utilizes harparser.HAR from https://github.com/JustusW/harparser to generate a HAR log object. """ from harparser import HAR from datetime import datetime class _HARLog(HAR.log): # The attributes need to be registered here for them to actually be # available later via self. Th...
42.807692
119
0.604073
75517828d9cd4af4e8ecad489666e3abd82b82d5
2,299
py
Python
core.py
yma1/PyRTSim
b197feb29e687b40704f47122f208ab66279b13b
[ "MIT" ]
null
null
null
core.py
yma1/PyRTSim
b197feb29e687b40704f47122f208ab66279b13b
[ "MIT" ]
null
null
null
core.py
yma1/PyRTSim
b197feb29e687b40704f47122f208ab66279b13b
[ "MIT" ]
null
null
null
from task import * power_par = {0.8010: [0.85, 7.3249, 0.1666, 15], 0.8291: [0.90, 8.6126, 0.1754, 15], 0.8553: [0.95, 10.238, 0.1846, 15], 0.8797: [1.00, 12.315, 0.1942, 15], 0.9027: [1.05, 14.998, 0.2043, 15], 1.0000: [1.10, 18.497, 0.2149, 15]} T_...
28.036585
120
0.639843
bad7143c2abb3a1d72ee627d260caf8c848b80c3
2,918
py
Python
certserver.py
robot-tools/certserver
e1813e0d770fa74a84d20ac65f3da7e9ce7ef32d
[ "Apache-2.0" ]
null
null
null
certserver.py
robot-tools/certserver
e1813e0d770fa74a84d20ac65f3da7e9ce7ef32d
[ "Apache-2.0" ]
null
null
null
certserver.py
robot-tools/certserver
e1813e0d770fa74a84d20ac65f3da7e9ce7ef32d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import argparse import json from http import server import socket import ssl import subprocess parser = argparse.ArgumentParser(description='certserver') parser.add_argument( '--ca-cert', dest='ca_cert', action='store', required=True) parser.add_argument( '--listen-host', d...
27.271028
135
0.644962
09ee49b64ce5457173f4137e5296aa6b3557e659
35,608
py
Python
assets_psychophysics/f0dl_bernox.py
msaddler/pitchnet
8e26034be177deff7447ade7f782a4a9581c2188
[ "MIT" ]
6
2021-12-21T05:38:03.000Z
2022-03-31T21:05:56.000Z
assets_psychophysics/f0dl_bernox.py
msaddler/pitchnet
8e26034be177deff7447ade7f782a4a9581c2188
[ "MIT" ]
null
null
null
assets_psychophysics/f0dl_bernox.py
msaddler/pitchnet
8e26034be177deff7447ade7f782a4a9581c2188
[ "MIT" ]
1
2022-03-28T19:33:53.000Z
2022-03-28T19:33:53.000Z
import sys import os import json import numpy as np import glob import argparse import pdb import scipy.optimize import scipy.stats import itertools import functools import multiprocessing sys.path.append('/om2/user/msaddler/pitchnet/assets_datasets/') import stimuli_f0_labels def load_f0_expt_dict_from_json(json_f...
52.1347
121
0.636907
5b853972261fa305672ea32f9160a2ea8709c241
4,431
py
Python
reversi/strategies/negascout.py
y-tetsu/othello
73eabfe22d6b44bbfa0b436e6287e3e7356620f4
[ "MIT" ]
10
2020-07-24T22:04:51.000Z
2022-03-25T06:09:48.000Z
reversi/strategies/negascout.py
y-tetsu/othello
73eabfe22d6b44bbfa0b436e6287e3e7356620f4
[ "MIT" ]
12
2021-04-30T09:53:18.000Z
2022-02-25T04:16:02.000Z
reversi/strategies/negascout.py
y-tetsu/othello
73eabfe22d6b44bbfa0b436e6287e3e7356620f4
[ "MIT" ]
1
2021-11-25T13:12:32.000Z
2021-11-25T13:12:32.000Z
"""NegaScout """ import sys from reversi.strategies.common import Timer, Measure, AbstractStrategy import reversi.strategies.NegaScoutMethods as NegaScoutMethods MAXSIZE64 = 2**63 - 1 class _NegaScout_(AbstractStrategy): """ NegaScout法で次の手を決める """ def __init__(self, depth=3, evaluator=None): ...
31.65
147
0.593094
5ae972bc37df132655c524c05ad87b0a9f81bf92
1,071
py
Python
tests/without_app/util/test_statistic.py
kuzxnia/typer
39007237d552e4f4920b2c6e13e5f0ce482d4427
[ "MIT" ]
null
null
null
tests/without_app/util/test_statistic.py
kuzxnia/typer
39007237d552e4f4920b2c6e13e5f0ce482d4427
[ "MIT" ]
3
2020-04-07T12:39:51.000Z
2020-04-09T22:49:16.000Z
tests/without_app/util/test_statistic.py
kuzxnia/typer
39007237d552e4f4920b2c6e13e5f0ce482d4427
[ "MIT" ]
null
null
null
import pytest from typer.util import statistic @pytest.mark.parametrize( "words, duration, expected", [(["a" * 100], 60, 100), (["a" * 10], 30, 20), (["A" * 200], 30, 800)] ) def test_cpm(words, duration, expected): assert statistic.cpm(words, duration) == expected @pytest.mark.parametrize( "words, dura...
28.945946
103
0.628385
90a64d4738edd5ddb30b61936d062ca1c567976d
1,690
py
Python
dizoo/d4rl/config/walker2d_medium_expert_td3bc_config.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
1
2022-03-21T16:15:39.000Z
2022-03-21T16:15:39.000Z
dizoo/d4rl/config/walker2d_medium_expert_td3bc_config.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
dizoo/d4rl/config/walker2d_medium_expert_td3bc_config.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
# You can conduct Experiments on D4RL with this config file through the following command: # cd ../entry && python d4rl_td3_bc_main.py from easydict import EasyDict main_config = dict( exp_name='walker2d_medium_expert_td3-bc_seed0', env=dict( env_id='walker2d-medium-expert-v0', collector_env_nu...
26.825397
90
0.574556
8de05f1c06e46bd417d87b16e2351c9a7ba5cebf
158
py
Python
mysite/apps.py
medram/daira
cf445f1b308b879bb6c852067b162a2a1c1c72d3
[ "MIT" ]
1
2020-11-08T01:37:21.000Z
2020-11-08T01:37:21.000Z
mysite/apps.py
medram/daira
cf445f1b308b879bb6c852067b162a2a1c1c72d3
[ "MIT" ]
8
2020-08-30T18:16:08.000Z
2022-01-13T03:01:35.000Z
mysite/apps.py
medram/daira
cf445f1b308b879bb6c852067b162a2a1c1c72d3
[ "MIT" ]
null
null
null
from django.contrib.admin.apps import AdminConfig # to create a custom adminSite class MyAdminConfig(AdminConfig): default_site = 'mysite.admin.MyAdminSite'
31.6
49
0.822785
33a879c392980966fd096b4f1cea13b47dafbe3f
16,472
py
Python
code/modeling.py
jihoonerd/1985_Auto_Imports_Database
3da28bbc7f1090e48e68d8bf8b171b9b9dba9227
[ "MIT" ]
3
2017-09-09T07:26:37.000Z
2018-03-01T07:03:35.000Z
code/modeling.py
jihoon1990/1985_Auto_Imports_Database
3da28bbc7f1090e48e68d8bf8b171b9b9dba9227
[ "MIT" ]
null
null
null
code/modeling.py
jihoon1990/1985_Auto_Imports_Database
3da28bbc7f1090e48e68d8bf8b171b9b9dba9227
[ "MIT" ]
3
2018-10-31T08:59:40.000Z
2021-07-26T12:27:52.000Z
# -*- coding: utf-8 -*- """ Created on 8/6/17 Author: Jihoon Kim """ from sklearn.linear_model import LinearRegression from sklearn.linear_model import Ridge from sklearn.linear_model import ElasticNet from sklearn.ensemble import RandomForestRegressor from sklearn.ensemble import ExtraTreesRegressor from xgboost impo...
47.197708
110
0.645945
f26f6613d040f7f7c8309b9e2e6571c5141fb2e8
3,613
py
Python
ansible-module-demos/library/ds_query_cve.py
mawinkler/c1-ws-ansible
2b8d59988a40fafb22602500f19d3c5a6fafb52c
[ "MIT" ]
null
null
null
ansible-module-demos/library/ds_query_cve.py
mawinkler/c1-ws-ansible
2b8d59988a40fafb22602500f19d3c5a6fafb52c
[ "MIT" ]
null
null
null
ansible-module-demos/library/ds_query_cve.py
mawinkler/c1-ws-ansible
2b8d59988a40fafb22602500f19d3c5a6fafb52c
[ "MIT" ]
null
null
null
#!/usr/bin/python ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: ds_protection_status short_description: Retrieves the current protection status of a computer version_added: "2.6" description: - "This module retrie...
25.624113
156
0.607528
a83d1214bfde0a20c990a01785547e7e960a1cdf
4,906
py
Python
src/vonage/voice.py
raihan71/vonage-python-sdk
cd0a62a5fd763e3103533277d3cf5b36b7f25db4
[ "Apache-2.0" ]
null
null
null
src/vonage/voice.py
raihan71/vonage-python-sdk
cd0a62a5fd763e3103533277d3cf5b36b7f25db4
[ "Apache-2.0" ]
null
null
null
src/vonage/voice.py
raihan71/vonage-python-sdk
cd0a62a5fd763e3103533277d3cf5b36b7f25db4
[ "Apache-2.0" ]
null
null
null
import vonage class Voice(): #application_id and private_key are needed for the calling methods #Passing a Nexmo Client is also possible def __init__( self, client=None, application_id=None, private_key=None, ): try: # Client is protected ...
41.576271
113
0.660416
0fad63ebd4ae7700bba73c9409fad4897193509c
3,229
py
Python
modules/deepspell/baseline/fts5.py
Klebert-Engineering/deep-spell-9
cabfcbf8238085b139e6b4b0e43f459230ead963
[ "MIT" ]
3
2018-12-16T17:20:39.000Z
2019-01-11T19:45:29.000Z
modules/deepspell/baseline/fts5.py
Klebert-Engineering/deep-spell-9
cabfcbf8238085b139e6b4b0e43f459230ead963
[ "MIT" ]
2
2021-11-30T16:35:36.000Z
2022-01-20T12:33:10.000Z
modules/deepspell/baseline/fts5.py
Klebert-Engineering/deep-spell-9
cabfcbf8238085b139e6b4b0e43f459230ead963
[ "MIT" ]
null
null
null
# (C) 2018-present Klebert Engineering # ===============================[ Imports ]============================= import sys from pygtrie import CharTrie # ============================[ Local Imports ]========================== from deepspell import corpus # =====================[ Baseline Extrapolator Model ]===...
39.864198
95
0.541963
ccb7ee674f778d3009299582f0fee59b00c95460
4,884
py
Python
src/wrapper/py_Delta_Sigma_miscentering.py
tmcclintock/DeltaSigma_miscentering
12b4875a3b2c7d4ebbf588a15c1cc3ee6e49e0c7
[ "MIT" ]
null
null
null
src/wrapper/py_Delta_Sigma_miscentering.py
tmcclintock/DeltaSigma_miscentering
12b4875a3b2c7d4ebbf588a15c1cc3ee6e49e0c7
[ "MIT" ]
null
null
null
src/wrapper/py_Delta_Sigma_miscentering.py
tmcclintock/DeltaSigma_miscentering
12b4875a3b2c7d4ebbf588a15c1cc3ee6e49e0c7
[ "MIT" ]
null
null
null
""" This is the python wrapper that calls the python_wrapper() c function. This interfaces through c_types so that the user doesn't have to. """ import numpy as np from ctypes import c_double,c_int,POINTER,cdll import inspect import os library_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe(...
37.282443
204
0.652948
dd920cb6a643fb66bdec03be8c846519c7dd759b
5,711
py
Python
src/tests/examples/cvode/testCvRoberts.py
jetuk/cython-sundials
51c25c7e0d77bb078431471cf0c182f8dcfc7fba
[ "BSD-3-Clause" ]
1
2015-12-09T17:37:39.000Z
2015-12-09T17:37:39.000Z
src/tests/examples/cvode/testCvRoberts.py
jetuk/cython-sundials
51c25c7e0d77bb078431471cf0c182f8dcfc7fba
[ "BSD-3-Clause" ]
null
null
null
src/tests/examples/cvode/testCvRoberts.py
jetuk/cython-sundials
51c25c7e0d77bb078431471cf0c182f8dcfc7fba
[ "BSD-3-Clause" ]
1
2018-10-19T00:46:15.000Z
2018-10-19T00:46:15.000Z
# -*- coding: utf-8 -*- """ # * ----------------------------------------------------------------- * $Revision: 1.3 $ * $Date: 2010/12/01 22:51:32 $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----...
29.438144
81
0.548766
939b5a6f9c1d672cb4ce2b1043aeefe2943202f4
4,777
py
Python
python_Projects/my_photoshop/stanCodoshop.py
Albert840529/SC-Projects
55314d0cc82c77c3a4e08ed6e084ae54cc920550
[ "MIT" ]
null
null
null
python_Projects/my_photoshop/stanCodoshop.py
Albert840529/SC-Projects
55314d0cc82c77c3a4e08ed6e084ae54cc920550
[ "MIT" ]
null
null
null
python_Projects/my_photoshop/stanCodoshop.py
Albert840529/SC-Projects
55314d0cc82c77c3a4e08ed6e084ae54cc920550
[ "MIT" ]
null
null
null
""" SC101 - Assignment3 Adapted from Nick Parlante's Ghost assignment by Jerry Liao. ----------------------------------------------- TODO: """ import math import os import sys from simpleimage import SimpleImage def get_pixel_dist(pixel, red, green, blue): """ Returns the square of the color distance betwee...
29.487654
98
0.625079
0bd63d4fd4e5dc435666a3590e7cf1ee44804e7e
1,351
py
Python
example_code.py
bartulem/KISN-pancortical-kinematics
a849a71a59143e432f5dc048cd0d700373082933
[ "MIT" ]
2
2022-02-11T00:45:46.000Z
2022-03-16T15:00:50.000Z
example_code.py
bartulem/KISN-pancortical-kinematics
a849a71a59143e432f5dc048cd0d700373082933
[ "MIT" ]
null
null
null
example_code.py
bartulem/KISN-pancortical-kinematics
a849a71a59143e432f5dc048cd0d700373082933
[ "MIT" ]
1
2022-03-08T07:12:59.000Z
2022-03-08T07:12:59.000Z
""" Example code for processing data and performing the infrerence of GLMs. @author: JingyiGF """ from .optitracking_lib import * from .ratemap_lib import * from .model_selection import * from .process_data import * from .calc_backwards_scores import * # load the data a_file = open('/.../clean_data_johnjohn_210520_s...
27.02
101
0.759437
1e28dbff51ae268cdae5d20b7757e63c227cdd13
69,278
py
Python
versioneer.py
AWSjswinney/ninja-python-distributions
16e54ff9598361aa5468757f9f6f4b2cb0030f0b
[ "Apache-2.0" ]
null
null
null
versioneer.py
AWSjswinney/ninja-python-distributions
16e54ff9598361aa5468757f9f6f4b2cb0030f0b
[ "Apache-2.0" ]
null
null
null
versioneer.py
AWSjswinney/ninja-python-distributions
16e54ff9598361aa5468757f9f6f4b2cb0030f0b
[ "Apache-2.0" ]
null
null
null
# Version: 0.17 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and pypy * [![Latest Version] (http...
37.794872
82
0.621958
0fe0267df31f1c66adde7d7460b4e4c8327c1813
904
py
Python
restore-db.py
ubclaunchpad/rocket2
7a4f05f46229d1c9a900aac1694b3d822f9d6b0f
[ "MIT" ]
14
2019-01-20T21:54:36.000Z
2021-10-09T21:06:23.000Z
restore-db.py
ubclaunchpad/rocket2
7a4f05f46229d1c9a900aac1694b3d822f9d6b0f
[ "MIT" ]
510
2018-11-18T20:07:51.000Z
2022-02-01T15:34:03.000Z
restore-db.py
ubclaunchpad/rocket2.0
7a4f05f46229d1c9a900aac1694b3d822f9d6b0f
[ "MIT" ]
9
2019-08-20T16:57:21.000Z
2021-05-04T12:51:47.000Z
""" Restores all tables from a pickle file to database. This is done by inserting them into the database via the db.store function. With Amazon DynamoDB, nothing happens when the row inserted is a duplicate (i.e. has the same primary key). Run with pipenv run python restore-db.py """ from config import Config from fa...
27.393939
75
0.649336
837463012c10e785bd4473c0988235882ea93e24
12,177
py
Python
python/tests/test_nessie_cli.py
andrioni/nessie
d402186c369bab5ca3bb2db05f95e2950d5c985f
[ "Apache-2.0" ]
null
null
null
python/tests/test_nessie_cli.py
andrioni/nessie
d402186c369bab5ca3bb2db05f95e2950d5c985f
[ "Apache-2.0" ]
null
null
null
python/tests/test_nessie_cli.py
andrioni/nessie
d402186c369bab5ca3bb2db05f95e2950d5c985f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `pynessie` package.""" import itertools import os from pathlib import Path from typing import List from typing import Optional import confuse import pytest import simplejson from click.testing import CliRunner from click.testing import Result from pynessie im...
35.193642
127
0.561222
bc9f2864f43082a4aad6b136e3b915d8c24de1c7
3,604
py
Python
numerical_methods_toolkit/matrix_multiplication.py
f4str/numerical-methods-toolkit
8f15008c15958b33a7a777c5ba3af18467a67122
[ "MIT" ]
null
null
null
numerical_methods_toolkit/matrix_multiplication.py
f4str/numerical-methods-toolkit
8f15008c15958b33a7a777c5ba3af18467a67122
[ "MIT" ]
6
2021-06-30T03:33:06.000Z
2021-08-08T08:41:31.000Z
numerical_methods_toolkit/matrix_multiplication.py
f4str/numerical-methods-toolkit
8f15008c15958b33a7a777c5ba3af18467a67122
[ "MIT" ]
null
null
null
import math def dot_product(x, y): if len(x) != len(y): raise ValueError('dot product: not equal vector sizes') return sum(x_i * y_i for x_i, y_i in zip(x, y)) def matrix_addition(A, B): if len(A) != len(B) or len(A[0]) != len(B[0]): raise ValueError('matrix addition: not equal matrix si...
35.333333
98
0.632353
182e0ec917c224004a6683fa9bc7b39211384366
11,010
py
Python
core/tests/test_polypod/test_main/test_main_env_vars.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
core/tests/test_polypod/test_main/test_main_env_vars.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
core/tests/test_polypod/test_main/test_main_env_vars.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
31.820809
88
0.52861
5df6bbb21c5a8a264d00b174692bce79bd5b55d7
1,352
py
Python
my_website_backend/urls.py
YanZY97/my_website_backend
6a90d4179ebfaa448c19b254f0d483fd1bbd7075
[ "MIT" ]
1
2021-06-11T06:32:07.000Z
2021-06-11T06:32:07.000Z
my_website_backend/urls.py
YanZY97/my_website_backend
6a90d4179ebfaa448c19b254f0d483fd1bbd7075
[ "MIT" ]
null
null
null
my_website_backend/urls.py
YanZY97/my_website_backend
6a90d4179ebfaa448c19b254f0d483fd1bbd7075
[ "MIT" ]
null
null
null
"""my_website_backend URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') ...
40.969697
104
0.664201
7c5866de10fcb1544e0e6087e274f1d093c93ee0
16,970
py
Python
sdks/python/http_client/v1/polyaxon_sdk/__init__.py
polyaxon/polyaxon
a835f2872a63f6cf5c27d2dd1125ad7c18eb849a
[ "Apache-2.0" ]
3,200
2017-05-09T11:35:31.000Z
2022-03-28T05:43:22.000Z
sdks/python/http_client/v1/polyaxon_sdk/__init__.py
polyaxon/polyaxon
a835f2872a63f6cf5c27d2dd1125ad7c18eb849a
[ "Apache-2.0" ]
1,324
2017-06-29T07:21:27.000Z
2022-03-27T12:41:10.000Z
sdks/python/http_client/v1/polyaxon_sdk/__init__.py
polyaxon/polyaxon
a835f2872a63f6cf5c27d2dd1125ad7c18eb849a
[ "Apache-2.0" ]
341
2017-01-10T23:06:53.000Z
2022-03-10T08:15:18.000Z
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
58.316151
112
0.895993
2a995a9e1d8fc52359338ad409b6bde9d27d0e5e
7,656
py
Python
ucsmsdk/mometa/equipment/EquipmentFexPowerSummaryHist.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
78
2015-11-30T14:10:05.000Z
2022-02-13T00:29:08.000Z
ucsmsdk/mometa/equipment/EquipmentFexPowerSummaryHist.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
113
2015-11-20T09:42:46.000Z
2022-03-16T16:53:29.000Z
ucsmsdk/mometa/equipment/EquipmentFexPowerSummaryHist.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
86
2015-12-12T08:22:18.000Z
2022-01-23T03:56:34.000Z
"""This module contains the general information for EquipmentFexPowerSummaryHist ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class EquipmentFexPowerSummaryHistConsts: MOST_RECENT_FALSE = "false" MOST_RECENT_NO = "no...
67.752212
258
0.674765
6a8782bd2623e5dcf26dac64db4f693955ab4fa1
1,240
py
Python
src/rooms/utils_test.py
gomyar/rooms
ba20cb77380f439d60d452d2bc69bd94c9c21c24
[ "MIT" ]
null
null
null
src/rooms/utils_test.py
gomyar/rooms
ba20cb77380f439d60d452d2bc69bd94c9c21c24
[ "MIT" ]
null
null
null
src/rooms/utils_test.py
gomyar/rooms
ba20cb77380f439d60d452d2bc69bd94c9c21c24
[ "MIT" ]
null
null
null
import unittest from rooms.utils import sort_actor_data class UtilsTest(unittest.TestCase): def setUp(self): self.a1 = {"actor_id": "actor1", "docked_with": None} self.a2 = {"actor_id": "actor2", "docked_with": "actor4"} self.a3 = {"actor_id": "actor3", "docked_with": "actor1"} s...
38.75
73
0.601613
f1fb408b0d1fd36a834d4db486302bcd9ae70096
22,932
py
Python
python/dask_cudf/dask_cudf/core.py
viclafargue/cudf
44bf4baead3950a1db5c9aad3c3d4d49a3273673
[ "Apache-2.0" ]
1
2020-01-15T17:00:29.000Z
2020-01-15T17:00:29.000Z
python/dask_cudf/dask_cudf/core.py
jdye64/cudf
a02f888badcd9cf7f81a0e32605f51d51085311f
[ "Apache-2.0" ]
null
null
null
python/dask_cudf/dask_cudf/core.py
jdye64/cudf
a02f888badcd9cf7f81a0e32605f51d51085311f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018-2021, NVIDIA CORPORATION. import math import warnings from distutils.version import LooseVersion import numpy as np import pandas as pd from tlz import partition_all import dask import dask.dataframe.optimize from dask import dataframe as dd from dask.base import normalize_token, tokenize from d...
31.073171
79
0.586735
e11082b5352f91519f90789c6b4c47966abf30d1
1,157
py
Python
Framework/Scripts/lib/scriptlib/i18n/__init__.py
fadingred/Greenwich
d163573aaf886814e6145c51ff9ebf228fd7a831
[ "MIT" ]
40
2015-03-14T09:21:19.000Z
2018-12-28T22:05:19.000Z
Framework/Scripts/lib/scriptlib/i18n/__init__.py
fadingred/Greenwich
d163573aaf886814e6145c51ff9ebf228fd7a831
[ "MIT" ]
null
null
null
Framework/Scripts/lib/scriptlib/i18n/__init__.py
fadingred/Greenwich
d163573aaf886814e6145c51ff9ebf228fd7a831
[ "MIT" ]
5
2015-05-12T11:34:07.000Z
2019-09-19T04:02:32.000Z
# # Copyright (c) 2013 FadingRed LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, dis...
57.85
119
0.783924
5995b94aaa194177b75eefdc2f470374332be2f9
655
py
Python
read.py
meyskens/raspi-ir-distance
97f9f43ade97d01e1d1c0581e186cdd8e4976f58
[ "MIT" ]
1
2019-10-27T05:49:59.000Z
2019-10-27T05:49:59.000Z
read.py
meyskens/raspi-ir-distance
97f9f43ade97d01e1d1c0581e186cdd8e4976f58
[ "MIT" ]
null
null
null
read.py
meyskens/raspi-ir-distance
97f9f43ade97d01e1d1c0581e186cdd8e4976f58
[ "MIT" ]
3
2018-05-02T16:57:33.000Z
2019-03-07T15:36:03.000Z
import cgitb import spidev import RPi.GPIO as GPIO import time import sys cgitb.enable() spi = spidev.SpiDev() # create spi object spi.open(0, 0) # open spi port 0, device (CS) 0, for the MCP8008 def readadc(adcnum): # read out the ADC if ((adcnum > 7) or (adcnum < 0)): return -1 r = spi.xfer2([...
21.129032
77
0.6
6e26ee8a739aa059d2ebbc8a507eed8988e46c1b
850
py
Python
Python/batch_check.py
insspb/Bash
8e4ad295950267fa1fc6960411389460f8a8a2eb
[ "MIT" ]
null
null
null
Python/batch_check.py
insspb/Bash
8e4ad295950267fa1fc6960411389460f8a8a2eb
[ "MIT" ]
4
2016-03-18T09:18:32.000Z
2016-03-21T00:47:23.000Z
Python/batch_check.py
insspb/bash
8e4ad295950267fa1fc6960411389460f8a8a2eb
[ "MIT" ]
1
2020-11-24T11:20:46.000Z
2020-11-24T11:20:46.000Z
from redirects import Redirect import csv # Custom methods to work with Redirect class. Get urls from CSV or from # two different text files. def plain_input(f1, f2, verbose=False): f1 = open(f1).read().splitlines() f2 = open(f2).read().splitlines() input_list = list(zip(f1, f2)) objs = [Redirect(ite...
28.333333
76
0.664706
9f4f0be3333d7a58800b9b06d58096d03be27e11
13,046
py
Python
cellproject/utils.py
Iwo-K/cellproject
e4d9c193bc3ea6ac5f85d49e9b40a2fe4b6c7ea9
[ "MIT" ]
null
null
null
cellproject/utils.py
Iwo-K/cellproject
e4d9c193bc3ea6ac5f85d49e9b40a2fe4b6c7ea9
[ "MIT" ]
null
null
null
cellproject/utils.py
Iwo-K/cellproject
e4d9c193bc3ea6ac5f85d49e9b40a2fe4b6c7ea9
[ "MIT" ]
null
null
null
import pandas as pd import scanpy as sc import numpy as np from sklearn.metrics import pairwise_distances from scipy.sparse import issparse, csr_matrix def kfilter(x, k=5, keep_values=True): """ Sorts and array and return either a boolean array with True set to k smallest values (if keep_values is False) ...
31.512077
88
0.644412
b660a5fd127c48ea6cb9a2b7e0ef4fbe7b6fa3d4
38,544
py
Python
sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py
xiajiadai/beam
c328d2ac0f805cdfd9de8ffa513c611051549f65
[ "Apache-2.0" ]
1
2020-07-22T23:09:10.000Z
2020-07-22T23:09:10.000Z
sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py
JustineKoa/beam
e7ca03869150c1ba40ea9e9245fe1a93ba5ef0b3
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py
JustineKoa/beam
e7ca03869150c1ba40ea9e9245fe1a93ba5ef0b3
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
35.524424
211
0.691962
fde7b4a876f890c27e288fae94719904b0455b45
1,026
py
Python
backend/serializers/subCategorySerializer.py
salah-walid/Ecommerce-Shopping-App
c828701b03dab74c72538943f7aac5192fa20be6
[ "MIT" ]
1
2021-12-12T12:53:14.000Z
2021-12-12T12:53:14.000Z
backend/serializers/subCategorySerializer.py
JetLightStudio/Ecommerce-Shopping-App
c828701b03dab74c72538943f7aac5192fa20be6
[ "MIT" ]
null
null
null
backend/serializers/subCategorySerializer.py
JetLightStudio/Ecommerce-Shopping-App
c828701b03dab74c72538943f7aac5192fa20be6
[ "MIT" ]
1
2021-06-08T10:22:08.000Z
2021-06-08T10:22:08.000Z
from rest_framework import serializers from backend.models.subCategory import subCategory from backend.models.product import product from .productSerializer import productSerializer class subCategorySerializer(serializers.ModelSerializer): topSales = serializers.SerializerMethodField("get_top_sales") products ...
48.857143
114
0.758285
fe06101cf05413cd0186f1f1fc561b8899135f93
16,375
py
Python
Orio/orio/module/loops/parser.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
Orio/orio/module/loops/parser.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
Orio/orio/module/loops/parser.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys, os import orio.tool.ply.lex, orio.tool.ply.yacc import orio.main.util.globals as g import orio.module.loops.ast as ast #---------------------------------------------------------------------------------------------------------------------- class LoopsLexer: def __init__(self): ...
29.241071
125
0.478412
a8aadb5c5ca13ac65a0827112bd3911311f58400
208
py
Python
mt_to_hugo_article_converter/mt/attribute/body.py
mazgi/mt-to-hugo-article-converter
f124eeaa1a648e91f0bb3b6cf6ee5347b30ca45d
[ "MIT" ]
null
null
null
mt_to_hugo_article_converter/mt/attribute/body.py
mazgi/mt-to-hugo-article-converter
f124eeaa1a648e91f0bb3b6cf6ee5347b30ca45d
[ "MIT" ]
3
2020-02-14T14:34:58.000Z
2020-03-23T07:07:19.000Z
mt_to_hugo_article_converter/mt/attribute/body.py
mazgi/mt-to-hugo-article-converter
f124eeaa1a648e91f0bb3b6cf6ee5347b30ca45d
[ "MIT" ]
null
null
null
import re from .multi_line_attribute import MultiLineAttribute class Body(MultiLineAttribute): regex = re.compile(r'^\s*BODY:\s*$') if __name__ == '__main__': import doctest doctest.testmod()
17.333333
52
0.716346
53b83af6d2e42aff66e0f018f070711454d49c3e
2,218
py
Python
mutatio/share/kivy-examples/canvas/canvas_stress.py
SmatMan/mutatio
e6e24c45054321f9cb753499f0842ee8c8969c56
[ "MIT" ]
null
null
null
mutatio/share/kivy-examples/canvas/canvas_stress.py
SmatMan/mutatio
e6e24c45054321f9cb753499f0842ee8c8969c56
[ "MIT" ]
null
null
null
mutatio/share/kivy-examples/canvas/canvas_stress.py
SmatMan/mutatio
e6e24c45054321f9cb753499f0842ee8c8969c56
[ "MIT" ]
null
null
null
''' Canvas stress ============= This example tests the performance of our Graphics engine by drawing large numbers of small squares. You should see a black canvas with buttons and a label at the bottom. Pressing the buttons adds small colored squares to the canvas. ''' from kivy.uix.button import Button ...
30.383562
79
0.591073
7548b7de72167233888d4f5ed34ba98733f04c59
1,311
py
Python
mel/lib/ui.py
aevri/mel
4451b272ddc2095f757423ff519f36fc57708ec6
[ "Apache-2.0" ]
5
2015-04-20T12:27:29.000Z
2022-02-12T21:01:39.000Z
mel/lib/ui.py
aevri/mel
4451b272ddc2095f757423ff519f36fc57708ec6
[ "Apache-2.0" ]
27
2016-06-20T15:02:03.000Z
2022-03-29T06:23:01.000Z
mel/lib/ui.py
aevri/mel
4451b272ddc2095f757423ff519f36fc57708ec6
[ "Apache-2.0" ]
3
2015-12-27T12:33:34.000Z
2019-07-23T04:05:47.000Z
"""User interface related things.""" import os import subprocess class AbortKeyInterruptError(Exception): pass def set_clipboard_contents(text): """Set the contents of the clipbaord, only works on Mac OSX. :returns: None """ pbcopy = "/usr/bin/pbcopy" if not os.path.isfile(pbcopy): ...
29.795455
79
0.630816
2683ccd70843e9d141f1be9c20965c09adbfe4f8
3,937
py
Python
tests/data.py
CiaranOMara/mlmmjadmin
ecba490567fb905dc12f55e9a764cea1fb247119
[ "PostgreSQL", "MIT" ]
36
2018-01-16T05:49:03.000Z
2022-03-25T21:36:37.000Z
tests/data.py
CiaranOMara/mlmmjadmin
ecba490567fb905dc12f55e9a764cea1fb247119
[ "PostgreSQL", "MIT" ]
15
2018-12-30T14:53:48.000Z
2021-12-30T11:51:45.000Z
tests/data.py
CiaranOMara/mlmmjadmin
ecba490567fb905dc12f55e9a764cea1fb247119
[ "PostgreSQL", "MIT" ]
18
2018-05-10T14:49:03.000Z
2022-01-12T08:24:45.000Z
# coding=utf-8 # Testing data import settings domain = 'api-test.com' listname = 'test-list' ml = listname + '@' + domain # urls url_ml = '/api/' + ml # Not exist domain domain_not_exist = 'not-exist-test-domain.com' url_ml_in_not_exist_domain = '/api/ml@' + domain_not_exist params_create_ml = { 'close_list': ...
40.173469
100
0.691643
98020233373c4595f8c51007cb29078023da8046
174
py
Python
rosys/test/__init__.py
zauberzeug/rosys
10271c88ffd5dcc4fb8eec93d46fe4144a9e40d8
[ "MIT" ]
1
2022-02-20T08:21:07.000Z
2022-02-20T08:21:07.000Z
rosys/test/__init__.py
zauberzeug/rosys
10271c88ffd5dcc4fb8eec93d46fe4144a9e40d8
[ "MIT" ]
1
2022-03-08T12:46:09.000Z
2022-03-08T12:46:09.000Z
rosys/test/__init__.py
zauberzeug/rosys
10271c88ffd5dcc4fb8eec93d46fe4144a9e40d8
[ "MIT" ]
null
null
null
import pytest pytest.register_assert_rewrite('rosys.test.helper') # nopep8 from .runtime import TestRuntime from .helper import assert_point, assert_pose, automate_drive_to
34.8
64
0.83908
4c6612193c4e3c48c471bc1788b2494624ce0df5
456
py
Python
examples/org-website/atomic_long_sample.py
tonytheonlypony/hazelcast-python-client
3aafeaf2ebc05aee4f2386c62c079db496a7c81f
[ "Apache-2.0" ]
98
2015-12-08T14:26:27.000Z
2022-03-23T17:44:11.000Z
examples/org-website/atomic_long_sample.py
tonytheonlypony/hazelcast-python-client
3aafeaf2ebc05aee4f2386c62c079db496a7c81f
[ "Apache-2.0" ]
396
2016-02-23T11:07:55.000Z
2022-03-31T14:26:34.000Z
examples/org-website/atomic_long_sample.py
tonytheonlypony/hazelcast-python-client
3aafeaf2ebc05aee4f2386c62c079db496a7c81f
[ "Apache-2.0" ]
62
2015-12-09T11:20:53.000Z
2022-01-28T01:30:54.000Z
import hazelcast # Start the Hazelcast Client and connect to an already running # Hazelcast Cluster on 127.0.0.1 # Note: CP Subsystem has to be enabled on the cluster client = hazelcast.HazelcastClient() # Get the AtomicLong counter from Cluster counter = client.cp_subsystem.get_atomic_long("counter").blocking() # Add...
32.571429
67
0.785088
b91fd59b9c8870d6d36569b9e438b9dae643c5ef
5,518
py
Python
dataset.py
SriramPingali/Image-To-Text
75bc128a31fa16eeebdbe89d8c26d27065518a4f
[ "MIT" ]
null
null
null
dataset.py
SriramPingali/Image-To-Text
75bc128a31fa16eeebdbe89d8c26d27065518a4f
[ "MIT" ]
3
2020-06-10T06:16:45.000Z
2020-06-13T09:59:39.000Z
dataset.py
SriramPingali/Image-To-Text
75bc128a31fa16eeebdbe89d8c26d27065518a4f
[ "MIT" ]
1
2022-01-02T15:01:56.000Z
2022-01-02T15:01:56.000Z
#!/usr/bin/python # encoding: utf-8 import random import torch import os from torch.utils.data import Dataset from torch.utils.data import sampler import torchvision.transforms as transforms import lmdb import six import sys from PIL import Image import numpy as np class dataset(Dataset): def __init__(self, ima...
31.175141
111
0.57539
c88c058604b587b74989857e512fc9786f93213e
539
py
Python
vulcan/model/_school.py
Antoni-Czaplicki/vulcan-api
a1d9127ce156013a7a803f31b55591989f05ba5a
[ "MIT" ]
1
2021-01-08T00:23:27.000Z
2021-01-08T00:23:27.000Z
vulcan/model/_school.py
Antoni-Czaplicki/vulcan-api
a1d9127ce156013a7a803f31b55591989f05ba5a
[ "MIT" ]
null
null
null
vulcan/model/_school.py
Antoni-Czaplicki/vulcan-api
a1d9127ce156013a7a803f31b55591989f05ba5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from related import IntegerField, StringField, immutable from ._serializable import Serializable @immutable class School(Serializable): """A single school building. :var int ~.id: school ID :var str ~.name: school full name :var str ~.short_name: school short name :var s...
24.5
56
0.671614
1ff71a3dbbcf0cf0ae3d87d14576963657631e45
15,449
py
Python
scripts_sigmoid/main.py
JihoChoi/wsdm-2022-challenge
2e2837bb8c022abe2fae423943abec4b13893cc1
[ "MIT" ]
1
2022-01-25T14:14:41.000Z
2022-01-25T14:14:41.000Z
scripts_sigmoid/main.py
JihoChoi/wsdm-2022-challenge
2e2837bb8c022abe2fae423943abec4b13893cc1
[ "MIT" ]
null
null
null
scripts_sigmoid/main.py
JihoChoi/wsdm-2022-challenge
2e2837bb8c022abe2fae423943abec4b13893cc1
[ "MIT" ]
null
null
null
""" 2022-01-00 author: Jiho Choi Reference - https://pytorch-geometric.readthedocs.io/en/latest/modules/loader.html#torch_geometric.loader.GraphSAINTSampler - https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/hgt_dblp.py - https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rgcn_...
35.678984
113
0.552657
6014955748a1d81d37f50b8d12752a82e278a626
431
py
Python
raspberry-pi/epaper.py
ciffelia/airpapyrus
4e6642025d6b1e81210c63f3cae46e4e361804ea
[ "MIT" ]
null
null
null
raspberry-pi/epaper.py
ciffelia/airpapyrus
4e6642025d6b1e81210c63f3cae46e4e361804ea
[ "MIT" ]
null
null
null
raspberry-pi/epaper.py
ciffelia/airpapyrus
4e6642025d6b1e81210c63f3cae46e4e361804ea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from PIL import ImageOps from waveshare_epd import epd2in7 epd = epd2in7.EPD() def draw(image): # なぜか左右反転して表示されるので mirror_image = ImageOps.mirror(image) buffer = epd.getbuffer_4Gray(mirror_image) try: epd.Init_4Gray() epd.display_4Gray(buffer) except Ke...
17.24
46
0.633411
3c5c8ccc4668a4dea0370365e9148a270d503a09
38,698
py
Python
source1/bsp/entities/base_entity_handler.py
syborg64/SourceIO
e4ba86d801f518e192260af08ef533759c2e1cc3
[ "MIT" ]
1
2021-07-12T12:55:27.000Z
2021-07-12T12:55:27.000Z
source1/bsp/entities/base_entity_handler.py
syborg64/SourceIO
e4ba86d801f518e192260af08ef533759c2e1cc3
[ "MIT" ]
null
null
null
source1/bsp/entities/base_entity_handler.py
syborg64/SourceIO
e4ba86d801f518e192260af08ef533759c2e1cc3
[ "MIT" ]
null
null
null
import math import re from pathlib import Path import numpy as np import bpy from mathutils import Vector from .abstract_entity_handlers import AbstractEntityHandler, _srgb2lin from .base_entity_classes import * from .base_entity_classes import entity_class_handle as base_entity_classes from ...vtf import load_skybo...
48.131841
119
0.678743
af7f82968816348e81a05069e3e36417a49e21df
504
py
Python
SpyBot_Workspace/Dependencies/hostapd-2.6/hostapd/processcheck2.py
AamerShareef/Spy-Bot
3a6245bad082a510a09b1fb01e8356894a8cf47b
[ "MIT" ]
14
2018-01-02T20:10:53.000Z
2022-02-26T20:09:28.000Z
SpyBot_Workspace/Dependencies/hostapd-2.6/hostapd/processcheck2.py
AamerShareef/Spy-Bot
3a6245bad082a510a09b1fb01e8356894a8cf47b
[ "MIT" ]
null
null
null
SpyBot_Workspace/Dependencies/hostapd-2.6/hostapd/processcheck2.py
AamerShareef/Spy-Bot
3a6245bad082a510a09b1fb01e8356894a8cf47b
[ "MIT" ]
13
2018-01-12T20:35:13.000Z
2022-01-09T00:37:48.000Z
#!/usr/bin/python import subprocess,time,os def jumpto(): time.sleep(2) print "DID you receive the challenge/ response pair?" raw_input() def check(): try: DN=open(os.devnull) hn=subprocess.Popen(['./hostapd-wpe ./hostapd-wpe.conf'],shell=True,stdin=subprocess.PIPE,stdout=None,stderr=None) hn.communicate() ...
19.384615
115
0.69246
d59e7fd445f172d72777a55f37e4dcf0c75380fa
11,857
py
Python
pandas/tests/series/test_timezones.py
uds5501/pandas
ec356fa62241750a227c1bafb4c0c396bde1c293
[ "BSD-3-Clause" ]
2
2019-01-09T07:43:12.000Z
2020-05-30T05:49:11.000Z
pandas/tests/series/test_timezones.py
uds5501/pandas
ec356fa62241750a227c1bafb4c0c396bde1c293
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_timezones.py
uds5501/pandas
ec356fa62241750a227c1bafb4c0c396bde1c293
[ "BSD-3-Clause" ]
1
2020-02-08T10:16:39.000Z
2020-02-08T10:16:39.000Z
# -*- coding: utf-8 -*- """ Tests for Series timezone-related methods """ from datetime import datetime import pytest import pytz import numpy as np from dateutil.tz import tzoffset import pandas.util.testing as tm from pandas._libs.tslibs import timezones, conversion from pandas.compat import lrange from pandas.core...
38.248387
78
0.579573
ceff81ca12ff72eb8df0e00233d25596168f65e3
815
py
Python
learn/ch02/7csv_reader_column_by_name.py
shuxiangguo/FoudationsForAnalysisWithPython
8ac6595db8e12b3fd1b9815bdeda583f6f7d11d9
[ "MIT" ]
null
null
null
learn/ch02/7csv_reader_column_by_name.py
shuxiangguo/FoudationsForAnalysisWithPython
8ac6595db8e12b3fd1b9815bdeda583f6f7d11d9
[ "MIT" ]
null
null
null
learn/ch02/7csv_reader_column_by_name.py
shuxiangguo/FoudationsForAnalysisWithPython
8ac6595db8e12b3fd1b9815bdeda583f6f7d11d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import csv import sys input_file = sys.argv[1] output_file = sys.argv[2] my_columns = ['Invoice Number', 'Purchase Date'] my_columns_index = [] with open(input_file, 'r', newline='') as csv_in_file: with open(output_file, 'w', newline='') as csv_out_file: filereader = csv.reader(csv_...
35.434783
61
0.655215
4842f4f08019c334b30be1edec6218b37b4a4bd7
3,831
py
Python
thinc/initializers.py
TheVinhLuong102/thinc
7b54f728ddec7765a1d8a5e553d4b4b90b9edaec
[ "MIT" ]
1
2022-03-08T07:25:21.000Z
2022-03-08T07:25:21.000Z
thinc/initializers.py
TheVinhLuong102/thinc
7b54f728ddec7765a1d8a5e553d4b4b90b9edaec
[ "MIT" ]
11
2021-10-04T16:36:43.000Z
2021-12-21T16:39:36.000Z
thinc/initializers.py
TheVinhLuong102/thinc
7b54f728ddec7765a1d8a5e553d4b4b90b9edaec
[ "MIT" ]
1
2021-07-18T16:28:32.000Z
2021-07-18T16:28:32.000Z
from typing import Callable, cast import numpy from .backends import Ops from .config import registry from .types import FloatsXd, Shape from .util import partial # TODO: Harmonize naming with Keras, and fill in missing entries # https://keras.io/initializers/ We should also have He normal/uniform # and probably lecu...
31.146341
88
0.722005
37aa079f4786d7dbf1c4b7dccba9d2b1577dd4b3
1,827
py
Python
sa/profiles/Huawei/MA5600T/get_capabilities.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/Huawei/MA5600T/get_capabilities.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/Huawei/MA5600T/get_capabilities.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Huawei.MA5600T.get_capabilities # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # ------------------------------------------------...
30.966102
88
0.577997
688caae1d4d8035a158bd01b8277c4636ba315e5
6,030
py
Python
nevergrad/functions/iohprofiler/core.py
Ellawin/nevergrad
d4ea61d0fff9292045f72714b26972ea1e48bd88
[ "MIT" ]
2
2021-04-13T12:14:46.000Z
2021-07-07T14:37:50.000Z
nevergrad/functions/iohprofiler/core.py
Ellawin/nevergrad
d4ea61d0fff9292045f72714b26972ea1e48bd88
[ "MIT" ]
null
null
null
nevergrad/functions/iohprofiler/core.py
Ellawin/nevergrad
d4ea61d0fff9292045f72714b26972ea1e48bd88
[ "MIT" ]
null
null
null
import numpy as np from IOHexperimenter import IOH_function, W_model_function import nevergrad as ng from .. import base class PBOFunction(base.ExperimentFunction): """ Pseudo-boolean functions taken from the IOHexperimenter project, adapted for minimization Parameters ---------- fid: int ...
48.629032
134
0.68408
f21dbbb22d732d3fc49c9310467401f26a7f54d7
96,229
py
Python
dace/codegen/targets/cpu.py
Shigangli/dace
966365a572921a6916737e4292e581e767873cf0
[ "BSD-3-Clause" ]
null
null
null
dace/codegen/targets/cpu.py
Shigangli/dace
966365a572921a6916737e4292e581e767873cf0
[ "BSD-3-Clause" ]
null
null
null
dace/codegen/targets/cpu.py
Shigangli/dace
966365a572921a6916737e4292e581e767873cf0
[ "BSD-3-Clause" ]
1
2021-03-04T13:01:48.000Z
2021-03-04T13:01:48.000Z
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. from copy import deepcopy from dace.sdfg.state import SDFGState import functools import itertools import warnings from sympy.functions.elementary.complexes import arg from dace import data, dtypes, registry, memlet as mmlt, subsets, symbolic,...
43.463866
112
0.501606
fe2e3674ed804a8bdf02f5c1652bbee4b0296f8a
369
py
Python
projects/code_combat/8_Cloudrip_Mountain/434-Grid_Minefield/grid_minefield.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
projects/code_combat/8_Cloudrip_Mountain/434-Grid_Minefield/grid_minefield.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
projects/code_combat/8_Cloudrip_Mountain/434-Grid_Minefield/grid_minefield.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
for x in range(12, 12 + 8 * 6, 8): for y in range(12, 12 + 8 * 7, 8): hero.buildXY("fire-trap", x, y) hero.moveXY(hero.pos.x + 8, hero.pos.y) mine = hero.findNearest(hero.findHazards()) while True: enemy = hero.findNearestEnemy() if enemy and hero.distanceTo(enemy) <= 20: her...
28.384615
47
0.579946
a8b8a883ffccb2bc0eda112d4eef508be0aa3258
2,396
py
Python
amy/dashboard/migrations/0001_initial.py
code-review-doctor/amy
268c1a199510457891459f3ddd73fcce7fe2b974
[ "MIT" ]
53
2015-01-10T17:39:19.000Z
2019-06-12T17:36:34.000Z
amy/dashboard/migrations/0001_initial.py
code-review-doctor/amy
268c1a199510457891459f3ddd73fcce7fe2b974
[ "MIT" ]
1,176
2015-01-02T06:32:47.000Z
2019-06-18T11:57:47.000Z
amy/dashboard/migrations/0001_initial.py
code-review-doctor/amy
268c1a199510457891459f3ddd73fcce7fe2b974
[ "MIT" ]
44
2015-01-03T15:08:56.000Z
2019-06-09T05:33:08.000Z
# Generated by Django 2.1.2 on 2019-02-15 18:43 from django.db import migrations, models import django_countries.fields def add_initial_criteria(apps, schema_editor): """Add initial criteria.""" Criterium = apps.get_model('dashboard', 'Criterium') data = [ ('AU', 'admin-au@carpentries.org', 'AU'...
35.761194
149
0.594324
4252f6baa818979acaa7c7f55e7cec283297d7f0
19,260
py
Python
lib/googlecloudsdk/command_lib/util/gcloudignore.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/util/gcloudignore.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/util/gcloudignore.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
34.209591
80
0.688889
0aa9a4ac6cc1b869302deea4e141acbd411f92d4
3,348
py
Python
aalh_iit_miltonzinkcollection/populate-decades-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_miltonzinkcollection/populate-decades-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_miltonzinkcollection/populate-decades-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
from openpyxl import load_workbook filename = 'aalh_iit_miltonzinkcollection.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 15 maximumcol = 15 minimumrow = 7 maximumrow = 790 iterationrow = 7 targetcol = 15 decadescol = 14 for row in ws.iter_rows(min_row=minimumrow, min_col=minimumcol,...
47.15493
104
0.614994
7eaafdd3f9308c8538e8b0e9a9001b0dcde46550
38,753
py
Python
salt/cloud/clouds/nova.py
ronnix/salt
00ffa294ad5842786e9da9cb4fc70955f53299fa
[ "Apache-2.0" ]
null
null
null
salt/cloud/clouds/nova.py
ronnix/salt
00ffa294ad5842786e9da9cb4fc70955f53299fa
[ "Apache-2.0" ]
null
null
null
salt/cloud/clouds/nova.py
ronnix/salt
00ffa294ad5842786e9da9cb4fc70955f53299fa
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' OpenStack Nova Cloud Module =========================== OpenStack is an open source project that is in use by a number a cloud providers, each of which have their own ways of using it. The OpenStack Nova module for Salt Cloud was bootstrapped from the OpenStack module for Salt Cloud, which...
29.971384
114
0.603747
453daf79492702f10bf12e4fbe2dbfe13cdb2b0d
3,446
py
Python
src/python/m5/util/attrdict.py
caihuayi/gem5
96fce476785a834f102ae69a895e661cf08e47cd
[ "BSD-3-Clause" ]
16
2020-09-24T00:17:36.000Z
2021-08-12T06:11:52.000Z
src/python/m5/util/attrdict.py
caihuayi/gem5
96fce476785a834f102ae69a895e661cf08e47cd
[ "BSD-3-Clause" ]
5
2021-01-27T23:09:06.000Z
2022-01-07T03:19:39.000Z
src/python/m5/util/attrdict.py
caihuayi/gem5
96fce476785a834f102ae69a895e661cf08e47cd
[ "BSD-3-Clause" ]
15
2020-11-18T00:15:28.000Z
2021-12-12T03:18:34.000Z
# Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
34.118812
75
0.686883
467af39b72dc176c445f89f7a8e4ebd5d896fcac
3,026
py
Python
src/py/views.py
sulgong/baegotgupsik_madebybghscircle-mechatronics
47a7a4583383088de8818fb744f0ced0be510248
[ "MIT" ]
null
null
null
src/py/views.py
sulgong/baegotgupsik_madebybghscircle-mechatronics
47a7a4583383088de8818fb744f0ced0be510248
[ "MIT" ]
null
null
null
src/py/views.py
sulgong/baegotgupsik_madebybghscircle-mechatronics
47a7a4583383088de8818fb744f0ced0be510248
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import JsonResponse from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from models import menu as makemenu import requests import bs4 import datetime import json import datetime import sqlite3 def keyboard(request): retur...
29.096154
69
0.551884
68e7670eab51a0be3e231b3a8ea52dd67c137464
7,870
py
Python
dateparser/data/date_translation_data/pl.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
8
2019-11-15T21:00:15.000Z
2021-12-21T22:09:42.000Z
dateparser/data/date_translation_data/pl.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
9
2020-06-05T21:28:57.000Z
2022-02-12T12:30:39.000Z
dateparser/data/date_translation_data/pl.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
21
2019-03-11T04:25:23.000Z
2022-02-03T08:54:33.000Z
# -*- coding: utf-8 -*- info = { "name": "pl", "date_order": "DMY", "january": [ "styczeń", "sty", "stycznia", "Styczeń", "Styczen", "Stycznia", "Styczniu", "Sty" ], "february": [ "luty", "lut", "lutego", ...
18.344988
41
0.29263
c77c2d6c03b4023c53fd92f1263f4a168d61b2ef
500
py
Python
plotly/validators/scatterpolargl/marker/colorbar/_dtick.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/scatterpolargl/marker/colorbar/_dtick.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/scatterpolargl/marker/colorbar/_dtick.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class DtickValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name='dtick', parent_name='scatterpolargl.marker.colorbar', **kwargs ): super(DtickValidator, self).__init__( plotly_name=plotly_...
25
64
0.594
d2745270ecbba9f493ae747d18ac6f0e0e43b082
60
py
Python
ProgramFlow/whileloops.py
BrandonP321/Python-masterclass
fac81fe4f8acfa37076820405d96132f9f23b311
[ "MIT" ]
null
null
null
ProgramFlow/whileloops.py
BrandonP321/Python-masterclass
fac81fe4f8acfa37076820405d96132f9f23b311
[ "MIT" ]
null
null
null
ProgramFlow/whileloops.py
BrandonP321/Python-masterclass
fac81fe4f8acfa37076820405d96132f9f23b311
[ "MIT" ]
null
null
null
i = 0 while i < 10: print(f"i is now {i}") i += 1
15
27
0.416667
3024e6a2fc260262d5dd344ac1919e2cde0fd781
4,221
py
Python
lib/sqlalchemy/pool/dbapi_proxy.py
long2ice/sqlalchemy
a869dc8fe3cd579ed9bab665d215a6c3e3d8a4ca
[ "MIT" ]
null
null
null
lib/sqlalchemy/pool/dbapi_proxy.py
long2ice/sqlalchemy
a869dc8fe3cd579ed9bab665d215a6c3e3d8a4ca
[ "MIT" ]
null
null
null
lib/sqlalchemy/pool/dbapi_proxy.py
long2ice/sqlalchemy
a869dc8fe3cd579ed9bab665d215a6c3e3d8a4ca
[ "MIT" ]
null
null
null
# sqlalchemy/pool/dbapi_proxy.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """DBAPI proxy utility. Provides transparent connection pooling on...
28.52027
77
0.629235
20e011ae90263658d06f1d136c1cfd6b26461c52
13,757
py
Python
cert_core/cert_model/model.py
johnykkwan/cert-core
40fdf04bdc255de1b36ca1f99fae10e6994858a1
[ "MIT" ]
13
2017-03-10T01:03:08.000Z
2021-06-05T14:13:35.000Z
cert_core/cert_model/model.py
johnykkwan/cert-core
40fdf04bdc255de1b36ca1f99fae10e6994858a1
[ "MIT" ]
2
2018-05-09T23:37:21.000Z
2018-05-09T23:49:56.000Z
cert_core/cert_model/model.py
johnykkwan/cert-core
40fdf04bdc255de1b36ca1f99fae10e6994858a1
[ "MIT" ]
14
2017-05-27T16:21:43.000Z
2022-02-12T16:25:21.000Z
""" class ProofType(Enum): merkle_proof_2017 = 0 class SignatureType(Enum): signed_content = 0, signed_transaction = 1 Signature --------- | |-- EmbeddedSignature: signs "contents" directly | |-- TransactionSignature: "contents" are embedded in transaction. Merkle proof for multiple """ from c...
35.274359
123
0.638802
9f683aa6c365822c634f14cbf544746696378c7d
4,730
py
Python
pymatgen/analysis/defects/tests/test_dilute_solution_model.py
frssp/pymatgen
bdd977f065b66191557c7398b31a1571bc541fdb
[ "MIT" ]
5
2019-04-11T20:57:38.000Z
2021-12-01T05:00:42.000Z
pymatgen/analysis/defects/tests/test_dilute_solution_model.py
frssp/pymatgen
bdd977f065b66191557c7398b31a1571bc541fdb
[ "MIT" ]
null
null
null
pymatgen/analysis/defects/tests/test_dilute_solution_model.py
frssp/pymatgen
bdd977f065b66191557c7398b31a1571bc541fdb
[ "MIT" ]
3
2019-10-14T19:47:34.000Z
2020-07-02T08:10:45.000Z
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals import unittest import json import os from monty.json import MontyDecoder from pymatgen.analysis.defects.dilute_solution_model import * import random test_dir = os.pat...
38.145161
84
0.668288
4487651a659c44e3e66f1696b91fcbb8e51211de
1,990
py
Python
src/18-4Sum.py
Jiezhi/myleetcode
b346e94c46da2a3033ebc8ff50e621aa179c4f62
[ "MIT" ]
1
2022-03-03T15:11:48.000Z
2022-03-03T15:11:48.000Z
src/18-4Sum.py
Jiezhi/myleetcode
b346e94c46da2a3033ebc8ff50e621aa179c4f62
[ "MIT" ]
null
null
null
src/18-4Sum.py
Jiezhi/myleetcode
b346e94c46da2a3033ebc8ff50e621aa179c4f62
[ "MIT" ]
2
2022-01-20T22:49:58.000Z
2022-01-20T22:53:13.000Z
#!/usr/bin/env python """ CREATED AT: 2021/9/16 Des: https://leetcode.com/problems/4sum/ GITHUB: https://github.com/Jiezhi/myleetcode Difficulty: Medium """ from typing import List from tool import print_results class Solution: @print_results def fourSum(self, nums: List[int], target: int) -> List[List[int]...
26.533333
79
0.422111
2ab5a110835505045fd41602654f6830faa20549
21,166
py
Python
src/awkward/nplike.py
colesbury/awkward-1.0
d036ab18eb54de8a2571d9f179d315ac8ee22119
[ "BSD-3-Clause" ]
null
null
null
src/awkward/nplike.py
colesbury/awkward-1.0
d036ab18eb54de8a2571d9f179d315ac8ee22119
[ "BSD-3-Clause" ]
null
null
null
src/awkward/nplike.py
colesbury/awkward-1.0
d036ab18eb54de8a2571d9f179d315ac8ee22119
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE # v2: keep this file, but modernize the 'of' function; ptr_lib is gone. import sys import ctypes from collections.abc import Iterable import numpy import awkward as ak def of(*arrays): nplikes = set() for array in ar...
30.065341
121
0.58268
1a3bea6a2afaecddb52274d73eaddde6e36e0fd3
591
py
Python
src/prisma/binaries/download.py
HKGx/prisma-client-py
6d40223b5e797278375e6cf0130ff7ec2c39b19d
[ "Apache-2.0" ]
null
null
null
src/prisma/binaries/download.py
HKGx/prisma-client-py
6d40223b5e797278375e6cf0130ff7ec2c39b19d
[ "Apache-2.0" ]
null
null
null
src/prisma/binaries/download.py
HKGx/prisma-client-py
6d40223b5e797278375e6cf0130ff7ec2c39b19d
[ "Apache-2.0" ]
null
null
null
import gzip import os import shutil from pathlib import Path from stat import S_IXUSR, S_IWUSR, S_IRUSR from .._sync_http import client def download(url: str, to: Path) -> None: to.parent.mkdir(parents=True, exist_ok=True) tar = to.with_suffix('.gz.tmp') client.download(url, tar) # decompress to a ...
22.730769
60
0.671743
7bece37cae2d1d9890e5c67e632bfc0aa8edc5c0
748
py
Python
health/health/urls.py
adlermedrado/find-basic-health-brazil
4cb5e1bd25422a19520e64d5f89cd3235db13e4b
[ "BSD-3-Clause" ]
null
null
null
health/health/urls.py
adlermedrado/find-basic-health-brazil
4cb5e1bd25422a19520e64d5f89cd3235db13e4b
[ "BSD-3-Clause" ]
null
null
null
health/health/urls.py
adlermedrado/find-basic-health-brazil
4cb5e1bd25422a19520e64d5f89cd3235db13e4b
[ "BSD-3-Clause" ]
null
null
null
"""health URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
34
77
0.708556
8198ec9ac475794b29c87ccf4739d647f28a34fe
3,817
py
Python
demos/rdp.py
Yifei-Liu/knee
7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b
[ "MIT" ]
null
null
null
demos/rdp.py
Yifei-Liu/knee
7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b
[ "MIT" ]
null
null
null
demos/rdp.py
Yifei-Liu/knee
7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 __author__ = 'Mário Antunes' __version__ = '0.1' __email__ = 'mariolpantunes@gmail.com' __status__ = 'Development' import os import csv import math import argparse import numpy as np import logging from enum import Enum import knee.rdp as rdp import knee.postprocessing as pp i...
35.342593
158
0.679329
60c5e3bfde1d3814af56c72f9d45b60a56adbbc3
14,717
py
Python
scripts/cromwell/generate_inputs.py
leipzig/gatk-sv
96566cbbaf0f8f9c8452517b38eea1e5dd6ed33a
[ "BSD-3-Clause" ]
76
2020-06-18T21:31:43.000Z
2022-03-02T18:42:58.000Z
scripts/cromwell/generate_inputs.py
iamh2o/gatk-sv
bf3704bd1d705339577530e267cd4d1b2f77a17f
[ "BSD-3-Clause" ]
195
2020-06-22T15:12:28.000Z
2022-03-28T18:06:46.000Z
scripts/cromwell/generate_inputs.py
iamh2o/gatk-sv
bf3704bd1d705339577530e267cd4d1b2f77a17f
[ "BSD-3-Clause" ]
39
2020-07-03T06:47:18.000Z
2022-03-03T03:47:25.000Z
#!/bin/python import json import argparse import sys # Synopsis: # - Generates a Cromwell input file for a given workflow # - Determines the WDL Workflow and populates default parameters using an example input file (JSON) # - Parses Cromwell metadata files generated by any preqrequisite steps to determine input va...
37.930412
198
0.625603
36686ce9c69335e89bdcc487c64bec6373c76deb
7,490
py
Python
experimenter/__init__.py
imfd/TextPerimenter
114ede5ca96edb5d9af49e0c125ebac3eaa61754
[ "BSD-3-Clause" ]
1
2021-06-04T16:47:52.000Z
2021-06-04T16:47:52.000Z
experimenter/__init__.py
imfd/TextPerimenter
114ede5ca96edb5d9af49e0c125ebac3eaa61754
[ "BSD-3-Clause" ]
null
null
null
experimenter/__init__.py
imfd/TextPerimenter
114ede5ca96edb5d9af49e0c125ebac3eaa61754
[ "BSD-3-Clause" ]
null
null
null
import pandas as pd import numpy from functools import reduce from .utils import creator, models_trainer, optimizer, models_tester, models, check_experimenter_input, set_params_to_list, get_set_result, get_dataset #from functions import n_first class Experimenter: """ Clase que abstrae los distintos experim...
36.359223
151
0.593191
81e10ad1603391c9e1e41742b7ee944ba4874ff3
1,222
py
Python
mmdeploy/codebase/mmseg/models/decode_heads/psp_head.py
zhiqwang/mmdeploy
997d111a6f4ca9624ab3b36717748e6ce002037d
[ "Apache-2.0" ]
1
2021-12-30T06:29:46.000Z
2021-12-30T06:29:46.000Z
mmdeploy/codebase/mmseg/models/decode_heads/psp_head.py
zhiqwang/mmdeploy
997d111a6f4ca9624ab3b36717748e6ce002037d
[ "Apache-2.0" ]
null
null
null
mmdeploy/codebase/mmseg/models/decode_heads/psp_head.py
zhiqwang/mmdeploy
997d111a6f4ca9624ab3b36717748e6ce002037d
[ "Apache-2.0" ]
1
2022-02-10T04:31:10.000Z
2022-02-10T04:31:10.000Z
# Copyright (c) OpenMMLab. All rights reserved. from mmseg.ops import resize from mmdeploy.core import FUNCTION_REWRITER from mmdeploy.utils import is_dynamic_shape @FUNCTION_REWRITER.register_rewriter( func_name='mmseg.models.decode_heads.psp_head.PPM.forward') def ppm__forward(ctx, self, x): """Rewrite `fo...
29.804878
69
0.674304
83683421ab59e8fa077a209ede5ece6b9a470789
16,774
py
Python
Lib/site-packages/mysqlx/protobuf/mysqlx_datatypes_pb2.py
Kshitijkrishnadas/haribol
ca45e633baaabaad3bb923f5633340ccf88d996c
[ "bzip2-1.0.6" ]
5
2020-06-03T23:48:28.000Z
2021-12-18T00:11:11.000Z
Lib/site-packages/mysqlx/protobuf/mysqlx_datatypes_pb2.py
Kshitijkrishnadas/haribol
ca45e633baaabaad3bb923f5633340ccf88d996c
[ "bzip2-1.0.6" ]
4
2020-10-03T20:37:55.000Z
2020-10-04T23:11:38.000Z
Lib/site-packages/mysqlx/protobuf/mysqlx_datatypes_pb2.py
Kshitijkrishnadas/haribol
ca45e633baaabaad3bb923f5633340ccf88d996c
[ "bzip2-1.0.6" ]
3
2020-09-18T19:51:40.000Z
2020-12-13T19:28:16.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mysqlx_datatypes.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
34.728778
1,671
0.726243
bcf1242bd3ddfbc87de6928d7bd9a7539a7306cf
35,912
py
Python
clashroyale/royaleapi/client.py
gogaz/clashroyale
d0a333b2f04c0b4f6964e7de8baa1955f7fbae5b
[ "MIT" ]
50
2018-01-05T17:12:11.000Z
2021-11-25T02:37:42.000Z
clashroyale/royaleapi/client.py
gogaz/clashroyale
d0a333b2f04c0b4f6964e7de8baa1955f7fbae5b
[ "MIT" ]
30
2017-12-27T13:36:44.000Z
2021-10-31T19:12:29.000Z
clashroyale/royaleapi/client.py
gogaz/clashroyale
d0a333b2f04c0b4f6964e7de8baa1955f7fbae5b
[ "MIT" ]
33
2017-12-27T14:56:11.000Z
2022-01-20T17:15:43.000Z
import asyncio import logging import json from datetime import datetime from time import time from urllib.parse import urlencode import aiohttp import requests from ..errors import (NotFoundError, NotResponding, NetworkError, ServerError, Unauthorized, NotTrackedError, UnexpectedError, Ratelimit...
37.961945
123
0.578943
86a7345ed2c71248885d20d48ece45b60c4e4a30
3,791
py
Python
src/ClassSender.py
PiotrSzuba/NiDuC
20f714f8ed9dcb8af7133310ed10b728c3ee7a3f
[ "MIT" ]
null
null
null
src/ClassSender.py
PiotrSzuba/NiDuC
20f714f8ed9dcb8af7133310ed10b728c3ee7a3f
[ "MIT" ]
null
null
null
src/ClassSender.py
PiotrSzuba/NiDuC
20f714f8ed9dcb8af7133310ed10b728c3ee7a3f
[ "MIT" ]
null
null
null
from Generator import generateBit import zlib # kod CRC32 class Sender: receiver = None SizeOfWindow = 0 typeOfProtocol = 0 typeOfCode = 0 def __init__(self, receiver): # generoweane danych rand, pozniej przerobic na wczytanie zdjecia ReadFromFile.py self.receiver = receiver ...
32.681034
107
0.561593
46bcee10ebe05539a4c619a1a9e3390b96c03a84
604
py
Python
leetcode/algorithms/maximum-depth-of-binary-tree.py
yasserglez/programming-problems
08cef1186b182430b231ed9772d8f92ec1d2365b
[ "MIT" ]
2
2017-02-17T01:40:27.000Z
2018-04-22T12:47:28.000Z
leetcode/algorithms/maximum-depth-of-binary-tree.py
yasserglez/programming-problems
08cef1186b182430b231ed9772d8f92ec1d2365b
[ "MIT" ]
null
null
null
leetcode/algorithms/maximum-depth-of-binary-tree.py
yasserglez/programming-problems
08cef1186b182430b231ed9772d8f92ec1d2365b
[ "MIT" ]
1
2016-10-14T06:00:42.000Z
2016-10-14T06:00:42.000Z
# https://leetcode.com/problems/maximum-depth-of-binary-tree/ from typing import Optional class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def maxDepth(self, root: Optional[TreeNode]) -> int: ...
20.827586
79
0.634106
b68fc9aae06e1cdc13b2c942eab801e7731b4871
20,118
py
Python
ucsmsdk/mometa/lsmaint/LsmaintAck.py
Curlyfingers/ucsmsdk
982ff2d8faa12ffb88e1f8cba98cf5749f05c93d
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/lsmaint/LsmaintAck.py
Curlyfingers/ucsmsdk
982ff2d8faa12ffb88e1f8cba98cf5749f05c93d
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/lsmaint/LsmaintAck.py
Curlyfingers/ucsmsdk
982ff2d8faa12ffb88e1f8cba98cf5749f05c93d
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for LsmaintAck ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class LsmaintAckConsts: ADMIN_STATE_TRIGGER = "trigger" ADMIN_STATE_TRIGGER_IMMEDIATE = "trigger-immediate" ...
109.934426
3,138
0.734765
adbe57379bc4421f529e860a104289f6341d021e
2,919
py
Python
algos/GLASSO/cuda_ALM.py
GalSha/GLASSO_Framework
fb884d810b2aad2e80124d9d4cf5cd1aaf0d8688
[ "BSD-3-Clause" ]
null
null
null
algos/GLASSO/cuda_ALM.py
GalSha/GLASSO_Framework
fb884d810b2aad2e80124d9d4cf5cd1aaf0d8688
[ "BSD-3-Clause" ]
null
null
null
algos/GLASSO/cuda_ALM.py
GalSha/GLASSO_Framework
fb884d810b2aad2e80124d9d4cf5cd1aaf0d8688
[ "BSD-3-Clause" ]
null
null
null
from numpy import maximum from algos.GLASSO.base import base from utils.common import cp_soft_threshold from utils.common import cp_hard_threshold class cuda_ALM(base): def __init__(self, T, N, lam, N_mu, eta, skip, step_lim): super(cuda_ALM, self).__init__(T, N, lam) import numpy as np se...
33.170455
108
0.515588
a923763570285e2b88767e5dfa5a9058478ade5b
11,178
py
Python
homeassistant/helpers/entity_component.py
bregonesi/home-assistant
33e4d72c776cd24bb27c25f79dfbf2089fba84df
[ "Apache-2.0" ]
1
2020-07-16T17:48:55.000Z
2020-07-16T17:48:55.000Z
homeassistant/helpers/entity_component.py
bregonesi/home-assistant
33e4d72c776cd24bb27c25f79dfbf2089fba84df
[ "Apache-2.0" ]
null
null
null
homeassistant/helpers/entity_component.py
bregonesi/home-assistant
33e4d72c776cd24bb27c25f79dfbf2089fba84df
[ "Apache-2.0" ]
1
2019-10-04T13:26:54.000Z
2019-10-04T13:26:54.000Z
"""Helpers for components that manage entities.""" import asyncio from datetime import timedelta from itertools import chain import logging from homeassistant import config as conf_util from homeassistant.setup import async_prepare_setup_platform from homeassistant.const import ( ATTR_ENTITY_ID, CONF_SCAN_INTE...
33.169139
88
0.636339
32624bd59055c58fb40e3ad22be41485a8db1837
2,572
py
Python
metaqnn/data_loader.py
AISyLab/Reinforcement-Learning-for-SCA
7c9d756ca50e8478e507620fcd14b7f549ab9ae0
[ "MIT" ]
null
null
null
metaqnn/data_loader.py
AISyLab/Reinforcement-Learning-for-SCA
7c9d756ca50e8478e507620fcd14b7f549ab9ae0
[ "MIT" ]
1
2021-09-23T08:20:34.000Z
2021-09-23T08:20:34.000Z
metaqnn/data_loader.py
AISyLab/Reinforcement-Learning-for-SCA
7c9d756ca50e8478e507620fcd14b7f549ab9ae0
[ "MIT" ]
null
null
null
import sys import h5py import numpy as np def load_ches_hd5(database_file, profiling_traces_file, profiling_metadata_file, attack_traces_file, attack_metadata_file): try: in_file = h5py.File(database_file, "r") except ValueError: print(f"Error: can't open H...
40.825397
107
0.686236
51444e51db334572925b88d31c8a222f33ffdcec
9,450
py
Python
spfy/constants.py
alin23/spotifycli
7d91bc36de5d6e39ebd74c61d2975f456bbdf405
[ "Apache-2.0", "MIT" ]
11
2017-12-31T20:43:53.000Z
2021-08-05T21:49:10.000Z
spfy/constants.py
alin23/spfy
7d91bc36de5d6e39ebd74c61d2975f456bbdf405
[ "Apache-2.0", "MIT" ]
null
null
null
spfy/constants.py
alin23/spfy
7d91bc36de5d6e39ebd74c61d2975f456bbdf405
[ "Apache-2.0", "MIT" ]
null
null
null
import re from enum import Enum from .frange import frange class ItemType(Enum): TRACKS = "tracks" TRACK = "track" PLAYLIST = "playlist" ARTIST = "artist" ALBUM = "album" class TimeRange(Enum): SHORT_TERM = "short_term" MEDIUM_TERM = "medium_term" LONG_TERM = "long_term" class Vol...
31.605351
81
0.70127
2c40d3761c2036ffdbad0092c4d27cd57981ae82
19,590
py
Python
pirates/piratesgui/ShardPanel.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
3
2021-02-25T06:38:13.000Z
2022-03-22T07:00:15.000Z
pirates/piratesgui/ShardPanel.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
null
null
null
pirates/piratesgui/ShardPanel.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
1
2021-02-25T06:38:17.000Z
2021-02-25T06:38:17.000Z
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.piratesgui.ShardPanel from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * from pandac.PandaModules i...
55.338983
1,019
0.522001
9caf7597527dec0836b2da0ba6d89d185d643d6b
8,999
py
Python
pts/model/tft/tft_modules.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
647
2020-03-16T16:47:50.000Z
2022-03-31T23:29:40.000Z
pts/model/tft/tft_modules.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
71
2020-03-17T10:58:14.000Z
2022-03-23T08:53:12.000Z
pts/model/tft/tft_modules.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
110
2020-03-16T17:39:45.000Z
2022-03-25T22:26:39.000Z
from typing import List, Optional, Tuple import numpy as np import torch import torch.nn as nn from pts.modules import FeatureEmbedder as BaseFeatureEmbedder class FeatureProjector(nn.Module): def __init__( self, feature_dims: List[int], embedding_dims: List[int], ): super()...
30.299663
88
0.583843