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
708473fb0771f4377bbf5f2f6ff798be287cb381
11,228
py
Python
maskrcnn/models.py
hqbao/dlp_tf
e8fe3281470faebbe8e36caf55025c270e84c44f
[ "MIT" ]
null
null
null
maskrcnn/models.py
hqbao/dlp_tf
e8fe3281470faebbe8e36caf55025c270e84c44f
[ "MIT" ]
null
null
null
maskrcnn/models.py
hqbao/dlp_tf
e8fe3281470faebbe8e36caf55025c270e84c44f
[ "MIT" ]
1
2021-12-30T08:55:37.000Z
2021-12-30T08:55:37.000Z
import tensorflow as tf from tensorflow.keras.layers import Input from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam from tensorflow.keras.backend import mean, sum, categorical_crossentropy, abs, switch def smooth_l1(y_true, y_pred): HUBER_DELTA = 1.0 x = abs(y_true - y_pred) ...
28
122
0.757659
5bac512278ccb491c57470e35eb3a154a4902e6a
1,883
py
Python
catkin_ws/src/f4-devel/kinematics/tests/forward_kinematics_tester_node.py
DiegoOrtegoP/Software
4a07dd2dab29db910ca2e26848fa6b53b7ab00cd
[ "CC-BY-2.0" ]
12
2016-04-14T12:21:46.000Z
2021-06-18T07:51:40.000Z
catkin_ws/src/f4-devel/kinematics/tests/forward_kinematics_tester_node.py
DiegoOrtegoP/Software
4a07dd2dab29db910ca2e26848fa6b53b7ab00cd
[ "CC-BY-2.0" ]
14
2017-03-03T23:33:05.000Z
2018-04-03T18:07:53.000Z
catkin_ws/src/f4-devel/kinematics/tests/forward_kinematics_tester_node.py
DiegoOrtegoP/Software
4a07dd2dab29db910ca2e26848fa6b53b7ab00cd
[ "CC-BY-2.0" ]
113
2016-05-03T06:11:42.000Z
2019-06-01T14:37:38.000Z
#!/usr/bin/env python import rospy import unittest, rostest import sys, time from duckietown_msgs.msg import WheelsCmdStamped, Twist2DStamped, Pose2DStamped, KinematicsWeights class TestForwardKinematicsNode(unittest.TestCase): def __init__(self, *args): super(TestForwardKinematicsNode, self).__init__(*arg...
37.66
127
0.703664
52358ec241a2089a053510c9c1d1f071c98bfc4e
1,494
py
Python
keylime/registrar.py
HuzefaMandvi/python-keylime
28c7deff21b0de532265adf7cde2371d6bde011d
[ "BSD-2-Clause" ]
null
null
null
keylime/registrar.py
HuzefaMandvi/python-keylime
28c7deff21b0de532265adf7cde2371d6bde011d
[ "BSD-2-Clause" ]
null
null
null
keylime/registrar.py
HuzefaMandvi/python-keylime
28c7deff21b0de532265adf7cde2371d6bde011d
[ "BSD-2-Clause" ]
1
2018-10-30T03:52:50.000Z
2018-10-30T03:52:50.000Z
#!/usr/bin/python ''' DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited. This material is based upon work supported by the Assistant Secretary of Defense for Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclusion...
37.35
156
0.780455
748513c87414ba4230d8e77672ec1e801dad637a
1,505
py
Python
chatbot_cut/read_vector.py
LiuSecone/DeeCamp-13
83c0d6a233c0164c5d2daedac5ca4dafe54ef0c4
[ "MIT" ]
5
2018-08-10T01:45:50.000Z
2019-10-10T16:23:01.000Z
chatbot_cut/read_vector.py
LiuSecone/DeeCamp-13
83c0d6a233c0164c5d2daedac5ca4dafe54ef0c4
[ "MIT" ]
null
null
null
chatbot_cut/read_vector.py
LiuSecone/DeeCamp-13
83c0d6a233c0164c5d2daedac5ca4dafe54ef0c4
[ "MIT" ]
1
2018-11-18T09:55:52.000Z
2018-11-18T09:55:52.000Z
""" 读取一个文本格式的,保存预训练好的embedding的文件 wiki.zh.vec 它的第一行会被忽略 第二行开始,每行是 词 + 空格 + 词向量维度0 + 空格 + 词向量维度1 + ... 参考fasttext的文本格式 https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md """ import pickle import numpy as np from tqdm import tqdm def read_vector(path='wiki.zh.vec', out...
24.274194
79
0.523588
69c31054089d653fc2682bd4a391575f9cb86cd7
9,522
py
Python
z5tracker/rulesets/rando_aa_v4/rulesets.py
Feneg/z5-tracker
4631b33cc6584efcbd8df7e7d635d6ff0b7064fe
[ "MIT" ]
2
2019-07-07T00:36:47.000Z
2020-05-11T10:48:42.000Z
z5tracker/rulesets/rando_aa_v4/rulesets.py
Feneg/z5-tracker
4631b33cc6584efcbd8df7e7d635d6ff0b7064fe
[ "MIT" ]
5
2019-02-09T09:58:06.000Z
2021-04-30T12:59:09.000Z
z5tracker/rulesets/rando_aa_v4/rulesets.py
Feneg/z5-tracker
4631b33cc6584efcbd8df7e7d635d6ff0b7064fe
[ "MIT" ]
1
2020-05-09T18:50:48.000Z
2020-05-09T18:50:48.000Z
import operator import os.path from ...config import CONFIG from ... import maps from . import DungeonList as dungeons from . import EntranceShuffle as entrances from . import Item as items from . import ItemList as itemlist from . import HintList as hintlist from . import Location as locationclass from . import Loca...
31.529801
78
0.563432
d6e00e947ea8069f4cdb4817f3b990fd37f97a03
6,022
py
Python
openstack_dashboard/dashboards/project/networks/views.py
andymcc/horizon
34e639d197f88e9568ae0a8882da420eccdc3ee9
[ "Apache-2.0" ]
1
2021-07-07T04:24:22.000Z
2021-07-07T04:24:22.000Z
openstack_dashboard/dashboards/project/networks/views.py
nyzsirt/horizon
53dd2dbd39c50b665ebe2d2a877496169f01a13f
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/networks/views.py
nyzsirt/horizon
53dd2dbd39c50b665ebe2d2a877496169f01a13f
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
38.602564
79
0.672866
e2fdc0ea6a8af1c649ccf888fab22d38f65375ad
7,179
py
Python
hubblestack/splunklogging.py
Massi78/hubble
8a68f0c444a70770c140f03825d9aecaca1eeecb
[ "Apache-2.0" ]
null
null
null
hubblestack/splunklogging.py
Massi78/hubble
8a68f0c444a70770c140f03825d9aecaca1eeecb
[ "Apache-2.0" ]
null
null
null
hubblestack/splunklogging.py
Massi78/hubble
8a68f0c444a70770c140f03825d9aecaca1eeecb
[ "Apache-2.0" ]
null
null
null
""" Hubblestack python log handler for splunk Uses the same configuration as the rest of the splunk returners, returns to the same destination but with an alternate sourcetype (``hubble_log`` by default) .. code-block:: yaml hubblestack: returner: splunk: - token: XXXXXXXX-XXXX-XXXX-XXXX-...
37.196891
96
0.593955
d49b3a77c3d9ee6e368df1330452e9cc2d6d99e8
803
py
Python
models/iCubWorld/alexnet.py
pralab/secml-zoo
ba9ca3c0fb25883dccdb718d1b4db9b6ecad4360
[ "Apache-2.0" ]
2
2021-06-04T10:29:21.000Z
2021-06-05T22:35:43.000Z
models/iCubWorld/alexnet.py
pralab/secml-zoo
ba9ca3c0fb25883dccdb718d1b4db9b6ecad4360
[ "Apache-2.0" ]
null
null
null
models/iCubWorld/alexnet.py
pralab/secml-zoo
ba9ca3c0fb25883dccdb718d1b4db9b6ecad4360
[ "Apache-2.0" ]
null
null
null
""" .. module:: AlexNet :synopsis: AlexNet Convolutional Neural Network .. moduleauthor:: Marco Melis <marco.melis@unica.it> """ from torchvision import models from secml.ml.classifiers import CClassifierPyTorch from secml.ml.features.normalization import CNormalizerMeanStd def alexnet(): """CClassifierPyTo...
28.678571
79
0.612702
09d6c94d34d973394eb34cb7ddfe8e59c22efb81
8,090
py
Python
switch_model/policies/rps_by_load_zone.py
staadecker/switch
b96f2e6a255e870c97bf2a8e88ead42e02f1a85c
[ "ECL-2.0", "Apache-2.0" ]
4
2021-06-03T00:23:57.000Z
2022-02-05T13:51:00.000Z
switch_model/policies/rps_by_load_zone.py
staadecker/switch
b96f2e6a255e870c97bf2a8e88ead42e02f1a85c
[ "ECL-2.0", "Apache-2.0" ]
61
2021-05-07T23:46:20.000Z
2022-02-17T01:19:17.000Z
switch_model/policies/rps_by_load_zone.py
staadecker/switch
b96f2e6a255e870c97bf2a8e88ead42e02f1a85c
[ "ECL-2.0", "Apache-2.0" ]
4
2018-02-05T02:01:01.000Z
2020-11-17T22:14:26.000Z
# Copyright 2017 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. import os from pyomo.environ import * from switch_model.reporting import write_table """ This module defines a simple Renewable Portfolio Standard (RPS) policy scheme for the Switch...
41.917098
114
0.672806
0b5fe2ba59f9d20f8c368526391c7f8b037000b0
178
py
Python
Python高级编程/正则表达式.py
shao1chuan/pythonbook
cd9877d04e1e11422d38cc051e368d3d9ce2ab45
[ "MulanPSL-1.0" ]
95
2020-10-11T04:45:46.000Z
2022-02-25T01:50:40.000Z
Python高级编程/正则表达式.py
shao1chuan/pythonbook
cd9877d04e1e11422d38cc051e368d3d9ce2ab45
[ "MulanPSL-1.0" ]
null
null
null
Python高级编程/正则表达式.py
shao1chuan/pythonbook
cd9877d04e1e11422d38cc051e368d3d9ce2ab45
[ "MulanPSL-1.0" ]
30
2020-11-05T09:01:00.000Z
2022-03-08T05:58:55.000Z
import re line = 'asdf fjdk; afed, fjek,asdf, foo' print(re.split(r'[;,\s]\s*', line)) # 正则模式表示 ;或,或空白字符且它们的后面再跟0个或多个空白字符 ['asdf', 'fjdk', 'afed', 'fjek', 'asdf', 'foo']
19.777778
47
0.595506
524844354e1f4a49379d3baefd70ac04777af15d
3,147
py
Python
ubpsn_web/ubpsn_web/settings.py
NBLANCHE/ubpsn-web
2e5b413629aabad8ddb5e6d589e1d3b6d14a2ca9
[ "MIT" ]
null
null
null
ubpsn_web/ubpsn_web/settings.py
NBLANCHE/ubpsn-web
2e5b413629aabad8ddb5e6d589e1d3b6d14a2ca9
[ "MIT" ]
null
null
null
ubpsn_web/ubpsn_web/settings.py
NBLANCHE/ubpsn-web
2e5b413629aabad8ddb5e6d589e1d3b6d14a2ca9
[ "MIT" ]
null
null
null
""" Django settings for ubpsn_web project. Generated by 'django-admin startproject' using Django 2.2.12. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os...
25.379032
91
0.694312
bb0ee82c930b2a0aa5628eb581bc4668e9fe24fe
133,559
py
Python
Android/NDK/android-ndk-r16b-win/sources/third_party/vulkan/src/vk_helper.py
X018/CCTOOL
989af4d7edab82bf540400eb72eca4e7447d722c
[ "MIT" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
Android/NDK/android-ndk-r16b-win/sources/third_party/vulkan/src/vk_helper.py
X018/CCTOOL
989af4d7edab82bf540400eb72eca4e7447d722c
[ "MIT" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
Android/NDK/android-ndk-r16b-win/sources/third_party/vulkan/src/vk_helper.py
X018/CCTOOL
989af4d7edab82bf540400eb72eca4e7447d722c
[ "MIT" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python3 # # Copyright (c) 2015-2016 The Khronos Group Inc. # Copyright (c) 2015-2016 Valve Corporation # Copyright (c) 2015-2016 LunarG, Inc. # Copyright (c) 2015-2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the...
59.491759
276
0.555417
d22593ed2ec3893b87149f872f8ce26e8ef8dbd0
4,860
py
Python
tests/test_profile_acl.py
MarkLark/dstore-acl
7a939f4008bc8b8e3d5f231ce8c223b8f57967f8
[ "MIT" ]
1
2017-03-07T11:19:58.000Z
2017-03-07T11:19:58.000Z
tests/test_profile_acl.py
MarkLark/dstore-acl
7a939f4008bc8b8e3d5f231ce8c223b8f57967f8
[ "MIT" ]
null
null
null
tests/test_profile_acl.py
MarkLark/dstore-acl
7a939f4008bc8b8e3d5f231ce8c223b8f57967f8
[ "MIT" ]
null
null
null
from nose.tools import eq_, raises from . import BaseTest, Car, Model, var, mod, UserProfile, UserAccount from dstore_acl import Rule, Role, Action, AccessDenied class Profile_ACL( BaseTest ): models = [ Car, UserAccount, UserProfile ] auto_add_users = True def test_add_own( self ): user = self.g...
36.541353
111
0.621811
8b9d231b5a0ba24440288f22828b2b03c6bda8ca
1,019
py
Python
lunchbot/urls.py
ben174/lunch-bot
5cf62161d91133e68ce7e946f03684c183aa57ad
[ "MIT" ]
null
null
null
lunchbot/urls.py
ben174/lunch-bot
5cf62161d91133e68ce7e946f03684c183aa57ad
[ "MIT" ]
null
null
null
lunchbot/urls.py
ben174/lunch-bot
5cf62161d91133e68ce7e946f03684c183aa57ad
[ "MIT" ]
null
null
null
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import DateDetailView from menu.models import Menu import menu.views urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^parse/$', menu.views.parse, name='parse'), url(r'^$', menu.views.wee...
37.740741
126
0.643768
c40645368c84ba3b97de2ba8ad2ec820a12c8428
294
py
Python
labMT-simple/labMTsimple/data/AFINN/load-afinn.py
TransientObject/labMTComparison
5b9639230fb4db4ff6310fd62fe667f1cec7a3c6
[ "Apache-2.0" ]
null
null
null
labMT-simple/labMTsimple/data/AFINN/load-afinn.py
TransientObject/labMTComparison
5b9639230fb4db4ff6310fd62fe667f1cec7a3c6
[ "Apache-2.0" ]
null
null
null
labMT-simple/labMTsimple/data/AFINN/load-afinn.py
TransientObject/labMTComparison
5b9639230fb4db4ff6310fd62fe667f1cec7a3c6
[ "Apache-2.0" ]
null
null
null
afinn = dict(map(lambda (k,v): (k,int(v)), [ line.split(t) for line in open("AFINN/AFINN-111.txt") ])) pos_words = [word for word in afinn if afinn[word] > 0] neg_words = [word for word in afinn if afinn[word] < 0] neu_words = [word for word in afinn if afinn[word] == 0]
49
80
0.615646
41b619c3462503c39cdbe9e9443e9f45952bcd78
5,327
py
Python
calm/dsl/cli/init_command.py
tonyjames/calm-dsl
e94a35e26a43a0081d6487a538675641fc1d3667
[ "Apache-2.0" ]
null
null
null
calm/dsl/cli/init_command.py
tonyjames/calm-dsl
e94a35e26a43a0081d6487a538675641fc1d3667
[ "Apache-2.0" ]
null
null
null
calm/dsl/cli/init_command.py
tonyjames/calm-dsl
e94a35e26a43a0081d6487a538675641fc1d3667
[ "Apache-2.0" ]
1
2020-02-13T02:56:58.000Z
2020-02-13T02:56:58.000Z
import click import os import json from calm.dsl.config import init_config, get_default_user_config_file, set_config from calm.dsl.db import get_db_handle from calm.dsl.api import get_resource_api, update_client_handle, get_client_handle from calm.dsl.store import Cache from calm.dsl.init import init_bp from calm.dsl....
27.317949
109
0.673738
13d017b6a38bdbfbd21c3682dfd103a9683c0873
5,342
py
Python
test/sagemaker_tests/tensorflow/inference/test/integration/local/test_pre_post_processing_mme.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
1
2021-07-14T20:13:12.000Z
2021-07-14T20:13:12.000Z
test/sagemaker_tests/tensorflow/inference/test/integration/local/test_pre_post_processing_mme.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
null
null
null
test/sagemaker_tests/tensorflow/inference/test/integration/local/test_pre_post_processing_mme.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 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 "license" file acc...
32.773006
99
0.685511
2c41a9ba5b4af34a473fc3bc9e561acd7b0629bb
452
py
Python
source/const.py
Valparaiso-Data-Science/general-course-relevance-discovery
b14c8d7324a039dd20eeb372497dba8e52a25168
[ "ECL-2.0" ]
2
2019-09-27T20:17:46.000Z
2020-06-24T22:15:52.000Z
source/const.py
Valparaiso-Data-Science/general-course-relevance-discovery
b14c8d7324a039dd20eeb372497dba8e52a25168
[ "ECL-2.0" ]
3
2021-03-31T19:53:37.000Z
2021-12-13T20:44:25.000Z
source/const.py
Valparaiso-Data-Science/general-course-relevance-discovery
b14c8d7324a039dd20eeb372497dba8e52a25168
[ "ECL-2.0" ]
1
2019-05-22T18:55:39.000Z
2019-05-22T18:55:39.000Z
''' Constants for file and directory names (when ran from main) ''' from datetime import date # constants (may move to a separate file) SOURCE_DIR = "../fullPDFs" TRIMMED_DIR = "../temp_data/TRIMMED" SUPERTRIMMED_DIR = "../temp_data/superTrimmedPDFs" CSV_DIR = "../courses" # work on implementing this variable through...
30.133333
79
0.734513
9d48570e645fc1dbf47cc652ff26c69f4b70e853
3,720
py
Python
.history/Missions_to_Mars/scrape_mars_20200809085346.py
ermiasgelaye/web-scraping-challenge
f99c3436dfb0169595c46dae7733d90e21385cc6
[ "ADSL" ]
null
null
null
.history/Missions_to_Mars/scrape_mars_20200809085346.py
ermiasgelaye/web-scraping-challenge
f99c3436dfb0169595c46dae7733d90e21385cc6
[ "ADSL" ]
null
null
null
.history/Missions_to_Mars/scrape_mars_20200809085346.py
ermiasgelaye/web-scraping-challenge
f99c3436dfb0169595c46dae7733d90e21385cc6
[ "ADSL" ]
2
2020-11-02T08:12:16.000Z
2021-05-17T21:45:42.000Z
from splinter import Browser from bs4 import BeautifulSoup import pandas as pd import time import re # This is for debugging def savetofile(contents): file = open('_temporary.txt',"w",encoding="utf-8") file.write(contents) file.close() def scrape(): executable_path = {"executable_path": "chromedrive...
28.396947
101
0.641667
29ae34910e48e7e746a6319e3fc1a450b257486b
447
py
Python
write_strategies/write_text_strategy.py
jmskinner/pii_firewall
a9079bd431151c3228f1195993b44443b8ac2f02
[ "MIT" ]
null
null
null
write_strategies/write_text_strategy.py
jmskinner/pii_firewall
a9079bd431151c3228f1195993b44443b8ac2f02
[ "MIT" ]
null
null
null
write_strategies/write_text_strategy.py
jmskinner/pii_firewall
a9079bd431151c3228f1195993b44443b8ac2f02
[ "MIT" ]
null
null
null
import json from write_strategies.write_base_strategy import WriterBaseStrategy class WriterTextStrategy(WriterBaseStrategy): def _write_data(self, task): with open(task.out_endpoint, "w") as output: output.write(str(''.join(task.data))) def _write_profile(self, task): with open(...
27.9375
67
0.689038
8b4176e3f91f83630cebc828cf951ebfca9dc545
4,344
py
Python
tests/test_board.py
ARMmbed/mbed-targets
47493250ede6f10be975ab500f78d5806004c59c
[ "Apache-2.0" ]
3
2019-12-20T16:17:46.000Z
2020-02-06T17:34:25.000Z
tests/test_board.py
ARMmbed/mbed-targets
47493250ede6f10be975ab500f78d5806004c59c
[ "Apache-2.0" ]
140
2020-01-10T19:01:06.000Z
2020-07-16T14:34:42.000Z
tests/test_board.py
ARMmbed/mbed-targets
47493250ede6f10be975ab500f78d5806004c59c
[ "Apache-2.0" ]
2
2020-01-23T15:59:42.000Z
2020-01-24T12:08:02.000Z
# # Copyright (C) 2020 Arm Mbed. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # """Tests for `mbed_targets.mbed_target`.""" from unittest import TestCase # Import from top level as this is the expected interface for users from mbed_targets import Board class TestBoard(TestCase): """Tests for the c...
40.598131
112
0.514042
3093989b7f0ee3f6c2ce931dcb610220f5afaffa
12,386
py
Python
train.py
Tommy-Liu/MovieQA_Contest
4281bf4a731aa14a0d19f18adda31d59a4a297cb
[ "MIT" ]
null
null
null
train.py
Tommy-Liu/MovieQA_Contest
4281bf4a731aa14a0d19f18adda31d59a4a297cb
[ "MIT" ]
null
null
null
train.py
Tommy-Liu/MovieQA_Contest
4281bf4a731aa14a0d19f18adda31d59a4a297cb
[ "MIT" ]
null
null
null
import argparse import importlib import math import os import re import numpy as np import tensorflow as tf from tensorflow.python import debug as tf_debug from tqdm import trange from config import MovieQAPath # from input import Input as In # from input_v2 import Input as In2 from raw_input import Input from utils ...
46.56391
118
0.572501
13a870a656ab218338034f8183320b874dfe75f3
7,358
py
Python
nets/triplet_loss_all.py
avagait/gaitcopy
2fee760156b289ef12f19fb366fb62cf535c305e
[ "MIT" ]
1
2022-01-25T17:32:47.000Z
2022-01-25T17:32:47.000Z
nets/triplet_loss_all.py
avagait/gaitcopy
2fee760156b289ef12f19fb366fb62cf535c305e
[ "MIT" ]
null
null
null
nets/triplet_loss_all.py
avagait/gaitcopy
2fee760156b289ef12f19fb366fb62cf535c305e
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow_addons.utils.types import FloatTensorLike, TensorLike from typeguard import typechecked from typing import Optional def _pairwise_distances(embeddings, squared=False): """Compute the 2D matrix of distances between all the embeddings. Args: embeddings: tensor of s...
38.726316
168
0.718266
3cf887e19fcc9ee72682225ac7d7490919a5e7df
8,220
py
Python
models/resnet_quant.py
iimmortall/QuantLib
29e83dad8738d0fb4efb18d0cb5dd3a7029abd86
[ "MIT" ]
null
null
null
models/resnet_quant.py
iimmortall/QuantLib
29e83dad8738d0fb4efb18d0cb5dd3a7029abd86
[ "MIT" ]
null
null
null
models/resnet_quant.py
iimmortall/QuantLib
29e83dad8738d0fb4efb18d0cb5dd3a7029abd86
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict from models.util import get_func class LambdaLayer(nn.Module): def __init__(self, lambd): super(LambdaLayer, sel...
43.263158
121
0.604988
8dd0a3bdbf9bc6bba19f87f7bca7482790fbddee
1,436
py
Python
app/user/serializers.py
bartisrichard/formula-one
de14da6b1dcbd09d3ed5685d3a4f2f4f7934d908
[ "MIT" ]
null
null
null
app/user/serializers.py
bartisrichard/formula-one
de14da6b1dcbd09d3ed5685d3a4f2f4f7934d908
[ "MIT" ]
null
null
null
app/user/serializers.py
bartisrichard/formula-one
de14da6b1dcbd09d3ed5685d3a4f2f4f7934d908
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ('email', 'password', 'name') extra...
28.72
74
0.643454
e44f03878a7eddbe96f1eae42140a12c02c8fb12
2,833
py
Python
orcid_api/models/day.py
tenet-ac-za/NZ-ORCID-Hub
f1183fbb94509b102fa58d7812ed33d8f35c5d4d
[ "MIT" ]
15
2017-02-06T01:41:57.000Z
2021-07-22T08:53:40.000Z
orcid_api/models/day.py
tenet-ac-za/NZ-ORCID-Hub
f1183fbb94509b102fa58d7812ed33d8f35c5d4d
[ "MIT" ]
82
2017-03-23T00:30:04.000Z
2022-02-01T00:10:34.000Z
orcid_api/models/day.py
tenet-ac-za/NZ-ORCID-Hub
f1183fbb94509b102fa58d7812ed33d8f35c5d4d
[ "MIT" ]
6
2017-03-23T07:26:05.000Z
2021-02-23T11:20:21.000Z
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import r...
24.422414
105
0.514649
a5a17c0d0642e69f8fa5b7db94177e9c2911cdfe
1,835
py
Python
backend/server.py
bhutkovskyysos/mnemic
6dec372e1266214b6b8571c1a04ac8e446600200
[ "MIT" ]
null
null
null
backend/server.py
bhutkovskyysos/mnemic
6dec372e1266214b6b8571c1a04ac8e446600200
[ "MIT" ]
null
null
null
backend/server.py
bhutkovskyysos/mnemic
6dec372e1266214b6b8571c1a04ac8e446600200
[ "MIT" ]
null
null
null
"""The listening UDP server for tracing messages.""" import asyncio import os import signal import logging import dolon.utils as utils import dolon.db_conn as db_conn logging.basicConfig(level=logging.DEBUG) server_port = int(os.environ["BACK_END_PORT"]) class CustomMsgProtocol(asyncio.BaseProtocol): """Overr...
24.797297
73
0.634332
1216be6c68c699b1042de06bae5b126528ee94de
48,798
py
Python
pyrender/renderer.py
Timen/pyrender
a371987ab776d225bc60717ffee32ad1bb7aa33a
[ "MIT" ]
null
null
null
pyrender/renderer.py
Timen/pyrender
a371987ab776d225bc60717ffee32ad1bb7aa33a
[ "MIT" ]
null
null
null
pyrender/renderer.py
Timen/pyrender
a371987ab776d225bc60717ffee32ad1bb7aa33a
[ "MIT" ]
null
null
null
"""PBR renderer for Python. Author: Matthew Matl """ import sys import numpy as np import PIL from .constants import (RenderFlags, TextAlign, GLTF, BufFlags, TexFlags, ProgramFlags, DEFAULT_Z_FAR, DEFAULT_Z_NEAR, SHADOW_TEX_SZ, MAX_N_LIGHTS) from .shader_program import...
36.690226
87
0.554797
7743d070790cf8f0fde4520c9510fe08f4ca0a29
14,409
py
Python
src/MOSIM/core/services/service_access.py
dfki-asr/MMIPython-Core
2f4b51ffde606c45661d9dbd5153576f919bdb8b
[ "MIT" ]
null
null
null
src/MOSIM/core/services/service_access.py
dfki-asr/MMIPython-Core
2f4b51ffde606c45661d9dbd5153576f919bdb8b
[ "MIT" ]
null
null
null
src/MOSIM/core/services/service_access.py
dfki-asr/MMIPython-Core
2f4b51ffde606c45661d9dbd5153576f919bdb8b
[ "MIT" ]
null
null
null
## SPDX-License-Identifier: MIT ## The content of this file has been developed in the context of the MOSIM research project. ## Original author(s): Jannes Lehwald, Janis Sprenger # -*- coding: utf-8 -*- """ """ from MOSIM.mmi.scene.ttypes import MSceneObject, MCollider from MOSIM.mmi.avatar.ttypes import MAvatarPost...
39.26158
147
0.621903
52713d54906435bf02724f2be0f8ff14c9878d4d
894
py
Python
LeetCode/python/001-030/017-4sum/test.py
shootsoft/practice
49f28c2e0240de61d00e4e0291b3c5edd930e345
[ "Apache-2.0" ]
null
null
null
LeetCode/python/001-030/017-4sum/test.py
shootsoft/practice
49f28c2e0240de61d00e4e0291b3c5edd930e345
[ "Apache-2.0" ]
null
null
null
LeetCode/python/001-030/017-4sum/test.py
shootsoft/practice
49f28c2e0240de61d00e4e0291b3c5edd930e345
[ "Apache-2.0" ]
null
null
null
__author__ = 'yinjun' import unittest import os import imp class TestSolutionFuncs(unittest.TestCase): def setUp(self): path = os.getcwd() + '/solution.py' so = imp.load_source('solution', path) self.s = so.Solution() # common = os.path.dirname(os.path.dirname(os.getcwd())) + '/c...
27.090909
88
0.612975
50bab42f4756d6c0e341137d317366c7a99b1a7c
3,472
py
Python
apps/sqoop/src/sqoop/api/decorators.py
mapr/hue
84390cf8649feb34d74c574e771ea19410ecb970
[ "Apache-2.0" ]
null
null
null
apps/sqoop/src/sqoop/api/decorators.py
mapr/hue
84390cf8649feb34d74c574e771ea19410ecb970
[ "Apache-2.0" ]
null
null
null
apps/sqoop/src/sqoop/api/decorators.py
mapr/hue
84390cf8649feb34d74c574e771ea19410ecb970
[ "Apache-2.0" ]
4
2015-02-23T23:59:52.000Z
2018-01-03T06:59:26.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
40.372093
150
0.741071
06f9b511b322b2f0601f8a9a4c6740a90c802960
3,108
py
Python
auto-ipsec/libreswan/src/local_action_crashsa.py
HuzefaMandvi/python-keylime
28c7deff21b0de532265adf7cde2371d6bde011d
[ "BSD-2-Clause" ]
null
null
null
auto-ipsec/libreswan/src/local_action_crashsa.py
HuzefaMandvi/python-keylime
28c7deff21b0de532265adf7cde2371d6bde011d
[ "BSD-2-Clause" ]
null
null
null
auto-ipsec/libreswan/src/local_action_crashsa.py
HuzefaMandvi/python-keylime
28c7deff21b0de532265adf7cde2371d6bde011d
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python ''' DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited. This material is based upon work supported by the Assistant Secretary of Defense for Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclu...
36.139535
93
0.680824
321f759bbf2b689afba3d4e12e998366598bba11
1,830
py
Python
hackertyper.py
cybernetics/sublime-hacker-typer
68fc1efc23e2b501ef667f2e3f8eefc7ee9de1d3
[ "MIT" ]
1
2019-04-22T08:48:39.000Z
2019-04-22T08:48:39.000Z
hackertyper.py
cybernetics/sublime-hacker-typer
68fc1efc23e2b501ef667f2e3f8eefc7ee9de1d3
[ "MIT" ]
null
null
null
hackertyper.py
cybernetics/sublime-hacker-typer
68fc1efc23e2b501ef667f2e3f8eefc7ee9de1d3
[ "MIT" ]
null
null
null
import os.path import sublime, sublime_plugin hacker_enabled = False class HackerTyperCommand(sublime_plugin.TextCommand): def run(self, edit, enable=False, content=False): global hacker_enabled hacker_enabled = enable if content is False: return # Replace contents ...
29.047619
80
0.634426
104edf57a9c4a1be300830259da50a2ac0259b01
3,849
py
Python
python_testing1.py
structlooper/Learning_exercises
531b00cb1fcd1c7c1aea05854c685a51566942bf
[ "MIT" ]
null
null
null
python_testing1.py
structlooper/Learning_exercises
531b00cb1fcd1c7c1aea05854c685a51566942bf
[ "MIT" ]
null
null
null
python_testing1.py
structlooper/Learning_exercises
531b00cb1fcd1c7c1aea05854c685a51566942bf
[ "MIT" ]
null
null
null
# def word_counter(string): # new = {} # for i in string: # new[i] = string.count(i) # return new # string_value = input("Enter the number to count : ") # print(word_counter(string_value)) # list_0 = [1,2,3,4,5,5,5,5,5,6,6,6,7,7,8,8,9] # set_0 = set(list_0) # print(set_0) # list_1 = l...
26.006757
80
0.573655
852e58d9e09de98cbf20b2b194651a4cfbc3708f
1,790
py
Python
smindex/UpdateSubstorms.py
mattkjames7/smindex
68172e0ba49c2b134986e906df6d1b398a942255
[ "MIT" ]
null
null
null
smindex/UpdateSubstorms.py
mattkjames7/smindex
68172e0ba49c2b134986e906df6d1b398a942255
[ "MIT" ]
null
null
null
smindex/UpdateSubstorms.py
mattkjames7/smindex
68172e0ba49c2b134986e906df6d1b398a942255
[ "MIT" ]
null
null
null
import numpy as np from .ListFiles import ListFiles from . import Globals import RecarrayTools as RT import os from .ReadSSList import ReadSSList from .ReadSubstorms import ReadSubstorms def UpdateSubstorms(): ''' Update the list of substorms stored in $SMINDEX_PATH/Substorms.bin ''' #list the files files = ...
24.861111
99
0.683799
5f8aed6bdab407f813d613e1fdf6555e8ede73c4
3,673
py
Python
conformance-suites/2.0.0/deqp/functional/gles3/fbocolorbuffer/fbocolorbuffer_test_generator.py
dyna-dot/WebGL
e27538ce22753999c7418e66aa45a245d13e461d
[ "MIT" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
conformance-suites/2.0.0/deqp/functional/gles3/fbocolorbuffer/fbocolorbuffer_test_generator.py
dyna-dot/WebGL
e27538ce22753999c7418e66aa45a245d13e461d
[ "MIT" ]
2,313
2015-01-05T11:39:14.000Z
2022-03-30T21:27:47.000Z
conformance-suites/2.0.0/deqp/functional/gles3/fbocolorbuffer/fbocolorbuffer_test_generator.py
dyna-dot/WebGL
e27538ce22753999c7418e66aa45a245d13e461d
[ "MIT" ]
613
2015-01-03T21:47:15.000Z
2022-03-28T09:46:13.000Z
#!/usr/bin/env python # Copyright (c) 2016 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and/or associated documentation files (the # "Materials"), to deal in the Materials without restriction, including # without limitation the rights to use...
27.410448
74
0.687993
44ff26d48224fcad5931a7c6ff807328e2538a45
399
py
Python
CommonTools/CandAlgos/python/genParticleCustomSelector_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
CommonTools/CandAlgos/python/genParticleCustomSelector_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
CommonTools/CandAlgos/python/genParticleCustomSelector_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms genParticleCustomSelector = cms.EDFilter("GenParticleCustomSelector", src = cms.InputTag("genParticles"), chargedOnly = cms.bool(True), status = cms.int32(1), pdgId = cms.vint32(), tip = cms.double(3.5), minRapidity = cms.double(-2.4), lip = cms.doub...
23.470588
69
0.656642
0f2bd34a8e8496735fcb6e9a6c59a9d8613952d9
11,016
py
Python
rqalpha/model/bar.py
bingyao/rqalpha
2d8be981040963b946ec0713fa14831f4dbd10e6
[ "Apache-2.0" ]
1
2018-09-25T13:31:06.000Z
2018-09-25T13:31:06.000Z
rqalpha/model/bar.py
bingyao/rqalpha
2d8be981040963b946ec0713fa14831f4dbd10e6
[ "Apache-2.0" ]
2
2018-07-31T08:42:11.000Z
2019-05-07T10:25:52.000Z
rqalpha/model/bar.py
maorin/rqalpha
86ceedd8a3a04988af80d356012cef959febb947
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
30.430939
137
0.598039
3a9ec77fe3c2b552a45219b2616ea82b0f4edfa2
717
py
Python
config_global.py
ssat335/GuiPlotting
00c97084977e2e4e769180e7560921c4ccfecd0d
[ "MIT" ]
null
null
null
config_global.py
ssat335/GuiPlotting
00c97084977e2e4e769180e7560921c4ccfecd0d
[ "MIT" ]
null
null
null
config_global.py
ssat335/GuiPlotting
00c97084977e2e4e769180e7560921c4ccfecd0d
[ "MIT" ]
null
null
null
""" Author: Shameer Sathar Description: A module of functions for easy configuration. """ import os # Set default files names training_file_name = 'training_data.arff' test_file_name = 'test_data.arff' loaded_data_file = 'junk.mat' current_working_directory = os.getcwd() def set_training_file_name(new_name...
16.295455
62
0.760112
394e4b6647d7704201339aa75a7ce9bc17ee70e7
12,211
py
Python
sdscli/adapters/hysds/pkg.py
sdskit/sdscli
9bb96e880c8251d1dce56b901c1289ed80f83ce7
[ "Apache-2.0" ]
null
null
null
sdscli/adapters/hysds/pkg.py
sdskit/sdscli
9bb96e880c8251d1dce56b901c1289ed80f83ce7
[ "Apache-2.0" ]
24
2018-03-14T15:37:38.000Z
2021-11-30T21:59:44.000Z
sdscli/adapters/hysds/pkg.py
sdskit/sdscli
9bb96e880c8251d1dce56b901c1289ed80f83ce7
[ "Apache-2.0" ]
13
2018-02-22T15:01:35.000Z
2019-02-07T18:58:57.000Z
"""SDS package management functions.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import open from future import standard_library standard_library.install_aliases() import os import json import tarf...
38.278997
118
0.637867
7a055ce72bfc4020aa86c3cb33fa4f2d288a1fc9
379
py
Python
openstack_dashboard/enabled/_3050_identity_roles_panel.py
timpricecatalyst/horizon
8279ae0ed464e62e1c91e78341342160f8a07172
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/enabled/_3050_identity_roles_panel.py
timpricecatalyst/horizon
8279ae0ed464e62e1c91e78341342160f8a07172
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/enabled/_3050_identity_roles_panel.py
timpricecatalyst/horizon
8279ae0ed464e62e1c91e78341342160f8a07172
[ "Apache-2.0" ]
15
2017-01-12T10:40:00.000Z
2019-04-19T08:28:05.000Z
# The slug of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'roles' # The slug of the dashboard the PANEL associated with. Required. PANEL_GROUP = 'default' # The slug of the panel group the PANEL is associated with. PANEL_DASHBOARD = 'identity' # Python panel class of the PANEL to be added. ADD_PANEL = '...
37.9
71
0.775726
f18ce814c2d06c98f1ab9a77b2a8f8ef686d2884
38,096
py
Python
instances/passenger_demand/pas-20210421-2109-int16e/87.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int16e/87.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int16e/87.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 3691 passenger_arriving = ( (7, 14, 7, 6, 0, 0, 6, 6, 11, 7, 3, 0), # 0 (4, 9, 13, 1, 1, 0, 9, 6, 5, 5, 5, 0), # 1 (4, 9, 7, 1, 1, 0, 3, 12, 4, 6, 5, 0), # 2 (4, 16, 7, 6, 1, 0, 12, 10, 7, 6, 1, 0), # 3 (5, 7, 4, 4, 1, 0, 8, 12, 9, 4, 1, 0), # 4 (5, 10, 8, 7, 3, 0, 6, 8,...
113.719403
214
0.730575
e9aa0b8980e3a2750ae8b9e2015a8660d5f766ea
1,169
py
Python
setup.py
jlachowski/django-termsandconditions
69085ad7c1ec510371bdbe7c033b449af5f97bff
[ "BSD-3-Clause" ]
null
null
null
setup.py
jlachowski/django-termsandconditions
69085ad7c1ec510371bdbe7c033b449af5f97bff
[ "BSD-3-Clause" ]
null
null
null
setup.py
jlachowski/django-termsandconditions
69085ad7c1ec510371bdbe7c033b449af5f97bff
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages setup( name="django-termsandconditions", version="1.2.15", url='https://github.com/cyface/django-termsandconditions', license='BSD', description="django-termsandconditions is a Django app that enables users to accept terms and conditions of a site.", ...
35.424242
121
0.652695
88988983eb7092e0a1019d7fb0c8fd7b63869d44
32,682
py
Python
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/bgpipv4evpnvpws.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/bgpipv4evpnvpws.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/bgpipv4evpnvpws.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
# Copyright 1997 - 2018 by IXIA Keysight # # 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, p...
32.780341
565
0.748638
b6f1a704cce9a70f6a9c3737e64ef17de17077c2
750
py
Python
tests/manage.py
MEERQAT/django-ddp
43c6916027e27a231e2b3bcc43b96fc9183906dd
[ "MIT" ]
89
2015-03-12T09:00:13.000Z
2017-12-29T09:42:47.000Z
tests/manage.py
commoncode/django-ddp
d094b7161600e2bc6189ce635ed3328967920584
[ "MIT" ]
28
2015-06-13T18:58:45.000Z
2015-12-14T21:26:54.000Z
tests/manage.py
MEERQAT/django-ddp
43c6916027e27a231e2b3bcc43b96fc9183906dd
[ "MIT" ]
17
2016-10-05T06:17:54.000Z
2021-06-10T20:00:42.000Z
#!/usr/bin/env python """Entry point for Django DDP test project.""" import os import sys import dddp dddp.greenify() os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings' sys.path.insert(0, os.path.dirname(__file__)) def run_tests(): """Run the test suite.""" import django from django.test.run...
24.193548
64
0.714667
5fc8d60073c6bee614993da596d9c90a1ab31474
4,262
py
Python
backend/webserver/api/admin.py
harperbenjamin/coco-annotator
2b0c4edcde78f94d4a16f8c927312043dab7fda9
[ "MIT" ]
null
null
null
backend/webserver/api/admin.py
harperbenjamin/coco-annotator
2b0c4edcde78f94d4a16f8c927312043dab7fda9
[ "MIT" ]
null
null
null
backend/webserver/api/admin.py
harperbenjamin/coco-annotator
2b0c4edcde78f94d4a16f8c927312043dab7fda9
[ "MIT" ]
null
null
null
from flask_login import login_required, current_user from flask_restplus import Namespace, Resource, reqparse from werkzeug.security import generate_password_hash from database import UserModel from ..util.query_util import fix_ids api = Namespace("admin", description="Admin related operations") users = reqparse.Req...
30.014085
85
0.616847
60faac8b071830fb3db7fdcae429a8c81c3fd015
1,258
py
Python
EE475/Ch5P9b.py
PhoeniXuzoo/NU-Projects
a217ad46e6876ceffb3dec1d6e52f775674b2e8b
[ "MIT" ]
null
null
null
EE475/Ch5P9b.py
PhoeniXuzoo/NU-Projects
a217ad46e6876ceffb3dec1d6e52f775674b2e8b
[ "MIT" ]
null
null
null
EE475/Ch5P9b.py
PhoeniXuzoo/NU-Projects
a217ad46e6876ceffb3dec1d6e52f775674b2e8b
[ "MIT" ]
null
null
null
import numpy as np def readData(csvname): data = np.loadtxt(csvname, delimiter=',') x = data[:-1, :] y = data[-1:, :] for i in range(len(x)): x[i] = (x[i] - np.mean(x[i])) / np.std(x[i]) return x, y def gradientDescentEachStep(w, x, y): w_T = np.transpose(w) new_W = [] for i i...
25.673469
88
0.515898
33e71068b8e8eb3de05a4903f92c3ed2f9c6e3a7
56,385
py
Python
eval.py
xanderdavies/keras-YOLOv3-model-set
ca87c6c7f913693308603808499b6983f61d6208
[ "MIT" ]
null
null
null
eval.py
xanderdavies/keras-YOLOv3-model-set
ca87c6c7f913693308603808499b6983f61d6208
[ "MIT" ]
null
null
null
eval.py
xanderdavies/keras-YOLOv3-model-set
ca87c6c7f913693308603808499b6983f61d6208
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Calculate mAP for YOLO model on some annotation dataset """ import os, argparse, time import numpy as np import operator from operator import mul from functools import reduce from PIL import Image from collections import OrderedDict import matplotlib.pyplot as plt from...
40.332618
238
0.649818
f2f60da8df39dbf79fc9c63b94ecaa2fe84b40eb
626
py
Python
Observer/Observer/kpis.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
Observer/Observer/kpis.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
Observer/Observer/kpis.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
from observer import AbsSubject class KPIs(AbsSubject): _open_tickets = -1 _closed_tickets = -1 _new_tickets = -1 @property def open_tickets(self): return self._open_tickets @property def closed_tickets(self): return self._closed_tickets ...
26.083333
67
0.627796
50c229a5a54ede3eb9446dfa3a3550b5908448b0
2,353
py
Python
find_similar_images.py
Yay295/imagehash
7f19c2a86dc2c5ffd907a131c12c0fc834034c9f
[ "BSD-2-Clause" ]
null
null
null
find_similar_images.py
Yay295/imagehash
7f19c2a86dc2c5ffd907a131c12c0fc834034c9f
[ "BSD-2-Clause" ]
null
null
null
find_similar_images.py
Yay295/imagehash
7f19c2a86dc2c5ffd907a131c12c0fc834034c9f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) from PIL import Image import imagehash """ Demo of hashing """ def find_similar_images(userpaths, hashfunc = imagehash.average_hash): def is_image(filename): f = filename.lower() return f.endswith(".png") or f...
32.680556
108
0.61411
9cb10411a267ac95970228f81c46b40d571cb321
57,832
py
Python
diofant/tests/core/test_expr.py
diofant/omg
72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2
[ "BSD-3-Clause" ]
null
null
null
diofant/tests/core/test_expr.py
diofant/omg
72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2
[ "BSD-3-Clause" ]
null
null
null
diofant/tests/core/test_expr.py
diofant/omg
72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2
[ "BSD-3-Clause" ]
null
null
null
import pytest from diofant import (Add, Basic, Derivative, DiracDelta, Dummy, E, Float, Function, Ge, Gt, Heaviside, I, Integer, Integral, Le, Lt, Max, Mul, Number, NumberSymbol, O, Piecewise, Pow, Rational, Si, Subs, Sum, Symbol, Tuple, Wild, ...
33.682003
94
0.560676
ec5f2f6db6a955f85efee5b48fd894f5d9e433a7
357
py
Python
sensors/__init__.py
bitmarker/rpi_i2c
e56989e8a451d01fc756d3ccf3d7f8ffa590ccce
[ "MIT" ]
1
2016-10-18T16:27:28.000Z
2016-10-18T16:27:28.000Z
sensors/__init__.py
bitmarker/rpi_i2c
e56989e8a451d01fc756d3ccf3d7f8ffa590ccce
[ "MIT" ]
null
null
null
sensors/__init__.py
bitmarker/rpi_i2c
e56989e8a451d01fc756d3ccf3d7f8ffa590ccce
[ "MIT" ]
null
null
null
import smbus class GenericSensor(): name = "Unknown" def __init__(self): pass def fields(self): pass def values(self): pass class I2CSensor(GenericSensor): bus = None def connect(self): if I2CSensor.bus == None: I2CSensor.bus = smbus.SMBus(1) ...
17.85
42
0.568627
8ef687619838b8a9d2583578cffe581ca4b24bea
371
py
Python
env/lib/python3.4/site-packages/django_markdown/templatetags/django_markdown_static.py
marto-k/pettify-1
6d6ab498b2b53559419fc8b523150ce60d40b081
[ "MIT" ]
2
2017-02-01T09:57:40.000Z
2017-06-03T15:26:55.000Z
env/lib/python3.4/site-packages/django_markdown/templatetags/django_markdown_static.py
marto-k/pettify-1
6d6ab498b2b53559419fc8b523150ce60d40b081
[ "MIT" ]
2
2018-05-11T20:10:23.000Z
2019-05-01T21:13:07.000Z
env/lib/python3.4/site-packages/django_markdown/templatetags/django_markdown_static.py
marto-k/pettify-1
6d6ab498b2b53559419fc8b523150ce60d40b081
[ "MIT" ]
3
2017-02-11T13:19:28.000Z
2018-08-31T18:51:18.000Z
from django.conf import settings from django.template import Library register = Library() if 'django.contrib.staticfiles' in settings.INSTALLED_APPS: from django.contrib.staticfiles.templatetags.staticfiles import static as _static else: from django.templatetags.static import static as _static @register.sim...
24.733333
85
0.800539
d2f7eeef5e045778ece9a8eee35ef849835b1f47
2,429
py
Python
meerschaum/api/dash/callbacks/login.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
32
2020-09-14T16:29:19.000Z
2022-03-08T00:51:28.000Z
meerschaum/api/dash/callbacks/login.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
3
2020-10-04T20:03:30.000Z
2022-02-02T21:04:46.000Z
meerschaum/api/dash/callbacks/login.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
5
2021-04-22T23:49:21.000Z
2022-02-02T12:59:08.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Callbacks for the login page. """ from __future__ import annotations from meerschaum.utils.packages import attempt_import, import_html, import_dcc dash = attempt_import('dash', lazy=False) import uuid from meerschaum.utils.typing import Optional from...
33.736111
96
0.71058
61c98fa038b9d8fae22f8449fbf83cd9b6fc3e55
3,082
py
Python
src/python/grpcio_tests/setup.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
59
2019-06-28T03:07:42.000Z
2022-03-11T23:09:34.000Z
src/python/grpcio_tests/setup.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
5
2019-07-31T01:49:08.000Z
2021-05-08T02:44:21.000Z
src/python/grpcio_tests/setup.py
dinara92/grpc
53d82af98c2ac243c45ac28c57062273d03cd9dd
[ "Apache-2.0" ]
29
2019-06-12T03:22:18.000Z
2022-03-03T16:47:28.000Z
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
28.275229
80
0.696301
a9b11e52b8dee0441ea8ec8807cc5b841ba2fcc8
4,616
py
Python
engine/app_config.py
pnatel/PhotoFolder
2bb4cc2c4e7cde8beb3211e0e4f8f2d9931dc37c
[ "MIT" ]
null
null
null
engine/app_config.py
pnatel/PhotoFolder
2bb4cc2c4e7cde8beb3211e0e4f8f2d9931dc37c
[ "MIT" ]
5
2020-09-24T22:22:02.000Z
2021-07-30T19:08:29.000Z
engine/app_config.py
pnatel/PhotoFolder
2bb4cc2c4e7cde8beb3211e0e4f8f2d9931dc37c
[ "MIT" ]
null
null
null
import configparser import logging # Running as standalone or part of the application if __name__ == '__main__' or __name__ == 'app_config': import setup as stp else: import engine.setup as stp # Global Variables _sourceFolder = '' _destinationFolder = '' _logPath = '' _fileType = [] _numberOfPics = 0 _MaxNu...
30.979866
78
0.67331
fd00c8a223e6935912360a2283a51c5a35f97138
1,316
py
Python
tests/pre_process/test_pre_process.py
speedyleion/sphinx-c-doc
65721f7164a463742bc2d0b18a92b2d633a5eb3a
[ "MIT", "Unlicense" ]
7
2020-06-06T06:47:31.000Z
2021-12-12T14:18:08.000Z
tests/pre_process/test_pre_process.py
speedyleion/sphinx-c-doc
65721f7164a463742bc2d0b18a92b2d633a5eb3a
[ "MIT", "Unlicense" ]
15
2020-03-12T01:43:24.000Z
2021-04-21T06:45:13.000Z
tests/pre_process/test_pre_process.py
speedyleion/sphinx-c-doc
65721f7164a463742bc2d0b18a92b2d633a5eb3a
[ "MIT", "Unlicense" ]
1
2021-08-05T20:23:01.000Z
2021-08-05T20:23:01.000Z
""" Test the pre-parse hook """ from textwrap import dedent from sphinx.ext.autodoc.directive import AutodocDirective NEW_FILE_CONTENTS = """\ /** * A comment for a variable that doesn't exist in original file */ static int compilation_db_define; """ new_contents_int = """\ static int compi...
25.307692
75
0.650456
384c4b3493dfc2d7098845f27a5554e9e4ae03b6
28,002
py
Python
transcrypt/modules/org/transcrypt/static_check/pyflakes/pyflakes/test/test_other.py
JMCanning78/Transcrypt
8a8dabe831240414fdf1d5027fa2b0d71ab45d05
[ "Apache-2.0" ]
3
2017-12-22T02:16:48.000Z
2018-01-23T17:16:13.000Z
transcrypt/modules/org/transcrypt/static_check/pyflakes/pyflakes/test/test_other.py
JMCanning78/Transcrypt
8a8dabe831240414fdf1d5027fa2b0d71ab45d05
[ "Apache-2.0" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
transcrypt/modules/org/transcrypt/static_check/pyflakes/pyflakes/test/test_other.py
JMCanning78/Transcrypt
8a8dabe831240414fdf1d5027fa2b0d71ab45d05
[ "Apache-2.0" ]
10
2017-12-15T13:48:41.000Z
2021-01-24T10:31:22.000Z
""" Tests for various Pyflakes behavior. """ from sys import version_info from pyflakes import messages as m from pyflakes.test.harness import TestCase, skip, skipIf class Test(TestCase): def test_duplicateArgs(self): self.flakes('def fu(bar, bar): pass', m.DuplicateArgument) def test_localReferen...
26.847555
84
0.503035
40a637533b3679ed6bb798023720f626cc31d8d3
802
py
Python
moviesproject/moviesproject/urls.py
Diegomca98/movies-project
39cfb7cde6142a7694052ddd413745aff035d57b
[ "MIT" ]
null
null
null
moviesproject/moviesproject/urls.py
Diegomca98/movies-project
39cfb7cde6142a7694052ddd413745aff035d57b
[ "MIT" ]
null
null
null
moviesproject/moviesproject/urls.py
Diegomca98/movies-project
39cfb7cde6142a7694052ddd413745aff035d57b
[ "MIT" ]
null
null
null
"""moviesproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
34.869565
77
0.704489
5c3527c5a02cf64852644123773365b277a38f5c
6,035
py
Python
helper.py
neeliche/CarND-Semantic-Segmentation
90cc1fea67db1ac38718d9baf398cceca4856be6
[ "MIT" ]
null
null
null
helper.py
neeliche/CarND-Semantic-Segmentation
90cc1fea67db1ac38718d9baf398cceca4856be6
[ "MIT" ]
null
null
null
helper.py
neeliche/CarND-Semantic-Segmentation
90cc1fea67db1ac38718d9baf398cceca4856be6
[ "MIT" ]
null
null
null
import re import random import numpy as np import os.path import scipy.misc import shutil import zipfile import time import tensorflow as tf from glob import glob from urllib.request import urlretrieve from tqdm import tqdm class DLProgress(tqdm): last_block = 0 def hook(self, block_num=1, block_size=1, tota...
38.935484
115
0.654515
49ea53251f06e5a5b8a8e0555345a1788180ffe3
353
py
Python
2018/04/march-for-our-lives-soundscapes-t-20181226/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2018/04/march-for-our-lives-soundscapes-t-20181226/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2018/04/march-for-our-lives-soundscapes-t-20181226/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python import base_filters COPY_GOOGLE_DOC_KEY = '1wuaJembOs6MTFMlmBLeOcpHDk5UVnZ2BkC2vShPtIaM' #'1KnuyBMACC26M2Lcty0c1NU-b74e3HL20ULtIVi9HNH0' USE_ASSETS = False # Use these variables to override the default cache timeouts for this graphic # DEFAULT_MAX_AGE = 20 # ASSETS_MAX_AGE = 300 JINJA_FILTER_...
23.533333
77
0.830028
c846614075922b6a2b02114c7d94e1302c3c3870
634
py
Python
archived-files/obsoleted/py2/p4/p4desc.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
archived-files/obsoleted/py2/p4/p4desc.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
archived-files/obsoleted/py2/p4/p4desc.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
from P4 import P4, P4Exception import sys f = open("d:/p4test.txt", 'a') def getDescription(id): p4 = P4() #p4.port = "1666" #p4.user = "james" #p4.client = "james" #p4.password = "122988" try: p4.connect() cl = p4.fetch_change(id) return cl['Description...
15.85
33
0.5347
b77af8c722a535d1c763f89824e29ba42b452614
1,221
py
Python
profiles_api/serializers.py
mansi173-sharma/profiles-rest-api
21e26f42aa28494e76ccf4ade080ec2cdd706285
[ "MIT" ]
null
null
null
profiles_api/serializers.py
mansi173-sharma/profiles-rest-api
21e26f42aa28494e76ccf4ade080ec2cdd706285
[ "MIT" ]
null
null
null
profiles_api/serializers.py
mansi173-sharma/profiles-rest-api
21e26f42aa28494e76ccf4ade080ec2cdd706285
[ "MIT" ]
null
null
null
from rest_framework import serializers from profiles_api import models class HelloSerializer(serializers.Serializer): """Serializers a name field for testing our api view""" name = serializers.CharField(max_length =10) class UserProfileSerializer(serializers.ModelSerializer): """Serializes a u...
32.131579
66
0.609337
4d86eda58e47a9b479f7cfeecccc7f486000eda4
149
py
Python
aiogoogle/auth/__init__.py
iburinoc/aiogoogle
6f702c0d19599fce1bd36b7a32922e76aaa74008
[ "MIT" ]
null
null
null
aiogoogle/auth/__init__.py
iburinoc/aiogoogle
6f702c0d19599fce1bd36b7a32922e76aaa74008
[ "MIT" ]
null
null
null
aiogoogle/auth/__init__.py
iburinoc/aiogoogle
6f702c0d19599fce1bd36b7a32922e76aaa74008
[ "MIT" ]
null
null
null
__all__ = [ 'creds', 'data' ] from .creds import UserCreds, ApiKey from .managers import ApiKeyManager, Oauth2Manager, OpenIdConnectManager
21.285714
72
0.738255
e13762985a932df72792ffa99791fab0fc0a2d15
1,743
py
Python
tests/cpp/pylmcp/util.py
VVCAS-Sean/OpenUxAS
dcd7be29d182d278a5387908f568d6f8a06b79ee
[ "NASA-1.3" ]
88
2017-08-24T07:02:01.000Z
2022-03-18T04:34:17.000Z
tests/cpp/pylmcp/util.py
VVCAS-Sean/OpenUxAS
dcd7be29d182d278a5387908f568d6f8a06b79ee
[ "NASA-1.3" ]
46
2017-06-08T18:18:08.000Z
2022-03-15T18:24:43.000Z
tests/cpp/pylmcp/util.py
VVCAS-Sean/OpenUxAS
dcd7be29d182d278a5387908f568d6f8a06b79ee
[ "NASA-1.3" ]
53
2017-06-22T14:48:05.000Z
2022-02-15T16:59:38.000Z
import struct import typing from typing import Any, Tuple class Buffer(object): SUPPORTED_TYPES = set(['int32', 'int64', 'uint16', 'uint32', 'real32', 'real64', 'byte', 'bool', 'string']) BASIC_TYPES ...
28.57377
76
0.524957
f77742d2da9189d2e2a9edea395cbbafdb074e70
304
py
Python
experiments/priv_fair/aux/create_offset_sizes.py
lxuechen/swissknife
43dbd36f1e998ebe29c0b85fafd0de765dfb5de8
[ "MIT" ]
1
2022-02-25T00:00:30.000Z
2022-02-25T00:00:30.000Z
experiments/priv_fair/aux/create_offset_sizes.py
lxuechen/swissknife
43dbd36f1e998ebe29c0b85fafd0de765dfb5de8
[ "MIT" ]
null
null
null
experiments/priv_fair/aux/create_offset_sizes.py
lxuechen/swissknife
43dbd36f1e998ebe29c0b85fafd0de765dfb5de8
[ "MIT" ]
null
null
null
"""Create json files for offsets.""" from swissknife import utils # Only give the majority some advantage. for size in (10, 20, 50, 100, 200, 500, 1000, 2000,): size_str = utils.int2str(size) path = utils.join(".", f'offset_sizes_{size_str}.json') utils.jdump( {0: size}, path )
27.636364
59
0.644737
9be466651c6c7498ac0a5bec6c5a3e65bb3ead9e
75,590
py
Python
plugins/modules/oci_cloud_guard_target_facts.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_cloud_guard_target_facts.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_cloud_guard_target_facts.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
49.730263
156
0.356066
a3352fff0ae389319620624142fbabe047f49c57
1,337
py
Python
hackzurich_py/test_opencv.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
hackzurich_py/test_opencv.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
hackzurich_py/test_opencv.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Sep 17 00:54:49 2016 @author: gabrielfior """ import numpy as np import cv2 from matplotlib import pyplot as plt import os import cv2.cv as cv import json os.chdir('/Users/gabrielfior/hackzurich') filedir = os.getcwd()+'/images/' img_list=os.listdir(filedir) # import t...
22.661017
79
0.621541
43ece571a0e852184ed5a702d80e85028d20d2c9
275
py
Python
src/dog.py
tenderghost/FlyPersonalAssistant
f9b379a42c32ff1ea73803d25cce7be04f8ec497
[ "MIT" ]
1
2018-01-07T16:45:31.000Z
2018-01-07T16:45:31.000Z
src/dog.py
tenderghost/FlyPersonalAssistant
f9b379a42c32ff1ea73803d25cce7be04f8ec497
[ "MIT" ]
null
null
null
src/dog.py
tenderghost/FlyPersonalAssistant
f9b379a42c32ff1ea73803d25cce7be04f8ec497
[ "MIT" ]
null
null
null
""" A simple class comments. """ class Dog(): """A simple definition for dogs""" def __init__(self, name, age): self.name = name self.age = age def sit(self): print("A dog is sitting") def spark(self): print("Wow wow wow!")
17.1875
38
0.545455
fc63d631bbcd4271a867a41421b2a30bf84db2bf
578
py
Python
find_largest_word/main.py
joaojunior/hackerrank
a5ee0449e791535930b8659dfb7dddcf9e1237de
[ "MIT" ]
null
null
null
find_largest_word/main.py
joaojunior/hackerrank
a5ee0449e791535930b8659dfb7dddcf9e1237de
[ "MIT" ]
null
null
null
find_largest_word/main.py
joaojunior/hackerrank
a5ee0449e791535930b8659dfb7dddcf9e1237de
[ "MIT" ]
1
2019-06-19T00:51:02.000Z
2019-06-19T00:51:02.000Z
def find_largest_word(words, target): words = sorted(words, key=len, reverse=True) for word in words: i = 0 j = 0 while i < len(word) and j < len(target): if word[i] == target[j]: i += 1 j += 1 else: j += 1 i...
25.130435
48
0.470588
f6f432f7f0cea519a77d2b7ef1e766436ae5e49e
629
bzl
Python
tools/python.bzl
huhaihui/moteus
7616806e315f80ebb80ba487ca60d662e135ebe2
[ "Apache-2.0" ]
1
2021-03-08T08:16:14.000Z
2021-03-08T08:16:14.000Z
tools/python.bzl
huhaihui/moteus
7616806e315f80ebb80ba487ca60d662e135ebe2
[ "Apache-2.0" ]
null
null
null
tools/python.bzl
huhaihui/moteus
7616806e315f80ebb80ba487ca60d662e135ebe2
[ "Apache-2.0" ]
null
null
null
# -*- python -*- # Copyright 2020 Josh Pieper, jjp@pobox.com. # # 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...
34.944444
74
0.742448
c99570e8094f2c315bba4ef135244a1c92c5e7e2
7,790
py
Python
deba/deps/expr.py
pckhoi/liner
d07f86806902de77d0acc42301ae3dd1b93450d5
[ "MIT" ]
null
null
null
deba/deps/expr.py
pckhoi/liner
d07f86806902de77d0acc42301ae3dd1b93450d5
[ "MIT" ]
null
null
null
deba/deps/expr.py
pckhoi/liner
d07f86806902de77d0acc42301ae3dd1b93450d5
[ "MIT" ]
null
null
null
import re import itertools import typing import ast from fnmatch import fnmatchcase from attrs import define, field from deba.attrs_utils import field_transformer, doc from deba.deps.module import Stack class ExprTemplateParseError(ValueError): pass @define(field_transformer=field_transformer(globals())) class...
36.745283
94
0.476123
298a7ed9b43624ac72381dcb62e138aa569cbefd
279
py
Python
Executando-REGEX/usandoPython.py
Maxel-Uds/Curso-REGEX
6e417510c7c803860b771d75aa094fe7b3cae3cc
[ "MIT" ]
null
null
null
Executando-REGEX/usandoPython.py
Maxel-Uds/Curso-REGEX
6e417510c7c803860b771d75aa094fe7b3cae3cc
[ "MIT" ]
null
null
null
Executando-REGEX/usandoPython.py
Maxel-Uds/Curso-REGEX
6e417510c7c803860b771d75aa094fe7b3cae3cc
[ "MIT" ]
null
null
null
from nis import match import re texto = '0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f' pattern9 = re.compile('9') match1 = re.search(pattern9, texto) print("Posicoes: %s, %s; Valor: %s.") % (match1.start(), match1.end(), match1.group(0)) valores = re.findall('[a-f]', texto) print(valores)
25.363636
87
0.645161
c409a975d892c5d5ceb12bbbeb362960497a1418
3,573
py
Python
pandas_questions.py
youssefchouaieb/2021-assignment-pandas
849ae379c80915623a9e749ce6ed3999cfcd4167
[ "BSD-2-Clause" ]
null
null
null
pandas_questions.py
youssefchouaieb/2021-assignment-pandas
849ae379c80915623a9e749ce6ed3999cfcd4167
[ "BSD-2-Clause" ]
null
null
null
pandas_questions.py
youssefchouaieb/2021-assignment-pandas
849ae379c80915623a9e749ce6ed3999cfcd4167
[ "BSD-2-Clause" ]
null
null
null
"""Plotting referendum results in pandas. In short, we want to make beautiful map to report results of a referendum. In some way, we would like to depict results with something similar to the maps that you can find here: https://github.com/x-datascience-datacamp/datacamp-assignment-pandas/blob/main/example_map.png To...
37.610526
117
0.714526
d0fdc52ce442aa7921859f024dc8eb27cb1087ce
814
py
Python
03_angularjs_django/manage.py
wasit7/fullstack_tutorial
3c045dd80cf91cfe1a026e1579efac4af01265c9
[ "MIT" ]
null
null
null
03_angularjs_django/manage.py
wasit7/fullstack_tutorial
3c045dd80cf91cfe1a026e1579efac4af01265c9
[ "MIT" ]
null
null
null
03_angularjs_django/manage.py
wasit7/fullstack_tutorial
3c045dd80cf91cfe1a026e1579efac4af01265c9
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "angularjs_django.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure ...
35.391304
80
0.646192
c25b2dddc096d3ca2426ade82f45fcbc2ba7be2e
1,516
py
Python
ScrapedData/CosineScore.py
Robo-Sapien/Search-Engine-for-arXiv.org
0014bb3bd91b2ddf070dd1fe1cc5af29fa30441f
[ "MIT" ]
null
null
null
ScrapedData/CosineScore.py
Robo-Sapien/Search-Engine-for-arXiv.org
0014bb3bd91b2ddf070dd1fe1cc5af29fa30441f
[ "MIT" ]
null
null
null
ScrapedData/CosineScore.py
Robo-Sapien/Search-Engine-for-arXiv.org
0014bb3bd91b2ddf070dd1fe1cc5af29fa30441f
[ "MIT" ]
null
null
null
from scipy import spatial import numpy class CosineScore: """Calculate cosine similarity score for each document and rank them :param query: query vector :param matrix: tf-idf numpy matrix """ rank = None docIndex = None score = None def __init__(self, query, matrix): self.ra...
28.074074
90
0.575198
9d5e983c2d7529f9d9b2df06b41236ed4f6fb41c
3,733
py
Python
zulip_bots/zulip_bots/bots/link_shortener/link_shortener.py
iishiishii/python-zulip-api
8500a3238739a080e1809e204c54685437631457
[ "Apache-2.0" ]
null
null
null
zulip_bots/zulip_bots/bots/link_shortener/link_shortener.py
iishiishii/python-zulip-api
8500a3238739a080e1809e204c54685437631457
[ "Apache-2.0" ]
null
null
null
zulip_bots/zulip_bots/bots/link_shortener/link_shortener.py
iishiishii/python-zulip-api
8500a3238739a080e1809e204c54685437631457
[ "Apache-2.0" ]
null
null
null
import re import requests import logging from typing import Any, Dict class LinkShortenerHandler(object): '''A Zulip bot that will shorten URLs ("links") in a conversation using the goo.gl URL shortener. ''' def usage(self) -> str: return ( 'Mention the link shortener bot in a con...
34.88785
112
0.592285
e0c2f689ca48ba0f09a8d469770b7119c838d70b
2,043
py
Python
tests/test_generate.py
Gorlph/pythainlp
6135ba5f490e00640de902a0d5c65a4537739d98
[ "Apache-2.0" ]
569
2017-10-22T16:48:55.000Z
2022-03-30T09:59:14.000Z
tests/test_generate.py
Gorlph/pythainlp
6135ba5f490e00640de902a0d5c65a4537739d98
[ "Apache-2.0" ]
531
2017-10-24T04:34:13.000Z
2022-03-20T16:30:14.000Z
tests/test_generate.py
Gorlph/pythainlp
6135ba5f490e00640de902a0d5c65a4537739d98
[ "Apache-2.0" ]
218
2017-12-08T01:52:25.000Z
2022-03-21T06:56:32.000Z
# -*- coding: utf-8 -*- import unittest from pythainlp.generate import Unigram, Bigram, Trigram from pythainlp.generate.thai2fit import gen_sentence class TestGeneratePackage(unittest.TestCase): def test_unigram(self): _tnc_unigram = Unigram("tnc") self.assertIsNotNone(_tnc_unigram.gen_sentence(...
43.468085
86
0.717572
6fc1cfce68a6e093812c3ef93b96c3ec9d64b58e
9,886
py
Python
statsmodels/sandbox/cox.py
changhiskhan/statsmodels
af26395e8b75b112ae7b3099532aefd8d002b8ca
[ "BSD-3-Clause" ]
1
2019-01-10T13:40:26.000Z
2019-01-10T13:40:26.000Z
statsmodels/sandbox/cox.py
changhiskhan/statsmodels
af26395e8b75b112ae7b3099532aefd8d002b8ca
[ "BSD-3-Clause" ]
null
null
null
statsmodels/sandbox/cox.py
changhiskhan/statsmodels
af26395e8b75b112ae7b3099532aefd8d002b8ca
[ "BSD-3-Clause" ]
null
null
null
'''Cox proportional hazards regression model. some dimension problems fixed import errors currently produces parameter estimate but then raises exception for other results finally, after running the script several times, I get a OSError with too many open file handles updates and changes : as of 2010-05-15 Attrib...
32.519737
121
0.541675
1cbdd2ed88d0f3d011f8ae5503d1897bc3c5ed37
126
py
Python
week_06/agree.py
DaviNakamuraCardoso/cs50
2081abb6fa1131184b07a68ed3b07d538c3ba3dd
[ "MIT" ]
2
2020-08-05T23:27:24.000Z
2020-08-12T01:52:29.000Z
week_06/agree.py
DaviNakamuraCardoso/cs50
2081abb6fa1131184b07a68ed3b07d538c3ba3dd
[ "MIT" ]
null
null
null
week_06/agree.py
DaviNakamuraCardoso/cs50
2081abb6fa1131184b07a68ed3b07d538c3ba3dd
[ "MIT" ]
1
2020-08-07T04:50:09.000Z
2020-08-07T04:50:09.000Z
answer = input("Do you agree?\n") if answer.lower() in ['no', 'nope', 'n']: print("Not agreed.") else: print("Agree.")
25.2
41
0.571429
e43a0ab1e53ce028588292368b2929f063a30516
3,823
py
Python
compression/cifar10/structured-sparsity/args.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
228
2017-11-20T06:05:56.000Z
2022-03-23T12:40:05.000Z
compression/cifar10/structured-sparsity/args.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
36
2018-01-11T23:26:20.000Z
2022-03-12T00:53:38.000Z
compression/cifar10/structured-sparsity/args.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
76
2017-11-22T22:00:00.000Z
2022-03-28T05:58:57.000Z
# Copyright 2017,2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
52.369863
161
0.614177
cc771abb4dfe2d6ee688237cf57df732e8532f65
5,789
py
Python
python/ray/ray_operator/operator.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
1
2021-03-13T08:18:36.000Z
2021-03-13T08:18:36.000Z
python/ray/ray_operator/operator.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
69
2021-03-27T07:03:21.000Z
2022-03-05T08:07:51.000Z
python/ray/ray_operator/operator.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
null
null
null
import logging import multiprocessing as mp import os from typing import Any, Callable, Dict, Optional from kubernetes.client.exceptions import ApiException import yaml import ray._private.monitor as monitor from ray._private import services from ray.autoscaler._private import commands from ray.ray_operator import op...
35.084848
76
0.6692
a6333fbc8cc9a5cb812dea6e2ba87bbada323dc4
463
py
Python
tlga/testing.py
cpmech/tlga
55c5b62f270dc26fc022ae9e41726bba0d01f1f7
[ "BSD-3-Clause" ]
null
null
null
tlga/testing.py
cpmech/tlga
55c5b62f270dc26fc022ae9e41726bba0d01f1f7
[ "BSD-3-Clause" ]
null
null
null
tlga/testing.py
cpmech/tlga
55c5b62f270dc26fc022ae9e41726bba0d01f1f7
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2012 Dorival de Moraes Pedroso. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from numpy import array def CheckVector(str_a, str_b, a, b, verb=True): a = array(a) b = array(b) if (a != b).any(): print '...
30.866667
79
0.565875
2fd0327548e8a1067096ef38cbb275fae2082192
431
py
Python
reviewboard/scmtools/evolutions/repository_archive.py
pombredanne/reviewboard
15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d
[ "MIT" ]
null
null
null
reviewboard/scmtools/evolutions/repository_archive.py
pombredanne/reviewboard
15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d
[ "MIT" ]
null
null
null
reviewboard/scmtools/evolutions/repository_archive.py
pombredanne/reviewboard
15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d
[ "MIT" ]
null
null
null
from django_evolution.mutations import AddField, ChangeMeta from django.db import models MUTATIONS = [ AddField('Repository', 'archived', models.BooleanField, initial=False), AddField('Repository', 'archived_timestamp', models.DateTimeField, null=True), ChangeMeta('Repository', 'unique_togeth...
33.153846
75
0.663573
707e34b8ff187f08c2a4eb37727dc483741cf545
1,809
py
Python
benchmark/startPyquil2224.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil2224.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil2224.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=40 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(3) # number=24 prog...
25.125
64
0.565506
8aa93501d906e4c5c976bbaf651bed7cea449b34
1,786
py
Python
contrib/compare_ids_test.py
muhammadharis/rules_docker
77245998f490bc208ab297a5a3962fbdc494e42b
[ "Apache-2.0" ]
912
2017-03-31T06:00:01.000Z
2022-03-28T06:12:29.000Z
contrib/compare_ids_test.py
muhammadharis/rules_docker
77245998f490bc208ab297a5a3962fbdc494e42b
[ "Apache-2.0" ]
1,854
2017-03-31T13:57:43.000Z
2022-03-31T16:15:33.000Z
contrib/compare_ids_test.py
muhammadharis/rules_docker
77245998f490bc208ab297a5a3962fbdc494e42b
[ "Apache-2.0" ]
628
2017-03-31T01:00:40.000Z
2022-03-31T08:40:08.000Z
# Copyright 2015 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
27.90625
76
0.705487
bbe411438de553390f0f317fadea5b1895703cc3
2,651
py
Python
codes/Linear_models/SDM.py
jswanglp/MyML
ea1510cc5c2dec9eb37e371a73234b3a228beca7
[ "MIT" ]
7
2019-05-04T13:57:52.000Z
2021-12-31T03:39:58.000Z
codes/Linear_models/SDM.py
jswanglp/MyML
ea1510cc5c2dec9eb37e371a73234b3a228beca7
[ "MIT" ]
19
2020-09-26T01:16:10.000Z
2022-02-10T02:11:15.000Z
codes/Linear_models/SDM.py
jswanglp/MyML
ea1510cc5c2dec9eb37e371a73234b3a228beca7
[ "MIT" ]
2
2019-06-02T05:10:35.000Z
2020-09-19T07:24:43.000Z
# 监督下降法 (Supervised Descent Method, SDM) # 该程序简单的实现了 SDM 算法对数据的拟合 # 拟合函数为多项式函数 # 论文在这里:https://www.cv-foundation.org/openaccess/content_cvpr_2013/papers/Xiong_Supervised_Descent_Method_2013_CVPR_paper.pdf # -*- coding: utf-8 -*- """ Created on 22 June, 2019 @author jswanglp requirements: matplotlib==2.0.2 num...
31.559524
125
0.615617
cd8db470e146326bc752e02de0b7b03cd50b5e74
47,725
py
Python
src/segmentpy/_taskManager/mainwindow_logic.py
ZeliangSu/SegmentPy
e9f975cb49dd81fbc9a75388eecefea13fd9cb48
[ "Apache-2.0" ]
4
2021-06-08T07:53:55.000Z
2022-02-16T15:10:15.000Z
src/segmentpy/_taskManager/mainwindow_logic.py
ZeliangSu/SegmentPy
e9f975cb49dd81fbc9a75388eecefea13fd9cb48
[ "Apache-2.0" ]
7
2021-06-01T21:19:47.000Z
2022-02-25T07:36:58.000Z
src/segmentpy/_taskManager/mainwindow_logic.py
ZeliangSu/SegmentPy
e9f975cb49dd81fbc9a75388eecefea13fd9cb48
[ "Apache-2.0" ]
1
2021-11-13T16:44:32.000Z
2021-11-13T16:44:32.000Z
from PySide2.QtCore import Signal, QThreadPool, QThread, QObject, QRunnable, Slot, Qt from PySide2.QtWidgets import QMainWindow, QApplication, QTableWidgetItem, QMessageBox from PySide2 import QtCore, QtGui from segmentpy._taskManager.mainwindow_design import Ui_LRCSNet from segmentpy._taskManager.dialog_logic import...
42.048458
146
0.55977
e3c3ae28584e80007ba24080f29203c91a6e3599
5,548
py
Python
aps/asr/base/decoder.py
NormonisPing/aps
f646167ef768499eff0db82c55cc093ca4804d65
[ "Apache-2.0" ]
1
2021-09-15T07:38:47.000Z
2021-09-15T07:38:47.000Z
aps/asr/base/decoder.py
NormonisPing/aps
f646167ef768499eff0db82c55cc093ca4804d65
[ "Apache-2.0" ]
null
null
null
aps/asr/base/decoder.py
NormonisPing/aps
f646167ef768499eff0db82c55cc093ca4804d65
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2019 Jian Wu # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import random import torch as th import torch.nn as nn import torch.nn.functional as tf from typing import Optional, Tuple, Union from aps.asr.base.component import OneHotEmbedding, PyTorchRNN HiddenTy...
35.793548
80
0.478551
a953eee47f304ff06264fa422f6c5497b51d39cf
363
py
Python
py_scraper/pipelines.py
olichen/py_scraper
bfb0adf64c2e6b0d2ce787c28a594d3bc5289ca8
[ "MIT" ]
null
null
null
py_scraper/pipelines.py
olichen/py_scraper
bfb0adf64c2e6b0d2ce787c28a594d3bc5289ca8
[ "MIT" ]
null
null
null
py_scraper/pipelines.py
olichen/py_scraper
bfb0adf64c2e6b0d2ce787c28a594d3bc5289ca8
[ "MIT" ]
null
null
null
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter class PyScraperPipeline: def process_ite...
25.928571
66
0.768595
753392582b932a1900114caded01051a65e0fb94
1,033
py
Python
setup.py
stjordanis/boa
9369513ca4e5119cdbc50975dd0d123aae7bc871
[ "BSD-3-Clause" ]
null
null
null
setup.py
stjordanis/boa
9369513ca4e5119cdbc50975dd0d123aae7bc871
[ "BSD-3-Clause" ]
null
null
null
setup.py
stjordanis/boa
9369513ca4e5119cdbc50975dd0d123aae7bc871
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from pathlib import Path from setuptools import setup here = Path(__file__).parent.absolute() version_ns = {} with open(here.joinpath("boa", "_version.py")) as f: exec(f.read(), {}, version_ns) __version__ = version_ns["__version__"] deps = [ "jinja2", "setuptools", "mamba", ...
22.456522
58
0.614714
288d4853207176b215cd8a0cdcbfb2de5791ecb8
24,464
py
Python
tensorflow/contrib/ignite/python/ops/ignite_dataset_ops.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
52
2018-11-12T06:39:35.000Z
2022-03-08T05:31:27.000Z
tensorflow/contrib/ignite/python/ops/ignite_dataset_ops.py
apeforest/tensorflow
07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e
[ "Apache-2.0" ]
2
2018-12-04T08:35:40.000Z
2020-10-22T16:17:39.000Z
tensorflow/contrib/ignite/python/ops/ignite_dataset_ops.py
apeforest/tensorflow
07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e
[ "Apache-2.0" ]
17
2019-03-11T01:17:16.000Z
2022-02-21T00:44:47.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
31.648124
98
0.656148
c3cd771d03ab07014b2d4808cc3f2f3a4a15b728
1,113
py
Python
cli_programs/tzar/plugins/get/__cli__.py
wijjo/scripts
56fdac749b314f0cda23a0e042c35f38c3b85f2b
[ "Apache-2.0" ]
null
null
null
cli_programs/tzar/plugins/get/__cli__.py
wijjo/scripts
56fdac749b314f0cda23a0e042c35f38c3b85f2b
[ "Apache-2.0" ]
null
null
null
cli_programs/tzar/plugins/get/__cli__.py
wijjo/scripts
56fdac749b314f0cda23a0e042c35f38c3b85f2b
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-17 Steven Cooper # # 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 writ...
33.727273
82
0.734951
e789d45e61e2cdd3b0f20dc3ac204fc6a40c38ce
2,249
py
Python
pip/utils/packaging.py
lyw07/kolibripip
e7039eca92b61827faa754311f1489e89a11519d
[ "MIT" ]
null
null
null
pip/utils/packaging.py
lyw07/kolibripip
e7039eca92b61827faa754311f1489e89a11519d
[ "MIT" ]
null
null
null
pip/utils/packaging.py
lyw07/kolibripip
e7039eca92b61827faa754311f1489e89a11519d
[ "MIT" ]
1
2020-12-18T10:39:35.000Z
2020-12-18T10:39:35.000Z
from __future__ import absolute_import import logging import sys from email.parser import FeedParser from pip._vendor import pkg_resources from pip._vendor.packaging import specifiers, version from pip import exceptions logger = logging.getLogger(__name__) def check_requires_python(requires_python): """ C...
32.128571
77
0.680302
d3f5114cb2f67230fccd77c8ace6ff02dc1ee5d4
623
py
Python
Acquire/Client/_errors.py
samle-appsbroker/acquire
34f29dc4173cb87f8e2f49864559b35efb48b21b
[ "Apache-2.0" ]
21
2019-01-29T17:18:45.000Z
2021-11-07T19:29:31.000Z
Acquire/Client/_errors.py
samle-appsbroker/acquire
34f29dc4173cb87f8e2f49864559b35efb48b21b
[ "Apache-2.0" ]
8
2019-02-22T16:53:39.000Z
2022-01-13T01:29:54.000Z
Acquire/Client/_errors.py
chryswoods/acquire
bf8a0465a531f3b485cb2a14c69dc9aea79451fd
[ "Apache-2.0" ]
4
2019-06-20T07:49:05.000Z
2020-03-31T18:11:56.000Z
__all__ = ["QRCodeError", "LoginError", "AccountError", "PaymentError", "UserError", "PARError", "PARTimeoutError", "PARPermissionsError", "PARReadError", "PARWriteError"] class QRCodeError(Exception): pass class LoginError(Exception): pass class AccountError(Exception): ...
13.543478
55
0.682183
d94c637806b65457d2ac80afb07de3ec0f6d7864
860
py
Python
kubernetes_asyncio/test/test_version_api.py
jnschaeffer/kubernetes_asyncio
05f42510e7acb8d229bf7c2d4e2455e6328486a6
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_version_api.py
jnschaeffer/kubernetes_asyncio
05f42510e7acb8d229bf7c2d4e2455e6328486a6
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_version_api.py
jnschaeffer/kubernetes_asyncio
05f42510e7acb8d229bf7c2d4e2455e6328486a6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.15.11 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitt...
21.5
124
0.709302
29ed57b8ab7e24881695857186d3e39decb5413f
2,197
py
Python
moai/example.py
UtrechtUniversity/yoda-moai
f92dde2596866fb34765bd8b7ae419fb2a0a1d70
[ "BSD-3-Clause" ]
1
2022-02-24T13:02:39.000Z
2022-02-24T13:02:39.000Z
moai/example.py
UtrechtUniversity/yoda-moai
f92dde2596866fb34765bd8b7ae419fb2a0a1d70
[ "BSD-3-Clause" ]
3
2020-06-05T11:58:01.000Z
2021-02-08T10:13:12.000Z
moai/example.py
UtrechtUniversity/yoda-moai
f92dde2596866fb34765bd8b7ae419fb2a0a1d70
[ "BSD-3-Clause" ]
1
2020-06-05T11:46:28.000Z
2020-06-05T11:46:28.000Z
from lxml import etree from moai.utils import XPath class ExampleContent(object): def __init__(self, provider): self.provider = provider self.id = None self.modified = None self.deleted = None self.sets = None self.metadata = None def update(self, path): ...
37.87931
76
0.467911
51e5bbf06930bcfbe7d6bab66e57d2f2437c6fda
69
py
Python
exm/const.py
darklee/exm
85f6d9fda09b7410be44215128ba6e7202eedaca
[ "MIT" ]
null
null
null
exm/const.py
darklee/exm
85f6d9fda09b7410be44215128ba6e7202eedaca
[ "MIT" ]
null
null
null
exm/const.py
darklee/exm
85f6d9fda09b7410be44215128ba6e7202eedaca
[ "MIT" ]
null
null
null
# coding=utf-8 import os SCRIPT_DIR = os.path.dirname(__file__)
13.8
39
0.710145
e459903fbf081657d3dab896fe6b8dd1ec555300
2,739
py
Python
configs/transforms_config.py
bayutop/restyle-encoder
a1a14aa3506ddb6fee67c0d77f2c377fa389f109
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
configs/transforms_config.py
bayutop/restyle-encoder
a1a14aa3506ddb6fee67c0d77f2c377fa389f109
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
configs/transforms_config.py
bayutop/restyle-encoder
a1a14aa3506ddb6fee67c0d77f2c377fa389f109
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
from abc import abstractmethod import torchvision.transforms as transforms class TransformsConfig(object): def __init__(self, opts): self.opts = opts @abstractmethod def get_transforms(self): pass class EncodeTransforms(TransformsConfig): def __init__(self, opts): super(EncodeTransforms, self).__init__...
29.771739
61
0.676889
489d1a4b2d38b7ac12ce01f4e9893568c2a755ef
455
py
Python
hack/lib/jobs_with_labels.py
mxinden/release
78442331f793f033555f5d975093144716f90969
[ "Apache-2.0" ]
null
null
null
hack/lib/jobs_with_labels.py
mxinden/release
78442331f793f033555f5d975093144716f90969
[ "Apache-2.0" ]
null
null
null
hack/lib/jobs_with_labels.py
mxinden/release
78442331f793f033555f5d975093144716f90969
[ "Apache-2.0" ]
null
null
null
import json, sys, yaml; y = yaml.load(open(sys.argv[1])) if 'postsubmits' in y and sys.argv[2] in y['postsubmits']: jobs = y['postsubmits'][sys.argv[2]] else: jobs = [] if len(sys.argv) > 3: jobs = list(filter(lambda x: 'branches' in x and sys.argv[3] in x['branches'], jobs)) if len(sys.argv) > 4: jobs = list(...
30.333333
87
0.632967