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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75c5155a6710946ff2c6dfdd03a3d1cd853cd97
573
py
Python
html_to_pdf.py
Shawn-Xinhai/html_to_pdf
171da5a500dd6e4fa300533e009f843d03e73f2e
[ "MIT" ]
null
null
null
html_to_pdf.py
Shawn-Xinhai/html_to_pdf
171da5a500dd6e4fa300533e009f843d03e73f2e
[ "MIT" ]
null
null
null
html_to_pdf.py
Shawn-Xinhai/html_to_pdf
171da5a500dd6e4fa300533e009f843d03e73f2e
[ "MIT" ]
null
null
null
import sys from weasyprint import HTML def get_file_names(): if len(sys.argv) < 2: print('HTML file name not provided') exit HTML_file_name = sys.argv[1] pdf_file_name = HTML_file_name + '.pdf' if len(sys.argv) >= 3: pdf_file_name = sys.argv[2] return (HTML_file_name, pdf_file_name) def generat...
23.875
58
0.74171
import sys from weasyprint import HTML def get_file_names(): if len(sys.argv) < 2: print('HTML file name not provided') exit HTML_file_name = sys.argv[1] pdf_file_name = HTML_file_name + '.pdf' if len(sys.argv) >= 3: pdf_file_name = sys.argv[2] return (HTML_file_name, pdf_file_name) def generat...
true
true
f75c522488a0997277defa475960f4054bf0c50a
139
py
Python
BOJ_Solved/BOJ-11948.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
1e92986999b45aa9951e12e67b23062e410e9b36
[ "MIT" ]
7
2021-11-19T14:50:59.000Z
2022-02-25T20:00:20.000Z
BOJ_Solved/BOJ-11948.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
1e92986999b45aa9951e12e67b23062e410e9b36
[ "MIT" ]
null
null
null
BOJ_Solved/BOJ-11948.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
1e92986999b45aa9951e12e67b23062e410e9b36
[ "MIT" ]
null
null
null
""" 백준 11948번 : 과목선택 """ score = [] for _ in range(6): score.append(int(input())) print(sum(score) - min(score[:4]) - min(score[4:]))
15.444444
51
0.568345
score = [] for _ in range(6): score.append(int(input())) print(sum(score) - min(score[:4]) - min(score[4:]))
true
true
f75c52fe9db96104c26ef1447ffe36736c163ee1
413
py
Python
exercises/es/test_01_03_02.py
mariacamilagl/spacy-course
de9fcdfcbc75e6a8864e49f2f75ab1536969cb70
[ "MIT" ]
null
null
null
exercises/es/test_01_03_02.py
mariacamilagl/spacy-course
de9fcdfcbc75e6a8864e49f2f75ab1536969cb70
[ "MIT" ]
null
null
null
exercises/es/test_01_03_02.py
mariacamilagl/spacy-course
de9fcdfcbc75e6a8864e49f2f75ab1536969cb70
[ "MIT" ]
1
2020-06-08T13:26:06.000Z
2020-06-08T13:26:06.000Z
def test(): assert ( doc.text == "I like tree kangaroos and narwhals." ), "¿Procesaste el texto correctamente?" assert ( tree_kangaroos == doc[2:4] ), "¿Seleccionaste el span correcto para 'tree_kangaroos'?" assert ( tree_kangaroos_and_narwhals == doc[2:6] ), "¿Selecciona...
34.416667
76
0.646489
def test(): assert ( doc.text == "I like tree kangaroos and narwhals." ), "¿Procesaste el texto correctamente?" assert ( tree_kangaroos == doc[2:4] ), "¿Seleccionaste el span correcto para 'tree_kangaroos'?" assert ( tree_kangaroos_and_narwhals == doc[2:6] ), "¿Selecciona...
true
true
f75c5332ba397e535cd27bd73546032b29c97306
423
py
Python
bin/migrate-tips.py
techtonik/gratipay.com
669fbef5ac32f30c8a4cfa65e63bdd180c4f4761
[ "CC0-1.0" ]
null
null
null
bin/migrate-tips.py
techtonik/gratipay.com
669fbef5ac32f30c8a4cfa65e63bdd180c4f4761
[ "CC0-1.0" ]
null
null
null
bin/migrate-tips.py
techtonik/gratipay.com
669fbef5ac32f30c8a4cfa65e63bdd180c4f4761
[ "CC0-1.0" ]
null
null
null
from gratipay.wireup import db, env from gratipay.models.team import Team, AlreadyMigrated db = db(env()) slugs = db.all(""" SELECT slug FROM teams WHERE is_approved IS TRUE """) for slug in slugs: team = Team.from_slug(slug) try: team.migrate_tips() print("Migrated tips for '%...
20.142857
54
0.63357
from gratipay.wireup import db, env from gratipay.models.team import Team, AlreadyMigrated db = db(env()) slugs = db.all(""" SELECT slug FROM teams WHERE is_approved IS TRUE """) for slug in slugs: team = Team.from_slug(slug) try: team.migrate_tips() print("Migrated tips for '%...
true
true
f75c53a30265b468dfdeb5641a19279c2d79c92d
741
py
Python
src/app/core/management/commands/wait_for_db.py
MuhammadAhmedSiddiqui/DRF-PRC-ADV
183efc6fda8cee480cc48e156b78557b5773b2d2
[ "MIT" ]
null
null
null
src/app/core/management/commands/wait_for_db.py
MuhammadAhmedSiddiqui/DRF-PRC-ADV
183efc6fda8cee480cc48e156b78557b5773b2d2
[ "MIT" ]
null
null
null
src/app/core/management/commands/wait_for_db.py
MuhammadAhmedSiddiqui/DRF-PRC-ADV
183efc6fda8cee480cc48e156b78557b5773b2d2
[ "MIT" ]
null
null
null
from django.db.utils import OperationalError from django.core.management import BaseCommand from django.db import connections import time class Command(BaseCommand): def handle(self, *args, **options): """Command to check for database connections""" self.stdout.write("Waiting for database conne...
27.444444
69
0.59919
from django.db.utils import OperationalError from django.core.management import BaseCommand from django.db import connections import time class Command(BaseCommand): def handle(self, *args, **options): self.stdout.write("Waiting for database connection...") db_conn = None while not db_c...
true
true
f75c54867502f5419d36c1137f237897dc8a3014
775
py
Python
dhcpclient/utilities.py
Gambellator/Bulk-DHCP-Client-Tester
4001b37a74f931cedb0b607526923d4254d4a5cc
[ "MIT" ]
null
null
null
dhcpclient/utilities.py
Gambellator/Bulk-DHCP-Client-Tester
4001b37a74f931cedb0b607526923d4254d4a5cc
[ "MIT" ]
null
null
null
dhcpclient/utilities.py
Gambellator/Bulk-DHCP-Client-Tester
4001b37a74f931cedb0b607526923d4254d4a5cc
[ "MIT" ]
null
null
null
''' Some helpful utlity functions and classes. ''' import random class RandomMac(object): def __init__(self): self.used_macs = set() def get_mac(self): temp = self._random_mac() while True: if temp not in self.used_macs: self.used_macs.add(temp) ...
27.678571
64
0.486452
import random class RandomMac(object): def __init__(self): self.used_macs = set() def get_mac(self): temp = self._random_mac() while True: if temp not in self.used_macs: self.used_macs.add(temp) return temp temp = self._random_ma...
true
true
f75c55294c3c235d6b4849c0f2d118ad5333399f
548
py
Python
test/test_main_pytest.py
keithpij/mint
23b3dd946f2118eda625d2b3ff8e5427cbb90bb5
[ "MIT" ]
null
null
null
test/test_main_pytest.py
keithpij/mint
23b3dd946f2118eda625d2b3ff8e5427cbb90bb5
[ "MIT" ]
null
null
null
test/test_main_pytest.py
keithpij/mint
23b3dd946f2118eda625d2b3ff8e5427cbb90bb5
[ "MIT" ]
null
null
null
''' Main module that starts both pytest and coverage.py. ''' import coverage import pytest if __name__ == '__main__': # Start code coverage tracking and erase previous results. cov = coverage.Coverage() cov.erase() cov.start() # Start the pytest runner. #pytest.main(['--maxfail=5', '--durati...
19.571429
65
0.640511
import coverage import pytest if __name__ == '__main__': cov = coverage.Coverage() cov.erase() cov.start() pytest.main() cov.stop() cov.save() cov.html_report() cov.report()
true
true
f75c55646e1c681af036d14249057f3c858f0918
521
py
Python
api/cases/migrations/0005_case_copy_of.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
3
2019-05-15T09:30:39.000Z
2020-04-22T16:14:23.000Z
api/cases/migrations/0005_case_copy_of.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
85
2019-04-24T10:39:35.000Z
2022-03-21T14:52:12.000Z
api/cases/migrations/0005_case_copy_of.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
1
2021-01-17T11:12:19.000Z
2021-01-17T11:12:19.000Z
# Generated by Django 2.2.10 on 2020-02-18 10:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("cases", "0004_auto_20200211_1459"), ] operations = [ migrations.AddField( model_name="case", ...
23.681818
104
0.604607
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("cases", "0004_auto_20200211_1459"), ] operations = [ migrations.AddField( model_name="case", name="copy_of", field=mode...
true
true
f75c5692e9544160d4581e7c940dca90537ce2b2
886
py
Python
bases_2021_1S/Grupo 01/UNION/Server/routes/query.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
bases_2021_1S/Grupo 01/UNION/Server/routes/query.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
bases_2021_1S/Grupo 01/UNION/Server/routes/query.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from flask import Blueprint, Response, jsonify, request from flask_cors import CORS #from Fase1.analizer import interpreter from Parser.ui import PantallaPrincipal import simplejson as json qry = Blueprint('qry', __name__) CORS(qry) @qry.route('/exec', methods=['POST']) def exec(): """Ejecuta una consulta y dev...
31.642857
66
0.676072
from flask import Blueprint, Response, jsonify, request from flask_cors import CORS from Parser.ui import PantallaPrincipal import simplejson as json qry = Blueprint('qry', __name__) CORS(qry) @qry.route('/exec', methods=['POST']) def exec(): body = request.get_json() query = body.get('query') query...
true
true
f75c569d30ebf5ffc28113aaa3aafc96381b640d
2,634
py
Python
tests/test_settings/settings_1_8.py
RignonNoel/django-anymail
fffd762f56c6e6a567950240c59494a614e1ed8f
[ "BSD-3-Clause" ]
null
null
null
tests/test_settings/settings_1_8.py
RignonNoel/django-anymail
fffd762f56c6e6a567950240c59494a614e1ed8f
[ "BSD-3-Clause" ]
null
null
null
tests/test_settings/settings_1_8.py
RignonNoel/django-anymail
fffd762f56c6e6a567950240c59494a614e1ed8f
[ "BSD-3-Clause" ]
1
2021-05-23T10:34:18.000Z
2021-05-23T10:34:18.000Z
""" Django settings for Anymail tests. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths in...
25.326923
71
0.702354
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'NOT_FOR_PRODUCTION_USE' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessi...
true
true
f75c574995207d8f77304c4791f08e6742afb8db
1,414
py
Python
lefse2circlader.py
bvaisvil/lefse
6e325486b9d72a3d489b472691d171377d85b589
[ "MIT" ]
null
null
null
lefse2circlader.py
bvaisvil/lefse
6e325486b9d72a3d489b472691d171377d85b589
[ "MIT" ]
null
null
null
lefse2circlader.py
bvaisvil/lefse
6e325486b9d72a3d489b472691d171377d85b589
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import os import argparse def read_params(args): parser = argparse.ArgumentParser(description='Convert LEfSe output to ' 'Circlader input') parser.add_argument( 'inp_f', metavar='INPUT_FILE', nargs='?', default=None, typ...
33.666667
79
0.543847
import sys import os import argparse def read_params(args): parser = argparse.ArgumentParser(description='Convert LEfSe output to ' 'Circlader input') parser.add_argument( 'inp_f', metavar='INPUT_FILE', nargs='?', default=None, type=str, ...
true
true
f75c5985e8516b33a2895bc44989bbac6dd1f91c
2,061
py
Python
menus/GIS/Repair/gap_plg.py
Image-Py/gistool
064ebc5d1b0532903b13c5c207a4fac1ad29786c
[ "BSD-3-Clause" ]
1
2019-06-13T17:02:14.000Z
2019-06-13T17:02:14.000Z
menus/GIS/Repair/gap_plg.py
Image-Py/gistool
064ebc5d1b0532903b13c5c207a4fac1ad29786c
[ "BSD-3-Clause" ]
null
null
null
menus/GIS/Repair/gap_plg.py
Image-Py/gistool
064ebc5d1b0532903b13c5c207a4fac1ad29786c
[ "BSD-3-Clause" ]
2
2019-06-04T09:26:31.000Z
2019-08-09T02:37:54.000Z
import scipy.ndimage as ndimg import numpy as np from imagepy.core.engine import Filter, Simple from geonumpy.pretreat import degap class GapRepair(Simple): title = 'Gap Repair' note = ['all', 'preview'] para = {'wild':0, 'r':0, 'dark':True, 'every':True, 'slice':False} view = [(float, 'wild', (-65536,...
32.714286
81
0.508491
import scipy.ndimage as ndimg import numpy as np from imagepy.core.engine import Filter, Simple from geonumpy.pretreat import degap class GapRepair(Simple): title = 'Gap Repair' note = ['all', 'preview'] para = {'wild':0, 'r':0, 'dark':True, 'every':True, 'slice':False} view = [(float, 'wild', (-65536,...
true
true
f75c5a6e826d3f9d605e32bafa479277e3160ab2
1,019
py
Python
baselines/seq2seq/convert_pred_eval.py
iwangjian/TG-ClariQ
2a9bd0683f92f41c034b2221ccf1ba930fbcdca1
[ "MIT" ]
2
2021-08-13T02:48:51.000Z
2021-12-06T09:42:32.000Z
baselines/seq2seq/convert_pred_eval.py
iwangjian/TG-ClariQ
2a9bd0683f92f41c034b2221ccf1ba930fbcdca1
[ "MIT" ]
null
null
null
baselines/seq2seq/convert_pred_eval.py
iwangjian/TG-ClariQ
2a9bd0683f92f41c034b2221ccf1ba930fbcdca1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json DATA_DIR = "data" OUTPUT_DIR = "output/seq2seq" def main(): preds = [] with open("%s/pred.txt" % OUTPUT_DIR) as fr: for line in fr: preds.append(line.strip()) outputs = [] with open("%s/MIMICS-test.txt" % DATA_DIR) as fr: ...
28.305556
65
0.524043
import json DATA_DIR = "data" OUTPUT_DIR = "output/seq2seq" def main(): preds = [] with open("%s/pred.txt" % OUTPUT_DIR) as fr: for line in fr: preds.append(line.strip()) outputs = [] with open("%s/MIMICS-test.txt" % DATA_DIR) as fr: for idx, line in enumerate(fr): ...
true
true
f75c5ab1edf47cac08d6c7986f0e1abfff442c9b
6,390
py
Python
scripts/training/train.py
alt113/Feudal-Networks
7887473e876bbd15ddccf86f10b91928a4f5f41b
[ "MIT" ]
null
null
null
scripts/training/train.py
alt113/Feudal-Networks
7887473e876bbd15ddccf86f10b91928a4f5f41b
[ "MIT" ]
null
null
null
scripts/training/train.py
alt113/Feudal-Networks
7887473e876bbd15ddccf86f10b91928a4f5f41b
[ "MIT" ]
null
null
null
""" ###################################################################################################### # Class of scripts to train the Neural Networks # ##################################################################################################...
37.368421
161
0.559155
import argparse import os import sys from six.moves import shlex_quote parser = argparse.ArgumentParser(description="Run commands") parser.add_argument('-w', '--num-workers', default=1, type=int, help="Number of workers") parser.add_argument('-r', '--remotes', default=None, he...
true
true
f75c5b41a23be600e5e460faf0704a5278bd21c4
10,921
py
Python
indico/core/db/sqlalchemy/locations.py
antzshrek/indico
25bedccf4b648d85dcd4b44d710726f8c85e3731
[ "MIT" ]
null
null
null
indico/core/db/sqlalchemy/locations.py
antzshrek/indico
25bedccf4b648d85dcd4b44d710726f8c85e3731
[ "MIT" ]
null
null
null
indico/core/db/sqlalchemy/locations.py
antzshrek/indico
25bedccf4b648d85dcd4b44d710726f8c85e3731
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from sqlalchemy.event import listens_for from sqlalchemy.ext.decl...
34.669841
114
0.594543
from __future__ import unicode_literals from sqlalchemy.event import listens_for from sqlalchemy.ext.declarative import declared_attr from indico.core.db import db from indico.util.decorators import strict_classproperty class LocationMixin(object): location_backref_name = None allow_locati...
true
true
f75c5b952a3af3b317189be40e2f308e621de8d0
1,079
py
Python
tests/unit/test_pool.py
jwoos/python_digitrecognizer
4a06cc7b7ee32aa6c66a391cd6595a2b5fbad38b
[ "MIT" ]
null
null
null
tests/unit/test_pool.py
jwoos/python_digitrecognizer
4a06cc7b7ee32aa6c66a391cd6595a2b5fbad38b
[ "MIT" ]
8
2019-01-19T19:20:13.000Z
2019-03-27T01:37:08.000Z
tests/unit/test_pool.py
jwoos/python_digitrecognizer
4a06cc7b7ee32aa6c66a391cd6595a2b5fbad38b
[ "MIT" ]
null
null
null
from unittest import TestCase, mock import layers import numpy as np import pytest class TestPoolForward(TestCase): def test_max(self): pool = layers.pool.Pool( size=2, stride=2, operation=np.max, ) data = np.zeros((4, 4, 3)) data[:,:,0] = np....
21.156863
38
0.327155
from unittest import TestCase, mock import layers import numpy as np import pytest class TestPoolForward(TestCase): def test_max(self): pool = layers.pool.Pool( size=2, stride=2, operation=np.max, ) data = np.zeros((4, 4, 3)) data[:,:,0] = np....
true
true
f75c5b9c0cecbe8451605b1077b98e37a1fcac3d
1,301
py
Python
setup.py
unbound-tech/pycryptoki
57bae4bb7b00d4694825a1ee0ea001aa187ff29e
[ "Apache-2.0" ]
2
2020-12-21T14:16:06.000Z
2021-02-17T14:29:12.000Z
setup.py
unbound-tech/pycryptoki
57bae4bb7b00d4694825a1ee0ea001aa187ff29e
[ "Apache-2.0" ]
null
null
null
setup.py
unbound-tech/pycryptoki
57bae4bb7b00d4694825a1ee0ea001aa187ff29e
[ "Apache-2.0" ]
null
null
null
# # Please note that this file has been modified by Unbound Tech # """ Script used by distutils to automatically generate a source code distribution of this python module (a .tar.gz file containing all of the source code). To generate this file run: python setup.py sdist """ from setuptools import setup im...
34.236842
104
0.684089
from setuptools import setup import os thelibFolder = os.path.dirname(os.path.realpath(__file__)) requirementPath = thelibFolder + '/requirements.txt' install_requires = [] if os.path.isfile(requirementPath): with open(requirementPath) as f: install_requires = [line for line in f.read().splitlines...
true
true
f75c5c37dca4b840b81a32553f07f2ca8a9405d1
24,685
py
Python
appengine/cr-buildbucket/test/search_test.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/cr-buildbucket/test/search_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/cr-buildbucket/test/search_test.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import mock from google.appengine.ext import ndb from components import auth from testing_utils import testing from proto import common_pb...
32.141927
79
0.682844
import datetime import mock from google.appengine.ext import ndb from components import auth from testing_utils import testing from proto import common_pb2 from proto import project_config_pb2 from test import test_util from test.test_util import future import errors import model import search import user class V...
true
true
f75c5dd48d20d94d709156aa4b6ff343c465e01e
1,938
py
Python
insta/models.py
brayomumo/Instagram
cbe932eac29afda480a0cbdea71a9f1eda01845c
[ "MIT" ]
null
null
null
insta/models.py
brayomumo/Instagram
cbe932eac29afda480a0cbdea71a9f1eda01845c
[ "MIT" ]
4
2020-06-05T22:44:50.000Z
2021-06-10T21:55:34.000Z
insta/models.py
brayomumo/Instagram
cbe932eac29afda480a0cbdea71a9f1eda01845c
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.db import models from tinymce.models import HTMLField # Create your models here. class Profile(models.Model): profile_photo = models.ImageField('profile/', null = True) bio = models.TextField() user = models.ForeignKey(User) last_update = mod...
25.84
84
0.658927
from django.contrib.auth.models import User from django.db import models from tinymce.models import HTMLField class Profile(models.Model): profile_photo = models.ImageField('profile/', null = True) bio = models.TextField() user = models.ForeignKey(User) last_update = models.DateTimeField(auto_now_...
true
true
f75c5ea73383ccef367632cf497227498ac50078
413
py
Python
mmpose/utils/collect_env.py
nightfuryyy/mmpose
910d9e31dd9d46e3329be1b7567e6309d70ab64c
[ "Apache-2.0" ]
1,775
2020-07-10T01:20:01.000Z
2022-03-31T16:31:50.000Z
mmpose/utils/collect_env.py
KHB1698/mmpose
93c3a742c540dfb4ca515ad545cef705a07d90b4
[ "Apache-2.0" ]
1,021
2020-07-11T11:40:24.000Z
2022-03-31T14:32:26.000Z
mmpose/utils/collect_env.py
KHB1698/mmpose
93c3a742c540dfb4ca515ad545cef705a07d90b4
[ "Apache-2.0" ]
477
2020-07-11T11:27:51.000Z
2022-03-31T09:42:25.000Z
# Copyright (c) OpenMMLab. All rights reserved. from mmcv.utils import collect_env as collect_basic_env from mmcv.utils import get_git_hash import mmpose def collect_env(): env_info = collect_basic_env() env_info['MMPose'] = (mmpose.__version__ + '+' + get_git_hash(digits=7)) return env_info if __name_...
24.294118
76
0.702179
from mmcv.utils import collect_env as collect_basic_env from mmcv.utils import get_git_hash import mmpose def collect_env(): env_info = collect_basic_env() env_info['MMPose'] = (mmpose.__version__ + '+' + get_git_hash(digits=7)) return env_info if __name__ == '__main__': for name, val in collect_en...
true
true
f75c60eda7e70f3b8f9fc5c2efc256f3c6cc96be
12,085
py
Python
diffprivlib/models/naive_bayes.py
Originofamonia/differential-privacy-library
11759216bd418f764ff5c4a2349975b14f6e7ffb
[ "MIT" ]
1
2021-05-26T06:15:13.000Z
2021-05-26T06:15:13.000Z
diffprivlib/models/naive_bayes.py
SHIHUA110/differential-privacy-library
a889ba0f8d19c77e2b0369451ebc392969fac685
[ "MIT" ]
null
null
null
diffprivlib/models/naive_bayes.py
SHIHUA110/differential-privacy-library
a889ba0f8d19c77e2b0369451ebc392969fac685
[ "MIT" ]
1
2021-09-07T10:40:49.000Z
2021-09-07T10:40:49.000Z
# MIT License # # Copyright (C) IBM Corporation 2019 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
41.961806
120
0.643691
import warnings import numpy as np import sklearn.naive_bayes as sk_nb from sklearn.utils import check_X_y from sklearn.utils.multiclass import _check_partial_fit_first_call from diffprivlib.accountant import BudgetAccountant from diffprivlib.mechanisms import LaplaceBoundedDomain, GeometricTruncated, LaplaceTruncate...
true
true
f75c61a2fe32830a3e4e87900ff51546e47faf55
55
py
Python
maturin_sample/__init__.py
selpoG/maturin-sample
83a47ee5076ce70d41067992df77cb646deb09b5
[ "MIT" ]
null
null
null
maturin_sample/__init__.py
selpoG/maturin-sample
83a47ee5076ce70d41067992df77cb646deb09b5
[ "MIT" ]
null
null
null
maturin_sample/__init__.py
selpoG/maturin-sample
83a47ee5076ce70d41067992df77cb646deb09b5
[ "MIT" ]
null
null
null
from .maturin_sample import hello __all__ = ["hello"]
13.75
33
0.745455
from .maturin_sample import hello __all__ = ["hello"]
true
true
f75c61ee8cd4419576ad974ca81235015e3f43b5
72,183
py
Python
fbgemm_gpu/bench/split_table_batched_embeddings_benchmark.py
hx89/FBGEMM
03a04eb7ecea8ee0afea42eaae7b2c2119a38886
[ "BSD-3-Clause" ]
null
null
null
fbgemm_gpu/bench/split_table_batched_embeddings_benchmark.py
hx89/FBGEMM
03a04eb7ecea8ee0afea42eaae7b2c2119a38886
[ "BSD-3-Clause" ]
null
null
null
fbgemm_gpu/bench/split_table_batched_embeddings_benchmark.py
hx89/FBGEMM
03a04eb7ecea8ee0afea42eaae7b2c2119a38886
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # 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. import itertools import logging import math import random import statistics import time f...
33.809368
198
0.582159
import itertools import logging import math import random import statistics import time from typing import Callable, List, Optional, Tuple import click import numpy as np import torch haveAIBench = False try: from aibench_observer.utils.observer import emitMetric haveAIBench = True except Exception: ha...
true
true
f75c61f929c38de0b76a7fed7c3bd6d7ada29589
22,668
py
Python
train.py
Moon-sung-woo/Tacotron2_korean
cb503e212b6bcae7c7b732b50887b56d11cfd543
[ "BSD-3-Clause" ]
4
2020-10-06T11:42:51.000Z
2022-03-31T07:25:58.000Z
train.py
Moon-sung-woo/Tacotron2_korean
cb503e212b6bcae7c7b732b50887b56d11cfd543
[ "BSD-3-Clause" ]
1
2020-11-25T09:16:34.000Z
2020-11-25T10:03:02.000Z
train.py
Moon-sung-woo/Tacotron2_korean
cb503e212b6bcae7c7b732b50887b56d11cfd543
[ "BSD-3-Clause" ]
1
2020-11-25T07:37:40.000Z
2020-11-25T07:37:40.000Z
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
41.516484
194
0.632875
import os import time import argparse import numpy as np from contextlib import contextmanager import torch from torch.utils.data import DataLoader from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.distributed as dist from torch.utils.data.distributed import DistributedSampler...
true
true
f75c6225fe17efcdc2ecdbb81db0b4e3c3a19f45
5,408
py
Python
setup.py
carmenerh/pyusb
b65bc7bb0be979c5fd4021d3bf6cbe82c6e194fb
[ "BSD-3-Clause" ]
1
2021-06-16T09:12:31.000Z
2021-06-16T09:12:31.000Z
setup.py
carmenerh/pyusb
b65bc7bb0be979c5fd4021d3bf6cbe82c6e194fb
[ "BSD-3-Clause" ]
null
null
null
setup.py
carmenerh/pyusb
b65bc7bb0be979c5fd4021d3bf6cbe82c6e194fb
[ "BSD-3-Clause" ]
1
2022-01-18T14:45:38.000Z
2022-01-18T14:45:38.000Z
#!/usr/bin/env python # Copyright 2009-2017 Wander Lairson Costa # Copyright 2009-2021 PyUSB contributors # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above cop...
44.327869
79
0.700629
import sys from setuptools import setup from distutils.version import LooseVersion from setuptools import __version__ as setuptools_version setuptools_scm = 'setuptools_scm' if LooseVersion(setuptools_version).version[0] < 12: setuptools_scm += '<2.0' def pyusb_scm_version(): from setuptools_scm.version imp...
true
true
f75c628e26ee4a7454f215bffb946f5a60f4e2a6
63
py
Python
ac_compiler/scanner/__init__.py
nicklambourne/crafting-a-compiler
4dde7390f4bdf83dedaca2e8b8b83ee42d270638
[ "BSD-3-Clause" ]
4
2020-04-03T14:06:46.000Z
2021-12-20T12:53:10.000Z
ac_compiler/scanner/__init__.py
nicklambourne/crafting-a-compiler
4dde7390f4bdf83dedaca2e8b8b83ee42d270638
[ "BSD-3-Clause" ]
null
null
null
ac_compiler/scanner/__init__.py
nicklambourne/crafting-a-compiler
4dde7390f4bdf83dedaca2e8b8b83ee42d270638
[ "BSD-3-Clause" ]
1
2021-02-11T22:34:39.000Z
2021-02-11T22:34:39.000Z
from .scanner import Scanner from .tokens import Token, Tokens
21
33
0.809524
from .scanner import Scanner from .tokens import Token, Tokens
true
true
f75c652b809c9653c4f7d0386656c9343bd6b560
53,424
py
Python
Code/Nets.py
palminde/P9Project
5df03d18b74585ce1d9feefce8c183225dd27f68
[ "MIT" ]
null
null
null
Code/Nets.py
palminde/P9Project
5df03d18b74585ce1d9feefce8c183225dd27f68
[ "MIT" ]
null
null
null
Code/Nets.py
palminde/P9Project
5df03d18b74585ce1d9feefce8c183225dd27f68
[ "MIT" ]
2
2020-07-08T15:50:39.000Z
2021-01-25T11:00:41.000Z
import tensorflow as tf from tensorflow import keras import numpy as np layers = tf.keras.layers # Clip model weights to a given hypercube class ClipConstraint(tf.keras.constraints.Constraint): # set clip value when initialized def __init__(self, clip_value): self.clip_value = clip_value # clip ...
51.567568
204
0.708053
import tensorflow as tf from tensorflow import keras import numpy as np layers = tf.keras.layers class ClipConstraint(tf.keras.constraints.Constraint): def __init__(self, clip_value): self.clip_value = clip_value def __call__(self, weights): return tf.keras.backend.clip(weights, -self...
true
true
f75c6641a32eaa95f4c4a8f7e3cfd839249e6ed4
62,173
py
Python
python_modules/dagster/dagster_tests/scheduler_tests/test_scheduler_run.py
a-cid/dagster
13fefd6aea44b63338377e02ca4af6e868bdba47
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/scheduler_tests/test_scheduler_run.py
a-cid/dagster
13fefd6aea44b63338377e02ca4af6e868bdba47
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/scheduler_tests/test_scheduler_run.py
a-cid/dagster
13fefd6aea44b63338377e02ca4af6e868bdba47
[ "Apache-2.0" ]
null
null
null
import datetime import os import random import string import sys import tempfile import time from contextlib import contextmanager import pendulum import pytest from dagster import ( Any, DagsterEventType, Field, ScheduleDefinition, daily_schedule, hourly_schedule, pipeline, repository,...
36.168121
175
0.624934
import datetime import os import random import string import sys import tempfile import time from contextlib import contextmanager import pendulum import pytest from dagster import ( Any, DagsterEventType, Field, ScheduleDefinition, daily_schedule, hourly_schedule, pipeline, repository,...
true
true
f75c674764097c3c01e53d37f73a3cfb936802f5
4,381
py
Python
fashion_intel/pytorch_cnn_trainer/utils.py
oke-aditya/fashion_intel
dfd468d52e6565fe371be84ffb021123578b9c41
[ "Apache-2.0" ]
1
2021-05-08T10:33:02.000Z
2021-05-08T10:33:02.000Z
fashion_intel/pytorch_cnn_trainer/utils.py
1UC1F3R616/fashion_intel
8add9a94c6a7f30cc1c70a99c2e83860b2204f11
[ "Apache-2.0" ]
18
2020-08-07T10:28:44.000Z
2020-10-01T20:06:30.000Z
fashion_intel/pytorch_cnn_trainer/utils.py
1UC1F3R616/fashion_intel
8add9a94c6a7f30cc1c70a99c2e83860b2204f11
[ "Apache-2.0" ]
2
2020-08-07T12:28:38.000Z
2020-08-07T18:11:42.000Z
import numpy as np import torch import random import matplotlib.pyplot as plt import os __all__ = [ "seed_everything", "AverageMeter", "accuracy", "EarlyStopping", "matplotlib_imshow", "print_size_of_model", ] def seed_everything(seed): """ Makes code deterministic using a given seed....
30.852113
108
0.598493
import numpy as np import torch import random import matplotlib.pyplot as plt import os __all__ = [ "seed_everything", "AverageMeter", "accuracy", "EarlyStopping", "matplotlib_imshow", "print_size_of_model", ] def seed_everything(seed): random.seed(seed) os.environ["PYTHONHASHSEED"] =...
true
true
f75c681578c8ff731ed88272ee03aa0be0cbce05
9,184
py
Python
tensorflow/python/ops/structured/structured_tensor_test.py
zzing0907/Tensorflow
f0d66b2674fecc0f2be1423cf696a7e6e7c7a39d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/structured/structured_tensor_test.py
zzing0907/Tensorflow
f0d66b2674fecc0f2be1423cf696a7e6e7c7a39d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/structured/structured_tensor_test.py
zzing0907/Tensorflow
f0d66b2674fecc0f2be1423cf696a7e6e7c7a39d
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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...
39.080851
80
0.60355
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from absl.testing import parameterized from tensorflow.python.framework import errors from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from t...
true
true
f75c68e24c08cd1561eed7fe96f6c792b9a4e2fd
18,626
py
Python
hikyuu/draw/drawplot/bokeh_draw.py
kknet/hikyuu
650814c3e1d32894ccc1263a0fecd6693028d2e3
[ "MIT" ]
1,283
2016-04-06T16:06:46.000Z
2022-03-31T06:37:53.000Z
hikyuu/draw/drawplot/bokeh_draw.py
kknet/hikyuu
650814c3e1d32894ccc1263a0fecd6693028d2e3
[ "MIT" ]
47
2017-08-12T10:37:03.000Z
2022-03-28T13:22:21.000Z
hikyuu/draw/drawplot/bokeh_draw.py
kknet/hikyuu
650814c3e1d32894ccc1263a0fecd6693028d2e3
[ "MIT" ]
416
2017-05-15T05:28:26.000Z
2022-03-22T07:44:15.000Z
# -*- coding: utf8 -*- # cp936 """ 交互模式下绘制相关图形,如K线图,美式K线图 """ from hikyuu import * from .common import get_draw_title from bokeh.plotting import Figure, figure, ColumnDataSource from bokeh.models import DatetimeTickFormatter,HoverTool, Title, Label from bokeh.layouts import column from bokeh.io import output_notebook...
32.966372
110
0.578707
from hikyuu import * from .common import get_draw_title from bokeh.plotting import Figure, figure, ColumnDataSource from bokeh.models import DatetimeTickFormatter,HoverTool, Title, Label from bokeh.layouts import column from bokeh.io import output_notebook, output_file, show def trans_color(color): color_dict =...
true
true
f75c69602d3fa3919ebe43a9ad644c988ccbb76e
1,226
py
Python
demo_data.py
krsmith/DS-Unit-3-Sprint-2-SQL-and-Databases
9617528ad5fd23354623926b819f98f9a063d252
[ "MIT" ]
null
null
null
demo_data.py
krsmith/DS-Unit-3-Sprint-2-SQL-and-Databases
9617528ad5fd23354623926b819f98f9a063d252
[ "MIT" ]
null
null
null
demo_data.py
krsmith/DS-Unit-3-Sprint-2-SQL-and-Databases
9617528ad5fd23354623926b819f98f9a063d252
[ "MIT" ]
null
null
null
import sqlite3 import pandas as pd conn = sqlite3.connect('demo_data.sqlite3') curs = conn.cursor() create_demo_table = """ CREATE TABLE demo ( s varchar(5), x int, y int );""" curs.execute(create_demo_table) conn.commit() curs.execute("""INSERT INTO demo ( s, x, y) VALUES""" + str(('g', 3, 9))) co...
21.508772
67
0.592985
import sqlite3 import pandas as pd conn = sqlite3.connect('demo_data.sqlite3') curs = conn.cursor() create_demo_table = """ CREATE TABLE demo ( s varchar(5), x int, y int );""" curs.execute(create_demo_table) conn.commit() curs.execute("""INSERT INTO demo ( s, x, y) VALUES""" + str(('g', 3, 9))) co...
true
true
f75c6a36831e60cb163929c91bb7328ea3a151eb
12,119
py
Python
roguebot/client.py
techcobweb/kaverns-and-kubernetes-bot-advanced
1a6b2edbc686329194acc85a1b1114f7c9bd8b15
[ "MIT" ]
null
null
null
roguebot/client.py
techcobweb/kaverns-and-kubernetes-bot-advanced
1a6b2edbc686329194acc85a1b1114f7c9bd8b15
[ "MIT" ]
null
null
null
roguebot/client.py
techcobweb/kaverns-and-kubernetes-bot-advanced
1a6b2edbc686329194acc85a1b1114f7c9bd8b15
[ "MIT" ]
null
null
null
import logging import json import asyncio.events import socketio from .navigation.point import Point from .state.dungeon_map import DungeonMap from .state.entity import Entities, Entity from .bot import Bot from .iclient import IEntityClient from .state.state import State class EntityClient(IEntityClient): """ ...
38.71885
102
0.593366
import logging import json import asyncio.events import socketio from .navigation.point import Point from .state.dungeon_map import DungeonMap from .state.entity import Entities, Entity from .bot import Bot from .iclient import IEntityClient from .state.state import State class EntityClient(IEntityClient): def...
true
true
f75c6aa4c0bc9e6a0583632570a241f0d5700804
2,945
py
Python
2021/day09/part01/smoke_basin.py
fpmosley/advent-of-code
507bd89795ff6a0824284c3c8d2123cf19a932a3
[ "MIT" ]
null
null
null
2021/day09/part01/smoke_basin.py
fpmosley/advent-of-code
507bd89795ff6a0824284c3c8d2123cf19a932a3
[ "MIT" ]
null
null
null
2021/day09/part01/smoke_basin.py
fpmosley/advent-of-code
507bd89795ff6a0824284c3c8d2123cf19a932a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Advent of Code 2021 - Day 9: Smoke Basin (Part 1) https://adventofcode.com/2021/day/9 ''' import numpy as np class HeightMap(): def __init__(self) -> None: self._grid = np.array([]) def add_row(self, row): np_row = np.array(row) if self._grid.size != 0: ...
27.523364
94
0.55382
import numpy as np class HeightMap(): def __init__(self) -> None: self._grid = np.array([]) def add_row(self, row): np_row = np.array(row) if self._grid.size != 0: self._grid = np.vstack([self._grid, np_row]) else: self._grid = np_row def find_lo...
true
true
f75c6ac23e5350fa5406aee0b25d7f7ca98bff02
261
py
Python
3. Functions/3.20. First Non-Prime.py
ahmetutkuozkan/my_ceng240_exercises_solutions
167bb9938515870ec1f01853933edc3b55937bff
[ "MIT" ]
null
null
null
3. Functions/3.20. First Non-Prime.py
ahmetutkuozkan/my_ceng240_exercises_solutions
167bb9938515870ec1f01853933edc3b55937bff
[ "MIT" ]
null
null
null
3. Functions/3.20. First Non-Prime.py
ahmetutkuozkan/my_ceng240_exercises_solutions
167bb9938515870ec1f01853933edc3b55937bff
[ "MIT" ]
null
null
null
def prime_controller(y): for i in range(2,(y//2)+1): if y%i==0: return False return True def find_first_non_prime(x): for i in range(len(x)): if 0==prime_controller(x[i]): return x[i] return False
26.1
38
0.536398
def prime_controller(y): for i in range(2,(y//2)+1): if y%i==0: return False return True def find_first_non_prime(x): for i in range(len(x)): if 0==prime_controller(x[i]): return x[i] return False
true
true
f75c6bf3c967580f754d597973d0975d8a30b8c0
24,873
py
Python
main.py
CarlosNebulous/Snkrs-Bot
c3148dae33aac58b62a27fc5b3633b9e256dbc0a
[ "Unlicense" ]
null
null
null
main.py
CarlosNebulous/Snkrs-Bot
c3148dae33aac58b62a27fc5b3633b9e256dbc0a
[ "Unlicense" ]
null
null
null
main.py
CarlosNebulous/Snkrs-Bot
c3148dae33aac58b62a27fc5b3633b9e256dbc0a
[ "Unlicense" ]
null
null
null
import os import sys import six import pause import argparse import logging.config import re import time import random import json from selenium import webdriver from dateutil import parser as date_parser from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.c...
37.123881
130
0.639931
import os import sys import six import pause import argparse import logging.config import re import time import random import json from selenium import webdriver from dateutil import parser as date_parser from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.c...
true
true
f75c6c13fa696910fed4bc6a4b29d2ca85a94128
1,416
py
Python
SCRM/manage.py
prakashar11/secure-cloud-native-fabric
8a6c51d8744c33afb8edc1455caaccb011f7e1de
[ "Apache-2.0" ]
2
2019-07-30T05:53:36.000Z
2019-10-26T20:11:52.000Z
SCRM/manage.py
prakashar11/secure-cloud-native-fabric
8a6c51d8744c33afb8edc1455caaccb011f7e1de
[ "Apache-2.0" ]
6
2019-06-17T05:22:32.000Z
2021-06-10T21:36:22.000Z
SCRM/manage.py
prakashar11/secure-cloud-native-fabric
8a6c51d8744c33afb8edc1455caaccb011f7e1de
[ "Apache-2.0" ]
3
2019-10-26T21:20:02.000Z
2020-06-01T14:25:17.000Z
# # Copyright 2019 Altran. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
36.307692
77
0.682203
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scrm.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
f75c6c4d9d187d23628348c8ec126fd5cde13512
4,109
py
Python
Retention/multi_cnn.py
Mohammed-Abbass/DeepEI
6466556e529afd9ef747105c21cba51cbac890fe
[ "Apache-2.0" ]
26
2020-03-18T15:05:24.000Z
2022-03-27T12:41:46.000Z
Retention/multi_cnn.py
Mohammed-Abbass/DeepEI
6466556e529afd9ef747105c21cba51cbac890fe
[ "Apache-2.0" ]
3
2021-04-08T05:32:18.000Z
2022-02-24T00:13:14.000Z
Retention/multi_cnn.py
Mohammed-Abbass/DeepEI
6466556e529afd9ef747105c21cba51cbac890fe
[ "Apache-2.0" ]
9
2020-04-25T15:28:30.000Z
2022-03-27T12:41:51.000Z
# -*- coding: utf-8 -*- """ Created on Thu Jan 9 09:22:42 2020 @author: hcji """ import numpy as np import tensorflow.keras.backend as K import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from tensorflow.keras.models import Model from tensorflow.keras.layers import Dense, Input, Fl...
34.241667
93
0.611828
import numpy as np import tensorflow.keras.backend as K import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from tensorflow.keras.models import Model from tensorflow.keras.layers import Dense, Input, Flatten, Conv1D, MaxPooling1D, concatenate from tensorflow.keras import optimizers fr...
true
true
f75c6d2ceb9b975767cc8ac96fb1bdef90584ca4
2,110
py
Python
examples/create_transcription_order.py
malarinv/rev-api
861b9667f9dc63260145b48b35b58feccb6fb4bb
[ "Apache-2.0" ]
null
null
null
examples/create_transcription_order.py
malarinv/rev-api
861b9667f9dc63260145b48b35b58feccb6fb4bb
[ "Apache-2.0" ]
null
null
null
examples/create_transcription_order.py
malarinv/rev-api
861b9667f9dc63260145b48b35b58feccb6fb4bb
[ "Apache-2.0" ]
1
2020-12-07T10:26:52.000Z
2020-12-07T10:26:52.000Z
#!/usr/bin/env python """ This script shows how to create a transcription order. To run this script, make sure the ~/.rev_settings file is properly filled. """ import pprint from rev.client import RevClient from rev.models.order_request import Input from rev.models.order_request import TranscriptionOptions from rev....
37.678571
383
0.699526
import pprint from rev.client import RevClient from rev.models.order_request import Input from rev.models.order_request import TranscriptionOptions from rev.models.order_request import OrderRequest from rev.models.order_request import Notification pp = pprint.PrettyPrinter(indent=4) client = RevClient() media = [ ...
true
true
f75c6dfd8ba5dc93ad490fa495e342744edd83b8
1,276
py
Python
bluebrain/repo-bluebrain/packages/py-neurom/package.py
Nabil-AL/spack
442d0725fe9726597c7c88274d379c0c994d926b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
bluebrain/repo-bluebrain/packages/py-neurom/package.py
Nabil-AL/spack
442d0725fe9726597c7c88274d379c0c994d926b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2022-03-01T02:26:40.000Z
2022-03-15T02:33:38.000Z
bluebrain/repo-bluebrain/packages/py-neurom/package.py
Nabil-AL/spack
442d0725fe9726597c7c88274d379c0c994d926b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNeurom(PythonPackage): """Python library neuron morphology analysis""" homepage = "...
39.875
96
0.665361
from spack import * class PyNeurom(PythonPackage): homepage = "https://github.com/BlueBrain/NeuroM" git = "https://github.com/BlueBrain/NeuroM.git" url = "https://pypi.io/packages/source/n/neurom/neurom-2.2.1.tar.gz" version('develop', branch='master') version('3.0.0', sha256='05f5f5c4292dfa23...
true
true
f75c6e0ea8eff3ff3cc733ad9ba6ef516eed7e00
576
py
Python
setup.py
nogira/py-binance-api
c869626713e579fe9aa0e163f48462a705cddd47
[ "MIT" ]
1
2021-08-10T07:40:24.000Z
2021-08-10T07:40:24.000Z
setup.py
nogira/py-binance-api
c869626713e579fe9aa0e163f48462a705cddd47
[ "MIT" ]
null
null
null
setup.py
nogira/py-binance-api
c869626713e579fe9aa0e163f48462a705cddd47
[ "MIT" ]
null
null
null
import pathlib from setuptools import setup # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() # This call to setup() does all the work setup( name="pybinanceapi", version="0.1.3", description="Python Wrapper f...
26.181818
53
0.711806
import pathlib from setuptools import setup HERE = pathlib.Path(__file__).parent README = (HERE / "README.md").read_text() setup( name="pybinanceapi", version="0.1.3", description="Python Wrapper for the Binance API", long_description=README, long_description_content_type="text/markdown", url...
true
true
f75c6f0c17796b995c40f5826776eca8d6e9d818
637
py
Python
inputs/pte/white_analyze.py
ur-whitelab/peptidesim
750a8e03a8eab6b6df020b37be36115d50500464
[ "BSD-4-Clause-UC" ]
6
2020-01-24T17:43:08.000Z
2021-10-06T07:15:20.000Z
inputs/pte/white_analyze.py
ur-whitelab/peptidesim
750a8e03a8eab6b6df020b37be36115d50500464
[ "BSD-4-Clause-UC" ]
85
2019-08-29T15:11:56.000Z
2021-08-03T04:10:48.000Z
inputs/pte/white_analyze.py
ur-whitelab/peptidesim
750a8e03a8eab6b6df020b37be36115d50500464
[ "BSD-4-Clause-UC" ]
1
2021-12-06T21:18:19.000Z
2021-12-06T21:18:19.000Z
import numpy as np from peptidesim import PeptideSim, utilities import sys import os import sys import gromacs from shutil import copyfile, move import fire def run(dir_name, seqs): ps = PeptideSim(dir_name, seqs) print(ps.sims_dict.keys()) eds_sim = ps.get_simulation('eds-equil') final_dir = os.path...
24.5
81
0.728414
import numpy as np from peptidesim import PeptideSim, utilities import sys import os import sys import gromacs from shutil import copyfile, move import fire def run(dir_name, seqs): ps = PeptideSim(dir_name, seqs) print(ps.sims_dict.keys()) eds_sim = ps.get_simulation('eds-equil') final_dir = os.path...
true
true
f75c6f2d6b93b1df31eca6cfe53351540864e409
20,125
py
Python
ivy/functional/backends/mxnet/old/general.py
matthewclso/ivy
b297fd89812ec96212ef6996a82c65fe3aab9d3c
[ "Apache-2.0" ]
null
null
null
ivy/functional/backends/mxnet/old/general.py
matthewclso/ivy
b297fd89812ec96212ef6996a82c65fe3aab9d3c
[ "Apache-2.0" ]
null
null
null
ivy/functional/backends/mxnet/old/general.py
matthewclso/ivy
b297fd89812ec96212ef6996a82c65fe3aab9d3c
[ "Apache-2.0" ]
null
null
null
""" Collection of MXNet general functions, wrapped to fit Ivy syntax and signature. """ # global import ivy _round = round import logging import mxnet as _mx import numpy as _np import math as _math from numbers import Number from operator import mul as _mul from functools import reduce as _reduce import multiprocessi...
34.638554
130
0.657789
import ivy _round = round import logging import mxnet as _mx import numpy as _np import math as _math from numbers import Number from operator import mul as _mul from functools import reduce as _reduce import multiprocessing as _multiprocessing from ivy.functional.ivy.old import default_device, default_dtype from ivy...
true
true
f75c6f6cd81c3ae02640007ba1eaf163ccb231b5
2,674
py
Python
NiaPy/algorithms/basic/ba.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
NiaPy/algorithms/basic/ba.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
NiaPy/algorithms/basic/ba.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
# encoding=utf8 # pylint: disable=mixed-indentation, multiple-statements, attribute-defined-outside-init, logging-not-lazy, no-self-use, line-too-long, singleton-comparison, arguments-differ import logging from numpy import full, apply_along_axis, argmin from NiaPy.algorithms.algorithm import Algorithm logging.basicCo...
31.458824
174
0.663052
import logging from numpy import full, apply_along_axis, argmin from NiaPy.algorithms.algorithm import Algorithm logging.basicConfig() logger = logging.getLogger('NiaPy.algorithms.basic') logger.setLevel('INFO') __all__ = ['BatAlgorithm'] class BatAlgorithm(Algorithm): def __init__(self, **kwargs): if kwargs.get(...
true
true
f75c6fa04208266e53910c8af2b545ecd30f7e19
4,345
py
Python
pytorch_basic_template/options.py
ldylab/deep_learning_with_pytorch
c86a2e24ee94ade1a78b66f10eb69b6e1fdd4463
[ "MIT" ]
null
null
null
pytorch_basic_template/options.py
ldylab/deep_learning_with_pytorch
c86a2e24ee94ade1a78b66f10eb69b6e1fdd4463
[ "MIT" ]
null
null
null
pytorch_basic_template/options.py
ldylab/deep_learning_with_pytorch
c86a2e24ee94ade1a78b66f10eb69b6e1fdd4463
[ "MIT" ]
null
null
null
import argparse import os def parse_common_args(parser): # 模型的选择 parser.add_argument('--model_type', type=str, default='cotnet50_fcn', help='used in model_entry.py') # 数据集的选择 parser.add_argument('--data_type', type=str, default='cifar_10_without_resize', help='used in data_entry.py') # 体现在名字里面 ...
38.794643
123
0.679632
import argparse import os def parse_common_args(parser): parser.add_argument('--model_type', type=str, default='cotnet50_fcn', help='used in model_entry.py') parser.add_argument('--data_type', type=str, default='cifar_10_without_resize', help='used in data_entry.py') parser.add_argument('--sav...
true
true
f75c6fa0801c6d052888d8c591ce25e3987dc6a8
751
py
Python
authors/apps/articles/renderers.py
andela/ah-robotics
d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf
[ "BSD-3-Clause" ]
3
2019-01-03T11:08:39.000Z
2019-06-21T18:20:58.000Z
authors/apps/articles/renderers.py
andela/ah-robotics
d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf
[ "BSD-3-Clause" ]
32
2019-01-07T21:47:10.000Z
2021-09-08T00:45:06.000Z
authors/apps/articles/renderers.py
andela/ah-robotics
d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf
[ "BSD-3-Clause" ]
6
2019-02-07T09:34:22.000Z
2020-05-31T15:37:52.000Z
import json from rest_framework import renderers class ArticleJsonRenderer(renderers.BaseRenderer): """ Renders a list of articles or a single instance of an article """ media_type = 'application/json' format = 'json' charset = 'utf-8' def render(self, data, accepted_media_type=None, ...
25.033333
65
0.556591
import json from rest_framework import renderers class ArticleJsonRenderer(renderers.BaseRenderer): media_type = 'application/json' format = 'json' charset = 'utf-8' def render(self, data, accepted_media_type=None, renderer_context=None): if 'count' in data.keys(): ...
true
true
f75c718cdd732978046477c1e2cfc2bcdecd2699
37,183
py
Python
src/data_utils.py
datacrisis/BOBBY2
0c88d7906acb9d46929a6f220b857d358518edf0
[ "MIT" ]
9
2019-11-11T16:13:40.000Z
2021-11-07T08:38:35.000Z
src/data_utils.py
datacrisis/BOBBY2
0c88d7906acb9d46929a6f220b857d358518edf0
[ "MIT" ]
null
null
null
src/data_utils.py
datacrisis/BOBBY2
0c88d7906acb9d46929a6f220b857d358518edf0
[ "MIT" ]
1
2020-02-15T07:37:50.000Z
2020-02-15T07:37:50.000Z
import torch, torchvision import os, PIL, random, csv import numpy as np import xml.etree.ElementTree as ET from PIL import Image, ImageDraw from matplotlib import pyplot as plt from torch.utils.data import Dataset from torchvision import transforms from pathlib import Path def compile_imgs(root_dir): """ De...
34.050366
137
0.599898
import torch, torchvision import os, PIL, random, csv import numpy as np import xml.etree.ElementTree as ET from PIL import Image, ImageDraw from matplotlib import pyplot as plt from torch.utils.data import Dataset from torchvision import transforms from pathlib import Path def compile_imgs(root_dir): _ = [root...
true
true
f75c728664993e626f1c3b2fea9c961ecb4050f0
5,541
py
Python
geocamUtil/management/commandUtil.py
finleyexp/georef_geocamutilweb
3ea2d2cf65928cba6ad6fb0a8b601e19d2cb17f6
[ "NASA-1.3" ]
null
null
null
geocamUtil/management/commandUtil.py
finleyexp/georef_geocamutilweb
3ea2d2cf65928cba6ad6fb0a8b601e19d2cb17f6
[ "NASA-1.3" ]
null
null
null
geocamUtil/management/commandUtil.py
finleyexp/georef_geocamutilweb
3ea2d2cf65928cba6ad6fb0a8b601e19d2cb17f6
[ "NASA-1.3" ]
4
2017-07-16T03:21:09.000Z
2019-11-12T20:29:36.000Z
#!/usr/bin/env python # __BEGIN_LICENSE__ # Copyright (C) 2008-2010 United States Government as represented by # the Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # __END_LICENSE__ import os import sys import imp import re import itertools import subprocess from django.cor...
29.631016
94
0.631655
import os import sys import imp import re import itertools import subprocess from django.core.management.base import BaseCommand STATUS_DIR_TEMPLATE = '%(siteDir)s/build/management/commandStatus/' def getSiteDir(): modImpPath = re.sub(r'\..*$', '', os.environ['DJANGO_SETTINGS_MODULE']) d = imp.find_mod...
false
true
f75c7287e8a789ffc3e908c79b6e15a20baa7aaa
1,600
py
Python
context_free_algos/cfpq/matmul.py
nikitavlaev/formal-languages
4e5212858e7cdaa6f2d5130189f88b66e317d25f
[ "Unlicense" ]
null
null
null
context_free_algos/cfpq/matmul.py
nikitavlaev/formal-languages
4e5212858e7cdaa6f2d5130189f88b66e317d25f
[ "Unlicense" ]
2
2020-09-17T19:11:45.000Z
2020-09-24T08:13:22.000Z
context_free_algos/cfpq/matmul.py
nikitavlaev/formal-languages
4e5212858e7cdaa6f2d5130189f88b66e317d25f
[ "Unlicense" ]
null
null
null
from context_free_algos.cfg import custom_CFG from utils.graph_utils import read_edges import pygraphblas as pgb def cfpq(edges, gram): n = 0 for edge in edges: n = max(n, edge[0], edge[2]) eps_productions, term_productions, norm_productions = gram.split_productions bool_ms = {} for nter...
28.571429
105
0.611875
from context_free_algos.cfg import custom_CFG from utils.graph_utils import read_edges import pygraphblas as pgb def cfpq(edges, gram): n = 0 for edge in edges: n = max(n, edge[0], edge[2]) eps_productions, term_productions, norm_productions = gram.split_productions bool_ms = {} for nter...
true
true
f75c729426f96ef94047e951aa1a7967a81d6a33
1,838
py
Python
src/api/tests/common.py
owenplesko/api
e104b8f2d3d57a51a0cbe56caffe907a2a237c18
[ "MIT" ]
null
null
null
src/api/tests/common.py
owenplesko/api
e104b8f2d3d57a51a0cbe56caffe907a2a237c18
[ "MIT" ]
null
null
null
src/api/tests/common.py
owenplesko/api
e104b8f2d3d57a51a0cbe56caffe907a2a237c18
[ "MIT" ]
null
null
null
import jwt from http.cookies import SimpleCookie from datetime import datetime from _main_.settings import SECRET_KEY from database.models import UserProfile def setupCC(client): client.post('/cc/import', { "Confirm": "Yes", "Actions":"carbon_calculator/content/Actions.csv", ...
32.821429
126
0.634929
import jwt from http.cookies import SimpleCookie from datetime import datetime from _main_.settings import SECRET_KEY from database.models import UserProfile def setupCC(client): client.post('/cc/import', { "Confirm": "Yes", "Actions":"carbon_calculator/content/Actions.csv", ...
true
true
f75c7394a7b36df28b0491847e09a0b4e1b34814
665
py
Python
mine/utils/helpers.py
Jumpst3r/mine-pytorch
41c68d1388664561996300a15e43e8cc4d805ded
[ "MIT" ]
null
null
null
mine/utils/helpers.py
Jumpst3r/mine-pytorch
41c68d1388664561996300a15e43e8cc4d805ded
[ "MIT" ]
null
null
null
mine/utils/helpers.py
Jumpst3r/mine-pytorch
41c68d1388664561996300a15e43e8cc4d805ded
[ "MIT" ]
null
null
null
import numpy as np import torch def batch(x, y, batch_size=1, shuffle=True): assert len(x) == len( y), "Input and target data must contain same number of elements" if isinstance(x, np.ndarray): x = torch.from_numpy(x).float() if isinstance(y, np.ndarray): y = torch.from_numpy(y).flo...
24.62963
72
0.57594
import numpy as np import torch def batch(x, y, batch_size=1, shuffle=True): assert len(x) == len( y), "Input and target data must contain same number of elements" if isinstance(x, np.ndarray): x = torch.from_numpy(x).float() if isinstance(y, np.ndarray): y = torch.from_numpy(y).flo...
true
true
f75c73db6694365b8f5a9f32516d2c04a5478eae
7,548
py
Python
sx/pisa3/pisa_document.py
Shapes/pisa-fix-django
62d7a0c1639ed8e9a45b756c30480771311e1dae
[ "Apache-2.0" ]
2
2016-03-10T08:48:51.000Z
2018-06-27T00:15:48.000Z
sx/pisa3/pisa_document.py
Shapes/pisa-fix-django
62d7a0c1639ed8e9a45b756c30480771311e1dae
[ "Apache-2.0" ]
5
2016-05-06T00:04:03.000Z
2019-04-05T21:37:30.000Z
sx/pisa3/pisa_document.py
Shapes/pisa-fix-django
62d7a0c1639ed8e9a45b756c30480771311e1dae
[ "Apache-2.0" ]
1
2020-07-20T13:53:15.000Z
2020-07-20T13:53:15.000Z
# -*- coding: ISO-8859-1 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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...
32.534483
116
0.537228
__reversion__ = "$Revision: 20 $" __author__ = "$Author: holtwick $" __date__ = "$Date: 2007-10-09 12:58:24 +0200 (Di, 09 Okt 2007) $" from pisa_context import pisaContext from pisa_parser import pisaParser from pisa_util import * from pisa_reportlab import * from pisa_default import DEFAULT_CSS from repor...
true
true
f75c74179f2c41d74bd2e40dd2c18cbb1ffd4507
99
py
Python
api/utils/db_create.py
mmvo91/flask-react-starter
926bbc0d956325c0421f7a7ed8c193f955b832fa
[ "MIT" ]
null
null
null
api/utils/db_create.py
mmvo91/flask-react-starter
926bbc0d956325c0421f7a7ed8c193f955b832fa
[ "MIT" ]
null
null
null
api/utils/db_create.py
mmvo91/flask-react-starter
926bbc0d956325c0421f7a7ed8c193f955b832fa
[ "MIT" ]
null
null
null
from api.server import create_app from api.extensions import sql sql.create_all(app=create_app())
19.8
33
0.818182
from api.server import create_app from api.extensions import sql sql.create_all(app=create_app())
true
true
f75c7586c50e3363d13e869f2c05f4f6dd0a72de
2,518
py
Python
examples/work/workchain_outline.py
tomzhang/aiida_core
949810e9f3daff0f748c5c9aa1dde4f5222bb49b
[ "BSD-2-Clause" ]
1
2019-04-29T12:39:31.000Z
2019-04-29T12:39:31.000Z
examples/work/workchain_outline.py
tomzhang/aiida_core
949810e9f3daff0f748c5c9aa1dde4f5222bb49b
[ "BSD-2-Clause" ]
null
null
null
examples/work/workchain_outline.py
tomzhang/aiida_core
949810e9f3daff0f748c5c9aa1dde4f5222bb49b
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env runaiida # -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
30.707317
86
0.553614
from __future__ import absolute_import from __future__ import print_function from aiida.orm.data.int import Int from aiida import work from aiida.work.workchain import while_, if_ class OutlineWorkChain(work.WorkChain): @classmethod def define(cls, spec): super(OutlineWorkChain, cls).define(spec) ...
true
true
f75c7597045ba94aa277330ee78d3a6788259945
833
py
Python
venv/bin/rst2latex.py
databill86/HyperFoods
9267937c8c70fd84017c0f153c241d2686a356dd
[ "MIT" ]
2
2020-09-30T00:11:09.000Z
2021-10-04T13:00:38.000Z
venv/bin/rst2latex.py
databill86/HyperFoods
9267937c8c70fd84017c0f153c241d2686a356dd
[ "MIT" ]
null
null
null
venv/bin/rst2latex.py
databill86/HyperFoods
9267937c8c70fd84017c0f153c241d2686a356dd
[ "MIT" ]
null
null
null
#!/Users/luisrita/PycharmProjects/HyperFoods/venv/bin/python # $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing LaTeX. """ try: import locale...
30.851852
76
0.680672
try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline description = ('Generates LaTeX documents from standalone reStructuredText ' 'sources. ' 'Reads from <source> (default is stdin) and writes to ' '<d...
true
true
f75c759b74b0a82cab44ff17cc60bd277d75c03d
921
py
Python
src/mock_vws/_query_validators/fields_validators.py
VWS-Python/vws-python-mock
949a19a28791b8f527ef52a3378f7ec058089b33
[ "MIT" ]
1
2018-10-02T21:20:24.000Z
2018-10-02T21:20:24.000Z
src/mock_vws/_query_validators/fields_validators.py
VWS-Python/vws-python-mock
949a19a28791b8f527ef52a3378f7ec058089b33
[ "MIT" ]
420
2020-05-18T21:49:55.000Z
2022-03-31T05:28:33.000Z
src/mock_vws/_query_validators/fields_validators.py
admdev8/vws-python-mock
af88d04ce11aaa6c148ae0a1d71f64663f33f8d3
[ "MIT" ]
1
2020-09-06T07:05:40.000Z
2020-09-06T07:05:40.000Z
""" Validators for the fields given. """ import cgi import io from typing import Dict from mock_vws._query_validators.exceptions import UnknownParameters def validate_extra_fields( request_headers: Dict[str, str], request_body: bytes, ) -> None: """ Validate that the no unknown fields are given. ...
21.928571
74
0.664495
import cgi import io from typing import Dict from mock_vws._query_validators.exceptions import UnknownParameters def validate_extra_fields( request_headers: Dict[str, str], request_body: bytes, ) -> None: body_file = io.BytesIO(request_body) _, pdict = cgi.parse_header(request_headers['Content-Type...
true
true
f75c7898e52d89504db1b8184bf88595d60c083a
6,539
py
Python
Chatbot_Model/Question_Pairs_Matching/train.py
guci314/Chatbot_CN
02044eed4a141aa8c61d6064c166f95dbdae894c
[ "Apache-2.0" ]
8
2019-08-12T12:38:35.000Z
2022-02-21T03:25:04.000Z
Chatbot_Model/Question_Pairs_Matching/train.py
JianboTang/Chatbot_CN
a0f7194252a189f8bc2b62fd16eb2abe432c0bf9
[ "Apache-2.0" ]
null
null
null
Chatbot_Model/Question_Pairs_Matching/train.py
JianboTang/Chatbot_CN
a0f7194252a189f8bc2b62fd16eb2abe432c0bf9
[ "Apache-2.0" ]
5
2020-01-08T15:30:38.000Z
2022-02-15T02:39:46.000Z
import tensorflow as tf from Chatbot_Model.Question_Pairs_Matching import data_prepare from tensorflow.contrib import learn import numpy as np from Chatbot_Model.Question_Pairs_Matching import esim_model import Chatbot_Model.Question_Pairs_Matching.config as config from tqdm import tqdm from sklearn.metrics import f1_s...
45.727273
111
0.528827
import tensorflow as tf from Chatbot_Model.Question_Pairs_Matching import data_prepare from tensorflow.contrib import learn import numpy as np from Chatbot_Model.Question_Pairs_Matching import esim_model import Chatbot_Model.Question_Pairs_Matching.config as config from tqdm import tqdm from sklearn.metrics import f1_s...
true
true
f75c78fd9be413009f0ca929efffb0845e6bea3e
2,015
py
Python
Scalar and Vector Fields/src/divCurl.py
ValeriaTelles/Physics-Programs
9fdd1b60ad5dd9c6750855bf63c2aa89383a0b1a
[ "MIT" ]
null
null
null
Scalar and Vector Fields/src/divCurl.py
ValeriaTelles/Physics-Programs
9fdd1b60ad5dd9c6750855bf63c2aa89383a0b1a
[ "MIT" ]
null
null
null
Scalar and Vector Fields/src/divCurl.py
ValeriaTelles/Physics-Programs
9fdd1b60ad5dd9c6750855bf63c2aa89383a0b1a
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt # deriv computes 1D derivative, dF/dr, using central difference method def deriv(F,r): # get the length of array F (assume same length for r) L = F.size # create empty array to store results result= np.empty(L) # use central diff method for all interi...
26.513158
86
0.630273
import numpy as np import matplotlib.pyplot as plt def deriv(F,r): L = F.size result= np.empty(L) for i in range(L-2): result[i+1] = (F[i+2] - F[i]) / (r[i+2] - r[i]) result[0] = (F[1] - F[0]) / (r[1] - r[0]) result[L-1] = (F[L-1] - F[L-2]) / (r[L-1] - r[L-2]) return ...
true
true
f75c7b45cd1eb26f651197848ca5ea81df334dc5
12,879
py
Python
pandas/tseries/resample.py
breisfeld/pandas
f1fd50bb8e7603042fe93e01e862766673e33450
[ "BSD-3-Clause" ]
null
null
null
pandas/tseries/resample.py
breisfeld/pandas
f1fd50bb8e7603042fe93e01e862766673e33450
[ "BSD-3-Clause" ]
null
null
null
pandas/tseries/resample.py
breisfeld/pandas
f1fd50bb8e7603042fe93e01e862766673e33450
[ "BSD-3-Clause" ]
null
null
null
from datetime import timedelta import numpy as np from pandas.core.groupby import BinGrouper, CustomGrouper from pandas.tseries.frequencies import to_offset, is_subperiod, is_superperiod from pandas.tseries.index import DatetimeIndex, date_range from pandas.tseries.offsets import DateOffset from pandas.tseries.period...
32.440806
78
0.608044
from datetime import timedelta import numpy as np from pandas.core.groupby import BinGrouper, CustomGrouper from pandas.tseries.frequencies import to_offset, is_subperiod, is_superperiod from pandas.tseries.index import DatetimeIndex, date_range from pandas.tseries.offsets import DateOffset from pandas.tseries.period...
false
true
f75c7bcd8350127e07b23d02a14f476e836aa307
8,636
py
Python
sdk/python/pulumi_azure_nextgen/relay/latest/wcf_relay.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/relay/latest/wcf_relay.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/relay/latest/wcf_relay.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
44.515464
308
0.657596
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from ._enums import * __all__ = ['WCFRelay'] warnings.warn("""The 'latest' version is deprecated. Please migrate to the resource in the top-level module: 'azure-nextgen:r...
true
true
f75c7cc6ef0dbe6b68f12f1c5d1db311a4cff1d4
2,682
py
Python
test/test_npu/test_network_ops/test_norm_except_dim.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_norm_except_dim.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_norm_except_dim.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
35.289474
77
0.677852
import torch import numpy as np import math import random from torch._six import nan from common_utils import TestCase, run_tests from common_device_type import dtypes, instantiate_device_type_tests class TestNormExceptDim(TestCase): def generate_data(self, min, max, shape, dtype): input1 = np.random.uni...
true
true
f75c7d3bac27ad5c770139212e74ee632a6e7f46
26,452
py
Python
lib/sqlalchemy/orm/interfaces.py
atugushev/sqlalchemy
3cb614009ee87a115ec7230949c031402efb17c1
[ "MIT" ]
1
2020-02-08T20:04:42.000Z
2020-02-08T20:04:42.000Z
lib/sqlalchemy/orm/interfaces.py
atugushev/sqlalchemy
3cb614009ee87a115ec7230949c031402efb17c1
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/interfaces.py
atugushev/sqlalchemy
3cb614009ee87a115ec7230949c031402efb17c1
[ "MIT" ]
null
null
null
# orm/interfaces.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Contains various base classes used throughout the ORM. Defines some key base...
33.39899
79
0.651369
from __future__ import absolute_import import collections from . import exc as orm_exc from . import path_registry from .base import _MappedAttribute from .base import EXT_CONTINUE from .base import EXT_SKIP from .base import EXT_STOP from .base import InspectionAttr from .base import InspectionAttrInfo from .ba...
true
true
f75c7d6e41ee95c9b18cf2bfab75e93b92e084ec
4,112
py
Python
src/my_keyboard.py
aftersomemath/l2race
d8ea8e7cef98020ad7e8d9cc37b504558d2c2d8f
[ "MIT" ]
null
null
null
src/my_keyboard.py
aftersomemath/l2race
d8ea8e7cef98020ad7e8d9cc37b504558d2c2d8f
[ "MIT" ]
null
null
null
src/my_keyboard.py
aftersomemath/l2race
d8ea8e7cef98020ad7e8d9cc37b504558d2c2d8f
[ "MIT" ]
null
null
null
# Driver control input from keyboard from threading import Thread from typing import Tuple import pygame from src.l2race_utils import my_logger from src.globals import * from tkinter import * logger = my_logger(__name__) from src.car_command import car_command from src.user_input import user_input def show_help(): ...
32.377953
103
0.630107
from threading import Thread from typing import Tuple import pygame from src.l2race_utils import my_logger from src.globals import * from tkinter import * logger = my_logger(__name__) from src.car_command import car_command from src.user_input import user_input def show_help(): print(HELP) thread=Threa...
true
true
f75c7dc4b12531aff860db8fae52e9b184c24983
2,822
py
Python
benchmarks/spiral_exp.py
NeuroDataDesign/kdg
510e27973779a59cc310e1eb7497bc29699f5e4e
[ "MIT" ]
2
2021-09-05T22:16:35.000Z
2021-09-28T16:33:46.000Z
benchmarks/spiral_exp.py
NeuroDataDesign/kdg
510e27973779a59cc310e1eb7497bc29699f5e4e
[ "MIT" ]
null
null
null
benchmarks/spiral_exp.py
NeuroDataDesign/kdg
510e27973779a59cc310e1eb7497bc29699f5e4e
[ "MIT" ]
1
2021-11-02T23:43:37.000Z
2021-11-02T23:43:37.000Z
#%% from kdg.utils import generate_spirals, generate_gaussian_parity from kdg import kdf,kdn from keras import layers import keras # %% network = keras.Sequential() #network.add(layers.Dense(2, activation="relu", input_shape=(2))) network.add(layers.Dense(3, activation='relu', input_shape=(2,))) network.add(layers.Dens...
37.131579
167
0.525159
from kdg.utils import generate_spirals, generate_gaussian_parity from kdg import kdf,kdn from keras import layers import keras network = keras.Sequential() network.add(layers.Dense(3, activation='relu', input_shape=(2,))) network.add(layers.Dense(3, activation='relu')) network.add(layers.Dense(units=2, activation = 'so...
true
true
f75c7def3a7079e44de88b74d8137bf8221cfdf2
2,250
py
Python
experiments/cifar/model/cifar/__init__.py
chandar-lab/CriticalGradientOptimization
1af4b1df40489991289bb50bb69859a00b2c97c6
[ "MIT" ]
1
2021-07-12T03:13:39.000Z
2021-07-12T03:13:39.000Z
experiments/cifar/model/cifar/__init__.py
chandar-lab/CriticalGradientOptimization
1af4b1df40489991289bb50bb69859a00b2c97c6
[ "MIT" ]
null
null
null
experiments/cifar/model/cifar/__init__.py
chandar-lab/CriticalGradientOptimization
1af4b1df40489991289bb50bb69859a00b2c97c6
[ "MIT" ]
null
null
null
"""The models subpackage contains definitions for the following model for CIFAR10/CIFAR100 architectures: - `AlexNet`_ - `VGG`_ - `ResNet`_ - `SqueezeNet`_ - `DenseNet`_ You can construct a model with random weights by calling its constructor: .. code:: python import torchvision.models as models resnet...
31.690141
76
0.537778
from __future__ import absolute_import from .alexnet import * from .densenet import * from .preresnet import * from .resnet import * from .resnext import * from .vgg import * from .wrn import *
true
true
f75c7e51feaaf6ac86ca6b36044d9d981e9836f9
1,885
py
Python
setup.py
smarkets/bucky3
7bca15c28d3e55027b831923c43a811da9d62ecb
[ "Apache-2.0" ]
null
null
null
setup.py
smarkets/bucky3
7bca15c28d3e55027b831923c43a811da9d62ecb
[ "Apache-2.0" ]
null
null
null
setup.py
smarkets/bucky3
7bca15c28d3e55027b831923c43a811da9d62ecb
[ "Apache-2.0" ]
1
2022-03-26T12:11:29.000Z
2022-03-26T12:11:29.000Z
# -*- coding: utf-8 - # # 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 ...
33.070175
109
0.662599
from setuptools import setup from bucky3 import __version__ setup( name='bucky3', version=__version__, description='Monitoring agent for Linux and Docker with StatsD, Carbon, InfluxDB and Prometheus support', author='Jarek Siembida', author_email='jarek.siembida@gmail.com', license='ASF2.0', ...
true
true
f75c7e90d2d344dea5e8d4d576d29bc25dc8da3e
103
py
Python
redis_loader/redis_loader/loaders/__init__.py
ATintern/microservices
8ef54f3d0336fb9a419579bf25281cb998f0d8da
[ "Apache-2.0" ]
1
2021-11-22T20:52:37.000Z
2021-11-22T20:52:37.000Z
redis_loader/redis_loader/loaders/__init__.py
ATintern/microservices
8ef54f3d0336fb9a419579bf25281cb998f0d8da
[ "Apache-2.0" ]
34
2020-09-10T17:19:00.000Z
2021-09-14T18:26:08.000Z
redis_loader/redis_loader/loaders/__init__.py
legumeinfo/lis_gcv_microservices
363310ed029f50c19ac4520371bb42e4d8b0454e
[ "Apache-2.0" ]
5
2021-11-15T23:46:08.000Z
2022-01-30T18:43:10.000Z
from .chado import loadFromChado from .gff import loadFromGFF from .redisearch import RediSearchLoader
25.75
40
0.854369
from .chado import loadFromChado from .gff import loadFromGFF from .redisearch import RediSearchLoader
true
true
f75c7eb09f23412c09c9d44dfcc1e40a4e81c233
75,695
py
Python
cvpysdk/commcell.py
jack1806/cvpysdk
6aa0beb426a95de877cd531602234515723ccc94
[ "Apache-2.0" ]
1
2021-02-27T05:31:38.000Z
2021-02-27T05:31:38.000Z
cvpysdk/commcell.py
jack1806/cvpysdk
6aa0beb426a95de877cd531602234515723ccc94
[ "Apache-2.0" ]
null
null
null
cvpysdk/commcell.py
jack1806/cvpysdk
6aa0beb426a95de877cd531602234515723ccc94
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # Copyright Commvault Systems, 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 a...
34.754362
131
0.553643
from __future__ import absolute_import from __future__ import unicode_literals import getpass import socket from base64 import b64encode from past.builtins import basestring from requests.exceptions import SSLError from requests.exceptions import Timeout from requests.exceptions import ConnectionErr...
true
true
f75c804799bb56b3c0296c40eaa30212acdf8ab1
1,257
py
Python
migrations/versions/7bd1ee1840ca_meta_table.py
cowsarecool5/DailyNotes
cd15bb881456a537db97e9280bbfc7733bce2ce6
[ "MIT" ]
437
2020-01-19T01:28:31.000Z
2022-03-30T05:25:40.000Z
migrations/versions/7bd1ee1840ca_meta_table.py
cowsarecool5/DailyNotes
cd15bb881456a537db97e9280bbfc7733bce2ce6
[ "MIT" ]
51
2020-01-19T09:20:27.000Z
2022-03-27T14:27:10.000Z
migrations/versions/7bd1ee1840ca_meta_table.py
cowsarecool5/DailyNotes
cd15bb881456a537db97e9280bbfc7733bce2ce6
[ "MIT" ]
28
2020-05-08T10:42:24.000Z
2022-03-05T19:25:29.000Z
"""Meta Table Revision ID: 7bd1ee1840ca Revises: 9ca5901af374 Create Date: 2020-01-30 01:13:40.069188 """ from alembic import op import sqlalchemy as sa import app.model_types # revision identifiers, used by Alembic. revision = '7bd1ee1840ca' down_revision = '9ca5901af374' branch_labels = None depends_on = None d...
29.928571
72
0.676213
from alembic import op import sqlalchemy as sa import app.model_types revision = '7bd1ee1840ca' down_revision = '9ca5901af374' branch_labels = None depends_on = None def upgrade(): op.create_table('meta', sa.Column('uuid', app.model_types.GUID(), nullable=False), sa.Column('user_id', app.model_types...
true
true
f75c82ab7e790063e357a022c407892bf8ec179e
3,869
py
Python
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/list_flavors_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/list_flavors_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/list_flavors_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListFlavorsResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
27.246479
79
0.57069
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListFlavorsResponse(SdkResponse): sensitive_list = [] openapi_types = { 'total_count': 'int', 'flavors': 'list[ListFlavorsResult]...
true
true
f75c82c29bdfd0241e1932f4c0e7da70f01fbb95
356
py
Python
hive/server/follow_api/methods.py
abitmore/hivemind
a68d8dd49d5d79caccf988a1ff6cba4703adae49
[ "MIT" ]
45
2021-05-23T21:06:49.000Z
2022-03-22T23:04:25.000Z
hive/server/follow_api/methods.py
abitmore/hivemind
a68d8dd49d5d79caccf988a1ff6cba4703adae49
[ "MIT" ]
1
2021-08-03T10:57:23.000Z
2021-08-03T10:58:05.000Z
hive/server/follow_api/methods.py
abitmore/hivemind
a68d8dd49d5d79caccf988a1ff6cba4703adae49
[ "MIT" ]
30
2021-05-28T16:23:53.000Z
2021-09-09T00:28:34.000Z
from hive.server.condenser_api.methods import _get_account_reputations_impl from hive.server.common.helpers import return_error_info @return_error_info async def get_account_reputations(context, account_lower_bound: str = '', limit: int = 1000): db = context['db'] return await _get_account_reputations_impl(db,...
44.5
93
0.814607
from hive.server.condenser_api.methods import _get_account_reputations_impl from hive.server.common.helpers import return_error_info @return_error_info async def get_account_reputations(context, account_lower_bound: str = '', limit: int = 1000): db = context['db'] return await _get_account_reputations_impl(db,...
true
true
f75c8374ccedce379767349aa84bb88ce214a929
2,377
py
Python
belphegor/utils/datetime_utils.py
nguuuquaaa/Awoken-Belphegor
d8c5a53ba2958947302f36ed16ecdf038033a19c
[ "WTFPL" ]
null
null
null
belphegor/utils/datetime_utils.py
nguuuquaaa/Awoken-Belphegor
d8c5a53ba2958947302f36ed16ecdf038033a19c
[ "WTFPL" ]
null
null
null
belphegor/utils/datetime_utils.py
nguuuquaaa/Awoken-Belphegor
d8c5a53ba2958947302f36ed16ecdf038033a19c
[ "WTFPL" ]
null
null
null
from datetime import datetime, timedelta from pytz import timezone import time #=============================================================================================================================# UTC = timezone("UTC") JST = timezone("Asia/Tokyo") PDT = timezone("US/Pacific") def now(tzinfo = UTC) -> datet...
29.345679
147
0.49979
from datetime import datetime, timedelta from pytz import timezone import time UTC = timezone("UTC") JST = timezone("Asia/Tokyo") PDT = timezone("US/Pacific") def now(tzinfo = UTC) -> datetime: return datetime.now(tzinfo) def as_jp_time(dt: datetime) -> str: return dt.astimezone(JST).strftime("%a, %Y-%m-%d ...
true
true
f75c861ed61c97efe06e7ff390e38c59a6a9a0c1
19,908
py
Python
tests/test_recipes.py
a283910020/yummy-rest
066f48e0219ac2c64daea0b393f62d921be4394d
[ "MIT" ]
4
2018-11-16T21:43:25.000Z
2020-11-23T08:26:05.000Z
tests/test_recipes.py
a283910020/yummy-rest
066f48e0219ac2c64daea0b393f62d921be4394d
[ "MIT" ]
12
2017-12-22T09:10:51.000Z
2018-06-17T17:16:16.000Z
tests/test_recipes.py
a283910020/yummy-rest
066f48e0219ac2c64daea0b393f62d921be4394d
[ "MIT" ]
5
2018-03-02T08:03:28.000Z
2020-05-25T14:59:59.000Z
""" This is the unit test suite for the recipes endpoint """ import json from app.helpers import _clean_name from .test_auth import BaseTestCase from .helpers import register_user, login_user, test_category, test_recipe, test_recipe_update,\ invalid_recipe # Linting exceptions # pylint: disable=C0...
44.044248
100
0.599056
import json from app.helpers import _clean_name from .test_auth import BaseTestCase from .helpers import register_user, login_user, test_category, test_recipe, test_recipe_update,\ invalid_recipe class RecipesTestCase(BaseTestCase): def set_up(self): with self.client as test_client: ...
true
true
f75c8620d862d82402e85ba5dbaecdc06f04bc2d
12,068
py
Python
input-files/desy_2021/INPUT_DESY-2021_Ti64_High_Temp_16alpha_4beta_iCSF_06.py
LightForm-group/continuous-peak-fit-analysis
e3133a016e64f45be6cb560d5cedc257bfe653a9
[ "MIT" ]
null
null
null
input-files/desy_2021/INPUT_DESY-2021_Ti64_High_Temp_16alpha_4beta_iCSF_06.py
LightForm-group/continuous-peak-fit-analysis
e3133a016e64f45be6cb560d5cedc257bfe653a9
[ "MIT" ]
null
null
null
input-files/desy_2021/INPUT_DESY-2021_Ti64_High_Temp_16alpha_4beta_iCSF_06.py
LightForm-group/continuous-peak-fit-analysis
e3133a016e64f45be6cb560d5cedc257bfe653a9
[ "MIT" ]
null
null
null
# Input parameters for Ti64 # data drive. import os drive = "/mnt/iusers01/jf01/mbcx9cd4/rds_lightform/" # properties of the data files. datafile_directory = drive + 'SXRD_raw_data/desy_2021/diffraction_images/Def_04' datafile_Basename = "Ti64_Rolled_ND_Compress_910C_1-00s-1_Multi-Hit_Temp_Cycl_4Cs-1_810_Cool_4Cs-1...
33.337017
121
0.297812
import os drive = "/mnt/iusers01/jf01/mbcx9cd4/rds_lightform/" datafile_directory = drive + 'SXRD_raw_data/desy_2021/diffraction_images/Def_04' datafile_Basename = "Ti64_Rolled_ND_Compress_910C_1-00s-1_Multi-Hit_Temp_Cycl_4Cs-1_810_Cool_4Cs-1_Def04_3-" datafile_Ending = ".tif" datafile_StartNum = 1 datafile_End...
true
true
f75c873bc5edcb4fb50ea392eb9004c2ff2272e1
818
py
Python
main_api/urls.py
AsMdHabibullah/backend-md-abdulhakim
72b37303c4909410de4502a754409ef61abb7706
[ "MIT" ]
null
null
null
main_api/urls.py
AsMdHabibullah/backend-md-abdulhakim
72b37303c4909410de4502a754409ef61abb7706
[ "MIT" ]
7
2020-06-06T00:30:42.000Z
2021-06-10T19:15:26.000Z
main_api/urls.py
asmdhabibullah/backend-md-forhad-uddin
03127a6136eb4a22e9a8b101dd4053b73e0795ba
[ "MIT" ]
null
null
null
from django.urls import path from rest_framework.routers import DefaultRouter from main_api.views import ( AboutViews, SkillsViews, EducationsViews, ExperienceViews, RecommendationViews, InterestedViews, ClientsViews, ArticleViews ) router = DefaultRouter() router.register('about', AboutViews, base_name='about') ...
43.052632
127
0.810513
from django.urls import path from rest_framework.routers import DefaultRouter from main_api.views import ( AboutViews, SkillsViews, EducationsViews, ExperienceViews, RecommendationViews, InterestedViews, ClientsViews, ArticleViews ) router = DefaultRouter() router.register('about', AboutViews, base_name='about') ...
true
true
f75c874135353d936f2ae99110976db27ffffd8d
5,887
py
Python
lib/tests/streamlit/help_test.py
ChangHoon-Sung/streamlit
83e0b80d2fa13e29e83d092a9fc4d946460bbf73
[ "Apache-2.0" ]
1
2022-02-17T15:21:41.000Z
2022-02-17T15:21:41.000Z
lib/tests/streamlit/help_test.py
ChangHoon-Sung/streamlit
83e0b80d2fa13e29e83d092a9fc4d946460bbf73
[ "Apache-2.0" ]
1
2022-02-06T11:26:17.000Z
2022-02-06T11:26:43.000Z
lib/tests/streamlit/help_test.py
AlexRogalskiy/streamlit
d153db37d97faada87bf88972886cda5a624f8c8
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2022 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.116564
82
0.640394
from tests import testutil import streamlit as st import numpy as np class StHelpTest(testutil.DeltaGeneratorTestCase): def test_basic_func_with_doc(self): def my_func(some_param, another_param=123): pass st.help(my_func) ds = self.get_delta_from_queue().new_element.doc_s...
true
true
f75c8783c3f8f37406bf2ef5199b5596a4db3e66
45,063
py
Python
utils/gen_onnx_mlir.py
RobbiePerrone320/onnx-mlir
2127e9177f4cbc28b7e860b0876af936ddae80bc
[ "Apache-2.0" ]
null
null
null
utils/gen_onnx_mlir.py
RobbiePerrone320/onnx-mlir
2127e9177f4cbc28b7e860b0876af936ddae80bc
[ "Apache-2.0" ]
null
null
null
utils/gen_onnx_mlir.py
RobbiePerrone320/onnx-mlir
2127e9177f4cbc28b7e860b0876af936ddae80bc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict, OrderedDict from io import StringIO import io import os import sys import datetime import argparse import nump...
35.315831
105
0.596898
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict, OrderedDict from io import StringIO import io import os import sys import datetime import argparse import numpy as np from onnx im...
true
true
f75c87c840be91af78e633fdedce47c80a0cdf5f
25,409
py
Python
website/migrations/0014_auto__add_field_answertranslation_active__add_field_questiontranslatio.py
evrenesat/ganihomes
eece2d8d957989b176cc5a36d723f676862f8d17
[ "BSD-2-Clause" ]
24
2016-08-06T18:10:54.000Z
2022-03-04T11:47:39.000Z
website/migrations/0014_auto__add_field_answertranslation_active__add_field_questiontranslatio.py
evrenesat/ganihomes
eece2d8d957989b176cc5a36d723f676862f8d17
[ "BSD-2-Clause" ]
1
2017-03-28T02:36:50.000Z
2017-03-28T07:18:57.000Z
website/migrations/0014_auto__add_field_answertranslation_active__add_field_questiontranslatio.py
evrenesat/ganihomes
eece2d8d957989b176cc5a36d723f676862f8d17
[ "BSD-2-Clause" ]
13
2017-03-28T02:35:32.000Z
2022-02-21T23:36:15.000Z
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AnswerTranslation.active' db.add_column('website_answertranslation', 'active', self.gf('dj...
81.178914
182
0.555551
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('website_answertranslation', 'active', self.gf('django.db.models.fields.BooleanField')(default=True), keep_def...
true
true
f75c88a0c8cb45a79db52b27d9787392ca42e62f
5,133
py
Python
kubernetes_asyncio/client/models/v1beta1_ingress_class_spec.py
opsani/kubernetes_asyncio
55283bf6f3690e5c0a0c589cd752221511e2be51
[ "Apache-2.0" ]
196
2018-05-23T16:55:41.000Z
2022-03-31T10:09:40.000Z
kubernetes_asyncio/client/models/v1beta1_ingress_class_spec.py
tomplus/kubernetes_asyncio
e8c8686ec11be3a5295ae9d5d8728299492a61f8
[ "Apache-2.0" ]
164
2018-05-20T20:39:03.000Z
2022-03-29T22:57:04.000Z
kubernetes_asyncio/client/models/v1beta1_ingress_class_spec.py
opsani/kubernetes_asyncio
55283bf6f3690e5c0a0c589cd752221511e2be51
[ "Apache-2.0" ]
41
2018-06-08T00:39:53.000Z
2022-01-12T18:19:06.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.18.20 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six f...
34.449664
419
0.634327
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1beta1IngressClassSpec(object): openapi_types = { 'controller': 'str', 'parameters': 'V1TypedLocalObjectReference' } attribute_map = { 'controller': 'controller', ...
true
true
f75c8902eda9e3eee7a9dfc2b8a317da035d897c
13,629
py
Python
3DCNN.py
YLFF/2004P_Pytorch-Networks
2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05
[ "MIT" ]
454
2019-12-26T15:04:02.000Z
2020-10-24T13:57:35.000Z
3DCNN.py
YLFF/2004P_Pytorch-Networks
2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05
[ "MIT" ]
1
2020-05-14T06:01:18.000Z
2020-05-14T06:01:18.000Z
3DCNN.py
YLFF/2004P_Pytorch-Networks
2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05
[ "MIT" ]
17
2019-12-27T12:19:47.000Z
2020-02-03T07:42:05.000Z
# --------------------------------------------------------------------------- # # ResNet, CVPR2016 bestpaper, https://arxiv.org/abs/1512.03385 # pytorch implementation by Haiyang Liu (haiyangliu1997@gmail.com) # --------------------------------------------------------------------------- # import torch import torch.nn...
38.069832
129
0.525424
import torch import torch.nn as nn import torch.nn.functional as F from config import cfg from utils import load_cfg,model_complexity __all__ = ['ResNet18','ResNet34','ResNet50','ResNet101','ResNet152'] class LambdaLayer(nn.Module): def __init__(self, lambd): super(LambdaLayer, self).__init__() ...
true
true
f75c8a19027a51681d6a94f7f1fa11dd82912c2f
125
py
Python
napari_j/_tests/surrogate/__init__ (copy).py
jaimergp/napari-J
4aec56a33c843ac9d03181ba31d61eb0fdbb754d
[ "MIT" ]
null
null
null
napari_j/_tests/surrogate/__init__ (copy).py
jaimergp/napari-J
4aec56a33c843ac9d03181ba31d61eb0fdbb754d
[ "MIT" ]
null
null
null
napari_j/_tests/surrogate/__init__ (copy).py
jaimergp/napari-J
4aec56a33c843ac9d03181ba31d61eb0fdbb754d
[ "MIT" ]
null
null
null
from surrogate import surrogate __all__ = ('surrogate', 'VERSION') VERSION = '0.1' AUTHOR = 'Kostia Balitsky aka ikostia'
15.625
38
0.72
from surrogate import surrogate __all__ = ('surrogate', 'VERSION') VERSION = '0.1' AUTHOR = 'Kostia Balitsky aka ikostia'
true
true
f75c8aa35685c8c0af7c34998ed726deb5c62d5d
8,575
py
Python
index_concepts.py
feup-infolab/latex-index-tools
5fab73e33a7adbe98945976d4955994c4364d07b
[ "BSD-3-Clause" ]
2
2021-03-11T17:41:08.000Z
2021-08-06T10:54:15.000Z
index_concepts.py
feup-infolab/latex-index-tools
5fab73e33a7adbe98945976d4955994c4364d07b
[ "BSD-3-Clause" ]
null
null
null
index_concepts.py
feup-infolab/latex-index-tools
5fab73e33a7adbe98945976d4955994c4364d07b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # index_concepts.py # José Devezas <joseluisdevezas@gmail.com> # 2020-06-12 import argparse import csv import glob import operator import os import re import sys import tempfile from collections import defaultdict from itertools import chain from shutil import copy2, copytree import ahocorasic...
31.877323
117
0.542157
import argparse import csv import glob import operator import os import re import sys import tempfile from collections import defaultdict from itertools import chain from shutil import copy2, copytree import ahocorasick DISTANCE = 200 THESIS_STOPWORDS = set([ 'entity', 'information', 'document', 'm...
true
true
f75c8b5264dbd0930feafeb037b87edf4003f926
521
py
Python
draw.py
ravinsinghd/opencv-basic
b3b59b8808c739bc403b2ef7b499b03225bfab5f
[ "MIT" ]
null
null
null
draw.py
ravinsinghd/opencv-basic
b3b59b8808c739bc403b2ef7b499b03225bfab5f
[ "MIT" ]
null
null
null
draw.py
ravinsinghd/opencv-basic
b3b59b8808c739bc403b2ef7b499b03225bfab5f
[ "MIT" ]
null
null
null
import numpy as np import cv2 img=np.zeros((512,512,3),np.uint8) cv2.line(img,(0,0),(511,511),(255,0,0),5) cv2.rectangle(img,(384,0),(510,218),(0,255,0),3) cv2.circle(img,(447,63),63,(0,0,255),9) cv2.ellipse(img,(256,256),(100,50),0,0,180,255,-1) pts = np.array([[10,5],[20,30],[70,20],[50,10]], np.int32) pts = pts.resh...
37.214286
71
0.660269
import numpy as np import cv2 img=np.zeros((512,512,3),np.uint8) cv2.line(img,(0,0),(511,511),(255,0,0),5) cv2.rectangle(img,(384,0),(510,218),(0,255,0),3) cv2.circle(img,(447,63),63,(0,0,255),9) cv2.ellipse(img,(256,256),(100,50),0,0,180,255,-1) pts = np.array([[10,5],[20,30],[70,20],[50,10]], np.int32) pts = pts.resh...
true
true
f75c8bb83b579871b7ecc55fd702e412e680f190
4,546
py
Python
transforms/python.py
nuxeo-cps/zope2--PortalTransforms
753f67202b016d0b07edd3bc65fd827cb39e50db
[ "BSD-3-Clause" ]
null
null
null
transforms/python.py
nuxeo-cps/zope2--PortalTransforms
753f67202b016d0b07edd3bc65fd827cb39e50db
[ "BSD-3-Clause" ]
null
null
null
transforms/python.py
nuxeo-cps/zope2--PortalTransforms
753f67202b016d0b07edd3bc65fd827cb39e50db
[ "BSD-3-Clause" ]
null
null
null
""" Original code from active state recipe 'Colorize Python source using the built-in tokenizer' ---------------------------------------------------------------------------- MoinMoin - Python Source Parser This code is part of MoinMoin (http://moin.sourceforge.net/) and converts Python source code to H...
30.510067
77
0.548834
""" Original code from active state recipe 'Colorize Python source using the built-in tokenizer' ---------------------------------------------------------------------------- MoinMoin - Python Source Parser This code is part of MoinMoin (http://moin.sourceforge.net/) and converts Python source code to H...
false
true
f75c8bc781685d7ff94825f9acde04ff812b36f3
5,317
py
Python
SLME.py
w-kq/hhhh777
1be3a333128edf7ab50ef2dc3b281d6f561d9fc0
[ "Apache-2.0" ]
null
null
null
SLME.py
w-kq/hhhh777
1be3a333128edf7ab50ef2dc3b281d6f561d9fc0
[ "Apache-2.0" ]
1
2021-01-11T07:01:26.000Z
2021-01-11T07:18:53.000Z
SLME.py
kq-wang339/hhhh777
1be3a333128edf7ab50ef2dc3b281d6f561d9fc0
[ "Apache-2.0" ]
null
null
null
from numpy import * import matplotlib.pyplot as plt from io import BytesIO data_am15 = open("AM15G.dat",'r', encoding='utf-8') # solar spectrum data_alpha = open("absorption.dat", 'r',encoding='utf-8') #光吸收系数 Eg = 1.40 #带隙,单位eV L = 3 #输入厚度,单位为μm f = ...
27.127551
94
0.479782
from numpy import * import matplotlib.pyplot as plt from io import BytesIO data_am15 = open("AM15G.dat",'r', encoding='utf-8') data_alpha = open("absorption.dat", 'r',encoding='utf-8') Eg = 1.40 L = 3 f = 1 L_max = 3 ...
true
true
f75c8bf11162fdafb106feefbbe60f9a999a5d77
776
py
Python
7/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
7/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
7/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen> # # SPDX-License-Identifier: CC0-1.0 import re with open('input.txt') as f: data = f.readlines() conv = {} for s in data: key = re.match(r'(.+) bags contain ', s).group(1) values = re.findall(r'\d+ (...
20.421053
81
0.58634
import re with open('input.txt') as f: data = f.readlines() conv = {} for s in data: key = re.match(r'(.+) bags contain ', s).group(1) values = re.findall(r'\d+ (.+?) bags?[,.]', s) conv[key] = values def get_bags(color: str, conv: dict) -> set: if conv[color] == []: return set() c...
true
true
f75c8c7b963b3f83f4e9dad8ac4709e2b995deb6
3,012
py
Python
tests/contract/KT1Sc2dHqCRLQV9gWLmUndQyowVrv12AtcJi/test_sc2dhq.py
bantalon/pytezos
e538fb47a0879e70af3c0c074348a5edc3a94372
[ "MIT" ]
null
null
null
tests/contract/KT1Sc2dHqCRLQV9gWLmUndQyowVrv12AtcJi/test_sc2dhq.py
bantalon/pytezos
e538fb47a0879e70af3c0c074348a5edc3a94372
[ "MIT" ]
null
null
null
tests/contract/KT1Sc2dHqCRLQV9gWLmUndQyowVrv12AtcJi/test_sc2dhq.py
bantalon/pytezos
e538fb47a0879e70af3c0c074348a5edc3a94372
[ "MIT" ]
null
null
null
from unittest import TestCase from os.path import dirname, join import json from pytezos.michelson.micheline import get_script_section from pytezos.michelson.types.base import MichelsonType from pytezos.michelson.program import MichelsonProgram from pytezos.michelson.format import micheline_to_michelson from pytezos.m...
40.702703
106
0.699867
from unittest import TestCase from os.path import dirname, join import json from pytezos.michelson.micheline import get_script_section from pytezos.michelson.types.base import MichelsonType from pytezos.michelson.program import MichelsonProgram from pytezos.michelson.format import micheline_to_michelson from pytezos.m...
true
true
f75c8ce2665d0a676bfe38fe2fd60982d046a487
2,372
py
Python
keras_segmentation/pretrained.py
WeiCheng302/image-segmentation-keras
b34aef73f1a350cc0b4034eeb2dedd61642b9ccb
[ "MIT" ]
null
null
null
keras_segmentation/pretrained.py
WeiCheng302/image-segmentation-keras
b34aef73f1a350cc0b4034eeb2dedd61642b9ccb
[ "MIT" ]
null
null
null
keras_segmentation/pretrained.py
WeiCheng302/image-segmentation-keras
b34aef73f1a350cc0b4034eeb2dedd61642b9ccb
[ "MIT" ]
null
null
null
import keras import tensorflow as tf from .models.all_models import model_from_name def model_from_checkpoint_path(model_config, latest_weights): model = model_from_name[model_config['model_class']]( model_config['n_classes'], input_height=model_config['input_height'], input_width=model_config['i...
29.283951
82
0.680438
import keras import tensorflow as tf from .models.all_models import model_from_name def model_from_checkpoint_path(model_config, latest_weights): model = model_from_name[model_config['model_class']]( model_config['n_classes'], input_height=model_config['input_height'], input_width=model_config['i...
true
true
f75c8d119ca16d139a467e0ae065f5d144208ee3
647
py
Python
main.py
frankzhangv5/pyAutomationTesting
8d36664b26f348ba3d04d97fba9dd47a95c38e8e
[ "MIT" ]
1
2019-08-25T00:27:13.000Z
2019-08-25T00:27:13.000Z
main.py
scarlett1004/pyAutomationTesting
8d36664b26f348ba3d04d97fba9dd47a95c38e8e
[ "MIT" ]
1
2021-06-02T00:19:51.000Z
2021-06-02T00:19:51.000Z
main.py
scarlett1004/pyAutomationTesting
8d36664b26f348ba3d04d97fba9dd47a95c38e8e
[ "MIT" ]
1
2019-08-29T00:59:24.000Z
2019-08-29T00:59:24.000Z
import os from framework.util.log import Log from framework.util.xml import Xml from framework.util.email import Email from framework.util.config import Config from framework.runner.unittest_runner import UnitTestRunner from framework.runner.pytest_runner import PyTestRunner if __name__ == "__main__": Log.d(Xml.ge...
34.052632
107
0.720247
import os from framework.util.log import Log from framework.util.xml import Xml from framework.util.email import Email from framework.util.config import Config from framework.runner.unittest_runner import UnitTestRunner from framework.runner.pytest_runner import PyTestRunner if __name__ == "__main__": Log.d(Xml.ge...
true
true
f75c8f5180a76006b19100150c724e15e902f647
1,514
py
Python
Python3/456.132-pattern.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/456.132-pattern.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/456.132-pattern.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=456 lang=python3 # # [456] 132 Pattern # # https://leetcode.com/problems/132-pattern/description/ # # algorithms # Medium (28.88%) # Likes: 1408 # Dislikes: 91 # Total Accepted: 56.2K # Total Submissions: 194.4K # Testcase Example: '[1,2,3,4]' # # # Given a sequence of n integers a1, a2,...
20.186667
77
0.562087
class Solution: def find132pattern(self, nums: List[int]): if len(nums) < 3: return False third = float('-inf') second = [] for i in range(len(nums) - 1, -1, -1): if nums[i] < third: return True while second and second[...
true
true
f75c905ef948373ece873abec328da7ce0aecb23
3,085
py
Python
apps/stochastic_lasso/script/run.py
daiwei89/wdai_petuum_public
4068859897061201d0a63630a3da6011b0d0f75f
[ "BSD-3-Clause" ]
null
null
null
apps/stochastic_lasso/script/run.py
daiwei89/wdai_petuum_public
4068859897061201d0a63630a3da6011b0d0f75f
[ "BSD-3-Clause" ]
null
null
null
apps/stochastic_lasso/script/run.py
daiwei89/wdai_petuum_public
4068859897061201d0a63630a3da6011b0d0f75f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os from os.path import dirname from os.path import join import time import subprocess filename = 'lasso_dim100000000_s1000000_nnz5.transx100.libsvm.trans.X' filenameY = 'lasso_dim100000000_s1000000_nnz5.transx100.libsvm.trans.Y' #filename = 'lasso_dim1000000000_s10000000_nnz5.transx100.li...
29.103774
106
0.68201
import os from os.path import dirname from os.path import join import time import subprocess filename = 'lasso_dim100000000_s1000000_nnz5.transx100.libsvm.trans.X' filenameY = 'lasso_dim100000000_s1000000_nnz5.transx100.libsvm.trans.Y' C = 1e-4 sampling_ratio = 0.1 params = { "lambda": 0.1 , "X_file":...
false
true
f75c921166b243d0991927f3dbe2a917824b5ec1
9,429
py
Python
test/integration/test_cli.py
rprabhat/curator
b0c7ad652a0141799cc499c43c4b9fa56328b4ff
[ "Apache-2.0" ]
1
2017-08-19T08:11:15.000Z
2017-08-19T08:11:15.000Z
test/integration/test_cli.py
rprabhat/curator
b0c7ad652a0141799cc499c43c4b9fa56328b4ff
[ "Apache-2.0" ]
null
null
null
test/integration/test_cli.py
rprabhat/curator
b0c7ad652a0141799cc499c43c4b9fa56328b4ff
[ "Apache-2.0" ]
null
null
null
import elasticsearch import curator import os import json import string, random, tempfile import click from click import testing as clicktest from mock import patch, Mock from . import CuratorTestCase from . import testvars as testvars import logging logger = logging.getLogger(__name__) host, port = os.environ.get('...
37.565737
80
0.518189
import elasticsearch import curator import os import json import string, random, tempfile import click from click import testing as clicktest from mock import patch, Mock from . import CuratorTestCase from . import testvars as testvars import logging logger = logging.getLogger(__name__) host, port = os.environ.get('...
true
true
f75c92ea2e71fd7e861451ec041d079caf137d9b
61,829
py
Python
kowalski/alert_broker_ztf.py
kmshin1397/kowalski
2aaa4ed7a3b7b400e95227b63c976ce18f7e18eb
[ "MIT" ]
null
null
null
kowalski/alert_broker_ztf.py
kmshin1397/kowalski
2aaa4ed7a3b7b400e95227b63c976ce18f7e18eb
[ "MIT" ]
null
null
null
kowalski/alert_broker_ztf.py
kmshin1397/kowalski
2aaa4ed7a3b7b400e95227b63c976ce18f7e18eb
[ "MIT" ]
null
null
null
import argparse from ast import literal_eval from astropy.io import fits from astropy.visualization import ( AsymmetricPercentileInterval, LinearStretch, LogStretch, ImageNormalize, ) import base64 from bson.json_util import loads import confluent_kafka from copy import deepcopy import dask.distributed ...
35.884504
116
0.534992
import argparse from ast import literal_eval from astropy.io import fits from astropy.visualization import ( AsymmetricPercentileInterval, LinearStretch, LogStretch, ImageNormalize, ) import base64 from bson.json_util import loads import confluent_kafka from copy import deepcopy import dask.distributed ...
true
true
f75c93069c5413a4f79a3ddcf9f0b5d337a710dc
1,009
py
Python
servermanager/models.py
owen-kuai/DjangoBlog
14492a8fcb67cc710325a206e7ceab55de7c9828
[ "MIT" ]
5,052
2016-11-06T15:51:59.000Z
2022-03-31T03:42:50.000Z
servermanager/models.py
qq605085370/DjangoBlog
f842b73fa0c6782ae651e39344eb866b6562ef9d
[ "MIT" ]
497
2017-03-24T02:57:29.000Z
2022-03-31T03:21:16.000Z
servermanager/models.py
qq605085370/DjangoBlog
f842b73fa0c6782ae651e39344eb866b6562ef9d
[ "MIT" ]
2,565
2016-11-06T15:56:33.000Z
2022-03-31T14:15:31.000Z
from django.db import models # Create your models here. class commands(models.Model): title = models.CharField('命令标题', max_length=300) command = models.CharField('命令', max_length=2000) describe = models.CharField('命令描述', max_length=300) created_time = models.DateTimeField('创建时间', auto_now_add=True) ...
29.676471
66
0.690783
from django.db import models class commands(models.Model): title = models.CharField('命令标题', max_length=300) command = models.CharField('命令', max_length=2000) describe = models.CharField('命令描述', max_length=300) created_time = models.DateTimeField('创建时间', auto_now_add=True) last_mod_time = models.Da...
true
true
f75c932ac052c44f360e288598d50398f6c010fd
12,721
py
Python
python/ccxt/bl3p.py
ive-a-dream/ccxt
1c6ec43f6d577f95610f5e4c01354bb91e8633c1
[ "MIT" ]
null
null
null
python/ccxt/bl3p.py
ive-a-dream/ccxt
1c6ec43f6d577f95610f5e4c01354bb91e8633c1
[ "MIT" ]
null
null
null
python/ccxt/bl3p.py
ive-a-dream/ccxt
1c6ec43f6d577f95610f5e4c01354bb91e8633c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.precise import Precise class bl3p(Exchange): def describe(self...
38.432024
195
0.469774
from ccxt.base.exchange import Exchange import hashlib from ccxt.base.precise import Precise class bl3p(Exchange): def describe(self): return self.deep_extend(super(bl3p, self).describe(), { 'id': 'bl3p', 'name': 'BL3P', 'countries': ['NL'], 'rateLimit':...
true
true
f75c93cfa33758df263761d6612a157b04162e3c
1,398
py
Python
users/views.py
DanielG-H/todo_app
1f888c70fc345ac03b27872e02cffdcd290f39d2
[ "MIT" ]
null
null
null
users/views.py
DanielG-H/todo_app
1f888c70fc345ac03b27872e02cffdcd290f39d2
[ "MIT" ]
null
null
null
users/views.py
DanielG-H/todo_app
1f888c70fc345ac03b27872e02cffdcd290f39d2
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.contrib import messages from .forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm from django.contrib.auth.decorators import login_required def register(request): if request.method == "POST": form = UserRegisterForm(request.POST) ...
32.511628
105
0.664521
from django.shortcuts import render, redirect from django.contrib import messages from .forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm from django.contrib.auth.decorators import login_required def register(request): if request.method == "POST": form = UserRegisterForm(request.POST) ...
true
true
f75c940c19fe28049c31c96b830e4585268e5398
8,930
py
Python
tempest/api/volume/admin/test_volume_types.py
TeamXgrid/xgrid-tempest
4411b2992c4f093ddc893e2e8149b2277d35c137
[ "Apache-2.0" ]
1
2018-06-03T13:49:58.000Z
2018-06-03T13:49:58.000Z
tempest/api/volume/admin/test_volume_types.py
TeamXgrid/xgrid-tempest
4411b2992c4f093ddc893e2e8149b2277d35c137
[ "Apache-2.0" ]
null
null
null
tempest/api/volume/admin/test_volume_types.py
TeamXgrid/xgrid-tempest
4411b2992c4f093ddc893e2e8149b2277d35c137
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # 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 requ...
48.010753
79
0.623068
from tempest.api.volume import base from tempest.common import waiters from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators CONF = config.CONF class VolumeTypesV2Test(base.BaseVolumeAdminTest): @decorators.idempotent_id('9d9b28e3-1b2e-4483-a2cc-24aa0ea1d...
true
true
f75c943826b714cd088a9c6939c85fb23be7dd37
626
py
Python
the-hard-way/ex32.py
alaindet/learn-python
44d3b04188af19f4491a505a210b53cd67bae542
[ "MIT" ]
null
null
null
the-hard-way/ex32.py
alaindet/learn-python
44d3b04188af19f4491a505a210b53cd67bae542
[ "MIT" ]
null
null
null
the-hard-way/ex32.py
alaindet/learn-python
44d3b04188af19f4491a505a210b53cd67bae542
[ "MIT" ]
null
null
null
the_count = [1, 2, 3, 4, 5] fruits = ['apples', 'oranges', 'pears', 'apricots'] change = [1, 'pennies', 2, 'dimes', 3, 'quarters'] for number in the_count: print(f'This is count {number}') for i in change: print(f'I got {i}') elements = [] for i in range(0, 6): print(f'Adding {i} to the list') elements.appe...
24.076923
64
0.640575
the_count = [1, 2, 3, 4, 5] fruits = ['apples', 'oranges', 'pears', 'apricots'] change = [1, 'pennies', 2, 'dimes', 3, 'quarters'] for number in the_count: print(f'This is count {number}') for i in change: print(f'I got {i}') elements = [] for i in range(0, 6): print(f'Adding {i} to the list') elements.appe...
true
true
f75c94f4b1bbd1c95362794cba3bb1a19ed3335c
1,420
py
Python
setup.py
CyberZHG/torch-same-pad
b60965823567046d0c100fa0e29e36cab6c4ae6b
[ "MIT" ]
1
2020-08-29T07:14:23.000Z
2020-08-29T07:14:23.000Z
setup.py
CyberZHG/torch-same-pad
b60965823567046d0c100fa0e29e36cab6c4ae6b
[ "MIT" ]
null
null
null
setup.py
CyberZHG/torch-same-pad
b60965823567046d0c100fa0e29e36cab6c4ae6b
[ "MIT" ]
2
2021-03-29T15:52:00.000Z
2021-03-30T06:22:58.000Z
import os import re import codecs from setuptools import setup, find_packages current_path = os.path.abspath(os.path.dirname(__file__)) def read_file(*parts): with codecs.open(os.path.join(current_path, *parts), 'r', 'utf8') as reader: return reader.read() def get_requirements(*parts): with codecs....
31.555556
88
0.685915
import os import re import codecs from setuptools import setup, find_packages current_path = os.path.abspath(os.path.dirname(__file__)) def read_file(*parts): with codecs.open(os.path.join(current_path, *parts), 'r', 'utf8') as reader: return reader.read() def get_requirements(*parts): with codecs....
true
true
f75c9672ad0f0051994db4e7a9e2dd19f62310f5
326
py
Python
topCoder/srms/200s/srm261/div2/spreadsheet_column.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
1
2020-09-30T19:53:08.000Z
2020-09-30T19:53:08.000Z
topCoder/srms/200s/srm261/div2/spreadsheet_column.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
null
null
null
topCoder/srms/200s/srm261/div2/spreadsheet_column.py
gauravsingh58/algo
397859a53429e7a585e5f6964ad24146c6261326
[ "WTFPL" ]
1
2020-10-15T09:10:57.000Z
2020-10-15T09:10:57.000Z
from itertools import product from string import ascii_uppercase class SpreadsheetColumn: def getLabel(self, column): if column < 27: return ascii_uppercase[column-1] for c, w in enumerate(product(ascii_uppercase, repeat=2), 27): if c == column: return ''.jo...
27.166667
70
0.628834
from itertools import product from string import ascii_uppercase class SpreadsheetColumn: def getLabel(self, column): if column < 27: return ascii_uppercase[column-1] for c, w in enumerate(product(ascii_uppercase, repeat=2), 27): if c == column: return ''.jo...
true
true