hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f70b82a64651b669501101e2383b4a201ac4b9ba
5,305
py
Python
tests/test_content_download.py
easydo-cn/edo_client
775f185c54f2eeda6a7dd6482de8228ca9ad89b0
[ "Apache-2.0" ]
null
null
null
tests/test_content_download.py
easydo-cn/edo_client
775f185c54f2eeda6a7dd6482de8228ca9ad89b0
[ "Apache-2.0" ]
null
null
null
tests/test_content_download.py
easydo-cn/edo_client
775f185c54f2eeda6a7dd6482de8228ca9ad89b0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import io import os import shutil import tempfile import unittest from edo_client import WoClient class ContentApi_DownloadTestCase(unittest.TestCase): ''' - Basically this is to ensure all the facilities related to HTTP range headers are working properly; ''' @classmethod ...
32.746914
106
0.590575
import io import os import shutil import tempfile import unittest from edo_client import WoClient class ContentApi_DownloadTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.file_size = 10 * (2 ** 20) cls.download_url = 'http://192.168.1.115/docker/unittest/10mb.test' ...
true
true
f70b82c0df0d88c5e8c371dcea1b15a28a5a37fd
321
py
Python
answers/Anuraj Pariya/Day 4/question 1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
22
2021-03-16T14:07:47.000Z
2021-08-13T08:52:50.000Z
answers/Anuraj Pariya/Day 4/question 1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
174
2021-03-16T21:16:40.000Z
2021-06-12T05:19:51.000Z
answers/Anuraj Pariya/Day 4/question 1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
135
2021-03-16T16:47:12.000Z
2021-06-27T14:22:38.000Z
n=int(input('enter no.')) factors = [] while n % 2 == 0: factors.append(2) n//=2 divisor=3 while n!=1 and divisor <=n: if n% divisor == 0: factors.append(divisor) n//=divisor else: divisor+=2 print('prime factors is') for i in range (len(factors)): print(factors[i], end=" ")...
18.882353
31
0.560748
n=int(input('enter no.')) factors = [] while n % 2 == 0: factors.append(2) n//=2 divisor=3 while n!=1 and divisor <=n: if n% divisor == 0: factors.append(divisor) n//=divisor else: divisor+=2 print('prime factors is') for i in range (len(factors)): print(factors[i], end=" ")...
true
true
f70b82ff4fbb8ab82c3cc5110fdd6e662a84733a
9,806
py
Python
salt/cli/caller.py
martin-helmich/salt
eed588f65b6c7e3b1fbd73bf618eba1d85b7cdb7
[ "Apache-2.0" ]
null
null
null
salt/cli/caller.py
martin-helmich/salt
eed588f65b6c7e3b1fbd73bf618eba1d85b7cdb7
[ "Apache-2.0" ]
null
null
null
salt/cli/caller.py
martin-helmich/salt
eed588f65b6c7e3b1fbd73bf618eba1d85b7cdb7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' The caller module is used as a front-end to manage direct calls to the salt minion modules. ''' # Import python libs from __future__ import print_function import os import sys import logging import datetime import traceback # Import salt libs import salt.exitcodes import salt.loader import...
32.795987
80
0.538344
from __future__ import print_function import os import sys import logging import datetime import traceback import salt.exitcodes import salt.loader import salt.minion import salt.output import salt.payload import salt.transport import salt.utils.args from salt._compat import string_types from salt.log import LOG_L...
true
true
f70b831d2289ee6bccaec8a8ac8e8f483a6803be
17,388
py
Python
PyFlow/UI/Widgets/PropertiesFramework.py
Kochera/PyFlow
0f59c7127be696c514da276c003d2444cd3a1f9c
[ "Apache-2.0" ]
null
null
null
PyFlow/UI/Widgets/PropertiesFramework.py
Kochera/PyFlow
0f59c7127be696c514da276c003d2444cd3a1f9c
[ "Apache-2.0" ]
null
null
null
PyFlow/UI/Widgets/PropertiesFramework.py
Kochera/PyFlow
0f59c7127be696c514da276c003d2444cd3a1f9c
[ "Apache-2.0" ]
1
2020-06-14T19:50:12.000Z
2020-06-14T19:50:12.000Z
## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera ## 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...
38.8125
131
0.654762
apsibleWidget(QtWidgets.QWidget): def __init__(self, parent=None, headName="Collapse", noSpacer=True, collapsed=False): super(CollapsibleWidget, self).__init__(parent) self.setObjectName(self.__class__.__name__) self.setupUi() self.connectUi() self.setButtonName(headName) ...
true
true
f70b8423fc991d0b95cd0f26021b8c0e980bec5c
31,695
py
Python
docusign_esign/models/email_address.py
pivotal-energy-solutions/docusign-python-client
f3edd0b82e57999bc8848a63a0477712714ee437
[ "MIT" ]
null
null
null
docusign_esign/models/email_address.py
pivotal-energy-solutions/docusign-python-client
f3edd0b82e57999bc8848a63a0477712714ee437
[ "MIT" ]
null
null
null
docusign_esign/models/email_address.py
pivotal-energy-solutions/docusign-python-client
f3edd0b82e57999bc8848a63a0477712714ee437
[ "MIT" ]
1
2021-04-26T20:52:45.000Z
2021-04-26T20:52:45.000Z
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from ppr...
32.708978
690
0.629405
from pprint import pformat from six import iteritems import re class EmailAddress(object): def __init__(self, anchor_case_sensitive=None, anchor_horizontal_alignment=None, anchor_ignore_if_not_present=None, anchor_match_whole_word=None, anchor_string=None, anchor_units=None, anchor_x_offset=None, anchor_y_off...
true
true
f70b85c39ef0540db908890e3580c1d06caf96f5
70
py
Python
rltrain.py
leopd/jasrlp
4ebc0a91bd0a5533aeb9b2d136612c862ec8f6a8
[ "MIT" ]
2
2019-12-02T04:32:36.000Z
2019-12-03T03:17:40.000Z
rltrain.py
leopd/jasrlp
4ebc0a91bd0a5533aeb9b2d136612c862ec8f6a8
[ "MIT" ]
null
null
null
rltrain.py
leopd/jasrlp
4ebc0a91bd0a5533aeb9b2d136612c862ec8f6a8
[ "MIT" ]
null
null
null
from rldqn import DQN, FCNet, RandomLearner from rlddpg import DDPG
14
43
0.8
from rldqn import DQN, FCNet, RandomLearner from rlddpg import DDPG
true
true
f70b86ad326a4d97bea318ce1998d3afe340e4cd
368
py
Python
scripts/ex_concat.py
spisakt/PUMI
bea29696aa90e5581f08919e1a2cd9f569284984
[ "BSD-3-Clause" ]
5
2018-06-12T08:17:13.000Z
2022-02-25T20:07:00.000Z
scripts/ex_concat.py
spisakt/PUMI
bea29696aa90e5581f08919e1a2cd9f569284984
[ "BSD-3-Clause" ]
null
null
null
scripts/ex_concat.py
spisakt/PUMI
bea29696aa90e5581f08919e1a2cd9f569284984
[ "BSD-3-Clause" ]
2
2020-10-19T15:27:28.000Z
2021-06-04T17:02:27.000Z
#!/usr/bin/env python import PUMI.utils.Concat as conc conc=conc.concat_workflow(2) conc.inputs.inputspec.par1="abc" conc.inputs.inputspec.par2="def" conc.write_graph('graph-orig.dot', graph2use='orig', simple_form=True); conc.write_graph('graph-exec-detailed.dot', graph2use='exec', simple_form=False); conc.write_gra...
33.454545
81
0.769022
import PUMI.utils.Concat as conc conc=conc.concat_workflow(2) conc.inputs.inputspec.par1="abc" conc.inputs.inputspec.par2="def" conc.write_graph('graph-orig.dot', graph2use='orig', simple_form=True); conc.write_graph('graph-exec-detailed.dot', graph2use='exec', simple_form=False); conc.write_graph('graph.dot', graph...
true
true
f70b87c4ef72db99b9638adb5bff6118843e5de5
40,741
py
Python
tests/test_djangocache.py
mgorny/python-diskcache
b0451e084ea403c29980f683b8f0d8c9ac2a2dea
[ "Apache-2.0" ]
null
null
null
tests/test_djangocache.py
mgorny/python-diskcache
b0451e084ea403c29980f683b8f0d8c9ac2a2dea
[ "Apache-2.0" ]
null
null
null
tests/test_djangocache.py
mgorny/python-diskcache
b0451e084ea403c29980f683b8f0d8c9ac2a2dea
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Most of this file was copied from: # https://raw.githubusercontent.com/django/django/1.11.12/tests/cache/tests.py # Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. from __future__ import unicode_literals import copy import io import os import r...
39.174038
114
0.628188
from __future__ import unicode_literals import copy import io import os import re import shutil import tempfile import threading import time import unittest import warnings from django.conf import settings from django.core import management, signals from django.core.cache import ( DEFAULT_CACHE_ALIAS, Cach...
true
true
f70b881f1b2b4ed66c203c087f52e37d9971e9b5
2,571
py
Python
test_requests.py
OT022/Threading-OCR
50379078c5885a0046cb3b0598306da0bd6f5a0a
[ "MIT" ]
null
null
null
test_requests.py
OT022/Threading-OCR
50379078c5885a0046cb3b0598306da0bd6f5a0a
[ "MIT" ]
null
null
null
test_requests.py
OT022/Threading-OCR
50379078c5885a0046cb3b0598306da0bd6f5a0a
[ "MIT" ]
null
null
null
import pytest import os import logging import requests_helper @pytest.fixture def valid_post_image(): return open('_test/src/img001.jpg', 'rb') @pytest.fixture def valid_post_url(): return os.environ['COMPUTER_VISION_ENDPOINT'] + "/vision/v3.0/read/analyze" @pytest.fixture def valid_headers(): return...
38.954545
222
0.736289
import pytest import os import logging import requests_helper @pytest.fixture def valid_post_image(): return open('_test/src/img001.jpg', 'rb') @pytest.fixture def valid_post_url(): return os.environ['COMPUTER_VISION_ENDPOINT'] + "/vision/v3.0/read/analyze" @pytest.fixture def valid_headers(): return...
true
true
f70b8964b3beea5bf3a3e0e4b46e46f93cf419a2
51,566
bzl
Python
third_party/gpus/cuda_configure.bzl
parallelo/tensorflow-upstream
41c9f4d4435707ed64b5a4fa5a964f73a5b99986
[ "Apache-2.0" ]
null
null
null
third_party/gpus/cuda_configure.bzl
parallelo/tensorflow-upstream
41c9f4d4435707ed64b5a4fa5a964f73a5b99986
[ "Apache-2.0" ]
null
null
null
third_party/gpus/cuda_configure.bzl
parallelo/tensorflow-upstream
41c9f4d4435707ed64b5a4fa5a964f73a5b99986
[ "Apache-2.0" ]
null
null
null
"""Repository rule for CUDA autoconfiguration. `cuda_configure` depends on the following environment variables: * `TF_NEED_CUDA`: Whether to enable building with CUDA. * `GCC_HOST_COMPILER_PATH`: The GCC host compiler path * `TF_CUDA_CLANG`: Whether to use clang as a cuda compiler. * `CLANG_CUDA_COMPILER_PATH...
36.468175
125
0.638134
load("//third_party/clang_toolchain:download_clang.bzl", "download_clang") load( "@bazel_tools//tools/cpp:lib_cc_configure.bzl", "escape_string", "get_env_var", ) load( "@bazel_tools//tools/cpp:windows_cc_configure.bzl", "find_msvc_tool", "find_vc_path", "setup_vc_env_vars", ) load( "//...
true
true
f70b8a2bb9b965788aeed7882a1db5c0a0a6b4de
40,693
py
Python
forms/forms_func.py
Wellheor1/l2
d980210921c545c68fe9d5522bb693d567995024
[ "MIT" ]
null
null
null
forms/forms_func.py
Wellheor1/l2
d980210921c545c68fe9d5522bb693d567995024
[ "MIT" ]
null
null
null
forms/forms_func.py
Wellheor1/l2
d980210921c545c68fe9d5522bb693d567995024
[ "MIT" ]
null
null
null
import datetime import zlib from collections import OrderedDict from copy import deepcopy from decimal import Decimal from django.db.models import Q from clients.models import Document, DispensaryReg, Card from directions.models import Napravleniya, Issledovaniya, ParaclinicResult, IstochnikiFinansirovaniya, PersonCo...
42.081696
183
0.591527
import datetime import zlib from collections import OrderedDict from copy import deepcopy from decimal import Decimal from django.db.models import Q from clients.models import Document, DispensaryReg, Card from directions.models import Napravleniya, Issledovaniya, ParaclinicResult, IstochnikiFinansirovaniya, PersonCo...
true
true
f70b8b74c1eeee8137644ecf3c06c9597b396f6b
10,428
py
Python
vb_simulation_pkgs/pkg_vb_sim/scripts/task3_spawn_models.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
1
2021-07-13T07:05:29.000Z
2021-07-13T07:05:29.000Z
vb_simulation_pkgs/pkg_vb_sim/scripts/task3_spawn_models.py
TejasPhutane/Eyantra-2021-Vargi-Bots
ab84a1304101850be8c0f69cfe6de70d53c33189
[ "MIT" ]
1
2021-06-05T07:58:03.000Z
2021-06-05T07:58:03.000Z
vb_simulation_pkgs/pkg_vb_sim/scripts/task3_spawn_models.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from gazebo_msgs.srv import SpawnModel, SpawnModelRequest, SpawnModelResponse # from gazebo_msgs.srv import ApplyBodyWrench, GetModelProperties, GetWorldProperties, SetModelState from copy import deepcopy from tf.transformations import quaternion_from_euler sdf_cube = """<?xml versi...
26.07
100
0.476122
import rospy from gazebo_msgs.srv import SpawnModel, SpawnModelRequest, SpawnModelResponse from copy import deepcopy from tf.transformations import quaternion_from_euler sdf_cube = """<?xml version="1.0" ?> <sdf version="1.4"> <model name="MODELNAME"> <static>0</static> <link name="link"> <inertial>...
true
true
f70b8bc855024eae8c8724cea7763f1ea53656f2
5,413
py
Python
test/test_expected_behaviors_configurations.py
michael7198/deeplenstronomy_tests
e310684669f403969e169843185255a468c299d9
[ "MIT" ]
17
2020-11-13T17:39:28.000Z
2022-03-18T11:22:01.000Z
test/test_expected_behaviors_configurations.py
michael7198/deeplenstronomy_tests
e310684669f403969e169843185255a468c299d9
[ "MIT" ]
23
2020-12-09T21:50:27.000Z
2022-01-11T17:26:17.000Z
test/test_expected_behaviors_configurations.py
michael7198/deeplenstronomy_tests
e310684669f403969e169843185255a468c299d9
[ "MIT" ]
9
2020-11-11T19:15:19.000Z
2022-03-01T17:50:55.000Z
""" Parsed Config File Produces Expected Behaviors - configurations """ import inspect import os import deeplenstronomy.deeplenstronomy as dl doc = """ \tRunning tests from test_expected_behaviors_configurations.py \tThe tests included in this module demonstrate that the properties of each \tconfiguration wer...
34.922581
84
0.616664
import inspect import os import deeplenstronomy.deeplenstronomy as dl doc = """ \tRunning tests from test_expected_behaviors_configurations.py \tThe tests included in this module demonstrate that the properties of each \tconfiguration were simulated as expected. These properties include the \texpected size o...
true
true
f70b8bc93123bb50d895e673ddd956f0d95d791d
1,299
py
Python
setup.py
lietu/twitch-bot
e1f3462a8851031bc2cbd5dffb6440edc2e45116
[ "MIT" ]
6
2015-12-21T14:43:26.000Z
2019-09-08T12:56:36.000Z
setup.py
lietu/twitch-quote-bot
e1f3462a8851031bc2cbd5dffb6440edc2e45116
[ "MIT" ]
5
2015-04-06T08:33:20.000Z
2016-02-09T03:28:39.000Z
setup.py
lietu/twitch-bot
e1f3462a8851031bc2cbd5dffb6440edc2e45116
[ "MIT" ]
5
2015-12-03T17:54:51.000Z
2020-06-29T12:43:07.000Z
import sys from cx_Freeze import setup, Executable base = None # Uncomment to disable the console on Windows, once the thing is stable #if sys.platform == "win32": # base = "Win32GUI" config = { 'description': 'Twitch Bot', 'author': 'Janne Enberg', 'url': 'https://github.com/lietu/twitch-bot', 'do...
27.0625
74
0.602771
import sys from cx_Freeze import setup, Executable base = None config = { 'description': 'Twitch Bot', 'author': 'Janne Enberg', 'url': 'https://github.com/lietu/twitch-bot', 'download_url': 'https://github.com/lietu/twitch-bot', 'author_email': 'janne.enberg@lietu.net', 'version': '0.1', ...
true
true
f70b8cb2129444e1f6211239a197af3e5f9f6cb3
14,418
py
Python
conveyor_2.py
bjnortier/ai-experiments-1
aff4496d84b059af6096f8f6b51d0ebcf6ed5c37
[ "CC0-1.0" ]
null
null
null
conveyor_2.py
bjnortier/ai-experiments-1
aff4496d84b059af6096f8f6b51d0ebcf6ed5c37
[ "CC0-1.0" ]
null
null
null
conveyor_2.py
bjnortier/ai-experiments-1
aff4496d84b059af6096f8f6b51d0ebcf6ed5c37
[ "CC0-1.0" ]
null
null
null
import os import glob from pathlib import Path import numpy as np import random import carb from PIL import Image from tensorflow import keras from pxr import Usd, UsdGeom, Gf, UsdPhysics import omni.kit from omni.isaac.examples.base_sample import BaseSample from omni.isaac.core.objects import DynamicCuboid from omni.i...
34.410501
103
0.619087
import os import glob from pathlib import Path import numpy as np import random import carb from PIL import Image from tensorflow import keras from pxr import Usd, UsdGeom, Gf, UsdPhysics import omni.kit from omni.isaac.examples.base_sample import BaseSample from omni.isaac.core.objects import DynamicCuboid from omni.i...
true
true
f70b8d0e2b5f41a42fe57c9b6a33830ab0c71fa9
305
py
Python
config.py
tensorush/Neural-Painter-Bot
420fd2d01a1a91b45553e3da07d4a5c18a60ec11
[ "MIT" ]
1
2021-02-18T02:52:10.000Z
2021-02-18T02:52:10.000Z
config.py
tensorush/Neural-Painter-Bot
420fd2d01a1a91b45553e3da07d4a5c18a60ec11
[ "MIT" ]
null
null
null
config.py
tensorush/Neural-Painter-Bot
420fd2d01a1a91b45553e3da07d4a5c18a60ec11
[ "MIT" ]
null
null
null
import os # Bot token BOT_TOKEN = os.getenv('BOT_TOKEN') # Web application setup WEBAPP_HOST = '0.0.0.0' WEBAPP_PORT = int(os.getenv('PORT')) # Webhook setup WEBHOOK_HOST = 'https://neural-painter-bot.herokuapp.com' WEBHOOK_PATH = f'/webhook/{BOT_TOKEN}' WEBHOOK_URL = f'{WEBHOOK_HOST}{WEBHOOK_PATH}'
20.333333
57
0.734426
import os BOT_TOKEN = os.getenv('BOT_TOKEN') WEBAPP_HOST = '0.0.0.0' WEBAPP_PORT = int(os.getenv('PORT')) WEBHOOK_HOST = 'https://neural-painter-bot.herokuapp.com' WEBHOOK_PATH = f'/webhook/{BOT_TOKEN}' WEBHOOK_URL = f'{WEBHOOK_HOST}{WEBHOOK_PATH}'
true
true
f70b8dd29628c3270d786ed902fdfe1bff153136
998
py
Python
two_factor/management/commands/two_factor_disable.py
ercpe/django-two-factor-auth
76866dd310903b3a34526becaa0a5012dea7debe
[ "MIT" ]
null
null
null
two_factor/management/commands/two_factor_disable.py
ercpe/django-two-factor-auth
76866dd310903b3a34526becaa0a5012dea7debe
[ "MIT" ]
1
2015-07-13T16:52:33.000Z
2015-07-16T20:24:59.000Z
two_factor/management/commands/two_factor_disable.py
ercpe/django-two-factor-auth
76866dd310903b3a34526becaa0a5012dea7debe
[ "MIT" ]
1
2019-12-30T15:38:13.000Z
2019-12-30T15:38:13.000Z
from django.core.management.base import BaseCommand, CommandError try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models import User else: User = get_user_model() from django_otp import devices_for_user class Command(BaseCommand): """ Command for d...
28.514286
73
0.670341
from django.core.management.base import BaseCommand, CommandError try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models import User else: User = get_user_model() from django_otp import devices_for_user class Command(BaseCommand): args = '<username use...
true
true
f70b8fac17e6bde268e662cd3401fce8726fa90e
599
py
Python
tests/test_comments.py
EugeneZnm/pitches
64edf62503f9195de2f1e11a7a7cf29e88fa00de
[ "Unlicense" ]
null
null
null
tests/test_comments.py
EugeneZnm/pitches
64edf62503f9195de2f1e11a7a7cf29e88fa00de
[ "Unlicense" ]
null
null
null
tests/test_comments.py
EugeneZnm/pitches
64edf62503f9195de2f1e11a7a7cf29e88fa00de
[ "Unlicense" ]
null
null
null
import unittest from app.models import Comments class CommentsModelTest(unittest.TestCase): def setUp(self): self.new_comment = Comments(comment='a') def test_instance(self): self.assertEqual(self.new_comment.comment, 'a') def test_save_comment(self): self.new_comment.save_comme...
24.958333
55
0.686144
import unittest from app.models import Comments class CommentsModelTest(unittest.TestCase): def setUp(self): self.new_comment = Comments(comment='a') def test_instance(self): self.assertEqual(self.new_comment.comment, 'a') def test_save_comment(self): self.new_comment.save_comme...
true
true
f70b918593a9967c3c6a32aab2c0bf4d8d1dbaef
1,505
py
Python
dls_ade/dls_list_modules_test.py
hir12111/dls_ade
92449cc2a0fadc1af4c125d72cfc392df4763f2c
[ "Apache-2.0" ]
null
null
null
dls_ade/dls_list_modules_test.py
hir12111/dls_ade
92449cc2a0fadc1af4c125d72cfc392df4763f2c
[ "Apache-2.0" ]
null
null
null
dls_ade/dls_list_modules_test.py
hir12111/dls_ade
92449cc2a0fadc1af4c125d72cfc392df4763f2c
[ "Apache-2.0" ]
null
null
null
#!/bin/env dls-python from sys import version_info if version_info.major == 2: import __builtin__ as builtins # Allows for Python 2/3 compatibility, 'builtins' is namespace for inbuilt functions else: import builtins import unittest from mock import patch, MagicMock p = patch('dls_ade.Server') server_mock ...
26.403509
120
0.711628
from sys import version_info if version_info.major == 2: import __builtin__ as builtins else: import builtins import unittest from mock import patch, MagicMock p = patch('dls_ade.Server') server_mock = MagicMock() m = p.start() m.return_value = server_mock from dls_ade import dls_list_modules p.stop() ...
true
true
f70b928fea37b2c0df2781362cb19ba7188b7b27
1,220
py
Python
project/train.py
Lucklyric/hydra-pytorch-lightning-seed
2fd1ef2795c8705f03334f0af66e78aaa565a52e
[ "Apache-2.0" ]
4
2021-05-03T14:00:12.000Z
2022-03-16T18:39:24.000Z
project/train.py
Lucklyric/dl-optimizer-poc
fd7ddc91e10f3d9e6fa6154221c960cc6ff6a8a7
[ "Apache-2.0" ]
null
null
null
project/train.py
Lucklyric/dl-optimizer-poc
fd7ddc91e10f3d9e6fa6154221c960cc6ff6a8a7
[ "Apache-2.0" ]
1
2021-09-07T13:15:51.000Z
2021-09-07T13:15:51.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : train.py # Author: Alvin(Xinyao) Sun <xinyao1@ualberta.ca> # Date : 02.05.2021 import logging import os import sys import hydra import pytorch_lightning as pl from omegaconf import DictConfig, OmegaConf sys.path.append(os.path.dirname(os.path.realpath(__file__...
23.461538
70
0.622951
import logging import os import sys import hydra import pytorch_lightning as pl from omegaconf import DictConfig, OmegaConf sys.path.append(os.path.dirname(os.path.realpath(__file__))) log = logging.getLogger(__name__) @hydra.main(config_path='config', config_name='train_config') def main(cfg: DictConfig): ...
true
true
f70b92b9aa2e2b3ff6177472d1bfaf0b814109aa
182
py
Python
src/python/gudhi/hera/__init__.py
m0baxter/gudhi-devel
6e14ef1f31e09f3875316440303450ff870d9881
[ "MIT" ]
146
2019-03-15T14:10:31.000Z
2022-03-23T21:14:52.000Z
src/python/gudhi/hera/__init__.py
m0baxter/gudhi-devel
6e14ef1f31e09f3875316440303450ff870d9881
[ "MIT" ]
398
2019-03-07T14:55:22.000Z
2022-03-31T14:50:40.000Z
src/python/gudhi/hera/__init__.py
m0baxter/gudhi-devel
6e14ef1f31e09f3875316440303450ff870d9881
[ "MIT" ]
51
2019-03-08T15:58:48.000Z
2022-03-14T10:23:23.000Z
from .wasserstein import wasserstein_distance from .bottleneck import bottleneck_distance __author__ = "Marc Glisse" __copyright__ = "Copyright (C) 2020 Inria" __license__ = "MIT"
22.75
45
0.802198
from .wasserstein import wasserstein_distance from .bottleneck import bottleneck_distance __author__ = "Marc Glisse" __copyright__ = "Copyright (C) 2020 Inria" __license__ = "MIT"
true
true
f70b9516de8ebd320f979b8a39b117ab92fb9820
8,050
py
Python
docs/languages/en/conf.py
chrisoconnell/zf2-documentation
f7ea720801db65c82448128cb173944e81a10d82
[ "BSD-3-Clause" ]
null
null
null
docs/languages/en/conf.py
chrisoconnell/zf2-documentation
f7ea720801db65c82448128cb173944e81a10d82
[ "BSD-3-Clause" ]
null
null
null
docs/languages/en/conf.py
chrisoconnell/zf2-documentation
f7ea720801db65c82448128cb173944e81a10d82
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Zend Framework 2 documentation build configuration file, created by # sphinx-quickstart on Fri Jul 6 18:55:07 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
32.459677
83
0.717143
import sys, os extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Zend Framework 2' copyright = u'2012, Zend Technologies Ltd.' # |version| and |release|, also used in various other places throughout the # built documents. # # T...
true
true
f70b959b58bee55c3001698484754add230dbb4e
18,187
py
Python
common/webapp/views/misc_views.py
jisantuc/labeller
11c7738d43b860fbdad660b459572843f873abce
[ "Apache-2.0" ]
2
2021-12-02T08:42:31.000Z
2022-03-11T19:58:40.000Z
common/webapp/views/misc_views.py
jisantuc/labeller
11c7738d43b860fbdad660b459572843f873abce
[ "Apache-2.0" ]
null
null
null
common/webapp/views/misc_views.py
jisantuc/labeller
11c7738d43b860fbdad660b459572843f873abce
[ "Apache-2.0" ]
2
2021-12-03T17:49:49.000Z
2022-03-21T17:05:06.000Z
# Copyright 2014 SolidBuilds.com. All rights reserved # # Authors: Ling Thio <ling.thio@gmail.com> from datetime import datetime from flask import current_app, flash from flask import Blueprint, redirect, render_template from flask import request, url_for from flask_user import current_user, login_required, roles_acc...
41.617849
137
0.675647
from datetime import datetime from flask import current_app, flash from flask import Blueprint, redirect, render_template from flask import request, url_for from flask_user import current_user, login_required, roles_accepted from flask_user.views import _get_safe_next_param, render, _send_registered_email, _endpoint...
true
true
f70b95eb5cf834f80422d263ac7df828a5ca831d
73
py
Python
__init__.py
dshatz/unionfind
4c1f76b344e126ec9f08c5c992a34434ce1150ee
[ "MIT" ]
51
2017-06-07T16:44:52.000Z
2022-02-12T21:49:18.000Z
__init__.py
dshatz/unionfind
4c1f76b344e126ec9f08c5c992a34434ce1150ee
[ "MIT" ]
3
2018-06-14T04:04:05.000Z
2021-10-07T18:55:21.000Z
__init__.py
dshatz/unionfind
4c1f76b344e126ec9f08c5c992a34434ce1150ee
[ "MIT" ]
26
2018-03-23T18:42:05.000Z
2021-09-07T11:29:11.000Z
""" UnionFind disjoint sets data structure. """ from . import unionfind
12.166667
39
0.726027
from . import unionfind
true
true
f70b965627fb06acd42bbdb804a082cfe0104a24
280
py
Python
core/task/__init__.py
HyokaChen/DailyNewsSpider
ea70c69fb4cf10130a45e00a148246525571c013
[ "MIT" ]
10
2020-07-30T14:46:43.000Z
2021-11-16T12:04:01.000Z
core/task/__init__.py
HyokaChen/DailyNewsSpider
ea70c69fb4cf10130a45e00a148246525571c013
[ "MIT" ]
null
null
null
core/task/__init__.py
HyokaChen/DailyNewsSpider
ea70c69fb4cf10130a45e00a148246525571c013
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @File : __init__.py.py @Time : 2020/3/27 22:36 @Author : Empty Chan @Contact : chen19941018@gmail.com @Description: @License : (C) Copyright 2016-2020, iFuture Corporation Limited. """ from . import *
21.538462
68
0.603571
from . import *
true
true
f70b99540978fb2f332b286d95f514e1c656d922
8,634
py
Python
tests/test_myplex.py
jjlawren/python-plexapi
9f9e2350006da3c613a71f5bdee07d2c1181d89f
[ "BSD-3-Clause" ]
1
2022-01-15T19:02:33.000Z
2022-01-15T19:02:33.000Z
tests/test_myplex.py
jjlawren/python-plexapi
9f9e2350006da3c613a71f5bdee07d2c1181d89f
[ "BSD-3-Clause" ]
43
2021-07-27T01:31:21.000Z
2022-03-30T11:20:55.000Z
tests/test_myplex.py
Montellese/python-plexapi
bd7de4281ec599e096c8991bbd1e583a0d196d8d
[ "BSD-3-Clause" ]
2
2020-09-08T21:09:26.000Z
2020-09-08T21:44:02.000Z
# -*- coding: utf-8 -*- import pytest from plexapi.exceptions import BadRequest, NotFound from . import conftest as utils def test_myplex_accounts(account, plex): assert account, "Must specify username, password & resource to run this test." print("MyPlexAccount:") print("username: %s" % account.username...
35.097561
88
0.677322
import pytest from plexapi.exceptions import BadRequest, NotFound from . import conftest as utils def test_myplex_accounts(account, plex): assert account, "Must specify username, password & resource to run this test." print("MyPlexAccount:") print("username: %s" % account.username) print("email: %s"...
true
true
f70b9a2e490b150981301c9d54d99efeb3e5f99f
1,970
py
Python
app/service/file_svc.py
FumblingBear/caldera
adef51b27ac04ab21bab33a3c988965ce69fb0f3
[ "Apache-2.0" ]
null
null
null
app/service/file_svc.py
FumblingBear/caldera
adef51b27ac04ab21bab33a3c988965ce69fb0f3
[ "Apache-2.0" ]
null
null
null
app/service/file_svc.py
FumblingBear/caldera
adef51b27ac04ab21bab33a3c988965ce69fb0f3
[ "Apache-2.0" ]
null
null
null
import os from aiohttp import web from app.utility.logger import Logger class FileSvc: def __init__(self, payload_dirs, exfil_dir): self.payload_dirs = payload_dirs self.log = Logger('file_svc') self.exfil_dir = exfil_dir async def download(self, request): name = request.he...
33.965517
97
0.553807
import os from aiohttp import web from app.utility.logger import Logger class FileSvc: def __init__(self, payload_dirs, exfil_dir): self.payload_dirs = payload_dirs self.log = Logger('file_svc') self.exfil_dir = exfil_dir async def download(self, request): name = request.he...
true
true
f70b9c2b4ad81820ced65c41979ef8e1756fe72a
995
py
Python
libs/yowsup/yowsup/yowsup/layers/protocol_acks/protocolentities/ack.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
22
2017-07-14T20:01:17.000Z
2022-03-08T14:22:39.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_acks/protocolentities/ack.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
6
2017-07-14T21:03:50.000Z
2021-06-10T19:08:32.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_acks/protocolentities/ack.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
13
2017-07-14T20:13:14.000Z
2020-11-12T08:06:05.000Z
from yowsup.structs import ProtocolEntity, ProtocolTreeNode class AckProtocolEntity(ProtocolEntity): ''' <ack class="{{receipt | message | ?}}" id="{{message_id}}"> </ack> ''' def __init__(self, _id, _class): super(AckProtocolEntity, self).__init__("ack") self._id = _id sel...
24.875
71
0.554774
from yowsup.structs import ProtocolEntity, ProtocolTreeNode class AckProtocolEntity(ProtocolEntity): def __init__(self, _id, _class): super(AckProtocolEntity, self).__init__("ack") self._id = _id self._class = _class def getId(self): return self._id def getClass(self): ...
true
true
f70b9ca9a7409b6984913947757c73688e40b12c
775
py
Python
HW01/sha256bruteforce.py
ideaPeng/UW-Madison-CS642
ae4ce979f9bd55a1807a0809ec84ccb679e71d5c
[ "MIT" ]
null
null
null
HW01/sha256bruteforce.py
ideaPeng/UW-Madison-CS642
ae4ce979f9bd55a1807a0809ec84ccb679e71d5c
[ "MIT" ]
null
null
null
HW01/sha256bruteforce.py
ideaPeng/UW-Madison-CS642
ae4ce979f9bd55a1807a0809ec84ccb679e71d5c
[ "MIT" ]
1
2021-02-23T03:29:11.000Z
2021-02-23T03:29:11.000Z
#!/usr/bin/env python3 import hashlib def main(): print(hashlib.sha256("hugh,13145820,20193833".encode("ascii")).hexdigest()) # 13145820 guess_flag = True digits = 1 while guess_flag: bound = 10**digits guess = 0 while guess < bound: guess_str = ("hugh,{:0" + st...
28.703704
92
0.547097
import hashlib def main(): print(hashlib.sha256("hugh,13145820,20193833".encode("ascii")).hexdigest()) guess_flag = True digits = 1 while guess_flag: bound = 10**digits guess = 0 while guess < bound: guess_str = ("hugh,{:0" + str(digits) + ...
true
true
f70b9dfdf88a8fb2039774b40ccfcf8d12c02620
6,479
py
Python
turbinia/workers/analysis/jenkins.py
giovannt0/turbinia
6733eea42ba3a2442c49aaf933656ace45bd20e1
[ "Apache-2.0" ]
1
2021-01-21T19:53:33.000Z
2021-01-21T19:53:33.000Z
turbinia/workers/analysis/jenkins.py
joachimmetz/turbinia
f69b34b7da72d9f9eb0d0c4a11e2b8d5443faab8
[ "Apache-2.0" ]
null
null
null
turbinia/workers/analysis/jenkins.py
joachimmetz/turbinia
f69b34b7da72d9f9eb0d0c4a11e2b8d5443faab8
[ "Apache-2.0" ]
1
2019-10-31T10:16:08.000Z
2019-10-31T10:16:08.000Z
# -*- coding: utf-8 -*- # Copyright 2018 Google 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 ...
33.921466
80
0.703812
from __future__ import unicode_literals import os import re from turbinia import TurbiniaException from turbinia.evidence import ReportText from turbinia.lib import text_formatter as fmt from turbinia.workers import TurbiniaTask from turbinia.workers import Priority from turbinia.lib.utils import extra...
true
true
f70b9eda58e54f0a70a16842e2cf09a28ec76236
13,889
py
Python
tangleanalyzer/filter/time.py
bingyanglin/tangle-analyzer.py
70f43604aa13fdeaeeb15535508532da935e45d3
[ "MIT" ]
1
2020-07-27T17:18:03.000Z
2020-07-27T17:18:03.000Z
tangleanalyzer/filter/time.py
bingyanglin/tangle-analyzer.py
70f43604aa13fdeaeeb15535508532da935e45d3
[ "MIT" ]
null
null
null
tangleanalyzer/filter/time.py
bingyanglin/tangle-analyzer.py
70f43604aa13fdeaeeb15535508532da935e45d3
[ "MIT" ]
null
null
null
from typing import Callable from datetime import datetime, timezone from time import mktime from ..common.const import ( MILESTONES_USING_TIMESTAMP_ONLY, TIMESTAMP_B, TIMESTAMP_E, ATCH_TIMESTAMP_B, ATCH_TIMESTAMP_E ) from ..common import tryte_to_int import logging __all__ = [ 'TimeFilter', ] ...
38.796089
101
0.606379
from typing import Callable from datetime import datetime, timezone from time import mktime from ..common.const import ( MILESTONES_USING_TIMESTAMP_ONLY, TIMESTAMP_B, TIMESTAMP_E, ATCH_TIMESTAMP_B, ATCH_TIMESTAMP_E ) from ..common import tryte_to_int import logging __all__ = [ 'TimeFilter', ] ...
true
true
f70b9f243dd1b2f97a048c91c57187db026d813e
4,939
py
Python
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_associate_group_with_project_permission_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_associate_group_with_project_permission_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_associate_group_with_project_permission_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class KeystoneAssociateGroupWithProjectPermissionRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name ...
30.487654
101
0.617331
import pprint import re import six class KeystoneAssociateGroupWithProjectPermissionRequest: sensitive_list = [] openapi_types = { 'project_id': 'str', 'group_id': 'str', 'role_id': 'str' } attribute_map = { 'project_id': 'project_id', 'group_id': 'gr...
true
true
f70ba056fcad84e17f9e4cbcc182c6fcaf5951d5
5,896
py
Python
tensorflow/python/ops/parallel_for/gradients.py
vixadd/tensorflow
8c624204eb686a91779149dc500e6c8c60096074
[ "Apache-2.0" ]
3
2019-11-19T14:07:27.000Z
2020-10-04T12:57:40.000Z
tensorflow/python/ops/parallel_for/gradients.py
vixadd/tensorflow
8c624204eb686a91779149dc500e6c8c60096074
[ "Apache-2.0" ]
4
2020-04-09T16:22:20.000Z
2021-12-15T13:57:36.000Z
tensorflow/python/ops/parallel_for/gradients.py
vixadd/tensorflow
8c624204eb686a91779149dc500e6c8c60096074
[ "Apache-2.0" ]
4
2022-01-13T11:23:44.000Z
2022-03-02T11:11:42.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.837838
80
0.690807
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import check_ops from tensorflow.python.ops import gradients_impl as gradient_ops...
true
true
f70ba09090c619abec9379a4d93b0b6aea65b856
15,804
py
Python
classification/models/model23.py
anonymous2submit/Pointsformer
0eaa141b3d79d45cd925976bde6097b51e0d3819
[ "MIT" ]
null
null
null
classification/models/model23.py
anonymous2submit/Pointsformer
0eaa141b3d79d45cd925976bde6097b51e0d3819
[ "MIT" ]
null
null
null
classification/models/model23.py
anonymous2submit/Pointsformer
0eaa141b3d79d45cd925976bde6097b51e0d3819
[ "MIT" ]
null
null
null
""" Exactly equals to Model21 (the best results so far), but differnt configurations. Exactly based on Model10, but ReLU to GeLU Based on Model8, add dropout and max, avg combine. Based on Local model, add residual connections. The extraction is doubled for depth. Learning Point Cloud with Progressively Local represen...
35.198218
110
0.590926
import torch import torch.nn as nn import torch.nn.functional as F from torch import einsum from einops import rearrange, repeat from pointnet2_ops import pointnet2_utils def square_distance(src, dst): B, N, _ = src.shape _, M, _ = dst.shape dist = -2 * torch.matmul(src, dst.permute(0, 2, 1)) dist += t...
true
true
f70ba0b9684f17eb9c083521f1cbfc758a822d2e
1,013
py
Python
source/data_preparation/00b-generate_assembly_nochain.py
hui2000ji/masif
70a76c5f4639f70c546d5603612c7cc9f47a35b8
[ "Apache-2.0" ]
null
null
null
source/data_preparation/00b-generate_assembly_nochain.py
hui2000ji/masif
70a76c5f4639f70c546d5603612c7cc9f47a35b8
[ "Apache-2.0" ]
null
null
null
source/data_preparation/00b-generate_assembly_nochain.py
hui2000ji/masif
70a76c5f4639f70c546d5603612c7cc9f47a35b8
[ "Apache-2.0" ]
null
null
null
import os import sys from SBI.structure import PDB from default_config.masif_opts import masif_opts print(masif_opts["ligand"]["assembly_dir"]) if not os.path.exists(masif_opts["ligand"]["assembly_dir"]): os.mkdir(masif_opts["ligand"]["assembly_dir"]) def assemble(pdb_id): # Reads and builds the biological as...
30.69697
104
0.686081
import os import sys from SBI.structure import PDB from default_config.masif_opts import masif_opts print(masif_opts["ligand"]["assembly_dir"]) if not os.path.exists(masif_opts["ligand"]["assembly_dir"]): os.mkdir(masif_opts["ligand"]["assembly_dir"]) def assemble(pdb_id): print(os.path.join(masif_opts["...
true
true
f70ba0cd1ceec91a3daa39c0d4e996db44d6f725
13,271
py
Python
log_mito_act/model_57.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito_act/model_57.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito_act/model_57.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', 'X...
79.467066
614
0.809736
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', 'Xiap']) Monomer('Fadd', ['Receptor'...
true
true
f70ba1c7f2cb64fa136136f269dd626b70b2a811
13,693
py
Python
tensorflow/python/framework/sparse_tensor_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/framework/sparse_tensor_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/framework/sparse_tensor_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2015 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...
38.463483
80
0.693274
from absl.testing import parameterized import numpy as np from tensorflow.python.eager import context from tensorflow.python.eager import def_function from tensorflow.python.framework import dtypes from tensorflow.python.framework import errors from tensorflow.python.framework import ops from tensorflow...
true
true
f70ba1fbd0b88f8e278bb8592c895d1b36e75c20
11,615
py
Python
devicely/empatica.py
DigitalBiomarkerDiscoveryPipeline/devicely
9773fead4d3969a32ca2760b8db4ae728c4d5d50
[ "MIT" ]
13
2020-07-13T22:26:25.000Z
2022-03-18T17:40:56.000Z
devicely/empatica.py
DigitalBiomarkerDiscoveryPipeline/devicely
9773fead4d3969a32ca2760b8db4ae728c4d5d50
[ "MIT" ]
26
2020-11-29T11:11:09.000Z
2022-01-12T11:34:19.000Z
devicely/empatica.py
DigitalBiomarkerDiscoveryPipeline/devicely
9773fead4d3969a32ca2760b8db4ae728c4d5d50
[ "MIT" ]
5
2021-07-26T11:01:38.000Z
2022-02-22T18:23:57.000Z
""" Empatica E4 is a wearable device that offers real-time physiological data acquisition such as blood volume pulse, electrodermal activity (EDA), heart rate, interbeat intervals, 3-axis acceleration and skin temperature. """ import os import random import numpy as np import pandas as pd class EmpaticaReader: ...
40.611888
101
0.584245
import os import random import numpy as np import pandas as pd class EmpaticaReader: def __init__(self, path): self.start_times = {} self.sample_freqs = {} files = [f for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))] if files is None: print('Empt...
true
true
f70ba28c0ff01d16d24b0d53e79a3c5456d834b5
7,925
py
Python
thor/filter_orbits.py
moeyensj/thor
ec1150e23ec69944e45f6beddf57cfb46e9e44dc
[ "BSD-3-Clause" ]
11
2019-08-22T18:37:09.000Z
2022-02-28T22:49:25.000Z
thor/filter_orbits.py
moeyensj/thor
ec1150e23ec69944e45f6beddf57cfb46e9e44dc
[ "BSD-3-Clause" ]
57
2019-08-20T19:57:14.000Z
2021-09-16T20:54:59.000Z
thor/filter_orbits.py
moeyensj/thor
ec1150e23ec69944e45f6beddf57cfb46e9e44dc
[ "BSD-3-Clause" ]
7
2021-02-09T21:28:43.000Z
2022-02-01T08:55:29.000Z
import pandas as pd from typing import Tuple from .data_processing import UNKNOWN_ID_REGEX from .utils import calcDeltas __all__ = [ "filterKnownOrbits", "filterOrbits" ] def filterKnownOrbits( orbits: pd.DataFrame, orbit_observations: pd.DataFrame, associations: pd.DataFrame, ...
45.285714
123
0.722145
import pandas as pd from typing import Tuple from .data_processing import UNKNOWN_ID_REGEX from .utils import calcDeltas __all__ = [ "filterKnownOrbits", "filterOrbits" ] def filterKnownOrbits( orbits: pd.DataFrame, orbit_observations: pd.DataFrame, associations: pd.DataFrame, ...
true
true
f70ba298444fd5ee9e0963aa7594d931ec799e5c
2,064
py
Python
Archi/tests/test_esbn_model.py
Near32/Archi
0005713fa4e37c7cd9b34cd257c481d08928db8a
[ "MIT" ]
null
null
null
Archi/tests/test_esbn_model.py
Near32/Archi
0005713fa4e37c7cd9b34cd257c481d08928db8a
[ "MIT" ]
null
null
null
Archi/tests/test_esbn_model.py
Near32/Archi
0005713fa4e37c7cd9b34cd257c481d08928db8a
[ "MIT" ]
null
null
null
import Archi import yaml def test_model_loading(): try: config = yaml.safe_load( open("./esbn_model_test_config.yaml", 'r'), ) except yaml.YANNLError as e: print(e) from Archi import load_model model = load_model(config) assert 'KeyValueMemory' in model....
32.761905
103
0.66376
import Archi import yaml def test_model_loading(): try: config = yaml.safe_load( open("./esbn_model_test_config.yaml", 'r'), ) except yaml.YANNLError as e: print(e) from Archi import load_model model = load_model(config) assert 'KeyValueMemory' in model....
true
true
f70ba2dbbed027a097316912aef62f7e4fca727a
5,378
py
Python
airflow/operators/bash.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
2
2020-05-15T02:40:25.000Z
2020-06-08T04:30:00.000Z
airflow/operators/bash.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
33
2020-06-16T15:12:33.000Z
2021-07-23T07:04:35.000Z
airflow/operators/bash.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
2
2021-01-11T13:53:03.000Z
2021-10-02T05:06:34.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.141844
105
0.649498
import os import signal from subprocess import PIPE, STDOUT, Popen from tempfile import TemporaryDirectory, gettempdir from typing import Dict, Optional from airflow.exceptions import AirflowException from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults from ai...
true
true
f70ba333ac2eec228f11aaf00c56987a66df3504
2,669
py
Python
api_tests/users/views/test_user_list.py
sf2ne/Playground
95b2d222d7ac43baca0249acbfc34e043d6a95b3
[ "Apache-2.0" ]
null
null
null
api_tests/users/views/test_user_list.py
sf2ne/Playground
95b2d222d7ac43baca0249acbfc34e043d6a95b3
[ "Apache-2.0" ]
13
2020-03-24T15:29:41.000Z
2022-03-11T23:15:28.000Z
api_tests/users/views/test_user_list.py
sf2ne/Playground
95b2d222d7ac43baca0249acbfc34e043d6a95b3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import urlparse from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from tests.factories import AuthUserFactory from api.base.settings.defaults import API_BASE class TestUsers(ApiTestCase): def setUp(self): super(TestUsers, self).setUp() self.user...
32.54878
86
0.630948
import urlparse from nose.tools import * from tests.base import ApiTestCase from tests.factories import AuthUserFactory from api.base.settings.defaults import API_BASE class TestUsers(ApiTestCase): def setUp(self): super(TestUsers, self).setUp() self.user_one = AuthUserFactory() self...
true
true
f70ba36f5449e78d850667a6792ccd3d50af645e
155
py
Python
muteria/drivers/testgeneration/testcase_formats/python_unittest/__init__.py
muteria/muteria
2cb72ff04548b011bce9296833bceb295199ae8e
[ "MIT" ]
5
2020-05-06T03:13:01.000Z
2021-12-09T22:39:26.000Z
muteria/drivers/testgeneration/testcase_formats/python_unittest/__init__.py
muteria/muteria
2cb72ff04548b011bce9296833bceb295199ae8e
[ "MIT" ]
6
2019-11-27T18:38:09.000Z
2021-12-16T20:40:50.000Z
muteria/drivers/testgeneration/testcase_formats/python_unittest/__init__.py
muteria/muteria
2cb72ff04548b011bce9296833bceb295199ae8e
[ "MIT" ]
4
2019-06-24T08:54:36.000Z
2022-03-31T15:38:35.000Z
from muteria.drivers.testgeneration.testcase_formats.python_unittest.unittest\ import *
77.5
78
0.496774
from muteria.drivers.testgeneration.testcase_formats.python_unittest.unittest\ import *
true
true
f70ba37efe5a4d8ded4bea670347e317978fe155
4,833
py
Python
pixelprint.py
optoisolator/pixel-print
99ed669bdc47d50c6f9785b7232e97d9b6653467
[ "MIT" ]
null
null
null
pixelprint.py
optoisolator/pixel-print
99ed669bdc47d50c6f9785b7232e97d9b6653467
[ "MIT" ]
null
null
null
pixelprint.py
optoisolator/pixel-print
99ed669bdc47d50c6f9785b7232e97d9b6653467
[ "MIT" ]
null
null
null
#!/usr/bin/python """ -------------------------------------------------------------------------------------------------------------- The MIT License (MIT) Copyright (c) 2016 William Yang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (th...
26.124324
110
0.53652
import time import RPi.GPIO as GPIO import alphanumeric pin_r1 = 5 pin_r2 = 6 pin_r3 = 13 pin_r4 = 19 pin_r5 = 26 pin_c1 = 21 pin_c2 = 20 pin_c3 = 16 pin_c4 = 12 PAUSE_INTERVAL = 300 COL_SCAN = 0.0001 ROW_SCAN = 0.0008 NUM_COLS = 8 class LEDMatrixControl: def __init__(self): self.row_ctrl = [pi...
true
true
f70ba4152c3dda319f435fa092eb83c1d673060f
9,175
py
Python
tests/utils/test_calculate_accuracies.py
RubensZimbres/pytorch-metric-learning
3ff3b9ae6065fdf470f7c19ea8c11f9850d697ea
[ "MIT" ]
1
2020-12-22T01:11:46.000Z
2020-12-22T01:11:46.000Z
tests/utils/test_calculate_accuracies.py
marijnl/pytorch-metric-learning
41e06ef5af398c05d238e0a74ee6c42fa7bd574c
[ "MIT" ]
null
null
null
tests/utils/test_calculate_accuracies.py
marijnl/pytorch-metric-learning
41e06ef5af398c05d238e0a74ee6c42fa7bd574c
[ "MIT" ]
null
null
null
import unittest from pytorch_metric_learning.utils import accuracy_calculator import numpy as np class TestCalculateAccuracies(unittest.TestCase): def test_accuracy_calculator(self): query_labels = np.array([1, 1, 2, 3, 4]) knn_labels1 = np.array( [ [0, 1, 1...
40.597345
87
0.500817
import unittest from pytorch_metric_learning.utils import accuracy_calculator import numpy as np class TestCalculateAccuracies(unittest.TestCase): def test_accuracy_calculator(self): query_labels = np.array([1, 1, 2, 3, 4]) knn_labels1 = np.array( [ [0, 1, 1...
true
true
f70ba52887f184ad281e8caf21f7d1bf136269b9
51,226
py
Python
tensorflow/python/eager/backprop.py
piquark6046/tensorflow
57771c5d008f6d16fd147110213855d145a7e0bc
[ "Apache-2.0" ]
null
null
null
tensorflow/python/eager/backprop.py
piquark6046/tensorflow
57771c5d008f6d16fd147110213855d145a7e0bc
[ "Apache-2.0" ]
null
null
null
tensorflow/python/eager/backprop.py
piquark6046/tensorflow
57771c5d008f6d16fd147110213855d145a7e0bc
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.986282
90
0.679011
import functools import operator import sys import six from tensorflow.python import pywrap_tfe from tensorflow.python.eager import backprop_util from tensorflow.python.eager import context from tensorflow.python.eager import execute from tensorflow.python.eager import imperative_grad from tensorflo...
true
true
f70ba52a2bd12e48541dace861de83c615f1e6a9
142,862
py
Python
test/test_fx.py
ammar1510/pytorch
ec8d6777255821bed73b471eadddde068cd60c0b
[ "Intel" ]
1
2022-02-23T08:20:59.000Z
2022-02-23T08:20:59.000Z
test/test_fx.py
ammar1510/pytorch
ec8d6777255821bed73b471eadddde068cd60c0b
[ "Intel" ]
null
null
null
test/test_fx.py
ammar1510/pytorch
ec8d6777255821bed73b471eadddde068cd60c0b
[ "Intel" ]
null
null
null
# Owner(s): ["oncall: fx"] import builtins import contextlib import copy import functools import inspect import math import numbers import operator import os import pickle import sys import torch import traceback import typing import types import warnings import unittest from math import sqrt from torch.multiprocessin...
36.687725
128
0.585348
import builtins import contextlib import copy import functools import inspect import math import numbers import operator import os import pickle import sys import torch import traceback import typing import types import warnings import unittest from math import sqrt from torch.multiprocessing import Process from torc...
true
true
f70ba6b87b169178ffb85b354aeb87156f54dfd1
3,275
py
Python
generator/verify/sim_sram.py
VLSIDA/OpenCache
0e79bf353c68d57dcc49d78178b12fd0b468f19a
[ "BSD-3-Clause" ]
5
2021-09-15T18:29:49.000Z
2022-03-26T04:41:01.000Z
generator/verify/sim_sram.py
VLSIDA/OpenCache
0e79bf353c68d57dcc49d78178b12fd0b468f19a
[ "BSD-3-Clause" ]
null
null
null
generator/verify/sim_sram.py
VLSIDA/OpenCache
0e79bf353c68d57dcc49d78178b12fd0b468f19a
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2021 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # from policy import replacement_policy as rp from glob...
27.521008
110
0.617405
from policy import replacement_policy as rp from globals import OPTS class sim_sram: def __init__(self, num_words, num_ways, num_rows): self.num_words = num_words self.num_ways = num_ways self.num_rows = num_rows def reset(self): self.valid_array = [[0] * self.num_w...
true
true
f70ba70746408cde2e2e445a071d007f2f2b62f8
1,369
wsgi
Python
files/config-files/maposmatic.wsgi
chatelao/maposmatic-vagrant
c4864a5da5c40a5755f7432c3e2e77eaa87e99e4
[ "Unlicense" ]
25
2016-03-24T23:24:41.000Z
2022-03-04T16:52:47.000Z
files/config-files/maposmatic.wsgi
chatelao/maposmatic-vagrant
c4864a5da5c40a5755f7432c3e2e77eaa87e99e4
[ "Unlicense" ]
30
2016-03-25T06:53:18.000Z
2022-03-12T18:51:27.000Z
files/config-files/maposmatic.wsgi
chatelao/maposmatic-vagrant
c4864a5da5c40a5755f7432c3e2e77eaa87e99e4
[ "Unlicense" ]
13
2016-03-26T23:36:04.000Z
2021-01-20T18:41:10.000Z
# coding: utf-8 # maposmatic, the web front-end of the MapOSMatic city map generation system # Copyright (C) 2009 David Decotigny # Copyright (C) 2009 Frédéric Lehobey # Copyright (C) 2009 David Mentré # Copyright (C) 2009 Maxime Petazzoni # Copyright (C) 2009 Thomas Petazzoni # Copyright (C) 2009 Gaël Utard # ...
37
89
0.770636
import os, sys sys.path.append("/home/maposmatic/maposmatic") sys.path.append("/home/maposmatic/ocitysmap") os.environ["DJANGO_SETTINGS_MODULE"] = 'www.settings' os.environ["MAPOSMATIC_LOG_FILE"] = "/home/maposmatic/maposmatic/logs/maposmatic-www.log" os.environ["PGCONNECT_TIMEOUT"] = "1" impo...
true
true
f70ba851bced003f1bd4ef374153c70502f27c10
2,395
py
Python
bam/task_specific/task.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
bam/task_specific/task.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
bam/task_specific/task.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
25.752688
74
0.704384
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import csv import os import tensorflow.compat.v1 as tf class Example(object): __metaclass__ = abc.ABCMeta def __init__(self, task_name): self.task_name = task_name class ...
true
true
f70ba8cd1beb723b680a53896c7f7d9b27f3178c
3,345
py
Python
amazon_scraper/settings.py
Samyak2/amazon-scraper
f8922e5e9c7e8a1184b59b758757b192f7aa6c29
[ "MIT" ]
1
2019-11-22T13:42:56.000Z
2019-11-22T13:42:56.000Z
amazon_scraper/settings.py
Samyak2/amazon-scraper
f8922e5e9c7e8a1184b59b758757b192f7aa6c29
[ "MIT" ]
null
null
null
amazon_scraper/settings.py
Samyak2/amazon-scraper
f8922e5e9c7e8a1184b59b758757b192f7aa6c29
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for amazon_scraper project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://doc.scrapy.org/en/latest/topics/settings.html # https://doc.scrapy.org/en/lates...
35.210526
102
0.781166
BOT_NAME = 'amazon_scraper' SPIDER_MODULES = ['amazon_scraper.spiders'] NEWSPIDER_MODULE = 'amazon_scraper.spiders' USER_AGENT = 'amazon_scraper_3 (+your@email.here)' ROBOTSTXT_OBEY = True CONCURRENT_REQUESTS = 2 Y = 3 ITEM_PIPELINES = { 'amazon_scraper.pi...
true
true
f70babde43bff0c8c248591d5b1a2c576b8fd8cb
6,101
py
Python
chainer/functions/pooling/average_pooling_2d.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/functions/pooling/average_pooling_2d.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/functions/pooling/average_pooling_2d.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
1
2022-02-20T10:32:59.000Z
2022-02-20T10:32:59.000Z
import numpy import chainer from chainer.backends import cuda from chainer import function_node from chainer.functions.pooling import pooling_2d from chainer.utils import conv class AveragePooling2D(pooling_2d.Pooling2D): """Average pooling over a set of 2d planes.""" # TODO(beam2d): Support cover_all mode....
37.20122
77
0.532208
import numpy import chainer from chainer.backends import cuda from chainer import function_node from chainer.functions.pooling import pooling_2d from chainer.utils import conv class AveragePooling2D(pooling_2d.Pooling2D): def forward_cpu(self, x): self._in_shape = x[0].shape self._in_dtype...
true
true
f70bac85c3a38d428186f259f52a297e8e68a3f2
632
py
Python
app/forms.py
YiChengCai1999/DepressionAnnotator
828f505d0f22f7c2337f1b37c7dee3ea23468951
[ "Apache-2.0" ]
null
null
null
app/forms.py
YiChengCai1999/DepressionAnnotator
828f505d0f22f7c2337f1b37c7dee3ea23468951
[ "Apache-2.0" ]
null
null
null
app/forms.py
YiChengCai1999/DepressionAnnotator
828f505d0f22f7c2337f1b37c7dee3ea23468951
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/12/5 19:35 # @Author : cendeavor # @File : forms.py # @Software: PyCharm from flask_wtf import Form, FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import Required, DataRequired, EqualTo class NameForm(...
27.478261
69
0.693038
from flask_wtf import Form, FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import Required, DataRequired, EqualTo class NameForm(Form): name = StringField('What is your name?', validators=[Required()]) submit = SubmitField('注册') class LoginForm(FlaskForm...
true
true
f70bacb5720192a7e432abae6a62ee6600ea78fe
13,872
py
Python
label_script/label script.py
rechardchen123/tensorflow_understand
aa271efc7253bd273ce8f7ac76eb50ebb68a4534
[ "Apache-2.0" ]
null
null
null
label_script/label script.py
rechardchen123/tensorflow_understand
aa271efc7253bd273ce8f7ac76eb50ebb68a4534
[ "Apache-2.0" ]
null
null
null
label_script/label script.py
rechardchen123/tensorflow_understand
aa271efc7253bd273ce8f7ac76eb50ebb68a4534
[ "Apache-2.0" ]
null
null
null
from __future__ import division from tkinter import * import tkMessageBox from PIL import Image, ImageTk import os import glob import random w0 = 1 #图片原始宽度 h0 = 1 #图片原始高度 # colors for the bboxes COLORS = ['red','blue','yellow','pink','cyan','green','black'] #image size SIZE = 256,256 #指定缩放后的图像大小 DEST_SIZE = 500,50...
35.118987
118
0.517445
from __future__ import division from tkinter import * import tkMessageBox from PIL import Image, ImageTk import os import glob import random w0 = 1 h0 = 1 COLORS = ['red','blue','yellow','pink','cyan','green','black'] SIZE = 256,256 DEST_SIZE = 500,500 class LabelTool(): def __init__(self,master): ...
true
true
f70bace2128f09dc26c0dcf8ff0f701cb867a582
8,016
py
Python
adafruit_pyportal/network.py
jposada202020/Adafruit_CircuitPython_PyPortal
2c09cc1ba6130de03f3f6d2643af5fcc6c82bb8e
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
adafruit_pyportal/network.py
jposada202020/Adafruit_CircuitPython_PyPortal
2c09cc1ba6130de03f3f6d2643af5fcc6c82bb8e
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
adafruit_pyportal/network.py
jposada202020/Adafruit_CircuitPython_PyPortal
2c09cc1ba6130de03f3f6d2643af5fcc6c82bb8e
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense """ `adafruit_pyportal.network` ================================================================================ CircuitPython driver for Adafruit PyPortal. * Author(s): Limor Fried, Kevin J...
38.171429
253
0.594561
import gc from adafruit_portalbase.network import ( NetworkBase, CONTENT_JSON, CONTENT_TEXT, ) from adafruit_pyportal.wifi import WiFi __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyPortal.git" IMAGE_CONVERTER_SERVICE = ( "https://io.adafruit.com...
true
true
f70bad7ea69e067caab69fe4854350f67d504f31
5,718
py
Python
src/sadie/renumbering/result.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
src/sadie/renumbering/result.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
src/sadie/renumbering/result.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
import logging import pandas as pd from ast import literal_eval from .constants import NUMBERING_RESULTS from sadie.numbering.scheme_numbering import scheme_numbering logger = logging.getLogger("NUMBERING") class NumberingResults(pd.DataFrame): def __init__(self, *args, scheme="", region_definition="", allowed_...
38.635135
120
0.549668
import logging import pandas as pd from ast import literal_eval from .constants import NUMBERING_RESULTS from sadie.numbering.scheme_numbering import scheme_numbering logger = logging.getLogger("NUMBERING") class NumberingResults(pd.DataFrame): def __init__(self, *args, scheme="", region_definition="", allowed_...
true
true
f70bade14a31fddad9b14b51709da0b4d1094b8f
1,071
py
Python
tests/test_split_settings.py
abdulniyaspm/django-split-settings
9a004ce261ffd16782da08577fb700300f3bd40b
[ "BSD-3-Clause" ]
1
2021-04-21T03:07:15.000Z
2021-04-21T03:07:15.000Z
tests/test_split_settings.py
abdulniyaspm/django-split-settings
9a004ce261ffd16782da08577fb700300f3bd40b
[ "BSD-3-Clause" ]
null
null
null
tests/test_split_settings.py
abdulniyaspm/django-split-settings
9a004ce261ffd16782da08577fb700300f3bd40b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # pylint: disable=no-member """ This file contains tests with base functionality. """ def test_merge(merged): """ Test that all values from settings are present. """ assert hasattr(merged, 'SECRET_KEY') assert hasattr(merged, 'STATIC_ROOT') def test_override(merged, mon...
23.8
73
0.704949
def test_merge(merged): assert hasattr(merged, 'SECRET_KEY') assert hasattr(merged, 'STATIC_ROOT') def test_override(merged, monkeypatch): monkeypatch.setenv('DJANGO_SETTINGS_MODULE', 'tests.settings.merged') from django.conf import settings assert merged.STATIC_ROOT == settings.STATI...
true
true
f70bae9c979732376e4cb729a58df45c13daa528
528
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/share-34244
b4acf167275d5bf120b1f0254aabc2e0e95111a9
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/share-34244
b4acf167275d5bf120b1f0254aabc2e0e95111a9
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/share-34244
b4acf167275d5bf120b1f0254aabc2e0e95111a9
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "share-34244.botics.co" site_params = { "name": "SHARE", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(defau...
20.307692
61
0.651515
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "share-34244.botics.co" site_params = { "name": "SHARE", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(defau...
true
true
f70baf1f4016fb95e12e305e4c79a70b93b9b4a6
3,210
py
Python
do_it_django_prj/settings.py
Eliksny/do_it_django_a_to_z
728d08f11cbed05aa93004d116926df26f681ccf
[ "MIT" ]
null
null
null
do_it_django_prj/settings.py
Eliksny/do_it_django_a_to_z
728d08f11cbed05aa93004d116926df26f681ccf
[ "MIT" ]
null
null
null
do_it_django_prj/settings.py
Eliksny/do_it_django_a_to_z
728d08f11cbed05aa93004d116926df26f681ccf
[ "MIT" ]
null
null
null
""" Django settings for do_it_django_prj project. Generated by 'django-admin startproject' using Django 3.1.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ impo...
25.275591
91
0.697508
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '^il&w&37030%c0kbg@9(h+k(jsps53_)brjyw)mksmj=*c^5vf' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.cont...
true
true
f70baf4ada1e8690727609371f5fe6b0550ce622
1,073
py
Python
run_on_vacuum/my_logger.py
edwios/xiaomiWifiMapper
55a4bafcca9f7d000e5df4360e2c8e4584541942
[ "MIT" ]
6
2019-04-13T07:22:38.000Z
2022-03-30T16:38:07.000Z
run_on_vacuum/my_logger.py
edwios/xiaomiWifiMapper
55a4bafcca9f7d000e5df4360e2c8e4584541942
[ "MIT" ]
null
null
null
run_on_vacuum/my_logger.py
edwios/xiaomiWifiMapper
55a4bafcca9f7d000e5df4360e2c8e4584541942
[ "MIT" ]
1
2022-02-08T16:08:21.000Z
2022-02-08T16:08:21.000Z
import logging import datetime import os def config_logs(): # Logfile logfolder = "logs/" logdate = datetime.datetime.now().strftime("%y-%m-%d_%H:%M") + "_" logfile = "aerodust.log" logpath = logfolder + logfile #logpath = logfolder + logdate + logfile if not os.path.exists(logfolder): ...
29
70
0.691519
import logging import datetime import os def config_logs(): logfolder = "logs/" logdate = datetime.datetime.now().strftime("%y-%m-%d_%H:%M") + "_" logfile = "aerodust.log" logpath = logfolder + logfile if not os.path.exists(logfolder): os.makedirs(logfolder) logfor...
true
true
f70bafa9d216982e080b2ecad32e8a1c7f55bbe2
11,523
py
Python
httpBridge/http_server.py
neilbroadbent/captive-web-view
ff0b541727ab60df6d05cae1eb66dd9d7b572b89
[ "BSD-2-Clause" ]
null
null
null
httpBridge/http_server.py
neilbroadbent/captive-web-view
ff0b541727ab60df6d05cae1eb66dd9d7b572b89
[ "BSD-2-Clause" ]
null
null
null
httpBridge/http_server.py
neilbroadbent/captive-web-view
ff0b541727ab60df6d05cae1eb66dd9d7b572b89
[ "BSD-2-Clause" ]
null
null
null
# Run with Python 3 # Copyright 2019 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause """\ HTTP server that can be used as a back end to Captive Web View applications. The server is based around a Python3 Simple HTTP Server extended to pick files from one of a number of directories. The server will change direc...
38.667785
110
0.586392
import argparse from http.server import HTTPServer, SimpleHTTPRequestHandler import json import chdir import os.path from pathlib import Path import shutil import ThreadingMixIn ys import textwrap def project_path(*segments): return Path(__file__).resolve().parents[1].joinpath(*se...
true
true
f70bb050c191468d1bf7ec98d2a0e34ce404620f
1,940
py
Python
environment/controller/ppo_test.py
rafaelcostafrf/UAV_3d_virtual_env
bccaa52ec97fff5c0a17e1351a09f913d91c4c7b
[ "CC0-1.0" ]
7
2020-07-16T08:23:58.000Z
2022-02-03T17:51:13.000Z
environment/controller/ppo_test.py
rafaelcostafrf/UAV_3D_Virtual_Env
bccaa52ec97fff5c0a17e1351a09f913d91c4c7b
[ "CC0-1.0" ]
null
null
null
environment/controller/ppo_test.py
rafaelcostafrf/UAV_3D_Virtual_Env
bccaa52ec97fff5c0a17e1351a09f913d91c4c7b
[ "CC0-1.0" ]
3
2020-09-16T14:24:48.000Z
2021-02-03T10:01:00.000Z
import sys from quadrotor_env import quad, render, animation import numpy as np import torch import torch.nn as nn from torch.distributions import MultivariateNormal import numpy as np from quadrotor_env import quad, render, animation from model import ActorCritic """ MECHANICAL ENGINEERING POST-GRADUATE PROGRAM UNIVE...
28.115942
98
0.716495
import sys from quadrotor_env import quad, render, animation import numpy as np import torch import torch.nn as nn from torch.distributions import MultivariateNormal import numpy as np from quadrotor_env import quad, render, animation from model import ActorCritic time_int_step = 0.01 max_timesteps = 1000 T = 5 devi...
true
true
f70bb0dcace5468cfd76a8c6fc2bbcfa258e969a
926
py
Python
server.py
serchrod/PlotWebService
3d744641e7fa187d46903e71b3da6faa1ca80197
[ "MIT" ]
null
null
null
server.py
serchrod/PlotWebService
3d744641e7fa187d46903e71b3da6faa1ca80197
[ "MIT" ]
null
null
null
server.py
serchrod/PlotWebService
3d744641e7fa187d46903e71b3da6faa1ca80197
[ "MIT" ]
null
null
null
from flask import Flask, escape, request from flask import send_file from Graph.plot import Plot app = Flask(__name__) @app.route('/', methods=["POST"]) def hello(): print(request.method) req_data= request.get_json() print(req_data) name = request.args.get("name", "World") return f'Hello, {escape(name)...
25.027027
63
0.679266
from flask import Flask, escape, request from flask import send_file from Graph.plot import Plot app = Flask(__name__) @app.route('/', methods=["POST"]) def hello(): print(request.method) req_data= request.get_json() print(req_data) name = request.args.get("name", "World") return f'Hello, {escape(name)...
true
true
f70bb2806abe8753fedf0fa824ed6ca2d2632ea8
56
py
Python
django_menus/__init__.py
jonesim/django-menus
11f46eead9dec3c99724d9d5df87ce7eb0bee730
[ "MIT" ]
1
2021-11-20T06:24:41.000Z
2021-11-20T06:24:41.000Z
django_menus/__init__.py
jonesim/django-menus
11f46eead9dec3c99724d9d5df87ce7eb0bee730
[ "MIT" ]
null
null
null
django_menus/__init__.py
jonesim/django-menus
11f46eead9dec3c99724d9d5df87ce7eb0bee730
[ "MIT" ]
null
null
null
DUMMY_MENU_ID = 999999 DUMMY_MENU_SLUG = 'SLUGGOESHERE'
18.666667
32
0.821429
DUMMY_MENU_ID = 999999 DUMMY_MENU_SLUG = 'SLUGGOESHERE'
true
true
f70bb319fc1590c0ee070b2f24afe5ede7e22037
22,466
py
Python
tests/wav2vec2/test_modeling_flax_wav2vec2.py
techthiyanes/transformers
705d65368fb28246534ef636fe62c008f4fb2682
[ "Apache-2.0" ]
2
2020-02-26T08:10:20.000Z
2020-02-28T19:10:01.000Z
tests/wav2vec2/test_modeling_flax_wav2vec2.py
techthiyanes/transformers
705d65368fb28246534ef636fe62c008f4fb2682
[ "Apache-2.0" ]
1
2022-03-26T12:10:11.000Z
2022-03-26T12:10:11.000Z
tests/wav2vec2/test_modeling_flax_wav2vec2.py
techthiyanes/transformers
705d65368fb28246534ef636fe62c008f4fb2682
[ "Apache-2.0" ]
1
2022-01-12T14:45:41.000Z
2022-01-12T14:45:41.000Z
# Copyright 2021 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
40.921676
200
0.685658
import inspect import math import unittest import numpy as np from datasets import load_dataset from transformers import Wav2Vec2Config, is_flax_available from transformers.testing_utils import ( is_librosa_available, is_pyctcdecode_available, require_flax, require_librosa, require_p...
true
true
f70bb3e18995f3440115fb6135f9b27b8831cd83
157
py
Python
src/silicium/utils/require.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
2
2021-12-12T12:06:46.000Z
2021-12-12T12:21:18.000Z
src/silicium/utils/require.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
1
2021-12-12T12:21:43.000Z
2021-12-12T22:49:46.000Z
src/silicium/utils/require.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
2
2021-12-12T15:13:54.000Z
2021-12-21T09:08:42.000Z
import os def require(file, *args): with open(os.path.join(os.path.dirname(file), *args), "r") as fh: source = fh.read() return source
19.625
69
0.598726
import os def require(file, *args): with open(os.path.join(os.path.dirname(file), *args), "r") as fh: source = fh.read() return source
true
true
f70bb3f0b9097225846ad1f4840fb47c67f84b16
25,331
py
Python
efficientdet/det_model_fn.py
templeblock/automl
0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2
[ "Apache-2.0" ]
null
null
null
efficientdet/det_model_fn.py
templeblock/automl
0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2
[ "Apache-2.0" ]
null
null
null
efficientdet/det_model_fn.py
templeblock/automl
0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google Research. 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 law...
39.641628
80
0.67218
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import re from absl import logging import numpy as np import tensorflow.compat.v1 as tf import coco_metric import efficientdet_arch import hparams_config import iou_utils import...
true
true
f70bb51fb5f77dd016a4f81eefdabf218aad321e
2,730
py
Python
app/tests/v1/test_meetup.py
KelynPNjeri/Questioner-API
5d71b169be0db2d18642b13075b2cc4e3904e9ee
[ "MIT" ]
1
2019-01-15T06:12:37.000Z
2019-01-15T06:12:37.000Z
app/tests/v1/test_meetup.py
KelynPNjeri/Questioner-API
5d71b169be0db2d18642b13075b2cc4e3904e9ee
[ "MIT" ]
17
2019-01-08T16:02:37.000Z
2019-10-21T17:38:01.000Z
app/tests/v1/test_meetup.py
KelynPNjeri/Questioner-API
5d71b169be0db2d18642b13075b2cc4e3904e9ee
[ "MIT" ]
null
null
null
"""Module for Testing the Meetup Endpoint.""" import json # Local Import from .basecase import TestBaseCase as base class TestMeetup(base): """Testing the Meetup Endpoints with valid input.""" def setUp(self): base.setUp(self) def test_create_meetup(self): """Testing Creation of a Meetu...
42
172
0.675824
import json from .basecase import TestBaseCase as base class TestMeetup(base): def setUp(self): base.setUp(self) def test_create_meetup(self): response = self.client.post( "/api/v1/meetups", data=json.dumps(self.meetup_payload), content_type=self.conten...
true
true
f70bb60cd9a165991bea09f982f2310be199ff23
4,891
py
Python
yolo3/models/yolo3_resnet50.py
holajoa/keras-YOLOv3-model-set
c15b8a2f48371c063f6482b25593dc70d5956323
[ "MIT" ]
601
2019-08-24T10:14:52.000Z
2022-03-29T15:05:33.000Z
yolo3/models/yolo3_resnet50.py
holajoa/keras-YOLOv3-model-set
c15b8a2f48371c063f6482b25593dc70d5956323
[ "MIT" ]
220
2019-10-04T18:57:59.000Z
2022-03-31T15:30:37.000Z
yolo3/models/yolo3_resnet50.py
holajoa/keras-YOLOv3-model-set
c15b8a2f48371c063f6482b25593dc70d5956323
[ "MIT" ]
218
2019-10-31T03:32:11.000Z
2022-03-25T14:44:19.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """YOLO_v3 ResNet50 Model Defined in Keras.""" from tensorflow.keras.layers import UpSampling2D, Concatenate from tensorflow.keras.models import Model from tensorflow.keras.applications.resnet import ResNet50 from yolo3.models.layers import yolo3_predictions, yol...
36.22963
143
0.686363
from tensorflow.keras.layers import UpSampling2D, Concatenate from tensorflow.keras.models import Model from tensorflow.keras.applications.resnet import ResNet50 from yolo3.models.layers import yolo3_predictions, yolo3lite_predictions, tiny_yolo3_predictions, tiny_yolo3lite_predictions def yolo3_resnet50_...
true
true
f70bb65474dfcd0bf14ad96f156718369f73d25c
4,069
py
Python
experiments/ashvin/icml2020/hand/sparse/rewards_relocate1.py
Asap7772/rail-rl-franka-eval
4bf99072376828193d05b53cf83c7e8f4efbd3ba
[ "MIT" ]
null
null
null
experiments/ashvin/icml2020/hand/sparse/rewards_relocate1.py
Asap7772/rail-rl-franka-eval
4bf99072376828193d05b53cf83c7e8f4efbd3ba
[ "MIT" ]
null
null
null
experiments/ashvin/icml2020/hand/sparse/rewards_relocate1.py
Asap7772/rail-rl-franka-eval
4bf99072376828193d05b53cf83c7e8f4efbd3ba
[ "MIT" ]
null
null
null
""" AWR + SAC from demo experiment """ from railrl.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader from railrl.demos.source.mdp_path_loader import MDPPathLoader from railrl.launchers.experiments.ashvin.awr_sac_rl import experiment import railrl.misc.hyperparameter as hyp from railrl.launchers.arglaunc...
30.140741
75
0.574343
from railrl.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader from railrl.demos.source.mdp_path_loader import MDPPathLoader from railrl.launchers.experiments.ashvin.awr_sac_rl import experiment import railrl.misc.hyperparameter as hyp from railrl.launchers.arglauncher import run_variants from railrl.to...
true
true
f70bb6d64ee156cd9362f37bcdaef380680dc2cd
26,277
py
Python
parlai/tasks/blended_skill_talk/agents.py
Misterion777/ParlAI
1a6849d643a30a9a981825d9f50470b6512817c5
[ "MIT" ]
null
null
null
parlai/tasks/blended_skill_talk/agents.py
Misterion777/ParlAI
1a6849d643a30a9a981825d9f50470b6512817c5
[ "MIT" ]
null
null
null
parlai/tasks/blended_skill_talk/agents.py
Misterion777/ParlAI
1a6849d643a30a9a981825d9f50470b6512817c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import os import random import re from collections import defaultdict from typing import List, Optional, Dic...
41.381102
247
0.595464
import copy import os import random import re from collections import defaultdict from typing import List, Optional, Dict, Tuple from parlai.core.opt import Opt from parlai.core.teachers import ParlAIDialogTeacher, create_task_agent_from_taskname from parlai.tasks.convai2.agents import BothTeacher from parlai.ta...
true
true
f70bb732c7dba05e730ab3f4b6cafea04d163ce2
2,582
py
Python
meiduo_mall02/apps/users/migrations/0003_auto_20190519_1544.py
hongyinwang/meiduo_project02
3f21773d2d98204400ea2c3738969ac2a593b242
[ "MIT" ]
null
null
null
meiduo_mall02/apps/users/migrations/0003_auto_20190519_1544.py
hongyinwang/meiduo_project02
3f21773d2d98204400ea2c3738969ac2a593b242
[ "MIT" ]
null
null
null
meiduo_mall02/apps/users/migrations/0003_auto_20190519_1544.py
hongyinwang/meiduo_project02
3f21773d2d98204400ea2c3738969ac2a593b242
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-05-19 15:44 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('areas', '0001_initial'), ...
52.693878
168
0.62316
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('areas', '0001_initial'), ('users', '0002_user_email_active'), ] operations = [ ...
true
true
f70bb8099e8fc99c6b1915a64aa50ef8bc9e551b
466
py
Python
pylearn/assignment/triangle/04.py
wangding/demo-code
ecc225642ba3aa1463f7e15b0f7fd96ecd43f067
[ "MIT" ]
6
2017-10-12T06:17:37.000Z
2022-03-09T13:57:32.000Z
pylearn/assignment/triangle/04.py
wangding/demo-code
ecc225642ba3aa1463f7e15b0f7fd96ecd43f067
[ "MIT" ]
4
2017-06-09T01:31:13.000Z
2020-09-01T20:08:17.000Z
pylearn/assignment/triangle/04.py
wangding/demo-code
ecc225642ba3aa1463f7e15b0f7fd96ecd43f067
[ "MIT" ]
4
2017-10-10T08:57:53.000Z
2018-07-05T09:03:47.000Z
#! /user/bin/env python # _*_ coding: utf-8 _*_ # __author__ = "王顶" # Email: 408542507@qq.com """ 循环切片实现 需求总是改变,一会是4层金字塔,一会儿是5层金子塔 到底要几层,改一下 while 循环的条件变量就行了 """ level = 0 line = '' stars = '*******************************************' spaces = ' ' while level < 4: n ...
19.416667
54
0.450644
level = 0 line = '' stars = '*******************************************' spaces = ' ' while level < 4: n = level * 2 + 1 m = 4 - level line = spaces[:m] + stars[:n] print(line) level = level + 1
true
true
f70bba66989a10c1afc4308f981a114b3aac0610
4,231
py
Python
tests/st/ops/cpu/test_broadcast_to_op.py
PowerOlive/mindspore
bda20724a94113cedd12c3ed9083141012da1f15
[ "Apache-2.0" ]
3,200
2020-02-17T12:45:41.000Z
2022-03-31T20:21:16.000Z
tests/st/ops/cpu/test_broadcast_to_op.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
176
2020-02-12T02:52:11.000Z
2022-03-28T22:15:55.000Z
tests/st/ops/cpu/test_broadcast_to_op.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
621
2020-03-09T01:31:41.000Z
2022-03-30T03:43:19.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
35.258333
78
0.670527
import numpy as np import pytest import mindspore.context as context from mindspore.common.tensor import Tensor from mindspore.ops import operations as P @pytest.mark.level0 @pytest.mark.platform_x86_cpu @pytest.mark.env_onecard def test_broadcast(): context.set_context(mode=context.GRAPH_MODE, de...
true
true
f70bbae8184a4fbe5f16077443f13743bf9bd7ba
3,695
py
Python
huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/update_application_endpoint_request_body.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/update_application_endpoint_request_body.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/update_application_endpoint_request_body.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class UpdateApplicationEndpointRequestBody: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name ...
26.775362
87
0.573748
import pprint import re import six class UpdateApplicationEndpointRequestBody: sensitive_list = [] openapi_types = { 'enabled': 'str', 'user_data': 'str' } attribute_map = { 'enabled': 'enabled', 'user_data': 'user_data' } def __init__(self, enabled=...
true
true
f70bbd6d1707e41946b26993726d5c4787519f5a
332
py
Python
tests/test_info_ordering.py
aventon1/text-summarizer
d7540bfd862b1222f6ebd7875948bbf20c52f603
[ "MIT" ]
null
null
null
tests/test_info_ordering.py
aventon1/text-summarizer
d7540bfd862b1222f6ebd7875948bbf20c52f603
[ "MIT" ]
null
null
null
tests/test_info_ordering.py
aventon1/text-summarizer
d7540bfd862b1222f6ebd7875948bbf20c52f603
[ "MIT" ]
2
2019-10-09T17:17:40.000Z
2020-11-30T05:05:07.000Z
#!opt/python-3.6/bin/python3 import unittest import sys sys.path.append("../src") from info_ordering import order_info class TestInfoOrdering(unittest.TestCase): def test_order_info(self): # TODO: fix to actually test value = 5 self.assertEqual(value, 5) if __name__ == '__main__': uni...
18.444444
42
0.692771
import unittest import sys sys.path.append("../src") from info_ordering import order_info class TestInfoOrdering(unittest.TestCase): def test_order_info(self): value = 5 self.assertEqual(value, 5) if __name__ == '__main__': unittest.main()
true
true
f70bbe427124f831ca320689a3b1138ac1f62dfa
15,815
py
Python
mypy/semanal_typeddict.py
SwagatSBhuyan/mypy
218b91c5576a69da51e0813abd0fc7c5fd2d627e
[ "PSF-2.0" ]
12,496
2016-02-19T13:38:26.000Z
2022-03-31T23:56:19.000Z
mypy/semanal_typeddict.py
SwagatSBhuyan/mypy
218b91c5576a69da51e0813abd0fc7c5fd2d627e
[ "PSF-2.0" ]
9,429
2016-02-19T13:41:32.000Z
2022-03-31T23:29:38.000Z
mypy/semanal_typeddict.py
SwagatSBhuyan/mypy
218b91c5576a69da51e0813abd0fc7c5fd2d627e
[ "PSF-2.0" ]
2,770
2016-02-19T16:18:19.000Z
2022-03-31T08:12:49.000Z
"""Semantic analysis of TypedDict definitions.""" from mypy.backports import OrderedDict from typing import Optional, List, Set, Tuple from typing_extensions import Final from mypy.types import Type, AnyType, TypeOfAny, TypedDictType, TPDICT_NAMES from mypy.nodes import ( CallExpr, TypedDictExpr, Expression, Name...
47.779456
99
0.583244
from mypy.backports import OrderedDict from typing import Optional, List, Set, Tuple from typing_extensions import Final from mypy.types import Type, AnyType, TypeOfAny, TypedDictType, TPDICT_NAMES from mypy.nodes import ( CallExpr, TypedDictExpr, Expression, NameExpr, Context, StrExpr, BytesExpr, UnicodeExpr, ...
true
true
f70bbe50147981c90239bd8aac6d747789d5ce75
3,673
py
Python
main.py
omergoc/ihbarBotu
a30028be26a65b67e0d5c94547e17ab7f00c2a81
[ "Apache-2.0" ]
null
null
null
main.py
omergoc/ihbarBotu
a30028be26a65b67e0d5c94547e17ab7f00c2a81
[ "Apache-2.0" ]
null
null
null
main.py
omergoc/ihbarBotu
a30028be26a65b67e0d5c94547e17ab7f00c2a81
[ "Apache-2.0" ]
null
null
null
from bs4 import BeautifulSoup import requests import os class App: def __init__(self): self.userlist = [] self.headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"} self.page = 1 ...
39.923913
157
0.494963
from bs4 import BeautifulSoup import requests import os class App: def __init__(self): self.userlist = [] self.headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"} self.page = 1 ...
true
true
f70bbe7af3801fa430e6f0bec3f47ab6459ea35a
4,689
py
Python
esmvaltool/diag_scripts/ocean/diagnostic_profiles.py
ruthlorenz/ESMValTool
c3c61b5341037d01c776c3524c0dd4c767507a3d
[ "Apache-2.0" ]
null
null
null
esmvaltool/diag_scripts/ocean/diagnostic_profiles.py
ruthlorenz/ESMValTool
c3c61b5341037d01c776c3524c0dd4c767507a3d
[ "Apache-2.0" ]
null
null
null
esmvaltool/diag_scripts/ocean/diagnostic_profiles.py
ruthlorenz/ESMValTool
c3c61b5341037d01c776c3524c0dd4c767507a3d
[ "Apache-2.0" ]
null
null
null
""" Diagnostic: Diagnostic to produce images of the profile over time from a cube. These plost show cube value (ie temperature) on the x-axis, and depth/height on the y axis. The colour scale is the annual mean of the cube data. Note that this diagnostic assumes that the preprocessors do the bulk of the hard work, an...
26.794286
78
0.622521
import logging import os import sys import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import iris import iris.quickplot as qplt import diagnostic_tools as diagtools from esmvaltool.diag_scripts.shared import run_diagnostic logger = logging.getLogger(os.path.basename(__file__)) logging.getLog...
true
true
f70bbe7da9fe3c9d459fd663fd9800dbefafe584
2,122
py
Python
test/python/test_problem_options.py
vlad17/BlitzML
f13e089acf7435416bec17e87e5b3130426fc2cd
[ "BSD-3-Clause" ]
6
2015-06-16T05:17:17.000Z
2018-08-02T05:50:01.000Z
test/python/test_problem_options.py
vlad17/BlitzML
f13e089acf7435416bec17e87e5b3130426fc2cd
[ "BSD-3-Clause" ]
2
2018-05-13T13:53:58.000Z
2019-06-11T14:53:26.000Z
test/python/test_problem_options.py
vlad17/BlitzML
f13e089acf7435416bec17e87e5b3130426fc2cd
[ "BSD-3-Clause" ]
3
2018-08-02T05:50:03.000Z
2021-02-21T04:44:15.000Z
import unittest import blitzml import numpy as np from common import captured_output class TestProblemOptions(unittest.TestCase): def setUp(self): A = np.arange(20).reshape(5, 4) b = np.arange(5).astype(np.float64) self.prob = blitzml.LassoProblem(A, b) def tearDown(self): del self.prob def te...
30.753623
59
0.723845
import unittest import blitzml import numpy as np from common import captured_output class TestProblemOptions(unittest.TestCase): def setUp(self): A = np.arange(20).reshape(5, 4) b = np.arange(5).astype(np.float64) self.prob = blitzml.LassoProblem(A, b) def tearDown(self): del self.prob def te...
true
true
f70bbfa4c46a7b61211c94260b55968ce1dd3e22
5,156
py
Python
webscraping/Tokenize.py
jfmendozam/ontotoutra
bea4ceafa62500b23495a6de120884ca40f785e9
[ "Apache-2.0" ]
null
null
null
webscraping/Tokenize.py
jfmendozam/ontotoutra
bea4ceafa62500b23495a6de120884ca40f785e9
[ "Apache-2.0" ]
null
null
null
webscraping/Tokenize.py
jfmendozam/ontotoutra
bea4ceafa62500b23495a6de120884ca40f785e9
[ "Apache-2.0" ]
null
null
null
import nltk from langdetect import detect import csv class Tokenize: """ Text tokenizer """ def __init__(self): """ Default constructor """ self.language = "en" self.workDirectory = "/run/media/jf/Datos/Tourist Text Mining/datasets/colombia_en/" self.tagFilename = "t...
32.840764
114
0.442591
import nltk from langdetect import detect import csv class Tokenize: def __init__(self): self.language = "en" self.workDirectory = "/run/media/jf/Datos/Tourist Text Mining/datasets/colombia_en/" self.tagFilename = "tags_en.csv" self.wfFilename = "words_freq_en.csv" ...
true
true
f70bbfe4549985072572f1ddf6fb4774ad2ef538
562
py
Python
tests/static/yaff_test_files/sp/yscript.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
null
null
null
tests/static/yaff_test_files/sp/yscript.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
1
2021-11-02T09:22:56.000Z
2021-11-02T09:22:56.000Z
tests/static/yaff_test_files/sp/yscript.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
1
2021-11-02T08:35:47.000Z
2021-11-02T08:35:47.000Z
#! /usr/bin/python from molmod.units import * from yaff import * import h5py, numpy as np #Setting up system and force field system = System.from_file('system.chk') ff = ForceField.generate(system, 'pars.txt', rcut=15.0*angstrom, alpha_scale=3.2, gcut_scale=1.5, smooth_ei=True) #Setting up output f = h5py.File('outp...
23.416667
113
0.717082
from molmod.units import * from yaff import * import h5py, numpy as np system = System.from_file('system.chk') ff = ForceField.generate(system, 'pars.txt', rcut=15.0*angstrom, alpha_scale=3.2, gcut_scale=1.5, smooth_ei=True) f = h5py.File('output.h5', mode='w') hdf5 = HDF5Writer(f, step=1) r = h5py.File('restart....
true
true
f70bc02a75fa586549688f9970179c4376a1feab
1,410
py
Python
multiprune_plusone/multiprune_plusone.py
5joono/Swin-Transformer
b5b7e85aa11ad72b2bec2d458fa78066e4c3d0f2
[ "MIT" ]
null
null
null
multiprune_plusone/multiprune_plusone.py
5joono/Swin-Transformer
b5b7e85aa11ad72b2bec2d458fa78066e4c3d0f2
[ "MIT" ]
null
null
null
multiprune_plusone/multiprune_plusone.py
5joono/Swin-Transformer
b5b7e85aa11ad72b2bec2d458fa78066e4c3d0f2
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd os.environ['MKL_THREADING_LAYER'] = 'GNU' # df = pd.DataFrame(columns=['multiprune', 'headstr', 'pluslayer', 'plushead', 'acc1']) # df.to_csv("multiprune_plusone.csv",index=False) prevheadlist = [set([7]),set([11]),set([0]),set([7]),set([9]),set([9])] plusheadlist = [s...
45.483871
285
0.656028
import os import numpy as np import pandas as pd os.environ['MKL_THREADING_LAYER'] = 'GNU' prevheadlist = [set([7]),set([11]),set([0]),set([7]),set([9]),set([9])] plusheadlist = [set(range(12))-{7},set(range(12))-{11},set(range(12))-{0},set(range(12))-{7},set(range(12))-{9},set(range(12))-{9}] for multiprune in ra...
true
true
f70bc203e41ad8b576f3082f590f0bd6ff805df1
1,969
py
Python
pythonturtle/my_turtle.py
Cleverect/PythonTurtle
961f8d13cd835e55efa8fd04ebbcb0120ec7dec4
[ "MIT" ]
114
2019-08-27T11:47:21.000Z
2022-02-22T11:50:49.000Z
pythonturtle/my_turtle.py
Cleverect/PythonTurtle
961f8d13cd835e55efa8fd04ebbcb0120ec7dec4
[ "MIT" ]
31
2019-08-26T22:54:26.000Z
2022-01-10T17:13:27.000Z
pythonturtle/my_turtle.py
Cleverect/PythonTurtle
961f8d13cd835e55efa8fd04ebbcb0120ec7dec4
[ "MIT" ]
38
2019-10-05T07:41:33.000Z
2022-01-15T03:32:23.000Z
import wx from .misc.helpers import deg_to_rad, rad_to_deg from .misc.vector import Vector # Size of the turtle canvas. We assume no user will have a screen # so big that the canvas will be bigger than this. BITMAP_SIZE = Vector((2000, 1200)) # Center of the canvas. origin = BITMAP_SIZE / 2.0 def to_my_angle(angle...
25.907895
75
0.643982
import wx from .misc.helpers import deg_to_rad, rad_to_deg from .misc.vector import Vector BITMAP_SIZE = Vector((2000, 1200)) origin = BITMAP_SIZE / 2.0 def to_my_angle(angle): return rad_to_deg(-angle) - 180 def from_my_angle(angle): return deg_to_rad(-angle + 180) def from_my_pos(pos): return ...
true
true
f70bc44faef09945bde95e95977b11d93d4dcd31
1,698
py
Python
cmsis-svd-parsing/main.py
michael-christen/prototypes
676dbcfc750b7a0b4a88bcd6a9fc8b109d8cd88f
[ "MIT" ]
null
null
null
cmsis-svd-parsing/main.py
michael-christen/prototypes
676dbcfc750b7a0b4a88bcd6a9fc8b109d8cd88f
[ "MIT" ]
9
2021-03-10T14:00:17.000Z
2022-02-27T02:41:57.000Z
cmsis-svd-parsing/main.py
michael-christen/prototypes
676dbcfc750b7a0b4a88bcd6a9fc8b109d8cd88f
[ "MIT" ]
null
null
null
import click from cmsis_svd.parser import SVDParser MCU_OPTIONS = [ 'STM32F0xx', ] MCU2VENDOR_FILE = { 'STM32F0xx': ('STMicro', 'STM32F0xx.svd'), } ALL = 'show_all' def show_register(register): fields = [] for field in register.fields: upper_index = field.bit_offset + field.bit_width - 1 ...
29.789474
112
0.668433
import click from cmsis_svd.parser import SVDParser MCU_OPTIONS = [ 'STM32F0xx', ] MCU2VENDOR_FILE = { 'STM32F0xx': ('STMicro', 'STM32F0xx.svd'), } ALL = 'show_all' def show_register(register): fields = [] for field in register.fields: upper_index = field.bit_offset + field.bit_width - 1 ...
true
true
f70bc45cd14977ecb22dd06d2ffddc212674349a
14,910
py
Python
mycv/train.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
mycv/train.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
mycv/train.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
from mycv.utils.general import disable_multithreads disable_multithreads() import os from pathlib import Path import argparse from tqdm import tqdm import math import torch import torch.cuda.amp as amp from torch.optim.lr_scheduler import LambdaLR from torch.nn.parallel import DistributedDataParallel as DDP import wand...
39.340369
93
0.576526
from mycv.utils.general import disable_multithreads disable_multithreads() import os from pathlib import Path import argparse from tqdm import tqdm import math import torch import torch.cuda.amp as amp from torch.optim.lr_scheduler import LambdaLR from torch.nn.parallel import DistributedDataParallel as DDP import wand...
true
true
f70bc4b73a9f5b613ca9d0d69fb70d4dd3db32df
13,451
py
Python
config/settings/base.py
CrazyMath/smcrm
7027026d450279d63b81147e49cc2be2be622550
[ "MIT" ]
null
null
null
config/settings/base.py
CrazyMath/smcrm
7027026d450279d63b81147e49cc2be2be622550
[ "MIT" ]
null
null
null
config/settings/base.py
CrazyMath/smcrm
7027026d450279d63b81147e49cc2be2be622550
[ "MIT" ]
null
null
null
""" Base settings to build other settings files upon. """ from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent # smcrm/ APPS_DIR = ROOT_DIR / "smcrm" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FILE...
42.701587
100
0.647833
from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent APPS_DIR = ROOT_DIR / "smcrm" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FILE: env.read_env(str(ROOT_DIR / ".env")) = env.bool("DJ...
true
true
f70bc4c80a5039b58b01dee499a76cc5f8cb418b
1,693
py
Python
utils/imgs_getter.py
albertschr/wechat_robot_supported_blockchain
27b257bb9cfc491f0c6b8178a0fe0de9e92dd5c5
[ "MIT" ]
7
2019-04-01T01:04:52.000Z
2019-04-30T09:09:30.000Z
utils/imgs_getter.py
albertschr/wechat_robot_supported_blockchain
27b257bb9cfc491f0c6b8178a0fe0de9e92dd5c5
[ "MIT" ]
6
2019-03-09T03:17:02.000Z
2019-04-03T11:51:13.000Z
utils/imgs_getter.py
leeduckgo/wechat_robot_supported_blockchain
27b257bb9cfc491f0c6b8178a0fe0de9e92dd5c5
[ "MIT" ]
6
2019-03-08T01:50:40.000Z
2019-03-22T02:06:02.000Z
# -*- coding: utf-8 -*- """ 获取YCY图片 """ import json import os import requests from settings import PROJECT_PATH class YCYImage(object): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"...
29.189655
158
0.546958
import json import os import requests from settings import PROJECT_PATH class YCYImage(object): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", } def get_i...
true
true
f70bc60d5ef867aef041dfad4d51b7dc3f6c6c3a
4,772
py
Python
dace/transformation/testing.py
targetsm/dace
297b12804a334df8cc6fad5250d5fb0cce20dc6e
[ "BSD-3-Clause" ]
null
null
null
dace/transformation/testing.py
targetsm/dace
297b12804a334df8cc6fad5250d5fb0cce20dc6e
[ "BSD-3-Clause" ]
null
null
null
dace/transformation/testing.py
targetsm/dace
297b12804a334df8cc6fad5250d5fb0cce20dc6e
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved. import copy from io import StringIO import os import sys import traceback from dace.sdfg import SDFG from dace.transformation.optimizer import Optimizer class TransformationTester(Optimizer): """ An SDFG optimizer that consecutively appl...
34.085714
80
0.548617
import copy from io import StringIO import os import sys import traceback from dace.sdfg import SDFG from dace.transformation.optimizer import Optimizer class TransformationTester(Optimizer): def __init__(self, sdfg: SDFG, depth=1, validate=True, ...
true
true
f70bc898982ac2eebdf07a06cfac61453b208b2a
1,639
py
Python
snake/main/point.py
megh-khaire/SnakeAIs
1dbc76a47a3bb4651c426f04671ae8ae12079c97
[ "Apache-2.0" ]
null
null
null
snake/main/point.py
megh-khaire/SnakeAIs
1dbc76a47a3bb4651c426f04671ae8ae12079c97
[ "Apache-2.0" ]
null
null
null
snake/main/point.py
megh-khaire/SnakeAIs
1dbc76a47a3bb4651c426f04671ae8ae12079c97
[ "Apache-2.0" ]
null
null
null
import pygame from snake.resources.constants import BLOCK_SIZE, WIDTH, HEIGHT from snake.resources.directions import Direction class Point: def __init__(self, x, y): self.x = x self.y = y self.f = 0 self.g = 0 self.h = 0 self.neighbors = [] self.origin = Non...
37.25
93
0.611959
import pygame from snake.resources.constants import BLOCK_SIZE, WIDTH, HEIGHT from snake.resources.directions import Direction class Point: def __init__(self, x, y): self.x = x self.y = y self.f = 0 self.g = 0 self.h = 0 self.neighbors = [] self.origin = Non...
true
true
f70bc89ae28e0a1442364b6237ac83deeb24e3ef
3,508
py
Python
examples/01_modelling/plot_06_synthetic_4d.py
geophysics-ubonn/crtomo_tools
a01b4d31d7250bc729605ae4dc035f108168128e
[ "MIT" ]
2
2021-03-05T14:30:20.000Z
2021-04-16T05:31:07.000Z
examples/01_modelling/plot_06_synthetic_4d.py
geophysics-ubonn/crtomo_tools
a01b4d31d7250bc729605ae4dc035f108168128e
[ "MIT" ]
1
2019-06-06T12:22:26.000Z
2019-06-06T12:22:26.000Z
examples/01_modelling/plot_06_synthetic_4d.py
geophysics-ubonn/crtomo_tools
a01b4d31d7250bc729605ae4dc035f108168128e
[ "MIT" ]
9
2019-02-22T12:17:50.000Z
2021-09-01T01:47:55.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generating a 4D synthetic data set with noise. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A 2D space, time and frequency data set is generated for testing purposes in reda. """ ############################################################################### # import...
37.319149
82
0.586374
true
true
f70bc95dea3ed52a2d7c9b3d4c50969f525e91e1
619
py
Python
test/test_add_contact.py
Atush/py_learning
2c25151882eb0fc8864fd868cf20d04311d2bac7
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
Atush/py_learning
2c25151882eb0fc8864fd868cf20d04311d2bac7
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
Atush/py_learning
2c25151882eb0fc8864fd868cf20d04311d2bac7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.contact import Contact def test_add_contact(app, json_contacts, db, check_ui): contact=json_contacts app.open_home_page() old_contacts = db.get_contact_list() app.contact.create(contact) assert len(old_contacts) + 1 == app.contact.count() new_contacts = db.g...
38.6875
123
0.73021
from model.contact import Contact def test_add_contact(app, json_contacts, db, check_ui): contact=json_contacts app.open_home_page() old_contacts = db.get_contact_list() app.contact.create(contact) assert len(old_contacts) + 1 == app.contact.count() new_contacts = db.get_contact_list() o...
true
true
f70bcacb9fbd7c0eef2a877d9d13e34b3353d545
6,654
py
Python
src/models/model_evaluate.py
singh-karanpal/Capstone
807ca3f70276a0dd17244a123a759a914d358424
[ "MIT" ]
null
null
null
src/models/model_evaluate.py
singh-karanpal/Capstone
807ca3f70276a0dd17244a123a759a914d358424
[ "MIT" ]
null
null
null
src/models/model_evaluate.py
singh-karanpal/Capstone
807ca3f70276a0dd17244a123a759a914d358424
[ "MIT" ]
null
null
null
# author: Carlina Kim, Karanpal Singh, Sukriti Trehan, Victor Cuspinera # date: 2020-06-21 '''This script will read the saved theme/subtheme model(s), padded validation sets and y validation sets for model evaluation, and will save the evaluation results in the specified directory. There are 2 parameters Input Path ...
42.653846
175
0.625338
import pandas as pd import numpy as np from docopt import docopt from sklearn.metrics import precision_score, recall_score, f1_score, accuracy_score, precision_recall_curve import matplotlib.pyplot as plt import tensorflow.compat.v1 as tf tf.disable_v2_behavior() opt = docopt(__doc__) print("\n-----START: model...
true
true
f70bccb51593edf285f53782a14711199b469634
6,083
py
Python
applications/graph/node2vec/randproj.py
aj-prime/lbann
a4cf81386b3f43586057b5312192e180b1259add
[ "Apache-2.0" ]
null
null
null
applications/graph/node2vec/randproj.py
aj-prime/lbann
a4cf81386b3f43586057b5312192e180b1259add
[ "Apache-2.0" ]
5
2021-07-15T20:51:21.000Z
2022-01-01T03:18:05.000Z
applications/graph/node2vec/randproj.py
aj-prime/lbann
a4cf81386b3f43586057b5312192e180b1259add
[ "Apache-2.0" ]
null
null
null
"""Learn embedding weights with LBANN.""" import argparse import os.path import numpy as np import lbann import lbann.contrib.launcher import lbann.contrib.args import data.data_readers import model.random_projection import utils import utils.graph import utils.snap root_dir = os.path.dirname(os.path.realpath(__file...
28.293023
75
0.687161
import argparse import os.path import numpy as np import lbann import lbann.contrib.launcher import lbann.contrib.args import data.data_readers import model.random_projection import utils import utils.graph import utils.snap root_dir = os.path.dirname(os.path.realpath(__file__)) parser = argparse.ArgumentParse...
true
true
f70bcdde6c2b7e2b286a382114dbe03ea56ebf57
3,005
py
Python
tests/lib/bes/testing/framework/test_unit_test_inspect.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
tests/lib/bes/testing/framework/test_unit_test_inspect.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
tests/lib/bes/testing/framework/test_unit_test_inspect.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import os.path as path from bes.fs.file_util import file_util from bes.fs.temp_file import temp_file from bes.testing.unit_test import unit_test from bes.testing.framework import unit_test_inspect as UTI fr...
26.130435
90
0.671215
import os.path as path from bes.fs.file_util import file_util from bes.fs.temp_file import temp_file from bes.testing.unit_test import unit_test from bes.testing.framework import unit_test_inspect as UTI from bes.testing.unit_test_skip import raise_skip class test_unit_test_inspect(unit_test): @classmethod d...
true
true
f70bcdea0c2a415ada92517635d009ce45a9da67
840
py
Python
vcx/wrappers/python3/aries-test-server/inviter.py
sklump/indy-sdk
ee05a89ddf60b42f7483bebf2d89a936e12730df
[ "Apache-2.0" ]
636
2017-05-25T07:45:43.000Z
2022-03-23T22:30:34.000Z
vcx/wrappers/python3/aries-test-server/inviter.py
Nick-1979/indy-sdk
e5f812e14962f0d51cf96f843033754ff841ce30
[ "Apache-2.0" ]
731
2017-05-29T07:15:08.000Z
2022-03-31T07:55:58.000Z
vcx/wrappers/python3/aries-test-server/inviter.py
Nick-1979/indy-sdk
e5f812e14962f0d51cf96f843033754ff841ce30
[ "Apache-2.0" ]
904
2017-05-25T07:45:49.000Z
2022-03-31T07:43:31.000Z
import json from vcx.api.connection import Connection from utils import init_vcx, run_coroutine_in_new_loop from connection import BaseConnection class Inviter(BaseConnection): async def start(self): await init_vcx() print("Create a connection to alice and print out the invite details") c...
30
78
0.679762
import json from vcx.api.connection import Connection from utils import init_vcx, run_coroutine_in_new_loop from connection import BaseConnection class Inviter(BaseConnection): async def start(self): await init_vcx() print("Create a connection to alice and print out the invite details") c...
true
true
f70bce271d5d7f26a676fc36c142470dd67601e0
5,593
py
Python
server.py
pgneditor/pgneditor
676334e9325a6d48ac6367d35a03fedf44ec2be9
[ "MIT" ]
2
2019-07-15T00:52:13.000Z
2019-08-04T07:46:56.000Z
server.py
pgneditor/pgneditor
676334e9325a6d48ac6367d35a03fedf44ec2be9
[ "MIT" ]
2
2021-02-08T20:48:35.000Z
2021-06-01T23:45:13.000Z
server.py
pgneditor/pgneditor
676334e9325a6d48ac6367d35a03fedf44ec2be9
[ "MIT" ]
1
2019-08-04T07:47:04.000Z
2019-08-04T07:47:04.000Z
################################################################### import logging import tornado.escape import tornado.ioloop import tornado.options import tornado.web import tornado.websocket import os.path import uuid from os import environ import json from tornado.options import define, options import mimetypes ...
33.491018
122
0.576971
true
true
f70bcec89189e9db37ce50fe1f17d8e2b524dad4
3,994
py
Python
nova/tests/functional/regressions/test_bug_1689692.py
bopopescu/nova-8
768d7cc0a632e1a880f00c5840c1ec8051e161be
[ "Apache-2.0" ]
null
null
null
nova/tests/functional/regressions/test_bug_1689692.py
bopopescu/nova-8
768d7cc0a632e1a880f00c5840c1ec8051e161be
[ "Apache-2.0" ]
2
2015-02-03T06:25:24.000Z
2015-02-04T10:10:36.000Z
nova/tests/functional/regressions/test_bug_1689692.py
bopopescu/nova-8
768d7cc0a632e1a880f00c5840c1ec8051e161be
[ "Apache-2.0" ]
7
2015-01-20T10:30:08.000Z
2020-02-05T10:29:05.000Z
# Copyright 2017 Huawei Technologies Co.,LTD. # # 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 agre...
46.988235
79
0.686279
from nova import test from nova.tests import fixtures as nova_fixtures from nova.tests.functional import integrated_helpers from nova.tests.unit import cast_as_call from nova.tests.unit.image import fake as image_fake from nova.tests.unit import policy_fixture class ServerListLimitMarkerCell0Test(test.T...
true
true
f70bd07a185c559699661056ded03831035519a5
12,204
py
Python
isic_archive/models/segmentation_helpers/scikit.py
ImageMarkup/isic-archive
7cd8097886d685ec629e2fcba079271fb77d028f
[ "Apache-2.0" ]
42
2015-12-12T14:05:46.000Z
2022-03-26T15:20:39.000Z
isic_archive/models/segmentation_helpers/scikit.py
ImageMarkup/isic-archive
7cd8097886d685ec629e2fcba079271fb77d028f
[ "Apache-2.0" ]
494
2015-07-09T16:14:12.000Z
2021-03-09T09:37:36.000Z
isic_archive/models/segmentation_helpers/scikit.py
ImageMarkup/uda
d221af3368baf3a06ecab67e69e9d0077426c8f9
[ "Apache-2.0" ]
12
2015-08-20T14:20:48.000Z
2020-10-20T01:14:44.000Z
import collections import io from typing import BinaryIO, Tuple, Union import warnings import numpy import skimage.io import skimage.measure import skimage.morphology import skimage.segmentation import skimage.transform from .base import BaseSegmentationHelper class ScikitSegmentationHelper(BaseSegmentationHelper):...
37.207317
100
0.619879
import collections import io from typing import BinaryIO, Tuple, Union import warnings import numpy import skimage.io import skimage.measure import skimage.morphology import skimage.segmentation import skimage.transform from .base import BaseSegmentationHelper class ScikitSegmentationHelper(BaseSegmentationHelper):...
true
true
f70bd2041fc86759e5bde0e6cb049a727675d6f9
13,026
py
Python
mmdet/models/backbones/res2net.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
mmdet/models/backbones/res2net.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
mmdet/models/backbones/res2net.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
import math import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.utils import ge...
37.005682
80
0.513511
import math import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.utils import ge...
true
true