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
142c57102f42f9d4e92a394fc2208b8994abf6b8
155
py
Python
2020/inner_functions.py
srikanteswartalluri/pyutils
bf8d56ac9e9b0786861c08ef32eae49b021f20a3
[ "0BSD" ]
null
null
null
2020/inner_functions.py
srikanteswartalluri/pyutils
bf8d56ac9e9b0786861c08ef32eae49b021f20a3
[ "0BSD" ]
null
null
null
2020/inner_functions.py
srikanteswartalluri/pyutils
bf8d56ac9e9b0786861c08ef32eae49b021f20a3
[ "0BSD" ]
null
null
null
def outer_util(l): print(l) def stay_tuned(): print("I am inside inner") stay_tuned() print("I am back to outer") outer_util([1, 3, 4])
17.222222
32
0.606452
29120306298a7f9571aa5d053f13e1ce72ca2ac2
2,623
py
Python
helper/markov_equiprob.py
cphysics/simulation
6fc2056c77a021105a6851809e2bacdcc0148ba3
[ "MIT" ]
3
2020-12-02T19:34:02.000Z
2022-03-17T03:12:07.000Z
helper/markov_equiprob.py
cphysics/simulation
6fc2056c77a021105a6851809e2bacdcc0148ba3
[ "MIT" ]
null
null
null
helper/markov_equiprob.py
cphysics/simulation
6fc2056c77a021105a6851809e2bacdcc0148ba3
[ "MIT" ]
17
2020-09-17T12:32:46.000Z
2021-11-06T03:25:15.000Z
import random def markov_disks_box(L, delta, sigma): condition = True while condition == True: a = random.choice(L) b = [a[0] + random.uniform(-delta, delta), a[1] + random.uniform(-delta, delta)] min_dist = min((b[0] - c[0]) ** 2 + (b[1] - c[1]) ** 2 for c in L if c != a) box_c...
50.442308
109
0.636294
3142651428d6f3dd3ae78cd1d5976777efd6ce0e
1,680
py
Python
argus/migrations/0005_auto_20170609_2353.py
dehu4ka/lna
f5ee176bdb5c7507b76fba5ae651ce333b71c3db
[ "MIT" ]
null
null
null
argus/migrations/0005_auto_20170609_2353.py
dehu4ka/lna
f5ee176bdb5c7507b76fba5ae651ce333b71c3db
[ "MIT" ]
null
null
null
argus/migrations/0005_auto_20170609_2353.py
dehu4ka/lna
f5ee176bdb5c7507b76fba5ae651ce333b71c3db
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-09 18:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('argus', '0004_auto_20170609_2345'), ] operations = [ migrations.AlterField(...
30
67
0.560119
ff40206d99347bd096dcc0e0a0c784795cd7422a
26,320
py
Python
databrowse/support/renderer_support.py
limatix/Databrowse
af33bc6cca930e59acc3762beeec2409d8fd8634
[ "BSD-3-Clause" ]
3
2016-09-20T07:04:09.000Z
2018-07-17T17:31:21.000Z
databrowse/support/renderer_support.py
limatix/Databrowse
af33bc6cca930e59acc3762beeec2409d8fd8634
[ "BSD-3-Clause" ]
19
2016-10-25T07:05:28.000Z
2018-08-07T23:18:16.000Z
databrowse/support/renderer_support.py
limatix/Databrowse
af33bc6cca930e59acc3762beeec2409d8fd8634
[ "BSD-3-Clause" ]
2
2016-10-28T00:12:42.000Z
2016-10-28T00:18:03.000Z
#!/usr/bin/env python ############################################################################### ## Databrowse: An Extensible Data Management Platform ## ## Copyright (C) 2012-2016 Iowa State University Research Foundation, Inc. ## ## All rights reserved. ...
44.309764
213
0.549582
18607162db83cf7bf76d8c3099f747d3be47138e
49,059
py
Python
predictor.py
Min-Sheng/medicaldetectiontoolkit
2b24a87a0e3dfa9ccbcda4a35c82437f3ff11d22
[ "Apache-2.0" ]
null
null
null
predictor.py
Min-Sheng/medicaldetectiontoolkit
2b24a87a0e3dfa9ccbcda4a35c82437f3ff11d22
[ "Apache-2.0" ]
null
null
null
predictor.py
Min-Sheng/medicaldetectiontoolkit
2b24a87a0e3dfa9ccbcda4a35c82437f3ff11d22
[ "Apache-2.0" ]
1
2022-02-09T13:24:09.000Z
2022-02-09T13:24:09.000Z
#!/usr/bin/env python # Copyright 2018 Division of Medical Image Computing, German Cancer Research Center (DKFZ). # # 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...
55.371332
137
0.602805
038b2e5473d1a26776a50eb83498478505d6268d
3,850
py
Python
tests/test_handler_hausdorff_distance.py
tatuanb/monai_V1
41e492b61c78bb3c303f38b03fe9fdc74a3c2e96
[ "Apache-2.0" ]
1
2021-05-06T15:08:26.000Z
2021-05-06T15:08:26.000Z
tests/test_handler_hausdorff_distance.py
catherine1996cn/MONAI
ff9bbfa82763de46cbac75553e340633e3d84ecb
[ "Apache-2.0" ]
2
2020-11-13T23:15:00.000Z
2020-11-16T14:54:08.000Z
tests/test_handler_hausdorff_distance.py
catherine1996cn/MONAI
ff9bbfa82763de46cbac75553e340633e3d84ecb
[ "Apache-2.0" ]
1
2021-11-18T22:37:40.000Z
2021-11-18T22:37:40.000Z
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
35
120
0.683377
7fe8369b76005cc6046340ffec7dc890dd67e097
5,625
py
Python
StarCipher/StarCipher.py
starhound/StarCipher
f07faccfb6389b78494a5f87b8f3c4443f526d02
[ "MIT" ]
3
2019-09-16T21:02:42.000Z
2021-01-24T17:08:23.000Z
StarCipher/StarCipher.py
starhound/StarCipher
f07faccfb6389b78494a5f87b8f3c4443f526d02
[ "MIT" ]
null
null
null
StarCipher/StarCipher.py
starhound/StarCipher
f07faccfb6389b78494a5f87b8f3c4443f526d02
[ "MIT" ]
2
2019-09-16T08:56:12.000Z
2021-01-15T04:45:46.000Z
# StarCipher (Written and Maintained by Wesley Reid - http://starhound.com) import py.pycrypt import pyperclip import secretpy.cmdecorators as md from secretpy import Atbash from secretpy import Trifid from secretpy import CryptMachine from secretpy import Zigzag from secretpy import alphabet from py.pycryp...
27.043269
83
0.558933
8c41e02808229de35fe9c889149f42676a2821ee
972
py
Python
setup.py
altoyield/python-beanieclient
448b8dd328054eaf32dd7d0bdff700e603b5c27d
[ "Apache-2.0" ]
null
null
null
setup.py
altoyield/python-beanieclient
448b8dd328054eaf32dd7d0bdff700e603b5c27d
[ "Apache-2.0" ]
null
null
null
setup.py
altoyield/python-beanieclient
448b8dd328054eaf32dd7d0bdff700e603b5c27d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Beanie ERP API An API specification for interacting with the Beanie ERP system # noqa: E501 OpenAPI spec version: 0.8 Contact: dev@bean.ie Generated by: https://github.com/swagger-api/swagger-codegen.git """ from setuptools import setup, find_packages # noqa: H301 NAME = ...
23.707317
81
0.680041
6d623370b4b071249f1e204969c9e6122c713aad
5,772
py
Python
lib/utils/filelock.py
modulus-sa/ganeti
592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98
[ "BSD-2-Clause" ]
396
2015-01-22T11:44:32.000Z
2022-03-31T14:14:29.000Z
lib/utils/filelock.py
modulus-sa/ganeti
592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98
[ "BSD-2-Clause" ]
1,550
2015-04-05T09:53:50.000Z
2022-03-28T17:42:20.000Z
lib/utils/filelock.py
modulus-sa/ganeti
592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98
[ "BSD-2-Clause" ]
119
2015-01-06T21:37:15.000Z
2022-03-07T06:36:26.000Z
# # # Copyright (C) 2006, 2007, 2010, 2011 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
30.539683
78
0.682259
0dee57a434e4bbccce19541392a8863fb61bd3cf
2,516
py
Python
pylib/serialcomm.py
jheidel/ece4760-lab5
c1ab262e40c22ee77e54067fe6dbfa2b7ee78c89
[ "MIT" ]
4
2016-02-05T08:04:17.000Z
2021-08-30T15:44:46.000Z
pylib/serialcomm.py
jheidel/ece4760-lab5
c1ab262e40c22ee77e54067fe6dbfa2b7ee78c89
[ "MIT" ]
null
null
null
pylib/serialcomm.py
jheidel/ece4760-lab5
c1ab262e40c22ee77e54067fe6dbfa2b7ee78c89
[ "MIT" ]
4
2016-02-05T08:04:18.000Z
2019-06-04T15:48:49.000Z
from threading import Thread, Event, Condition from multiprocessing import Process from ctypes import * from pylib.log import with_logging from time import sleep, time try: clib = CDLL("clib/clib.so") except: print "C shared library missing!" print "Did you forget to \"make\"?" sys.exit(1) @with_loggi...
30.313253
91
0.564388
a506d292c8099e0edfa24a839f59adbb50a38f79
951
py
Python
docs/examples/compute/profitbricks/create_volume.py
zimventures/libcloud
be0765df384f1baccde24539156119856cb96816
[ "Apache-2.0" ]
1,435
2015-01-07T05:32:51.000Z
2022-03-25T19:39:34.000Z
docs/examples/compute/profitbricks/create_volume.py
zimventures/libcloud
be0765df384f1baccde24539156119856cb96816
[ "Apache-2.0" ]
1,158
2015-01-04T18:08:42.000Z
2022-03-24T14:34:57.000Z
docs/examples/compute/profitbricks/create_volume.py
zimventures/libcloud
be0765df384f1baccde24539156119856cb96816
[ "Apache-2.0" ]
832
2015-01-05T09:20:21.000Z
2022-03-24T19:22:19.000Z
import os from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.PROFIT_BRICKS) # Get ProfitBricks credentials from environment variables pb_username = os.environ.get('PROFITBRICKS_USERNAME') pb_password = os.environ.get('PROFITBRICKS_PASSWORD') drive...
31.7
78
0.768665
13d858dfd7b4a7ec6acb817bfb6f091a9a221a22
12,375
py
Python
nltk/tag/perceptron.py
RedShiftCompany/nltk
3bf1254da2567418e6168021a2b9f29bec582ab3
[ "Apache-2.0" ]
null
null
null
nltk/tag/perceptron.py
RedShiftCompany/nltk
3bf1254da2567418e6168021a2b9f29bec582ab3
[ "Apache-2.0" ]
null
null
null
nltk/tag/perceptron.py
RedShiftCompany/nltk
3bf1254da2567418e6168021a2b9f29bec582ab3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This module is a port of the Textblob Averaged Perceptron Tagger # Author: Matthew Honnibal <honnibal+gh@gmail.com>, # Long Duong <longdt219@gmail.com> (NLTK port) # URL: <https://github.com/sloria/textblob-aptagger> # <http://nltk.org/> # Copyright 2013 Matthew Honnibal # NLTK mo...
35.458453
148
0.567919
b26744e4deea27c27acaa3c66eb2e9e1aaeac771
40,432
py
Python
legtool/tabs/gait_tab.py
jpieper/legtool
ab3946051bd16817b61d3073ce7be8bd27af90d0
[ "Apache-2.0" ]
10
2015-09-23T19:28:06.000Z
2021-04-27T02:32:27.000Z
legtool/tabs/gait_tab.py
jpieper/legtool
ab3946051bd16817b61d3073ce7be8bd27af90d0
[ "Apache-2.0" ]
null
null
null
legtool/tabs/gait_tab.py
jpieper/legtool
ab3946051bd16817b61d3073ce7be8bd27af90d0
[ "Apache-2.0" ]
9
2015-10-16T07:26:18.000Z
2021-01-13T07:18:35.000Z
# Copyright 2014 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 applicable law or agreed...
36.45807
80
0.608577
ca86916925e2940d7fc44bc91018986ceb5c1079
1,075
py
Python
cl_inn/contrib/sites/migrations/0003_set_site_domain_and_name.py
Ibrahem3amer/pos_api
af758680c583b85f87ed2fba985b5d2955ebdb23
[ "MIT" ]
null
null
null
cl_inn/contrib/sites/migrations/0003_set_site_domain_and_name.py
Ibrahem3amer/pos_api
af758680c583b85f87ed2fba985b5d2955ebdb23
[ "MIT" ]
null
null
null
cl_inn/contrib/sites/migrations/0003_set_site_domain_and_name.py
Ibrahem3amer/pos_api
af758680c583b85f87ed2fba985b5d2955ebdb23
[ "MIT" ]
null
null
null
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): """Set site d...
25
129
0.64093
32696d7d6408a6de31313f7ff0436a8d0c94def5
269
py
Python
ur_operator/config.py
brennerm/uptimerobot-operator
25cdca5ec06e15d05ddd5ed4b13b20082fbb8889
[ "MIT" ]
47
2021-02-03T06:59:17.000Z
2022-03-30T03:44:43.000Z
ur_operator/config.py
brennerm/uptimerobot-operator
25cdca5ec06e15d05ddd5ed4b13b20082fbb8889
[ "MIT" ]
19
2021-02-02T23:26:56.000Z
2021-11-09T12:13:42.000Z
ur_operator/config.py
brennerm/uptimerobot-operator
25cdca5ec06e15d05ddd5ed4b13b20082fbb8889
[ "MIT" ]
2
2021-06-09T02:24:46.000Z
2021-08-15T06:45:20.000Z
import os class Config: @property def DISABLE_INGRESS_HANDLING(self): return os.getenv('URO_DISABLE_INGRESS_HANDLING', 'False').lower() in ['true', '1'] @property def UPTIMEROBOT_API_KEY(self): return os.environ['UPTIMEROBOT_API_KEY']
24.454545
90
0.687732
4b97a3f9934f8f57c8419fa3ca58eb92a8546959
824
py
Python
app/core/tests/test_commands.py
katalonac/recipe-app-api
e6347ec0aec0e1da1dc51e1c55e9d17b16a8d9f1
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
katalonac/recipe-app-api
e6347ec0aec0e1da1dc51e1c55e9d17b16a8d9f1
[ "MIT" ]
3
2020-06-06T01:28:06.000Z
2021-06-10T19:50:40.000Z
app/core/tests/test_commands.py
katalonac/recipe-app-api
e6347ec0aec0e1da1dc51e1c55e9d17b16a8d9f1
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTests(TestCase): def test_wait_for_db_ready(self): """Test waiting for db when db is available""" with patch('django.db.util...
29.428571
74
0.674757
971ded76bed6277cca1a792de89daef4f37ea15a
9,605
py
Python
crichtonweb/release/widgets.py
bpluly/crichton
a2fa09c181ba1e44ee1aae7a57769e1778de7f3a
[ "Apache-2.0" ]
null
null
null
crichtonweb/release/widgets.py
bpluly/crichton
a2fa09c181ba1e44ee1aae7a57769e1778de7f3a
[ "Apache-2.0" ]
null
null
null
crichtonweb/release/widgets.py
bpluly/crichton
a2fa09c181ba1e44ee1aae7a57769e1778de7f3a
[ "Apache-2.0" ]
null
null
null
# Crichton, Admirable Source Configuration Management # Copyright 2012 British Broadcasting 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/licens...
41.76087
168
0.603019
8bb864f877aeaaa619c40ddfa528ca1daab64f14
1,664
py
Python
Ninja/Leetcode/482_License_Key_Formatting.py
cyandterry/Python-Study
b40e6c4db10da417e72247f61146f7570621106a
[ "MIT" ]
61
2015-02-03T20:25:55.000Z
2021-05-17T19:33:40.000Z
Ninja/Leetcode/482_License_Key_Formatting.py
cyandterry/Python-Study
b40e6c4db10da417e72247f61146f7570621106a
[ "MIT" ]
null
null
null
Ninja/Leetcode/482_License_Key_Formatting.py
cyandterry/Python-Study
b40e6c4db10da417e72247f61146f7570621106a
[ "MIT" ]
37
2015-02-04T07:12:52.000Z
2020-05-16T18:47:16.000Z
""" You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes. Given a number K, we would want to reformat the strings such that each group contains exactly K characters, except for the first group which could be sho...
41.6
334
0.699519
5ba2d1883f0601ba1553e3955cb26406ca7949b7
2,658
py
Python
nltkma/test/unit/test_rte_classify.py
aydtmiri/nltk-ma
5d7dd01844ee063fc910a648948624b6a2dddaf9
[ "Apache-2.0" ]
null
null
null
nltkma/test/unit/test_rte_classify.py
aydtmiri/nltk-ma
5d7dd01844ee063fc910a648948624b6a2dddaf9
[ "Apache-2.0" ]
null
null
null
nltkma/test/unit/test_rte_classify.py
aydtmiri/nltk-ma
5d7dd01844ee063fc910a648948624b6a2dddaf9
[ "Apache-2.0" ]
null
null
null
import pytest from nltkma.corpus import rte as rte_corpus from nltkma.classify.rte_classify import RTEFeatureExtractor, rte_features, rte_classifier expected_from_rte_feature_extration = """ alwayson => True ne_hyp_extra => 0 ne_overlap => 1 neg_hyp => 0 neg_txt => 0 word_hyp_extra => ...
28.580645
90
0.624153
87950ece82941a89383034c41dc1552efac3a0a5
1,703
py
Python
schedule.py
bradgrantham/weather_fax
0ad4c9e54a405afa65357804da7e7677e56f5cbf
[ "Apache-2.0" ]
null
null
null
schedule.py
bradgrantham/weather_fax
0ad4c9e54a405afa65357804da7e7677e56f5cbf
[ "Apache-2.0" ]
null
null
null
schedule.py
bradgrantham/weather_fax
0ad4c9e54a405afa65357804da7e7677e56f5cbf
[ "Apache-2.0" ]
null
null
null
import urllib2 import bisect import time # http://tgftp.nws.noaa.gov/fax/hfreyes.txt stations = [ ["New Orleans, LA", "http://tgftp.nws.noaa.gov/fax/hfgulf.txt"], ["Pt. Reyes, CA", "http://tgftp.nws.noaa.gov/fax/hfreyes.txt"], ["Honolulu, HI", "http://tgftp.nws.noaa.gov/fax/hfhi.txt"], ["Kodiak, AK", ...
30.963636
93
0.526718
e8b72bb007d60498713fe9b445da437929f32bad
557
py
Python
export_models.py
eudaimoniatech/microNER
30ee51ee2360d8796844149bee6c47069d84c32a
[ "MIT" ]
null
null
null
export_models.py
eudaimoniatech/microNER
30ee51ee2360d8796844149bee6c47069d84c32a
[ "MIT" ]
null
null
null
export_models.py
eudaimoniatech/microNER
30ee51ee2360d8796844149bee6c47069d84c32a
[ "MIT" ]
2
2022-01-13T21:42:39.000Z
2022-01-14T10:01:45.000Z
# Since we were unable to reproduce the build of this Dockerfile, we had to export the models from the docker image uhhlt/microner:v0.1 on docker hub. import tensorflow as tf import scripts.ner as ner def export_model(filename): folder = "exported_models/" n = ner.NerModel(filename) n.model.save(folder+fil...
27.85
150
0.721724
0560891d19d58b8d82714b22f25524cc155827a1
6,368
py
Python
src/main/python/apache/thermos/testing/runner.py
jeremyvdw/aurora
fa9d83a7ef3a96c522884089a471bbb0bef74c48
[ "Apache-2.0" ]
479
2015-03-27T22:59:49.000Z
2022-03-09T08:40:49.000Z
src/main/python/apache/thermos/testing/runner.py
jeremyvdw/aurora
fa9d83a7ef3a96c522884089a471bbb0bef74c48
[ "Apache-2.0" ]
69
2015-05-26T20:06:29.000Z
2020-01-13T19:18:59.000Z
src/main/python/apache/thermos/testing/runner.py
jeremyvdw/aurora
fa9d83a7ef3a96c522884089a471bbb0bef74c48
[ "Apache-2.0" ]
226
2015-03-27T20:02:59.000Z
2022-03-09T08:40:53.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 # distributed under ...
29.896714
90
0.696765
35226a09720f04f29e4bb7e8d62d263c2e23d78e
58,395
py
Python
test/engine/test_deprecations.py
daniel--/sqlalchemy
78e598e3a5b8df7419a600c291f90260e598c9b7
[ "MIT" ]
null
null
null
test/engine/test_deprecations.py
daniel--/sqlalchemy
78e598e3a5b8df7419a600c291f90260e598c9b7
[ "MIT" ]
null
null
null
test/engine/test_deprecations.py
daniel--/sqlalchemy
78e598e3a5b8df7419a600c291f90260e598c9b7
[ "MIT" ]
null
null
null
import re import time import sqlalchemy as tsa from sqlalchemy import column from sqlalchemy import create_engine from sqlalchemy import engine_from_config from sqlalchemy import event from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import INT from sqlalchem...
32.550167
79
0.548985
31f83afea1aa3491f5603b5bb0a45e21bcdc7769
9,487
py
Python
src/oci/data_integration/models/update_connection_from_adwc.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/data_integration/models/update_connection_from_adwc.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/data_integration/models/update_connection_from_adwc.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
35.00738
248
0.65205
180b906b9fcd22cb470ea6ec6eb3f1b130759377
4,176
py
Python
spotify_client.py
leobeeson/music-time-machine
385faab5a55c6d78779cbb18bd7316ef0af8bf1c
[ "MIT" ]
null
null
null
spotify_client.py
leobeeson/music-time-machine
385faab5a55c6d78779cbb18bd7316ef0af8bf1c
[ "MIT" ]
null
null
null
spotify_client.py
leobeeson/music-time-machine
385faab5a55c6d78779cbb18bd7316ef0af8bf1c
[ "MIT" ]
null
null
null
import os from spotipy import Spotify from spotipy.oauth2 import SpotifyOAuth from typing import List from song_metadata_curator import SongMetadataCurator from dotenv import load_dotenv load_dotenv() CLIENT_ID = os.environ.get("SPOTIPY_CLIENT_ID") CLIENT_SECRET = os.environ.get("SPOTIPY_CLIENT_SECRET") REDERICT_UR...
33.142857
102
0.589559
769c5246c6e2d8f03d88b36e38534c367e58dc1b
826
py
Python
0x03-caching/base_caching.py
JoseAVallejo12/holbertonschool-web_back_end
eb514784772352b8e4873d1f648726815ab69592
[ "MIT" ]
null
null
null
0x03-caching/base_caching.py
JoseAVallejo12/holbertonschool-web_back_end
eb514784772352b8e4873d1f648726815ab69592
[ "MIT" ]
null
null
null
0x03-caching/base_caching.py
JoseAVallejo12/holbertonschool-web_back_end
eb514784772352b8e4873d1f648726815ab69592
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ BaseCaching module.""" class BaseCaching(): """ BaseCaching defines: - constants of your caching system - where your data are stored (in a dictionary) """ MAX_ITEMS = 4 def __init__(self): """Initiliaze.""" self.cache_data = {} def print_cache(...
25.030303
80
0.572639
1728c92f7bab88c7237b5d9e66dcd3eae5c30263
11,025
py
Python
plotly/graph_objs/scatterpolargl/hoverlabel/_font.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/graph_objs/scatterpolargl/hoverlabel/_font.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/graph_objs/scatterpolargl/hoverlabel/_font.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Font(BaseTraceHierarchyType): # color # ----- @property def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g...
34.133127
75
0.562177
f889cff852fb0f077b9dca00a6ac7142bcdb8251
1,706
py
Python
aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/IndexTagRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
1
2019-12-23T12:36:43.000Z
2019-12-23T12:36:43.000Z
aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/IndexTagRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/IndexTagRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.592593
67
0.745604
3d53bb7e17f847925ecefaa73daed9571e94271b
412
py
Python
products/urls.py
Code-Institute-Submissions/danielboots-fytletic
67c3000a4b681d7f76255ab11db841a7f2ba613e
[ "OLDAP-2.3" ]
1
2021-03-31T18:54:25.000Z
2021-03-31T18:54:25.000Z
products/urls.py
Code-Institute-Submissions/danielboots-fytletic
67c3000a4b681d7f76255ab11db841a7f2ba613e
[ "OLDAP-2.3" ]
null
null
null
products/urls.py
Code-Institute-Submissions/danielboots-fytletic
67c3000a4b681d7f76255ab11db841a7f2ba613e
[ "OLDAP-2.3" ]
1
2021-03-31T11:00:11.000Z
2021-03-31T11:00:11.000Z
from django.urls import path from . import views urlpatterns = [ path("", views.all_products, name="products"), path("<int:product_id>/", views.product_detail, name="product_detail"), path("add/", views.add_product, name="add_product"), path("edit/<int:product_id>/", views.edit_product, name="edit_prod...
37.454545
82
0.701456
1298f143205819bcdf2d90e6a3f5cf7cefcc26eb
4,253
py
Python
exblox/trainer.py
lokijuhy/exblox
86dd358094381ac7c91d935a9c6d4c8d2380b291
[ "MIT" ]
null
null
null
exblox/trainer.py
lokijuhy/exblox
86dd358094381ac7c91d935a9c6d4c8d2380b291
[ "MIT" ]
null
null
null
exblox/trainer.py
lokijuhy/exblox
86dd358094381ac7c91d935a9c6d4c8d2380b291
[ "MIT" ]
null
null
null
from copy import deepcopy from sklearn.preprocessing import LabelEncoder from typing import Dict, Tuple from .architecture import Architecture, ArchitectureInterface from .ConfigurableComponent import ConfigurableComponent, ComponentInterface from .tuner import Tuner, TunerInterface from .predictor import Predictor c...
38.663636
120
0.667294
67e5120a54b79a83a4ea125ee487839b5740af55
38,284
py
Python
python/paddle/tensor/random.py
zhenlin-work/Paddle
ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b
[ "Apache-2.0" ]
4
2021-02-08T13:07:15.000Z
2021-10-22T00:58:33.000Z
python/paddle/tensor/random.py
zhenlin-work/Paddle
ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b
[ "Apache-2.0" ]
2
2019-07-26T04:06:05.000Z
2019-07-29T04:25:24.000Z
python/paddle/tensor/random.py
zhenlin-work/Paddle
ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b
[ "Apache-2.0" ]
5
2021-12-10T11:20:06.000Z
2022-02-18T05:18:12.000Z
# Copyright (c) 2020 PaddlePaddle 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 app...
40.72766
120
0.581522
4e282545478177cd7a079d2b658091c2e3a5328c
5,121
py
Python
Resources/app3.py
BankeUCI/SQLAlchemy-Challenge
ed961511bb605c400244c3af5d9253d478e0680a
[ "ADSL" ]
null
null
null
Resources/app3.py
BankeUCI/SQLAlchemy-Challenge
ed961511bb605c400244c3af5d9253d478e0680a
[ "ADSL" ]
null
null
null
Resources/app3.py
BankeUCI/SQLAlchemy-Challenge
ed961511bb605c400244c3af5d9253d478e0680a
[ "ADSL" ]
null
null
null
from time import strftime from flask import Flask, jsonify import sqlite3 import sqlalchemy from sqlalchemy import * from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, inspect, func import pandas as pd import numpy as np import datetime as dt ######...
33.470588
131
0.614528
61f6a68c6974fef1d035a5278d1bd5dafeee12bb
98
py
Python
Functions advanced - Lab/Character combinations.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Functions advanced - Lab/Character combinations.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Functions advanced - Lab/Character combinations.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
from itertools import permutations [print(''.join(el)) for el in list(permutations(input()))]
24.5
59
0.714286
34cd924d7c3e222ae3e964c6c497d33e7aff9b5c
660
py
Python
implementation/server/cms/migrations/0013_contentpage_image.py
Aincient/cleo
933ef372fa7847d943206d72bfb03c201dbafbd6
[ "Apache-2.0" ]
null
null
null
implementation/server/cms/migrations/0013_contentpage_image.py
Aincient/cleo
933ef372fa7847d943206d72bfb03c201dbafbd6
[ "Apache-2.0" ]
null
null
null
implementation/server/cms/migrations/0013_contentpage_image.py
Aincient/cleo
933ef372fa7847d943206d72bfb03c201dbafbd6
[ "Apache-2.0" ]
3
2018-10-01T12:04:36.000Z
2021-01-07T09:30:50.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-06-29 14:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0020_add-verbose-name'), ('cms', ...
28.695652
175
0.657576
2d38101b743df3d7ccfcfb00b64b6839e8bb30db
780
py
Python
posts/migrations/0003_comment_users_who_liked_post_users_who_liked.py
Eugust/mini_social
fc9ba094c75a82e952707e0e898f90fb8cbb654a
[ "MIT" ]
null
null
null
posts/migrations/0003_comment_users_who_liked_post_users_who_liked.py
Eugust/mini_social
fc9ba094c75a82e952707e0e898f90fb8cbb654a
[ "MIT" ]
null
null
null
posts/migrations/0003_comment_users_who_liked_post_users_who_liked.py
Eugust/mini_social
fc9ba094c75a82e952707e0e898f90fb8cbb654a
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-01-21 02:13 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('posts', '0002_initial'), ] operations = [ ...
30
122
0.657692
297b704a60faf39c37015cda8c07d3c91181701e
15,575
py
Python
qa/rpc-tests/wallet.py
Xrunner1/luckycore-0.12.1.3
f7fe1e74f533a384b14a667202779608389eeea5
[ "MIT" ]
3
2019-11-25T18:31:45.000Z
2020-11-14T16:58:14.000Z
qa/rpc-tests/wallet.py
Xrunner1/luckycore-0.12.1.3
f7fe1e74f533a384b14a667202779608389eeea5
[ "MIT" ]
1
2020-08-03T05:22:22.000Z
2020-08-03T05:22:22.000Z
qa/rpc-tests/wallet.py
Xrunner1/luckycore-0.12.1.3
f7fe1e74f533a384b14a667202779608389eeea5
[ "MIT" ]
4
2019-06-08T06:52:18.000Z
2021-08-21T14:19:33.000Z
#!/usr/bin/env python2 # coding=utf-8 # ^^^^^^^^^^^^ TODO remove when supporting only Python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework...
44.5
165
0.635634
069374ad8e83fa6933463c6fb8ec9ed23c193d5b
428
py
Python
examples/yield.py
scottluskcis/learning-python
034f332817430454d55729f8f98fded4c310094e
[ "MIT" ]
null
null
null
examples/yield.py
scottluskcis/learning-python
034f332817430454d55729f8f98fded4c310094e
[ "MIT" ]
null
null
null
examples/yield.py
scottluskcis/learning-python
034f332817430454d55729f8f98fded4c310094e
[ "MIT" ]
null
null
null
students = [] def read_file(): try: f = open("students.txt", "r") # read text from a file using access mode r for student in read_students(f): students.append(student) f.close() except Exception: print("Could not read file") # use generator with yield to read eac...
20.380952
82
0.616822
32cb23cbfa9bdef4728e85d0014123652e4aefea
4,646
py
Python
python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py
worldlove521/Paddle
c7f1f3ed0c897073cc7ae8ec60a13a8217dffe7d
[ "Apache-2.0" ]
1
2019-03-14T02:29:12.000Z
2019-03-14T02:29:12.000Z
python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py
VonRosenchild/Paddle
4ef6f738c3ce37aa7eee845b90ee78941f6eb43e
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py
VonRosenchild/Paddle
4ef6f738c3ce37aa7eee845b90ee78941f6eb43e
[ "Apache-2.0" ]
1
2019-03-14T02:29:15.000Z
2019-03-14T02:29:15.000Z
# Copyright (c) 2018 PaddlePaddle 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 app...
32.041379
80
0.625484
988774dbc19dd9cd88b384e2d409e67a1a23b5bb
1,384
py
Python
preprocess/tacotron/hyperparams.py
RothIdan/adaptive_voice_conversion
06fe2af31fa6a2b3363dcad942c62d9dc388ee65
[ "Apache-2.0" ]
366
2019-02-22T04:27:03.000Z
2022-03-31T08:48:02.000Z
preprocess/tacotron/hyperparams.py
RothIdan/adaptive_voice_conversion
06fe2af31fa6a2b3363dcad942c62d9dc388ee65
[ "Apache-2.0" ]
37
2019-04-22T07:21:30.000Z
2022-03-29T09:57:41.000Z
preprocess/tacotron/hyperparams.py
RothIdan/adaptive_voice_conversion
06fe2af31fa6a2b3363dcad942c62d9dc388ee65
[ "Apache-2.0" ]
78
2019-03-15T01:21:38.000Z
2022-03-17T03:55:38.000Z
# -*- coding: utf-8 -*- #/usr/bin/python2 ''' By kyubyong park. kbpark.linguist@gmail.com. https://www.github.com/kyubyong/tacotron ''' class Hyperparams: '''Hyper parameters''' # pipeline prepro = False # if True, run `python prepro.py` first before running `python train.py`. vocab = "PE abcdef...
26.113208
93
0.642341
269e90797463e0ff68b93b6aa24e73c3c1de11ac
1,577
py
Python
.history/ClassFiles/OOP/Encapsulation_20210105153638.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/OOP/Encapsulation_20210105153638.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/OOP/Encapsulation_20210105153638.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
''' Encapsulation : Part 1 Encapsulation is the process of restricting access to methods and variables in a class in order to prevent direct data modification so it prevents accidental data modification. Encapsulation basically allows the internal representation of an object to be hidden from the view o...
25.031746
176
0.686113
743dc4a6682b3893e1967f2eabcaf3a2f7784640
1,059
py
Python
contrastive.py
804463592/pytorch-siamese-master
34181ded641820cd6c3f0ea6255ac67a832c561b
[ "MIT" ]
1
2018-12-24T06:34:59.000Z
2018-12-24T06:34:59.000Z
contrastive.py
804463592/pytorch-siamese-master
34181ded641820cd6c3f0ea6255ac67a832c561b
[ "MIT" ]
null
null
null
contrastive.py
804463592/pytorch-siamese-master
34181ded641820cd6c3f0ea6255ac67a832c561b
[ "MIT" ]
2
2019-05-21T14:44:05.000Z
2022-02-12T06:25:54.000Z
import torch import torch.nn class ContrastiveLoss(torch.nn.Module): """ Contrastive loss function. Based on: """ def __init__(self, margin=1.0): super(ContrastiveLoss, self).__init__() self.margin = margin def check_type_forward(self, in_types): assert len(in_types)...
27.153846
57
0.567517
80cca9b6fbad2e4fe22b3f266fd1341e9ff06822
5,726
py
Python
Source/boost_1_33_1/libs/python/test/map_indexing_suite.py
spxuw/RFIM
32b78fbb90c7008b1106b0cff4f8023ae83c9b6d
[ "MIT" ]
null
null
null
Source/boost_1_33_1/libs/python/test/map_indexing_suite.py
spxuw/RFIM
32b78fbb90c7008b1106b0cff4f8023ae83c9b6d
[ "MIT" ]
null
null
null
Source/boost_1_33_1/libs/python/test/map_indexing_suite.py
spxuw/RFIM
32b78fbb90c7008b1106b0cff4f8023ae83c9b6d
[ "MIT" ]
null
null
null
# Copyright Joel de Guzman 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ''' ##################################################################### # Check an object that we will use as container element #####...
26.509259
81
0.367097
c2621d6fbec00acc175d0f71f681cf90e3685dd8
819
py
Python
instagram_api/response/model/broadcast.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
13
2019-08-07T21:24:34.000Z
2020-12-12T12:23:50.000Z
instagram_api/response/model/broadcast.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
instagram_api/response/model/broadcast.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
from ..mapper import PropertyMapper, ApiInterfaceBase from ..mapper.types import Timestamp, AnyType from .user import User __all__ = ['Broadcast', 'BroadcastInterface'] class BroadcastInterface(ApiInterfaceBase): broadcast_owner: User broadcast_status: str cover_frame_url: str published_time: str ...
22.75
53
0.749695
022fb8314549d1e47e23953cdc0148181111b001
6,025
py
Python
tests/functional/test_plugins_host.py
arenadata/adcm
a499caa30adc2a53e7b3f46c96a865f9e4079e4e
[ "Apache-2.0" ]
16
2019-11-28T18:05:21.000Z
2021-12-08T18:09:18.000Z
tests/functional/test_plugins_host.py
arenadata/adcm
a499caa30adc2a53e7b3f46c96a865f9e4079e4e
[ "Apache-2.0" ]
1,127
2019-11-29T08:57:25.000Z
2022-03-31T20:21:32.000Z
tests/functional/test_plugins_host.py
arenadata/adcm
a499caa30adc2a53e7b3f46c96a865f9e4079e4e
[ "Apache-2.0" ]
10
2019-11-28T18:05:06.000Z
2022-01-13T06:16:40.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 # distributed under t...
39.123377
120
0.7039
3aa6d4570748042d8122fc00520e86bb6de40db2
13,566
py
Python
trunk/swen610/toolshare/views/tool_controller.py
leon486/toolshare
13f6ab1afb96a5f8294c121ff6916a1fcab5c2bc
[ "MIT" ]
null
null
null
trunk/swen610/toolshare/views/tool_controller.py
leon486/toolshare
13f6ab1afb96a5f8294c121ff6916a1fcab5c2bc
[ "MIT" ]
null
null
null
trunk/swen610/toolshare/views/tool_controller.py
leon486/toolshare
13f6ab1afb96a5f8294c121ff6916a1fcab5c2bc
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from toolshare.models.tool import Tool from toolshare.models.user import User from toolshare.models.reservation import Reser...
44.045455
218
0.581675
ae0c6cb688c671cb936e70764582a5805af662fe
2,793
py
Python
evaluation.py
suikei-wang/Towards-Interpretable-Attention-Networks-for-Cervical-Cancer-Analysis
30b69394cc3fe339d2bc9b4c3b17cd345d088dff
[ "MIT" ]
1
2022-01-19T10:01:15.000Z
2022-01-19T10:01:15.000Z
evaluation.py
suikei-wang/Towards-Interpretable-Attention-Networks-for-Cervical-Cancer-Analysis
30b69394cc3fe339d2bc9b4c3b17cd345d088dff
[ "MIT" ]
null
null
null
evaluation.py
suikei-wang/Towards-Interpretable-Attention-Networks-for-Cervical-Cancer-Analysis
30b69394cc3fe339d2bc9b4c3b17cd345d088dff
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from tqdm import tqdm from sklearn.metrics import precision_recall_fscore_support as score from models.ResNet50 import initialize_model as ResNet50 from models.Pretrained import initialize_model as Pretrained from models.DenseNet import initialize_model as DenseNet from dataLoader i...
38.260274
162
0.750806
484c48c58fa612238c60a077f17149b568a61036
1,838
py
Python
AlgorithmsPractice/python/307_(Binary Indexed Tree)_hard_Range Sum Query - Mutable.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
58
2019-03-03T04:42:23.000Z
2022-01-13T04:36:31.000Z
AlgorithmsPractice/python/307_(Binary Indexed Tree)_hard_Range Sum Query - Mutable.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
null
null
null
AlgorithmsPractice/python/307_(Binary Indexed Tree)_hard_Range Sum Query - Mutable.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
28
2019-08-11T01:25:00.000Z
2021-08-22T06:46:06.000Z
''' Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by updating the element at index i to val. Example: Given nums = [1, 3, 5] sumRange(0, 2) -> 9 update(1, 2) sumRange(0, 2) -> 8 Note: The array is only modifiable by t...
21.372093
101
0.492383
9c02a3199e40bc5c0475fbfec11cca7f64846ff4
1,649
py
Python
homeassistant/components/kira/remote.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/kira/remote.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/kira/remote.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Support for Keene Electronics IR-IP devices.""" import functools as ft import logging from homeassistant.components import remote from homeassistant.const import CONF_DEVICE, CONF_NAME from homeassistant.helpers.entity import Entity from . import CONF_REMOTE, DOMAIN _LOGGER = logging.getLogger(__name__) def set...
30.537037
73
0.664645
2cdcf09b0a31b7161fd71c5fafba940a98504cbf
846
py
Python
evennia/comms/migrations/0011_auto_20170217_2039.py
fermuch/evennia
8961baa0a5b9b5419f864a144f080acc68a7ad0f
[ "BSD-3-Clause" ]
null
null
null
evennia/comms/migrations/0011_auto_20170217_2039.py
fermuch/evennia
8961baa0a5b9b5419f864a144f080acc68a7ad0f
[ "BSD-3-Clause" ]
null
null
null
evennia/comms/migrations/0011_auto_20170217_2039.py
fermuch/evennia
8961baa0a5b9b5419f864a144f080acc68a7ad0f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-02-17 20:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scripts', '0007_auto_20150403_2339'), ('comms', '0010_auto_20161206_1912'), ] operations = [ migrations.Ad...
31.333333
167
0.638298
716bbdee9ebe571b5d4cbb828941b16c87ead194
2,148
py
Python
2018/Day 12/solution.py
JohnBehnke/Advent-of-Code-2017
f16f5e2b58dc8d267995d242d64f63e19aca9ba9
[ "MIT" ]
1
2020-12-13T02:19:05.000Z
2020-12-13T02:19:05.000Z
2018/Day 12/solution.py
JohnBehnke/Advent-of-Code-2017
f16f5e2b58dc8d267995d242d64f63e19aca9ba9
[ "MIT" ]
null
null
null
2018/Day 12/solution.py
JohnBehnke/Advent-of-Code-2017
f16f5e2b58dc8d267995d242d64f63e19aca9ba9
[ "MIT" ]
null
null
null
''' initial state: #..#.#..##......###...### ...## => # ..#.. => # .#... => # .#.#. => # .#.## => # .##.. => # .#### => # #.#.# => # #.### => # ##.#. => # ##.## => # ###.. => # ###.# => # ####. => # ''' def bootstrap(inputFile): rules = {} initalState = ['.','.','.'] for line in open(inputFile): if 'initial sta...
26.85
71
0.318901
17a1e0e64ddc02e8d37884357e0d79638cc2082e
28,871
py
Python
pnacl/driver/pnacl-driver.py
MicrohexHQ/nacl_contracts
3efab5eecb3cf7ba43f2d61000e65918aa4ba77a
[ "BSD-3-Clause" ]
6
2015-02-06T23:41:01.000Z
2015-10-21T03:08:51.000Z
pnacl/driver/pnacl-driver.py
MicrohexHQ/nacl_contracts
3efab5eecb3cf7ba43f2d61000e65918aa4ba77a
[ "BSD-3-Clause" ]
null
null
null
pnacl/driver/pnacl-driver.py
MicrohexHQ/nacl_contracts
3efab5eecb3cf7ba43f2d61000e65918aa4ba77a
[ "BSD-3-Clause" ]
1
2019-10-02T08:41:50.000Z
2019-10-02T08:41:50.000Z
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # IMPORTANT NOTE: If you make local mods to this file, you must run: # % pnacl/build.sh driver # in order for them to take eff...
36.361461
84
0.575214
fa00c6fe83ece6c4f2c78553594c5611ca0520f9
406
py
Python
tests/test_table.py
refgenie/refgenconf
727fe1f219780b46fe3743a906dcd6238f1734f6
[ "BSD-2-Clause" ]
3
2019-07-12T16:46:37.000Z
2019-11-20T20:39:43.000Z
tests/test_table.py
databio/refgenconf
727fe1f219780b46fe3743a906dcd6238f1734f6
[ "BSD-2-Clause" ]
80
2019-05-14T20:59:44.000Z
2020-06-16T17:09:52.000Z
tests/test_table.py
databio/refgenconf
727fe1f219780b46fe3743a906dcd6238f1734f6
[ "BSD-2-Clause" ]
4
2019-05-15T15:22:15.000Z
2020-05-26T14:28:48.000Z
class TestAliasTable: def test_alias_table_dimensions(self, my_rgc): assert len(my_rgc.genomes_list()) == my_rgc.genome_aliases_table.row_count assert len(my_rgc.genome_aliases_table.columns) == 2 class TestAssetTable: def test_asset_table_dimensions(self, my_rgc): assert my_rgc.genome...
33.833333
82
0.724138
fef3a2cc60bf0b7c0d25c6aef3f775622d353afd
885
py
Python
tests/test_metrics.py
Marcnuth/AutoQuant
b2fbade31a86c16b1287675cb7483afeb0e43663
[ "MIT" ]
1
2021-11-07T04:01:44.000Z
2021-11-07T04:01:44.000Z
tests/test_metrics.py
Marcnuth/AutoQuant
b2fbade31a86c16b1287675cb7483afeb0e43663
[ "MIT" ]
null
null
null
tests/test_metrics.py
Marcnuth/AutoQuant
b2fbade31a86c16b1287675cb7483afeb0e43663
[ "MIT" ]
3
2021-11-25T15:03:19.000Z
2021-12-24T02:17:51.000Z
from autoquant.metric import gross_rate_of_return, CAGR, max_drawdown, beta, annualized_rate_of_return, avg_annualized_rate_of_return from datetime import date from autoquant import Market def test_metrics(): assert gross_rate_of_return(1, 11) == 10 assert CAGR(1, 11, date(2021, 11, 1), date(2023, 5, 1)) - 4....
35.4
133
0.685876
777bfe6d87f543429edf42a166f84a626c881d76
293,868
py
Python
venv/Lib/site-packages/tensorflow/python/training/gen_training_ops.py
golam-shovon/Targated_Advertising
903b42ec04c98e10fcacd126eb8ba52720ac3cc5
[ "BSD-4-Clause-UC" ]
1
2019-04-11T13:23:09.000Z
2019-04-11T13:23:09.000Z
Lib/site-packages/tensorflow/python/training/gen_training_ops.py
caiyongji/Anaconda-py36.5-tensorflow-built-env
f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/tensorflow/python/training/gen_training_ops.py
caiyongji/Anaconda-py36.5-tensorflow-built-env
f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2
[ "PSF-2.0" ]
null
null
null
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import ...
36.830179
23,622
0.609195
16355f52eea0add171343a06f37239cbd62c3878
7,892
py
Python
external/eospy/eospy/keys.py
unification-com/haiku-node-prototype
ea77aa90f6b3f08d004be1c24e6b8d62e83bc66b
[ "MIT" ]
3
2018-06-15T18:02:05.000Z
2018-07-06T02:32:18.000Z
external/eospy/eospy/keys.py
unification-com/haiku-node-prototype
ea77aa90f6b3f08d004be1c24e6b8d62e83bc66b
[ "MIT" ]
4
2018-08-17T06:51:34.000Z
2018-08-17T08:39:24.000Z
external/eospy/eospy/keys.py
unification-com/haiku-node-prototype
ea77aa90f6b3f08d004be1c24e6b8d62e83bc66b
[ "MIT" ]
null
null
null
import base58 import os import ecdsa import re from binascii import hexlify, unhexlify from .utils import sha256, ripemd160, str_to_hex, hex_to_int import hashlib import time import struct def check_wif(key) : if isinstance(key, str) : try : EOSKey(key) return True except Ex...
38.125604
132
0.542448
2dc69b5f4275014944d2c32708689e9b9af13f42
103
py
Python
Chapter03/forking_process.py
ibiscum/Learning-Concurrency-in-Python
d3f0320ad2a80c46b37de331bf335b80df0d3ed9
[ "MIT" ]
null
null
null
Chapter03/forking_process.py
ibiscum/Learning-Concurrency-in-Python
d3f0320ad2a80c46b37de331bf335b80df0d3ed9
[ "MIT" ]
null
null
null
Chapter03/forking_process.py
ibiscum/Learning-Concurrency-in-Python
d3f0320ad2a80c46b37de331bf335b80df0d3ed9
[ "MIT" ]
null
null
null
import time import multiprocess def my_process(): print("My Process Starting") time.sleep(5)
12.875
32
0.708738
2b23102b80e801618580ecb628d9431c2efc066b
15,018
py
Python
examples/stencil_grid/stencil_kernel.py
zanellia/ctree
d53d29d972ac06b60d8fc4fb81f5553d2ffbfda0
[ "BSD-2-Clause" ]
16
2015-01-11T21:10:26.000Z
2021-09-28T11:39:56.000Z
examples/stencil_grid/stencil_kernel.py
zanellia/ctree
d53d29d972ac06b60d8fc4fb81f5553d2ffbfda0
[ "BSD-2-Clause" ]
12
2015-01-01T01:55:49.000Z
2019-06-23T16:41:12.000Z
examples/stencil_grid/stencil_kernel.py
mbdriscoll/ctree
e15538ecdf3aaa3bb2f210701d29334fd5e4ec40
[ "BSD-2-Clause" ]
4
2015-07-23T20:48:36.000Z
2021-08-02T12:17:37.000Z
""" This version was taken from the stencil_specializer project and has all asp stuff removed in order to work on a direct c-tree llvm implementation The main driver, intercepts the kernel() call and invokes the other components. Stencil kernel classes are subclassed from the StencilKernel class defined here. At init...
38.409207
96
0.583233
cc16e36d108c0b762fb5424a885b8ba7348ef602
6,647
py
Python
monet/graph.py
stjordanis/MONeT-1
98a5c7d149ca19c8c64069dbd8f27ce7f97bf3af
[ "MIT" ]
161
2020-10-28T02:21:50.000Z
2022-03-11T05:06:16.000Z
monet/graph.py
kiminh/MONeT
83302c12e8fd3d1c8b2496928c843f0e84226cc8
[ "MIT" ]
4
2020-10-28T02:27:43.000Z
2021-03-31T00:04:43.000Z
monet/graph.py
kiminh/MONeT
83302c12e8fd3d1c8b2496928c843f0e84226cc8
[ "MIT" ]
15
2020-10-28T02:32:12.000Z
2021-12-23T13:20:23.000Z
import torch from functools import lru_cache class Node: def __init__(self, shape): self.shape = shape class Input(Node): def __repr__(self): return '<Input %s>' % str(list(self.shape)) class Param(Node): def __repr__(self): return '<Param %s>' % str(list(self.shape)) class C...
35.92973
197
0.531368
eedf083efa2a3dfc8c3bd3e271315707a901d0bb
8,641
py
Python
text2array/iterators.py
kmkurn/text2array
910c349fcbd85299b137c132f218a26860211a6b
[ "Apache-2.0" ]
null
null
null
text2array/iterators.py
kmkurn/text2array
910c349fcbd85299b137c132f218a26860211a6b
[ "Apache-2.0" ]
null
null
null
text2array/iterators.py
kmkurn/text2array
910c349fcbd85299b137c132f218a26860211a6b
[ "Apache-2.0" ]
1
2021-02-27T08:53:59.000Z
2021-02-27T08:53:59.000Z
# Copyright 2019 Kemal Kurniawan # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
35.126016
95
0.580257
2b43eb1dbe6d09ada6337047d2da34382852a6ee
1,392
py
Python
Server_Client/client.py
mattgarbecki/RoundnetPositionTracker
8e54c5fdb91e497184b66c9ff09e0e356d4d0e37
[ "MIT" ]
null
null
null
Server_Client/client.py
mattgarbecki/RoundnetPositionTracker
8e54c5fdb91e497184b66c9ff09e0e356d4d0e37
[ "MIT" ]
null
null
null
Server_Client/client.py
mattgarbecki/RoundnetPositionTracker
8e54c5fdb91e497184b66c9ff09e0e356d4d0e37
[ "MIT" ]
1
2020-05-13T23:51:06.000Z
2020-05-13T23:51:06.000Z
import requests import socket import astropy.io.misc.asdf.tags.time.tests.test_time import sensordroid def getDataPoint(): sensordroid return def runClient(address, port): # Create a TCP/IP socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Connect the socket to the port where th...
24.857143
66
0.604167
b7bef69db510c9e9ac644ec846c76e072b675620
2,263
py
Python
slack_differ.py
robobario/slack_differ
60ca4389a9faf36b5050847f88adcfc32775122e
[ "MIT" ]
null
null
null
slack_differ.py
robobario/slack_differ
60ca4389a9faf36b5050847f88adcfc32775122e
[ "MIT" ]
null
null
null
slack_differ.py
robobario/slack_differ
60ca4389a9faf36b5050847f88adcfc32775122e
[ "MIT" ]
null
null
null
#!/usr/bin/python import sh from os import listdir, mkdir from os.path import join, realpath, dirname, isdir, isfile import json import sys print "running slack_differ" dname = dirname(realpath(__file__)) print "dirname : " + dname script_dir = join(dname,'scripts') print "script_dir : " + script_dir if not isdir(scri...
31.873239
95
0.592134
6002076e36db07619287501f4e07304697ad3b4d
282
py
Python
fms/fms/doctype/announcement/announcement.py
sagar30051991/KF-FMS
e6e41343e2f90b09c73ef4f7a7ec35fd7be81a18
[ "MIT" ]
null
null
null
fms/fms/doctype/announcement/announcement.py
sagar30051991/KF-FMS
e6e41343e2f90b09c73ef4f7a7ec35fd7be81a18
[ "MIT" ]
null
null
null
fms/fms/doctype/announcement/announcement.py
sagar30051991/KF-FMS
e6e41343e2f90b09c73ef4f7a7ec35fd7be81a18
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, New Indictrans Technology Pvt Ltd and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Announcement(Document): pass
25.636364
72
0.787234
faf3274822022da014b74e39ab2416be71ca1782
1,584
py
Python
src/modtorsiflex/__init__.py
cathedralpkg/TorsiFlex
35f59b8813befdaac7a1c985216a7ead3012fb53
[ "Unlicense" ]
1
2022-02-02T01:04:36.000Z
2022-02-02T01:04:36.000Z
src/modtorsiflex/__init__.py
cathedralpkg/TorsiFlex
35f59b8813befdaac7a1c985216a7ead3012fb53
[ "Unlicense" ]
null
null
null
src/modtorsiflex/__init__.py
cathedralpkg/TorsiFlex
35f59b8813befdaac7a1c985216a7ead3012fb53
[ "Unlicense" ]
3
2021-12-28T14:21:32.000Z
2022-03-14T13:18:07.000Z
''' --------------------------- Licensing and Distribution --------------------------- Program name: TorsiFlex Version : 2021.3 License : MIT/x11 Copyright (c) 2021, David Ferro Costas (david.ferro@usc.es) and Antonio Fernandez Ramos (qf.ramos@usc.es) Permission is hereby granted, free of charge, to any per...
36.837209
78
0.688131
8bc98ef72a8c42cb4393d39ec6ac3e02d7565424
17,497
py
Python
plugins/modules/oci_dns_resolver_actions.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
108
2020-05-19T20:46:10.000Z
2022-03-25T14:10:01.000Z
plugins/modules/oci_dns_resolver_actions.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
90
2020-06-14T22:07:11.000Z
2022-03-07T05:40:29.000Z
plugins/modules/oci_dns_resolver_actions.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
42
2020-08-30T23:09:12.000Z
2022-03-25T16:58:01.000Z
#!/usr/bin/python # Copyright (c) 2020, 2021 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...
39.675737
151
0.563125
7024726e6c75726b1d6913cb263146591311183c
418
py
Python
__Training__/Python - HackerRank/2. Basic Data Types/Finding the percentage.py
JUD210/Study-Note
2add9db3f11d99370f49878f0c19e9caa60d2d02
[ "MIT" ]
null
null
null
__Training__/Python - HackerRank/2. Basic Data Types/Finding the percentage.py
JUD210/Study-Note
2add9db3f11d99370f49878f0c19e9caa60d2d02
[ "MIT" ]
null
null
null
__Training__/Python - HackerRank/2. Basic Data Types/Finding the percentage.py
JUD210/Study-Note
2add9db3f11d99370f49878f0c19e9caa60d2d02
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/finding-the-percentage/problem n = int(input()) # 3 student_marks = {} for _ in range(n): name, *scores = input().split() # Krishna 67 68 69 # Arjun 70 98 63 # Malika 52 56 60 scores = list(map(float, scores)) student_marks[name] = sum(scores) / len(...
17.416667
70
0.643541
e87f922c17b9089a645b1b05a99fd83e86d74ecf
2,065
py
Python
holmes/validators/blacklist.py
scorphus/holmes-api
6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59
[ "MIT" ]
null
null
null
holmes/validators/blacklist.py
scorphus/holmes-api
6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59
[ "MIT" ]
null
null
null
holmes/validators/blacklist.py
scorphus/holmes-api
6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from holmes.utils import get_domain_from_url, is_valid from holmes.validators.base import Validator from holmes.utils import _ class BlackListValidator(Validator): @classmethod def get_blacklist_parsed_value(cls, value): return ', '.join([ '<a hre...
29.927536
78
0.550121
5943feb9a555751ad97da8b8829466a0b0e894d1
2,262
py
Python
transitland/test_operator.py
transit-land/onestop-id-python-client
d03d8759d0758803519c51c6970213946a4078d4
[ "MIT" ]
null
null
null
transitland/test_operator.py
transit-land/onestop-id-python-client
d03d8759d0758803519c51c6970213946a4078d4
[ "MIT" ]
null
null
null
transitland/test_operator.py
transit-land/onestop-id-python-client
d03d8759d0758803519c51c6970213946a4078d4
[ "MIT" ]
null
null
null
"""Test Operator.""" import unittest import util from operator import Operator class TestOperator(unittest.TestCase): def setUp(self): self.expect = util.example_export() def _sanity(self, entity): """Perform sanity checks! After bootstrap_gtfs or from_json...""" # More extensive checks, since json...
31.859155
74
0.651636
cca0cfd65ae7e00b14583c214174fdf2b0828e7f
633
py
Python
vcx/wrappers/python3/setup.py
evernym/indy-sdk
714d449353518f929d9787d3156af785e2a42ccb
[ "Apache-2.0" ]
5
2018-04-09T12:26:28.000Z
2019-06-12T01:45:30.000Z
vcx/wrappers/python3/setup.py
evernym/indy-sdk
714d449353518f929d9787d3156af785e2a42ccb
[ "Apache-2.0" ]
9
2019-01-22T22:31:54.000Z
2019-04-11T21:45:09.000Z
vcx/wrappers/python3/setup.py
evernym/indy-sdk
714d449353518f929d9787d3156af785e2a42ccb
[ "Apache-2.0" ]
19
2018-04-25T16:08:43.000Z
2022-01-11T10:18:38.000Z
from setuptools import setup, find_packages import os PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '0.2.4' PKG_NAME = os.environ.get('PACKAGE_NAME') or 'python3-wrapper-vcx' def get_version(): try: return os.environ['VCX_VERSION'] except KeyError: return '0.2.0' setup( name=PKG_NAM...
26.375
66
0.696682
67d3173dc87d11acdf55f9134ba7a7426c31319b
12,769
py
Python
src/platform_vision/scripts/platform_vision/SlaveCameraController.py
ahmohamed1/activeStereoVisionPlatform
6c928ca242e4de68c7b15a8748bff1d9f7fa1382
[ "MIT" ]
null
null
null
src/platform_vision/scripts/platform_vision/SlaveCameraController.py
ahmohamed1/activeStereoVisionPlatform
6c928ca242e4de68c7b15a8748bff1d9f7fa1382
[ "MIT" ]
null
null
null
src/platform_vision/scripts/platform_vision/SlaveCameraController.py
ahmohamed1/activeStereoVisionPlatform
6c928ca242e4de68c7b15a8748bff1d9f7fa1382
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import cv2 import sys import numpy as np import math import argparse from geometry_msgs.msg import Twist from geometry_msgs.msg import Vector3, Pose2D from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError from std_msgs.msg import Int64 from std_msgs.msg i...
41.457792
134
0.608662
19f9dec0a5382290dfe8ea07a917e0029022e9b7
2,249
py
Python
jupyterlab/PreviewSearchPage.py
Larz60p/MakerProjectApril2019
2fd4d68aa66c1f4ad3b01f6a9589a078319280d7
[ "MIT" ]
1
2019-04-25T22:53:52.000Z
2019-04-25T22:53:52.000Z
jupyterlab/PreviewSearchPage.py
Larz60p/MakerProjectApril2019
2fd4d68aa66c1f4ad3b01f6a9589a078319280d7
[ "MIT" ]
null
null
null
jupyterlab/PreviewSearchPage.py
Larz60p/MakerProjectApril2019
2fd4d68aa66c1f4ad3b01f6a9589a078319280d7
[ "MIT" ]
null
null
null
# PreviesSearchPage.py from selenium import webdriver from selenium.webdriver.common.by import By from bs4 import BeautifulSoup import BusinessPaths import time import PrettifyPage import CreateDict import json import sys class PreviewSearchPage: def __init__(self): self.bpath = BusinessPaths.BusinessPat...
34.075758
121
0.649622
d78f98c344ff3704bf6b81bef097dee15b204be1
6,805
py
Python
zeitsprung/scraping.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
null
null
null
zeitsprung/scraping.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
109
2020-10-03T16:41:30.000Z
2021-09-16T21:03:34.000Z
zeitsprung/scraping.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup from datetime import datetime, timezone from io import BytesIO from json import loads from pathlib import Path from pydub import AudioSegment from requests import get from time import sleep from typing import Union from zeitsprung.base import Base from zeitsprung.database import SQLiteEngi...
36.390374
116
0.574137
e5d9ec84f3a938f06ee5218780c541b0b6a8fb9a
1,789
py
Python
decrypt_oracle/setup.py
Alan01252/aws-encryption-sdk-python
67cf41715b9841d374be07e39fd9ded9fb824280
[ "Apache-2.0" ]
null
null
null
decrypt_oracle/setup.py
Alan01252/aws-encryption-sdk-python
67cf41715b9841d374be07e39fd9ded9fb824280
[ "Apache-2.0" ]
null
null
null
decrypt_oracle/setup.py
Alan01252/aws-encryption-sdk-python
67cf41715b9841d374be07e39fd9ded9fb824280
[ "Apache-2.0" ]
null
null
null
"""API Gateway + Lambda decryption oracle using the AWS Encryption SDK for Python.""" import os import re from setuptools import find_packages, setup VERSION_RE = re.compile(r"""__version__ = ['"]([0-9.]+)['"]""") HERE = os.path.abspath(os.path.dirname(__file__)) def read(*args): """Read complete file contents....
33.12963
97
0.667412
59270d72e76d7b6eb00ef832efda884d1036031a
5,243
py
Python
models/train_classifier.py
dakcicek/disaster_response
c1abd82a22fa8be912eea362664106c60acc4f3d
[ "MIT" ]
null
null
null
models/train_classifier.py
dakcicek/disaster_response
c1abd82a22fa8be912eea362664106c60acc4f3d
[ "MIT" ]
null
null
null
models/train_classifier.py
dakcicek/disaster_response
c1abd82a22fa8be912eea362664106c60acc4f3d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # ML Pipeline Preparation import nltk nltk.download('punkt') nltk.download('wordnet') import re import sys import pickle import pandas as pd import numpy as np from sqlalchemy import create_engine import nltk nltk.download(['punkt', 'wordnet', 'stopwords']) from nltk.corpus import stopwords fro...
32.565217
128
0.692924
12514602e85629e507f4571067c346e3dc161f50
6,641
py
Python
utils/tag_util.py
LindgeW/BiaffineNER
0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
[ "Apache-2.0" ]
13
2020-10-24T08:09:27.000Z
2022-03-04T02:56:50.000Z
utils/tag_util.py
LindgeW/BiaffineNER
0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
[ "Apache-2.0" ]
4
2021-04-10T10:06:37.000Z
2022-03-08T10:25:53.000Z
utils/tag_util.py
LindgeW/BiaffineNER
0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
[ "Apache-2.0" ]
3
2020-10-26T06:38:17.000Z
2021-08-19T18:29:49.000Z
''' CWS / POS标签规范: 1、BI 2、BIS 3、BIES NER标签规范: 1、BIO 2、BISO 3、BIESO ''' def bi2bies(bi_tags): tag_len = len(bi_tags) for i, t in enumerate(bi_tags): if t == 'B': if i + 1 == tag_len or 'I' != bi_tags[i+1]: bi_tags[i] = 'S' elif t == 'I': if i + 1 == tag_...
26.043137
123
0.455504
1853d6c5b5a086a995ab5e8a253edec8d84dccfa
4,032
py
Python
mistral/rpc/kombu/kombu_listener.py
saadkhan44/mistral
4d95c032c7dafbc1a0079af17424db1d9a5851c5
[ "Apache-2.0" ]
3
2015-08-28T04:57:56.000Z
2017-03-27T10:59:56.000Z
mistral/rpc/kombu/kombu_listener.py
saadkhan44/mistral
4d95c032c7dafbc1a0079af17424db1d9a5851c5
[ "Apache-2.0" ]
21
2015-04-14T22:41:53.000Z
2019-02-20T09:30:10.000Z
mistral/rpc/kombu/kombu_listener.py
saadkhan44/mistral
4d95c032c7dafbc1a0079af17424db1d9a5851c5
[ "Apache-2.0" ]
12
2015-08-14T02:27:37.000Z
2020-12-31T10:09:21.000Z
# Copyright (c) 2016 Intel Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
31.5
78
0.62004
06712c8de3e40d29268f0df73a91cbf96d883c9a
2,207
py
Python
numpy_serial.py
berquist/gemm
4eca3f6c4f20199b8d64d8cf78f926d79131f69f
[ "MIT" ]
null
null
null
numpy_serial.py
berquist/gemm
4eca3f6c4f20199b8d64d8cf78f926d79131f69f
[ "MIT" ]
null
null
null
numpy_serial.py
berquist/gemm
4eca3f6c4f20199b8d64d8cf78f926d79131f69f
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import print_function import time import numpy as np def numpy_vec(scale, X, Y, result): result = (scale * X) + Y return def numpy_loop(N, scale, X, Y, result): for i in range(N): result[i] = (scale * X[i]) + Y[i] return def main(): ...
25.079545
83
0.615768
725c0b570f414f846ae3ba4da2e911dfdd4cd0e3
9,706
py
Python
setup.py
roschler/mythril
586b321a9468716946bf67592ac2be6c8502ed4c
[ "MIT" ]
null
null
null
setup.py
roschler/mythril
586b321a9468716946bf67592ac2be6c8502ed4c
[ "MIT" ]
null
null
null
setup.py
roschler/mythril
586b321a9468716946bf67592ac2be6c8502ed4c
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from setuptools.command.install import install import os # Package version (vX.Y.Z). It must match git tag being used for CircleCI # deployment; otherwise the build will failed. VERSION = "v0.17.5" class VerifyVersionCommand(install): """Custom command to verify that the...
28.297376
110
0.69081
aa0d7e637ae90024f2569283fe896cec9a02645c
145
py
Python
src/common/rucio/lfn.py
ESCAPE-WP2/rucio-analysis
81e6a7c9df790e5ec0833b21f30843f6ae906855
[ "MIT" ]
4
2021-04-14T06:29:27.000Z
2022-03-23T17:38:16.000Z
src/common/rucio/lfn.py
ESCAPE-WP2/rucio-analysis
81e6a7c9df790e5ec0833b21f30843f6ae906855
[ "MIT" ]
4
2020-10-06T17:43:49.000Z
2021-04-07T16:45:18.000Z
src/common/rucio/lfn.py
ESCAPE-WP2/rucio-analysis
81e6a7c9df790e5ec0833b21f30843f6ae906855
[ "MIT" ]
1
2021-07-22T20:46:15.000Z
2021-07-22T20:46:15.000Z
class LFN(): def __init__(self, abspath): self._abspath = abspath @property def abspath(self): return self._abspath
18.125
32
0.613793
30d970d302bb42c9f0b6fee3fefedf099b849f4b
1,064
py
Python
pylearn2/utils/bit_strings.py
jacobpeplinskiV2/pylearn2
478903d84bfa2b317e78be4e0d78588c2f58496e
[ "BSD-3-Clause" ]
null
null
null
pylearn2/utils/bit_strings.py
jacobpeplinskiV2/pylearn2
478903d84bfa2b317e78be4e0d78588c2f58496e
[ "BSD-3-Clause" ]
null
null
null
pylearn2/utils/bit_strings.py
jacobpeplinskiV2/pylearn2
478903d84bfa2b317e78be4e0d78588c2f58496e
[ "BSD-3-Clause" ]
null
null
null
"""Utilities for manipulating binary strings/masks.""" __author__ = "David Warde-Farley" __copyright__ = "Copyright 2012, Universite de Montreal" __credits__ = ["David Warde-Farley"] __license__ = "3-clause BSD" __email__ = "wardefar@iro" __maintainer__ = "David Warde-Farley" import numpy as np from six.moves import x...
28
74
0.650376
1cf3113af9ae1fb20330e2b6dd79f573019fab4e
2,482
py
Python
products_and_services_client/models/currency.py
pitzer42/opbk-br-quickstart
b3f86b2e5f82a6090aaefb563614e174a452383c
[ "MIT" ]
2
2021-02-07T23:58:36.000Z
2021-02-08T01:03:25.000Z
products_and_services_client/models/currency.py
pitzer42/opbk-br-quickstart
b3f86b2e5f82a6090aaefb563614e174a452383c
[ "MIT" ]
null
null
null
products_and_services_client/models/currency.py
pitzer42/opbk-br-quickstart
b3f86b2e5f82a6090aaefb563614e174a452383c
[ "MIT" ]
null
null
null
# coding: utf-8 """ API's OpenData do Open Banking Brasil As API's descritas neste documento são referentes as API's da fase OpenData do Open Banking Brasil. # noqa: E501 OpenAPI spec version: 1.0.0-rc5.2 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.gi...
29.2
117
0.555197
bfc6268b5ed6b41ceff83e9e92afb39a3b80d509
285
wsgi
Python
application.wsgi
dangoldin/bots
f0f80edb97ad48ed25862d79385b019497df135d
[ "MIT" ]
2
2016-06-29T04:02:49.000Z
2018-11-26T02:48:49.000Z
application.wsgi
dangoldin/bots
f0f80edb97ad48ed25862d79385b019497df135d
[ "MIT" ]
null
null
null
application.wsgi
dangoldin/bots
f0f80edb97ad48ed25862d79385b019497df135d
[ "MIT" ]
null
null
null
import os, sys, logging logging.basicConfig(stream=sys.stderr) PROJECT_DIR = '/var/www/bots' activate_this = os.path.join(PROJECT_DIR, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) sys.path.append(PROJECT_DIR) from bots import app as application
23.75
68
0.785965
a9786de68f0fb8651492a8f2146adf40a7baabe6
2,441
py
Python
Intergovernmental/Internet/scripts/create-filtered-lists.py
public-law/datasets
664c3bc3b7b4d4bb1e7001127fba7d321940ce77
[ "CC-BY-4.0" ]
1
2022-03-27T06:42:31.000Z
2022-03-27T06:42:31.000Z
Intergovernmental/Internet/scripts/create-filtered-lists.py
public-law/datasets
664c3bc3b7b4d4bb1e7001127fba7d321940ce77
[ "CC-BY-4.0" ]
1
2022-03-26T19:20:02.000Z
2022-03-26T19:20:02.000Z
Intergovernmental/Internet/scripts/create-filtered-lists.py
public-law/datasets
664c3bc3b7b4d4bb1e7001127fba7d321940ce77
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python import json import re from typing import Pattern INPUT_FILE = "../all-asns-org-names.json_lines" EDU = re.compile( r""" academy | college | \bedu | \-esd | institut | library | school | schule | suny | universidad ...
21.60177
95
0.523146
e62afce86729b04baeb4333a9d1f4846e57bb592
2,319
py
Python
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/functions/aggregate/util.py
mpol/iis
fbf7129bbd131fbf824a0d3fc8a0afde367794e2
[ "Apache-2.0" ]
20
2015-09-19T21:17:23.000Z
2022-03-01T10:37:59.000Z
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/functions/aggregate/util.py
mpol/iis
fbf7129bbd131fbf824a0d3fc8a0afde367794e2
[ "Apache-2.0" ]
1,054
2015-09-11T06:51:27.000Z
2022-03-30T09:46:54.000Z
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/functions/aggregate/util.py
mpol/iis
fbf7129bbd131fbf824a0d3fc8a0afde367794e2
[ "Apache-2.0" ]
80
2015-12-09T12:41:52.000Z
2022-02-16T11:46:42.000Z
__docformat__ = 'reStructuredText en' class expandgroups: """ .. function:: expandgroups(args) -> args Expands the contents of groups. Usefull for debugging group related queries. Examples: Directed graph: >>> table1(''' ... 1 2 ... 2 3 ... 1 4 ... 2 5 ... 3 3 ...
17.70229
86
0.490298
6a0d7571c975ed90297c5548a8e3a9bc0f83406d
1,080
py
Python
tests/zad2_ParameterizedPackage.py
cati97/laboratorium-7-cati97
0eaa3ca43a8868a96f32bfe9462e441b56d694fc
[ "MIT" ]
null
null
null
tests/zad2_ParameterizedPackage.py
cati97/laboratorium-7-cati97
0eaa3ca43a8868a96f32bfe9462e441b56d694fc
[ "MIT" ]
null
null
null
tests/zad2_ParameterizedPackage.py
cati97/laboratorium-7-cati97
0eaa3ca43a8868a96f32bfe9462e441b56d694fc
[ "MIT" ]
1
2020-11-17T16:37:32.000Z
2020-11-17T16:37:32.000Z
import unittest from src.sample.zad2 import * from nose.tools import assert_equal from parameterized import parameterized, parameterized_class @parameterized([ (1, 'I'), (2, 'II'), (3, 'III'), (4, 'IV'), (5, 'V'), (6, 'VI'), (9, 'IX'), (10, 'X'), ]) def test_first_method(input, expecte...
21.176471
60
0.593519
41d18c2267ff48dbc29b9e8be1174d8b90b29038
4,307
py
Python
trajopt/envs/quanser/qube/ctrl.py
JoeMWatson/trajopt
8b98718721e0c373cd7dc01a35f42447c1134713
[ "MIT" ]
1
2019-10-17T08:42:17.000Z
2019-10-17T08:42:17.000Z
trajopt/envs/quanser/qube/ctrl.py
JoeMWatson/trajopt
8b98718721e0c373cd7dc01a35f42447c1134713
[ "MIT" ]
null
null
null
trajopt/envs/quanser/qube/ctrl.py
JoeMWatson/trajopt
8b98718721e0c373cd7dc01a35f42447c1134713
[ "MIT" ]
null
null
null
import autograd.numpy as np from trajopt.envs.quanser.qube.base import QubeDynamics class PDCtrl: """ Slightly tweaked PD controller (increases gains if `x_des` not reachable). Accepts `th_des` and drives Qube to `x_des = (th_des, 0.0, 0.0, 0.0)` Flag `done` is set when `|x_des - x| < tol`. Tw...
33.648438
88
0.565823
7d3d8d37b2a9b590f7db08e40c9c28ababb1383e
2,734
py
Python
sub_rgbd_and_cloud.py
felixchenfy/ros_pub_and_sub_rgbd_and_cloud
28e481689e81a08c491f859a78c0058c86d4ebee
[ "MIT" ]
8
2019-12-23T09:42:38.000Z
2021-09-06T20:49:30.000Z
sub_rgbd_and_cloud.py
felixchenfy/ros_pub_and_sub_rgbd_and_cloud
28e481689e81a08c491f859a78c0058c86d4ebee
[ "MIT" ]
null
null
null
sub_rgbd_and_cloud.py
felixchenfy/ros_pub_and_sub_rgbd_and_cloud
28e481689e81a08c491f859a78c0058c86d4ebee
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' This script gives exampe code for subscribing: (1) Color image. (2) Depth image. (3) Camera info. (4) Point cloud (subscribed as open3d format). ''' from utils.lib_ros_rgbd_pub_and_sub import ColorImageSubscriber, DepthImageSubscriber, CameraInfoSubscr...
32.164706
107
0.581931
d33333631f3719c0dc35826c097597615bc54dcc
31,634
py
Python
tensor2tensor/utils/decoding.py
YunseokJANG/tensor2tensor
2451614b930c73b2b8dd891b4fc5838d99a151a6
[ "Apache-2.0" ]
1
2021-07-13T17:37:11.000Z
2021-07-13T17:37:11.000Z
tensor2tensor/utils/decoding.py
YunseokJANG/tensor2tensor
2451614b930c73b2b8dd891b4fc5838d99a151a6
[ "Apache-2.0" ]
null
null
null
tensor2tensor/utils/decoding.py
YunseokJANG/tensor2tensor
2451614b930c73b2b8dd891b4fc5838d99a151a6
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
34.877619
80
0.669786
51e31291379372af5e260295e3d4c305fad978a1
1,179
py
Python
tests/test_galaxy_importer.py
alikins/galaxy-importer-1
f9c7aebd826250dd47b022388d45ff5d33b91068
[ "Apache-2.0" ]
null
null
null
tests/test_galaxy_importer.py
alikins/galaxy-importer-1
f9c7aebd826250dd47b022388d45ff5d33b91068
[ "Apache-2.0" ]
null
null
null
tests/test_galaxy_importer.py
alikins/galaxy-importer-1
f9c7aebd826250dd47b022388d45ff5d33b91068
[ "Apache-2.0" ]
null
null
null
# (c) 2012-2019, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
33.685714
72
0.732824
ab526aea26860fa082d9cd66287c90e3508a39bf
19,527
py
Python
test/world_test.py
Beliaar/bGrease
24a0e3f2ed9ba57c8e3e83e16d16409ca2551c44
[ "MIT" ]
1
2018-07-17T03:53:43.000Z
2018-07-17T03:53:43.000Z
test/world_test.py
Beliaar/bGrease
24a0e3f2ed9ba57c8e3e83e16d16409ca2551c44
[ "MIT" ]
null
null
null
test/world_test.py
Beliaar/bGrease
24a0e3f2ed9ba57c8e3e83e16d16409ca2551c44
[ "MIT" ]
null
null
null
import unittest class TestComponent(dict): world = None runtime = 0 def __init__(self): self.entities = set() def set_world(self, world): self.world = world def add(self, entity, data=None): self[entity] = data self.entities.add(entity) def step(self, dt): self.runtime += dt class TestSystem(o...
32.383085
87
0.741537
6cc3ba613294da0f2a44a84dddcf1f39faa367ca
28,316
py
Python
conans/client/cmd/uploader.py
rweickelt/conan
2e5b21e82618d471c16e8ad6b8872d80c03fe609
[ "MIT" ]
null
null
null
conans/client/cmd/uploader.py
rweickelt/conan
2e5b21e82618d471c16e8ad6b8872d80c03fe609
[ "MIT" ]
null
null
null
conans/client/cmd/uploader.py
rweickelt/conan
2e5b21e82618d471c16e8ad6b8872d80c03fe609
[ "MIT" ]
null
null
null
import os import stat import tarfile import time from collections import defaultdict from tqdm import tqdm from conans.client.remote_manager import is_package_snapshot_complete from conans.client.source import complete_recipe_sources from conans.errors import ConanException, NotFoundException from conans.model.manife...
50.474153
100
0.615165
870ac5230ae4d3b7880dfbae2a9e3a967ca3ad9d
2,009
py
Python
encoders/rnn/plotobjective.py
SvenBollweg/eqnet
76bc51fdff8bef1b898820329e1ddf212323d0b0
[ "BSD-3-Clause" ]
35
2016-12-11T12:14:48.000Z
2022-03-28T14:20:27.000Z
encoders/rnn/plotobjective.py
SvenBollweg/eqnet
76bc51fdff8bef1b898820329e1ddf212323d0b0
[ "BSD-3-Clause" ]
null
null
null
encoders/rnn/plotobjective.py
SvenBollweg/eqnet
76bc51fdff8bef1b898820329e1ddf212323d0b0
[ "BSD-3-Clause" ]
12
2016-12-16T07:11:42.000Z
2020-04-11T02:53:03.000Z
import pickle import matplotlib.cm as cm import matplotlib.pyplot as plt import numpy as np from encoders.rnn.siameseencoder import RecursiveNNSiameseEncoder if __name__ == '__main__': import sys import os if len(sys.argv) != 2: print("Usage <FileName>") sys.exit(-1) hyperparameters ...
34.050847
100
0.537083
18bfd50e9c3ed87efe906eadbbe8db807fe12e29
8,294
py
Python
huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/list_gauss_my_sql_error_log_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/list_gauss_my_sql_error_log_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/list_gauss_my_sql_error_log_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListGaussMySqlErrorLogRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dic...
27.554817
141
0.59742
577b07b2fc2988f83160120578688d4975662914
44,233
py
Python
src/transformers/models/squeezebert/modeling_squeezebert.py
hardianlawi/transformers
d45fc7da3d43ff29ca597f5ffa8cf3151d705013
[ "Apache-2.0" ]
2
2021-08-20T21:22:37.000Z
2021-11-17T10:53:34.000Z
src/transformers/models/squeezebert/modeling_squeezebert.py
xiankaigit/transformers
61f64262692ac7dc90e2e0bdeb7e79d9cd607a66
[ "Apache-2.0" ]
null
null
null
src/transformers/models/squeezebert/modeling_squeezebert.py
xiankaigit/transformers
61f64262692ac7dc90e2e0bdeb7e79d9cd607a66
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The SqueezeBert authors and The HuggingFace Inc. 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 # # U...
40.138838
122
0.666267
b67168618e4b00ae00b3c5ffc45d1903ae242ab5
1,731
py
Python
mitorch/models/seresnext.py
shonohs/shtorch_models
afc20dbc9fd272a74ca08ec460401721b1476e72
[ "MIT" ]
3
2020-06-26T11:30:33.000Z
2021-01-23T07:42:25.000Z
mitorch/models/seresnext.py
shonohs/shtorch_models
afc20dbc9fd272a74ca08ec460401721b1476e72
[ "MIT" ]
null
null
null
mitorch/models/seresnext.py
shonohs/shtorch_models
afc20dbc9fd272a74ca08ec460401721b1476e72
[ "MIT" ]
2
2020-04-22T16:19:28.000Z
2020-06-11T09:06:37.000Z
"""SE-ResNext""" from .resnext import ResNext from .modules import SEBlock class SEResNext(ResNext): class BasicBlock(ResNext.BasicBlock): def __init__(self, in_channels, out_channels, cardinality, stride=1, reduction_ratio=16): super().__init__(in_channels, out_channels, cardinality, stride) ...
34.62
151
0.665511
f3a32afb076b27faec70a0b5dde715655a3b480f
7,072
py
Python
deploy.py
bzhaoopenstack/labkeeper
fecda8a306fd3f1dea3f66606ac8bd962981d2b0
[ "Apache-2.0" ]
4
2019-04-02T03:49:13.000Z
2022-01-22T14:57:33.000Z
deploy.py
bzhaoopenstack/labkeeper
fecda8a306fd3f1dea3f66606ac8bd962981d2b0
[ "Apache-2.0" ]
451
2019-03-25T07:27:52.000Z
2021-07-26T01:26:43.000Z
deploy.py
bzhaoopenstack/labkeeper
fecda8a306fd3f1dea3f66606ac8bd962981d2b0
[ "Apache-2.0" ]
14
2018-09-28T18:45:12.000Z
2022-01-22T14:57:22.000Z
#!/usr/bin/env python import datetime import json import os import subprocess import sys import argparse from prettytable import PrettyTable import requests def add_cli_args(): parser = argparse.ArgumentParser() parser.add_argument('type', choices=["allinone", "allinone-ha", "openlab"...
45.333333
91
0.516544
5f0aac252d83b7bf4266e7dab89093ddcdd55348
279
py
Python
etcampy/api.py
Yuki-Mori/etcampy
0af30327420b981d32b601b0346e4e4646094d67
[ "MIT" ]
null
null
null
etcampy/api.py
Yuki-Mori/etcampy
0af30327420b981d32b601b0346e4e4646094d67
[ "MIT" ]
null
null
null
etcampy/api.py
Yuki-Mori/etcampy
0af30327420b981d32b601b0346e4e4646094d67
[ "MIT" ]
null
null
null
from .exception import CameraCannotOpenError import cv2 def save_image(path, camera=0): cap = cv2.VideoCapture(camera) if not cap.isOpened: raise CameraCannotOpenError("Camera cannot open!") _, frame = cap.read() cv2.imwrite(path,frame) cap.release()
27.9
58
0.706093
b8c98745cafcf29a4da0932ed7f63cf1d2c7a56c
4,763
py
Python
models.py
sulabhkatiyar/Spatial_Att
675d0d51b131f277f764cb9604d0f9cd559c5484
[ "Apache-2.0" ]
null
null
null
models.py
sulabhkatiyar/Spatial_Att
675d0d51b131f277f764cb9604d0f9cd559c5484
[ "Apache-2.0" ]
null
null
null
models.py
sulabhkatiyar/Spatial_Att
675d0d51b131f277f764cb9604d0f9cd559c5484
[ "Apache-2.0" ]
null
null
null
import torch from torch import nn import torchvision import pretrainedmodels import json from tqdm import tqdm import numpy as np device = torch.device("cuda" if torch.cuda.is_available() else "cpu") encoder_choice = 1 class Encoder(nn.Module): def __init__(self, encoded_image_size=8): super(Encoder, ...
41.780702
184
0.643502
8edd1ace5b2de8fcd6b2a01d0707dfc96192d652
200
py
Python
aws/container/app.py
m-li/lambda_cluster
1481ecf83cd4be16c1c09a77301689e6e1ce61fb
[ "MIT" ]
null
null
null
aws/container/app.py
m-li/lambda_cluster
1481ecf83cd4be16c1c09a77301689e6e1ce61fb
[ "MIT" ]
null
null
null
aws/container/app.py
m-li/lambda_cluster
1481ecf83cd4be16c1c09a77301689e6e1ce61fb
[ "MIT" ]
null
null
null
import cloudpickle def handler(event, context): func = cloudpickle.loads(event["func"].encode('latin1')) args = event["args"] r = func(*args) return {"statusCode": 200, "results": r}
25
60
0.645
0cf3e3e954d4f1264adc139d4133a9412a794d03
3,592
py
Python
tests/components/zha/test_fan.py
jasperro/core
26d7b2164e8a971506790ae5af06f31abdf278b5
[ "Apache-2.0" ]
4
2016-12-23T10:36:36.000Z
2021-04-22T12:38:16.000Z
tests/components/zha/test_fan.py
jasperro/core
26d7b2164e8a971506790ae5af06f31abdf278b5
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
tests/components/zha/test_fan.py
jasperro/core
26d7b2164e8a971506790ae5af06f31abdf278b5
[ "Apache-2.0" ]
1
2020-03-07T10:43:50.000Z
2020-03-07T10:43:50.000Z
"""Test zha fan.""" from unittest.mock import call import pytest import zigpy.zcl.clusters.hvac as hvac import zigpy.zcl.foundation as zcl_f from homeassistant.components import fan from homeassistant.components.fan import ATTR_SPEED, DOMAIN, SERVICE_SET_SPEED from homeassistant.const import ( ATTR_ENTITY_ID, ...
30.965517
87
0.714087
231c2c22193f731f1d6524f942d2be3a6ab52e63
7,870
py
Python
pokemonlib/GameClasses/PokemonClass.py
Lapinux/pokemonlib
b7e2e056fdd9988ba8d38a159b8e6a0ecf17e090
[ "MIT" ]
null
null
null
pokemonlib/GameClasses/PokemonClass.py
Lapinux/pokemonlib
b7e2e056fdd9988ba8d38a159b8e6a0ecf17e090
[ "MIT" ]
null
null
null
pokemonlib/GameClasses/PokemonClass.py
Lapinux/pokemonlib
b7e2e056fdd9988ba8d38a159b8e6a0ecf17e090
[ "MIT" ]
null
null
null
import os # for finding the relative path to pokemon_data import json # for parsing pokemon_data json files import random # for generating IV or other random values import logging # for printing data from pokemonlib.misc import Exeptions # for initialisation exceptions logging.basicConfig() logging.root.setLevel(...
37.47619
119
0.569759