hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
6413620d962e9506c5127097362eec62b267ab7c
3,296
py
Python
SVM_gauss_kernel/SVM_gauss_kernel/LS_SVM.py
LiuChvn/TestRepository
f6ac6d8039480cf194f738c9befa4884d39554ea
[ "MIT" ]
null
null
null
SVM_gauss_kernel/SVM_gauss_kernel/LS_SVM.py
LiuChvn/TestRepository
f6ac6d8039480cf194f738c9befa4884d39554ea
[ "MIT" ]
1
2021-12-07T08:58:00.000Z
2021-12-07T08:58:00.000Z
SVM_gauss_kernel/SVM_gauss_kernel/LS_SVM.py
LiuChvn/TestRepository
f6ac6d8039480cf194f738c9befa4884d39554ea
[ "MIT" ]
null
null
null
import numpy as np from astropy.io import fits from scipy.ndimage.filters import convolve as convolveim from matplotlib.pylab import mpl from code_20190825 import ikernal23 as ikernel_svm # 解决画图是中文显示的问题 mpl.rcParams['font.sans-serif'] = ['SimHei'] ker_size = 1 [F, Fr, Fc, Frr, Fcc, Frc] = ikernel_svm.get_...
27.466667
131
0.643811
ee0e0b3f710360d22cdcbf01a54269cb3d2b8488
37,555
py
Python
validator/validator_gen_js.py
xavierleune/amphtml
8964cbe07b4395b0c9d2ad39de3f3c37437a4262
[ "Apache-2.0" ]
11
2017-09-12T21:57:04.000Z
2018-12-12T20:23:46.000Z
validator/validator_gen_js.py
xavierleune/amphtml
8964cbe07b4395b0c9d2ad39de3f3c37437a4262
[ "Apache-2.0" ]
34
2017-09-13T13:59:24.000Z
2018-10-01T17:06:39.000Z
validator/validator_gen_js.py
xavierleune/amphtml
8964cbe07b4395b0c9d2ad39de3f3c37437a4262
[ "Apache-2.0" ]
4
2017-01-08T08:03:31.000Z
2020-01-28T10:49:26.000Z
# # Copyright 2015 The AMP HTML Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
38.517949
109
0.701797
757cd48473e09c1de772ba2392b3b3394de123fc
19,496
py
Python
scripts/flickrripper.py
PArangSae/pywikibot
caf1401e71a81d11e681a6d6adfdea907aa33b94
[ "MIT" ]
null
null
null
scripts/flickrripper.py
PArangSae/pywikibot
caf1401e71a81d11e681a6d6adfdea907aa33b94
[ "MIT" ]
null
null
null
scripts/flickrripper.py
PArangSae/pywikibot
caf1401e71a81d11e681a6d6adfdea907aa33b94
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ A tool to transfer flickr photos to Wikimedia Commons. The following parameters are supported: -group_id: specify group ID of the pool -photoset_id: specify a photoset id -user_id: give the user id of the flickrriper user -start_id: the p...
37.135238
79
0.583761
23174401c3cd974aaaf2c58fcc11b0b1fd40cd94
1,865
py
Python
easyTX/server.py
VDHARV/easyTX-2.0
90cc9fcdccfd4ff267d13c14e5417d87df0475cc
[ "MIT" ]
null
null
null
easyTX/server.py
VDHARV/easyTX-2.0
90cc9fcdccfd4ff267d13c14e5417d87df0475cc
[ "MIT" ]
null
null
null
easyTX/server.py
VDHARV/easyTX-2.0
90cc9fcdccfd4ff267d13c14e5417d87df0475cc
[ "MIT" ]
null
null
null
import socket import cv2 import imutils import base64 import easyTX.constants as constants class Server(): """Server class of easyTX module. Must be defined if the machine generates a continous stream of data and wants to send it. """ def __init__(self, port): self.port = port def con...
35.865385
127
0.608579
1494e7ed93eb0bcee611fd752171a22e420fa6c6
77,213
py
Python
test_init_final.py
battingh/hs1
be81bfdb367c11d8e4cf72beff654208edb384bf
[ "Apache-2.0" ]
1
2020-01-25T07:41:46.000Z
2020-01-25T07:41:46.000Z
test_init_final.py
battingh/hs1
be81bfdb367c11d8e4cf72beff654208edb384bf
[ "Apache-2.0" ]
null
null
null
test_init_final.py
battingh/hs1
be81bfdb367c11d8e4cf72beff654208edb384bf
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ################ Server V13.2 ##################### import os import sys import asyncio import discord import datetime import random import math import logging from discord.ext import commands from gtts import gTTS from github import Github import base64 import re #정산 import ...
37.720078
274
0.595159
bf60bcfe20fa2c7c1e3266851c6025d266acf91b
3,385
py
Python
tools/data.py
biomed-AI/MTDsite
e59d67362fedb16a301600156322309dff27bed7
[ "MIT" ]
null
null
null
tools/data.py
biomed-AI/MTDsite
e59d67362fedb16a301600156322309dff27bed7
[ "MIT" ]
null
null
null
tools/data.py
biomed-AI/MTDsite
e59d67362fedb16a301600156322309dff27bed7
[ "MIT" ]
null
null
null
import numpy as np import math import os from math import * import sys def pssm_g(name,path): name+='.pssm' f=open(os.path.join(path,name),'r') rows = f.readlines() maxn=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] minn=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] ans=[ [0] *20 for i in range(3...
23.671329
97
0.477696
71929cf1ab774efd0344b27a7b9171dd37b90099
43,957
py
Python
mongoengine/document.py
situkangsayur/mongoengine
dabe8c1bb7e189d0dc8bdceb54eb1ca982a1f6b5
[ "MIT" ]
1
2018-03-18T05:38:14.000Z
2018-03-18T05:38:14.000Z
mongoengine/document.py
DipanshuSehjal/mongoengine
dabe8c1bb7e189d0dc8bdceb54eb1ca982a1f6b5
[ "MIT" ]
null
null
null
mongoengine/document.py
DipanshuSehjal/mongoengine
dabe8c1bb7e189d0dc8bdceb54eb1ca982a1f6b5
[ "MIT" ]
null
null
null
import re import warnings from bson.dbref import DBRef import pymongo from pymongo.read_preferences import ReadPreference import six from mongoengine import signals from mongoengine.base import (BaseDict, BaseDocument, BaseList, DocumentMetaclass, EmbeddedDocumentList, ...
40.513364
108
0.614328
a15ec5984dc25cda9fe13b92d7c135b3a57c2ee6
14,161
py
Python
backendResources/lambdaFunctions_Backups/SAMPLE_Lambda_Function_With_Nececessary_Python_Libraries/lambda_function.py
BaconPartyWOOOO/ImageUploader
349ecb30ec34994c8755ad9e4d9e2f05b2b71df4
[ "MIT" ]
null
null
null
backendResources/lambdaFunctions_Backups/SAMPLE_Lambda_Function_With_Nececessary_Python_Libraries/lambda_function.py
BaconPartyWOOOO/ImageUploader
349ecb30ec34994c8755ad9e4d9e2f05b2b71df4
[ "MIT" ]
null
null
null
backendResources/lambdaFunctions_Backups/SAMPLE_Lambda_Function_With_Nececessary_Python_Libraries/lambda_function.py
BaconPartyWOOOO/ImageUploader
349ecb30ec34994c8755ad9e4d9e2f05b2b71df4
[ "MIT" ]
null
null
null
import sys import logging import rds_mysql_config #name of config file you created to store db instance info import pymysql import json #rds settings rds_host = "rds-mysql-imageuploader.cw1ohpfyqn5w.us-east-1.rds.amazonaws.com" name = rds_mysql_config.db_username password = rds_mysql_config.db_password db_nam...
47.520134
235
0.466987
0cd711ba2f36b29123ee9e9b574e67134edb9380
2,877
py
Python
chat/tests.py
gabyxbinnaeah/TwinterApp
a0f68527a3e01cd47e49f9a17988ec5095422695
[ "MIT" ]
null
null
null
chat/tests.py
gabyxbinnaeah/TwinterApp
a0f68527a3e01cd47e49f9a17988ec5095422695
[ "MIT" ]
null
null
null
chat/tests.py
gabyxbinnaeah/TwinterApp
a0f68527a3e01cd47e49f9a17988ec5095422695
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import Profile,Image # Create your tests here. class ImageTestClass(TestCase): def setUp(self): ''' method that creates instance of image ''' self.vin= Profile(profile_photo="start.pgn",bio="Motivated IT geek") self.vin.save_pro...
28.485149
138
0.621828
4cdf5d6e6810ecb28bf232e05c83032e40ad2f49
279
py
Python
Flappy-Bird/helper/game_variables.py
preetparmar/Python-Games
39fdbe4772f86e737d7a12b5e1e55ec61184235e
[ "MIT" ]
null
null
null
Flappy-Bird/helper/game_variables.py
preetparmar/Python-Games
39fdbe4772f86e737d7a12b5e1e55ec61184235e
[ "MIT" ]
null
null
null
Flappy-Bird/helper/game_variables.py
preetparmar/Python-Games
39fdbe4772f86e737d7a12b5e1e55ec61184235e
[ "MIT" ]
null
null
null
# Description __doc__ = 'This file contains all the variables used in the game' __version__ = 1.0 # Global Variables for Game FPS = 120 SCREEN_WIDTH, SCREEN_HEIGHT = 288, 512 BASE_TOP = 437 PIPE_GAP = 150 PIPE_SPAWN_TIME = 1200 GRAVITY = 0.25 BIRD_JUMP = 6 SCORE_INCREASE = 0.01
21.461538
65
0.759857
6641fa880da3ff6d770781155cf5a55dd28ba882
439
py
Python
djangoproject/users/urls.py
ngonimombeshora/djangoproject
786c6546506843d9940735c5f8e64c3f294aac42
[ "MIT" ]
null
null
null
djangoproject/users/urls.py
ngonimombeshora/djangoproject
786c6546506843d9940735c5f8e64c3f294aac42
[ "MIT" ]
null
null
null
djangoproject/users/urls.py
ngonimombeshora/djangoproject
786c6546506843d9940735c5f8e64c3f294aac42
[ "MIT" ]
null
null
null
from django.urls import path from djangoproject.users.views import ( user_list_view, user_redirect_view, user_update_view, user_detail_view, ) app_name = "users" urlpatterns = [ path("", view=user_list_view, name="list"), path("~redirect/", view=user_redirect_view, name="redirect"), path("...
25.823529
66
0.697039
d4a90ce05f92f48658c7efd1229f4909f2f677a4
513
py
Python
removeElement.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
removeElement.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
removeElement.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
class Solution: """ @param A: A list of integers @param elem: An integer @return: The new length after remove """ def removeElement(self, A, elem): # write your code here status = True k = 0 init_length = len(A) while status: try: A.remo...
21.375
42
0.504873
61e28299ac4c19db63d5778ca4f4d56abfe3d953
1,670
py
Python
bireme/biblioref/migrations/0021_auto_20161026_1746.py
rfdeoliveira/fi-admin
c2df084c7e79d587e2273dc222f106fa243b7f6e
[ "MIT", "Python-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
bireme/biblioref/migrations/0021_auto_20161026_1746.py
rfdeoliveira/fi-admin
c2df084c7e79d587e2273dc222f106fa243b7f6e
[ "MIT", "Python-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
bireme/biblioref/migrations/0021_auto_20161026_1746.py
rfdeoliveira/fi-admin
c2df084c7e79d587e2273dc222f106fa243b7f6e
[ "MIT", "Python-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biblioref', '0020_reference_interoperability_source'), ] operations = [ migrations.CreateModel( name='ReferenceA...
36.304348
119
0.608383
43510c5d643fef5150fde5ef44daeddd493a44a2
3,519
py
Python
ansible/modules/remote_management/ipmi/ipmi_power.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2021-04-02T08:08:39.000Z
2021-04-02T08:08:39.000Z
ansible/modules/remote_management/ipmi/ipmi_power.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/modules/remote_management/ipmi/ipmi_power.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2020-05-03T01:13:16.000Z
2020-05-03T01:13:16.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
26.066667
110
0.627451
2f17c375c79322048d7df989fe52d38194f46e08
359
py
Python
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/argparse/argparse_with_help.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/argparse/argparse_with_help.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/argparse/argparse_with_help.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# Copyright (c) 2010 Doug Hellmann. All rights reserved. # """ """ # end_pymotw_header import argparse parser = argparse.ArgumentParser(add_help=True) parser.add_argument("-a", action="store_true", default=False) parser.add_argument("-b", action="store", dest="b") parser.add_argument("-c", action="store", dest="c",...
22.4375
61
0.721448
7435117d343fbc54c7546f32a4ac912a1f219831
9,289
py
Python
sdk/python/pulumi_azure_native/relay/latest/wcf_relay.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/relay/latest/wcf_relay.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/relay/latest/wcf_relay.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
45.534314
461
0.658951
bdad32e4dd507bcfe152c19eca384936bc996272
2,171
py
Python
cogs/clear.py
QuentiumYT/QuentiumBot
1673d24d93f13f464b1175424529c4d58abb5c00
[ "MIT" ]
9
2019-11-14T10:12:00.000Z
2021-12-17T13:05:40.000Z
cogs/clear.py
QuentiumYT/QuentiumBot
1673d24d93f13f464b1175424529c4d58abb5c00
[ "MIT" ]
null
null
null
cogs/clear.py
QuentiumYT/QuentiumBot
1673d24d93f13f464b1175424529c4d58abb5c00
[ "MIT" ]
4
2020-08-20T21:24:52.000Z
2021-12-17T13:05:17.000Z
import discord from discord.ext import commands from QuentiumBot import HandleData, get_translations # Basic command configs cmd_name = "clear" tran = get_translations() aliases = [] if not tran[cmd_name]["fr"]["aliases"] else tran[cmd_name]["fr"]["aliases"].split("/") class ClearAdminRights(commands.Cog): """Cle...
37.431034
107
0.608936
116627394d6b2db70b043bee1b06269eaaa6c758
153
py
Python
actividades/fadcanic/urls.py
shiminasai/plataforma_FADCANIC
14831525e4104da7f05ce87e59238f1e4193c184
[ "MIT" ]
null
null
null
actividades/fadcanic/urls.py
shiminasai/plataforma_FADCANIC
14831525e4104da7f05ce87e59238f1e4193c184
[ "MIT" ]
null
null
null
actividades/fadcanic/urls.py
shiminasai/plataforma_FADCANIC
14831525e4104da7f05ce87e59238f1e4193c184
[ "MIT" ]
2
2015-05-19T20:50:41.000Z
2015-05-19T20:51:04.000Z
from django.conf.urls import * urlpatterns = patterns('actividades.fadcanic.views', url(r'^$', 'filtro_programa', name='filtro_programa'), )
30.6
62
0.686275
927451a98a36119a240e45a29778f7885cef273a
258,206
py
Python
sdk/python/pulumi_vsphere/distributed_virtual_switch.py
pulumi/pulumi-vsphere
a4536cd49860323bd57cbf2a127c5b57c9f9b60c
[ "ECL-2.0", "Apache-2.0" ]
38
2018-09-17T18:56:29.000Z
2022-03-26T03:07:20.000Z
sdk/python/pulumi_vsphere/distributed_virtual_switch.py
pulumi/pulumi-vsphere
a4536cd49860323bd57cbf2a127c5b57c9f9b60c
[ "ECL-2.0", "Apache-2.0" ]
75
2018-09-17T13:18:24.000Z
2022-03-31T21:32:30.000Z
sdk/python/pulumi_vsphere/distributed_virtual_switch.py
pulumi/pulumi-vsphere
a4536cd49860323bd57cbf2a127c5b57c9f9b60c
[ "ECL-2.0", "Apache-2.0" ]
2
2019-10-05T10:30:01.000Z
2020-09-30T11:16:59.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
51.180575
172
0.67945
b4e5704197b37d6f824ffe71ec6c61aae924e0d6
898
py
Python
ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py
alexa/alexa-apis-for-python
5a7b1baea10339e06d52552777d5cd802534fe88
[ "Apache-2.0" ]
90
2018-09-19T21:56:42.000Z
2022-03-30T11:25:21.000Z
ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py
alexa/alexa-apis-for-python
5a7b1baea10339e06d52552777d5cd802534fe88
[ "Apache-2.0" ]
11
2018-09-23T12:16:48.000Z
2021-06-10T19:49:45.000Z
ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py
alexa/alexa-apis-for-python
5a7b1baea10339e06d52552777d5cd802534fe88
[ "Apache-2.0" ]
28
2018-09-19T22:30:38.000Z
2022-02-22T22:57:07.000Z
# coding: utf-8 # # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'lice...
39.043478
96
0.801782
06672712723d745820a2bd50273f0103560aebc0
5,019
py
Python
hyperbit/message.py
g1itch/hyperbit
82c3f3916926f0b8ae68b5526956790061d4dde2
[ "MIT" ]
null
null
null
hyperbit/message.py
g1itch/hyperbit
82c3f3916926f0b8ae68b5526956790061d4dde2
[ "MIT" ]
null
null
null
hyperbit/message.py
g1itch/hyperbit
82c3f3916926f0b8ae68b5526956790061d4dde2
[ "MIT" ]
null
null
null
# Copyright 2015-2016 HyperBit developers import logging logger = logging.getLogger(__name__) class Comment2(): def __init__(self, db, rowid): self._db = db self._rowid = rowid @property def thread(self): thread_id = self._db.execute( 'SELECT thread_id FROM comments ...
29.698225
78
0.571229
f17594533173ca41ce80d2c9bc52b92724308d42
597
py
Python
uf/__init__.py
dumpmemory/unif
a301d7207791664fb107edda607c55f2d50dd17d
[ "Apache-2.0" ]
null
null
null
uf/__init__.py
dumpmemory/unif
a301d7207791664fb107edda607c55f2d50dd17d
[ "Apache-2.0" ]
null
null
null
uf/__init__.py
dumpmemory/unif
a301d7207791664fb107edda607c55f2d50dd17d
[ "Apache-2.0" ]
null
null
null
__version__ = "v2.4.7" # loading models from .apps import * from .com import MultiProcess from .com import load from .com import download from .com import download_all from .com import get_checkpoint_path from .com import get_assignment_map from .com import list_variables from .com import list_resources from .com im...
18.65625
36
0.726968
a681acfde7a7caf97ba976c7162003bfd545b64d
702
py
Python
src/blog/forms.py
vybhavpai/Blog
8e0adf52bfba5502f787dd339866f39b5f4856f4
[ "bzip2-1.0.6" ]
null
null
null
src/blog/forms.py
vybhavpai/Blog
8e0adf52bfba5502f787dd339866f39b5f4856f4
[ "bzip2-1.0.6" ]
17
2020-06-06T00:04:23.000Z
2022-03-12T00:25:43.000Z
src/blog/forms.py
vybhavpai/Blog
8e0adf52bfba5502f787dd339866f39b5f4856f4
[ "bzip2-1.0.6" ]
null
null
null
from django import forms from blog.models import BlogPost,Extra_Image class CreateBlogPostForm(forms.ModelForm): class Meta: model = BlogPost fields = ['title','body','image','category'] class UpdateBlogPostForm(forms.ModelForm): class Meta: model = BlogPost fields = ['title','body','image'] def save(se...
22.645161
47
0.722222
c819700ab207dd489b16b74c0e814efd6d05ee85
1,664
py
Python
easycv/utils.py
Resi-Coders/cv
51bbb93b978f2bf7884ea93343b93a63ef032627
[ "MIT" ]
2
2020-01-31T11:59:14.000Z
2020-03-15T00:54:00.000Z
easycv/utils.py
Resi-Coders/cv
51bbb93b978f2bf7884ea93343b93a63ef032627
[ "MIT" ]
35
2020-04-08T11:55:08.000Z
2022-03-15T01:17:47.000Z
easycv/utils.py
Resi-Coders/cv
51bbb93b978f2bf7884ea93343b93a63ef032627
[ "MIT" ]
null
null
null
import cv2 import numpy as np import sys from math import ceil def nearest_square_side(n): return ceil(n ** 0.5) def _sort_by(points, axis): return sorted(points, key=lambda x: x[0 if axis == "x" else 1]) def order_corners(corners): sorted_by_x = _sort_by(corners, "x") left_points = sorted_by_x[:...
23.771429
88
0.661058
bd39d5f877eff02d731adbc24b4d6ace162acddd
3,670
py
Python
src/python-bindings/tests/event_tests.py
kurhula/HTCondor
457d077e91900cd899b6254c4f0c8f582a70d0ea
[ "Apache-2.0" ]
null
null
null
src/python-bindings/tests/event_tests.py
kurhula/HTCondor
457d077e91900cd899b6254c4f0c8f582a70d0ea
[ "Apache-2.0" ]
null
null
null
src/python-bindings/tests/event_tests.py
kurhula/HTCondor
457d077e91900cd899b6254c4f0c8f582a70d0ea
[ "Apache-2.0" ]
null
null
null
import os import time import unittest import threading import classad import htcondor SAMPLE_EVENT_TEXT = """\ 006 (23515.000.000) 04/09 17:55:39 Image size of job updated: 260 1 - MemoryUsage of job (MB) 252 - ResidentSetSize of job (KB) ... """ class TestEventReader(unittest.TestCase): de...
30.330579
91
0.595368
269cc2166b7e7534d1594c7c8e1a37799d3bbf5e
402
py
Python
guess the number/guess.py
VamsiKrishna04/Hacktoberfest_2021-1
6d0d217161957746a4b60b7d1f0f71db21026f5a
[ "MIT" ]
1
2021-10-20T12:15:27.000Z
2021-10-20T12:15:27.000Z
guess the number/guess.py
VamsiKrishna04/Hacktoberfest_2021-1
6d0d217161957746a4b60b7d1f0f71db21026f5a
[ "MIT" ]
3
2021-10-22T04:46:25.000Z
2021-11-17T06:37:10.000Z
guess the number/guess.py
VamsiKrishna04/Hacktoberfest_2021-1
6d0d217161957746a4b60b7d1f0f71db21026f5a
[ "MIT" ]
12
2021-10-21T13:56:49.000Z
2021-11-17T06:32:30.000Z
import random max_num = int(input("Enter the maximum no- ")) random_number = random.randint(1, max_num) guess = 0 while guess != random_number: guess = int(input(f"Guess the number between 1 & {max_num}: ")) if guess < random_number: print("Wrong! Too low...") elif guess > random_number: p...
30.923077
67
0.666667
bce1c87c6f535d2b51ea77e4e0ba0efbae100f52
560
py
Python
lego/apps/restricted/notifications.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
45
2017-10-24T12:09:06.000Z
2021-11-03T21:21:03.000Z
lego/apps/restricted/notifications.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
980
2017-10-24T12:29:07.000Z
2022-03-31T04:04:31.000Z
lego/apps/restricted/notifications.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
23
2018-04-11T16:34:22.000Z
2021-11-23T12:28:30.000Z
from lego.apps.notifications.constants import RESTRICTED_MAIL_SENT from lego.apps.notifications.notification import Notification class RestrictedMailSentNotification(Notification): name = RESTRICTED_MAIL_SENT def generate_mail(self): return self._delay_mail( to_email=self.user.email, ...
32.941176
66
0.710714
5d786e608a4f30bb2d6d8b21aa0afda42283fd2c
3,858
py
Python
mowgli_etl/pipeline/sentic/sentic_transformer.py
tetherless-world/mowgli
28c19eba41e03e053ae4addff56a313d926e18d7
[ "MIT" ]
4
2021-01-15T15:36:23.000Z
2021-09-01T06:52:05.000Z
mowgli_etl/pipeline/sentic/sentic_transformer.py
tetherless-world/mowgli
28c19eba41e03e053ae4addff56a313d926e18d7
[ "MIT" ]
63
2020-05-04T13:48:04.000Z
2020-06-06T02:32:58.000Z
mowgli_etl/pipeline/sentic/sentic_transformer.py
tetherless-world/mowgli-etl
28c19eba41e03e053ae4addff56a313d926e18d7
[ "MIT" ]
null
null
null
from typing import Generator, Union from xml.dom.minidom import parse from mowgli_etl.model.kg_edge import KgEdge from mowgli_etl.model.kg_node import KgNode from mowgli_etl._transformer import _Transformer from mowgli_etl.pipeline.sentic import sentic_types from mowgli_etl.pipeline.sentic.sentic_constants import SEN...
39.773196
88
0.54536
29bff3894174e4bb6c1356e4da22bd7f05831238
656
py
Python
src/inmanta/__init__.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
6
2021-03-09T10:24:02.000Z
2022-01-16T03:52:11.000Z
src/inmanta/__init__.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
1,319
2020-12-18T08:52:29.000Z
2022-03-31T18:17:32.000Z
src/inmanta/__init__.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
4
2021-03-03T15:36:50.000Z
2022-03-11T11:41:51.000Z
""" Copyright 2017 Inmanta 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 ...
32.8
76
0.728659
097c2837203f1dd5e61f8f3bffdda7ce379f7122
10,403
py
Python
sdk/table/azure-table/azure/table/_shared/policies_async.py
seankane-msft/azure-sdk-for-python
7514e744dbf5cdf6c527e9afb11e529a948cfbc0
[ "MIT" ]
2
2021-01-15T18:30:53.000Z
2021-09-07T18:31:31.000Z
sdk/table/azure-table/azure/table/_shared/policies_async.py
seankane-msft/azure-sdk-for-python
7514e744dbf5cdf6c527e9afb11e529a948cfbc0
[ "MIT" ]
null
null
null
sdk/table/azure-table/azure/table/_shared/policies_async.py
seankane-msft/azure-sdk-for-python
7514e744dbf5cdf6c527e9afb11e529a948cfbc0
[ "MIT" ]
null
null
null
# # ------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # Licensed under the MIT License. See License.txt in the project root for # # license information. # # -------------------------------------------------------------------------- ...
46.86036
121
0.613381
8758bc9fce43ac6ddb845cea81486f4632fe565a
5,782
py
Python
imperiumab/kokes_od_db_cedr.py
vlki/imperiumab-scripts
4133a9b6105331e41245344882a4c45aed9a7870
[ "MIT" ]
null
null
null
imperiumab/kokes_od_db_cedr.py
vlki/imperiumab-scripts
4133a9b6105331e41245344882a4c45aed9a7870
[ "MIT" ]
null
null
null
imperiumab/kokes_od_db_cedr.py
vlki/imperiumab-scripts
4133a9b6105331e41245344882a4c45aed9a7870
[ "MIT" ]
null
null
null
from datetime import datetime import decimal import psycopg2 from pprint import pprint from imperiumab.subsidy import Subsidy from imperiumab.exchange_rates import get_eur_to_czk_rate, get_eur_to_czk_rate_text eu_finance_sources_names = [ 'Evropský sociální fond', 'Evropský fond pro regionální rozvoj', 'E...
38.291391
257
0.540643
58ae63cf33ec876a5e009c8a56f2de00d295f4ae
1,058
py
Python
supply_maker/src/model/card/evaluate/functions.py
LouiS0616/DominionSupplyMaker
0317895699530b81bc183151add6b058e12ea59a
[ "MIT" ]
null
null
null
supply_maker/src/model/card/evaluate/functions.py
LouiS0616/DominionSupplyMaker
0317895699530b81bc183151add6b058e12ea59a
[ "MIT" ]
null
null
null
supply_maker/src/model/card/evaluate/functions.py
LouiS0616/DominionSupplyMaker
0317895699530b81bc183151add6b058e12ea59a
[ "MIT" ]
null
null
null
from supply_maker.src.model.card.attr.edition import Edition from ..card import Card from .card_evaluater import CardEvaluator # def has_attr(**kwargs) -> 'CardEvaluator': """ p = has_attr(ex=ExtensionName('Sample'), cost=Cost(3)) means -> if card c is from ex 'Sample' AND costs just 3, p(c) returns True....
27.128205
79
0.670132
0eaaea03ac9cc2b05301c3e7632972609836219e
1,441
py
Python
nmigen/test/compat/test_signed.py
jeanthom/nmigen
e40253fbb86ab60cca1e80523ad29a88ccbd41ad
[ "BSD-2-Clause" ]
7
2020-05-07T18:35:00.000Z
2021-09-09T14:06:41.000Z
nmigen/test/compat/test_signed.py
jeanthom/nmigen
e40253fbb86ab60cca1e80523ad29a88ccbd41ad
[ "BSD-2-Clause" ]
null
null
null
nmigen/test/compat/test_signed.py
jeanthom/nmigen
e40253fbb86ab60cca1e80523ad29a88ccbd41ad
[ "BSD-2-Clause" ]
null
null
null
import unittest from ...compat import * from .support import SimCase class SignedCase(SimCase, unittest.TestCase): class TestBench(Module): def __init__(self): self.a = Signal((3, True)) self.b = Signal((4, True)) comps = [ lambda p, q: p > q, ...
33.511628
70
0.388619
2ded78fb5807ff20b67498d13ee152085c445412
5,297
py
Python
main/routes.py
15klli/WeChat-Clone
f75de3bfc96c0e7bfbc02c7c3f1ce018a8487c67
[ "MIT" ]
null
null
null
main/routes.py
15klli/WeChat-Clone
f75de3bfc96c0e7bfbc02c7c3f1ce018a8487c67
[ "MIT" ]
null
null
null
main/routes.py
15klli/WeChat-Clone
f75de3bfc96c0e7bfbc02c7c3f1ce018a8487c67
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import request, render_template, jsonify, Markup, abort, \ send_from_directory from . import app, redis from .utils import check_signature, get_jsapi_signature_data, init_wechat_sdk from .response import wechat_response from .plugins import score, library fr...
37.041958
77
0.568624
744a17e0b435f80a3448a41892490140353a6350
25,783
py
Python
cds_era5_download_script_new.py
ZiskinZiv/era5_downloader
f04fa9f3f4e1897a745733cf11290f748b348e42
[ "MIT" ]
null
null
null
cds_era5_download_script_new.py
ZiskinZiv/era5_downloader
f04fa9f3f4e1897a745733cf11290f748b348e42
[ "MIT" ]
null
null
null
cds_era5_download_script_new.py
ZiskinZiv/era5_downloader
f04fa9f3f4e1897a745733cf11290f748b348e42
[ "MIT" ]
1
2019-04-16T07:16:50.000Z
2019-04-16T07:16:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 3 18:09:05 2020 @author: shlomi """ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 18 11:40:34 2019 @author: shlomi data size scaling estimation: 10 MB for ~120 items max : 100,000 items ~ 8.3 GB typical year : 55000 items ...
39.243531
109
0.527091
a9204f2514c401a065362510ed5d57902ef101a7
832
py
Python
app/lambda/list_patients/lambda_function.py
ShivaniMehendarge/medical-transcription-analysis
6eda0dd1614a4466aab035998bf0e745a2c200a0
[ "MIT-0" ]
53
2020-05-07T19:00:17.000Z
2022-02-01T07:09:01.000Z
app/lambda/list_patients/lambda_function.py
ShivaniMehendarge/medical-transcription-analysis
6eda0dd1614a4466aab035998bf0e745a2c200a0
[ "MIT-0" ]
21
2020-05-08T02:52:06.000Z
2022-02-15T00:49:23.000Z
app/lambda/list_patients/lambda_function.py
ShivaniMehendarge/medical-transcription-analysis
6eda0dd1614a4466aab035998bf0e745a2c200a0
[ "MIT-0" ]
22
2020-05-19T02:48:12.000Z
2022-03-28T19:00:10.000Z
import json import sys sys.path.append("../") from lambda_base import LambdaBase from models import Patient from constant_variables import * from response_helper import sendResponse class ListPatientsLambda(LambdaBase): def __init__(self): pass def getItems(self, Patientid): return Patient()...
32
153
0.705529
9d8a79a0d0b1312c1df1b98b4b31694e03910553
1,010
py
Python
guillermo/forms.py
GBrachetta/guillermo
39e3ae082d2844482adf46143598edd2339447af
[ "PostgreSQL" ]
null
null
null
guillermo/forms.py
GBrachetta/guillermo
39e3ae082d2844482adf46143598edd2339447af
[ "PostgreSQL" ]
8
2021-06-09T18:23:43.000Z
2022-03-12T00:56:01.000Z
guillermo/forms.py
GBrachetta/guillermo
39e3ae082d2844482adf46143598edd2339447af
[ "PostgreSQL" ]
1
2020-11-10T21:33:31.000Z
2020-11-10T21:33:31.000Z
from django import forms class ContactForm(forms.Form): """ Form for the contact view and template """ name = forms.CharField(label="") email = forms.EmailField(label="") message = forms.CharField( label="", widget=forms.Textarea( attrs={ "rows": 8,...
25.897436
72
0.532673
e93afd6aa0a933c080b94be91d73afd0e17d8d59
21,305
py
Python
sdk/python/kfp/compiler/compiler.py
ggaaooppeenngg/pipelines
9b77d4a8a67ab4fa2a10c4b70dd94ef2a83c6097
[ "Apache-2.0" ]
null
null
null
sdk/python/kfp/compiler/compiler.py
ggaaooppeenngg/pipelines
9b77d4a8a67ab4fa2a10c4b70dd94ef2a83c6097
[ "Apache-2.0" ]
null
null
null
sdk/python/kfp/compiler/compiler.py
ggaaooppeenngg/pipelines
9b77d4a8a67ab4fa2a10c4b70dd94ef2a83c6097
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.044643
122
0.669139
0b027142b258dcba7e0ddf8cfb994e9b336f59ff
7,123
py
Python
examples/tacotron2/extract_duration.py
azraelkuan/TensorflowTTS
cabca9f9d656928e580c156718a6f655e987766e
[ "Apache-2.0" ]
1
2021-04-07T09:23:50.000Z
2021-04-07T09:23:50.000Z
examples/tacotron2/extract_duration.py
azraelkuan/TensorflowTTS
cabca9f9d656928e580c156718a6f655e987766e
[ "Apache-2.0" ]
null
null
null
examples/tacotron2/extract_duration.py
azraelkuan/TensorflowTTS
cabca9f9d656928e580c156718a6f655e987766e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Minh Nguyen (@dathudeptrai) # # 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 ...
34.245192
96
0.615892
d85d404ba38da8f24efe91d84aa19fe392d1e6f5
3,563
py
Python
tests/extensions/marshal/test_fields.py
ssfdust/smorest-sfs
139f6817989ab041c81761d183169de20a26597e
[ "Apache-2.0" ]
8
2020-05-11T07:11:03.000Z
2022-03-25T01:58:18.000Z
tests/extensions/marshal/test_fields.py
ssfdust/smorest-sfs
139f6817989ab041c81761d183169de20a26597e
[ "Apache-2.0" ]
null
null
null
tests/extensions/marshal/test_fields.py
ssfdust/smorest-sfs
139f6817989ab041c81761d183169de20a26597e
[ "Apache-2.0" ]
2
2020-05-11T03:53:38.000Z
2021-03-25T01:11:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from typing import Dict, Tuple, Union import pytest from flask import Flask from marshmallow import Schema, ValidationError from pendulum import tz from pendulum.datetime import DateTime utc = tz.timezone("utc") def test_fields_dump(ma_app:...
31.254386
88
0.527365
b1b96f903eb59e2d73af945bc612aac2cfb887de
349
py
Python
preprocess_main.py
RayonSL/Competition
eafc914f3cc0af394cfc1aed0769a1afac044680
[ "Apache-2.0" ]
2
2019-10-31T02:15:09.000Z
2020-01-14T10:41:04.000Z
preprocess_main.py
RayonSL/Competition
eafc914f3cc0af394cfc1aed0769a1afac044680
[ "Apache-2.0" ]
null
null
null
preprocess_main.py
RayonSL/Competition
eafc914f3cc0af394cfc1aed0769a1afac044680
[ "Apache-2.0" ]
null
null
null
# from preprocess import extract_image_and_label # from preprocess import train_val_split # from preprocess import generate_test_a # from preprocess import generate_round1_normal # from preprocess import merge_train_with_round1_normal from preprocess import generate_round1_full_train from preprocess import merge_train_...
49.857143
64
0.893983
677dca5a29784edb2487d106af8a2a13bfd0bfe6
3,979
py
Python
iRedMail-0.9.9/tools/ldap_assign_user_to_groups.py
lnfel/iredmail.0.9.9_deployer
9c4e6c816f08e8e142b94ed2f5b35d47ac1e062f
[ "MIT" ]
null
null
null
iRedMail-0.9.9/tools/ldap_assign_user_to_groups.py
lnfel/iredmail.0.9.9_deployer
9c4e6c816f08e8e142b94ed2f5b35d47ac1e062f
[ "MIT" ]
null
null
null
iRedMail-0.9.9/tools/ldap_assign_user_to_groups.py
lnfel/iredmail.0.9.9_deployer
9c4e6c816f08e8e142b94ed2f5b35d47ac1e062f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # Author: Zhang Huangbin <zhb _at_ iredmail.org> # Purpose: Assign one user to specified groups. # USAGE # # * Set correct LDAP server address (LDAP_URI), LDAP suffix (LDAP_SUFFIX), # bind dn (BINDDN) and password (BINDPW). # # * Run this script: # # $ python ldap...
26.350993
114
0.637095
02caef5363ada84f05ae73be315342026a26762f
2,398
py
Python
tempest/api/identity/v2/test_api_discovery.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
1
2021-05-21T08:24:02.000Z
2021-05-21T08:24:02.000Z
tempest/api/identity/v2/test_api_discovery.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
tempest/api/identity/v2/test_api_discovery.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 OpenStack Foundation. # Copyright 2015, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
40.644068
78
0.670559
f8287777658fe2fd720f4f886c23a81e1691a6a7
418
py
Python
app/datasources/alarmrelay.py
josephrenda/rpi_lcars
f026d6f71356809a329db05b0d7a7ab63c63b94a
[ "MIT" ]
1
2020-03-11T21:09:36.000Z
2020-03-11T21:09:36.000Z
app/datasources/alarmrelay.py
josephrenda/rpi_lcars
f026d6f71356809a329db05b0d7a7ab63c63b94a
[ "MIT" ]
null
null
null
app/datasources/alarmrelay.py
josephrenda/rpi_lcars
f026d6f71356809a329db05b0d7a7ab63c63b94a
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO from time import sleep """ Relay is connected to pin 32 (IN), and 4 for VCC and 6 from Ground """ def AlarmOn(): relayPin = 32 GPIO.setmode(GPIO.BOARD) GPIO.setup(relayPin, GPIO.OUT) GPIO.output(relayPin, GPIO.HIGH) return def AlarmOff(): relayPin = 32 GPIO.setmode...
17.416667
66
0.667464
9f334ecf7c2e1207c5ff7efdca09ed6c22904de3
1,983
py
Python
docs/conf.py
meccaLeccaHi/pymoth
92189887e316e0d17426952625dd33746d2657cf
[ "MIT" ]
6
2019-08-19T15:47:40.000Z
2020-12-01T03:47:52.000Z
docs/conf.py
meccaLeccaHi/pyMoth
92189887e316e0d17426952625dd33746d2657cf
[ "MIT" ]
10
2020-01-28T22:55:43.000Z
2022-03-11T23:55:59.000Z
docs/conf.py
meccaLeccaHi/pyMoth
92189887e316e0d17426952625dd33746d2657cf
[ "MIT" ]
3
2019-12-10T04:21:29.000Z
2020-12-20T15:43:32.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
36.054545
79
0.66465
0ce0b6db05143a569a3ab047aab0099364d24257
5,778
py
Python
azure-servicefabric/azure/servicefabric/models/stateful_replica_new_health_report_event_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-servicefabric/azure/servicefabric/models/stateful_replica_new_health_report_event_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-servicefabric/azure/servicefabric/models/stateful_replica_new_health_report_event_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-10-16T13:08:23.000Z
2018-10-16T13:08:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.243478
357
0.670128
bc09db56aa32cc79cf38d57eec55c4a48730cf89
712
py
Python
debugging-profiling/debug_fib.py
asteroidshappen/school2021
7533c8524fa53127c4da1ffe0ad83b09eb59107a
[ "MIT" ]
252
2021-05-18T11:58:17.000Z
2022-03-12T06:48:52.000Z
debugging-profiling/debug_fib.py
asteroidshappen/school2021
7533c8524fa53127c4da1ffe0ad83b09eb59107a
[ "MIT" ]
44
2021-05-21T14:28:34.000Z
2021-07-12T22:36:06.000Z
debugging-profiling/debug_fib.py
asteroidshappen/school2021
7533c8524fa53127c4da1ffe0ad83b09eb59107a
[ "MIT" ]
128
2021-05-24T18:32:54.000Z
2022-03-26T11:24:16.000Z
import matplotlib.pyplot as plt import math GOLDEN = (1 + 5 ** 0.5) / 2 def fibonacci(k): if k == 0: return 0 if k == 1: return 1 return fibonacci(k - 2) + fibonacci(k + 1) def compute_golden_ratio(accuracy_level=10): return fibonacci(accuracy_level) / fibonacci(accuracy_level - 1...
18.736842
68
0.643258
384f96f3f52339cf743bcfcce08d3064227268bc
3,849
py
Python
homeassistant/components/cover/rpi_gpio.py
don66/home-assistant
a277470363c0758bb305410aad49c257ff8bac40
[ "Apache-2.0" ]
7
2018-06-29T01:13:54.000Z
2020-04-01T16:08:27.000Z
homeassistant/components/cover/rpi_gpio.py
don66/home-assistant
a277470363c0758bb305410aad49c257ff8bac40
[ "Apache-2.0" ]
null
null
null
homeassistant/components/cover/rpi_gpio.py
don66/home-assistant
a277470363c0758bb305410aad49c257ff8bac40
[ "Apache-2.0" ]
3
2018-10-09T08:37:48.000Z
2019-11-16T08:32:27.000Z
""" Support for controlling a Raspberry Pi cover. Instructions for building the controller can be found here https://github.com/andrewshilliday/garage-door-controller For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover.rpi_gpio/ """ import logging from...
32.075
79
0.707716
33e99bf9579a959a34b2ec01732878f5ecc81d95
1,973
py
Python
setup.py
xiyouMc/NCloudBot
c4832f3ee7630ba104a89559f09c1fc366d1547b
[ "0BSD" ]
255
2017-06-23T02:11:01.000Z
2022-03-21T02:07:26.000Z
setup.py
mrg1995/ncmbot
c4832f3ee7630ba104a89559f09c1fc366d1547b
[ "ISC" ]
17
2017-06-24T03:59:59.000Z
2022-03-11T23:13:03.000Z
setup.py
mrg1995/ncmbot
c4832f3ee7630ba104a89559f09c1fc366d1547b
[ "ISC" ]
57
2017-06-23T03:50:46.000Z
2022-01-17T13:38:14.000Z
# -*- coding: utf-8 -*- from __future__ import print_function from setuptools import setup, find_packages import sys import os if sys.argv[-1] == "publish": os.system("python setup.py register sdist upload -r pypi") sys.exit() if sys.argv[-1] == "test": os.system("python test_ncmbot.py") sys.e...
27.027397
77
0.578814
1cd32576d81b3e72964eefe7fbedda193601d6c6
3,928
py
Python
libheap/frontend/commands/gdb/freebins.py
saidelike/libheap
820088e242c4af2947eaaf4a6c96315135763cd3
[ "MIT" ]
498
2015-02-27T05:28:52.000Z
2022-03-31T03:09:11.000Z
libheap/frontend/commands/gdb/freebins.py
saidelike/libheap
820088e242c4af2947eaaf4a6c96315135763cd3
[ "MIT" ]
30
2015-01-15T14:15:29.000Z
2021-05-11T18:11:39.000Z
libheap/frontend/commands/gdb/freebins.py
saidelike/libheap
820088e242c4af2947eaaf4a6c96315135763cd3
[ "MIT" ]
98
2015-06-08T02:27:43.000Z
2021-06-25T21:59:16.000Z
from __future__ import print_function import sys try: import gdb except ImportError: print("Not running inside of GDB, exiting...") sys.exit() from libheap.ptmalloc.ptmalloc import ptmalloc from libheap.frontend.printutils import print_value from libheap.frontend.printutils import print_error from libhe...
34.156522
78
0.522658
adc96fc097415019c4ab1682f64e0bc2f80473c4
26
py
Python
2021-10-Python-SEA-ENGRSL-Workshops/Workshop_2-Hello-Tello/code/s04b_s0.py
shawnduong/manimations
1d36d9d1e7dff90a1a8da1e687ef442f750e29c5
[ "MIT" ]
null
null
null
2021-10-Python-SEA-ENGRSL-Workshops/Workshop_2-Hello-Tello/code/s04b_s0.py
shawnduong/manimations
1d36d9d1e7dff90a1a8da1e687ef442f750e29c5
[ "MIT" ]
null
null
null
2021-10-Python-SEA-ENGRSL-Workshops/Workshop_2-Hello-Tello/code/s04b_s0.py
shawnduong/manimations
1d36d9d1e7dff90a1a8da1e687ef442f750e29c5
[ "MIT" ]
null
null
null
def function_name(): ...
8.666667
20
0.615385
49c226775f6c4450f1971658a658ad722e403234
4,899
py
Python
yolo/backend/utils/eval/_box_match.py
TonyZ1Min/Yolo-digit-detector
b805c957d51c8e276fc3206ca782c891ad20dca4
[ "MIT" ]
251
2018-01-28T17:33:31.000Z
2022-02-24T06:01:10.000Z
yolo/backend/utils/eval/_box_match.py
TonyZ1Min/Yolo-digit-detector
b805c957d51c8e276fc3206ca782c891ad20dca4
[ "MIT" ]
40
2018-01-04T12:49:41.000Z
2022-01-25T13:59:48.000Z
yolo/backend/utils/eval/_box_match.py
TonyZ1Min/Yolo-digit-detector
b805c957d51c8e276fc3206ca782c891ad20dca4
[ "MIT" ]
104
2018-01-25T08:21:22.000Z
2022-01-17T18:50:01.000Z
# -*- coding: utf-8 -*- import numpy as np from sklearn.utils.linear_assignment_ import linear_assignment class BoxMatcher(object): """ # Args boxes1 : ndarray, shape of (N, 4) (x1, y1, x2, y2) ordered boxes2 : ndarray, shape of (M, 4) (x1, y1, x2, y2) ordere...
34.020833
119
0.512554
4f941a5c7aeb6ba3d8ed6c672c2c7da76c6bba89
3,696
py
Python
dsbox/datapreprocessing/cleaner/voter.py
usc-isi-i2/dsbox-cleaning
3cb5146dbf89f0ea2f8bf71a843eb1cfa63f7917
[ "MIT" ]
7
2017-06-28T18:36:46.000Z
2018-01-27T01:40:29.000Z
dsbox/datapreprocessing/cleaner/voter.py
usc-isi-i2/dsbox-cleaning
3cb5146dbf89f0ea2f8bf71a843eb1cfa63f7917
[ "MIT" ]
47
2017-06-09T19:25:19.000Z
2019-04-12T08:50:32.000Z
dsbox/datapreprocessing/cleaner/voter.py
usc-isi-i2/dsbox-cleaning
3cb5146dbf89f0ea2f8bf71a843eb1cfa63f7917
[ "MIT" ]
7
2017-09-25T20:30:45.000Z
2018-10-11T18:34:30.000Z
import d3m.container from d3m.metadata import hyperparams, params from typing import Dict, List from d3m.primitive_interfaces.transformer import TransformerPrimitiveBase from d3m.primitive_interfaces.base import CallResult import random import collections from . import config Inputs = d3m.container.DataFrame Outputs ...
41.52809
128
0.633658
9bafa009c2a7e28a8eb873d4d3433bc5b05003f4
43,208
py
Python
utils/build_swift/driver_arguments.py
svoit/swift
999fb1808e209cb8fa3901c5e632f7b7ad7abc5c
[ "Apache-2.0" ]
1
2020-07-30T02:21:49.000Z
2020-07-30T02:21:49.000Z
utils/build_swift/driver_arguments.py
svoit/swift
999fb1808e209cb8fa3901c5e632f7b7ad7abc5c
[ "Apache-2.0" ]
3
2018-09-27T23:09:06.000Z
2018-10-18T18:12:20.000Z
utils/build_swift/driver_arguments.py
svoit/swift
999fb1808e209cb8fa3901c5e632f7b7ad7abc5c
[ "Apache-2.0" ]
null
null
null
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIBUTORS.txt for the list o...
38.99639
79
0.622917
3f263bead261b4600a5ba06e9563fa1062e36344
11,495
py
Python
namedtensor/torch_helpers.py
rpadaki/namedtensor
f2196be457c6635d30122ef1befaf3493853b3d1
[ "MIT" ]
null
null
null
namedtensor/torch_helpers.py
rpadaki/namedtensor
f2196be457c6635d30122ef1befaf3493853b3d1
[ "MIT" ]
null
null
null
namedtensor/torch_helpers.py
rpadaki/namedtensor
f2196be457c6635d30122ef1befaf3493853b3d1
[ "MIT" ]
null
null
null
import torch.nn.functional as F from .core import NamedTensorBase, assert_match from .utils import make_tuple class NamedTensor(NamedTensorBase): def index_select(self, dim, index): "Index into dimension names with the `index` named tensors." name = dim new_names = [] sizes = [] ...
27.047059
102
0.495172
7bd4d9f9047302437e27ca5c0f5bc59c0d13791d
236
py
Python
tests/exceptions/source/backtrace/frame_values_forward.py
joshgordon/loguru
9777f4bec8b03ef074635269224baa3fd263fd09
[ "MIT" ]
2
2020-01-20T10:03:24.000Z
2020-02-05T03:38:25.000Z
tests/exceptions/source/backtrace/frame_values_forward.py
joshgordon/loguru
9777f4bec8b03ef074635269224baa3fd263fd09
[ "MIT" ]
1
2021-01-31T07:28:51.000Z
2021-02-21T08:38:53.000Z
tests/exceptions/source/backtrace/frame_values_forward.py
joshgordon/loguru
9777f4bec8b03ef074635269224baa3fd263fd09
[ "MIT" ]
3
2020-02-05T03:38:28.000Z
2020-02-11T02:34:56.000Z
import sys from loguru import logger logger.remove() logger.add(sys.stderr, format="", colorize=False, backtrace=True, diagnose=False) k = 2 def a(n): 1 / n def b(n): a(n - 1) @logger.catch def c(n): b(n - 1) c(k)
9.833333
81
0.610169
df04e7365b5bb13eace8982b4c5f59e963b71ac8
7,834
py
Python
contrib/bitrpc/bitrpc.py
Amigacoin/Amigacoin
e966b4c6981c7e6f7d6fb42dbdccc899ebc41bc6
[ "MIT" ]
1
2019-02-04T21:44:25.000Z
2019-02-04T21:44:25.000Z
contrib/bitrpc/bitrpc.py
Amigacoin/Amigacoin
e966b4c6981c7e6f7d6fb42dbdccc899ebc41bc6
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
Amigacoin/Amigacoin
e966b4c6981c7e6f7d6fb42dbdccc899ebc41bc6
[ "MIT" ]
1
2021-12-12T15:21:55.000Z
2021-12-12T15:21:55.000Z
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:43964") else: access = Se...
24.104615
79
0.668113
9ce74e8c49b46b094e1734918f51842b9cbf7c91
4,352
py
Python
mailpile/search_history.py
letaysoncb/mailpython
3eb012e9772558d8f37d06bd33db4c834dc83c89
[ "Apache-2.0" ]
1
2015-11-05T17:32:34.000Z
2015-11-05T17:32:34.000Z
mailpile/search_history.py
laborautonomo/Mailpile
6e17c2c5cbe131ea1f916145420dbc07e8ca13c0
[ "Apache-2.0" ]
null
null
null
mailpile/search_history.py
laborautonomo/Mailpile
6e17c2c5cbe131ea1f916145420dbc07e8ca13c0
[ "Apache-2.0" ]
1
2020-04-13T17:46:12.000Z
2020-04-13T17:46:12.000Z
import time import zlib import mailpile.util from mailpile.i18n import gettext as _ from mailpile.i18n import ngettext as _n from mailpile.util import * SEARCH_HISTORY_LOCK = UiRLock() class SearchHistory(object): # # This is an in-memory cache of search results, which can be used to # give a "search c...
36.266667
79
0.557215
ca9263f9e05fae8c4cde17f7df47508d97466aac
4,825
py
Python
code/main.py
sparkcyf/SUSTech-EE326-Digital-image-Processing-Project
dd1855dc2d2df2524492240d53e15249e958a1f6
[ "MIT" ]
null
null
null
code/main.py
sparkcyf/SUSTech-EE326-Digital-image-Processing-Project
dd1855dc2d2df2524492240d53e15249e958a1f6
[ "MIT" ]
null
null
null
code/main.py
sparkcyf/SUSTech-EE326-Digital-image-Processing-Project
dd1855dc2d2df2524492240d53e15249e958a1f6
[ "MIT" ]
null
null
null
import cv2 import os import time from numba import njit, prange import matplotlib.pyplot as plt import ld_module_transform import ld_module_binary import numpy as np import ld_module_detection # rootdir = 'D:/train_set/clips/0531/' rootdir = 'input_img/' foldername = "null" def lane_detection(input_img, original_i...
40.546218
120
0.542798
d95002c3af2c08eec2f3c62dca343c542e5da605
29,078
py
Python
sdks/python/apache_beam/transforms/stats.py
xasm83/beam
c8991ba9b65af2f547bad68a0ac327ce720eb00b
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/transforms/stats.py
xasm83/beam
c8991ba9b65af2f547bad68a0ac327ce720eb00b
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/transforms/stats.py
xasm83/beam
c8991ba9b65af2f547bad68a0ac327ce720eb00b
[ "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...
36.484316
80
0.683403
488f4e363af7bfa7d4a965c7ef8be978f0176c73
2,422
py
Python
test/unit/test_loss_kernel.py
Zhiyuan-w/DeepReg
3e372d1835fdc9468c026db3767dcf9e8d4a4b0e
[ "Apache-2.0" ]
379
2020-07-18T22:00:53.000Z
2022-03-31T05:17:29.000Z
test/unit/test_loss_kernel.py
Zhiyuan-w/DeepReg
3e372d1835fdc9468c026db3767dcf9e8d4a4b0e
[ "Apache-2.0" ]
646
2020-07-18T08:55:48.000Z
2022-03-29T02:24:54.000Z
test/unit/test_loss_kernel.py
Zhiyuan-w/DeepReg
3e372d1835fdc9468c026db3767dcf9e8d4a4b0e
[ "Apache-2.0" ]
62
2020-07-26T05:00:23.000Z
2022-02-22T21:58:19.000Z
from test.unit.util import is_equal_tf import numpy as np import pytest import tensorflow as tf from deepreg.loss.kernel import ( cauchy_kernel1d, gaussian_kernel1d_sigma, gaussian_kernel1d_size, rectangular_kernel1d, triangular_kernel1d, ) @pytest.mark.parametrize("sigma", [1, 3, 2.2]) def test...
27.522727
83
0.660611
dbfc40347d993eb421213c5897b510c0b81a002a
1,865
py
Python
core/utils/cdo.py
ITMO-NSS-team/AutoSWAN
5f2d9fcdf1880b9dacbbdc0baa0d99cd6e56d85b
[ "BSD-3-Clause" ]
3
2021-08-19T13:38:07.000Z
2022-03-26T21:24:51.000Z
core/utils/cdo.py
ITMO-NSS-team/AutoSWAN
5f2d9fcdf1880b9dacbbdc0baa0d99cd6e56d85b
[ "BSD-3-Clause" ]
null
null
null
core/utils/cdo.py
ITMO-NSS-team/AutoSWAN
5f2d9fcdf1880b9dacbbdc0baa0d99cd6e56d85b
[ "BSD-3-Clause" ]
1
2022-01-31T10:08:36.000Z
2022-01-31T10:08:36.000Z
import os from core.utils.files import get_project_root def _process_local_path(path): # TODO implement universal solution #if path[0] == '.': # path = f'{get_project_root()}/{path[2:]}' path=path.replace('\\','/') for disk in ['C', 'D', 'E', 'F', 'Z']: path = path.replace(f'{disk}:/',...
35.188679
117
0.650402
c688764b14d3749d11da8721ce7e1102ff6e32fa
282
py
Python
gedit/osm/geo_types.py
colyk/gedit
bbaea47fde413535fbd7abaa63fa20ff760de2dd
[ "MIT" ]
null
null
null
gedit/osm/geo_types.py
colyk/gedit
bbaea47fde413535fbd7abaa63fa20ff760de2dd
[ "MIT" ]
null
null
null
gedit/osm/geo_types.py
colyk/gedit
bbaea47fde413535fbd7abaa63fa20ff760de2dd
[ "MIT" ]
null
null
null
from collections import namedtuple class Bbox(namedtuple("Bbox", ["min_lat", "min_lon", "max_lat", "max_lon"])): __slots__ = () def __str__(self): return f"{self.min_lat},{self.min_lon},{self.max_lat},{self.max_lon}" Coord = namedtuple("Coord", ["lat", "lon"])
23.5
77
0.64539
142f25bdf2692b9bc41c04b611ccb9e73df8fd56
2,433
py
Python
log_casp_act/run_model_138.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_act/run_model_138.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_act/run_model_138.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
import numpy as np from math import * import pymultinest import sys sys.path.insert(0, '/home/kochenma/pysb') from pysb.integrate import Solver import csv import datetime import time as tm from model_138 import model from pysb.pathfinder import set_path set_path('bng', '/home/kochenma/BioNetGen') data_object = [] wi...
25.610526
237
0.671599
1af796ac07b329899b3c34b2465f544a5b7ea664
36,516
py
Python
src/azure-cli/azure/cli/command_modules/vm/_template_builder.py
avoidik/azure-cli
93a50bb7beb93834978e57141dd07572b98809ac
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/vm/_template_builder.py
avoidik/azure-cli
93a50bb7beb93834978e57141dd07572b98809ac
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/vm/_template_builder.py
avoidik/azure-cli
93a50bb7beb93834978e57141dd07572b98809ac
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
37.997919
158
0.575994
c2ef3d2dd317326a38c81dcb1c51195d53422436
9,683
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/hcloud/hcloud_volume.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/hcloud/hcloud_volume.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/hcloud/hcloud_volume.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "met...
30.936102
102
0.581122
e6a425bb0c6c016c1ac8c71416e1eca95d142163
2,131
py
Python
examples/embed/embed_themed.py
gully/bokeh
dec89a73dbf20c7dc2a8358864981de3080c84ed
[ "BSD-3-Clause" ]
6
2018-02-13T11:06:40.000Z
2020-10-23T09:30:46.000Z
examples/embed/embed_themed.py
gully/bokeh
dec89a73dbf20c7dc2a8358864981de3080c84ed
[ "BSD-3-Clause" ]
6
2018-11-29T15:40:20.000Z
2021-05-07T14:59:30.000Z
examples/embed/embed_themed.py
gully/bokeh
dec89a73dbf20c7dc2a8358864981de3080c84ed
[ "BSD-3-Clause" ]
3
2018-06-20T11:43:40.000Z
2021-12-21T06:51:56.000Z
import io from jinja2 import Template from bokeh.embed import components from bokeh.resources import INLINE from bokeh.util.browser import view from bokeh.themes import Theme from bokeh.plotting import figure x1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] y1 = [0, 8, 2, 4, 6, 9, 5, 6, 25, 28, 4] p1 = figure(title='DARK TH...
23.677778
56
0.502112
9605686b4318a56ddec2be8a8d4e458713eb7ec7
4,901
py
Python
algorithms/core/trpo.py
h2r/RobotLearningBaselines
7d6a104e2afba233fd1ec82dff4e46d9f44ef596
[ "MIT" ]
3
2020-12-17T06:58:12.000Z
2021-11-17T01:59:54.000Z
algorithms/core/trpo.py
h2r/RobotLearningBaselines
7d6a104e2afba233fd1ec82dff4e46d9f44ef596
[ "MIT" ]
1
2021-03-01T00:23:25.000Z
2021-03-01T00:23:25.000Z
algorithms/core/trpo.py
h2r/RobotLearningBaselines
7d6a104e2afba233fd1ec82dff4e46d9f44ef596
[ "MIT" ]
null
null
null
import numpy as np import scipy.optimize import os import sys # We need this below line for Python to actually find the utils directory # Otherwise, the module is not in the Python path! sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) from utils import * def conjugate_gradients(Avp_...
37.7
115
0.631912
3ca5af17db91b0eb3199cb6844b232b140f14248
922
py
Python
examples/ex_modesolver_4.py
Dj1312/EMpy
4bf1b01acc683c2a5ffc8679fdd4a9790aacfed0
[ "MIT" ]
128
2015-01-19T09:22:16.000Z
2022-03-30T06:58:43.000Z
examples/ex_modesolver_4.py
Dj1312/EMpy
4bf1b01acc683c2a5ffc8679fdd4a9790aacfed0
[ "MIT" ]
34
2016-01-01T09:01:18.000Z
2022-01-25T09:38:07.000Z
examples/ex_modesolver_4.py
Dj1312/EMpy
4bf1b01acc683c2a5ffc8679fdd4a9790aacfed0
[ "MIT" ]
66
2015-03-13T09:21:02.000Z
2022-03-11T07:40:39.000Z
"""Semi-vectorial finite-difference mode solver example.""" import numpy import EMpy import pylab def epsfunc(x_, y_): """Return a matrix describing a 2d material. :param x_: x values :param y_: y values :return: 2d-matrix """ xx, yy = numpy.meshgrid(x_, y_) return numpy.where((numpy.abs...
23.05
79
0.603037
3d4cf5e25162c34a5b111394f8cc29fa755859da
3,411
py
Python
torchmetrics/functional/regression/symmetric_mean_absolute_percentage_error.py
CSautier/metrics
32389fbc03b1bbbf0b15b05c56dc1db7a90bff97
[ "Apache-2.0" ]
null
null
null
torchmetrics/functional/regression/symmetric_mean_absolute_percentage_error.py
CSautier/metrics
32389fbc03b1bbbf0b15b05c56dc1db7a90bff97
[ "Apache-2.0" ]
null
null
null
torchmetrics/functional/regression/symmetric_mean_absolute_percentage_error.py
CSautier/metrics
32389fbc03b1bbbf0b15b05c56dc1db7a90bff97
[ "Apache-2.0" ]
null
null
null
# 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...
33.441176
116
0.701261
b8204e7835d964ae029e9998ac89985ed837472c
5,716
py
Python
tests/places_tests/test_creation.py
dolikemc/hostthewaytry
a1dcbc596da18aac760a18773bb89896a44e842d
[ "BSD-2-Clause" ]
null
null
null
tests/places_tests/test_creation.py
dolikemc/hostthewaytry
a1dcbc596da18aac760a18773bb89896a44e842d
[ "BSD-2-Clause" ]
38
2019-01-22T10:50:01.000Z
2019-01-28T15:19:15.000Z
tests/places_tests/test_creation.py
dolikemc/hostthewaytry
a1dcbc596da18aac760a18773bb89896a44e842d
[ "BSD-2-Clause" ]
null
null
null
from datetime import date, timedelta from decimal import Decimal from places.models import Place, Room, PlaceAccount from tests.places_tests.base import PlacesTest from traveller.models import User class NewPlaceTest(PlacesTest): def test_create_minimal_place(self): self.set_up_worker() self.ass...
51.495495
119
0.60147
e8aee829100fd49b571d8a3190da464d899698eb
7,473
py
Python
scr/gui4.py
Gornak40/sicily
8cb1bdef484efab4d71db02c5b0852b40af317a4
[ "Apache-2.0" ]
null
null
null
scr/gui4.py
Gornak40/sicily
8cb1bdef484efab4d71db02c5b0852b40af317a4
[ "Apache-2.0" ]
null
null
null
scr/gui4.py
Gornak40/sicily
8cb1bdef484efab4d71db02c5b0852b40af317a4
[ "Apache-2.0" ]
null
null
null
import pygame as pg from os import startfile, listdir from cards import * from random import choice, randrange, shuffle from results import * from engine import * from tkinter.messagebox import showinfo from tkinter import Tk def loadImage(name): image = pg.transform.rotozoom(pg.image.load('../data/' +...
35.084507
107
0.609661
db0cd739b1b532704618148abb880505cef36bfa
58,336
py
Python
zerver/tests.py
enterstudio/zulip
f6f8f1fe36ac7d82bc0a5effc00a47e460f0b325
[ "Apache-2.0" ]
null
null
null
zerver/tests.py
enterstudio/zulip
f6f8f1fe36ac7d82bc0a5effc00a47e460f0b325
[ "Apache-2.0" ]
null
null
null
zerver/tests.py
enterstudio/zulip
f6f8f1fe36ac7d82bc0a5effc00a47e460f0b325
[ "Apache-2.0" ]
1
2017-03-19T14:40:16.000Z
2017-03-19T14:40:16.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from django.test import TestCase from zerver.lib.test_helpers import ( queries_captured, simulated_empty_cache, simulated_queue_client, tornado_redirected_to_list, AuthedTestCase, most_recent_usermessage, ...
40.343015
119
0.647079
7620f44214010318e0fe880482ee5b05ebbaffd2
9,461
py
Python
generated/ansible-collection/apimanagementapischema_info.py
audevbot/autorest.devops.debug
a507fb6e2dd7826212537f27d583f203aac1c28f
[ "MIT" ]
null
null
null
generated/ansible-collection/apimanagementapischema_info.py
audevbot/autorest.devops.debug
a507fb6e2dd7826212537f27d583f203aac1c28f
[ "MIT" ]
null
null
null
generated/ansible-collection/apimanagementapischema_info.py
audevbot/autorest.devops.debug
a507fb6e2dd7826212537f27d583f203aac1c28f
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
32.400685
113
0.528485
70dcea2ba99f10b44146d5c310cbd38f6812be67
487
py
Python
sphinx/source/code/ann_mask_bbox_example.py
pylidc/pylidc.github.io
0bf43ee7652ab6d01dab5ae8e14d2ec50e96c0fc
[ "MIT" ]
3
2020-04-01T18:02:26.000Z
2021-06-03T11:16:12.000Z
sphinx/source/code/ann_mask_bbox_example.py
pylidc/pylidc.github.io
0bf43ee7652ab6d01dab5ae8e14d2ec50e96c0fc
[ "MIT" ]
null
null
null
sphinx/source/code/ann_mask_bbox_example.py
pylidc/pylidc.github.io
0bf43ee7652ab6d01dab5ae8e14d2ec50e96c0fc
[ "MIT" ]
null
null
null
import pylidc as pl import matplotlib.pyplot as plt ann = pl.query(pl.Annotation).first() vol = ann.scan.to_volume() padding = [(30,10), (10,25), (0,0)] mask = ann.boolean_mask(pad=padding) bbox = ann.bbox(pad=padding) fig,ax = plt.subplots(1,2,figsize=(5,3)) ax[0].imshow(vol[bbox][:,:,2], cmap=plt.cm.gray) ax[0]....
21.173913
60
0.669405
56e0df1f8b5942a4b79c3a43a3fb22343220f147
26,796
py
Python
venv/lib/python3.6/site-packages/mypy/test/data.py
humphrey-mutuma/Awards
4d5c934d503cdcb5466e7a345c57bfd62fb3c90f
[ "MIT" ]
2
2022-01-21T12:51:19.000Z
2022-01-21T12:51:30.000Z
venv/lib/python3.6/site-packages/mypy/test/data.py
humphrey-mutuma/Awards
4d5c934d503cdcb5466e7a345c57bfd62fb3c90f
[ "MIT" ]
4
2021-03-19T03:30:10.000Z
2021-09-08T01:16:55.000Z
venv/lib/python3.6/site-packages/mypy/test/data.py
humphrey-mutuma/Awards
4d5c934d503cdcb5466e7a345c57bfd62fb3c90f
[ "MIT" ]
2
2020-12-28T13:41:55.000Z
2021-01-21T10:07:47.000Z
"""Utilities for processing .test files containing test case descriptions.""" import os.path import os import tempfile import posixpath import re from os import remove, rmdir import shutil from abc import abstractmethod import sys import pytest # type: ignore # no pytest in typeshed from typing import List, Tuple, ...
39.348018
98
0.569003
b771ac824b8b27464499810d6a65c03827ad5244
5,059
py
Python
ignite/metrics/running_average.py
neptune-ai/ignite
48b449edc888f7f4cd54a9ea397c57e7de0eba64
[ "BSD-3-Clause" ]
1
2020-06-13T15:22:08.000Z
2020-06-13T15:22:08.000Z
ignite/metrics/running_average.py
neptune-ai/ignite
48b449edc888f7f4cd54a9ea397c57e7de0eba64
[ "BSD-3-Clause" ]
null
null
null
ignite/metrics/running_average.py
neptune-ai/ignite
48b449edc888f7f4cd54a9ea397c57e7de0eba64
[ "BSD-3-Clause" ]
1
2020-06-13T15:30:46.000Z
2020-06-13T15:30:46.000Z
from typing import Optional, Union, Callable, Sequence import torch from ignite.engine import Events, Engine from ignite.metrics import Metric from ignite.metrics.metric import reinit__is_reduced, sync_all_reduce __all__ = ["RunningAverage"] class RunningAverage(Metric): """Compute running average of a metric ...
40.472
111
0.658233
e444fc88c3add95a65f7dc5b2697daf0c542b7fc
5,417
py
Python
catkin_ws/src/mrta/src/DCOP/graph/NodeVariable.py
utkarshjp7/Multi_Robot_Task_Allocation
d413705ac8f8624be48953dff6ab7d71ab363f0d
[ "MIT" ]
8
2018-07-09T13:46:32.000Z
2020-10-26T03:14:07.000Z
catkin_ws/src/mrta/src/DCOP/graph/NodeVariable.py
utkarshjp7/Multi_Robot_Task_Allocation
d413705ac8f8624be48953dff6ab7d71ab363f0d
[ "MIT" ]
1
2020-03-10T05:38:16.000Z
2020-03-10T05:38:16.000Z
catkin_ws/src/mrta/src/DCOP/graph/NodeVariable.py
utkarshjp7/Multi_Robot_Task_Allocation
d413705ac8f8624be48953dff6ab7d71ab363f0d
[ "MIT" ]
5
2018-01-26T06:26:58.000Z
2020-10-03T13:18:02.000Z
# coding=utf-8 ''' Created on 19 apr 2017 @author: Andrea Montanari Definition of class NodeVariable A variable can take many values (NodeArgument) from his domain and It can have NodeFunctions neighbours ''' import sys, os sys.path.append(os.path.abspath('../Graph/')) from NodeArgument import NodeArgument ...
24.400901
110
0.554735
89ca970e72c393bc743397b7abc736d0ab1a78c2
5,963
py
Python
examples/old/stable_radical_optimization/run_mcts.py
harrysorensennrel/rlmolecule
978269400b90f752bf4741f42f03522603b321e2
[ "BSD-3-Clause" ]
null
null
null
examples/old/stable_radical_optimization/run_mcts.py
harrysorensennrel/rlmolecule
978269400b90f752bf4741f42f03522603b321e2
[ "BSD-3-Clause" ]
null
null
null
examples/old/stable_radical_optimization/run_mcts.py
harrysorensennrel/rlmolecule
978269400b90f752bf4741f42f03522603b321e2
[ "BSD-3-Clause" ]
null
null
null
import os import sys import logging sys.path.append('../..') os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import numpy as np import psycopg2 import molecule_game.config as config from rlmolecule.tree_search.graph_search import GraphSearch import tensorflow as tf model = tf.keras.models.load_model(config.reward_model_p...
35.284024
113
0.551903
6659bdfa29cad8a27cf3362e4605d3ee8455dc65
5,437
py
Python
python/kserve/test/test_s3_storage.py
haijohn/kfserving
1242ef22be06a1ae2b19d90dd6d73639b7fe020a
[ "Apache-2.0" ]
1
2021-12-20T15:41:42.000Z
2021-12-20T15:41:42.000Z
python/kserve/test/test_s3_storage.py
haijohn/kfserving
1242ef22be06a1ae2b19d90dd6d73639b7fe020a
[ "Apache-2.0" ]
null
null
null
python/kserve/test/test_s3_storage.py
haijohn/kfserving
1242ef22be06a1ae2b19d90dd6d73639b7fe020a
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
32.363095
85
0.70572
bef929cc84793e219669ad239341b79ea7a85ada
2,683
py
Python
google-python-exercises/babynames/babynames.py
haozai309/hello_python
deaa0621f549ff786bc36ccee48430d1d130690b
[ "Apache-2.0" ]
null
null
null
google-python-exercises/babynames/babynames.py
haozai309/hello_python
deaa0621f549ff786bc36ccee48430d1d130690b
[ "Apache-2.0" ]
null
null
null
google-python-exercises/babynames/babynames.py
haozai309/hello_python
deaa0621f549ff786bc36ccee48430d1d130690b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
26.564356
79
0.668282
2cf0f3c159e7a00bb6f3261d4a02d380cdb79ba3
10,849
py
Python
models/KNN/knnDogs20.py
ferrucc-io/kaggle-pets
c1a0a99130dd76c7e5f6c7b2dbb4647690515986
[ "MIT" ]
6
2019-02-27T21:01:43.000Z
2021-12-05T20:55:24.000Z
models/KNN/knnDogs20.py
ferrucc-io/kaggle-pets
c1a0a99130dd76c7e5f6c7b2dbb4647690515986
[ "MIT" ]
5
2020-03-24T16:49:08.000Z
2021-06-01T23:35:40.000Z
models/KNN/knnDogs20.py
ferrucc-io/kaggle-pets
c1a0a99130dd76c7e5f6c7b2dbb4647690515986
[ "MIT" ]
1
2019-03-28T14:00:51.000Z
2019-03-28T14:00:51.000Z
#model specific libraries from time import ctime from sklearn import neighbors from sklearn import metrics import numpy as np import pandas as pd class PredictiveModel(object): """ base class for the prediction task of Adoption Prediction competition specifically for dogs, scores 0.20 KNN-classi...
41.726923
227
0.606784
8f31f284ed9ca37bcb0862d1c7053037a7aa4033
462
py
Python
djangocms_video/migrations/0008_reset_null_values.py
parthenon/djangocms-video
926fc6c8abfdd8be22f3404a2bb809ed1b5fbffe
[ "BSD-3-Clause" ]
42
2015-01-01T18:26:29.000Z
2020-06-03T17:09:05.000Z
djangocms_video/migrations/0008_reset_null_values.py
nebulousprime/djangocms-video
9ff3469794abec39ae602bb33f4c9a5883ab7c5e
[ "BSD-3-Clause" ]
51
2015-07-08T10:04:04.000Z
2020-09-02T09:06:56.000Z
djangocms_video/migrations/0008_reset_null_values.py
nebulousprime/djangocms-video
9ff3469794abec39ae602bb33f4c9a5883ab7c5e
[ "BSD-3-Clause" ]
36
2015-06-04T15:44:32.000Z
2020-08-26T15:44:49.000Z
from django.db import migrations, models def reset_null_values(apps, schema_editor): VideoPlayer = apps.get_model('djangocms_video', 'VideoPlayer') plugins = VideoPlayer.objects.all() plugins.filter(embed_link__isnull=True).update(embed_link='') class Migration(migrations.Migration): dependencies =...
24.315789
66
0.71645
e75040a0d9a89727c67213c28f115ed6f4682811
3,061
py
Python
data_loader.py
Shuhao99/FastMRI-Challenge-2020
439c1ef5bf8e9c7943ebbbf602dac1bd639eff84
[ "MIT" ]
null
null
null
data_loader.py
Shuhao99/FastMRI-Challenge-2020
439c1ef5bf8e9c7943ebbbf602dac1bd639eff84
[ "MIT" ]
null
null
null
data_loader.py
Shuhao99/FastMRI-Challenge-2020
439c1ef5bf8e9c7943ebbbf602dac1bd639eff84
[ "MIT" ]
null
null
null
import h5py, os from functions import transforms as T from functions import provided_functions as P from torch.utils.data import DataLoader from functions.provided_functions import get_epoch_batch import torch from matplotlib import pyplot as plt class MRIDataset(DataLoader): def __init__(self, data_list, accelera...
36.879518
120
0.689317
5a48e33b9a928c84e34dcba3bfe6bbc106040b63
3,082
py
Python
paramak/parametric_components/rotated_trapezoid.py
generein/paramak
cec738b278c285a17eaa69fc1f35ea4788204a8c
[ "MIT" ]
25
2021-06-22T07:29:32.000Z
2022-03-28T13:30:53.000Z
paramak/parametric_components/rotated_trapezoid.py
generein/paramak
cec738b278c285a17eaa69fc1f35ea4788204a8c
[ "MIT" ]
181
2021-06-22T00:56:30.000Z
2022-03-31T22:36:54.000Z
paramak/parametric_components/rotated_trapezoid.py
generein/paramak
cec738b278c285a17eaa69fc1f35ea4788204a8c
[ "MIT" ]
8
2021-07-05T12:29:43.000Z
2022-03-24T13:17:37.000Z
import math from paramak import RotateStraightShape from paramak.utils import rotate class RotatedTrapezoid(RotateStraightShape): """Creates a rotated trapezoid (truncated triangle) shape. Args: length_1 (float): the length of the top parrallel edge of the trapezoid (cm). length_...
27.517857
79
0.593121
92217503d409c9e99e73ae13fb53f9f5bb87a465
3,694
py
Python
pyleecan/Methods/Simulation/Electrical/run.py
tobsen2code/pyleecan
5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9
[ "Apache-2.0" ]
4
2017-11-27T10:14:34.000Z
2018-09-20T11:30:32.000Z
pyleecan/Methods/Simulation/Electrical/run.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Simulation/Electrical/run.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
from numpy import angle from ....Classes.EEC_SCIM import EEC_SCIM from ....Classes.EEC_PMSM import EEC_PMSM from ....Classes.MachineSCIM import MachineSCIM from ....Classes.MachineSIPMSM import MachineSIPMSM from ....Classes.MachineIPMSM import MachineIPMSM from ....Methods.Simulation.Input import InputError def ru...
36.574257
95
0.661613
bdfd58e3c0cf9ad1a634a4466ec1da228d72076b
809
py
Python
backend/manage.py
joaorobson/AzulDeAndar
1f8fc022fc206cedc297227d11eff4e28f2aaca0
[ "MIT" ]
null
null
null
backend/manage.py
joaorobson/AzulDeAndar
1f8fc022fc206cedc297227d11eff4e28f2aaca0
[ "MIT" ]
null
null
null
backend/manage.py
joaorobson/AzulDeAndar
1f8fc022fc206cedc297227d11eff4e28f2aaca0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "AzulDeAndar.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that ...
35.173913
77
0.644005
b738af0090a1953ee440a3c0439a2621b9cce030
865
py
Python
fio_plot/__init__.py
jsrolon/fio-plot
810eb5c1d01de9bebbcd3e682a01bf582824cf0b
[ "BSD-3-Clause" ]
148
2017-04-05T22:15:39.000Z
2022-03-31T14:39:30.000Z
fio_plot/__init__.py
jsrolon/fio-plot
810eb5c1d01de9bebbcd3e682a01bf582824cf0b
[ "BSD-3-Clause" ]
66
2017-05-08T22:21:45.000Z
2022-02-26T22:53:58.000Z
fio_plot/__init__.py
jsrolon/fio-plot
810eb5c1d01de9bebbcd3e682a01bf582824cf0b
[ "BSD-3-Clause" ]
61
2017-11-09T21:52:24.000Z
2022-03-31T14:38:37.000Z
# Generates graphs from FIO output data for various IO queue depthts # # Output in PNG format. # # Requires matplotib and numpy. # # import pprint from .fiolib import ( argparsing, flightchecks as checks, getdata ) def main(): settings = {} option_found = False parser = argparsing.set_argument...
27.03125
87
0.685549
60b815ac99345a3f6d9d8bdf848088e449a3d4ff
413
py
Python
course_sys_backend/wsgi.py
Heliovic/course_sys_backend
b5b1f45c8352ae08cbcdcf94806dbd2c63f02e20
[ "Apache-2.0" ]
1
2020-04-21T09:19:50.000Z
2020-04-21T09:19:50.000Z
course_sys_backend/wsgi.py
Heliovic/course_sys_backend
b5b1f45c8352ae08cbcdcf94806dbd2c63f02e20
[ "Apache-2.0" ]
null
null
null
course_sys_backend/wsgi.py
Heliovic/course_sys_backend
b5b1f45c8352ae08cbcdcf94806dbd2c63f02e20
[ "Apache-2.0" ]
null
null
null
""" WSGI config for course_sys_backend project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('D...
24.294118
78
0.79661
4b245fcd51e9da98527d28abd6c5eb986722474c
21,931
py
Python
config.py
heuer/txpiconfig
081a64b13e22df8cf7a1591b1c14dfda0caf0a08
[ "CC0-1.0" ]
1
2020-09-29T12:05:52.000Z
2020-09-29T12:05:52.000Z
config.py
heuer/txpiconfig
081a64b13e22df8cf7a1591b1c14dfda0caf0a08
[ "CC0-1.0" ]
null
null
null
config.py
heuer/txpiconfig
081a64b13e22df8cf7a1591b1c14dfda0caf0a08
[ "CC0-1.0" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # Config -- An application to configure a TX-Pi. # # Written in 2019 by Lars Heuer # # To the extent possible under law, the author(s) have dedicated all copyright # and related and neighboring rights to this software to the public domain # worldwide. This software is d...
34.921975
142
0.624139
09473f8c29ed3158a210273fc521246520d98b23
20,825
py
Python
mvpa2/misc/io/base.py
thomastweets/PyMVPA
a9c05acd7569639bb636aed3c22a13b21559ca02
[ "MIT" ]
1
2016-08-23T05:04:09.000Z
2016-08-23T05:04:09.000Z
mvpa2/misc/io/base.py
thomastweets/PyMVPA
a9c05acd7569639bb636aed3c22a13b21559ca02
[ "MIT" ]
null
null
null
mvpa2/misc/io/base.py
thomastweets/PyMVPA
a9c05acd7569639bb636aed3c22a13b21559ca02
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
33.108108
80
0.553229
c2277ce09007b8f734f84d31bdfae075d1a89aed
4,578
py
Python
AutoSpeech/PASA_NJU/models/attention.py
Y-oHr-N/autodl19
c83b9cae08e1cee69df362a13794632380cbe0ac
[ "MIT" ]
null
null
null
AutoSpeech/PASA_NJU/models/attention.py
Y-oHr-N/autodl19
c83b9cae08e1cee69df362a13794632380cbe0ac
[ "MIT" ]
null
null
null
AutoSpeech/PASA_NJU/models/attention.py
Y-oHr-N/autodl19
c83b9cae08e1cee69df362a13794632380cbe0ac
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time: 2019/9/27 10:18 # @Author: Mecthew from tensorflow import keras from tensorflow.python.keras import backend as K class PositionEmbedding(keras.layers.Layer): def __init__(self, size=None, mode="sum", **kwargs): self.size = size # 必须为偶数 s...
36.333333
79
0.550459
2f048188f5b9206476d333055377f1bb522a54d3
3,692
py
Python
test/functional/rpc_invalid_address_message.py
picacoin/picacoin
a6b6c1053d796fac077d1c4ce63e09014002b364
[ "MIT" ]
1
2021-06-17T01:38:26.000Z
2021-06-17T01:38:26.000Z
test/functional/rpc_invalid_address_message.py
picacoin/picacoin
a6b6c1053d796fac077d1c4ce63e09014002b364
[ "MIT" ]
null
null
null
test/functional/rpc_invalid_address_message.py
picacoin/picacoin
a6b6c1053d796fac077d1c4ce63e09014002b364
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2020 The Picacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test error messages for 'getaddressinfo' and 'validateaddress' RPC commands.""" from test_framework.test_f...
38.863158
124
0.746208
ba8396c5c6a04d73af81b4cd212b1490b9f0698e
1,124
py
Python
setup.py
RocketRoss/setigen
fde4434094b5cc0d095c341d0b90e8f65c9e9215
[ "MIT" ]
null
null
null
setup.py
RocketRoss/setigen
fde4434094b5cc0d095c341d0b90e8f65c9e9215
[ "MIT" ]
null
null
null
setup.py
RocketRoss/setigen
fde4434094b5cc0d095c341d0b90e8f65c9e9215
[ "MIT" ]
null
null
null
import setuptools with open('README.md', 'r') as fh: long_description = fh.read() setuptools.setup( name='setigen', version='2.0.5', author='Bryan Brzycki', author_email='bbrzycki@berkeley.edu', description='SETI radio signal generator', long_description=long_description, long_descript...
29.578947
69
0.609431
025486ad3f0e9a9c8a024df7957d0db7cc94fd03
24,650
py
Python
doctor.py
scuba-st3v3/bro-doctor
51a02100c1f619385b03e3dd124f8c498a5039b3
[ "NCSA" ]
null
null
null
doctor.py
scuba-st3v3/bro-doctor
51a02100c1f619385b03e3dd124f8c498a5039b3
[ "NCSA" ]
null
null
null
doctor.py
scuba-st3v3/bro-doctor
51a02100c1f619385b03e3dd124f8c498a5039b3
[ "NCSA" ]
null
null
null
""" # Bro Doctor This plugin provides a "doctor.bro" command for broctl that will help to troubleshoot various common cluster problems. """ from __future__ import print_function try: import ZeekControl.plugin as PluginBase from ZeekControl import cmdresult BINARY = "zeek" except ImportError: import Br...
35.932945
168
0.578661
afdb3c7f2904c4a3f81472a824f67882d1a662fb
4,622
py
Python
tools/benchmark/do_not_run_create_benchmark_data.py
dangervon/ironic
01dd06a17673ec5157dda2ecfc51feb9d2f8e5c2
[ "Apache-2.0" ]
null
null
null
tools/benchmark/do_not_run_create_benchmark_data.py
dangervon/ironic
01dd06a17673ec5157dda2ecfc51feb9d2f8e5c2
[ "Apache-2.0" ]
null
null
null
tools/benchmark/do_not_run_create_benchmark_data.py
dangervon/ironic
01dd06a17673ec5157dda2ecfc51feb9d2f8e5c2
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
46.22
142
0.629598
0143f204b1fb7cdc9dd65cb7a78f565ced649b91
150
py
Python
flaskcelerymail/ext/api/routes/site.py
AndreAmorim05/flask-celery-mail
b95cb3b02c805980b8d7aef9d7d851fe8b5fc6fe
[ "MIT" ]
null
null
null
flaskcelerymail/ext/api/routes/site.py
AndreAmorim05/flask-celery-mail
b95cb3b02c805980b8d7aef9d7d851fe8b5fc6fe
[ "MIT" ]
null
null
null
flaskcelerymail/ext/api/routes/site.py
AndreAmorim05/flask-celery-mail
b95cb3b02c805980b8d7aef9d7d851fe8b5fc6fe
[ "MIT" ]
null
null
null
from flaskcelerymail.ext.api.views.site import home def init_site_routes(site): site.add_url_rule("/", "home", view_func=home, methods=["GET"])
25
67
0.733333
4c52d12ab920614127807839a8e64115fac7de00
1,162
py
Python
fixture/session.py
AndreevaAnastasiya/python_training
07d9ff92c4c39aa33260c151949767d28228038e
[ "Apache-2.0" ]
null
null
null
fixture/session.py
AndreevaAnastasiya/python_training
07d9ff92c4c39aa33260c151949767d28228038e
[ "Apache-2.0" ]
null
null
null
fixture/session.py
AndreevaAnastasiya/python_training
07d9ff92c4c39aa33260c151949767d28228038e
[ "Apache-2.0" ]
null
null
null
class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): dw = self.app.dw dw.get("http://localhost:8080/addressbook/index.php") dw.find_element_by_name("user").send_keys(username) dw.find_element_by_name("pass").send_keys(passwo...
29.05
73
0.610155
ac25400554874aba3af99ce7e5700e356d9844a1
34,292
py
Python
mmdet3d/datasets/kitti_dataset.py
speshowBUAA/mmdetection3d
98a8c49f2686b0d94a1ae134dd993672d4f2deb4
[ "Apache-2.0" ]
null
null
null
mmdet3d/datasets/kitti_dataset.py
speshowBUAA/mmdetection3d
98a8c49f2686b0d94a1ae134dd993672d4f2deb4
[ "Apache-2.0" ]
null
null
null
mmdet3d/datasets/kitti_dataset.py
speshowBUAA/mmdetection3d
98a8c49f2686b0d94a1ae134dd993672d4f2deb4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import copy import mmcv import numpy as np import os import tempfile import torch from mmcv.utils import print_log from os import path as osp from mmdet.datasets import DATASETS from ..core import show_multi_modality_result, show_result from ..core.bbox import (Box3DMode...
42.545906
109
0.511665
8796b41cd4ab50fa7aa805e80d78b661f18ec88f
1,142
py
Python
zun/db/sqlalchemy/alembic/versions/238f94009eab_add_disk_quota_supported_to_compute_node.py
wanghuiict/zun
2f4a3a2ba06d7ca83002418d4003ee5dece70952
[ "Apache-2.0" ]
83
2016-09-14T22:06:26.000Z
2022-01-27T03:49:52.000Z
zun/db/sqlalchemy/alembic/versions/238f94009eab_add_disk_quota_supported_to_compute_node.py
wanghuiict/zun
2f4a3a2ba06d7ca83002418d4003ee5dece70952
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
zun/db/sqlalchemy/alembic/versions/238f94009eab_add_disk_quota_supported_to_compute_node.py
wanghuiict/zun
2f4a3a2ba06d7ca83002418d4003ee5dece70952
[ "Apache-2.0" ]
54
2016-09-29T10:16:02.000Z
2022-01-28T19:12:49.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
31.722222
78
0.697023