hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f755b14b151c4d8ed5ec358f5f4749ad3896a70f
1,959
py
Python
scripts/end_to_end_test/smart_contract_tests/c2c_single_call_test.py
lrahmani/ledger
80a16f4b749b0634cdfc9c05d76f2065f0b9308c
[ "Apache-2.0" ]
null
null
null
scripts/end_to_end_test/smart_contract_tests/c2c_single_call_test.py
lrahmani/ledger
80a16f4b749b0634cdfc9c05d76f2065f0b9308c
[ "Apache-2.0" ]
null
null
null
scripts/end_to_end_test/smart_contract_tests/c2c_single_call_test.py
lrahmani/ledger
80a16f4b749b0634cdfc9c05d76f2065f0b9308c
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 # # htt...
26.12
80
0.646248
from fetchai.ledger.api import LedgerApi from fetchai.ledger.contract import Contract from fetchai.ledger.crypto import Entity CONTRACT_TEXT = """ persistent x : Int64; contract c1_interface @action function eleven() : Int64; endcontract @action function c2c_call(contract_name : String) use x...
true
true
f755b16678269dd1993c44f20b30c9fa7f954035
805
py
Python
manage.py
tailongnguyen/petsite
6192e6fe598397a94880b4e56b197f5b2f518abb
[ "MIT" ]
2
2017-10-27T11:23:42.000Z
2018-03-28T01:49:57.000Z
manage.py
tailongnguyen/petsite
6192e6fe598397a94880b4e56b197f5b2f518abb
[ "MIT" ]
null
null
null
manage.py
tailongnguyen/petsite
6192e6fe598397a94880b4e56b197f5b2f518abb
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "petsite.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
35
77
0.642236
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "petsite.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
f755b466bf3619158d88a6754bc40b1399aa82e0
684
py
Python
backend/helper/pearson.py
marinaevers/regional-correlations
8ca91a5283a92e75f3d99f870c295ca580edb949
[ "MIT" ]
null
null
null
backend/helper/pearson.py
marinaevers/regional-correlations
8ca91a5283a92e75f3d99f870c295ca580edb949
[ "MIT" ]
null
null
null
backend/helper/pearson.py
marinaevers/regional-correlations
8ca91a5283a92e75f3d99f870c295ca580edb949
[ "MIT" ]
null
null
null
import numpy as np from joblib import Parallel, delayed import multiprocessing num_cores = multiprocessing.cpu_count() def pearson_corr_distance_matrix(timelines, lag=0): if lag == 0: return np.corrcoef(timelines) def corr(timelines, timeline, lag): corr_mat = np.zeros((1, len(timelines))) ...
29.73913
124
0.654971
import numpy as np from joblib import Parallel, delayed import multiprocessing num_cores = multiprocessing.cpu_count() def pearson_corr_distance_matrix(timelines, lag=0): if lag == 0: return np.corrcoef(timelines) def corr(timelines, timeline, lag): corr_mat = np.zeros((1, len(timelines))) ...
true
true
f755b61a516b572f3fd4e7f32dfc4bdfceed818b
5,626
py
Python
backend/lk/models/sdkuser.py
Purus/LaunchKitDocker
b8aaf9f1d8943a76ae7e0a81e15e6bebd4b9b08e
[ "Apache-2.0" ]
2,341
2016-07-27T17:23:23.000Z
2022-03-28T03:55:15.000Z
backend/lk/models/sdkuser.py
Purus/LaunchKitDocker
b8aaf9f1d8943a76ae7e0a81e15e6bebd4b9b08e
[ "Apache-2.0" ]
52
2016-07-27T23:12:21.000Z
2022-03-11T23:17:41.000Z
backend/lk/models/sdkuser.py
Purus/LaunchKitDocker
b8aaf9f1d8943a76ae7e0a81e15e6bebd4b9b08e
[ "Apache-2.0" ]
324
2016-07-27T18:34:53.000Z
2022-03-25T08:56:24.000Z
# # Copyright 2016 Cluster Labs, 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 law or agreed to in ...
33.094118
110
0.735514
from datetime import datetime from datetime import timedelta from django.db import models from djorm_pgarray.fields import TextArrayField from backend.lk.models.apimodel import APIModel from backend.lk.models.sdkapp import SDKApp from backend.lk.models.users import User from backend.util import bitwis...
true
true
f755b6c65975b84f57807b1f4d9fb20a2a5a22f5
304
py
Python
setup.py
ChinzoD/rdalchemy
350a4a2589425ca9faaea50dac990b2f969a044b
[ "MIT" ]
null
null
null
setup.py
ChinzoD/rdalchemy
350a4a2589425ca9faaea50dac990b2f969a044b
[ "MIT" ]
null
null
null
setup.py
ChinzoD/rdalchemy
350a4a2589425ca9faaea50dac990b2f969a044b
[ "MIT" ]
2
2020-03-24T20:13:02.000Z
2020-08-12T22:20:32.000Z
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='rdalchemy', version='0.0.21', description='Using SQLAlchemy with chemical databases', packages=['rdalchemy'], install_requires=[ 'psycopg2-binary', 'SQLAlchemy>=0.7.0', ], )
21.714286
61
0.621711
from setuptools import setup, find_packages setup(name='rdalchemy', version='0.0.21', description='Using SQLAlchemy with chemical databases', packages=['rdalchemy'], install_requires=[ 'psycopg2-binary', 'SQLAlchemy>=0.7.0', ], )
true
true
f755b6cb839d60227bd145f9af9eb836a6826157
361
py
Python
math/arithmetic-series.py
src24/algos
b1ac1049be6adaafedaa0572f009668e2c8d3809
[ "MIT" ]
null
null
null
math/arithmetic-series.py
src24/algos
b1ac1049be6adaafedaa0572f009668e2c8d3809
[ "MIT" ]
null
null
null
math/arithmetic-series.py
src24/algos
b1ac1049be6adaafedaa0572f009668e2c8d3809
[ "MIT" ]
null
null
null
# O(n^2) def arithmetic_series(n: int) -> int: if n < 0: raise ValueError('Argument n is not a natural number') return int((n + 1) * n * 0.5) def arithmetic_series_loop(n: int) -> int: if n < 0: raise ValueError('Argument n is not a natural number') s: int = 0 while n > 0: ...
16.409091
62
0.534626
def arithmetic_series(n: int) -> int: if n < 0: raise ValueError('Argument n is not a natural number') return int((n + 1) * n * 0.5) def arithmetic_series_loop(n: int) -> int: if n < 0: raise ValueError('Argument n is not a natural number') s: int = 0 while n > 0: s +...
true
true
f755b7293e76836d365f00c03ffc5df432464fc7
205
py
Python
tests/test_looseserver/server/conftest.py
KillAChicken/loose-server
082402f1fec94faea20343142b0c306dc5f86026
[ "MIT" ]
3
2019-04-21T13:10:34.000Z
2019-10-08T05:20:04.000Z
tests/test_looseserver/server/conftest.py
KillAChicken/loose-server
082402f1fec94faea20343142b0c306dc5f86026
[ "MIT" ]
null
null
null
tests/test_looseserver/server/conftest.py
KillAChicken/loose-server
082402f1fec94faea20343142b0c306dc5f86026
[ "MIT" ]
null
null
null
"""Configuration of pytest.""" import pytest from looseserver.server.core import Manager @pytest.fixture def core_manager(base_endpoint): """Core manager.""" return Manager(base=base_endpoint)
17.083333
43
0.746341
import pytest from looseserver.server.core import Manager @pytest.fixture def core_manager(base_endpoint): return Manager(base=base_endpoint)
true
true
f755b7e66799a24a8fa7fabd897fc99213f5c6c4
963
py
Python
tools/tor_convert_args.py
sporksmith/shadow-plugin-tor
cd8a4d73ba4969b390b5146806c956d7f6bd058f
[ "BSD-3-Clause" ]
58
2015-07-02T01:04:31.000Z
2021-05-04T08:37:58.000Z
tools/tor_convert_args.py
sporksmith/shadow-plugin-tor
cd8a4d73ba4969b390b5146806c956d7f6bd058f
[ "BSD-3-Clause" ]
101
2015-01-13T20:11:51.000Z
2021-05-13T19:35:43.000Z
tools/tor_convert_args.py
sporksmith/shadow-plugin-tor
cd8a4d73ba4969b390b5146806c956d7f6bd058f
[ "BSD-3-Clause" ]
44
2015-02-14T06:01:19.000Z
2021-03-16T19:47:38.000Z
#!/usr/bin/python """ takes a shadow.config.xml file and replaces args with new format used in shadow v1.10.0. this is to say the first 2 args of every tor node args line are removed. """ import sys from lxml import etree if len(sys.argv) != 3: print >>sys.stderr, "{0} input.xml output.xml".format(sys.argv[0]);exit(...
32.1
110
0.66459
import sys from lxml import etree if len(sys.argv) != 3: print >>sys.stderr, "{0} input.xml output.xml".format(sys.argv[0]);exit() infname = sys.argv[1] outfname = sys.argv[2] parser = etree.XMLParser(remove_blank_text=True) tree = etree.parse(infname, parser) root = tree.getroot() for n in root.iterchildren("no...
true
true
f755b8b8407f83f29cc2ddc1c51ef7a139e40350
8,360
py
Python
bayesian_bootstrap/tests/test_bootstrap.py
vishalbelsare/bayesian_bootstrap
57a093a128ac1aaf7ff7a6cf70f6b05d684589d7
[ "MIT" ]
118
2017-06-27T05:23:12.000Z
2022-03-21T05:50:44.000Z
bayesian_bootstrap/tests/test_bootstrap.py
vishalbelsare/bayesian_bootstrap
57a093a128ac1aaf7ff7a6cf70f6b05d684589d7
[ "MIT" ]
18
2017-08-28T13:25:16.000Z
2022-03-12T16:58:38.000Z
bayesian_bootstrap/tests/test_bootstrap.py
vishalbelsare/bayesian_bootstrap
57a093a128ac1aaf7ff7a6cf70f6b05d684589d7
[ "MIT" ]
19
2017-07-06T13:10:32.000Z
2022-01-25T19:50:34.000Z
import unittest import numpy as np import scipy import random import bayesian_bootstrap.bootstrap as bb from bayesian_bootstrap.bootstrap import ( mean, var, bayesian_bootstrap, central_credible_interval, highest_density_interval, BayesianBootstrapBagging, covar, ) from sklearn.linear_model ...
42.222222
99
0.651196
import unittest import numpy as np import scipy import random import bayesian_bootstrap.bootstrap as bb from bayesian_bootstrap.bootstrap import ( mean, var, bayesian_bootstrap, central_credible_interval, highest_density_interval, BayesianBootstrapBagging, covar, ) from sklearn.linear_model ...
true
true
f755b8bc4e90d345145ee5b7f02c0402c5039d5a
1,701
py
Python
setup.py
tim-a-davis/fast_krig
633773423ca5a8a93c2e28106d7822e661da8338
[ "MIT" ]
null
null
null
setup.py
tim-a-davis/fast_krig
633773423ca5a8a93c2e28106d7822e661da8338
[ "MIT" ]
null
null
null
setup.py
tim-a-davis/fast_krig
633773423ca5a8a93c2e28106d7822e661da8338
[ "MIT" ]
null
null
null
#!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages from os.path import basename from os.path import splitext from glob import glob with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read(...
27
74
0.640212
from setuptools import setup, find_packages from os.path import basename from os.path import splitext from glob import glob with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() requirements = [] setup_requirements = [ ...
true
true
f755b9072b65605f44d8d675b6fcdf0d612e2133
2,476
py
Python
code/util/visualization/main_unc_forecast_visualization.py
yannick-t/probabilistic_forecasting_of_energy_time_series_using_deep_learning
98a2b12270e79045b8704e9d9cc506ffadb95127
[ "CNRI-Python" ]
2
2021-04-12T10:52:40.000Z
2021-11-28T21:39:34.000Z
code/util/visualization/main_unc_forecast_visualization.py
yannick-t/probabilistic_forecasting_of_energy_time_series_using_deep_learning
98a2b12270e79045b8704e9d9cc506ffadb95127
[ "CNRI-Python" ]
null
null
null
code/util/visualization/main_unc_forecast_visualization.py
yannick-t/probabilistic_forecasting_of_energy_time_series_using_deep_learning
98a2b12270e79045b8704e9d9cc506ffadb95127
[ "CNRI-Python" ]
1
2021-07-07T17:17:59.000Z
2021-07-07T17:17:59.000Z
from datetime import datetime import matplotlib.pyplot as plt import torch from evaluation.evaluate_forecasting_util import timeframe from load_forecasting.forecast_util import dataset_df_to_np from load_forecasting.post_processing import recalibrate from load_forecasting.predict import predict_transform from models....
34.388889
118
0.703958
from datetime import datetime import matplotlib.pyplot as plt import torch from evaluation.evaluate_forecasting_util import timeframe from load_forecasting.forecast_util import dataset_df_to_np from load_forecasting.post_processing import recalibrate from load_forecasting.predict import predict_transform from models....
true
true
f755badbdf5f194d6461e343108a59a63ae33c0c
2,710
py
Python
Generator/guid.py
Design-Computation-RWTH/ILC_Demonstrator
60046366383de053026a0d03b213f6af3610f608
[ "MIT" ]
1
2021-06-08T10:04:35.000Z
2021-06-08T10:04:35.000Z
mvdXMLGen/ILC_Demonstrator-master/Generator/guid.py
BIMInstitut/MRL-Datenbank
81130071d3b76eba010e7649a2cbaf0a1b7dcfc4
[ "MIT" ]
null
null
null
mvdXMLGen/ILC_Demonstrator-master/Generator/guid.py
BIMInstitut/MRL-Datenbank
81130071d3b76eba010e7649a2cbaf0a1b7dcfc4
[ "MIT" ]
1
2021-05-04T09:38:20.000Z
2021-05-04T09:38:20.000Z
#https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcopenshell-python/ifcopenshell/guid.py#L56 #Thomas Krijnen #Matthis Thorade #buildingSMART ############################################################################### # # # Th...
38.714286
114
0.471956
true
true
f755bb448fe918d2395fc41431bb697e57025f28
3,558
py
Python
scripts/004-median-of-two-sorted-arrays.py
ZhiShiMao/leetcode-python
8b0573e8c99b59d39f7afaab98d33254d2966e05
[ "MIT" ]
null
null
null
scripts/004-median-of-two-sorted-arrays.py
ZhiShiMao/leetcode-python
8b0573e8c99b59d39f7afaab98d33254d2966e05
[ "MIT" ]
null
null
null
scripts/004-median-of-two-sorted-arrays.py
ZhiShiMao/leetcode-python
8b0573e8c99b59d39f7afaab98d33254d2966e05
[ "MIT" ]
null
null
null
from typing import List class Solution: """TITLE: 寻找两个正序数组的中位数 给定两个大小分别为 m 和 n 的正序(从小到大)数组 nums1 和 nums2。 请你找出并返回这两个正序数组的 中位数 。 NOTE: 示例 示例 1: 输入:nums1 = [1,3], nums2 = [2] 输出:2.00000 解释:合并数组 = [1,2,3] ,中位数 2 示例 2: 输入:nums1 = [1,2], nums2 = [3,4] 输出:2.50000 解释:合并数组 = [1...
26.75188
87
0.443508
from typing import List class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: def getMedianInList(a: List): if len(a) % 2 == 0: return (a[int(len(a) / 2)] + a[int(len(a) / 2) - 1]) / 2 return a[int(len(a) / 2)] ...
true
true
f755bbad225ae4b40f0766382732b3d109c04490
2,084
py
Python
helper_functions/join_main_category.py
jvario/inside_Airbnb-Athens-
8abae93756d1e4388f770dfb073ec27cfc9bacbf
[ "MIT" ]
1
2021-04-12T16:03:59.000Z
2021-04-12T16:03:59.000Z
helper_functions/join_main_category.py
jvario/inside_Airbnb-Athens
8abae93756d1e4388f770dfb073ec27cfc9bacbf
[ "MIT" ]
null
null
null
helper_functions/join_main_category.py
jvario/inside_Airbnb-Athens
8abae93756d1e4388f770dfb073ec27cfc9bacbf
[ "MIT" ]
null
null
null
import pandas as pd import collections as col import numpy as np def join_main_category(new_category, sub_categories, word_dict, size, data): ''' this function joins sub_categories into a main category ============================================================== input: - new_...
31.575758
84
0.502879
import pandas as pd import collections as col import numpy as np def join_main_category(new_category, sub_categories, word_dict, size, data): name_of_category = new_category for amen in data["amenities"]: for list_item in amen: ind = amen.index(list_item) amen[ind] = amen[ind]...
true
true
f755bcfc4434b096f121989244a3f8afbbdd919d
1,554
py
Python
tests/Parser/012SXEX(YEAR)_test.py
Bas-Man/TVShowFile
2f341c97dcbe52eee0c0e71752173c9e9442450c
[ "MIT" ]
null
null
null
tests/Parser/012SXEX(YEAR)_test.py
Bas-Man/TVShowFile
2f341c97dcbe52eee0c0e71752173c9e9442450c
[ "MIT" ]
null
null
null
tests/Parser/012SXEX(YEAR)_test.py
Bas-Man/TVShowFile
2f341c97dcbe52eee0c0e71752173c9e9442450c
[ "MIT" ]
null
null
null
import unittest from context import parser class TVShowFileParserTests(unittest.TestCase): def setUp(self): self.filename = parser.Parser("test.(2018).s01E01.1080p.avi") def tearDown(self): self.filename = None def testObjValuesSet(self): self.assertEqual(self.filename.showName,...
35.318182
69
0.66731
import unittest from context import parser class TVShowFileParserTests(unittest.TestCase): def setUp(self): self.filename = parser.Parser("test.(2018).s01E01.1080p.avi") def tearDown(self): self.filename = None def testObjValuesSet(self): self.assertEqual(self.filename.showName,...
true
true
f755bd7e652e22d7b8474fc340d583922f94619f
1,535
py
Python
app/src/__init__.py
alaxa27/AIPCloud_Platform
31255753c1474557ca3fbb8e36ada15798305760
[ "MIT" ]
null
null
null
app/src/__init__.py
alaxa27/AIPCloud_Platform
31255753c1474557ca3fbb8e36ada15798305760
[ "MIT" ]
null
null
null
app/src/__init__.py
alaxa27/AIPCloud_Platform
31255753c1474557ca3fbb8e36ada15798305760
[ "MIT" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_httpauth import HTTPBasicAuth import logging from logging.handlers import RotatingFileHandler # initialization app = Flask(__name__) handler = RotatingFileHandler('foo.log', maxBytes=10000, backupCount=1) handler.setLevel(logging.INFO) app.lo...
33.369565
76
0.786971
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_httpauth import HTTPBasicAuth import logging from logging.handlers import RotatingFileHandler app = Flask(__name__) handler = RotatingFileHandler('foo.log', maxBytes=10000, backupCount=1) handler.setLevel(logging.INFO) app.logger.addHandler(...
true
true
f755bdeea270c078acfa089767622f28fdf0f9dc
1,385
py
Python
ui/raw/_options.py
yiguanxianyu/PiGIS
3c14512c472c17b2eff275252227f1533e42f6c5
[ "Apache-2.0" ]
null
null
null
ui/raw/_options.py
yiguanxianyu/PiGIS
3c14512c472c17b2eff275252227f1533e42f6c5
[ "Apache-2.0" ]
null
null
null
ui/raw/_options.py
yiguanxianyu/PiGIS
3c14512c472c17b2eff275252227f1533e42f6c5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file '_options.ui' ## ## Created by: Qt User Interface Compiler version 6.3.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##################...
37.432432
95
0.639711
true
true
f755be2b9248919b6e35b9a842adcb479bff1253
1,073
py
Python
adv/w_elisanne.py
smashwidget/dl-1
352a65b9e40a623d7a9e5a693fa2b412f27d8cff
[ "Apache-2.0" ]
null
null
null
adv/w_elisanne.py
smashwidget/dl-1
352a65b9e40a623d7a9e5a693fa2b412f27d8cff
[ "Apache-2.0" ]
null
null
null
adv/w_elisanne.py
smashwidget/dl-1
352a65b9e40a623d7a9e5a693fa2b412f27d8cff
[ "Apache-2.0" ]
null
null
null
import adv.adv_test from adv import * from slot.a import * from slot.d import * def module(): return W_Elisanne class W_Elisanne(Adv): comment = '2in1' conf = {} conf = {} conf['acl'] = """ `s1,fsc and s2.charged<s2.sp-749 `s2 `s3,fsc and not this.s2debuff.get() ...
22.829787
101
0.534949
import adv.adv_test from adv import * from slot.a import * from slot.d import * def module(): return W_Elisanne class W_Elisanne(Adv): comment = '2in1' conf = {} conf = {} conf['acl'] = """ `s1,fsc and s2.charged<s2.sp-749 `s2 `s3,fsc and not this.s2debuff.get() ...
true
true
f755be648ac2adc2e08c44c85a925b7e286204df
4,591
py
Python
src/scs_dev/display.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
2
2017-04-24T14:58:28.000Z
2020-05-27T08:53:46.000Z
src/scs_dev/display.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
1
2020-07-13T14:33:59.000Z
2021-03-27T08:52:04.000Z
src/scs_dev/display.py
south-coast-science/scs_dev
b746adda020498b911cb92f28d4f07b14df996a2
[ "MIT" ]
1
2018-08-24T09:55:01.000Z
2018-08-24T09:55:01.000Z
#!/usr/bin/env python3 """ Created on 23 Jun 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) DESCRIPTION The display utility is used to set the content for a visual display, such as the Pimoroni Inky pHAT eInk module. Content is gained from several sources: * The display_conf settings * System statu...
27.824242
118
0.565454
import sys from scs_core.comms.mqtt_conf import MQTTConf from scs_core.comms.uds_reader import UDSReader from scs_core.sys.signalled_exit import SignalledExit from scs_dev.cmd.cmd_display import CmdDisplay from scs_dfe.gps.gps_conf import GPSConf from scs_dfe.interface.interface_conf import InterfaceConf from s...
true
true
f755bf0905b994081146a5eff2ad5a8a64ef04b0
2,722
py
Python
src/the_tale/the_tale/common/utils/decorators.py
devapromix/the-tale
2a10efd3270734f8cf482b4cfbc5353ef8f0494c
[ "BSD-3-Clause" ]
1
2020-04-02T11:51:20.000Z
2020-04-02T11:51:20.000Z
src/the_tale/the_tale/common/utils/decorators.py
devapromix/the-tale
2a10efd3270734f8cf482b4cfbc5353ef8f0494c
[ "BSD-3-Clause" ]
null
null
null
src/the_tale/the_tale/common/utils/decorators.py
devapromix/the-tale
2a10efd3270734f8cf482b4cfbc5353ef8f0494c
[ "BSD-3-Clause" ]
null
null
null
import smart_imports smart_imports.all() def login_required(func): @functools.wraps(func) def wrapper(resource, *argv, **kwargs): from the_tale.accounts import logic as accounts_logic if resource.account.is_authenticated: return func(resource, *argv, **kwargs) else: ...
30.931818
127
0.654298
import smart_imports smart_imports.all() def login_required(func): @functools.wraps(func) def wrapper(resource, *argv, **kwargs): from the_tale.accounts import logic as accounts_logic if resource.account.is_authenticated: return func(resource, *argv, **kwargs) else: ...
true
true
f755c01a3589dd42e5a76635c5dff33860ae7244
2,146
py
Python
docs/conf.py
AndersStendevad/pycounting
34ed6a429af69063ab899c373fb0a79377f2bb53
[ "MIT" ]
null
null
null
docs/conf.py
AndersStendevad/pycounting
34ed6a429af69063ab899c373fb0a79377f2bb53
[ "MIT" ]
null
null
null
docs/conf.py
AndersStendevad/pycounting
34ed6a429af69063ab899c373fb0a79377f2bb53
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
32.515152
79
0.665424
project = "pycounting" copyright = "2022, Anders Stendevad" author = "Anders Stendevad" release = "0.0.1" import sphinx_rtd_theme import sphinx_click extensions = [ "sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.napoleon", "sphinx.ext.doctest", "sphinx_rtd...
true
true
f755c05e652c954b6a46c912476fd7cb840c63d2
1,888
py
Python
game/spirit/comment/migrations/0001_initial.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
3
2019-08-18T19:08:48.000Z
2019-12-04T18:14:29.000Z
game/spirit/comment/migrations/0001_initial.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
10
2020-02-12T00:38:24.000Z
2022-02-10T07:47:09.000Z
game/spirit/comment/migrations/0001_initial.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
2
2019-12-03T15:43:17.000Z
2020-04-30T11:50:19.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('spirit_topic...
47.2
216
0.60964
from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('spirit_topic', '0001_initial'), ...
true
true
f755c0ba5036affe9af12435f1a4c24aa9f42f3a
866
py
Python
PricingAdvertising/pricingEnviroment/Greedy_Learner.py
rossigiorgio/DIAProject
908251b760b1bd562741fc09691c2bb1695e06a9
[ "MIT" ]
null
null
null
PricingAdvertising/pricingEnviroment/Greedy_Learner.py
rossigiorgio/DIAProject
908251b760b1bd562741fc09691c2bb1695e06a9
[ "MIT" ]
null
null
null
PricingAdvertising/pricingEnviroment/Greedy_Learner.py
rossigiorgio/DIAProject
908251b760b1bd562741fc09691c2bb1695e06a9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue May 4 13:36:39 2021 @author: MorganaGiorgio """ from Learner import * class Greedy_Learner(Learner): def __init__(self, n_arms): super().__init__(n_arms) self.expected_rewards = np.zeros(n_arms) def pull_arm(self): #all'inizio pulo ...
30.928571
105
0.650115
from Learner import * class Greedy_Learner(Learner): def __init__(self, n_arms): super().__init__(n_arms) self.expected_rewards = np.zeros(n_arms) def pull_arm(self): if(self.t < self.n_arms): return self.t #quando t>n_arms allora pullo quella con...
true
true
f755c14cd0a53cbec979bb4ef7894142ab73e55c
6,573
py
Python
lib/tests/streamlit/slider_test.py
cdeil/streamlit
173aa1cd5835174620e8246eb5d7116be2cb6ffc
[ "Apache-2.0" ]
1
2021-04-09T15:55:23.000Z
2021-04-09T15:55:23.000Z
lib/tests/streamlit/slider_test.py
cdeil/streamlit
173aa1cd5835174620e8246eb5d7116be2cb6ffc
[ "Apache-2.0" ]
108
2020-11-10T22:19:28.000Z
2022-03-29T16:48:55.000Z
lib/tests/streamlit/slider_test.py
cdeil/streamlit
173aa1cd5835174620e8246eb5d7116be2cb6ffc
[ "Apache-2.0" ]
1
2020-03-29T11:54:31.000Z
2020-03-29T11:54:31.000Z
# Copyright 2018-2020 Streamlit 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 law or agreed to in wr...
36.72067
88
0.610832
import pytest from parameterized import parameterized import streamlit as st from streamlit.errors import StreamlitAPIException from streamlit.js_number import JSNumber from tests import testutil from datetime import date from datetime import datetime from datetime import time from datetime import time...
true
true
f755c1f7f515204ef570b7c09abcae521b80863e
7,327
py
Python
cutiefake/proto/elily_pb2.py
hashimom/EgoisticLily
adaca4444eb02f84526954cfee549254c2c03e7e
[ "MIT" ]
2
2019-11-17T02:33:58.000Z
2019-12-21T07:16:03.000Z
cutiefake/proto/elily_pb2.py
hashimom/CutieFake
adaca4444eb02f84526954cfee549254c2c03e7e
[ "MIT" ]
null
null
null
cutiefake/proto/elily_pb2.py
hashimom/CutieFake
adaca4444eb02f84526954cfee549254c2c03e7e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: elily.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impor...
31.178723
607
0.746417
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f755c29bed9ae8f6fcba608343881297d1bc3ba3
406
py
Python
content/code/python-jinja2-vs-go-html-template/jinja2-example-2.py
eduard1963/userpages
98a00c9ef3d82363dba1a89375574daaa5a86d14
[ "Unlicense" ]
77
2015-07-18T15:56:54.000Z
2022-03-10T06:22:06.000Z
content/code/python-jinja2-vs-go-html-template/jinja2-example-2.py
vicmanbrile/userpages
76d540b447ea0baccc91e1db5f9c22408fe420f4
[ "Unlicense" ]
5
2017-02-23T10:17:21.000Z
2022-01-13T19:51:15.000Z
content/code/python-jinja2-vs-go-html-template/jinja2-example-2.py
vicmanbrile/userpages
76d540b447ea0baccc91e1db5f9c22408fe420f4
[ "Unlicense" ]
35
2015-04-22T05:10:00.000Z
2022-01-21T12:34:50.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- from jinja2 import Template import sys tmpl = """ {% for link in links %} <a href="{{link.href}}">{{link.name}}</a> {% endfor %} """ if __name__ == '__main__': links = [ {'name': 'Google', 'href': 'https://www.google.com'}, {'name': 'Facebook', 'href': 'https://...
20.3
60
0.583744
from jinja2 import Template import sys tmpl = """ {% for link in links %} <a href="{{link.href}}">{{link.name}}</a> {% endfor %} """ if __name__ == '__main__': links = [ {'name': 'Google', 'href': 'https://www.google.com'}, {'name': 'Facebook', 'href': 'https://www.facebook.com'} ] t = Template(tmpl)...
true
true
f755c3321b24a13794f90cd26e7e52a05030911f
1,102
py
Python
azure/mgmt/network/v2017_08_01/models/security_group_view_result.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
azure/mgmt/network/v2017_08_01/models/security_group_view_result.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
azure/mgmt/network/v2017_08_01/models/security_group_view_result.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38
102
0.649728
from msrest.serialization import Model class SecurityGroupViewResult(Model): _attribute_map = { 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, } def __init__(self, network_interfaces=None): self.network_interfaces = network_inter...
true
true
f755c41339d613fb72a98e337f92bc56b659d90a
29,872
py
Python
tests/unit/modules/test_nftables.py
tqrg-bot/salt
12c5b33396ac1b4d47c7ca4d7dbdd13087073a4b
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/test_nftables.py
tqrg-bot/salt
12c5b33396ac1b4d47c7ca4d7dbdd13087073a4b
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/test_nftables.py
tqrg-bot/salt
12c5b33396ac1b4d47c7ca4d7dbdd13087073a4b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase from tests.supp...
45.956923
136
0.518981
from __future__ import absolute_import, print_function, unicode_literals from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase from tests.support.mock import ( MagicMock, mock_open, patch, ) import salt.modules.nftables as nftables import salt.utils.files from...
true
true
f755c7ac3138218c3758b8cc5e84d4a4b9b404ea
2,818
py
Python
transmanager/forms.py
APSL/transmanager
79157085840008e146b264521681913090197ed1
[ "MIT" ]
18
2016-06-01T15:47:43.000Z
2018-07-10T22:04:21.000Z
transmanager/forms.py
APSL/transmanager
79157085840008e146b264521681913090197ed1
[ "MIT" ]
13
2016-06-21T15:19:30.000Z
2021-06-10T19:21:39.000Z
transmanager/forms.py
APSL/transmanager
79157085840008e146b264521681913090197ed1
[ "MIT" ]
1
2017-02-10T07:40:50.000Z
2017-02-10T07:40:50.000Z
# -*- encoding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.forms import ModelForm from django import forms from transmanager.utils import get_model_choices, get_application_choices from .models import TransTask, TransModelLanguage, TransApplicationLanguage, TransUser class TransAp...
39.138889
107
0.666075
from django.utils.translation import ugettext_lazy as _ from django.forms import ModelForm from django import forms from transmanager.utils import get_model_choices, get_application_choices from .models import TransTask, TransModelLanguage, TransApplicationLanguage, TransUser class TransApplicationLanguageAdminFor...
true
true
f755c884c34fbe078bf947aa91a2d9a36945aa56
5,670
py
Python
mmdet/core/evaluation/class_names.py
poirot0805/mmdetection
8fc336168f7a3248a5effadd4757369b99534c3e
[ "Apache-2.0" ]
null
null
null
mmdet/core/evaluation/class_names.py
poirot0805/mmdetection
8fc336168f7a3248a5effadd4757369b99534c3e
[ "Apache-2.0" ]
null
null
null
mmdet/core/evaluation/class_names.py
poirot0805/mmdetection
8fc336168f7a3248a5effadd4757369b99534c3e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant'...
46.859504
80
0.57619
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
true
true
f755c942f48beddc3ee145d013b4a67debb89798
1,566
py
Python
kivystudio/widgets/splitter.py
hashfx/kivystudio
dfc61922e30c1ed1c7102a36c467a9972ae82b56
[ "MIT" ]
165
2019-05-26T11:04:47.000Z
2022-03-25T08:33:02.000Z
kivystudio/widgets/splitter.py
hashfx/kivystudio
dfc61922e30c1ed1c7102a36c467a9972ae82b56
[ "MIT" ]
29
2019-05-23T00:28:46.000Z
2022-03-31T16:28:54.000Z
kivystudio/widgets/splitter.py
hashfx/kivystudio
dfc61922e30c1ed1c7102a36c467a9972ae82b56
[ "MIT" ]
56
2019-05-22T23:31:39.000Z
2022-02-14T05:46:22.000Z
from kivy.uix.splitter import Splitter, SplitterStrip from kivy.lang import Builder from kivy.core.window import Window from kivy.properties import BooleanProperty from kivystudio.behaviors import HoverBehavior Builder.load_string(''' #: import Factory kivy.factory.Factory <StudioSplitter>: strip_cls: Factory.St...
24.857143
77
0.639847
from kivy.uix.splitter import Splitter, SplitterStrip from kivy.lang import Builder from kivy.core.window import Window from kivy.properties import BooleanProperty from kivystudio.behaviors import HoverBehavior Builder.load_string(''' #: import Factory kivy.factory.Factory <StudioSplitter>: strip_cls: Factory.St...
true
true
f755cc091c44063b5729732e4ee8558f2be7238b
550
py
Python
server.py
KentWangYQ/server-migration
82b0eaac42db3eb697fd53b79d64bd0d39024842
[ "MIT" ]
null
null
null
server.py
KentWangYQ/server-migration
82b0eaac42db3eb697fd53b79d64bd0d39024842
[ "MIT" ]
null
null
null
server.py
KentWangYQ/server-migration
82b0eaac42db3eb697fd53b79d64bd0d39024842
[ "MIT" ]
null
null
null
import logging from socketserver import ThreadingTCPServer from config import Service as ServiceConfig from lib.tcp.server import FileHandler logger = logging.getLogger('mig') if __name__ == '__main__': serv = ThreadingTCPServer(('', ServiceConfig.PORT), FileHandler) serv.request_queue_size = 20 # 提高queue大小,...
27.5
68
0.698182
import logging from socketserver import ThreadingTCPServer from config import Service as ServiceConfig from lib.tcp.server import FileHandler logger = logging.getLogger('mig') if __name__ == '__main__': serv = ThreadingTCPServer(('', ServiceConfig.PORT), FileHandler) serv.request_queue_size = 20 try: ...
true
true
f755cc0eb0baadf7c902685e31f7e279cfae3547
2,118
py
Python
lib/nnsysident/nnsysident/utility/data_helpers.py
mohammadbashiri/bashiri-et-al-2021
c7c15ea0bf165d4d3db2ff63a04a1e78c29bf44c
[ "MIT" ]
2
2021-12-04T20:01:00.000Z
2021-12-05T19:59:02.000Z
lib/nnsysident/nnsysident/utility/data_helpers.py
mohammadbashiri/bashiri-et-al-2021
c7c15ea0bf165d4d3db2ff63a04a1e78c29bf44c
[ "MIT" ]
1
2021-12-15T20:50:04.000Z
2021-12-15T20:50:04.000Z
lib/nnsysident/nnsysident/utility/data_helpers.py
mohammadbashiri/bashiri-et-al-2021
c7c15ea0bf165d4d3db2ff63a04a1e78c29bf44c
[ "MIT" ]
1
2021-09-15T12:26:17.000Z
2021-09-15T12:26:17.000Z
import numpy as np import torch.utils.data as utils from neuralpredictors.data.samplers import RepeatsBatchSampler def get_oracle_dataloader(dat, toy_data=False, oracle_condition=None, verbose=False, file_tree=False): if toy_data: condition_hashes = dat.info.condition_hash else: dat_info = d...
40.730769
127
0.698772
import numpy as np import torch.utils.data as utils from neuralpredictors.data.samplers import RepeatsBatchSampler def get_oracle_dataloader(dat, toy_data=False, oracle_condition=None, verbose=False, file_tree=False): if toy_data: condition_hashes = dat.info.condition_hash else: dat_info = d...
true
true
f755ccb06c04ac5350b69d62f9e8d50c75399b74
471
py
Python
venv/Scripts/easy_install-3.8-script.py
edu-Fender/Robo-IQ-Option
dca272e7b79785993fbd457083723f8865918e29
[ "MIT" ]
3
2021-06-05T06:58:01.000Z
2021-11-25T23:52:18.000Z
venv/Scripts/easy_install-3.8-script.py
edu-Fender/Robo-IQ-Option
dca272e7b79785993fbd457083723f8865918e29
[ "MIT" ]
1
2021-01-01T10:36:21.000Z
2021-05-12T01:49:38.000Z
venv/Scripts/easy_install-3.8-script.py
edu-Fender/Robo-IQ-Option
dca272e7b79785993fbd457083723f8865918e29
[ "MIT" ]
2
2021-06-15T15:13:07.000Z
2021-12-08T04:16:36.000Z
#!"C:\Users\Juan Pablo\Documents\GitHub\REGEX-BOT-v1\venv\Scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.8' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'...
36.230769
87
0.690021
__requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('setuptools==40.8.0', 'console_scripts', 'easy_install-3.8')() )
true
true
f755ccef171a183fb702f607808295d28a53c2c2
7,228
py
Python
database/db.py
BimiLevi/Covid19
e4457d86f843ebb725c8a28c0146f5284f252415
[ "MIT" ]
1
2021-02-10T15:56:05.000Z
2021-02-10T15:56:05.000Z
database/db.py
BimiLevi/Covid19
e4457d86f843ebb725c8a28c0146f5284f252415
[ "MIT" ]
1
2021-01-22T18:23:27.000Z
2021-01-22T18:23:27.000Z
database/db.py
BimiLevi/Covid19
e4457d86f843ebb725c8a28c0146f5284f252415
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from glob import glob import numpy as np import psycopg2 from prettytable import PrettyTable from sqlalchemy import create_engine, MetaData import contextlib from resources.paths import * from resources.tables_func import * from utilities.files_function import calculate_time class Db: def __...
26.47619
105
0.666713
from glob import glob import numpy as np import psycopg2 from prettytable import PrettyTable from sqlalchemy import create_engine, MetaData import contextlib from resources.paths import * from resources.tables_func import * from utilities.files_function import calculate_time class Db: def __init__(self, username, ...
true
true
f755cd622088e8997f5d09c3cb1cda93fadc5438
5,527
py
Python
test/functional/p2p-versionbits-warning.py
nyc3coin/NYC3
dec4b4ce411be5becd172b539d79cca9844f2022
[ "MIT" ]
1
2019-07-28T06:48:06.000Z
2019-07-28T06:48:06.000Z
test/functional/p2p-versionbits-warning.py
nyc3coin/NYC3
dec4b4ce411be5becd172b539d79cca9844f2022
[ "MIT" ]
null
null
null
test/functional/p2p-versionbits-warning.py
nyc3coin/NYC3
dec4b4ce411be5becd172b539d79cca9844f2022
[ "MIT" ]
1
2019-06-07T22:22:41.000Z
2019-06-07T22:22:41.000Z
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Copyright (c) 2017 The Californiacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test version bits warning system. Generate chains w...
42.515385
106
0.686629
from test_framework.mininode import * from test_framework.test_framework import CaliforniacoinTestFramework from test_framework.util import * import re from test_framework.blocktools import create_block, create_coinbase VB_PERIOD = 144 VB_THRESHOLD = 108 VB_TOP_BITS = 0x20000000 VB_UNKNOWN_BIT = 27 WARN_UNKN...
true
true
f755ce052044268e75af1d4a441cc013f54b8b3c
5,593
py
Python
gcloud/google-cloud-sdk/lib/surface/secrets/update.py
bopopescu/JobSniperRails
39e7f871887176770de0f4fc6789e9ddc7f32b1f
[ "MIT" ]
null
null
null
gcloud/google-cloud-sdk/lib/surface/secrets/update.py
bopopescu/JobSniperRails
39e7f871887176770de0f4fc6789e9ddc7f32b1f
[ "MIT" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
gcloud/google-cloud-sdk/lib/surface/secrets/update.py
bopopescu/JobSniperRails
39e7f871887176770de0f4fc6789e9ddc7f32b1f
[ "MIT" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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 requir...
35.176101
80
0.726086
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.secrets import api as secrets_api from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions from googlecloudsdk.calliope import parser_e...
true
true
f755cec10bd3e911fb5e8c46bfafbedca9a3ce2d
6,206
py
Python
imba_explain/train_apis/train_classifier.py
CAMP-eXplain-AI/imba-explain
e41b4ca5de63955cb0e925aad9599f38c5a3e973
[ "MIT" ]
null
null
null
imba_explain/train_apis/train_classifier.py
CAMP-eXplain-AI/imba-explain
e41b4ca5de63955cb0e925aad9599f38c5a3e973
[ "MIT" ]
null
null
null
imba_explain/train_apis/train_classifier.py
CAMP-eXplain-AI/imba-explain
e41b4ca5de63955cb0e925aad9599f38c5a3e973
[ "MIT" ]
null
null
null
import os.path as osp from copy import deepcopy from datetime import datetime import ignite.distributed as idist import mmcv from functools import partial from ignite.contrib.handlers import ProgressBar from ignite.contrib.metrics import ROC_AUC, AveragePrecision from ignite.engine import Engine, Events from ignite.ha...
44.328571
111
0.739285
import os.path as osp from copy import deepcopy from datetime import datetime import ignite.distributed as idist import mmcv from functools import partial from ignite.contrib.handlers import ProgressBar from ignite.contrib.metrics import ROC_AUC, AveragePrecision from ignite.engine import Engine, Events from ignite.ha...
true
true
f755cf5c634ed58614e496f0c6eef395f82a332a
2,790
py
Python
tests/utilities/test_dtype_device_mixin.py
abrahambotros/pytorch-lightning
a5538af3558cf544dffd92b1b8bab3a5793f0ba0
[ "Apache-2.0" ]
1
2021-06-10T07:12:58.000Z
2021-06-10T07:12:58.000Z
tests/utilities/test_dtype_device_mixin.py
abrahambotros/pytorch-lightning
a5538af3558cf544dffd92b1b8bab3a5793f0ba0
[ "Apache-2.0" ]
null
null
null
tests/utilities/test_dtype_device_mixin.py
abrahambotros/pytorch-lightning
a5538af3558cf544dffd92b1b8bab3a5793f0ba0
[ "Apache-2.0" ]
null
null
null
import pytest import torch import torch.nn as nn from pytorch_lightning import Trainer, Callback from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin from tests.base import EvalModelTemplate class SubSubModule(DeviceDtypeModuleMixin): pass class SubModule(nn.Module): def __ini...
31
103
0.703584
import pytest import torch import torch.nn as nn from pytorch_lightning import Trainer, Callback from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin from tests.base import EvalModelTemplate class SubSubModule(DeviceDtypeModuleMixin): pass class SubModule(nn.Module): def __ini...
true
true
f755cf8615d9e9b1945cf097539a22aa44bc0fe9
19,230
py
Python
packages/vaex-core/vaex/expresso.py
lnicola/vaex
201bfa1c8d88f9e6e85dd29abadd7ba344603798
[ "MIT" ]
null
null
null
packages/vaex-core/vaex/expresso.py
lnicola/vaex
201bfa1c8d88f9e6e85dd29abadd7ba344603798
[ "MIT" ]
null
null
null
packages/vaex-core/vaex/expresso.py
lnicola/vaex
201bfa1c8d88f9e6e85dd29abadd7ba344603798
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division import logging import collections import ast import _ast import string import numpy as np import math import sys import six import copy import difflib if hasattr(_ast, 'Num'): ast_Num = _ast.Num ast_Str = _ast.Str else: # Python3.8 ast_Num = _ast.Co...
33.560209
106
0.596828
from __future__ import division import logging import collections import ast import _ast import string import numpy as np import math import sys import six import copy import difflib if hasattr(_ast, 'Num'): ast_Num = _ast.Num ast_Str = _ast.Str else: ast_Num = _ast.Constant ast_Str = _ast.Constant...
true
true
f755cfa684d7030e3a5feda89a4afbe256f8648d
34,023
py
Python
PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
GonzalezFJR/cmssw
8f453e1b07c4a6d79b9e52190f6f68ec89959c03
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
GonzalezFJR/cmssw
8f453e1b07c4a6d79b9e52190f6f68ec89959c03
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
GonzalezFJR/cmssw
8f453e1b07c4a6d79b9e52190f6f68ec89959c03
[ "Apache-2.0" ]
1
2015-05-08T02:08:04.000Z
2015-05-08T02:08:04.000Z
import FWCore.ParameterSet.Config as cms from PhysicsTools.SelectorUtils.tools.vid_id_tools import * from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask def miniAOD_customizeCommon(process): process.patMuons.isoDeposits = cms.PSet() process.patElectrons.isoDeposits = cms...
58.761658
402
0.729095
import FWCore.ParameterSet.Config as cms from PhysicsTools.SelectorUtils.tools.vid_id_tools import * from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask def miniAOD_customizeCommon(process): process.patMuons.isoDeposits = cms.PSet() process.patElectrons.isoDeposits = cms...
true
true
f755cfbb1de0a8bc4a68046913c13314e06d2253
982
py
Python
games/migrations/0002_gamevideo.py
RevolutionTech/revolutiontech.ca
a3f0f1526812554938674c4fc9e7ea90ed4ffe6d
[ "0BSD" ]
null
null
null
games/migrations/0002_gamevideo.py
RevolutionTech/revolutiontech.ca
a3f0f1526812554938674c4fc9e7ea90ed4ffe6d
[ "0BSD" ]
171
2017-11-02T05:39:37.000Z
2022-03-07T01:13:53.000Z
games/migrations/0002_gamevideo.py
RevolutionTech/revolutiontech.ca
a3f0f1526812554938674c4fc9e7ea90ed4ffe6d
[ "0BSD" ]
1
2018-01-13T08:11:26.000Z
2018-01-13T08:11:26.000Z
import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("games", "0001_initial")] operations = [ migrations.CreateModel( name="GameVideo", fields=[ ( "id", ...
28.882353
84
0.42668
import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("games", "0001_initial")] operations = [ migrations.CreateModel( name="GameVideo", fields=[ ( "id", ...
true
true
f755cfbd4332b0b70a944c6074e886401d0a5a64
1,231
py
Python
2021/06/py/run.py
Bigsby/aoc
409fefbb0467628fa298288064acb622bb53ee58
[ "CC0-1.0" ]
1
2021-06-11T17:24:05.000Z
2021-06-11T17:24:05.000Z
2021/06/py/run.py
Bigsby/aoc
409fefbb0467628fa298288064acb622bb53ee58
[ "CC0-1.0" ]
null
null
null
2021/06/py/run.py
Bigsby/aoc
409fefbb0467628fa298288064acb622bb53ee58
[ "CC0-1.0" ]
null
null
null
#! /usr/bin/python3 import sys, os, time from typing import Tuple, List def runGenerations(fishes: List[int], generations: int) -> int: fishCounts = [ 0 ] * 9 for fish in fishes: fishCounts[fish] += 1 for _ in range(generations): fishesAtZero = fishCounts[0] for day in range(8): ...
26.191489
80
0.636068
import sys, os, time from typing import Tuple, List def runGenerations(fishes: List[int], generations: int) -> int: fishCounts = [ 0 ] * 9 for fish in fishes: fishCounts[fish] += 1 for _ in range(generations): fishesAtZero = fishCounts[0] for day in range(8): fishCoun...
true
true
f755d07a1835820fe819345137996529e03c4a29
479
py
Python
glouton/infrastructure/satnogDbClient.py
DL4PD/glouton-satnogs-data-downloader
6f7823f49ab9508fd0221b5a16570886772e32e8
[ "MIT" ]
null
null
null
glouton/infrastructure/satnogDbClient.py
DL4PD/glouton-satnogs-data-downloader
6f7823f49ab9508fd0221b5a16570886772e32e8
[ "MIT" ]
null
null
null
glouton/infrastructure/satnogDbClient.py
DL4PD/glouton-satnogs-data-downloader
6f7823f49ab9508fd0221b5a16570886772e32e8
[ "MIT" ]
null
null
null
from glouton.infrastructure.satnogClient import SatnogClient import os import requests class SatnogDbClient(SatnogClient): def __init__(self): SatnogClient.__init__(self) self._url = self.config['DEFAULT']['DB_API_URL'] def get(self, url, params=None): return requests.get(url, params=...
31.933333
81
0.722338
from glouton.infrastructure.satnogClient import SatnogClient import os import requests class SatnogDbClient(SatnogClient): def __init__(self): SatnogClient.__init__(self) self._url = self.config['DEFAULT']['DB_API_URL'] def get(self, url, params=None): return requests.get(url, params=...
true
true
f755d0e5307e581b7d13c440113d2eb049f67665
3,212
py
Python
puzzle9/part_two.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
puzzle9/part_two.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
puzzle9/part_two.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
from functools import reduce FILENAME = './puzzle9/data/input' height_points = [] with open(FILENAME) as file: for line in file: height_points.append([int(x) for x in list(line.strip())]) def generate_zero(): zero_list = [] for i in range(0, len(height_points)): zero_list.ap...
37.348837
131
0.486613
from functools import reduce FILENAME = './puzzle9/data/input' height_points = [] with open(FILENAME) as file: for line in file: height_points.append([int(x) for x in list(line.strip())]) def generate_zero(): zero_list = [] for i in range(0, len(height_points)): zero_list.ap...
true
true
f755d17cdfb805f3abf6cd48c765ed11bfec7b4d
832
py
Python
catalogo/views/producto_view.py
davquipe/farm-server
e7c8f9a56c79def45d1f620ea58d64978822c94a
[ "MIT" ]
null
null
null
catalogo/views/producto_view.py
davquipe/farm-server
e7c8f9a56c79def45d1f620ea58d64978822c94a
[ "MIT" ]
1
2020-06-05T17:42:59.000Z
2020-06-05T17:42:59.000Z
catalogo/views/producto_view.py
davquipe/farm-server
e7c8f9a56c79def45d1f620ea58d64978822c94a
[ "MIT" ]
null
null
null
from ..models.producto import Producto from rest_framework import serializers, viewsets from rest_framework import permissions from django.db.models import Q from operator import __or__ as OR from functools import reduce class ProductoSerializer(serializers.ModelSerializer): class Meta: model = Producto ...
29.714286
61
0.705529
from ..models.producto import Producto from rest_framework import serializers, viewsets from rest_framework import permissions from django.db.models import Q from operator import __or__ as OR from functools import reduce class ProductoSerializer(serializers.ModelSerializer): class Meta: model = Producto ...
true
true
f755d26bfc8999495d048cebcf1ec1de33858eb5
1,687
py
Python
adapters/generic/siren.py
russdan/domoticz-zigbee2mqtt-plugin
d47895eab44bc87fc19ce151698d2afe9554fadc
[ "MIT" ]
146
2018-09-19T11:38:48.000Z
2022-03-21T11:54:12.000Z
adapters/generic/siren.py
russdan/domoticz-zigbee2mqtt-plugin
d47895eab44bc87fc19ce151698d2afe9554fadc
[ "MIT" ]
783
2018-09-28T17:07:14.000Z
2022-03-31T10:18:27.000Z
adapters/generic/siren.py
russdan/domoticz-zigbee2mqtt-plugin
d47895eab44bc87fc19ce151698d2afe9554fadc
[ "MIT" ]
147
2018-09-25T18:39:51.000Z
2022-03-01T19:31:27.000Z
import json from adapters.base_adapter import Adapter from adapters.adapter_with_battery import AdapterWithBattery from devices.switch.on_off_switch import OnOffSwitch # TODO: Think how to reuse the code between classes class SirenAdapter(Adapter): def __init__(self): super().__init__() self.switch...
33.078431
70
0.583284
import json from adapters.base_adapter import Adapter from adapters.adapter_with_battery import AdapterWithBattery from devices.switch.on_off_switch import OnOffSwitch class SirenAdapter(Adapter): def __init__(self): super().__init__() self.switch = OnOffSwitch('switch', 'state') self.swit...
true
true
f755d29d385b8bca5db118a00fdb29c81e905d7a
8,761
py
Python
v0.5/training/anomaly_detection/eval_functions_eembc.py
charlesmackin/tiny
bf8afc5cfc15e12efdd3bca0d559adfdfc435981
[ "Apache-2.0" ]
null
null
null
v0.5/training/anomaly_detection/eval_functions_eembc.py
charlesmackin/tiny
bf8afc5cfc15e12efdd3bca0d559adfdfc435981
[ "Apache-2.0" ]
null
null
null
v0.5/training/anomaly_detection/eval_functions_eembc.py
charlesmackin/tiny
bf8afc5cfc15e12efdd3bca0d559adfdfc435981
[ "Apache-2.0" ]
null
null
null
''' MLCommons group: TinyMLPerf (https://github.com/mlcommons/tiny) image classification on cifar10 eval_functions_eembc.py: performances evaluation functions from eembc refs: https://github.com/SiliconLabs/platform_ml_models/blob/master/eembc/Methodology/eval_functions_eembc.py ''' import numpy as np import matplo...
36.810924
115
0.658829
import numpy as np import matplotlib.pyplot as plt import matplotlib matplotlib.use('Qt5Agg') def calculate_accuracy(y_pred, labels): y_pred_label = np.argmax(y_pred, axis=1) correct = np.sum(labels == y_pred_label) accuracy = 100 * correct / len(y_pred) print(f"Overall accuracy = {accuracy:2.1f}"...
true
true
f755d32358cac4bac122ece3befa1c7f15bde7e2
6,525
py
Python
ansys/dpf/core/operators/mesh/split_fields.py
TheGoldfish01/pydpf-core
75ca8a180454f94cedafbc68c1d6f20dcfc4c795
[ "MIT" ]
11
2021-01-31T15:50:02.000Z
2021-10-01T23:15:38.000Z
ansys/dpf/core/operators/mesh/split_fields.py
TheGoldfish01/pydpf-core
75ca8a180454f94cedafbc68c1d6f20dcfc4c795
[ "MIT" ]
46
2021-01-14T05:00:50.000Z
2021-10-06T18:30:37.000Z
ansys/dpf/core/operators/mesh/split_fields.py
TheGoldfish01/pydpf-core
75ca8a180454f94cedafbc68c1d6f20dcfc4c795
[ "MIT" ]
3
2021-06-30T07:18:30.000Z
2021-09-15T08:43:11.000Z
""" split_fields ============ """ from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type from ansys.dpf.core.operators.specification import PinSpecification, Specification """Operators from...
35.27027
209
0.649349
from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type from ansys.dpf.core.operators.specification import PinSpecification, Specification class split_fields(Operator): def __init__(sel...
true
true
f755d38d550320b4dd56c8a559652f20f5dff0f7
5,117
py
Python
utils/probabilistc_model.py
adrianjav/lipschitz-standardization
d97b9c069802ef15ff747583b42b94c0bc3e2940
[ "MIT" ]
3
2020-08-27T00:24:12.000Z
2021-08-06T08:50:38.000Z
utils/probabilistc_model.py
adrianjav/lipschitz-standardization
d97b9c069802ef15ff747583b42b94c0bc3e2940
[ "MIT" ]
null
null
null
utils/probabilistc_model.py
adrianjav/lipschitz-standardization
d97b9c069802ef15ff747583b42b94c0bc3e2940
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import List from functools import reduce import torch from utils.distributions import get_distribution_by_name, Base def _get_distributions(dists_names) -> List[Base]: dists = [] for i, name in enumerate(dists_names): is_gammatrick = name[-1] == '*' ...
31.58642
120
0.541919
from __future__ import annotations from typing import List from functools import reduce import torch from utils.distributions import get_distribution_by_name, Base def _get_distributions(dists_names) -> List[Base]: dists = [] for i, name in enumerate(dists_names): is_gammatrick = name[-1] == '*' ...
true
true
f755d3d05ae449e47bce1ac57a7fd5ab21a48958
1,660
py
Python
elegy/metrics/metric_modes.py
srcolinas/elegy
f147f59572891519ab5de4357f972f56496573fb
[ "Apache-2.0" ]
null
null
null
elegy/metrics/metric_modes.py
srcolinas/elegy
f147f59572891519ab5de4357f972f56496573fb
[ "Apache-2.0" ]
null
null
null
elegy/metrics/metric_modes.py
srcolinas/elegy
f147f59572891519ab5de4357f972f56496573fb
[ "Apache-2.0" ]
null
null
null
from typing import Tuple from elegy.metrics.metric import Metric import typing as tp import haiku as hk from elegy import utils import jax def forward_all(metrics_fn): def _metrics_fn(**kwargs): if isinstance(metrics_fn, (tp.List, tp.Tuple, tp.Dict)): metrics = jax.tree_multimap(lambda f: f(...
26.349206
84
0.612048
from typing import Tuple from elegy.metrics.metric import Metric import typing as tp import haiku as hk from elegy import utils import jax def forward_all(metrics_fn): def _metrics_fn(**kwargs): if isinstance(metrics_fn, (tp.List, tp.Tuple, tp.Dict)): metrics = jax.tree_multimap(lambda f: f(...
true
true
f755d4e6a2a2abc3b4dbd52109768060abf399ca
2,818
py
Python
karbor/services/protection/clients/cinder.py
Hybrid-Cloud/hybrid-smaug
a50b4fefb1677134aa8206724342fdff6e3b058b
[ "Apache-2.0" ]
1
2021-05-23T01:48:25.000Z
2021-05-23T01:48:25.000Z
karbor/services/protection/clients/cinder.py
Hybrid-Cloud/hybrid-smaug
a50b4fefb1677134aa8206724342fdff6e3b058b
[ "Apache-2.0" ]
null
null
null
karbor/services/protection/clients/cinder.py
Hybrid-Cloud/hybrid-smaug
a50b4fefb1677134aa8206724342fdff6e3b058b
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
39.138889
78
0.684173
from cinderclient import client as cc from oslo_config import cfg from oslo_log import log as logging from karbor.common import config from karbor.services.protection.clients import utils LOG = logging.getLogger(__name__) SERVICE = "cinder" cinder_client_opts = [ cfg.StrOpt(SERVICE + '_endpoint', ...
true
true
f755d580df9416a254c87c6d551f3f9f5004fca6
14,014
py
Python
stitches/make_tas_archive.py
JGCRI/stitches
a55e5801279bd153bb7bcc247422e29eecbbc209
[ "BSD-2-Clause" ]
null
null
null
stitches/make_tas_archive.py
JGCRI/stitches
a55e5801279bd153bb7bcc247422e29eecbbc209
[ "BSD-2-Clause" ]
37
2021-01-26T21:31:06.000Z
2022-03-31T15:26:36.000Z
stitches/make_tas_archive.py
JGCRI/stitches
a55e5801279bd153bb7bcc247422e29eecbbc209
[ "BSD-2-Clause" ]
null
null
null
# Define the functions used to get Get the weighted global mean temperature # from pangeo CMIP6 results. # Import packages import stitches.fx_pangeo as pangeo import stitches.fx_data as data import stitches.fx_util as util import os import pkg_resources import pandas as pd def get_global_tas(path): """ Calcu...
44.348101
173
0.652205
import stitches.fx_pangeo as pangeo import stitches.fx_data as data import stitches.fx_util as util import os import pkg_resources import pandas as pd def get_global_tas(path): temp_dir = pkg_resources.resource_filename('stitches', 'data/temp-data') if os.path.isdir(temp_dir) == False: ...
true
true
f755d6027ceb0c9d83942f2e17e7d7161da44677
873
py
Python
ShopkeeperUI/models.py
imsubhams/ProdCheck
bc85b273b465c758799a5956bb066feeb993b23f
[ "MIT" ]
null
null
null
ShopkeeperUI/models.py
imsubhams/ProdCheck
bc85b273b465c758799a5956bb066feeb993b23f
[ "MIT" ]
3
2019-10-06T11:45:58.000Z
2019-10-14T07:41:03.000Z
ShopkeeperUI/models.py
imsubhams/ProdCheck
bc85b273b465c758799a5956bb066feeb993b23f
[ "MIT" ]
6
2019-10-06T12:19:06.000Z
2019-10-08T13:02:49.000Z
from django.db import models from accounts.models import Profile from django.contrib.auth.models import User class Shop(models.Model): name = models.CharField(max_length=100) desc = models.TextField() address = models.CharField(max_length=100) admin = models.ForeignKey( Profile, ...
29.1
68
0.670103
from django.db import models from accounts.models import Profile from django.contrib.auth.models import User class Shop(models.Model): name = models.CharField(max_length=100) desc = models.TextField() address = models.CharField(max_length=100) admin = models.ForeignKey( Profile, ...
true
true
f755d639e67c38b7d8f44da2d957f8a4cdd8cee6
4,199
py
Python
myvenv/lib/python3.7/site-packages/chartjs/views/columns.py
lasher85/AirCheck
52b2f78c7d797999df4952b1bcac9f7d2c12b42c
[ "MIT" ]
2
2019-08-04T09:56:43.000Z
2019-08-05T03:49:05.000Z
chartjs/views/columns.py
rajuvitto/django-chartjs
ea1c5a58fe70300b3726cb43f98d9c227033f419
[ "BSD-3-Clause" ]
8
2019-12-04T23:44:11.000Z
2022-02-10T08:31:40.000Z
chartjs/views/columns.py
rajuvitto/django-chartjs
ea1c5a58fe70300b3726cb43f98d9c227033f419
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Tools to build Columns HighCharts parameters.""" from .base import JSONView class BaseColumnsHighChartsView(JSONView): """Base Class to generate Column HighCharts configuration. Define at least title, yUnit, providers, get_labels() and get_data() to get started. """ pro...
32.804688
83
0.519648
from .base import JSONView class BaseColumnsHighChartsView(JSONView): providers = {} credits = {'enabled': True} def get_context_data(self, **kwargs): context = super(BaseColumnsHighChartsView, self).get_context_data(**kwargs) context.update({ 'chart': self.get_type(), ...
true
true
f755d6cf9870384b3e1433bc3fc33f5832136543
164
py
Python
src/__init__.py
manishkumaruike17/Last
caf226eb7dd7116d7097d09f23bc04f22228a2d2
[ "MIT" ]
null
null
null
src/__init__.py
manishkumaruike17/Last
caf226eb7dd7116d7097d09f23bc04f22228a2d2
[ "MIT" ]
null
null
null
src/__init__.py
manishkumaruike17/Last
caf226eb7dd7116d7097d09f23bc04f22228a2d2
[ "MIT" ]
null
null
null
import asyncio import sys if sys.platform == "win32" and sys.version_info >= (3, 8, 0): asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
32.8
75
0.768293
import asyncio import sys if sys.platform == "win32" and sys.version_info >= (3, 8, 0): asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
true
true
f755d7223c2f427a7adad212af6fc2cb5223d0a8
1,766
py
Python
neighboor/tests.py
RhonaJoyKe/Neighbourhood
6efd1095533f40192fcc9e3e67ac532fdc358405
[ "Unlicense" ]
null
null
null
neighboor/tests.py
RhonaJoyKe/Neighbourhood
6efd1095533f40192fcc9e3e67ac532fdc358405
[ "Unlicense" ]
null
null
null
neighboor/tests.py
RhonaJoyKe/Neighbourhood
6efd1095533f40192fcc9e3e67ac532fdc358405
[ "Unlicense" ]
null
null
null
from django.test import TestCase from .models import Post, Profile, Location, NeighbourHood, Business from django.contrib.auth.models import User # Neighbourhood Model Tests class NeighbourhoodTestClass(TestCase): def setUp(self): # create a location instance self.location = Location(name='Test L...
33.320755
107
0.682899
from django.test import TestCase from .models import Post, Profile, Location, NeighbourHood, Business from django.contrib.auth.models import User class NeighbourhoodTestClass(TestCase): def setUp(self): self.location = Location(name='Test Location') self.location.save_location() ...
true
true
f755d7498dcff34b749f69d8c55a396f45665998
1,890
py
Python
valohai_cli/commands/execution/summarize.py
JohnCHarrington/valohai-cli
8703538d43331b97f5dd8339047a6b84b97aed79
[ "MIT" ]
null
null
null
valohai_cli/commands/execution/summarize.py
JohnCHarrington/valohai-cli
8703538d43331b97f5dd8339047a6b84b97aed79
[ "MIT" ]
null
null
null
valohai_cli/commands/execution/summarize.py
JohnCHarrington/valohai-cli
8703538d43331b97f5dd8339047a6b84b97aed79
[ "MIT" ]
null
null
null
from typing import List, Dict, Sequence import click from valohai_cli.ctx import get_project from valohai_cli.models.project import Project from valohai_cli.range import IntegerRange from valohai_cli.table import print_table from valohai_cli.utils import subset_keys def download_execution_data(project: Project, cou...
37.8
112
0.691005
from typing import List, Dict, Sequence import click from valohai_cli.ctx import get_project from valohai_cli.models.project import Project from valohai_cli.range import IntegerRange from valohai_cli.table import print_table from valohai_cli.utils import subset_keys def download_execution_data(project: Project, cou...
true
true
f755d78df6d90fafe042848044086e2c17b3c671
111
py
Python
bucketlist/bucketlist/__init__.py
ChrisGibson1982/bucketlist
6237e3b7f7b62c4f143cb7600a2afa80cb86bb1c
[ "MIT" ]
null
null
null
bucketlist/bucketlist/__init__.py
ChrisGibson1982/bucketlist
6237e3b7f7b62c4f143cb7600a2afa80cb86bb1c
[ "MIT" ]
null
null
null
bucketlist/bucketlist/__init__.py
ChrisGibson1982/bucketlist
6237e3b7f7b62c4f143cb7600a2afa80cb86bb1c
[ "MIT" ]
null
null
null
""" The flask application package. """ from flask import Flask app = Flask(__name__) import bucketlist.views
12.333333
30
0.747748
from flask import Flask app = Flask(__name__) import bucketlist.views
true
true
f755d8f557bce181dcc25b08c4c6481b8045c090
1,649
py
Python
meshed/makers.py
i2mint/meshed
4201f9efcce4f2859ffc8253811ac9335f21856b
[ "MIT" ]
3
2021-06-30T08:40:50.000Z
2022-01-19T13:13:33.000Z
meshed/makers.py
i2mint/meshed
4201f9efcce4f2859ffc8253811ac9335f21856b
[ "MIT" ]
18
2020-10-15T19:58:42.000Z
2022-03-28T19:06:37.000Z
meshed/makers.py
i2mint/meshed
4201f9efcce4f2859ffc8253811ac9335f21856b
[ "MIT" ]
1
2021-09-14T19:24:36.000Z
2021-09-14T19:24:36.000Z
"""Makers""" from contextlib import suppress from typing import Mapping, Iterable, TypeVar, Callable from itertools import product from collections import defaultdict T = TypeVar('T') with suppress(ModuleNotFoundError, ImportError): from numpy.random import randint, choice def random_graph(n_nodes=7): ...
32.98
110
0.570649
from contextlib import suppress from typing import Mapping, Iterable, TypeVar, Callable from itertools import product from collections import defaultdict T = TypeVar('T') with suppress(ModuleNotFoundError, ImportError): from numpy.random import randint, choice def random_graph(n_nodes=7): nodes = r...
true
true
f755d99e7b0d85450c836fd1445e574d77964d41
12,517
py
Python
eodatasets3/prepare/sentinel_l1c_prepare.py
joestasks/eo-datasets
6df2fffb5a773a8c65980a8c75d22fd5bb937edc
[ "Apache-2.0" ]
null
null
null
eodatasets3/prepare/sentinel_l1c_prepare.py
joestasks/eo-datasets
6df2fffb5a773a8c65980a8c75d22fd5bb937edc
[ "Apache-2.0" ]
null
null
null
eodatasets3/prepare/sentinel_l1c_prepare.py
joestasks/eo-datasets
6df2fffb5a773a8c65980a8c75d22fd5bb937edc
[ "Apache-2.0" ]
1
2021-05-21T03:05:54.000Z
2021-05-21T03:05:54.000Z
""" Prepare eo3 metadata for Sentinel-2 Level 1C data produced by Sinergise or esa. Takes ESA zipped datasets or Sinergise dataset directories """ import fnmatch import json import logging import sys import uuid import zipfile from pathlib import Path from typing import Tuple, Dict, List, Optional, Iterable, Mapping ...
32.681462
109
0.627467
import fnmatch import json import logging import sys import uuid import zipfile from pathlib import Path from typing import Tuple, Dict, List, Optional, Iterable, Mapping import click from defusedxml import minidom from eodatasets3 import DatasetAssembler from eodatasets3.ui import PathPath S2_UUID_NAMESPACE = uuid...
true
true
f755db8986a5244e6c7fe5a92c61b880e91ff8cd
17,940
py
Python
userbot/plugins/gdrivenew.py
azizkziba/FridayUserbot
f77a692f74d1c2da2b6e7ee47f5eee7a9dd9e138
[ "MIT" ]
36
2020-08-26T15:58:06.000Z
2022-01-15T13:37:21.000Z
userbot/plugins/gdrivenew.py
azizkziba/FridayUserbot
f77a692f74d1c2da2b6e7ee47f5eee7a9dd9e138
[ "MIT" ]
4
2020-11-07T07:39:51.000Z
2020-11-10T03:46:41.000Z
userbot/plugins/gdrivenew.py
azizkziba/FridayUserbot
f77a692f74d1c2da2b6e7ee47f5eee7a9dd9e138
[ "MIT" ]
129
2020-06-17T00:56:36.000Z
2022-03-22T10:39:57.000Z
"""Upload local Files to gDrive Syntax: .gdrive .sdrive .gdir .dfolder .drive delete | get .gclear """ # The entire code given below is verbatim copied from # https://github.com/cyberboysumanjay/Gdrivedownloader/blob/master/gdrive_upload.py # there might be some changes made to suit the needs for this repository # Lic...
41.336406
136
0.660647
import asyncio import json import math import os import time from datetime import datetime from telethon import events from userbot.utils import admin_cmd, progress, humanbytes from mimetypes import guess_type from apiclient.discovery import build from apiclient.http import MediaFileUpload from apiclient.errors ...
true
true
f755dba2325718fb1b96fb8f9dba5ad88b66838f
2,550
py
Python
sparseconvnet/denseToSparse.py
dmitryvinn/SparseConvNet
0bf2476b08e688fa53abf956e4e5232793dea64c
[ "BSD-3-Clause" ]
null
null
null
sparseconvnet/denseToSparse.py
dmitryvinn/SparseConvNet
0bf2476b08e688fa53abf956e4e5232793dea64c
[ "BSD-3-Clause" ]
null
null
null
sparseconvnet/denseToSparse.py
dmitryvinn/SparseConvNet
0bf2476b08e688fa53abf956e4e5232793dea64c
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from torch.autograd import Function from torch.nn import Module from .utils import * from .metadata import Metadata from .s...
33.116883
82
0.621961
from torch.autograd import Function from torch.nn import Module from .utils import * from .metadata import Metadata from .sparseConvNetTensor import SparseConvNetTensor class DenseToSparse(Module): def __init__(self, dimension): Module.__init__(self) self.dimension = dimension def forwar...
true
true
f755dc8117d29b201dbbbc475063d7d6d2e4b24b
152
py
Python
micropython-1.5/tests/basics/int_big_xor.py
jaafarbarek/pyrtos
f21b3e7dffe33683981ab8c12ab9774dc3164d2e
[ "MIT" ]
303
2015-07-11T17:12:55.000Z
2018-01-08T03:02:37.000Z
python/micropython/tests/basics/int_big_xor.py
r-lyeh/script-it
cd7b259ccbd14d05c8d8fec1a33af9de5337e60c
[ "Unlicense" ]
13
2016-05-12T16:51:22.000Z
2018-01-10T22:33:25.000Z
python/micropython/tests/basics/int_big_xor.py
r-lyeh/script-it
cd7b259ccbd14d05c8d8fec1a33af9de5337e60c
[ "Unlicense" ]
26
2018-01-18T09:15:33.000Z
2022-02-07T13:09:14.000Z
print(0 ^ (1 << 80)) print((1 << 80) ^ (1 << 80)) print((1 << 80) ^ 0) a = 0xfffffffffffffffffffffffffffff print(a ^ (1 << 100)) print(a ^ (1 << 200))
19
35
0.532895
print(0 ^ (1 << 80)) print((1 << 80) ^ (1 << 80)) print((1 << 80) ^ 0) a = 0xfffffffffffffffffffffffffffff print(a ^ (1 << 100)) print(a ^ (1 << 200))
true
true
f755dc9dfff01284ce4d6d25287bfb7f8d562607
1,327
py
Python
EvalTFLiteModel.py
amitmate/visualwakeword
24412fc830b6f579156bb1106eeffa68e90b02d4
[ "MIT" ]
1
2020-04-22T06:40:54.000Z
2020-04-22T06:40:54.000Z
EvalTFLiteModel.py
amitmate/visualwakeword
24412fc830b6f579156bb1106eeffa68e90b02d4
[ "MIT" ]
null
null
null
EvalTFLiteModel.py
amitmate/visualwakeword
24412fc830b6f579156bb1106eeffa68e90b02d4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[ ]: import numpy as np import tensorflow as tf tf.enable_eager_execution() def eval_model(interpreter, coco_ds): total_seen = 0 num_correct = 0 for img, label in coco_ds: total_seen += 1 interpreter.set_tensor(input_index, img) interpr...
28.847826
104
0.677468
import numpy as np import tensorflow as tf tf.enable_eager_execution() def eval_model(interpreter, coco_ds): total_seen = 0 num_correct = 0 for img, label in coco_ds: total_seen += 1 interpreter.set_tensor(input_index, img) interpreter.invoke() predictions = interpreter.ge...
true
true
f755dd7cbaa192ba005ecc5bcf3a803436fe5e71
423
py
Python
catalog/migrations/0005_auto_20210122_2307.py
Timash538/django_local_library
dddd3589ac17815b836cfb1e544633835aef1e5a
[ "Apache-2.0" ]
null
null
null
catalog/migrations/0005_auto_20210122_2307.py
Timash538/django_local_library
dddd3589ac17815b836cfb1e544633835aef1e5a
[ "Apache-2.0" ]
null
null
null
catalog/migrations/0005_auto_20210122_2307.py
Timash538/django_local_library
dddd3589ac17815b836cfb1e544633835aef1e5a
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.5 on 2021-01-22 18:07 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('catalog', '0004_bookinstance_borrower'), ] operations = [ migrations.AlterModelOptions( name='bookinstance', options={'order...
23.5
112
0.617021
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('catalog', '0004_bookinstance_borrower'), ] operations = [ migrations.AlterModelOptions( name='bookinstance', options={'ordering': ['due_back'], 'permissions': (('can_mark_...
true
true
f755ddaeb90f4884330e9d3ea670c1170df6169e
1,148
py
Python
nipype/interfaces/afni/tests/test_auto_ZCutUp.py
grlee77/nipype
73f3a733ac1b7d9b09ec32a387905a9302423b87
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/afni/tests/test_auto_ZCutUp.py
grlee77/nipype
73f3a733ac1b7d9b09ec32a387905a9302423b87
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/afni/tests/test_auto_ZCutUp.py
grlee77/nipype
73f3a733ac1b7d9b09ec32a387905a9302423b87
[ "BSD-3-Clause" ]
null
null
null
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.afni.preprocess import ZCutUp def test_ZCutUp_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True...
26.090909
78
0.650697
from nipype.testing import assert_equal from nipype.interfaces.afni.preprocess import ZCutUp def test_ZCutUp_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True, ), in_file=dict(argstr...
true
true
f755ddbadb2c0e74df39112b038d06c167286066
3,830
py
Python
assets/commands/check.py
goddenrich/concourse-phabricator-pr
4ea3c5efd6743ef6f04c6488342eb0903a595e3a
[ "Apache-2.0" ]
2
2019-02-20T14:14:18.000Z
2019-07-23T23:33:06.000Z
assets/commands/check.py
goddenrich/concourse-phabricator-pr
4ea3c5efd6743ef6f04c6488342eb0903a595e3a
[ "Apache-2.0" ]
null
null
null
assets/commands/check.py
goddenrich/concourse-phabricator-pr
4ea3c5efd6743ef6f04c6488342eb0903a595e3a
[ "Apache-2.0" ]
null
null
null
from phabricator import Phabricator import sys import json def get_value_from_payload(value, payload, field): if payload: try: return payload[field][value] if payload[field] else None except KeyError: raise KeyError(f'{value} not found') def get_token(payload): return g...
36.132075
131
0.72611
from phabricator import Phabricator import sys import json def get_value_from_payload(value, payload, field): if payload: try: return payload[field][value] if payload[field] else None except KeyError: raise KeyError(f'{value} not found') def get_token(payload): return g...
true
true
f755debb54900c2a9c335e390194e853ab6997a1
4,353
py
Python
examples/toydsl/toy.py
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
161
2020-05-31T03:29:42.000Z
2022-03-07T08:36:19.000Z
examples/toydsl/toy.py
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
74
2020-05-26T18:05:48.000Z
2021-02-13T21:55:39.000Z
examples/toydsl/toy.py
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
19
2020-05-27T19:22:11.000Z
2022-02-17T18:53:52.000Z
import logging import struct from textx.metamodel import metamodel_from_file from ppci import ir from ppci.irutils import verify_module from ppci import api def pack_string(txt): ln = struct.pack('<Q', len(txt)) return ln + txt.encode('ascii') class TcfCompiler: """ Compiler for the Tcf language """ ...
33.229008
83
0.624627
import logging import struct from textx.metamodel import metamodel_from_file from ppci import ir from ppci.irutils import verify_module from ppci import api def pack_string(txt): ln = struct.pack('<Q', len(txt)) return ln + txt.encode('ascii') class TcfCompiler: logger = logging.getLogger('tcfcompiler')...
true
true
f755defb98be2d976d06e7013e7f6e6c453f4f7d
2,837
py
Python
hb_quant/huobi/connection/impl/websocket_watchdog.py
wenli135/Binance-volatility-trading-bot
75a03ad61df0e95492128fb6f1f419d4dc256ab3
[ "MIT" ]
611
2019-07-10T08:17:50.000Z
2022-03-21T18:56:39.000Z
hb_quant/huobi/connection/impl/websocket_watchdog.py
wenli135/Binance-volatility-trading-bot
75a03ad61df0e95492128fb6f1f419d4dc256ab3
[ "MIT" ]
105
2019-07-12T03:43:41.000Z
2022-03-30T10:33:06.000Z
hb_quant/huobi/connection/impl/websocket_watchdog.py
wenli135/Binance-volatility-trading-bot
75a03ad61df0e95492128fb6f1f419d4dc256ab3
[ "MIT" ]
325
2019-07-12T02:46:54.000Z
2022-03-21T18:56:41.000Z
import threading import logging from apscheduler.schedulers.blocking import BlockingScheduler from huobi.connection.impl.private_def import * from huobi.utils.time_service import get_current_timestamp def watch_dog_job(*args): watch_dog_obj = args[0] for idx, websocket_manage in enumerate(watch_dog_obj.webs...
41.720588
138
0.719422
import threading import logging from apscheduler.schedulers.blocking import BlockingScheduler from huobi.connection.impl.private_def import * from huobi.utils.time_service import get_current_timestamp def watch_dog_job(*args): watch_dog_obj = args[0] for idx, websocket_manage in enumerate(watch_dog_obj.webs...
true
true
f755df307b132c1c7d4432680a6c91ee3cc1f310
138,645
py
Python
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py
AnshulBhl/azure-cli
24f7efbe23a9c874ae06e4bfda216d9aa6cbf3a3
[ "MIT" ]
1
2021-08-23T19:53:54.000Z
2021-08-23T19:53:54.000Z
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py
amisi01/azure-cli
49206c5b12312985b417f557857fa409bf8aed2e
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py
amisi01/azure-cli
49206c5b12312985b417f557857fa409bf8aed2e
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
55.792757
285
0.636395
import os import time import uuid import unittest from azure.cli.testsdk import ( ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer, KeyVaultPreparer, live_only, record_only) from azure.cli.core.util import parse_proxy_resource_id, CLIError from azure.cli.command_modules.rdbms.tests.latest.test_rdb...
true
true
f755e0d64d4823c51d2d331431fe6570f4e8e284
2,866
py
Python
layer/gcn.py
yahu911/DMGCN2.0
a0370dbbdaa756330dc6ff18b58e6f7fa44b3513
[ "MIT" ]
1
2021-08-05T09:46:44.000Z
2021-08-05T09:46:44.000Z
layer/gcn.py
yahu911/DMGCN2.0
a0370dbbdaa756330dc6ff18b58e6f7fa44b3513
[ "MIT" ]
null
null
null
layer/gcn.py
yahu911/DMGCN2.0
a0370dbbdaa756330dc6ff18b58e6f7fa44b3513
[ "MIT" ]
1
2022-02-15T00:57:35.000Z
2022-02-15T00:57:35.000Z
# -*- coding: utf-8 -*- """ Created on Wed Oct 16 Keras Implementation of Deep Multiple Graph Convolution Neural Network (DMGCN) model in: Hu Yang, Wei Pan, Zhong Zhuang. @author: Hu Yang (hu.yang@cufe.edu.cn) """ from keras.layers import Layer from keras import activations, initializers, constraints from ke...
41.536232
89
0.585834
from keras.layers import Layer from keras import activations, initializers, constraints from keras import regularizers import keras.backend as K import tensorflow as tf class GCN(Layer): def __init__(self, output_dim, graphs, activation=None, use_bias=True, ...
true
true
f755e155a87908b7ffbf172a180452bc43f1c3cb
1,586
py
Python
main.py
davemlz/ee-spectral-indices-list
fd1638fbc0ddebad3c7c77e9602ae1902f24bea3
[ "MIT" ]
46
2021-04-09T00:31:33.000Z
2021-09-14T17:23:22.000Z
main.py
davemlz/ee-spectral-indices-list
fd1638fbc0ddebad3c7c77e9602ae1902f24bea3
[ "MIT" ]
1
2021-04-26T14:19:41.000Z
2021-04-26T14:19:41.000Z
main.py
davemlz/ee-spectral-indices-list
fd1638fbc0ddebad3c7c77e9602ae1902f24bea3
[ "MIT" ]
13
2021-04-15T11:35:55.000Z
2021-09-11T14:57:03.000Z
from src.indices import spindex from py_expression_eval import Parser import pandas as pd import json parser = Parser() # Adding band attribute for key in spindex.SpectralIndices: SpectralIndex = spindex.SpectralIndices[key] formula = parser.parse(SpectralIndex.formula) SpectralIndex.bands = formula.varia...
36.045455
105
0.639344
from src.indices import spindex from py_expression_eval import Parser import pandas as pd import json parser = Parser() for key in spindex.SpectralIndices: SpectralIndex = spindex.SpectralIndices[key] formula = parser.parse(SpectralIndex.formula) SpectralIndex.bands = formula.variables() spindex.Spec...
true
true
f755e17ec1f2904b1706e7db5b3c48bff1459338
65
py
Python
server/apps/streamdata/tests/__init__.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/streamdata/tests/__init__.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/streamdata/tests/__init__.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
from .test_data_builder import * from .test_stream_data import *
21.666667
32
0.815385
from .test_data_builder import * from .test_stream_data import *
true
true
f755e2243b4511addeb474a477bafd3dcb459aa1
496
py
Python
setup.py
sebastianczech/Design-Patterns-In-Python
c64734eeb3f0362ab8108923cc690a8cba24c772
[ "Apache-2.0" ]
null
null
null
setup.py
sebastianczech/Design-Patterns-In-Python
c64734eeb3f0362ab8108923cc690a8cba24c772
[ "Apache-2.0" ]
null
null
null
setup.py
sebastianczech/Design-Patterns-In-Python
c64734eeb3f0362ab8108923cc690a8cba24c772
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='design-patterns', version='0.1.0', description='Design patterns in Python', long_description=readme, author='Sebastian Czech', author_...
24.8
70
0.683468
from setuptools import setup, find_packages with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='design-patterns', version='0.1.0', description='Design patterns in Python', long_description=readme, author='Sebastian Czech', author_...
true
true
f755e2e6d7d86c033d4ed35877bdb78ca9cad997
1,804
py
Python
linepx/datasets/transforms.py
moliushang/wireframe_
57dd774e20740af9aadd7151d64b40cc915abb5c
[ "MIT" ]
148
2018-04-20T04:53:27.000Z
2022-03-23T14:48:01.000Z
linepx/datasets/transforms.py
moliushang/wireframe_
57dd774e20740af9aadd7151d64b40cc915abb5c
[ "MIT" ]
29
2018-06-07T20:13:20.000Z
2022-02-16T23:37:34.000Z
linepx/datasets/transforms.py
moliushang/wireframe_
57dd774e20740af9aadd7151d64b40cc915abb5c
[ "MIT" ]
38
2018-04-25T22:56:36.000Z
2022-03-23T14:55:17.000Z
import math import numpy as np import torch import random # ipt is nparray with dimension (height, width, channel) # xml is nparray with dimension (height, width) def addNoise(ipt, miu, std): noise = np.random.normal(miu, std, ipt.shape) noise = np.float32(noise) return ipt + noise def thAddNoise(ipt, m...
27.753846
63
0.582594
import math import numpy as np import torch import random def addNoise(ipt, miu, std): noise = np.random.normal(miu, std, ipt.shape) noise = np.float32(noise) return ipt + noise def thAddNoise(ipt, miu, std): noise = np.random.normal(miu, std, ipt.size()) noise = torch.from_numpy(np.float32(no...
true
true
f755e375f38d0802620ee33bae3f358a8445ddd6
9,357
py
Python
src/projector.py
baderex/AIArtathon
e72c7ef73bbc2eb0eaf9cc906e34d801cdd13d15
[ "BSD-2-Clause" ]
163
2020-07-14T20:34:43.000Z
2022-03-14T07:51:08.000Z
src/projector.py
baderex/AIArtathon
e72c7ef73bbc2eb0eaf9cc906e34d801cdd13d15
[ "BSD-2-Clause" ]
7
2020-08-11T01:07:39.000Z
2022-02-20T19:17:49.000Z
src/projector.py
baderex/AIArtathon
e72c7ef73bbc2eb0eaf9cc906e34d801cdd13d15
[ "BSD-2-Clause" ]
21
2020-08-05T01:19:49.000Z
2021-09-07T07:27:01.000Z
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import numpy as np import tensorflow as tf i...
43.52093
150
0.59207
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import numpy as np import tensorflow as tf import dnnlib import dnnlib.tflib as tflib from training import misc class Projector: def __init__(self, steps=1000): self.num_steps = steps self.dlatent_avg_samples = 10000 ...
true
true
f755e390e7c14d99d728ca1d541b1997339a3da7
575
py
Python
mysite/game/migrations/0007_alter_gameroom_players.py
chiachun2491/NTNU_OOAD-Project
d215dc4bfe13cadd1f95aff91753d43581f358dc
[ "MIT" ]
null
null
null
mysite/game/migrations/0007_alter_gameroom_players.py
chiachun2491/NTNU_OOAD-Project
d215dc4bfe13cadd1f95aff91753d43581f358dc
[ "MIT" ]
1
2021-06-05T13:40:28.000Z
2021-06-05T17:41:32.000Z
mysite/game/migrations/0007_alter_gameroom_players.py
chiachun2491/NTNU_OOAD-Project
d215dc4bfe13cadd1f95aff91753d43581f358dc
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-05-09 07:58 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('game', '0006_alter_gameroom_status'), ] operations...
27.380952
138
0.673043
from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('game', '0006_alter_gameroom_status'), ] operations = [ migrations.AlterField( ...
true
true
f755e3c4a7b127d0947abd5f6319b0b0d2256bb7
1,189
py
Python
youtube_dl/extractor/freevideo.py
Logmytech/youtube-dl-QT
1497297719a95c4f70fbfa32e0fa4e38cdd475dc
[ "MIT" ]
1
2015-02-19T13:13:47.000Z
2015-02-19T13:13:47.000Z
youtube_dl/extractor/freevideo.py
Logmytech/youtube-dl-QT
1497297719a95c4f70fbfa32e0fa4e38cdd475dc
[ "MIT" ]
2
2019-05-20T12:46:30.000Z
2020-11-07T12:50:32.000Z
youtube_dl/extractor/freevideo.py
Logmytech/youtube-dl-QT
1497297719a95c4f70fbfa32e0fa4e38cdd475dc
[ "MIT" ]
5
2020-10-25T09:18:58.000Z
2021-05-23T22:57:55.000Z
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ExtractorError class FreeVideoIE(InfoExtractor): _VALID_URL = r'^http://www.freevideo.cz/vase-videa/(?P<id>[^.]+)\.html(?:$|[?#])' _TEST = { 'url': 'http://www.freevideo.cz/vase-videa/vysukany-zadecek-22033...
30.487179
85
0.550883
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ExtractorError class FreeVideoIE(InfoExtractor): _VALID_URL = r'^http://www.freevideo.cz/vase-videa/(?P<id>[^.]+)\.html(?:$|[?#])' _TEST = { 'url': 'http://www.freevideo.cz/vase-videa/vysukany-zadecek-22033...
true
true
f755e413748e20b61b2144a569c10a85d5127214
181
py
Python
doepy/constraints/__init__.py
scwolof/doepy
acb2cad95428de2c14b28563cff1aa30679e1f39
[ "MIT" ]
1
2020-04-23T13:43:35.000Z
2020-04-23T13:43:35.000Z
doepy/constraints/__init__.py
scwolof/doepy
acb2cad95428de2c14b28563cff1aa30679e1f39
[ "MIT" ]
null
null
null
doepy/constraints/__init__.py
scwolof/doepy
acb2cad95428de2c14b28563cff1aa30679e1f39
[ "MIT" ]
1
2021-06-13T14:38:32.000Z
2021-06-13T14:38:32.000Z
from .control_constraints import ControlConstraint, ControlDeltaConstraint from .state_constraints import (StateConstraint, ConstantMeanStateConstraint, MovingMeanStateConstraint)
45.25
77
0.895028
from .control_constraints import ControlConstraint, ControlDeltaConstraint from .state_constraints import (StateConstraint, ConstantMeanStateConstraint, MovingMeanStateConstraint)
true
true
f755e4ce1bb133858d691bd7064e67046090cdc5
7,918
py
Python
src/lib/gcloud/bigtable/_generated/http_pb2.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
17
2017-08-04T15:41:05.000Z
2020-10-16T18:02:41.000Z
lib/gcloud/bigtable/_generated/http_pb2.py
r3tard/BartusBot
baa0e775a8495c696ca274d78f898eb74d8fa961
[ "Apache-2.0" ]
12
2015-10-30T20:22:53.000Z
2016-02-09T21:56:17.000Z
lib/gcloud/bigtable/_generated/http_pb2.py
r3tard/BartusBot
baa0e775a8495c696ca274d78f898eb74d8fa961
[ "Apache-2.0" ]
3
2017-12-07T16:30:59.000Z
2019-06-16T02:48:28.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/api/http.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection a...
41.025907
664
0.74337
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google...
true
true
f755e4e1084d0f5be6190e75f7be16d23e09a0d2
53,417
py
Python
tests/helpers/test_template.py
bannhead/core
b113984875381b486ef6722080d992db254559bf
[ "Apache-2.0" ]
2
2019-01-25T15:55:18.000Z
2019-03-17T15:02:20.000Z
tests/helpers/test_template.py
bannhead/core
b113984875381b486ef6722080d992db254559bf
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
tests/helpers/test_template.py
bannhead/core
b113984875381b486ef6722080d992db254559bf
[ "Apache-2.0" ]
2
2021-01-11T22:51:43.000Z
2021-08-29T01:25:04.000Z
"""Test Home Assistant template helper methods.""" from datetime import datetime import math import random import pytest import pytz from homeassistant.components import group from homeassistant.const import ( LENGTH_METERS, MASS_GRAMS, MATCH_ALL, PRESSURE_PA, TEMP_CELSIUS, VOLUME_LITERS, ) fr...
28.292903
100
0.567965
from datetime import datetime import math import random import pytest import pytz from homeassistant.components import group from homeassistant.const import ( LENGTH_METERS, MASS_GRAMS, MATCH_ALL, PRESSURE_PA, TEMP_CELSIUS, VOLUME_LITERS, ) from homeassistant.exceptions import TemplateError fr...
true
true
f755e587698124b82597e54cec914ffcccaa7153
1,150
py
Python
adminmgr/media/code/python/red3/BD_88_218_230_688_reducer.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/python/red3/BD_88_218_230_688_reducer.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/python/red3/BD_88_218_230_688_reducer.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
#!/usr/bin/python3 #Reducer.py import sys dict_ven={} #Partitoner for line in sys.stdin: line=line.strip('\n') if (len(line.split(','))==4): venue,v1,batsman,run=line.split(',') venue=venue+','+v1 else: venue,batsman,run=line.split(',') key=(venue,batsman) if(key not in dic...
23.958333
73
0.626957
import sys dict_ven={} for line in sys.stdin: line=line.strip('\n') if (len(line.split(','))==4): venue,v1,batsman,run=line.split(',') venue=venue+','+v1 else: venue,batsman,run=line.split(',') key=(venue,batsman) if(key not in dict_ven): dict_ven[key]=[] dic...
true
true
f755e5df98c809fcba09193318de01592af29b51
153
py
Python
prometheus_adaptive_cards/distribution/model.py
trallnag/prometheus-adaptive-cards
884cfca5212db821900f5700ccf0fbfa3e8459ca
[ "Apache-2.0" ]
null
null
null
prometheus_adaptive_cards/distribution/model.py
trallnag/prometheus-adaptive-cards
884cfca5212db821900f5700ccf0fbfa3e8459ca
[ "Apache-2.0" ]
null
null
null
prometheus_adaptive_cards/distribution/model.py
trallnag/prometheus-adaptive-cards
884cfca5212db821900f5700ccf0fbfa3e8459ca
[ "Apache-2.0" ]
null
null
null
from pydantic import BaseModel from prometheus_adaptive_cards.config import Target class Payload(BaseModel): data: dict targets: list[Target]
17
51
0.784314
from pydantic import BaseModel from prometheus_adaptive_cards.config import Target class Payload(BaseModel): data: dict targets: list[Target]
true
true
f755e8e6d6ee5e27dbef018c7ce8c5b8a27631b9
4,948
py
Python
research/object_detection/models/ssd_mobilenet_v1_feature_extractor.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
research/object_detection/models/ssd_mobilenet_v1_feature_extractor.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
research/object_detection/models/ssd_mobilenet_v1_feature_extractor.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 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 applica...
43.026087
92
0.619846
import tensorflow as tf from object_detection.meta_architectures import ssd_meta_arch from object_detection.models import feature_map_generators from object_detection.utils import ops from nets import mobilenet_v1 slim = tf.contrib.slim class SSDMobileNetV1FeatureExtractor(ssd_meta_arch.SSDFeatureEx...
true
true
f755e8ed0eaffc858c58fb8513b1f297d5eea33f
2,117
py
Python
datahub/activity_stream/pagination.py
alixedi/data-hub-api-cd-poc
a5e5ea45bb496c0d2a06635864514af0c7d4291a
[ "MIT" ]
null
null
null
datahub/activity_stream/pagination.py
alixedi/data-hub-api-cd-poc
a5e5ea45bb496c0d2a06635864514af0c7d4291a
[ "MIT" ]
16
2020-04-01T15:25:35.000Z
2020-04-14T14:07:30.000Z
datahub/activity_stream/pagination.py
alixedi/data-hub-api-cd-poc
a5e5ea45bb496c0d2a06635864514af0c7d4291a
[ "MIT" ]
null
null
null
from django.core.exceptions import ImproperlyConfigured from rest_framework.pagination import CursorPagination from rest_framework.response import Response class ActivityCursorPagination(CursorPagination): """ Cursor pagination for activities. The activity stream service scrapes specified endpoints at re...
36.5
95
0.651866
from django.core.exceptions import ImproperlyConfigured from rest_framework.pagination import CursorPagination from rest_framework.response import Response class ActivityCursorPagination(CursorPagination): summary = None def _get_url(self): return self.encode_cursor(self.cursor) if self.cursor else ...
true
true
f755e9c186b53d1a9621e0ee41a0056a2e970002
10,822
py
Python
mmd_scripting/scripts_for_gui/morph_invert.py
Nuthouse01/PMX-VMD-Scripting-Tools
21a397db92c5f8034494dfcc41c7814096d3dd50
[ "MIT" ]
54
2020-07-15T02:51:47.000Z
2022-03-22T01:33:54.000Z
mmd_scripting/scripts_for_gui/morph_invert.py
Nuthouse01/VMD-to-text-Conversion-Tool
0d9334bd5735accdd8bb6e1b69889fbe054a7481
[ "MIT" ]
5
2020-09-05T23:22:40.000Z
2021-11-26T22:32:09.000Z
mmd_scripting/scripts_for_gui/morph_invert.py
Nuthouse01/VMD-to-text-Conversion-Tool
0d9334bd5735accdd8bb6e1b69889fbe054a7481
[ "MIT" ]
13
2020-09-05T19:06:27.000Z
2022-02-14T16:01:09.000Z
import mmd_scripting.core.nuthouse01_core as core import mmd_scripting.core.nuthouse01_pmx_parser as pmxlib import mmd_scripting.core.nuthouse01_pmx_struct as pmxstruct from mmd_scripting.scripts_for_gui import morph_scale _SCRIPT_VERSION = "Script version: Nuthouse01 - v1.07.01 - 7/23/2021" # This code is free to us...
46.646552
167
0.727962
import mmd_scripting.core.nuthouse01_core as core import mmd_scripting.core.nuthouse01_pmx_parser as pmxlib import mmd_scripting.core.nuthouse01_pmx_struct as pmxstruct from mmd_scripting.scripts_for_gui import morph_scale _SCRIPT_VERSION = "Script version: Nuthouse01 - v1.07.01 - 7/23/2021" e morph so that when it ...
true
true
f755eb184589f6b6887083785e0a6b8a6c189183
7,133
py
Python
fairseq/models/bart/hub_interface.py
tmtmaj/Exploiting-PrLM-for-NLG-tasks
e8752593d3ee881cf9c0fb5ed26d26fcb02e6dd5
[ "MIT" ]
null
null
null
fairseq/models/bart/hub_interface.py
tmtmaj/Exploiting-PrLM-for-NLG-tasks
e8752593d3ee881cf9c0fb5ed26d26fcb02e6dd5
[ "MIT" ]
null
null
null
fairseq/models/bart/hub_interface.py
tmtmaj/Exploiting-PrLM-for-NLG-tasks
e8752593d3ee881cf9c0fb5ed26d26fcb02e6dd5
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import logging import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from typing im...
38.144385
130
0.591616
import copy import logging import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from typing import List from fairseq import utils from fairseq.data import encoders logger = logging.getLogger(__name__) class BARTHubInterface(nn.Module): def __init__(s...
true
true
f755eb9b5adb8eb0ec6324d064b7ca27e3da4114
361
py
Python
jcasts/users/tests/test_emails.py
danjac/jcasts
04f5ef1f536d51962c0433d092817c0153acb6af
[ "MIT" ]
13
2021-09-17T07:41:00.000Z
2022-02-10T10:00:48.000Z
jcasts/users/tests/test_emails.py
danjac/jcasts
04f5ef1f536d51962c0433d092817c0153acb6af
[ "MIT" ]
167
2021-07-17T09:41:38.000Z
2021-08-31T06:03:34.000Z
jcasts/users/tests/test_emails.py
danjac/jcasts
04f5ef1f536d51962c0433d092817c0153acb6af
[ "MIT" ]
null
null
null
from jcasts.users.emails import send_user_notification_email class TestSendUserNotificationEmail: def test_send(self, user, mailoutbox): send_user_notification_email( user, "testing!", "account/emails/test_email.txt", "account/emails/test_email.html", ...
25.785714
60
0.639889
from jcasts.users.emails import send_user_notification_email class TestSendUserNotificationEmail: def test_send(self, user, mailoutbox): send_user_notification_email( user, "testing!", "account/emails/test_email.txt", "account/emails/test_email.html", ...
true
true
f755ebc8865048e20b73dd2d42baf96f732aaa91
14,728
py
Python
nipype/pipeline/engine/tests/test_utils.py
lighthall-lab/nipype-legacy
6c23846aa50c2ce34653f9517d95f02b071dc52d
[ "Apache-2.0" ]
2
2019-01-25T18:20:51.000Z
2019-07-30T20:51:51.000Z
nipype/pipeline/engine/tests/test_utils.py
lighthall-lab/nipype-legacy
6c23846aa50c2ce34653f9517d95f02b071dc52d
[ "Apache-2.0" ]
null
null
null
nipype/pipeline/engine/tests/test_utils.py
lighthall-lab/nipype-legacy
6c23846aa50c2ce34653f9517d95f02b071dc52d
[ "Apache-2.0" ]
2
2018-01-25T19:48:17.000Z
2019-01-25T18:20:52.000Z
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Tests for the engine utils module """ from __future__ import print_function, division, unicode_literals, absolute_import from builtins import range, open import os from copy impo...
37.571429
129
0.511407
from __future__ import print_function, division, unicode_literals, absolute_import from builtins import range, open import os from copy import deepcopy from shutil import rmtree import pytest from ... import engine as pe from ....interfaces import base as nib from ....interfaces import utility as niu from .... imp...
true
true
f755ebf672037e72856e97af7f3d14fd8fefbbc8
11,524
py
Python
meta/lib/oe/terminal.py
vineethrp/luv-yocto
3b0688bc9a5e8d52b6ca461b15fb4abd3eaaf7a8
[ "MIT" ]
53
2018-02-28T08:51:32.000Z
2022-02-28T06:49:23.000Z
meta/lib/oe/terminal.py
nareshgbhat/luv-yocto
48976c54238dda0791e274927371265d259c0e5a
[ "MIT" ]
27
2018-01-25T00:26:53.000Z
2020-08-09T05:20:04.000Z
meta/lib/oe/terminal.py
nareshgbhat/luv-yocto
48976c54238dda0791e274927371265d259c0e5a
[ "MIT" ]
51
2018-02-21T04:46:08.000Z
2022-03-02T04:20:41.000Z
import logging import oe.classutils import shlex from bb.process import Popen, ExecutionError from distutils.version import LooseVersion logger = logging.getLogger('BitBake.OE.Terminal') class UnsupportedTerminal(Exception): pass class NoSupportedTerminals(Exception): def __init__(self, terms): self...
34.81571
116
0.601874
import logging import oe.classutils import shlex from bb.process import Popen, ExecutionError from distutils.version import LooseVersion logger = logging.getLogger('BitBake.OE.Terminal') class UnsupportedTerminal(Exception): pass class NoSupportedTerminals(Exception): def __init__(self, terms): self...
true
true
f755ec1755c3a9f86fe1b94df1a21d4949fc0918
4,494
py
Python
RL/rl/rllib_script/residualplanarnavigateenv_ppo.py
robot-perception-group/AutonomousBlimpDRL
a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee
[ "MIT" ]
8
2021-11-21T20:47:37.000Z
2022-03-15T09:50:06.000Z
RL/rl/rllib_script/residualplanarnavigateenv_ppo.py
robot-perception-group/AutonomousBlimpDRL
a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee
[ "MIT" ]
null
null
null
RL/rl/rllib_script/residualplanarnavigateenv_ppo.py
robot-perception-group/AutonomousBlimpDRL
a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee
[ "MIT" ]
null
null
null
import argparse import ray import rl.rllib_script.agent.model.ray_model from blimp_env.envs import ResidualPlanarNavigateEnv from blimp_env.envs.script import close_simulation from ray import tune from ray.rllib.agents import ppo from ray.tune.registry import register_env from rl.rllib_script.util import find_nearest_...
28.624204
88
0.615042
import argparse import ray import rl.rllib_script.agent.model.ray_model from blimp_env.envs import ResidualPlanarNavigateEnv from blimp_env.envs.script import close_simulation from ray import tune from ray.rllib.agents import ppo from ray.tune.registry import register_env from rl.rllib_script.util import find_nearest_...
true
true
f755ec2597ce164017fbd09d1314dc73c044b43b
3,360
py
Python
attention_lstm.py
Akuchi612/keras-attention-mechanism
63fc19fd8f0618da98a8122ee755d0a9e7e33a73
[ "Apache-2.0" ]
7
2019-01-04T07:00:05.000Z
2020-12-16T05:16:43.000Z
attention_lstm.py
s1162276945/keras-attention-mechanism
63fc19fd8f0618da98a8122ee755d0a9e7e33a73
[ "Apache-2.0" ]
null
null
null
attention_lstm.py
s1162276945/keras-attention-mechanism
63fc19fd8f0618da98a8122ee755d0a9e7e33a73
[ "Apache-2.0" ]
5
2019-05-04T05:40:16.000Z
2021-02-19T09:20:53.000Z
from keras.layers import merge from keras.layers.core import * from keras.layers.recurrent import LSTM from keras.models import * from attention_utils import get_activations, get_data_recurrent INPUT_DIM = 2 TIME_STEPS = 20 # if True, the attention vector is shared across the input_dimensions where the attention is a...
38.62069
104
0.636012
from keras.layers import merge from keras.layers.core import * from keras.layers.recurrent import LSTM from keras.models import * from attention_utils import get_activations, get_data_recurrent INPUT_DIM = 2 TIME_STEPS = 20 SINGLE_ATTENTION_VECTOR = False APPLY_ATTENTION_BEFORE_LSTM = False def attention_3d_block(...
true
true
f755ec826fbacf271a2847136bb1d1a1b21654ae
3,864
py
Python
exotica_core/test/test_box_qp.py
maxspahn/exotica
f748a5860939b870ab522a1bd553d2fa0da56f8e
[ "BSD-3-Clause" ]
null
null
null
exotica_core/test/test_box_qp.py
maxspahn/exotica
f748a5860939b870ab522a1bd553d2fa0da56f8e
[ "BSD-3-Clause" ]
null
null
null
exotica_core/test/test_box_qp.py
maxspahn/exotica
f748a5860939b870ab522a1bd553d2fa0da56f8e
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pyexotica as exo import unittest from numpy import testing as nptest from scipy.optimize import minimize class TestBoxQP(unittest.TestCase): """Tests BoxQP implementation against scipy.""" def test_zero_q(self): np.random.seed(100) # check against 100 state,cont...
32.2
105
0.471532
import numpy as np import pyexotica as exo import unittest from numpy import testing as nptest from scipy.optimize import minimize class TestBoxQP(unittest.TestCase): def test_zero_q(self): np.random.seed(100) for i in range(100): H = np.random.normal( siz...
true
true
f755edbae59127b74458e34e0b3e942983cca28e
671
py
Python
manage.py
Framinus/transgendercare
3c5fc53774fb5e808a5f33faa1f7a288d9f33d56
[ "MIT" ]
null
null
null
manage.py
Framinus/transgendercare
3c5fc53774fb5e808a5f33faa1f7a288d9f33d56
[ "MIT" ]
null
null
null
manage.py
Framinus/transgendercare
3c5fc53774fb5e808a5f33faa1f7a288d9f33d56
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'transgendercare.settings') try: from django.core.management import execute_from_command_line exc...
29.173913
79
0.682563
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'transgendercare.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and...
true
true
f755edd2e0b9ddbe01bd9a7bb35aecfe8e51e6de
107
py
Python
autode/neb/__init__.py
Crossfoot/autodE
2c452c954a5268e6c9a80cd4efbbfe855e61f6bb
[ "MIT" ]
90
2020-03-13T15:03:35.000Z
2022-03-14T13:41:04.000Z
autode/neb/__init__.py
skphy/autodE
fd80995206ac601299d2f78105d0fe4deee8c2cf
[ "MIT" ]
117
2020-06-13T00:11:06.000Z
2022-03-24T08:54:16.000Z
autode/neb/__init__.py
t-young31/autodE
4f4e5792e6edf446ff939552a14d82965aaff8e0
[ "MIT" ]
26
2020-08-14T04:52:53.000Z
2022-03-06T13:04:17.000Z
from autode.neb.original import NEB from autode.neb.ci import CINEB __all__ = ['NEB', 'CINEB']
17.833333
35
0.663551
from autode.neb.original import NEB from autode.neb.ci import CINEB __all__ = ['NEB', 'CINEB']
true
true
f755ee4f617ed2f11dbbef679df42a7986c4f334
310
py
Python
solutions/2nd-conditionals/l2_a2.py
Jhynn/programming-concepts-and-logic
0ffa71c6259296813d3951f21e8d0d69dd523545
[ "CC-BY-4.0" ]
4
2021-08-03T01:13:34.000Z
2021-09-29T21:47:41.000Z
solutions/2nd-conditionals/l2_a2.py
Jhynn/programming-concepts-and-logic
0ffa71c6259296813d3951f21e8d0d69dd523545
[ "CC-BY-4.0" ]
null
null
null
solutions/2nd-conditionals/l2_a2.py
Jhynn/programming-concepts-and-logic
0ffa71c6259296813d3951f21e8d0d69dd523545
[ "CC-BY-4.0" ]
null
null
null
number = float(input('Please, type a number: ')) if number % 2 != 0: print('This number is odd.') else: print('This number is even.') # print('{number} is odd.') if (number % # 2 != 0) else print('{number} is even.') # Remember to limit your code down to 80 characters.
25.833333
70
0.567742
number = float(input('Please, type a number: ')) if number % 2 != 0: print('This number is odd.') else: print('This number is even.')
true
true
f755ee73398ac840e70ba9a650b4a90668e9d368
6,452
py
Python
src/eddington/fit_function_class.py
AssafZohar/eddington
c67536c41a66a1f96d0aa85d5113b11b79759a7e
[ "Apache-2.0" ]
null
null
null
src/eddington/fit_function_class.py
AssafZohar/eddington
c67536c41a66a1f96d0aa85d5113b11b79759a7e
[ "Apache-2.0" ]
null
null
null
src/eddington/fit_function_class.py
AssafZohar/eddington
c67536c41a66a1f96d0aa85d5113b11b79759a7e
[ "Apache-2.0" ]
null
null
null
"""Fitting function to evaluate with the fitting algorithm.""" import functools from dataclasses import InitVar, dataclass, field from typing import Callable, Optional, Dict import numpy as np from eddington.exceptions import FitFunctionRuntimeError from eddington.fit_functions_registry import FitFunctionsRegistry ...
32.099502
85
0.615623
import functools from dataclasses import InitVar, dataclass, field from typing import Callable, Optional, Dict import numpy as np from eddington.exceptions import FitFunctionRuntimeError from eddington.fit_functions_registry import FitFunctionsRegistry @dataclass(unsafe_hash=True) class FitFunction: fit_func...
true
true
f755ef5233799a38e081803e650822fa21815cc7
1,140
py
Python
alipay/aop/api/response/AlipayCommerceCityfacilitatorDepositQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayCommerceCityfacilitatorDepositQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayCommerceCityfacilitatorDepositQueryResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.RechargeBill import RechargeBill class AlipayCommerceCityfacilitatorDepositQueryResponse(AlipayResponse): def __init__(self): super(AlipayCommerceCityfac...
34.545455
122
0.698246
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.RechargeBill import RechargeBill class AlipayCommerceCityfacilitatorDepositQueryResponse(AlipayResponse): def __init__(self): super(AlipayCommerceCityfacilitatorDepositQueryResponse, self).__init__...
true
true
f755ef53389d29266095e2a9265faf8acbf48811
365
py
Python
Gradient Descent/KNN Iris/Classification.py
itisaby/HacktoberFest2021
dffeabb306082b276a9065ca318d3adc47bd6177
[ "MIT" ]
2
2021-10-03T05:54:00.000Z
2021-10-03T08:11:47.000Z
Gradient Descent/KNN Iris/Classification.py
itisaby/HacktoberFest2021
dffeabb306082b276a9065ca318d3adc47bd6177
[ "MIT" ]
null
null
null
Gradient Descent/KNN Iris/Classification.py
itisaby/HacktoberFest2021
dffeabb306082b276a9065ca318d3adc47bd6177
[ "MIT" ]
null
null
null
from sklearn import datasets from sklearn.neighbors import KNeighborsClassifier #loading Datasets iris = datasets.load_iris() # print(iris.DESCR) features = iris.data labels = iris.target print(features[0], labels[0]) #Training the data clf = KNeighborsClassifier() clf.fit(features, labels) #Prediction pred = clf...
17.380952
50
0.747945
from sklearn import datasets from sklearn.neighbors import KNeighborsClassifier iris = datasets.load_iris() features = iris.data labels = iris.target print(features[0], labels[0]) clf = KNeighborsClassifier() clf.fit(features, labels) pred = clf.predict([[9.1, 3.5, 6.4, 4.8]]) print(pred)
true
true