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
73d373f1a1f6efe45c78b84fdcdf6d9fa5b2dd60
124
py
Python
1_kaggle/__init__.py
Jie-Yuan/Competiton-Baseline
aea61bf8e9c3e873e1358db77ab864d58bbb3428
[ "MIT" ]
null
null
null
1_kaggle/__init__.py
Jie-Yuan/Competiton-Baseline
aea61bf8e9c3e873e1358db77ab864d58bbb3428
[ "MIT" ]
null
null
null
1_kaggle/__init__.py
Jie-Yuan/Competiton-Baseline
aea61bf8e9c3e873e1358db77ab864d58bbb3428
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*- coding: utf-8 -*- """ __title__ = '__init__.py' __author__ = 'JieYuan' __mtime__ = '19-1-7' """
13.777778
25
0.596774
6ea833736c23667da9da0e060e146b6d65a8276b
1,472
py
Python
test/test_app.py
NILodio/mach-eight-challenge
fbb7c9337f315d2d3040325c28804f6c6650c3a4
[ "MIT" ]
null
null
null
test/test_app.py
NILodio/mach-eight-challenge
fbb7c9337f315d2d3040325c28804f6c6650c3a4
[ "MIT" ]
null
null
null
test/test_app.py
NILodio/mach-eight-challenge
fbb7c9337f315d2d3040325c28804f6c6650c3a4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Danilo Diaz Valencia # @Date: 2022-02-20 11:01:57 # @Last Modified by: Danilo Diaz Valencia # @Last Modified time: 2022-02-20 11:52:18 from importlib.resources import path import re from unittest import result from fastapi.testclient import TestClient from service.main import app ...
29.44
71
0.682065
52ac0e3094f60c40e0e352080cab3af0016c5249
1,708
py
Python
app/core/migrations/0001_initial.py
GilbertoMarcial/hawk-app-api
f60a0bf3deb1b3596a14853776bf5646cdcf7bf5
[ "Unlicense" ]
null
null
null
app/core/migrations/0001_initial.py
GilbertoMarcial/hawk-app-api
f60a0bf3deb1b3596a14853776bf5646cdcf7bf5
[ "Unlicense" ]
null
null
null
app/core/migrations/0001_initial.py
GilbertoMarcial/hawk-app-api
f60a0bf3deb1b3596a14853776bf5646cdcf7bf5
[ "Unlicense" ]
null
null
null
# Generated by Django 2.1.7 on 2019-02-21 17:26 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
50.235294
266
0.638759
14c99d48819b5b79e66d6c6f2183928ece44b382
1,628
py
Python
aliyun-python-sdk-voicenavigator/aliyunsdkvoicenavigator/request/v20180612/EndDialogueRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
1
2021-03-08T02:59:17.000Z
2021-03-08T02:59:17.000Z
aliyun-python-sdk-voicenavigator/aliyunsdkvoicenavigator/request/v20180612/EndDialogueRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-voicenavigator/aliyunsdkvoicenavigator/request/v20180612/EndDialogueRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "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 u...
37.860465
85
0.77457
e222a99790444db2a34a1a0bc4938b2dbd2cdc8c
1,258
py
Python
model_zoo/models/python/indexToStringPrototextFix.py
jonesholger/lbann
3214f189a1438565d695542e076c4fa8e7332d34
[ "Apache-2.0" ]
194
2016-07-19T15:40:21.000Z
2022-03-19T08:06:10.000Z
model_zoo/models/python/indexToStringPrototextFix.py
jonesholger/lbann
3214f189a1438565d695542e076c4fa8e7332d34
[ "Apache-2.0" ]
1,021
2016-07-19T12:56:31.000Z
2022-03-29T00:41:47.000Z
model_zoo/models/python/indexToStringPrototextFix.py
jonesholger/lbann
3214f189a1438565d695542e076c4fa8e7332d34
[ "Apache-2.0" ]
74
2016-07-28T18:24:00.000Z
2022-01-24T19:41:04.000Z
#!/usr/bin/python from sys import * usage = ''' usage: %s input_fn where: input_fn is a model_*.prototext file name function: changes 'index' to 'name' and puts quotes around the index and name fields (thereby converting them from ints to strings) output: input_fn is saved to input_fn.bak and a new input_fn ...
26.765957
81
0.579491
8ddd6c3171eac64d790eb1fcb8b1948c9494e4e5
5,140
py
Python
aftercovid/preprocess/ts.py
sdpython/covidsim
765d43ac29831f1a630ef5e187cff10f3ddc5cf1
[ "MIT" ]
null
null
null
aftercovid/preprocess/ts.py
sdpython/covidsim
765d43ac29831f1a630ef5e187cff10f3ddc5cf1
[ "MIT" ]
9
2020-05-03T09:39:21.000Z
2021-06-05T06:29:01.000Z
aftercovid/preprocess/ts.py
sdpython/covidsim
765d43ac29831f1a630ef5e187cff10f3ddc5cf1
[ "MIT" ]
1
2020-12-07T02:11:55.000Z
2020-12-07T02:11:55.000Z
""" Preprocesses timeseries about COVID. """ import numpy def ts_remove_decreasing_values(series): """ Returns a series with no decreasing values (only growing). Data are sometimes normalized and show negative values but the past remains unchanged. This functions decreases past values until the se...
31.728395
77
0.569066
81993b25e16d5df5548b0fea5f8083806cd90bc1
6,541
py
Python
scripts/plot_empirical_transient_response.py
turingbirds/howland_vccs
b4d69476f151a05d830396e152d06a93b6bc0e3f
[ "Apache-2.0" ]
1
2022-03-26T17:16:58.000Z
2022-03-26T17:16:58.000Z
scripts/plot_empirical_transient_response.py
turingbirds/howland_vccs
b4d69476f151a05d830396e152d06a93b6bc0e3f
[ "Apache-2.0" ]
null
null
null
scripts/plot_empirical_transient_response.py
turingbirds/howland_vccs
b4d69476f151a05d830396e152d06a93b6bc0e3f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib as mpl import matplotlib.font_manager as fm mpl.rcParams['axes.unicode_minus'] = False import matplotlib.ticker as plticker from matplotlib.ticker import FormatStrFormatter import matplotlib.pyplot as plt import numpy as np import scipy.stats import os i...
40.88125
131
0.736738
35139502237d11e193c2b41f7983d0dc346d561f
24,312
py
Python
sympy/concrete/summations.py
toolforger/sympy
adc391f00e1e35d27925efb0314ec8abde9d255d
[ "BSD-3-Clause" ]
null
null
null
sympy/concrete/summations.py
toolforger/sympy
adc391f00e1e35d27925efb0314ec8abde9d255d
[ "BSD-3-Clause" ]
null
null
null
sympy/concrete/summations.py
toolforger/sympy
adc391f00e1e35d27925efb0314ec8abde9d255d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function, division from sympy.concrete.expr_with_limits import AddWithLimits from sympy.concrete.expr_with_intlimits import ExprWithIntLimits from sympy.core.function import Derivative from sympy.core.relational import Eq from sympy.core.singleton import S from sympy.core.symbol import (Du...
31.249357
94
0.517975
dccb11e9c382e701aa2d88ce1200233241a761bf
2,743
py
Python
lista_peso.py
rodrigo1708/scriptsComPython
1655451d7fbb8fa2899687de62df70e36ac97863
[ "MIT" ]
null
null
null
lista_peso.py
rodrigo1708/scriptsComPython
1655451d7fbb8fa2899687de62df70e36ac97863
[ "MIT" ]
null
null
null
lista_peso.py
rodrigo1708/scriptsComPython
1655451d7fbb8fa2899687de62df70e36ac97863
[ "MIT" ]
null
null
null
# PROGRAMA QUE ANALISA DADOS DE PESO INCLUÍDOS pessoas = [] dados = [] # PRIMEIRA MANEIRA (VERIFICANDO PESSOAS COM MAIS DE 80 KG E MENOS DE 80 KG: def peso(): maiorPeso = [] maisLeve = [] contmp = contml = 0 while True: dados.append(str(input("Digite o nome: ")).strip()) dados.append(...
39.185714
120
0.581116
0ee0dfb677067c65757031f1e5c7d9fd0ea52515
694
py
Python
cride/users/admin.py
alejandroduquec/cride
daf0afcf2f5ebc06dc9080782158c134110fb0d6
[ "MIT" ]
2
2019-05-25T13:43:00.000Z
2019-06-26T03:09:42.000Z
cride/users/admin.py
alejandroduquec/cride
daf0afcf2f5ebc06dc9080782158c134110fb0d6
[ "MIT" ]
4
2021-06-08T19:49:43.000Z
2022-03-11T23:45:35.000Z
cride/users/admin.py
aleducode/cride
daf0afcf2f5ebc06dc9080782158c134110fb0d6
[ "MIT" ]
null
null
null
"""User models admin""" #Django from django.contrib import admin from django.contrib.auth.admin import UserAdmin #Models from cride.users.models import User, Profile class CustomUserAdmin(UserAdmin): """User model admin""" list_display=('email','username','first_name','last_name','is_staff','is_client') ...
31.545455
89
0.744957
a7ca7da7f154ceb59188261064ea789dbcdf7ac3
2,511
py
Python
clowder/cli/save.py
JrGoodle/clowder
864afacfc7122e937f7087e233c61d05fd007af2
[ "MIT" ]
12
2016-02-12T02:37:24.000Z
2021-01-04T05:14:12.000Z
clowder/cli/save.py
JrGoodle/clowder
864afacfc7122e937f7087e233c61d05fd007af2
[ "MIT" ]
370
2015-07-06T22:59:08.000Z
2021-10-01T14:58:17.000Z
clowder/cli/save.py
JrGoodle/clowder
864afacfc7122e937f7087e233c61d05fd007af2
[ "MIT" ]
3
2015-10-22T18:45:31.000Z
2018-10-16T15:30:30.000Z
"""Clowder command line save controller .. codeauthor:: Joe DeCapo <joe@polka.cat> """ import argparse import clowder.util.formatting as fmt from clowder.clowder_controller import CLOWDER_CONTROLLER, print_clowder_name, valid_clowder_yaml_required from clowder.environment import clowder_repo_required, ENVIRONMENT f...
36.926471
106
0.762644
9f057d02a14e2b2d19bb5b5c063a1489d648d4ff
849
py
Python
src/modules/catalog/tests/domain/test_entities.py
Ermlab/python-ddd
a3e1cc69cad45e901c820688d7b42173bb3e1a1d
[ "MIT" ]
308
2019-03-04T12:52:57.000Z
2022-03-16T10:33:25.000Z
src/modules/catalog/tests/domain/test_entities.py
Ermlab/python-ddd
a3e1cc69cad45e901c820688d7b42173bb3e1a1d
[ "MIT" ]
5
2018-12-07T08:14:52.000Z
2021-06-17T12:22:19.000Z
src/modules/catalog/tests/domain/test_entities.py
Ermlab/python-ddd
a3e1cc69cad45e901c820688d7b42173bb3e1a1d
[ "MIT" ]
58
2019-06-15T22:56:15.000Z
2022-03-01T02:00:17.000Z
import pytest from modules.catalog.domain.entities import Seller, Listing from modules.catalog.domain.value_objects import ListingStatus from seedwork.domain.exceptions import BusinessRuleValidationException def test_seller_publishes_listing_happy_path(): seller = Seller() listing = Listing( title="Ti...
26.53125
70
0.718492
4b891d586e4dddff23cc5ea9ffd3cc2614a310b2
915
py
Python
mongoengine/base/common.py
Rippling/mongoengine
c3b6fa6ffdfe05fcf6f49857c1a89fee0175a05f
[ "MIT" ]
null
null
null
mongoengine/base/common.py
Rippling/mongoengine
c3b6fa6ffdfe05fcf6f49857c1a89fee0175a05f
[ "MIT" ]
28
2016-11-30T03:15:18.000Z
2022-02-25T15:57:02.000Z
mongoengine/base/common.py
Rippling/mongoengine
c3b6fa6ffdfe05fcf6f49857c1a89fee0175a05f
[ "MIT" ]
1
2021-11-10T05:33:18.000Z
2021-11-10T05:33:18.000Z
from __future__ import absolute_import from mongoengine.errors import NotRegistered __all__ = ('ALLOW_INHERITANCE', 'get_document', '_document_registry') ALLOW_INHERITANCE = False _document_registry = {} def get_document(name): doc = _document_registry.get(name, None) if not doc: # Possible old sty...
32.678571
75
0.64153
3a33d62e3f46e3935e9ba7dac4bedc4fc502ba05
1,395
py
Python
Aula 27/1exercicio27.py
ohanamirella/TrabalhosPython
453a97848654b0391d0d717bf102f6c466f79b3d
[ "MIT" ]
1
2020-03-09T13:38:55.000Z
2020-03-09T13:38:55.000Z
Aula 27/1exercicio27.py
ohanamirella/TrabalhosPython
453a97848654b0391d0d717bf102f6c466f79b3d
[ "MIT" ]
null
null
null
Aula 27/1exercicio27.py
ohanamirella/TrabalhosPython
453a97848654b0391d0d717bf102f6c466f79b3d
[ "MIT" ]
null
null
null
# Aula 21 - 16-12-2019 #Funções para listas lista1 = lista_simples_int(5,100) lista2 = lista_simples_int(5,75) lista3 = lista_simples_int(5,70) # 1) Com as listas aleatórias (lista1,lista2,lista3) e usando as funções para listas, # f-string, responda as seguintes questões: print(len(lista1)) print(len(lista2)) pri...
28.469388
110
0.724731
faebae915e4ca377f85c68cf4e7acc536d588dcb
3,297
py
Python
http/http_server.py
oleg-koval/esp_docker
2cd735ec0969dd0ba2ddb2f70fdf2f8db40beb41
[ "Apache-2.0" ]
2
2019-08-06T21:52:19.000Z
2020-12-05T01:02:54.000Z
http/http_server.py
oleg-koval/esp_docker
2cd735ec0969dd0ba2ddb2f70fdf2f8db40beb41
[ "Apache-2.0" ]
2
2018-10-04T06:12:18.000Z
2019-11-02T16:45:11.000Z
http/http_server.py
oleg-koval/esp_docker
2cd735ec0969dd0ba2ddb2f70fdf2f8db40beb41
[ "Apache-2.0" ]
1
2019-08-27T11:27:12.000Z
2019-08-27T11:27:12.000Z
from flask import Flask, request, abort from flask_restplus import Api, Resource, fields from functools import wraps import logging import pprint import base64 from google.oauth2 import id_token from google.auth import transport import google.auth.transport.requests app = Flask(__name__) app.config['DEBUG'] = True ...
27.02459
82
0.614195
4b26c1921363d777e1eb48ce737180a172ddc667
1,523
py
Python
kitefly/model/trigger.py
ccarpita/kitefly
3ea7e55743ec2dbe099f16282d22c8368b4292bc
[ "MIT" ]
null
null
null
kitefly/model/trigger.py
ccarpita/kitefly
3ea7e55743ec2dbe099f16282d22c8368b4292bc
[ "MIT" ]
null
null
null
kitefly/model/trigger.py
ccarpita/kitefly
3ea7e55743ec2dbe099f16282d22c8368b4292bc
[ "MIT" ]
null
null
null
from typing import Any, Dict, Mapping, Optional from .step import Step class BuildAttributes: """ Attributes used when triggering a build. """ def __init__( self, message: str = "", commit: str = "", branch: str = "", meta_data: Optional[Mapping[str, str]] = None, env: Optional[Mapping...
22.397059
56
0.600788
09a748177089be6b41704c4cd9f8464bcc56e024
64
py
Python
src/zope/app/localpermission/__init__.py
zopefoundation/zope.app.localpermission
ce055fb047cb41623e041aaf447fa4dbbbcaf5e4
[ "ZPL-2.1" ]
null
null
null
src/zope/app/localpermission/__init__.py
zopefoundation/zope.app.localpermission
ce055fb047cb41623e041aaf447fa4dbbbcaf5e4
[ "ZPL-2.1" ]
4
2017-04-22T19:50:43.000Z
2021-02-02T07:30:01.000Z
src/zope/app/localpermission/__init__.py
zopefoundation/zope.app.localpermission
ce055fb047cb41623e041aaf447fa4dbbbcaf5e4
[ "ZPL-2.1" ]
1
2015-04-03T07:54:12.000Z
2015-04-03T07:54:12.000Z
from zope.app.localpermission.permission import LocalPermission
32
63
0.890625
dcd1c12dc133a778f6eaa526a8c3c53b4fb431f1
1,234
py
Python
data/p4VQE/R4/benchmark/startPyquil607.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startPyquil607.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startPyquil607.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=13 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(1) # number=2 pr...
23.283019
64
0.600486
1dbf7ba63a62d15447ec38bb5c018f6d47a53a40
2,594
py
Python
tests/core/data/io/test_input.py
Actis92/lightning-flash
49972268cfc0f95f1bd2b8fbf25036970cc44b59
[ "Apache-2.0" ]
1,457
2021-01-28T20:40:16.000Z
2022-03-31T06:22:05.000Z
tests/core/data/io/test_input.py
Actis92/lightning-flash
49972268cfc0f95f1bd2b8fbf25036970cc44b59
[ "Apache-2.0" ]
1,123
2021-01-28T20:37:56.000Z
2022-03-31T19:34:44.000Z
tests/core/data/io/test_input.py
Actis92/lightning-flash
49972268cfc0f95f1bd2b8fbf25036970cc44b59
[ "Apache-2.0" ]
170
2021-01-29T00:41:39.000Z
2022-03-29T16:09:52.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
30.880952
76
0.681958
8490534b2a7a7e29f0c6da7ffff2de095282cd3c
906
py
Python
project3/solutions/problem6_unsorted_integer_array.py
ebitsdev/data-structures-algo-udacity
df0db1a93f01ace5e10f77947775f161d1531b15
[ "MIT" ]
null
null
null
project3/solutions/problem6_unsorted_integer_array.py
ebitsdev/data-structures-algo-udacity
df0db1a93f01ace5e10f77947775f161d1531b15
[ "MIT" ]
null
null
null
project3/solutions/problem6_unsorted_integer_array.py
ebitsdev/data-structures-algo-udacity
df0db1a93f01ace5e10f77947775f161d1531b15
[ "MIT" ]
null
null
null
def get_min_max(ints): # Let us setup initial variables for the minimum and maximum values minval = ints[0] maxval = ints[0] for intnum in ints: if intnum < minval: minval = intnum elif intnum > maxval: maxval = intnum return minval, maxval ## Example Test C...
29.225806
75
0.601545
114ae2d4a908382f22540cf77fd76b68e6ec84a8
543
py
Python
var/spack/repos/builtin.mock/packages/externaltool/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin.mock/packages/externaltool/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin.mock/packages/externaltool/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Externaltool(Package): homepage = "http://somewhere.com" url = "http://somewhere....
30.166667
73
0.72744
f2004ef59938cfc7a05dfdcece1652ba85b762af
2,096
py
Python
example.py
NervosBeijingCommunity/python-blkmaker-btc
3c60b235a780c4555b8158d9a52bf386cbf12b12
[ "MIT" ]
null
null
null
example.py
NervosBeijingCommunity/python-blkmaker-btc
3c60b235a780c4555b8158d9a52bf386cbf12b12
[ "MIT" ]
null
null
null
example.py
NervosBeijingCommunity/python-blkmaker-btc
3c60b235a780c4555b8158d9a52bf386cbf12b12
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright 2012-2014 Luke Dashjr # # This program is free software; you can redistribute it and/or modify it # under the terms of the standard MIT license. See COPYING for more details. from blkmaker import _dblsha256 import blktemplate import json import struct import sys # This test_input data i...
26.531646
289
0.733302
3adeb63a3164cb2cf7c4df6715ca7d9a72174d9a
3,199
py
Python
projects/utils/hyperparameter_tuner/hyperparameter_tuner_demo.py
ad-daniel/opendr
cc71138ae22ec39b186960ff98c74bc2cdca3623
[ "Apache-2.0" ]
217
2020-04-10T16:39:36.000Z
2022-03-30T15:39:04.000Z
projects/utils/hyperparameter_tuner/hyperparameter_tuner_demo.py
ad-daniel/opendr
cc71138ae22ec39b186960ff98c74bc2cdca3623
[ "Apache-2.0" ]
46
2021-12-16T13:23:04.000Z
2022-03-30T11:36:29.000Z
projects/utils/hyperparameter_tuner/hyperparameter_tuner_demo.py
ad-daniel/opendr
cc71138ae22ec39b186960ff98c74bc2cdca3623
[ "Apache-2.0" ]
29
2021-12-16T09:26:13.000Z
2022-03-29T15:19:18.000Z
# Copyright 2020-2022 OpenDR European Project # # 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 agree...
35.544444
120
0.700219
58ceb4f326934388faf1c649bcd36d1eeae9485f
1,270
py
Python
invenio_rdm_records/resources/__init__.py
kprzerwa/invenio-rdm-records
d5919b5f1b5f453074fcb2b63929a60bfcb240ed
[ "MIT" ]
null
null
null
invenio_rdm_records/resources/__init__.py
kprzerwa/invenio-rdm-records
d5919b5f1b5f453074fcb2b63929a60bfcb240ed
[ "MIT" ]
null
null
null
invenio_rdm_records/resources/__init__.py
kprzerwa/invenio-rdm-records
d5919b5f1b5f453074fcb2b63929a60bfcb240ed
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # # Invenio-RDM-Records is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Invenio RDM module to create REST APIs.""" from .resources import BibliographicDraftActionResource, \ ...
39.6875
79
0.807874
505110bc46cf56f2b0290c892fdad0043fa5d01b
166,453
py
Python
src/robotide/lib/robot/libraries/BuiltIn.py
adrianyorke/RIDE
b7db7fb376276add0cb1d7b0ee9cf89500d0d26d
[ "ECL-2.0", "Apache-2.0" ]
775
2015-01-12T06:54:09.000Z
2022-03-25T05:18:05.000Z
src/robotide/lib/robot/libraries/BuiltIn.py
adrianyorke/RIDE
b7db7fb376276add0cb1d7b0ee9cf89500d0d26d
[ "ECL-2.0", "Apache-2.0" ]
2,191
2015-05-19T16:49:09.000Z
2022-03-28T21:38:34.000Z
src/robotide/lib/robot/libraries/BuiltIn.py
adrianyorke/RIDE
b7db7fb376276add0cb1d7b0ee9cf89500d0d26d
[ "ECL-2.0", "Apache-2.0" ]
382
2015-01-24T08:41:44.000Z
2022-03-13T10:14:20.000Z
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
45.93074
127
0.611266
58b53a4afbd73955710c1e3dcc5cf849b1350133
35,243
py
Python
custom/champ/tests/test_pva_chart.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2020-05-05T13:10:01.000Z
2020-05-05T13:10:01.000Z
custom/champ/tests/test_pva_chart.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2019-12-09T14:00:14.000Z
2019-12-09T14:00:14.000Z
custom/champ/tests/test_pva_chart.py
MaciejChoromanski/commcare-hq
fd7f65362d56d73b75a2c20d2afeabbc70876867
[ "BSD-3-Clause" ]
5
2015-11-30T13:12:45.000Z
2019-07-01T19:27:07.000Z
from __future__ import absolute_import from __future__ import unicode_literals import json import mock from custom.champ.tests.utils import ChampTestCase from custom.champ.views import PrevisionVsAchievementsView from django.core.urlresolvers import reverse class TestPVAChart(ChampTestCase): def setUp(self): ...
34.998014
101
0.57322
0c2a04e53c53c0de2305870a193510892dfd2ccc
963
py
Python
project1/schema.py
Harvard-Crimson-Technology-Comp/f19-001-chaotea
1e6b8f54f0cd6e275e8722371e6d20edb361827b
[ "MIT" ]
1
2019-09-22T16:38:08.000Z
2019-09-22T16:38:08.000Z
project1/schema.py
Harvard-Crimson-Technology-Comp/f19-001-chaotea
1e6b8f54f0cd6e275e8722371e6d20edb361827b
[ "MIT" ]
8
2020-06-05T23:24:08.000Z
2022-02-10T11:19:10.000Z
project1/schema.py
Harvard-Crimson-Technology-Comp/f19-001-wilson-lama
8e6edb7e7fc91de2e62c75735e9c5569cec3c4df
[ "MIT" ]
2
2019-09-22T03:57:50.000Z
2019-09-28T22:03:31.000Z
import graphene import project1.api.schema all_schemas = [ project1.api.schema ] # You won't have to modify this here or in the real codebase ;) all_queries = [] all_types = [] for schema in all_schemas: if hasattr(schema, 'Query'): all_queries.append(schema.Query) for k, v in schema.__dict__.it...
29.181818
87
0.680166
5a93ef3d16daf3fc1b9011d64b1a82a4eb0a5035
47,763
py
Python
RNS/Link.py
markqvist/Reticulum
58f43b163ece25255dab8b93ed3e76e2f1892abd
[ "MIT" ]
254
2018-04-04T13:32:40.000Z
2022-03-31T23:54:17.000Z
RNS/Link.py
markqvist/Reticulum
58f43b163ece25255dab8b93ed3e76e2f1892abd
[ "MIT" ]
15
2019-12-04T17:25:48.000Z
2022-03-31T23:03:04.000Z
RNS/Link.py
markqvist/Reticulum
58f43b163ece25255dab8b93ed3e76e2f1892abd
[ "MIT" ]
18
2019-11-02T21:10:12.000Z
2022-03-29T03:38:52.000Z
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey, Ed25519PublicKey from cryptography.hazmat.primitives.asymmetric.x25519 impo...
44.847887
279
0.595628
6df6942459800f711f6cdda98f08cd07ab6e7e95
456
py
Python
math_ops_advanced_function/tf_invert_permutation.py
Asurada2015/TFAPI_translation
1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf
[ "Apache-2.0" ]
7
2017-10-19T13:59:24.000Z
2019-11-26T03:40:08.000Z
math_ops_advanced_function/tf_invert_permutation.py
Asurada2015/TFAPI_translation
1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf
[ "Apache-2.0" ]
null
null
null
math_ops_advanced_function/tf_invert_permutation.py
Asurada2015/TFAPI_translation
1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf
[ "Apache-2.0" ]
5
2018-08-22T02:57:03.000Z
2020-03-05T07:14:21.000Z
import tensorflow as tf """tf.invert_permutation(x, name=None) 计算张量的逆排序 功能:转换坐标与值。`y[x[i]] = i for i in [0, 1, ..., len(x) - 1]` (for i in range (lens(x))。""" a = tf.constant([3, 4, 0, 2, 1]) # b = tf.constant([4, 5, 7, 9]) z = tf.invert_permutation(a) # z1 = tf.invert_permutation(b) sess = tf.Session() print(sess.r...
25.333333
87
0.576754
dd4edd7866af4e3ba2dc8f583bb165f21c8f228e
2,111
py
Python
main.py
HelloYeew/universal-youtube-python
35c94aff5a6cf0baede9ed33c56e60a6df7bc09c
[ "MIT" ]
null
null
null
main.py
HelloYeew/universal-youtube-python
35c94aff5a6cf0baede9ed33c56e60a6df7bc09c
[ "MIT" ]
null
null
null
main.py
HelloYeew/universal-youtube-python
35c94aff5a6cf0baede9ed33c56e60a6df7bc09c
[ "MIT" ]
null
null
null
import sys from check import * from for_dev import * import getpass print("Booting program...") print() # check internet connection print("Checking internet connection with YouTube...") connection = check_internet() if connection == True: print("Connection complete!") else: print("Connection failed! Please ch...
26.721519
88
0.547608
356d7925421f3c121d34459bd854dd1e980838a9
735
py
Python
examples/core/idapythonrc.py
offlineJ/idapython
30c721083d580d81dd95ea8a3d79306f94c7ba3f
[ "BSD-3-Clause" ]
null
null
null
examples/core/idapythonrc.py
offlineJ/idapython
30c721083d580d81dd95ea8a3d79306f94c7ba3f
[ "BSD-3-Clause" ]
null
null
null
examples/core/idapythonrc.py
offlineJ/idapython
30c721083d580d81dd95ea8a3d79306f94c7ba3f
[ "BSD-3-Clause" ]
null
null
null
#--------------------------------------------------------------------- # Example user initialisation script: idapythonrc.py # # Place this script to ~/.idapro/ or to # %APPDATA%\Hex-Rays\IDA Pro #--------------------------------------------------------------------- # Add your favourite script to ScriptBox for easy acc...
33.409091
70
0.635374
73543a68edb18afcff19d4b062811153b0a3c55a
1,817
py
Python
regression/solution.py
valerydec17/DataScience
fae9699b715003cb0b5e8fa84f6374d8aaaf225c
[ "MIT" ]
null
null
null
regression/solution.py
valerydec17/DataScience
fae9699b715003cb0b5e8fa84f6374d8aaaf225c
[ "MIT" ]
null
null
null
regression/solution.py
valerydec17/DataScience
fae9699b715003cb0b5e8fa84f6374d8aaaf225c
[ "MIT" ]
null
null
null
# Polynomial Regression: Office Prices # https://www.hackerrank.com/challenges/predicting-office-space-price/problem?h_r=next-challenge&h_v=zen # Enter your code here. Read input from STDIN. Print output to STDOUT import sys, re from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import Line...
31.327586
153
0.724271
c79d9b46428669c7c7f7e169dc885134b4021d22
396
py
Python
yolox/data/datasets/my_classes.py
1298998/YOLOX-train-your-data
be50386e5cab7614924796bf6b6bde581d14d4aa
[ "Apache-2.0" ]
17
2021-08-13T05:57:08.000Z
2022-02-26T10:44:09.000Z
yolox/data/datasets/my_classes.py
1298998/YOLOX-train-your-data
be50386e5cab7614924796bf6b6bde581d14d4aa
[ "Apache-2.0" ]
2
2021-08-25T02:41:46.000Z
2021-12-05T02:39:05.000Z
yolox/data/datasets/my_classes.py
1298998/YOLOX-train-your-data
be50386e5cab7614924796bf6b6bde581d14d4aa
[ "Apache-2.0" ]
9
2021-08-17T02:22:55.000Z
2022-02-28T02:10:21.000Z
MY_CLASSES = ( 'short_sleeved_shirt', # 0 ~ 38 id 'long_sleeved_shirt', 'short_sleeved_outwear', 'long_sleeved_outwear', 'vest', 'sling', 'shorts', 'trousers', 'skirt', 'short_sleeved_dress','long_sleeved_dress', 'vest_dress', 'sling_dress', 'a0','a1','a2','a3','a4','a5','a6','a7','a8','a9','a10','a11','a12...
24.75
139
0.616162
d30b1fc97d6e13f07b9a1b9a2d4e8125b4914702
14,170
py
Python
covid_odeint.py
Nexus-iR-D-Laboratory/bayes_covid_model
a79236d43f1e043a9717182ce5d6cd8d34f83acf
[ "MIT" ]
null
null
null
covid_odeint.py
Nexus-iR-D-Laboratory/bayes_covid_model
a79236d43f1e043a9717182ce5d6cd8d34f83acf
[ "MIT" ]
null
null
null
covid_odeint.py
Nexus-iR-D-Laboratory/bayes_covid_model
a79236d43f1e043a9717182ce5d6cd8d34f83acf
[ "MIT" ]
null
null
null
import scipy as sp import numpy as np import arviz as az import matplotlib.pyplot as plt plt.style.use('seaborn-darkgrid') import sub_units.load_data as load_data from scipy.integrate import odeint from time import time as get_time import datetime from scipy.optimize import Bounds import matplotlib.dates as mdates impo...
41.676471
188
0.645166
f43e1c515b2282eaea7a149f0d3060d5051baed2
1,482
py
Python
glue_vispy_viewers/common/viewer_options.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
null
null
null
glue_vispy_viewers/common/viewer_options.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
null
null
null
glue_vispy_viewers/common/viewer_options.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
1
2017-09-29T01:24:47.000Z
2017-09-29T01:24:47.000Z
import os from qtpy import QtWidgets from glue.external.echo.qt import autoconnect_callbacks_to_qt from glue.utils.qt import load_ui __all__ = ["VispyOptionsWidget"] class VispyOptionsWidget(QtWidgets.QWidget): def __init__(self, viewer_state=None, session=None, parent=None): super(VispyOptionsWidge...
35.285714
94
0.62753
a215ffc33f47d483cd77e053db2b66b5c52feb01
5,518
py
Python
p2d/problems.py
cubercsl/polygon2domjudge
7760fb6fb45e3024f85d72d64b41d44db58eb4d3
[ "MIT" ]
8
2021-04-18T14:03:38.000Z
2021-11-18T11:54:34.000Z
p2d/problems.py
cubercsl/polygon2domjudge
7760fb6fb45e3024f85d72d64b41d44db58eb4d3
[ "MIT" ]
null
null
null
p2d/problems.py
cubercsl/polygon2domjudge
7760fb6fb45e3024f85d72d64b41d44db58eb4d3
[ "MIT" ]
null
null
null
import re from . import config class ProblemConfigError(Exception): """Exception class for errors in problem configuration.""" pass class Problem(object): """ Class representing a single problem. """ __KEYS = ['problem_name', 'probid', 'color', 'samples', 'validation', 'validator_flags'] ...
42.122137
126
0.577383
365a524708384b8d4d5c7469355cd5c98998c4d0
974
py
Python
tests/test_utils.py
maxmahlke/rocks
f75980e7d6b9c63037de9d1a16d5daea80f49a49
[ "MIT" ]
2
2022-01-05T13:09:20.000Z
2022-03-10T22:17:47.000Z
tests/test_utils.py
maxmahlke/rocks
f75980e7d6b9c63037de9d1a16d5daea80f49a49
[ "MIT" ]
4
2020-11-12T14:07:08.000Z
2022-03-23T15:32:33.000Z
tests/test_utils.py
maxmahlke/rocks
f75980e7d6b9c63037de9d1a16d5daea80f49a49
[ "MIT" ]
null
null
null
#! /usr/bin/env python """Test suit for rocks.utils module. """ import json import os import pickle import warnings import pandas as pd import pickle import pytest import requests import rocks # def test_create_index(monkeypatch): # """Tests index creation routine with cached file and no missing entries.""" #...
21.173913
81
0.660164
4ef6aa5ce1e4bbc64c3edaad0bcdd35f02a1d0b1
330
py
Python
win10_show_notification.py
OSAMAMOHAMED1234/python_projects
fb4bc7356847c3f46df690a9386cf970377a6f7c
[ "MIT" ]
null
null
null
win10_show_notification.py
OSAMAMOHAMED1234/python_projects
fb4bc7356847c3f46df690a9386cf970377a6f7c
[ "MIT" ]
null
null
null
win10_show_notification.py
OSAMAMOHAMED1234/python_projects
fb4bc7356847c3f46df690a9386cf970377a6f7c
[ "MIT" ]
null
null
null
from win10toast import ToastNotifier toaster = ToastNotifier() toaster.show_toast( 'Notification Title1', 'Notification Body', icon_path=None, duration=10, threaded=True ) from plyer import notification notification.notify( title='Notification Title2', message='Notification Body', app_icon=None, tim...
18.333333
36
0.760606
4755d0aa2de53836b965cc1d7d4b89bc9596258f
2,235
py
Python
tests/agents_tests/test_dpp.py
mmilk1231/chainerrl
d351f9f5d1bb1dbaf98c8c629312884eb940de7a
[ "MIT" ]
2
2020-05-20T06:15:20.000Z
2020-05-20T06:15:27.000Z
tests/agents_tests/test_dpp.py
WhenTheyCry96/chainerrl
0f32aae2855dbb6288ae628be6271739ced6c42c
[ "MIT" ]
null
null
null
tests/agents_tests/test_dpp.py
WhenTheyCry96/chainerrl
0f32aae2855dbb6288ae628be6271739ced6c42c
[ "MIT" ]
1
2019-08-08T19:13:53.000Z
2019-08-08T19:13:53.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import * # NOQA from future import standard_library standard_library.install_aliases() # NOQA from chainer import testing import basetest_dqn_like as bas...
30.616438
71
0.697092
4702fd97dbefd96dfca465347c52a5196fb3720d
6,203
py
Python
TraderDelegate.py
tianhm/pq
5ab132c27d7fc8366ada3ca04b9fd1822b3c2d80
[ "MIT" ]
null
null
null
TraderDelegate.py
tianhm/pq
5ab132c27d7fc8366ada3ca04b9fd1822b3c2d80
[ "MIT" ]
null
null
null
TraderDelegate.py
tianhm/pq
5ab132c27d7fc8366ada3ca04b9fd1822b3c2d80
[ "MIT" ]
null
null
null
#-*- coding:utf-8 -*- from FinalLogger import logger from DatabaseController import DatabaseController import logging import sys from agent import AbsAgent, Agent import bisect import Queue orderList = [] q_order_list = Queue.Queue() import pydevd if sys.platform == 'win32': from ctp_win32 import ApiStruct, Trader...
38.290123
238
0.661615
95beb0a6a3749c6ed2d46a3dd39a5b42d6f7aef7
182
py
Python
Mundo01/Exercicios/ex034.py
molonti/CursoemVideo---Python
4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11
[ "MIT" ]
null
null
null
Mundo01/Exercicios/ex034.py
molonti/CursoemVideo---Python
4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11
[ "MIT" ]
null
null
null
Mundo01/Exercicios/ex034.py
molonti/CursoemVideo---Python
4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11
[ "MIT" ]
null
null
null
sal = float(input('Digite o sálario R$ ')) if sal <= 1250: novo = sal + (sal * 15 / 100) else: novo = sal + (sal * 10 / 100) print('O Novo salário é R$ {:.2f}'.format(novo))
26
48
0.56044
2fcce72952bd021818a7f3e5d1610328646eb3b5
1,430
py
Python
Sorting/save_patients.py
shubee17/HackerEarth
73cc17a64490969cc6b9648601e7a9d817e7dfd1
[ "MIT" ]
null
null
null
Sorting/save_patients.py
shubee17/HackerEarth
73cc17a64490969cc6b9648601e7a9d817e7dfd1
[ "MIT" ]
null
null
null
Sorting/save_patients.py
shubee17/HackerEarth
73cc17a64490969cc6b9648601e7a9d817e7dfd1
[ "MIT" ]
null
null
null
""" A new deadly virus has infected large population of a planet. A brilliant scientist has discovered a new strain of virus which can cure this disease. Vaccine produced from this virus has various strength depending on midichlorians count. A person is cured only if midichlorians count in vaccine batch is more than mi...
36.666667
638
0.746154
66b62e09ed40ec2993cafe30984e406faf1b3741
507
py
Python
exercises/zh/exc_01_12_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/zh/exc_01_12_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/zh/exc_01_12_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy from spacy.matcher import Matcher nlp = spacy.load("zh_core_web_sm") matcher = Matcher(nlp.vocab) doc = nlp( "这个app的特性包括了优雅设计、快捷搜索、自动标签以及可选声音。" ) # 写一个模板是形容词加上一个或者两个名词 pattern = [{"POS": ____}, {"POS": ____}, {"POS": ____, "OP": ____}] # 把模板加入到matcher中然后把matcher应用到doc上面 matcher.add("ADJ_NOUN_PATTER...
23.045455
67
0.717949
a0092f533a2922fe5777213cce2e7d48bc4691fc
2,034
py
Python
example_problem/explorer/views.py
seakers/daphne-brain
1d703d468cd503a21395f986dd72e67b6e556451
[ "MIT" ]
null
null
null
example_problem/explorer/views.py
seakers/daphne-brain
1d703d468cd503a21395f986dd72e67b6e556451
[ "MIT" ]
null
null
null
example_problem/explorer/views.py
seakers/daphne-brain
1d703d468cd503a21395f986dd72e67b6e556451
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from channels.layers import get_channel_layer from asgiref.sync import async_to_sync from auth_API.helpers import get_or_create_user_information class StartGA(APIView): def post(self, request, format=None): if request.us...
28.25
70
0.502458
c755a0bf38ad66d17797f38e7f230ca7bf3af7c8
465
py
Python
check-python27/samples/miscellaneous/test_print.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
null
null
null
check-python27/samples/miscellaneous/test_print.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
1
2018-01-05T20:15:40.000Z
2018-01-05T20:15:40.000Z
check-python27/samples/miscellaneous/test_print.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
null
null
null
def some_function(x=3): print "hello " print print "goodbye" # print with brackets is possible in Python 2.7.X, mandatory in 3.X print("Python 3.x hello") print "Python 2.x hello, with arg", 4 print("Python 3.x hello, with arg", 4) print("Python 3.x hello, with formatted arg {0}".forma...
25.833333
71
0.645161
51aa2bb103a9915010c1081088475b3e6be2e69d
8,363
py
Python
truffe2/logistics/migrations/0001_initial.py
JonathanCollaud/truffe2
5cbb055ac1acf7e7dc697340618fcb56c67fbd91
[ "BSD-2-Clause" ]
9
2016-09-14T02:19:19.000Z
2020-10-18T14:52:14.000Z
truffe2/logistics/migrations/0001_initial.py
JonathanCollaud/truffe2
5cbb055ac1acf7e7dc697340618fcb56c67fbd91
[ "BSD-2-Clause" ]
19
2016-11-09T21:28:51.000Z
2021-02-10T22:37:31.000Z
truffe2/logistics/migrations/0001_initial.py
JonathanCollaud/truffe2
5cbb055ac1acf7e7dc697340618fcb56c67fbd91
[ "BSD-2-Clause" ]
13
2016-12-31T14:22:09.000Z
2020-12-27T19:43:19.000Z
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Room' db.create_table(u'logistics_room', ( (u...
69.115702
195
0.575272
d9b28dea1a79221a340b60d1a518e7b4420f1dc9
1,288
py
Python
app/auth/forms.py
ezekielkibiego/Phoenix-Security-Solutions
956769d4f38360f57988020643d2c4b33902ca2b
[ "MIT" ]
null
null
null
app/auth/forms.py
ezekielkibiego/Phoenix-Security-Solutions
956769d4f38360f57988020643d2c4b33902ca2b
[ "MIT" ]
null
null
null
app/auth/forms.py
ezekielkibiego/Phoenix-Security-Solutions
956769d4f38360f57988020643d2c4b33902ca2b
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, ValidationError, BooleanField from wtforms.validators import Required, Email, EqualTo from ..models import User class RegistrationForm(FlaskForm): email = StringField('Your Email Address', validators=[Required(), Email()]) ...
49.538462
146
0.756988
9e11c072b3622d33feb432af68692331a118aaf5
844
py
Python
recipes/word-swap-embedding/strict/zoountargeted/greedy-word-wir/closest-improvement-only-recipe.py
StatNLP/discretezoo
565552b894a5c9632ac7b949d61a6f71123031e4
[ "MIT" ]
null
null
null
recipes/word-swap-embedding/strict/zoountargeted/greedy-word-wir/closest-improvement-only-recipe.py
StatNLP/discretezoo
565552b894a5c9632ac7b949d61a6f71123031e4
[ "MIT" ]
null
null
null
recipes/word-swap-embedding/strict/zoountargeted/greedy-word-wir/closest-improvement-only-recipe.py
StatNLP/discretezoo
565552b894a5c9632ac7b949d61a6f71123031e4
[ "MIT" ]
1
2022-03-25T16:45:12.000Z
2022-03-25T16:45:12.000Z
import textattack import os, sys current_dir = os.path.dirname(os.path.realpath(__file__)) constraint_dir = os.path.normpath( os.path.join(current_dir, os.pardir, os.pardir)) transformation_dir = os.path.normpath( os.path.join(current_dir, os.pardir, os.pardir, os.pardir)) sys.path.append(constraint_dir) sys.pa...
38.363636
78
0.777251
be4262ec7dd84ee7c0f9b0a312e4ba8786266953
4,690
py
Python
app/converter/mc_osu.py
Keytoyze/Mania-Lab
e29007a31828a0378a015d55a78b6c5f7ebf4a44
[ "Apache-2.0" ]
null
null
null
app/converter/mc_osu.py
Keytoyze/Mania-Lab
e29007a31828a0378a015d55a78b6c5f7ebf4a44
[ "Apache-2.0" ]
null
null
null
app/converter/mc_osu.py
Keytoyze/Mania-Lab
e29007a31828a0378a015d55a78b6c5f7ebf4a44
[ "Apache-2.0" ]
null
null
null
import json import bisect from app.utils import Comparable from app import utils from django.template import loader class BpmStamp(Comparable): def __init__(self, time, bpm, beat): Comparable.__init__(self, beat) self.bpm = bpm self.time = time def translate(self, context): r...
33.028169
91
0.598721
7ee9546b5db75d2229d7f7d0a5f6cd21eeca0ea1
1,062
py
Python
tests/toynet_test.py
LucasFidon/NiftyNet-RobustOptim
42abc918a0c3921e6ea382e53d45c9e8509fa4aa
[ "Apache-2.0" ]
null
null
null
tests/toynet_test.py
LucasFidon/NiftyNet-RobustOptim
42abc918a0c3921e6ea382e53d45c9e8509fa4aa
[ "Apache-2.0" ]
null
null
null
tests/toynet_test.py
LucasFidon/NiftyNet-RobustOptim
42abc918a0c3921e6ea382e53d45c9e8509fa4aa
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, print_function import tensorflow as tf from niftynet.network.toynet import ToyNet from tests.niftynet_testcase import NiftyNetTestCase class ToyNetTest(NiftyNetTestCase): def test_3d_shape(self): input_shape = (2, 32, 32, 32, 1) x = tf.ones(input_shape) ...
28.702703
64
0.648776
a24b949207a9139a33dd8f09e0864c0d7e725817
7,776
py
Python
rllib/agents/ddpg/ddpg_torch_model.py
firebolt55439/ray
215300b070628c06f0106906fc6c03bd70ebf140
[ "Apache-2.0" ]
3
2020-12-03T17:48:45.000Z
2022-01-22T08:09:46.000Z
rllib/agents/ddpg/ddpg_torch_model.py
firebolt55439/ray
215300b070628c06f0106906fc6c03bd70ebf140
[ "Apache-2.0" ]
6
2022-03-18T14:06:24.000Z
2022-03-26T07:13:16.000Z
rllib/agents/ddpg/ddpg_torch_model.py
firebolt55439/ray
215300b070628c06f0106906fc6c03bd70ebf140
[ "Apache-2.0" ]
1
2021-10-11T22:53:49.000Z
2021-10-11T22:53:49.000Z
import numpy as np from ray.rllib.models.torch.misc import SlimFC from ray.rllib.models.torch.torch_modelv2 import TorchModelV2 from ray.rllib.utils.framework import try_import_torch, get_activation_fn torch, nn = try_import_torch() class DDPGTorchModel(TorchModelV2, nn.Module): """Extension of standard TorchMo...
38.686567
79
0.575617
ce1cff2c3267859aabf1b641fb4af6643c5b37a7
6,919
py
Python
tensorflow_graphics/math/interpolation/tests/trilinear_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/math/interpolation/tests/trilinear_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/math/interpolation/tests/trilinear_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
1
2020-04-11T10:37:36.000Z
2020-04-11T10:37:36.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
38.438889
81
0.664547
44290295a7b13618eb5c660ddc5f7ba4944e42a9
6,511
py
Python
demisto_sdk/commands/common/hook_validations/image.py
cpforbes/demisto-sdk
4fe122e6f614e605f96bd47aa089b215dc7c2c5f
[ "MIT" ]
null
null
null
demisto_sdk/commands/common/hook_validations/image.py
cpforbes/demisto-sdk
4fe122e6f614e605f96bd47aa089b215dc7c2c5f
[ "MIT" ]
null
null
null
demisto_sdk/commands/common/hook_validations/image.py
cpforbes/demisto-sdk
4fe122e6f614e605f96bd47aa089b215dc7c2c5f
[ "MIT" ]
null
null
null
import base64 import glob from demisto_sdk.commands.common.constants import ( DEFAULT_DBOT_IMAGE_BASE64, DEFAULT_IMAGE_BASE64, IMAGE_REGEX, PACKS_INTEGRATION_NON_SPLIT_YML_REGEX) from demisto_sdk.commands.common.errors import Errors from demisto_sdk.commands.common.hook_validations.base_validator import \ ...
40.949686
112
0.634618
2bb69e6c8c289d18085c2bef6ebe9667342d6aed
5,800
py
Python
proxySTAR_V3/certbot/venv/lib/python2.7/site-packages/lexicon/providers/dnsmadeeasy.py
mami-project/lurk
98c293251e9b1e9c9a4b02789486c5ddaf46ba3c
[ "Apache-2.0" ]
2
2017-07-05T09:57:33.000Z
2017-11-14T23:05:53.000Z
proxySTAR_V3/certbot/venv.1509389747.bak/lib/python2.7/site-packages/lexicon/providers/dnsmadeeasy.py
mami-project/lurk
98c293251e9b1e9c9a4b02789486c5ddaf46ba3c
[ "Apache-2.0" ]
1
2019-01-17T14:26:22.000Z
2019-01-17T22:56:26.000Z
proxySTAR_V3/certbot/venv.1509389747.bak/lib/python2.7/site-packages/lexicon/providers/dnsmadeeasy.py
mami-project/lurk
98c293251e9b1e9c9a4b02789486c5ddaf46ba3c
[ "Apache-2.0" ]
1
2017-08-31T14:33:03.000Z
2017-08-31T14:33:03.000Z
from __future__ import absolute_import from __future__ import print_function import contextlib import datetime import hmac import json import locale import logging from babel.dates import format_date, format_datetime, format_time from hashlib import sha1 import requests from builtins import bytes from .base import P...
34.939759
105
0.595345
ba93863f29e484187788f555716212680e971a53
14,109
py
Python
old_backup/porto.py
GabbyHE/Bigscity-LibCity-Datasets
10c5583a0290714823a0a873e2ff7389629f3acc
[ "Apache-2.0" ]
32
2021-06-26T05:04:05.000Z
2021-07-21T11:36:38.000Z
old_backup/porto.py
GabbyHE/Bigscity-LibCity-Datasets
10c5583a0290714823a0a873e2ff7389629f3acc
[ "Apache-2.0" ]
5
2021-10-16T15:08:14.000Z
2022-03-03T07:14:22.000Z
old_backup/porto.py
GabbyHE/Bigscity-LibCity-Datasets
10c5583a0290714823a0a873e2ff7389629f3acc
[ "Apache-2.0" ]
4
2021-11-30T15:30:38.000Z
2022-03-23T15:33:07.000Z
import json import pandas as pd import os from datetime import datetime import numpy as np import time old_time_format = '%Y-%m-%d %H:%M:%S' new_time_format = '%Y-%m-%dT%H:%M:%SZ' MIN_TIME = '2013-07-01 00:00:00' MAX_TIME = '2014-07-01 00:00:00' MIN_TIMESTAMP = float( datetime.timestamp( pd.to_datetime(MIN...
32.811628
80
0.623432
ebb357a875dd4c7ef1aee70082c425b6be9ea3da
1,910
py
Python
release/scripts/addons/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
release/scripts/addons/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/addons/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright 2018-2019 The glTF-Blender-IO authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
30.31746
84
0.707853
f4968025a0e247885d3f78d93be2df592c93d51d
6,092
py
Python
beets/util/enumeration.py
mineo/beets
ba80e1578ad9d474446d2facd471de4a456978e1
[ "MIT" ]
1
2019-01-03T03:15:34.000Z
2019-01-03T03:15:34.000Z
beets/util/enumeration.py
mineo/beets
ba80e1578ad9d474446d2facd471de4a456978e1
[ "MIT" ]
null
null
null
beets/util/enumeration.py
mineo/beets
ba80e1578ad9d474446d2facd471de4a456978e1
[ "MIT" ]
null
null
null
# This file is part of beets. # Copyright 2011, Adrian Sampson. # # 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, ...
34.03352
79
0.641989
60d63631535ae527255ea7f18d2fd85f30878d56
2,193
py
Python
cvpods/modeling/nn_utils/activation_count.py
reinforcementdriving/cvpods
32d98b74745020be035a0e20337ad934201615c4
[ "Apache-2.0" ]
758
2021-03-11T08:14:26.000Z
2022-03-31T07:24:13.000Z
cvpods/modeling/nn_utils/activation_count.py
wondervictor/cvpods
614a975e5425bbaeb66bbd1ffca552d633ba89ca
[ "Apache-2.0" ]
58
2020-12-04T19:47:10.000Z
2022-03-30T06:52:13.000Z
cvpods/modeling/nn_utils/activation_count.py
wondervictor/cvpods
614a975e5425bbaeb66bbd1ffca552d633ba89ca
[ "Apache-2.0" ]
110
2021-03-18T01:59:31.000Z
2022-03-18T21:26:56.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import logging import typing from collections import defaultdict import torch.nn as nn from .jit_handles import generic_activation_jit, get_jit_model_analysis # A dictionary that maps supported operations to their activation count handles. _SUP...
36.55
80
0.699954
d3ed4f16fb538f67486cefa855f024879f1487e7
1,691
py
Python
day05/day5_part1.py
briannamcdonald/advent-of-code-2021
c67e3c02a84db1a0cceeefef34a8cddba311484e
[ "MIT" ]
1
2021-12-05T15:04:23.000Z
2021-12-05T15:04:23.000Z
day05/day5_part1.py
briannamcdonald/advent-of-code-2021
c67e3c02a84db1a0cceeefef34a8cddba311484e
[ "MIT" ]
null
null
null
day05/day5_part1.py
briannamcdonald/advent-of-code-2021
c67e3c02a84db1a0cceeefef34a8cddba311484e
[ "MIT" ]
null
null
null
def organize_data(lines): max_x = 0 max_y = 0 line_segments = [] # store all of the line segments for line in lines: points = line.split(" -> ") point1 = points[0].split(",") point2 = points[1].split(",") x1 = int(point1[0].strip()) y1 = int(point1[1].strip()...
27.274194
57
0.512714
ad3669821de4bd33142b20f80695a86a625213e9
4,043
py
Python
pyconnectome/models/noddi.py
neurospin/pyconnectome
971dfaf58895b61f4610934bd5434fb5a7062bfe
[ "CECILL-B" ]
5
2017-06-29T20:01:00.000Z
2019-12-18T13:41:45.000Z
pyconnectome/models/noddi.py
neurospin/pyconnectome
971dfaf58895b61f4610934bd5434fb5a7062bfe
[ "CECILL-B" ]
16
2017-07-11T15:49:33.000Z
2018-11-16T09:04:03.000Z
pyconnectome/models/noddi.py
neurospin/pyconnectome
971dfaf58895b61f4610934bd5434fb5a7062bfe
[ "CECILL-B" ]
10
2017-04-28T11:04:36.000Z
2020-02-11T10:47:07.000Z
########################################################################## # NSAp - Copyright (C) CEA, 2016 - 2018 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for details. ###...
36.754545
79
0.628988
7aae2c2e57b2c01ee73ab4d17c9180d941ffa33c
334
py
Python
dit_helpdesk/healthcheck/urls.py
uktrade/dit-helpdesk
f5127daa46e920d33ec3f0b982136b65bba0353a
[ "MIT" ]
3
2019-10-24T10:39:38.000Z
2021-07-13T11:46:18.000Z
dit_helpdesk/healthcheck/urls.py
uktrade/dit-helpdesk
f5127daa46e920d33ec3f0b982136b65bba0353a
[ "MIT" ]
20
2020-01-22T11:16:24.000Z
2022-02-02T10:38:54.000Z
dit_helpdesk/healthcheck/urls.py
uktrade/dit-helpdesk
f5127daa46e920d33ec3f0b982136b65bba0353a
[ "MIT" ]
null
null
null
from django.urls import path from healthcheck import views app_name = "healthcheck" urlpatterns = [ path("", views.HealthCheckView.as_view(), name="basic"), path("tree_freshness", views.TreeRefreshCheckView.as_view(), name="tree_freshness"), path("cms_existence", views.CMSCheckView.as_view(), name="cms_e...
27.833333
88
0.736527
b1a21a40a3c89c9624a6d95d6caeb551a2b5ad47
3,343
py
Python
cms_perf/report.py
maxfischer2781/cms_perf
193128dbf46d334485a02bdeec2638764afae4c7
[ "MIT" ]
null
null
null
cms_perf/report.py
maxfischer2781/cms_perf
193128dbf46d334485a02bdeec2638764afae4c7
[ "MIT" ]
8
2020-07-14T14:01:27.000Z
2020-08-24T15:25:04.000Z
cms_perf/report.py
maxfischer2781/cms_perf
193128dbf46d334485a02bdeec2638764afae4c7
[ "MIT" ]
null
null
null
""" The main loop collecting and reporting values """ from typing import Callable import sys import time from .setup.cli import CLI from .setup import cli_parser class PseudoSched: """Imitation of the ``cms.sched`` directive to compute total load""" def __init__(self, cpu=0, io=0, mem=0, pag=0, runq=0, maxl...
28.330508
80
0.562668
b5e4b0a0ad898094f58eb42c73fea1238d529047
1,323
py
Python
tools/xml2csv.py
chenyuqing/darknet_yolov3_hardcore
f976b90f63cff1291aee341914a75dfabec53004
[ "MIT" ]
null
null
null
tools/xml2csv.py
chenyuqing/darknet_yolov3_hardcore
f976b90f63cff1291aee341914a75dfabec53004
[ "MIT" ]
null
null
null
tools/xml2csv.py
chenyuqing/darknet_yolov3_hardcore
f976b90f63cff1291aee341914a75dfabec53004
[ "MIT" ]
null
null
null
import os import glob import pandas as pd import xml.etree.ElementTree as ET def xml_to_csv(path): xml_list = [] for xml_file in glob.glob(path + '/*.xml'): tree = ET.parse(xml_file) root = tree.getroot() print(root.find('filename').text) for member in root.findall('object'): ...
34.815789
137
0.574452
5ef5d8d41ff32077b040766c4523390be805b574
3,141
py
Python
maro/cli/grass/node.py
yourmoonlight/maro
4fbe556f3ae1817995f90cb529e9ca6191f67d7f
[ "MIT" ]
1
2020-09-22T12:13:32.000Z
2020-09-22T12:13:32.000Z
maro/cli/grass/node.py
chaosddp/maro
3d6715649467d49a83886c1fd4ae9b41ff012a50
[ "MIT" ]
null
null
null
maro/cli/grass/node.py
chaosddp/maro
3d6715649467d49a83886c1fd4ae9b41ff012a50
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import yaml from maro.cli.grass.executors.grass_azure_executor import GrassAzureExecutor from maro.cli.grass.executors.grass_on_premises_executor import GrassOnPremisesExecutor from maro.cli.utils.checkers import check_details_validity from mar...
35.693182
90
0.745622
4ab44330b57d9a81c6f369bc81ebd04512170f66
5,193
py
Python
q_learning/q_learning.py
johan-gras/rl-camb-kaggle-connect-x
764463e556c5aea6f61390d2fec83f363510d029
[ "Apache-2.0" ]
1
2021-12-05T14:52:28.000Z
2021-12-05T14:52:28.000Z
q_learning/q_learning.py
johan-gras/rl-camb-kaggle-connect-x
764463e556c5aea6f61390d2fec83f363510d029
[ "Apache-2.0" ]
null
null
null
q_learning/q_learning.py
johan-gras/rl-camb-kaggle-connect-x
764463e556c5aea6f61390d2fec83f363510d029
[ "Apache-2.0" ]
1
2020-12-13T18:04:05.000Z
2020-12-13T18:04:05.000Z
import os import numpy as np import torch as tc import torch.nn as nn import kaggle_environments as ke from utils.env_wrapper import ConnectX class FFDNN(nn.Module): def __init__(self, insize, action_space): super(FFDNN, self).__init__() self.input = nn.Linear(insize, 64) self.layer1 = n...
33.941176
100
0.606008
c61cb68dc66e23a995490228c40da39e9a2f9b35
1,820
py
Python
src/spaceone/repository/manager/policy_manager/local_policy_manager.py
whdalsrnt/repository
4d019c21508629faae7a7e2789bf540a3bab0e20
[ "Apache-2.0" ]
6
2020-06-04T23:00:33.000Z
2020-08-10T02:45:43.000Z
src/spaceone/repository/manager/policy_manager/local_policy_manager.py
whdalsrnt/repository
4d019c21508629faae7a7e2789bf540a3bab0e20
[ "Apache-2.0" ]
4
2020-10-09T07:02:27.000Z
2022-02-28T04:43:01.000Z
src/spaceone/repository/manager/policy_manager/local_policy_manager.py
whdalsrnt/repository
4d019c21508629faae7a7e2789bf540a3bab0e20
[ "Apache-2.0" ]
6
2020-06-01T10:10:57.000Z
2021-10-05T03:03:00.000Z
import logging from spaceone.core.error import * from spaceone.repository.model import * from spaceone.repository.manager.policy_manager import PolicyManager __all__ = ['LocalPolicyManager'] _LOGGER = logging.getLogger(__name__) class LocalPolicyManager(PolicyManager): def __init__(self, *args, **kwargs): ...
33.090909
105
0.693407
c2569ce04031b4988033743876bff89889fb9088
3,843
py
Python
slicesim/Stats.py
rish07/slicesim
f15ac5e9ff2a68d7185bac12cc5c38d8eaf0fb30
[ "MIT" ]
74
2019-05-25T14:32:12.000Z
2022-03-30T16:21:30.000Z
slicesim/Stats.py
emingure/slicesim
533bd7927e1e9c371b56a2b6ac9017f4ee7514af
[ "MIT" ]
9
2020-01-04T17:19:46.000Z
2022-03-11T23:47:33.000Z
slicesim/Stats.py
emingure/slicesim
533bd7927e1e9c371b56a2b6ac9017f4ee7514af
[ "MIT" ]
51
2019-06-28T06:48:43.000Z
2022-03-20T06:39:05.000Z
class Stats: def __init__(self, env, base_stations, clients, area): self.env = env self.base_stations = base_stations self.clients = clients self.area = area #self.graph = graph # Stats self.total_connected_users_ratio = [] self.total_used_bw = [] ...
34.936364
103
0.575332
c1b855671da863455bbede325c0db3ccb70a8705
3,125
py
Python
iotbx/regression/tst_phases.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
2
2021-03-18T12:31:57.000Z
2022-03-14T06:27:06.000Z
iotbx/regression/tst_phases.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
null
null
null
iotbx/regression/tst_phases.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
1
2021-03-26T12:52:30.000Z
2021-03-26T12:52:30.000Z
from __future__ import absolute_import, division, print_function import iotbx.pdb.xray_structure from cctbx.development import random_structure from cctbx import miller from cctbx import crystal from cctbx import sgtbx from cctbx.array_family import flex from libtbx.test_utils import show_diff from six.moves import cSt...
28.935185
77
0.6368
b2b20f83af038fa2107551a1be7a9e9913297f8e
1,159
py
Python
book_center/book_center/bc_profiles/admin.py
geodimitrov/Python-Web-Framework-SoftUni
06b7e11aee0024a564d1b266d5ed6271351ac116
[ "MIT" ]
null
null
null
book_center/book_center/bc_profiles/admin.py
geodimitrov/Python-Web-Framework-SoftUni
06b7e11aee0024a564d1b266d5ed6271351ac116
[ "MIT" ]
null
null
null
book_center/book_center/bc_profiles/admin.py
geodimitrov/Python-Web-Framework-SoftUni
06b7e11aee0024a564d1b266d5ed6271351ac116
[ "MIT" ]
null
null
null
from book_center.bc_profiles.models.discussions import BookCenterDiscussion, BookCenterDiscussionComment from book_center.bc_profiles.models.profiles import BookCenterUserProfile from book_center.bc_profiles.forms.discussions import DiscussionForm, DiscussionCommentForm from book_center.bc_profiles.forms.profiles impor...
37.387097
104
0.768766
9e7d8277c7d863ca5f5631ec979f458d1aca4bcc
609
py
Python
1.arrays/left-rotation.py
RocqJones/data-structures-Hackerank-problem-solving
2545c2eb05d21c16c8bc18d65fbba536a40846fd
[ "Apache-2.0" ]
null
null
null
1.arrays/left-rotation.py
RocqJones/data-structures-Hackerank-problem-solving
2545c2eb05d21c16c8bc18d65fbba536a40846fd
[ "Apache-2.0" ]
null
null
null
1.arrays/left-rotation.py
RocqJones/data-structures-Hackerank-problem-solving
2545c2eb05d21c16c8bc18d65fbba536a40846fd
[ "Apache-2.0" ]
null
null
null
import math import os import random import re import sys # # Complete the 'rotateLeft' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts following parameters: # 1. INTEGER d # 2. INTEGER_ARRAY arr # def rotateLeft(d, arr): rotate = (arr[d:] + arr[:d]) # return r...
19.645161
54
0.671593
58e99a3ca207cbde48c3603479f25f96ac6ce264
3,248
py
Python
SerialController/Commands/PythonCommands/ImageProcessingOnly/FossilShiny.py
jerrutledge/Poke-Controller
35d759e47cf5d9aa0d789aa2808988f179dcbeb1
[ "MIT" ]
1
2020-04-03T15:21:26.000Z
2020-04-03T15:21:26.000Z
SerialController/Commands/PythonCommands/ImageProcessingOnly/FossilShiny.py
jerrutledge/Poke-Controller
35d759e47cf5d9aa0d789aa2808988f179dcbeb1
[ "MIT" ]
null
null
null
SerialController/Commands/PythonCommands/ImageProcessingOnly/FossilShiny.py
jerrutledge/Poke-Controller
35d759e47cf5d9aa0d789aa2808988f179dcbeb1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from Commands.PythonCommandBase import PythonCommand, ImageProcPythonCommand from Commands.Keys import KeyPress, Button, Direction, Stick class Fossil_shiny(ImageProcPythonCommand): def __init__(self, cam): super().__init__(cam) ''' head = {0 : "カセキのトリ",...
28
88
0.632389
d73b04be3c98e36b58a856de30f91d806c8ac106
1,504
py
Python
discomll/ensemble/core/k_medoids.py
romanorac/discomll
a4703daffb2ba3c9f614bc3dbe45ae55884aea00
[ "Apache-2.0" ]
103
2015-01-02T23:45:18.000Z
2021-01-23T14:25:52.000Z
discomll/ensemble/core/k_medoids.py
romanorac/discomll
a4703daffb2ba3c9f614bc3dbe45ae55884aea00
[ "Apache-2.0" ]
null
null
null
discomll/ensemble/core/k_medoids.py
romanorac/discomll
a4703daffb2ba3c9f614bc3dbe45ae55884aea00
[ "Apache-2.0" ]
10
2015-01-02T23:48:12.000Z
2017-11-25T15:55:34.000Z
""" Special purpose k - medoids algorithm """ import numpy as np def fit(sim_mat, D_len, cidx): """ Algorithm maximizes energy between clusters, which is distinction in this algorithm. Distance matrix contains mostly 0, which are overlooked due to search of maximal distances. Algorithm does not try to retai...
35.809524
225
0.587101
3c98121cd11f62144166de6e8eae1080bfb6f36a
1,198
py
Python
testing/test_is_inside.py
GalBenZvi/EpidemicSimulation
7aa551e18ad27e977a73452e708026ea85804a21
[ "MIT" ]
1
2020-07-15T07:11:55.000Z
2020-07-15T07:11:55.000Z
testing/test_is_inside.py
Hershkovitz-hub/EpidemicSimulation
7aa551e18ad27e977a73452e708026ea85804a21
[ "MIT" ]
2
2021-06-08T22:07:26.000Z
2021-09-08T02:22:40.000Z
testing/test_is_inside.py
GalBenZvi/EpidemicSimulation
7aa551e18ad27e977a73452e708026ea85804a21
[ "MIT" ]
null
null
null
from epidemic_simulation.simulation import SimulationManager import pytest @pytest.fixture def test_data(): test_calc=SimulationManager([],{'infection_r':100,'infection_p':0.99,'sickness_duration':6}) return test_calc def test_not_in_same_position(test_data): """ test for when two bodies are in the ...
26.622222
109
0.705342
179af48bd1bd8d9e867d1e15bb676dce60c52640
30
py
Python
pypgdelta/sql/state/__init__.py
SindreOsnes/pypgdelta
00234903a4e3c1c61ac5cc295133b6a69334fbeb
[ "MIT" ]
null
null
null
pypgdelta/sql/state/__init__.py
SindreOsnes/pypgdelta
00234903a4e3c1c61ac5cc295133b6a69334fbeb
[ "MIT" ]
null
null
null
pypgdelta/sql/state/__init__.py
SindreOsnes/pypgdelta
00234903a4e3c1c61ac5cc295133b6a69334fbeb
[ "MIT" ]
null
null
null
from ._state import get_state
15
29
0.833333
f14cc0defabeca8022e93b4c4cd28f24d8066285
2,032
py
Python
lib/tests/test_client.py
OneIdentity/safeguard-sessions-plugin-inwebo-mfa
4e65ae895f47abbaaefbebea8992143420211f6b
[ "MIT" ]
2
2019-04-18T12:40:31.000Z
2020-08-17T20:47:36.000Z
lib/tests/test_client.py
OneIdentity/safeguard-sessions-plugin-inwebo-mfa
4e65ae895f47abbaaefbebea8992143420211f6b
[ "MIT" ]
null
null
null
lib/tests/test_client.py
OneIdentity/safeguard-sessions-plugin-inwebo-mfa
4e65ae895f47abbaaefbebea8992143420211f6b
[ "MIT" ]
null
null
null
# # Copyright (c) 2019 One Identity # # 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, di...
39.076923
78
0.734744
2b827b5dd8a2e23ec4036db1f8d8cbbd4ce22992
1,570
py
Python
nova/tests/unit/api/openstack/placement/test_deploy.py
jovial/nova
d9e04c4ff0b1a9c3383f1848dc846e93030d83cb
[ "Apache-2.0" ]
1
2018-07-04T07:58:59.000Z
2018-07-04T07:58:59.000Z
nova/tests/unit/api/openstack/placement/test_deploy.py
ljzjohnson/nova
87e1951a1b8c03b9ecdf8f75610d14690b61f272
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/api/openstack/placement/test_deploy.py
ljzjohnson/nova
87e1951a1b8c03b9ecdf8f75610d14690b61f272
[ "Apache-2.0" ]
null
null
null
# 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 agreed to in...
35.681818
78
0.707643
1b58af0ba7a5740d56897bb9709d3d4dac4bc8cf
1,452
py
Python
loginsys/views.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
loginsys/views.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
loginsys/views.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
# -*-coding: utf-8 -*- from django.shortcuts import render, redirect from django.contrib import auth from django.contrib.auth.forms import UserCreationForm from django.core.context_processors import csrf # Create your views here. def login(request): args={} args.update(csrf(request)) if request.POST: ...
32.266667
136
0.651515
1b8c2c57a9a02b65894245edd5901a9bd17ac371
799
py
Python
src/DATA/GameClazzInitializer.py
SirRina/EXO-freegamebase-pygame
38d56a421b9b9c40756188a31b05b92f92aaf0c2
[ "MIT" ]
4
2020-06-18T00:45:36.000Z
2021-01-01T02:08:13.000Z
src/DATA/GameClazzInitializer.py
SirRina/EXO-freegamebase-pygame
38d56a421b9b9c40756188a31b05b92f92aaf0c2
[ "MIT" ]
null
null
null
src/DATA/GameClazzInitializer.py
SirRina/EXO-freegamebase-pygame
38d56a421b9b9c40756188a31b05b92f92aaf0c2
[ "MIT" ]
1
2020-10-11T00:28:06.000Z
2020-10-11T00:28:06.000Z
from .GameClientManager import GameClient; from .GUI.GameGUI import GUI; from .manager import RENDER_MANAGER, EVENT_MANAGER; from . import NAME, VERSION, AUTHOR, V_STATE, USER, GameDevUtil; class GameClazz: CLIENT = None; event_initialized = False; def __init__(self, tag): self.CLIENT = GameCli...
28.535714
128
0.739675
96c5f4aab3cd3e081ce3076faa75518358b12a6a
763
py
Python
venv/Lib/site-packages/tqdm/contrib/bells.py
mirosa25/ITI-202-Final-Project
b46e7ffccf43a52ee0e72b889c5aac6887228dc2
[ "MIT" ]
353
2020-12-10T10:47:17.000Z
2022-03-31T23:08:29.000Z
venv/Lib/site-packages/tqdm/contrib/bells.py
mirosa25/ITI-202-Final-Project
b46e7ffccf43a52ee0e72b889c5aac6887228dc2
[ "MIT" ]
301
2020-10-03T10:46:31.000Z
2022-03-27T23:46:23.000Z
venv/Lib/site-packages/tqdm/contrib/bells.py
mirosa25/ITI-202-Final-Project
b46e7ffccf43a52ee0e72b889c5aac6887228dc2
[ "MIT" ]
63
2020-12-10T17:10:34.000Z
2022-03-28T16:27:07.000Z
""" Even more features than `tqdm.auto` (all the bells & whistles): - `tqdm.auto` - `tqdm.tqdm.pandas` - `tqdm.contrib.telegram` + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}` - `tqdm.contrib.discord` + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}` """ __all__ = ['tqdm', 'trange...
29.346154
72
0.732634
afcfe16ec2be0d0353733673d511a7102651fe0c
1,485
py
Python
tests/snippets/property.py
ypyf/RustPython
86103bfd0187a6073cab91142f698cb6b0a0de51
[ "MIT" ]
1
2021-09-03T15:59:36.000Z
2021-09-03T15:59:36.000Z
tests/snippets/property.py
ypyf/RustPython
86103bfd0187a6073cab91142f698cb6b0a0de51
[ "MIT" ]
null
null
null
tests/snippets/property.py
ypyf/RustPython
86103bfd0187a6073cab91142f698cb6b0a0de51
[ "MIT" ]
null
null
null
from testutils import assertRaises class Fubar: def __init__(self): self.x = 100 @property def foo(self): value = self.x self.x += 1 return value f = Fubar() assert f.foo == 100 assert f.foo == 101 assert type(Fubar.foo) is property class Bar: def __init__(self): ...
16.875
43
0.627609
d9380e41be5cc07ac74ec9873e8a4dc2da90296c
2,140
py
Python
python/src/nnabla/backward_function/warp_by_flow.py
Mattlk13/nnabla
09b7dfd03bd88366d1d1f6cc61492b42175e35e7
[ "Apache-2.0" ]
null
null
null
python/src/nnabla/backward_function/warp_by_flow.py
Mattlk13/nnabla
09b7dfd03bd88366d1d1f6cc61492b42175e35e7
[ "Apache-2.0" ]
1
2020-11-09T07:33:29.000Z
2020-11-09T07:33:29.000Z
python/src/nnabla/backward_function/warp_by_flow.py
Mattlk13/nnabla
09b7dfd03bd88366d1d1f6cc61492b42175e35e7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Sony 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/LICENSE-2.0 # # Unless required by applicabl...
38.214286
88
0.669159
d5b53d7619eebc88671e9729d99b0bd1887d2ce8
956
py
Python
IOPreprocessing/DBStore.py
blodstone/CCS590v2
8cf5d487568116203816839bb76c800dc02331c1
[ "MIT" ]
null
null
null
IOPreprocessing/DBStore.py
blodstone/CCS590v2
8cf5d487568116203816839bb76c800dc02331c1
[ "MIT" ]
null
null
null
IOPreprocessing/DBStore.py
blodstone/CCS590v2
8cf5d487568116203816839bb76c800dc02331c1
[ "MIT" ]
null
null
null
''' Created on Jan 31, 2011 @author: Blodstone ''' import re import pymongo import time class DBStore: ''' Wrapping class of pymongo database ''' testingRoot = 'E:/Kuliah/Postgraduate/Assignment/CCS590/Experiment/Output/Testing' trainingRoot= 'E:/Kuliah/Postgraduate/Assignment/...
25.157895
88
0.639121
764a619df2123848e0b6f3bc716b383e1a96cf0e
21,815
py
Python
PixivModelFanbox.py
BassOfBass/PixivUtil2
80e9db9be3498f98911a2acb45e900e6b7f1a1fb
[ "BSD-2-Clause" ]
null
null
null
PixivModelFanbox.py
BassOfBass/PixivUtil2
80e9db9be3498f98911a2acb45e900e6b7f1a1fb
[ "BSD-2-Clause" ]
null
null
null
PixivModelFanbox.py
BassOfBass/PixivUtil2
80e9db9be3498f98911a2acb45e900e6b7f1a1fb
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # pylint: disable=C1801, C0330 import codecs import os import re import sys from typing import List import demjson from bs4 import BeautifulSoup import datetime_z import PixivHelper from PixivException import PixivException _re_fanbox_cover = re.compile(r"c\/.*\/fanbox") _url_pattern = re.com...
43.63
204
0.518405
1328bd14e8a95e8f9d36e5c68adb5b5b75a33e3c
4,444
py
Python
mne/tests/test_docstring_parameters.py
fraimondo/mne-python
2fe126debc27d14e5f1d92762757915bb86fcaf5
[ "BSD-3-Clause" ]
null
null
null
mne/tests/test_docstring_parameters.py
fraimondo/mne-python
2fe126debc27d14e5f1d92762757915bb86fcaf5
[ "BSD-3-Clause" ]
null
null
null
mne/tests/test_docstring_parameters.py
fraimondo/mne-python
2fe126debc27d14e5f1d92762757915bb86fcaf5
[ "BSD-3-Clause" ]
null
null
null
# TODO inspect for Cython (see sagenb.misc.sageinspect) from __future__ import print_function from nose.plugins.skip import SkipTest from os import path as op import inspect import warnings import imp from mne.utils import run_tests_if_main public_modules = [ # the list of modules users need to access for all fun...
32.676471
79
0.607561
eb76b948dc7d13c8ea6e04a924d6e24a3a9fec84
3,433
py
Python
libqtile/widget/maildir.py
brandonwillard/qtile
69e876ac4847a40bf65c62e96bb6db90ed3b8a27
[ "MIT" ]
null
null
null
libqtile/widget/maildir.py
brandonwillard/qtile
69e876ac4847a40bf65c62e96bb6db90ed3b8a27
[ "MIT" ]
null
null
null
libqtile/widget/maildir.py
brandonwillard/qtile
69e876ac4847a40bf65c62e96bb6db90ed3b8a27
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2011 Timo Schmiade # Copyright (c) 2012 Phil Jackson # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Tycho Andersen # Copyright (c) 2016 Christoph Lassner # # Permission is hereby granted, free of charge, to any person obtaining a copy # of thi...
36.136842
79
0.633557
5f97fa16bb348f0fe4a50305cf817c32dcc3b640
10
py
Python
tests/i16g/dummy_locales/es.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
3
2021-06-08T11:40:59.000Z
2022-03-31T16:22:56.000Z
tests/i16g/dummy_locales/es.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
28
2020-04-28T22:36:14.000Z
2021-06-06T20:32:00.000Z
tests/i16g/dummy_locales/es.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
null
null
null
ID = "es"
5
9
0.4
dc6ea93b667f704a0e2014947b2b579f3ab5fa05
903
py
Python
tests/test_our_std.py
IAbeteEtMechante/tryalgo
20dd83fbbadd4b3a548e2a7e3bf06b84f8d16628
[ "MIT" ]
351
2015-10-25T18:45:58.000Z
2022-03-26T02:06:51.000Z
tests/test_our_std.py
IAbeteEtMechante/tryalgo
20dd83fbbadd4b3a548e2a7e3bf06b84f8d16628
[ "MIT" ]
39
2016-02-04T07:01:57.000Z
2021-01-26T02:53:54.000Z
tests/test_our_std.py
IAbeteEtMechante/tryalgo
20dd83fbbadd4b3a548e2a7e3bf06b84f8d16628
[ "MIT" ]
119
2015-11-18T12:13:01.000Z
2022-03-21T04:18:11.000Z
# coding: utf8 # jill-jênn vie et christoph dürr - 2020 # pylint: disable=missing-docstring import unittest try: from unittest.mock import patch except ImportError: from mock import patch from tryalgo.our_std import readint, readstr, readmatrix, readarray class TestOurStd(unittest.TestCase): def test_re...
30.1
78
0.650055
df7b27ed824f33ac94839dc936667a586178eab7
2,540
py
Python
python-package/insightface/model_zoo/face_genderage.py
rjadr/insightface
cc09d3db72ea77c5314270ac07372d2b54d760f0
[ "MIT" ]
null
null
null
python-package/insightface/model_zoo/face_genderage.py
rjadr/insightface
cc09d3db72ea77c5314270ac07372d2b54d760f0
[ "MIT" ]
null
null
null
python-package/insightface/model_zoo/face_genderage.py
rjadr/insightface
cc09d3db72ea77c5314270ac07372d2b54d760f0
[ "MIT" ]
null
null
null
from __future__ import division import mxnet as mx import numpy as np import cv2 __all__ = ['FaceGenderage', 'genderage_v1', 'get_genderage'] class FaceGenderage: def __init__(self, name, download, param_file): self.name = name self.download = download self.param_file = param_file ...
34.324324
79
0.577953
5caf6f0065018ac70fd1f56d8514ca2b101713de
2,286
py
Python
server.py
KevinJpotter/FEMA-News-Classifier
d06e1677902e7d00bb827eaf78dadd0a32105d9f
[ "MIT" ]
1
2019-10-19T14:09:46.000Z
2019-10-19T14:09:46.000Z
server.py
KevinJpotter/FEMA-News-Classifier
d06e1677902e7d00bb827eaf78dadd0a32105d9f
[ "MIT" ]
null
null
null
server.py
KevinJpotter/FEMA-News-Classifier
d06e1677902e7d00bb827eaf78dadd0a32105d9f
[ "MIT" ]
2
2019-10-31T23:29:59.000Z
2021-08-04T04:10:11.000Z
import flask from newsapi import NewsApiClient import pandas as pd import numpy as np from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer from sklearn.linear_model import LogisticRegression import pickle #make flask app app = flask.Flask(__name__) # Init newsapi # news...
30.48
96
0.677165
5a13787fd85519952c23f902e1fc8f2fab7c9bcc
2,738
py
Python
docs/rtd_settings.py
anoopkcn/aiida-fleur
5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f
[ "MIT" ]
2
2017-11-09T10:21:43.000Z
2017-11-09T18:42:05.000Z
docs/rtd_settings.py
anoopkcn/aiida-fleur
5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f
[ "MIT" ]
8
2018-07-19T12:33:28.000Z
2018-10-18T10:02:32.000Z
docs/rtd_settings.py
anoopkcn/aiida-fleur
5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f
[ "MIT" ]
1
2018-12-21T11:10:09.000Z
2018-12-21T11:10:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
28.821053
102
0.643535
6f6d3f9182b69a3d4d6d1ccb6881b7a5af996097
3,743
py
Python
embroidepy/SimulatorView.py
Metallicow/EmbroidePy
a5e7f0d1bc84901948e628987dd38e3cb676cd72
[ "MIT" ]
null
null
null
embroidepy/SimulatorView.py
Metallicow/EmbroidePy
a5e7f0d1bc84901948e628987dd38e3cb676cd72
[ "MIT" ]
null
null
null
embroidepy/SimulatorView.py
Metallicow/EmbroidePy
a5e7f0d1bc84901948e628987dd38e3cb676cd72
[ "MIT" ]
null
null
null
# -wxPython Imports. import wx from EmbroideryView import EmbroideryView class SimulatorView(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: SimulatorView.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds)...
34.33945
92
0.623297
e63ddf9911007d61faee7cc04167ef37ebc8bd2c
246
py
Python
examples/Python/oo_example1.py
visigoth/ViennaRNA
0b8ca4c6604e7a8bea366af62d82f8f40cea49bf
[ "Python-2.0" ]
157
2016-10-12T22:11:56.000Z
2022-03-20T05:45:15.000Z
examples/Python/oo_example1.py
visigoth/ViennaRNA
0b8ca4c6604e7a8bea366af62d82f8f40cea49bf
[ "Python-2.0" ]
136
2016-11-07T19:06:30.000Z
2022-03-10T23:50:55.000Z
examples/Python/oo_example1.py
visigoth/ViennaRNA
0b8ca4c6604e7a8bea366af62d82f8f40cea49bf
[ "Python-2.0" ]
59
2016-11-17T20:23:55.000Z
2022-01-27T15:23:17.000Z
import RNA; sequence = "CGCAGGGAUACCCGCG" # create new fold_compound object fc = RNA.fold_compound(sequence) # compute minimum free energy (mfe) and corresponding structure (ss, mfe) = fc.mfe() # print output print "%s [ %6.2f ]" % (ss, mfe)
18.923077
63
0.707317
c0e39682f873e273310748a25eb8e1eaf6d5d548
1,194
py
Python
mlpipeline/util.py
simfrep/ml_pipeline
3ce9ae0c541b5e8cdaea5c3f82dc90eb2a7a672e
[ "BSD-3-Clause" ]
2
2021-08-07T21:03:50.000Z
2021-08-07T21:03:57.000Z
mlpipeline/util.py
simfrep/ml_pipeline
3ce9ae0c541b5e8cdaea5c3f82dc90eb2a7a672e
[ "BSD-3-Clause" ]
null
null
null
mlpipeline/util.py
simfrep/ml_pipeline
3ce9ae0c541b5e8cdaea5c3f82dc90eb2a7a672e
[ "BSD-3-Clause" ]
null
null
null
import importlib import os import pandas as pd import logging def func_from_string(key): _mod = key.rsplit('.',1)[0] _fun = key.rsplit('.',1)[1] mod = importlib.import_module(_mod) return getattr(mod, _fun) def extract_best_model(config,metric='accuracy_score',ds='valid'): modelpath = config['mpat...
33.166667
139
0.646566
cf15056d58b4c6d9f992d291cd4a14485a7c43df
6,995
py
Python
tests/observatory/platform/utils/test_url_utils.py
metasj/observatory-platform
e684f9dc55a1a0fde1b27193eda10532198c4168
[ "Apache-2.0" ]
null
null
null
tests/observatory/platform/utils/test_url_utils.py
metasj/observatory-platform
e684f9dc55a1a0fde1b27193eda10532198c4168
[ "Apache-2.0" ]
null
null
null
tests/observatory/platform/utils/test_url_utils.py
metasj/observatory-platform
e684f9dc55a1a0fde1b27193eda10532198c4168
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Curtin University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
42.138554
120
0.658899
7836b0bbfac222e937ac353268c12d8628d74eb7
2,941
py
Python
glue/yellowtaxi_etl.py
tom5610/amazon-sagemaker-workshop-analytics-machine-learning
e7698c32b3b1997bdd8eb370e0eb52168f179f0d
[ "MIT-0" ]
6
2021-12-16T07:44:34.000Z
2022-02-10T11:46:29.000Z
glue/yellowtaxi_etl.py
tom5610/amazon-sagemaker-workshop-analytics-machine-learning
e7698c32b3b1997bdd8eb370e0eb52168f179f0d
[ "MIT-0" ]
null
null
null
glue/yellowtaxi_etl.py
tom5610/amazon-sagemaker-workshop-analytics-machine-learning
e7698c32b3b1997bdd8eb370e0eb52168f179f0d
[ "MIT-0" ]
4
2022-01-07T06:52:17.000Z
2022-01-20T10:27:27.000Z
import sys from awsglue.transforms import * from awsglue.utils import getResolvedOptions from pyspark.context import SparkContext from awsglue.context import GlueContext from awsglue.job import Job from pyspark.sql.functions import lit from awsglue.dynamicframe import DynamicFrame args = getResolvedOptions(sys.argv, [...
38.194805
103
0.677661
61fac70495702a2719db922cdf213f745c6d4aa2
6,058
py
Python
src/python/dxpy/bindings/dxdataobject_functions.py
psung/dx-toolkit
f3a430c5e24184215eb4a9883a179edf07bfa08b
[ "Apache-2.0" ]
null
null
null
src/python/dxpy/bindings/dxdataobject_functions.py
psung/dx-toolkit
f3a430c5e24184215eb4a9883a179edf07bfa08b
[ "Apache-2.0" ]
null
null
null
src/python/dxpy/bindings/dxdataobject_functions.py
psung/dx-toolkit
f3a430c5e24184215eb4a9883a179edf07bfa08b
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2013-2014 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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.a...
34.816092
179
0.676131
3d0701e03f26e8fcf42c9db9e069288884c2b750
5,206
py
Python
parsl/execution_provider/jetstream/jetstream.py
monicadlewis97/parsl
57038b7cc92ce26b8f5a45c193180a9452fd6320
[ "Apache-2.0" ]
null
null
null
parsl/execution_provider/jetstream/jetstream.py
monicadlewis97/parsl
57038b7cc92ce26b8f5a45c193180a9452fd6320
[ "Apache-2.0" ]
null
null
null
parsl/execution_provider/jetstream/jetstream.py
monicadlewis97/parsl
57038b7cc92ce26b8f5a45c193180a9452fd6320
[ "Apache-2.0" ]
null
null
null
import novaclient from novaclient import api_versions from novaclient import client from novaclient import exceptions as exc import novaclient.extension from novaclient.i18n import _ from novaclient import utils import sys import os import configparser import ast import logging logger = logging.getLogger(__name__) se...
38
128
0.551671
ac43e61ef547c4f0157aa0b85eeb2aad298c76e8
464
py
Python
web-app/src/modules/suggestquestion/viewmodels/SubjectSelectionViewModel.py
philipp-mos/iubh-quiz-app
3ea4a6b673bba6df0ece273e17e65c8fe5edc341
[ "MIT" ]
null
null
null
web-app/src/modules/suggestquestion/viewmodels/SubjectSelectionViewModel.py
philipp-mos/iubh-quiz-app
3ea4a6b673bba6df0ece273e17e65c8fe5edc341
[ "MIT" ]
65
2021-06-01T15:52:12.000Z
2021-10-01T15:44:50.000Z
web-app/src/modules/suggestquestion/viewmodels/SubjectSelectionViewModel.py
philipp-mos/iubh-quiz-app
3ea4a6b673bba6df0ece273e17e65c8fe5edc341
[ "MIT" ]
1
2022-03-29T14:13:45.000Z
2022-03-29T14:13:45.000Z
from flask_wtf import FlaskForm from wtforms import HiddenField, SubmitField, StringField from wtforms.validators import DataRequired class SubjectSelectionViewModel(FlaskForm): subject_id = HiddenField( 'subject-id', validators=[ DataRequired() ] ) subject_name = Str...
20.173913
57
0.637931
660e1ede93875654debc207b2d5e5f3328b5c4e9
1,837
py
Python
tti/tti_explorer/case_generator.py
ashwinahuja/HowQuicklyCanWeGetBackToThePub
da9a041642c4d226fa9388e6241fe952a8a330ef
[ "MIT" ]
1
2021-01-13T16:57:34.000Z
2021-01-13T16:57:34.000Z
tti/tti_explorer/case_generator.py
ashwinahuja/HowQuicklyCanWeGetBackToThePub
da9a041642c4d226fa9388e6241fe952a8a330ef
[ "MIT" ]
null
null
null
tti/tti_explorer/case_generator.py
ashwinahuja/HowQuicklyCanWeGetBackToThePub
da9a041642c4d226fa9388e6241fe952a8a330ef
[ "MIT" ]
null
null
null
import numpy as np from . import config, sensitivity from .case import simulate_case from .contacts import EmpiricalContactsSimulator from .utils import CASE_KEY, CONTACTS_KEY def _case_as_dict(case): dct = case.to_dict() dct["inf_profile"] = dct["inf_profile"].tolist() return dct def _contacts_as_dict...
31.672414
105
0.707676
bc49c60cb2b5d11ffebf56a5c8fab4b73f4df21f
103
py
Python
config.example.py
racterub/bybtbot
a7b580ef800377aa2266a36a3fe2cd943dc43e16
[ "MIT" ]
2
2021-09-19T09:57:54.000Z
2022-03-19T13:39:50.000Z
config.example.py
racterub/bybtbot
a7b580ef800377aa2266a36a3fe2cd943dc43e16
[ "MIT" ]
null
null
null
config.example.py
racterub/bybtbot
a7b580ef800377aa2266a36a3fe2cd943dc43e16
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Author: Racterub (root@racterub.me) # Licencse: MIT TOKEN = "" #TO BE EDITED
17.166667
37
0.679612