hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c2c23195c29bf15245e19a460ab6a42cc71ad0f
1,519
py
Python
nidaqmx/system/_watchdog_modules/expiration_states_collection.py
stafak/nidaqmx-python
f354d7971b21074c120c6f298dbbf4a5e0e4f4f4
[ "MIT" ]
252
2017-03-22T02:43:16.000Z
2022-03-27T14:44:44.000Z
nidaqmx/system/_watchdog_modules/expiration_states_collection.py
stafak/nidaqmx-python
f354d7971b21074c120c6f298dbbf4a5e0e4f4f4
[ "MIT" ]
133
2017-03-21T20:57:59.000Z
2022-03-31T16:08:12.000Z
nidaqmx/system/_watchdog_modules/expiration_states_collection.py
stafak/nidaqmx-python
f354d7971b21074c120c6f298dbbf4a5e0e4f4f4
[ "MIT" ]
124
2017-04-01T18:35:24.000Z
2022-03-25T06:30:00.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six from nidaqmx.errors import DaqError from nidaqmx.system._watchdog_modules.expiration_state import ExpirationState class ExpirationStatesCollection(object):...
30.38
78
0.663594
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six from nidaqmx.errors import DaqError from nidaqmx.system._watchdog_modules.expiration_state import ExpirationState class ExpirationStatesCollection(object):...
false
true
1c2c240ba51aa9a5a97742a7d246ed58d9c144e7
1,582
py
Python
src/test/task_scoring/tasks_tests_handler/previous_errors_test.py
JetBrains-Research/codetracker-data
6fb3900bd3cfe44d900d7fa8e89c7c35818424ed
[ "MIT" ]
4
2020-05-12T10:29:15.000Z
2020-08-21T04:26:12.000Z
src/test/task_scoring/tasks_tests_handler/previous_errors_test.py
JetBrains-Research/task-tracker-post-processing
6fb3900bd3cfe44d900d7fa8e89c7c35818424ed
[ "MIT" ]
15
2020-02-05T12:18:00.000Z
2020-05-08T09:22:50.000Z
src/test/task_scoring/tasks_tests_handler/previous_errors_test.py
JetBrains-Research/task-tracker-post-processing
6fb3900bd3cfe44d900d7fa8e89c7c35818424ed
[ "MIT" ]
1
2020-06-21T06:50:11.000Z
2020-06-21T06:50:11.000Z
# Copyright (c) 2020 Anastasiia Birillo, Elena Lyulina import os import pytest from src.main.util.consts import TEST_DATA_PATH, TASK from src.main.util.language_util import get_language_by_extension from src.main.task_scoring.tasks_tests_handler import create_in_and_out_dict, check_tasks, run_tests from src.main.uti...
49.4375
116
0.764223
import os import pytest from src.main.util.consts import TEST_DATA_PATH, TASK from src.main.util.language_util import get_language_by_extension from src.main.task_scoring.tasks_tests_handler import create_in_and_out_dict, check_tasks, run_tests from src.main.util.file_util import get_all_file_system_items, get_exte...
true
true
1c2c2424c796938fda7f59e099075098b3c146c7
7,492
py
Python
test/unit/tasks/test_forecasting.py
bahia14/Fedot_Times_Series_Forecast
995751068733541ba2f546065082709ce0fb63ae
[ "BSD-3-Clause" ]
null
null
null
test/unit/tasks/test_forecasting.py
bahia14/Fedot_Times_Series_Forecast
995751068733541ba2f546065082709ce0fb63ae
[ "BSD-3-Clause" ]
null
null
null
test/unit/tasks/test_forecasting.py
bahia14/Fedot_Times_Series_Forecast
995751068733541ba2f546065082709ce0fb63ae
[ "BSD-3-Clause" ]
null
null
null
from random import seed import numpy as np import pytest from sklearn.metrics import mean_absolute_error, mean_squared_error from statsmodels.tsa.arima_process import ArmaProcess from fedot.core.data.data import InputData from fedot.core.data.data_split import train_test_data_setup from fedot.core.pipelines.node impo...
34.366972
93
0.712493
from random import seed import numpy as np import pytest from sklearn.metrics import mean_absolute_error, mean_squared_error from statsmodels.tsa.arima_process import ArmaProcess from fedot.core.data.data import InputData from fedot.core.data.data_split import train_test_data_setup from fedot.core.pipelines.node impo...
true
true
1c2c2446168078597ab5cdb68e8d9c24293893b6
881
py
Python
atom/nucleus/python/test/test_card_details_vo.py
AbhiGupta03/SDK
f3a61aae7a847f07f0c22a154ca88dc378e9d25e
[ "Apache-2.0" ]
null
null
null
atom/nucleus/python/test/test_card_details_vo.py
AbhiGupta03/SDK
f3a61aae7a847f07f0c22a154ca88dc378e9d25e
[ "Apache-2.0" ]
null
null
null
atom/nucleus/python/test/test_card_details_vo.py
AbhiGupta03/SDK
f3a61aae7a847f07f0c22a154ca88dc378e9d25e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Hydrogen Nucleus API The Hydrogen Nucleus API # noqa: E501 OpenAPI spec version: 1.9.5 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import nucleus_api from nu...
21.487805
82
0.701476
from __future__ import absolute_import import unittest import nucleus_api from nucleus_api.models.card_details_vo import CardDetailsVO from nucleus_api.rest import ApiException class TestCardDetailsVO(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testCar...
true
true
1c2c24be7988d5e0d24c50cfd0f5ee10081a7573
665
py
Python
day16/coffeeMachine/main.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day16/coffeeMachine/main.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day16/coffeeMachine/main.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
from menu import Menu, MenuItem from coffee_maker import CoffeeMaker from money_machine import MoneyMachine machine = CoffeeMaker() moneyBox = MoneyMachine() menu = Menu() machine_running = True while machine_running: choice = input(f"Our menu: {menu.get_items()} \nWhat would you like? ").lower() if choic...
25.576923
87
0.666165
from menu import Menu, MenuItem from coffee_maker import CoffeeMaker from money_machine import MoneyMachine machine = CoffeeMaker() moneyBox = MoneyMachine() menu = Menu() machine_running = True while machine_running: choice = input(f"Our menu: {menu.get_items()} \nWhat would you like? ").lower() if choic...
true
true
1c2c25bc1316e2704e991e848fb9a89dcf6f36b1
4,656
py
Python
config_utils/re_train_deeplab_v3plus.py
charleshsc/autodeeplab
03809e5aeb8fe7d570921b0265520e9fa976da88
[ "MIT" ]
90
2020-05-19T07:19:12.000Z
2022-03-21T18:11:45.000Z
config_utils/re_train_deeplab_v3plus.py
hjl-yul154/autodeeplab
1bd8399ac830fcafd506a4207b75e05682d1e260
[ "MIT" ]
17
2020-05-18T13:52:05.000Z
2021-09-08T04:51:58.000Z
config_utils/re_train_deeplab_v3plus.py
hjl-yul154/autodeeplab
1bd8399ac830fcafd506a4207b75e05682d1e260
[ "MIT" ]
28
2020-06-14T22:30:35.000Z
2022-02-23T12:17:42.000Z
import argparse def obtain_retrain_deeplab_v3plus_args(): parser = argparse.ArgumentParser(description="PyTorch DeeplabV3Plus Training") parser.add_argument('--backbone', type=str, default='resnet', choices=['resnet', 'xception', 'drn', 'mobilenet'], help='backb...
58.936709
94
0.577964
import argparse def obtain_retrain_deeplab_v3plus_args(): parser = argparse.ArgumentParser(description="PyTorch DeeplabV3Plus Training") parser.add_argument('--backbone', type=str, default='resnet', choices=['resnet', 'xception', 'drn', 'mobilenet'], help='backb...
true
true
1c2c26bb3d367a174b0673cc8756efbe51e0ec91
2,329
py
Python
tfx/extensions/google_cloud_ai_platform/tuner/component_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1,813
2019-02-04T17:17:30.000Z
2022-03-29T13:39:30.000Z
tfx/extensions/google_cloud_ai_platform/tuner/component_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
2,710
2019-02-14T00:41:00.000Z
2022-03-31T07:23:00.000Z
tfx/extensions/google_cloud_ai_platform/tuner/component_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
731
2019-02-04T17:59:18.000Z
2022-03-31T06:45:51.000Z
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
34.761194
77
0.731215
import tensorflow as tf from tfx.extensions.google_cloud_ai_platform.tuner import component from tfx.proto import trainer_pb2 from tfx.proto import tuner_pb2 from tfx.types import channel_utils from tfx.types import standard_artifacts class TunerTest(tf.test.TestCase): def setUp(self): super().se...
true
true
1c2c2728763b798c6f57925fcb7432baa6f7fd51
9,048
py
Python
idea/migrations/0019_auto__add_field_banner_slug__add_field_banner_private__chg_field_vote_.py
mikiec84/idea-box
02df9e5130ab4d463ad7f43f7a4a3a51dc640840
[ "CC0-1.0" ]
111
2015-01-05T21:15:31.000Z
2021-08-18T18:07:53.000Z
idea/migrations/0019_auto__add_field_banner_slug__add_field_banner_private__chg_field_vote_.py
mikiec84/idea-box
02df9e5130ab4d463ad7f43f7a4a3a51dc640840
[ "CC0-1.0" ]
30
2015-02-11T21:09:49.000Z
2022-03-11T23:26:07.000Z
idea/migrations/0019_auto__add_field_banner_slug__add_field_banner_private__chg_field_vote_.py
gaybro8777/idea-box
02df9e5130ab4d463ad7f43f7a4a3a51dc640840
[ "CC0-1.0" ]
39
2015-01-06T07:41:49.000Z
2022-02-24T14:03:04.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Banner.slug', unique=False for now to prevent duplicate key errors db.add_column(u'idea_bann...
68.545455
217
0.556698
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column(u'idea_banner', 'slug', self.gf('django.db.models.fields.SlugField')(default='', unique=False,...
true
true
1c2c2763a791d54ccbcb6ac7a676edd5885da2ed
47,092
py
Python
course/utils.py
hanjianwei/relate
971e27a1bdd69236dc6dc294024b50584435a18d
[ "Unlicense" ]
null
null
null
course/utils.py
hanjianwei/relate
971e27a1bdd69236dc6dc294024b50584435a18d
[ "Unlicense" ]
6
2015-08-18T00:13:40.000Z
2018-01-31T05:55:13.000Z
course/utils.py
dzhuang/relate
f90cc146861e1523f50d29fa1e90ded32e351428
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division __copyright__ = "Copyright (C) 2014 Andreas Kloeckner" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restricti...
34.298616
104
0.616347
from __future__ import division __copyright__ = "Copyright (C) 2014 Andreas Kloeckner" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without l...
true
true
1c2c278fb0bd144d16f006d3a18aca3cb6960a77
26,475
py
Python
example.py
jayslaughter/test
6acbf3d6d201584587b935f1092d449b75da0453
[ "MIT" ]
null
null
null
example.py
jayslaughter/test
6acbf3d6d201584587b935f1092d449b75da0453
[ "MIT" ]
null
null
null
example.py
jayslaughter/test
6acbf3d6d201584587b935f1092d449b75da0453
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import flask from flask import Flask, render_template from flask_googlemaps import GoogleMaps from flask_googlemaps import Map from flask_googlemaps import icons import os import re import sys import struct import json import time import requests import argparse import getpass...
30.642361
169
0.604042
import flask from flask import Flask, render_template from flask_googlemaps import GoogleMaps from flask_googlemaps import Map from flask_googlemaps import icons import os import re import sys import struct import json import time import requests import argparse import getpass import threading import functools impo...
false
true
1c2c2abc292e094c964304994a04f514ca6a06e2
11,092
py
Python
deslib/des/knop.py
hossen-code/DESlib
77d0ccb491c522e7505d9ac6081b72cac001cb9e
[ "BSD-3-Clause" ]
149
2018-01-18T08:35:07.000Z
2021-11-11T19:43:40.000Z
deslib/des/knop.py
hossen-code/DESlib
77d0ccb491c522e7505d9ac6081b72cac001cb9e
[ "BSD-3-Clause" ]
90
2018-01-18T22:18:58.000Z
2020-02-08T04:39:36.000Z
deslib/des/knop.py
hossen-code/DESlib
77d0ccb491c522e7505d9ac6081b72cac001cb9e
[ "BSD-3-Clause" ]
49
2018-01-17T21:28:06.000Z
2021-02-04T21:56:13.000Z
# coding=utf-8 # Author: Rafael Menelau Oliveira e Cruz <rafaelmenelau@gmail.com> # # License: BSD 3 clause import numpy as np from deslib.des.base import BaseDES class KNOP(BaseDES): """k-Nearest Output Profiles (KNOP). This method selects all classifiers that correctly classified at least one sample...
39.47331
79
0.617652
import numpy as np from deslib.des.base import BaseDES class KNOP(BaseDES): def __init__(self, pool_classifiers=None, k=7, DFP=False, with_IH=False, safe_k=None, IH_rate=0.30, random_state=None, knn_classifier='knn', knne=False, DSEL_perc=...
true
true
1c2c2adca765359b609e0eae49e49254f7d6d57d
4,258
py
Python
.history/src/Simulador_20200707150756.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
.history/src/Simulador_20200707150756.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
.history/src/Simulador_20200707150756.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo import random class Simulador(): def __init__( self, tamanho_matriz, #numero de linhas e colunas da matriz esférica densidade_populacional_inicial, #percentual...
32.257576
115
0.61038
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo import random class Simulador(): def __init__( self, tamanho_matriz, densidade_populacional_inicial, percentual_inicial_tipo1, percent...
true
true
1c2c2b2f401390f97d3f410f2ad9b8f7c67bcfea
1,007
py
Python
convert_codes.py
rhoposit/sentencepiece
ae818bca6ecd73c2dde63ee5b84950352a136a2e
[ "Apache-2.0" ]
null
null
null
convert_codes.py
rhoposit/sentencepiece
ae818bca6ecd73c2dde63ee5b84950352a136a2e
[ "Apache-2.0" ]
null
null
null
convert_codes.py
rhoposit/sentencepiece
ae818bca6ecd73c2dde63ee5b84950352a136a2e
[ "Apache-2.0" ]
null
null
null
import sys from collections import defaultdict infile = sys.argv[1] outfile = sys.argv[2] refile = "topokanji/lists/wikipedia.txt" input = open(infile, "r") data = input.read().split("\n")[:-1] input.close() input = open(refile, "r") kanji = input.read().split("\n")[:-1] input.close() mapping = defaultdict(str)...
19.365385
43
0.559086
import sys from collections import defaultdict infile = sys.argv[1] outfile = sys.argv[2] refile = "topokanji/lists/wikipedia.txt" input = open(infile, "r") data = input.read().split("\n")[:-1] input.close() input = open(refile, "r") kanji = input.read().split("\n")[:-1] input.close() mapping = defaultdict(str)...
true
true
1c2c2c09db0e78f1effee834c48a644cedbb7993
2,802
py
Python
src/hard/continuous_median.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
src/hard/continuous_median.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
src/hard/continuous_median.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
""" Continuous Median: Numbers are randomly generated and passed to a method. Write a program to find and maintain the median value as new values are generated. median is the 50th percentil 3 7 2 9 2 1 sort and get the element in the middle either keep a sorted list and insert sorted (O(n)) Another approach is to...
26.433962
89
0.717345
import collections import heapq from typing import List Value = collections.namedtuple('Value', 'indexing val') class MedianHandler: def __init__(self) -> None: self.min_heap: List[Value] = [] self.max_heap: List[Value] = [] def insert(self, number: int) -> None: target_heap: str = self.find_heap_to_inser...
true
true
1c2c2ce9673a9c978a1ab6e29b493c8185ce9a69
2,228
py
Python
tests/algorithms/graph/dijkstras_test.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
1
2021-06-14T01:20:09.000Z
2021-06-14T01:20:09.000Z
tests/algorithms/graph/dijkstras_test.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
null
null
null
tests/algorithms/graph/dijkstras_test.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
null
null
null
from typing import Any import pytest from cs.algorithms import dijkstra_search, dijkstra_shortest_paths from cs.structures import Graph from tests.algorithms.graph.problems.apsp import AllPairsShortestPaths, APSPFunction @pytest.mark.add_function("shortest_paths_fn") class TestDijkstras(AllPairsShortestPaths): ...
28.202532
84
0.406643
from typing import Any import pytest from cs.algorithms import dijkstra_search, dijkstra_shortest_paths from cs.structures import Graph from tests.algorithms.graph.problems.apsp import AllPairsShortestPaths, APSPFunction @pytest.mark.add_function("shortest_paths_fn") class TestDijkstras(AllPairsShortestPaths): ...
true
true
1c2c2d60ce873022688a95ab211893f36a8cabdf
1,657
py
Python
test/test_db_matches_ui.py
Elen-T/python_training
69383759e4229441657bd57af28a7a38b04d026d
[ "Apache-2.0" ]
null
null
null
test/test_db_matches_ui.py
Elen-T/python_training
69383759e4229441657bd57af28a7a38b04d026d
[ "Apache-2.0" ]
null
null
null
test/test_db_matches_ui.py
Elen-T/python_training
69383759e4229441657bd57af28a7a38b04d026d
[ "Apache-2.0" ]
null
null
null
# тест для проверки соответствия списка групп выгруженного из БД и из приложения from model.group import Group from timeit import timeit # для измерения времени def test_group_list(app, db): # передаем два параметра app - для получения доступа к приложению, db - фикстура для получения доступа к бд print(timeit(l...
78.904762
183
0.76041
from model.group import Group from timeit import timeit def test_group_list(app, db): print(timeit(lambda: app.group.get_group_list(), number=1)) def clean(group): return Group(id=group.id, name=group.name.strip()) print(timeit(lambda: map(clean, db.get_group_list()), number=1000))
true
true
1c2c2e831b629332f9d2f535a5e165b805911787
436
py
Python
babyrev/test.py
FantasqueX/2020p
fd6df5ad8bced932398c94dd8a0b4669f5db8d4c
[ "MIT" ]
22
2020-12-20T08:01:00.000Z
2021-09-13T04:53:34.000Z
babyrev/test.py
FantasqueX/2020p
fd6df5ad8bced932398c94dd8a0b4669f5db8d4c
[ "MIT" ]
2
2020-12-20T11:39:17.000Z
2021-07-05T17:33:52.000Z
babyrev/test.py
FantasqueX/2020p
fd6df5ad8bced932398c94dd8a0b4669f5db8d4c
[ "MIT" ]
4
2020-12-20T13:22:29.000Z
2021-09-13T04:54:16.000Z
import requests def check(HOST="172.17.0.2"): def pre(): if b"we{" in (requests.get(f"http://{HOST}/").content): print("Flag appear directly") else: print("OK") def get_flag(): if b"we{" not in (requests.get(f"http://{HOST}/", headers={ "User-Agent"...
24.222222
67
0.486239
import requests def check(HOST="172.17.0.2"): def pre(): if b"we{" in (requests.get(f"http://{HOST}/").content): print("Flag appear directly") else: print("OK") def get_flag(): if b"we{" not in (requests.get(f"http://{HOST}/", headers={ "User-Agent"...
true
true
1c2c31397ee9e10bde8f40a3b4a3bde328a8df0c
162
py
Python
reid/scripts/triplet_reid/__init__.py
VisualComputingInstitute/CROWDBOT_perception
df98f3f658c39fb3fa4ac0456f1214f7918009f6
[ "MIT" ]
1
2022-03-07T06:24:27.000Z
2022-03-07T06:24:27.000Z
reid/scripts/triplet_reid/__init__.py
VisualComputingInstitute/CROWDBOT_perception
df98f3f658c39fb3fa4ac0456f1214f7918009f6
[ "MIT" ]
null
null
null
reid/scripts/triplet_reid/__init__.py
VisualComputingInstitute/CROWDBOT_perception
df98f3f658c39fb3fa4ac0456f1214f7918009f6
[ "MIT" ]
null
null
null
from importlib import import_module def build_cfg_fn(name): module = import_module('schedulers.scheduler') return getattr(module, '{}_cfg'.format(name))
27
50
0.753086
from importlib import import_module def build_cfg_fn(name): module = import_module('schedulers.scheduler') return getattr(module, '{}_cfg'.format(name))
true
true
1c2c31e005ccedfb263e13c84488b2699bfca794
9,698
py
Python
jax/experimental/ode.py
yurodiviy/jax
fbf10c697004327e13037e009612b756864d47e5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/experimental/ode.py
yurodiviy/jax
fbf10c697004327e13037e009612b756864d47e5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/experimental/ode.py
yurodiviy/jax
fbf10c697004327e13037e009612b756864d47e5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
39.104839
84
0.646216
from functools import partial import operator as op import jax import jax.numpy as jnp from jax import core from jax import lax from jax import ops from jax.util import safe_map, safe_zip from jax.flatten_util import ravel_pytree from jax.tree_util import tree_map from jax import linear_util as lu map...
true
true
1c2c324d027847f578914ab7ae65bf477ce41dfc
57,707
py
Python
Tests/otlLib/builder_test.py
odidev/fonttools
27b5f568f562971d7fbf64eeb027ea61e4939db4
[ "Apache-2.0", "MIT" ]
null
null
null
Tests/otlLib/builder_test.py
odidev/fonttools
27b5f568f562971d7fbf64eeb027ea61e4939db4
[ "Apache-2.0", "MIT" ]
1
2015-11-30T17:47:38.000Z
2015-11-30T17:47:38.000Z
Tests/otlLib/builder_test.py
odidev/fonttools
27b5f568f562971d7fbf64eeb027ea61e4939db4
[ "Apache-2.0", "MIT" ]
null
null
null
import io import struct from fontTools.misc.fixedTools import floatToFixed from fontTools.misc.testTools import getXML from fontTools.otlLib import builder, error from fontTools import ttLib from fontTools.ttLib.tables import otTables import pytest class BuilderTest(object): GLYPHS = ( ".notdef space zero...
39.336742
104
0.451158
import io import struct from fontTools.misc.fixedTools import floatToFixed from fontTools.misc.testTools import getXML from fontTools.otlLib import builder, error from fontTools import ttLib from fontTools.ttLib.tables import otTables import pytest class BuilderTest(object): GLYPHS = ( ".notdef space zero...
true
true
1c2c33b94326f7fadbce2d5da8d21dea6a03aecb
29,473
py
Python
io_scene_gmdc/export_gmdc.py
actioninja/blender-gmdc
2de19b9f50efea8ce794f928d06cb1660f2c576d
[ "MIT" ]
null
null
null
io_scene_gmdc/export_gmdc.py
actioninja/blender-gmdc
2de19b9f50efea8ce794f928d06cb1660f2c576d
[ "MIT" ]
null
null
null
io_scene_gmdc/export_gmdc.py
actioninja/blender-gmdc
2de19b9f50efea8ce794f928d06cb1660f2c576d
[ "MIT" ]
null
null
null
#!BPY """ Name: 'GMDC (.gmdc)' Blender: 249 Group: 'Export' Tooltip: 'Export to TS2 GMDC file' """ # ------------------------------------------------------------------------------- # Copyright (C) 2016 DjAlex88 (https://github.com/djalex88/) # # Permission is hereby granted, free of charge, to any person obtaining a...
35.212664
138
0.506022
import os from struct import pack from io_scene_gmdc.gmdc_tools import * from itertools import count, repeat import bpy from mathutils import Vector as BlenderVector jects: log(str(obj)) scene.objects.active = obj obj.activeShape = 1 bpy.app.Window....
true
true
1c2c341372f9515eb232275aba6071181a5e278b
24,349
py
Python
evaluation/semantic_segmentation/mmcv_custom/checkpoint.py
taokong/ibot
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
[ "Apache-2.0" ]
327
2021-12-09T10:03:55.000Z
2022-03-31T12:26:22.000Z
evaluation/semantic_segmentation/mmcv_custom/checkpoint.py
taokong/ibot
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
[ "Apache-2.0" ]
11
2021-12-30T11:39:43.000Z
2022-03-28T05:40:48.000Z
evaluation/semantic_segmentation/mmcv_custom/checkpoint.py
taokong/ibot
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
[ "Apache-2.0" ]
43
2021-12-09T10:48:26.000Z
2022-03-29T06:58:40.000Z
# Copyright (c) ByteDance, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Copy-paste from mmcv library: https://github.com/open-mmlab/mmcv/ """ import io import os import os.path as osp impor...
39.020833
117
0.630293
import io import os import os.path as osp import pkgutil import time import warnings import mmcv import torch import torchvision import numpy as np import math from collections import OrderedDict from importlib import import_module from tempfile import TemporaryDirectory from torch.optim import Optimizer from t...
true
true
1c2c3457b127439091e661d78762077ed473ac78
2,017
py
Python
tests/test_dict.py
potipot/Montreal-Forced-Aligner
6d665e9c63a4e3c795d27ec3bb8d9d1a5604bb91
[ "MIT" ]
null
null
null
tests/test_dict.py
potipot/Montreal-Forced-Aligner
6d665e9c63a4e3c795d27ec3bb8d9d1a5604bb91
[ "MIT" ]
null
null
null
tests/test_dict.py
potipot/Montreal-Forced-Aligner
6d665e9c63a4e3c795d27ec3bb8d9d1a5604bb91
[ "MIT" ]
null
null
null
import os import pytest from montreal_forced_aligner.dictionary import Dictionary def ListLines(path): lines = [] thefile = open(path) text = thefile.readlines() for line in text: stripped = line.strip() if stripped != '': lines.append(stripped) return lines def test...
39.54902
106
0.636589
import os import pytest from montreal_forced_aligner.dictionary import Dictionary def ListLines(path): lines = [] thefile = open(path) text = thefile.readlines() for line in text: stripped = line.strip() if stripped != '': lines.append(stripped) return lines def test...
true
true
1c2c346b926e965849966de02518eb85033da42d
4,375
py
Python
aoc/day22.py
martinhenstridge/adventofcode2021
f9fa76fd91f13abab9307794e30461033a470eca
[ "MIT" ]
null
null
null
aoc/day22.py
martinhenstridge/adventofcode2021
f9fa76fd91f13abab9307794e30461033a470eca
[ "MIT" ]
null
null
null
aoc/day22.py
martinhenstridge/adventofcode2021
f9fa76fd91f13abab9307794e30461033a470eca
[ "MIT" ]
null
null
null
import re from typing import NamedTuple from . import util class Cuboid(NamedTuple): xmin: int xmax: int ymin: int ymax: int zmin: int zmax: int @property def count(self): return ( (1 + self.xmax - self.xmin) * (1 + self.ymax - self.ymin) * ...
29.362416
102
0.511086
import re from typing import NamedTuple from . import util class Cuboid(NamedTuple): xmin: int xmax: int ymin: int ymax: int zmin: int zmax: int @property def count(self): return ( (1 + self.xmax - self.xmin) * (1 + self.ymax - self.ymin) * ...
true
true
1c2c3481f1407d2b1c0479de6b385d4aac674d9f
3,749
py
Python
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/objc/_convenience_nsdecimal.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
4
2018-07-04T17:20:12.000Z
2019-07-14T18:07:25.000Z
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/objc/_convenience_nsdecimal.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
null
null
null
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/objc/_convenience_nsdecimal.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
1
2018-09-03T03:02:06.000Z
2018-09-03T03:02:06.000Z
""" Support for NSDecimalNumber. The actual class is defined in Foundation, but having the wrapper here is much more convenient. """ __all__ = () from objc._convenience import addConvenienceForClass from _objc import lookUpClass, NSDecimal import sys import operator NSDecimalNumber = lookUpClass('NSDecimalNumber') d...
49.986667
104
0.65004
__all__ = () from objc._convenience import addConvenienceForClass from _objc import lookUpClass, NSDecimal import sys import operator NSDecimalNumber = lookUpClass('NSDecimalNumber') def decimal_new(cls, value=None): if value is None: return cls.numberWithInt_(0) else: if isinstance(value, NS...
true
true
1c2c34ed42e078182cd2bd0a9d7af18b99592cbf
7,302
py
Python
google/cloud/aiplatform_v1/types/specialist_pool_service.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
1
2022-03-30T05:23:29.000Z
2022-03-30T05:23:29.000Z
google/cloud/aiplatform_v1/types/specialist_pool_service.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/types/specialist_pool_service.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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...
37.446154
129
0.71364
import proto from google.cloud.aiplatform_v1.types import operation from google.cloud.aiplatform_v1.types import specialist_pool as gca_specialist_pool from google.protobuf import field_mask_pb2 __protobuf__ = proto.module( package="google.cloud.aiplatform.v1", manifest={ "CreateSp...
true
true
1c2c35e8c03707058b2c6e6a8afcf60ccd099056
3,764
py
Python
mgf_checker/reader.py
kusterlab/MasterSpectrum
938688043690a7da1b68126a73e519d2a07ba6de
[ "MIT" ]
null
null
null
mgf_checker/reader.py
kusterlab/MasterSpectrum
938688043690a7da1b68126a73e519d2a07ba6de
[ "MIT" ]
null
null
null
mgf_checker/reader.py
kusterlab/MasterSpectrum
938688043690a7da1b68126a73e519d2a07ba6de
[ "MIT" ]
null
null
null
from mgf_checker.msParserInfo import MS_parser_info from abc import ABCMeta, abstractmethod import csv from mgf_checker.mzidInfo import MZID_info class Reader(metaclass=ABCMeta): def __init__(self, path): self.path = path self.data = {} def read_file(self): with open(self.path) as cs...
39.208333
197
0.535335
from mgf_checker.msParserInfo import MS_parser_info from abc import ABCMeta, abstractmethod import csv from mgf_checker.mzidInfo import MZID_info class Reader(metaclass=ABCMeta): def __init__(self, path): self.path = path self.data = {} def read_file(self): with open(self.path) as cs...
true
true
1c2c36196484c2b0158ae77c67ec5b00f64a6446
10,704
py
Python
contrib/database/schema_migration/versions/3f96c40b580a_created_event_schema.py
ctrlsys/sensys
58221bca169c95c300ecc5526aa00590f0ce5c2f
[ "BSD-3-Clause-Open-MPI" ]
14
2016-09-06T17:02:20.000Z
2020-03-30T14:34:59.000Z
contrib/database/schema_migration/versions/3f96c40b580a_created_event_schema.py
ctrlsys/sensys
58221bca169c95c300ecc5526aa00590f0ce5c2f
[ "BSD-3-Clause-Open-MPI" ]
9
2017-04-25T20:45:11.000Z
2017-07-20T14:58:03.000Z
contrib/database/schema_migration/versions/3f96c40b580a_created_event_schema.py
ctrlsys/sensys
58221bca169c95c300ecc5526aa00590f0ce5c2f
[ "BSD-3-Clause-Open-MPI" ]
5
2016-10-11T03:28:26.000Z
2019-07-31T00:36:02.000Z
# # Copyright (c) 2015 Intel Corporation. All rights reserved # """Created 'event', 'event_data', and 'event_data_key' tables to store data from the EvGen framework. Revision ID: 3f96c40b580a Revises: 1d10ef20817b Create Date: 2015-11-19 22:26:55.393954 """ # revision identifiers, used by Alembic. import textwrap r...
41.169231
101
0.526999
import textwrap revision = '3f96c40b580a' down_revision = '1d10ef20817b' branch_labels = None from alembic import op import sqlalchemy as sa def _postgresql_upgrade_ddl(): op.execute(textwrap.dedent(""" CREATE FUNCTION add_event( p_time_stamp TIMESTAMP WITHOUT TIME ZONE, ...
true
true
1c2c36a370c83b79c722649dc78b5c5da8e1ef45
8,240
py
Python
fairseq/models/__init__.py
tran-khoa/fairseq
558366b3c6970a5dd85ad1909581d43e41fdce9f
[ "MIT" ]
null
null
null
fairseq/models/__init__.py
tran-khoa/fairseq
558366b3c6970a5dd85ad1909581d43e41fdce9f
[ "MIT" ]
null
null
null
fairseq/models/__init__.py
tran-khoa/fairseq
558366b3c6970a5dd85ad1909581d43e41fdce9f
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """isort:skip_file""" import argparse import importlib import os from contextlib import ExitStack from fairseq.dataclass import FairseqDatacl...
34.915254
117
0.653641
import argparse import importlib import os from contextlib import ExitStack from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils import merge_with_parent from hydra.core.config_store import ConfigStore from omegaconf import open_dict, OmegaConf from .composite_encoder import CompositeEncod...
true
true
1c2c36bf2d6e93d5f3d560ba85669dcf9accf49b
203
py
Python
system/t04_mirror/__init__.py
kchida/aptly
07165efc9d4bcd7018031787f27e70c2d8ecb8b9
[ "MIT" ]
16
2015-02-10T16:32:43.000Z
2021-08-10T18:59:10.000Z
system/t04_mirror/__init__.py
kchida/aptly
07165efc9d4bcd7018031787f27e70c2d8ecb8b9
[ "MIT" ]
null
null
null
system/t04_mirror/__init__.py
kchida/aptly
07165efc9d4bcd7018031787f27e70c2d8ecb8b9
[ "MIT" ]
8
2015-02-28T23:21:55.000Z
2020-11-24T11:29:30.000Z
""" Testing mirror management """ from .create import * from .show import * from .list import * from .update import * from .drop import * from .rename import * from .edit import * from .search import *
15.615385
25
0.704433
from .create import * from .show import * from .list import * from .update import * from .drop import * from .rename import * from .edit import * from .search import *
true
true
1c2c380f19bf455f71912570bd1e4554ad7f517a
18,542
py
Python
dashboard/main.py
narek-davtyan/bigquery-bokeh-dashboard
e2f8ab7684ded7bad81ac8d7b5ffaa3eb954481f
[ "Apache-2.0" ]
null
null
null
dashboard/main.py
narek-davtyan/bigquery-bokeh-dashboard
e2f8ab7684ded7bad81ac8d7b5ffaa3eb954481f
[ "Apache-2.0" ]
null
null
null
dashboard/main.py
narek-davtyan/bigquery-bokeh-dashboard
e2f8ab7684ded7bad81ac8d7b5ffaa3eb954481f
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np # Import multiprocessing libraries from pandarallel import pandarallel # Initialization pandarallel.initialize() # Load data min_list_of_columns_to_load = ['company', 'service', 'recommendation', 'easiness', 'rec_sc', 'eas_sc'] df_orig = pd.read_excel(r'CDD1.xlsx', names=min_l...
54.216374
371
0.643081
import pandas as pd import numpy as np from pandarallel import pandarallel pandarallel.initialize() min_list_of_columns_to_load = ['company', 'service', 'recommendation', 'easiness', 'rec_sc', 'eas_sc'] df_orig = pd.read_excel(r'CDD1.xlsx', names=min_list_of_columns_to_load) df_orig['service'] = df_orig['servi...
true
true
1c2c380fe9cc858758b68712b42ad3237a84b6f0
3,650
py
Python
V2RaycSpider1225/src/BusinessLogicLayer/utils/sckey_steward.py
game-loader/V2RayCloudSpider
21d37e9ce3af3fb1c77ec5394449d8373cad1816
[ "MIT" ]
null
null
null
V2RaycSpider1225/src/BusinessLogicLayer/utils/sckey_steward.py
game-loader/V2RayCloudSpider
21d37e9ce3af3fb1c77ec5394449d8373cad1816
[ "MIT" ]
null
null
null
V2RaycSpider1225/src/BusinessLogicLayer/utils/sckey_steward.py
game-loader/V2RayCloudSpider
21d37e9ce3af3fb1c77ec5394449d8373cad1816
[ "MIT" ]
null
null
null
__all__ = ['api'] import base64 import hashlib import os from Crypto.Cipher import AES class _SecretSteward(object): """ > 接收用户输入 - 校验数据 if 正确 -> 缓存数据 data:服务器敏感数据 - else -> 丢弃 > 接收用户确认信息 - 是否存储 data if YES -> 启动密钥管理模块 - else -> 丢弃缓存 > 密钥管理模块 - 接收用户输入 pem-pass...
33.486239
115
0.592055
__all__ = ['api'] import base64 import hashlib import os from Crypto.Cipher import AES class _SecretSteward(object): def __init__(self, sckey: str): self.base_pem = '_sckeyStream.v2raycs' if sckey.__len__() > 32: sckey = sckey[:32] self.sckey = self._complete_stream(sckey=...
true
true
1c2c38675ddeb50a2e1178f4d9b6889afd1dc419
375
py
Python
csob/tests/resources/__init__.py
druids/csob-paymentgateway
64e5e84ad4a0239f716855e12ee70364ab4414df
[ "MIT" ]
null
null
null
csob/tests/resources/__init__.py
druids/csob-paymentgateway
64e5e84ad4a0239f716855e12ee70364ab4414df
[ "MIT" ]
3
2019-03-13T10:28:35.000Z
2019-04-04T10:56:59.000Z
csob/tests/resources/__init__.py
druids/csob-paymentgateway
64e5e84ad4a0239f716855e12ee70364ab4414df
[ "MIT" ]
1
2019-03-11T02:32:14.000Z
2019-03-11T02:32:14.000Z
import os import sys PRIVATE_KEY_PATH = os.path.join(sys.prefix, 'csob_keys/rsa_test_A3746UdxZO.key') GATEWAY_KEY_PATH = os.path.join(sys.prefix, 'csob_keys/mips_platebnibrana.csob.cz.pub') def get_private_key(): with open(PRIVATE_KEY_PATH, 'r') as f: return f.read() def get_gateway_key(): with ope...
23.4375
87
0.714667
import os import sys PRIVATE_KEY_PATH = os.path.join(sys.prefix, 'csob_keys/rsa_test_A3746UdxZO.key') GATEWAY_KEY_PATH = os.path.join(sys.prefix, 'csob_keys/mips_platebnibrana.csob.cz.pub') def get_private_key(): with open(PRIVATE_KEY_PATH, 'r') as f: return f.read() def get_gateway_key(): with ope...
true
true
1c2c3886367fd57d2bba97ab2435464496cd0f56
144
py
Python
conda-4.3/run_test.py
jakirkham/anaconda-recipes
74fb2280662a022f2d12a7744b4823cfa5e236df
[ "BSD-3-Clause" ]
130
2015-07-28T03:41:21.000Z
2022-03-16T03:07:41.000Z
conda-4.3/run_test.py
jakirkham/anaconda-recipes
74fb2280662a022f2d12a7744b4823cfa5e236df
[ "BSD-3-Clause" ]
119
2015-08-01T00:54:06.000Z
2021-01-05T13:00:46.000Z
conda-4.3/run_test.py
jakirkham/anaconda-recipes
74fb2280662a022f2d12a7744b4823cfa5e236df
[ "BSD-3-Clause" ]
72
2015-07-29T02:35:56.000Z
2022-02-26T14:31:15.000Z
import conda print('conda.__version__: %s' % conda.__version__) assert conda.__version__ == '4.3.25' from conda.fetch import handle_proxy_407
20.571429
50
0.770833
import conda print('conda.__version__: %s' % conda.__version__) assert conda.__version__ == '4.3.25' from conda.fetch import handle_proxy_407
true
true
1c2c38900d31a5e1fbf65407352dee9fdcd9bf95
7,749
py
Python
tests/test_gcloud.py
timgates42/pyramid_storage
a45e54beb52957e1e9d0177ad5a225815df827c1
[ "BSD-3-Clause" ]
null
null
null
tests/test_gcloud.py
timgates42/pyramid_storage
a45e54beb52957e1e9d0177ad5a225815df827c1
[ "BSD-3-Clause" ]
null
null
null
tests/test_gcloud.py
timgates42/pyramid_storage
a45e54beb52957e1e9d0177ad5a225815df827c1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from io import BytesIO import mock import pytest from pyramid import compat from pyramid import exceptions as pyramid_exceptions class MockGCloudConnection(object): def get_bucket(self, bucket_name): bucket = mock.MagicMock() bucket.get_blob.return_value = None re...
27.874101
85
0.677507
from io import BytesIO import mock import pytest from pyramid import compat from pyramid import exceptions as pyramid_exceptions class MockGCloudConnection(object): def get_bucket(self, bucket_name): bucket = mock.MagicMock() bucket.get_blob.return_value = None return bucket def _get_...
true
true
1c2c38922ab51ffc005959091fad12ea82adc024
12,323
py
Python
saharaclient/tests/unit/osc/v2/test_data_sources.py
openstack/python-saharaclient
2f01b878a9e07bc712fae9c6c2c5f823bd986dd6
[ "Apache-2.0" ]
34
2015-01-26T21:39:46.000Z
2021-01-16T17:30:25.000Z
saharaclient/tests/unit/osc/v2/test_data_sources.py
openstack/python-saharaclient
2f01b878a9e07bc712fae9c6c2c5f823bd986dd6
[ "Apache-2.0" ]
null
null
null
saharaclient/tests/unit/osc/v2/test_data_sources.py
openstack/python-saharaclient
2f01b878a9e07bc712fae9c6c2c5f823bd986dd6
[ "Apache-2.0" ]
15
2015-03-13T23:24:59.000Z
2017-06-22T12:15:46.000Z
# Copyright (c) 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
39.751613
78
0.6031
from osc_lib.tests import utils as osc_utils from unittest import mock from saharaclient.api import data_sources as api_ds from saharaclient.osc.v1 import data_sources as osc_ds from saharaclient.tests.unit.osc.v1 import test_data_sources as tds_v1 DS_INFO = {'id': 'id', 'name': 'source', 'type': 'swif...
true
true
1c2c38f1314c710ed50ebe34a3ec895a178c8f82
1,779
py
Python
tests/serializers.py
jwhitlock/drf-json-api
a62802432c612c34079f3c3694129f37778e2577
[ "MIT" ]
null
null
null
tests/serializers.py
jwhitlock/drf-json-api
a62802432c612c34079f3c3694129f37778e2577
[ "MIT" ]
null
null
null
tests/serializers.py
jwhitlock/drf-json-api
a62802432c612c34079f3c3694129f37778e2577
[ "MIT" ]
null
null
null
from rest_framework import relations, serializers from tests import models import rest_framework class CommentSerializer(serializers.HyperlinkedModelSerializer): class Meta: fields = ("id", "url", "post", "body", ) model = models.Comment class PersonSerializer(serializers.HyperlinkedModelSerial...
26.552239
123
0.728499
from rest_framework import relations, serializers from tests import models import rest_framework class CommentSerializer(serializers.HyperlinkedModelSerializer): class Meta: fields = ("id", "url", "post", "body", ) model = models.Comment class PersonSerializer(serializers.HyperlinkedModelSerial...
true
true
1c2c38f7831d706904b45845d1bc5d3e68681c1d
1,960
py
Python
samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py
JigarJoshi/openapi-generator
785535b8d6881b358463994823abbda2b26ff42e
[ "Apache-2.0" ]
1
2022-02-23T20:33:43.000Z
2022-02-23T20:33:43.000Z
samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py
JigarJoshi/openapi-generator
785535b8d6881b358463994823abbda2b26ff42e
[ "Apache-2.0" ]
7
2021-12-16T03:21:30.000Z
2022-03-31T03:26:58.000Z
samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py
JigarJoshi/openapi-generator
785535b8d6881b358463994823abbda2b26ff42e
[ "Apache-2.0" ]
1
2022-02-19T21:56:04.000Z
2022-02-19T21:56:04.000Z
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
21.075269
174
0.640306
import re import sys import typing from frozendict import frozendict import decimal from datetime import date, datetime from frozendict import frozendict from petstore_api.schemas import ( AnyTypeSchema, ComposedSchema, DictSchema, ListSchema, StrSchema, IntSchema, Int3...
true
true
1c2c3984c19ddc16ccb2625358b0d022aea89c00
1,270
py
Python
tests/test_entity.py
juntosdesdecasa/mcthings_extra
dc4c91ac6920b861ff4454be506eed6e067f306b
[ "Apache-2.0" ]
1
2020-05-12T06:33:36.000Z
2020-05-12T06:33:36.000Z
tests/test_entity.py
Voxelers/mcthings_extra
dc4c91ac6920b861ff4454be506eed6e067f306b
[ "Apache-2.0" ]
1
2020-04-24T12:25:24.000Z
2020-04-24T23:09:30.000Z
tests/test_entity.py
Voxelers/mcthings_extra
dc4c91ac6920b861ff4454be506eed6e067f306b
[ "Apache-2.0" ]
1
2020-05-15T14:02:51.000Z
2020-05-15T14:02:51.000Z
#!/usr/bin/env python3 # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 # Author (©): Alvaro del Castillo import sys import mcpi.block import mcpi.entity from mcpi.vec3 import Vec3 from mcthings.decorators.light_decorator import LightDecorator from mcthings.house import House from mcthings.se...
25.4
90
0.716535
import sys import mcpi.block import mcpi.entity from mcpi.vec3 import Vec3 from mcthings.decorators.light_decorator import LightDecorator from mcthings.house import House from mcthings.server import Server from mcthings.world import World from mcthings_extra.decorators.villager_decorator import VillagerDecorator...
true
true
1c2c398680d7f59fc0fd38aaa36a16bdc1bfeb3a
13,112
py
Python
scripts/models/verification_result.py
Druidos/cv
90cdbf212d7cc8c5cbd2fbbcc770d18a89771037
[ "Apache-2.0" ]
null
null
null
scripts/models/verification_result.py
Druidos/cv
90cdbf212d7cc8c5cbd2fbbcc770d18a89771037
[ "Apache-2.0" ]
null
null
null
scripts/models/verification_result.py
Druidos/cv
90cdbf212d7cc8c5cbd2fbbcc770d18a89771037
[ "Apache-2.0" ]
null
null
null
# # CV is a framework for continuous verification. # # Copyright (c) 2018-2019 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
40.594427
114
0.59701
import glob import json import os import re import shutil import time from xml.etree import ElementTree from components import * from components.mea import MEA TAG_OPTIMIZE = "optimize" def to_str(val) -> str: return "{}".format(val) class EntryPointDesc: def __init__(self, file: str, i...
true
true
1c2c3b53bf84a7751b24ce63b436536f011c60b2
1,967
py
Python
tests/test_formatter.py
Cottonwood-Technology/ConfigTree
ce7d92a4e536ba0104b92a9ce871819279f5b63a
[ "BSD-2-Clause" ]
null
null
null
tests/test_formatter.py
Cottonwood-Technology/ConfigTree
ce7d92a4e536ba0104b92a9ce871819279f5b63a
[ "BSD-2-Clause" ]
null
null
null
tests/test_formatter.py
Cottonwood-Technology/ConfigTree
ce7d92a4e536ba0104b92a9ce871819279f5b63a
[ "BSD-2-Clause" ]
null
null
null
from os import linesep from configtree import formatter from configtree.tree import Tree t = Tree( { "a.x": 1, "a.y": 'Testing "json"', "a.z": "Testing 'shell'", "list": ['Testing "json"', "Testing 'shell'"], "none": None, "bool": True, } ) def test_json(): ...
25.881579
67
0.449415
from os import linesep from configtree import formatter from configtree.tree import Tree t = Tree( { "a.x": 1, "a.y": 'Testing "json"', "a.z": "Testing 'shell'", "list": ['Testing "json"', "Testing 'shell'"], "none": None, "bool": True, } ) def test_json(): ...
true
true
1c2c3c44f55c81475ff3d43350cbad7efe9dd2a3
410
py
Python
basic_web/app.py
HungThinhPhung/Miscellaneous
dee5c6551a8580510c3c4e54087d38feb995d4d4
[ "MIT" ]
null
null
null
basic_web/app.py
HungThinhPhung/Miscellaneous
dee5c6551a8580510c3c4e54087d38feb995d4d4
[ "MIT" ]
null
null
null
basic_web/app.py
HungThinhPhung/Miscellaneous
dee5c6551a8580510c3c4e54087d38feb995d4d4
[ "MIT" ]
null
null
null
import logging import os from flask import Flask, render_template app = Flask(__name__) @app.route("/", methods=['GET']) def render(): return render_template('index.html') if __name__ == "__main__": port = int(os.getenv('PORT', 8111)) logging.warning("Starting app on port %d" % port) app.config['J...
21.578947
65
0.67561
import logging import os from flask import Flask, render_template app = Flask(__name__) @app.route("/", methods=['GET']) def render(): return render_template('index.html') if __name__ == "__main__": port = int(os.getenv('PORT', 8111)) logging.warning("Starting app on port %d" % port) app.config['J...
true
true
1c2c3c7f288d963874d9bedd9f8d88d979674e3a
20,112
py
Python
bin/docker_detection_tester/modules/splunk_container.py
arjunkhunti-crest/security_content
41e354485e5917d3366ef735a9c5b25a20d3b8cc
[ "Apache-2.0" ]
null
null
null
bin/docker_detection_tester/modules/splunk_container.py
arjunkhunti-crest/security_content
41e354485e5917d3366ef735a9c5b25a20d3b8cc
[ "Apache-2.0" ]
null
null
null
bin/docker_detection_tester/modules/splunk_container.py
arjunkhunti-crest/security_content
41e354485e5917d3366ef735a9c5b25a20d3b8cc
[ "Apache-2.0" ]
1
2022-01-27T05:29:43.000Z
2022-01-27T05:29:43.000Z
from collections import OrderedDict import datetime import docker import docker.types import docker.models import docker.models.resource import docker.models.containers import os.path import random import requests import shutil from modules import splunk_sdk from modules import testing_service from modules import test_...
42.520085
187
0.606504
from collections import OrderedDict import datetime import docker import docker.types import docker.models import docker.models.resource import docker.models.containers import os.path import random import requests import shutil from modules import splunk_sdk from modules import testing_service from modules import test_...
true
true
1c2c3cb5d27790c1e7ed31daba914ceae5626d89
61,187
py
Python
Tools/gdb/libpython.py
deadsnakes/python3.3
4faaf44cd5478410ac3b977351c1965fa054b5e9
[ "PSF-2.0" ]
652
2015-07-26T00:00:17.000Z
2022-02-24T18:30:04.000Z
Tools/gdb/libpython.py
deadsnakes/python3.3
4faaf44cd5478410ac3b977351c1965fa054b5e9
[ "PSF-2.0" ]
8
2015-09-07T03:38:19.000Z
2021-05-23T03:18:51.000Z
Tools/gdb/libpython.py
isabella232/cpython-pt
16d0393123bcc49009e3746471a603290804899a
[ "PSF-2.0" ]
40
2015-07-24T19:45:08.000Z
2021-11-01T14:54:56.000Z
#!/usr/bin/python ''' From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb to be extended with Python code e.g. for library-specific data visualizations, such as for the C++ STL types. Documentation on this API can be seen at: http://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html ...
33.842367
102
0.574191
__future__ import print_function, with_statement import gdb import os import locale import sys if sys.version_info[0] >= 3: unichr = chr xrange = range long = int _type_char_ptr = gdb.lookup_type('char').pointer() _type_unsigned_char_ptr = gdb.lookup_type('unsigned char').pointer() _type_void_ptr = ...
true
true
1c2c3d61eee8035467645bf5c46c77b5e5e49dc2
8,611
py
Python
brainMRI/dataset.py
giacomodeodato/BrainMRIDataset
7f2dd315e7c970c61651e025dcafbed94caa8924
[ "MIT" ]
1
2022-03-04T06:18:21.000Z
2022-03-04T06:18:21.000Z
brainMRI/dataset.py
giacomodeodato/BrainMRIDataset
7f2dd315e7c970c61651e025dcafbed94caa8924
[ "MIT" ]
null
null
null
brainMRI/dataset.py
giacomodeodato/BrainMRIDataset
7f2dd315e7c970c61651e025dcafbed94caa8924
[ "MIT" ]
null
null
null
import os import numpy as np import h5py from skimage.io import imread from datetime import datetime from tqdm.auto import tqdm from .utils import preprocess_volume, preprocess_mask class Dataset(): """ TCGA-LGG dataset of brain MRIs for Lower Grade Glioma segmentation. Attributes: IMG_SHAPE : tu...
37.60262
133
0.561956
import os import numpy as np import h5py from skimage.io import imread from datetime import datetime from tqdm.auto import tqdm from .utils import preprocess_volume, preprocess_mask class Dataset(): IMG_SHAPE = (256, 256) VOLUMES = ["pre-contrast", "FLAIR", "post-contrast"] def __init__(self, path="./da...
true
true
1c2c3db7c37d1820053f9f0dfc995aac11ca4116
1,837
py
Python
contentcuration/contentcuration/migrations/0052_auto_20170201_1155.py
Tlazypanda/studio
cd1c2f169c705027cdd808cbbcae907d0a9b21d2
[ "MIT" ]
1
2019-03-30T18:14:25.000Z
2019-03-30T18:14:25.000Z
contentcuration/contentcuration/migrations/0052_auto_20170201_1155.py
Tlazypanda/studio
cd1c2f169c705027cdd808cbbcae907d0a9b21d2
[ "MIT" ]
2
2019-04-06T07:06:08.000Z
2019-04-08T23:33:53.000Z
contentcuration/contentcuration/migrations/0052_auto_20170201_1155.py
Tlazypanda/studio
cd1c2f169c705027cdd808cbbcae907d0a9b21d2
[ "MIT" ]
1
2020-10-20T05:21:56.000Z
2020-10-20T05:21:56.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-02-01 19:55 from __future__ import unicode_literals from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0051_auto_20170126_1633'), ] operations = [ ...
54.029412
356
0.617311
from __future__ import unicode_literals from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0051_auto_20170126_1633'), ] operations = [ migrations.AddField( model_name='assessmentitem', ...
true
true
1c2c3fdce517842bc7e8701a457753679cbadd18
5,257
py
Python
docs/conf.py
SylvainCorlay/xhale
70e2ded348b19ec64d80d3be9b52894f35e73d23
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
SylvainCorlay/xhale
70e2ded348b19ec64d80d3be9b52894f35e73d23
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
SylvainCorlay/xhale
70e2ded348b19ec64d80d3be9b52894f35e73d23
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # xhale documentation build configuration file, created by # sphinx-quickstart on Sun Apr 22 20:02:10 2018. # # 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 # auto...
29.869318
79
0.684231
def setup(app): app.add_stylesheet("main_stylesheet.css") extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'xhale' copyright = '2018, Loic gouarin' author = 'Loic gouarin' #...
true
true
1c2c402b5349167d4dbd224778cc996b162ae5b3
2,332
py
Python
bin/bootstrapping/schema_conversion_tool.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
null
null
null
bin/bootstrapping/schema_conversion_tool.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
bin/bootstrapping/schema_conversion_tool.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # """Wrapper for Gcloud-installed Schema Conversion Tool.""" import os import bootstrapping from googlecloudsdk.command_lib.util import java from googlecloudsdk.core.updater import update_manager # Path to the unpacked component _COMPONENT_DIR = os.path.join(bootstra...
32.388889
77
0.683105
import os import bootstrapping from googlecloudsdk.command_lib.util import java from googlecloudsdk.core.updater import update_manager _COMPONENT_DIR = os.path.join(bootstrapping.SDK_ROOT, 'platform', 'schema_conversion_tool') _JAR_DIR = os.path.join(_COMPONENT_DIR, 'lib') _COMPON...
true
true
1c2c40d45e4de0a5a61b1cd7ccc4c43ca2496bb6
6,188
py
Python
docs/source/conf.py
delepoulle/rawls
9e57be0b79d8ea09873690f1820cb52640a2a85d
[ "MIT" ]
null
null
null
docs/source/conf.py
delepoulle/rawls
9e57be0b79d8ea09873690f1820cb52640a2a85d
[ "MIT" ]
1
2021-04-16T06:51:25.000Z
2021-04-16T06:51:25.000Z
docs/source/conf.py
delepoulle/rawls
9e57be0b79d8ea09873690f1820cb52640a2a85d
[ "MIT" ]
1
2021-04-13T08:30:14.000Z
2021-04-13T08:30:14.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
29.051643
79
0.650452
import os import sys sys.path.insert(0, os.path.abspath('../../../rawls')) project = 'rawls' copyright = '2020, Jérôme BUISINE' author = 'Jérôme BUISINE' version = '1.1.7' release = 'v1.1.7' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage', ...
true
true
1c2c41715db2b4c61d502f76ba519ca242650b1d
972
py
Python
kubernetes/test/test_v1_secret_env_source.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_secret_env_source.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_secret_env_source.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
21.6
105
0.711934
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_secret_env_source import V1SecretEnvSource class TestV1SecretEnvSource(unittest.TestCase): def setUp(self): pass ...
true
true
1c2c4174e9a9774b26b5d7443b67579a36b5ab8e
4,360
py
Python
instances/pspnet/ade.pspnet.R50_v1c/network.py
dontLoveBugs/MyTorch
d14bd1a231bde7f2e05282f86c640bcce4a55baf
[ "MIT" ]
1
2020-02-25T00:35:00.000Z
2020-02-25T00:35:00.000Z
instances/pspnet/ade.pspnet.R50_v1c/network.py
dontLoveBugs/MyTorch
d14bd1a231bde7f2e05282f86c640bcce4a55baf
[ "MIT" ]
null
null
null
instances/pspnet/ade.pspnet.R50_v1c/network.py
dontLoveBugs/MyTorch
d14bd1a231bde7f2e05282f86c640bcce4a55baf
[ "MIT" ]
null
null
null
# encoding: utf-8 from functools import partial from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from modules.backbone import resnet50 from modules.ops.seg.seg_oprs import ConvBnRelu # 读取配置文件 from modules.engine.seg.config import Config config = Config(config_fi...
34.88
79
0.558028
from functools import partial from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from modules.backbone import resnet50 from modules.ops.seg.seg_oprs import ConvBnRelu from modules.engine.seg.config import Config config = Config(config_file='./config.json').get_c...
true
true
1c2c423ba66151af6b755dfd20d9f6dce4f1cc45
1,099
py
Python
examples/tutorial/tutorial/app.py
carbonariy/dvhb-hybrid
adbb250767ea255addc607fb6f6755c9add447db
[ "MIT" ]
27
2018-05-08T16:03:24.000Z
2020-02-20T06:39:19.000Z
examples/tutorial/tutorial/app.py
carbonariy/dvhb-hybrid
adbb250767ea255addc607fb6f6755c9add447db
[ "MIT" ]
7
2018-10-20T16:03:36.000Z
2021-11-03T11:09:22.000Z
examples/tutorial/tutorial/app.py
carbonariy/dvhb-hybrid
adbb250767ea255addc607fb6f6755c9add447db
[ "MIT" ]
16
2018-12-11T15:34:22.000Z
2022-01-25T00:20:55.000Z
import os import aiopg.sa import django from aiohttp_apiset import SwaggerRouter from aiohttp_apiset.middlewares import jsonify import aioworkers.http from dvhb_hybrid.amodels import AppModels os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tutorial.settings") django.setup() import tutorial AppModels.import_all_mo...
26.804878
68
0.708826
import os import aiopg.sa import django from aiohttp_apiset import SwaggerRouter from aiohttp_apiset.middlewares import jsonify import aioworkers.http from dvhb_hybrid.amodels import AppModels os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tutorial.settings") django.setup() import tutorial AppModels.import_all_mo...
true
true
1c2c4382dc2bec243f9120ad2fca826f556dfdf0
475
py
Python
URI1789.py
rashidulhasanhridoy/URI-Online-Judge-Problem-Solve-with-Python-3
c7db434e2e6e40c2ca3bd56db0d04cf79f69de12
[ "Apache-2.0" ]
2
2020-07-21T18:01:37.000Z
2021-11-29T01:08:14.000Z
URI1789.py
rashidulhasanhridoy/URI-Online-Judge-Problem-Solve-with-Python-3
c7db434e2e6e40c2ca3bd56db0d04cf79f69de12
[ "Apache-2.0" ]
null
null
null
URI1789.py
rashidulhasanhridoy/URI-Online-Judge-Problem-Solve-with-Python-3
c7db434e2e6e40c2ca3bd56db0d04cf79f69de12
[ "Apache-2.0" ]
null
null
null
def main(): while True: numbers = [] try: l = int(input()) except: break x = input() numbers = x.split() for i in range(len(numbers)): numbers[i] = int(numbers[i]) if max(numbers) < 10: print("1") elif ma...
25
53
0.431579
def main(): while True: numbers = [] try: l = int(input()) except: break x = input() numbers = x.split() for i in range(len(numbers)): numbers[i] = int(numbers[i]) if max(numbers) < 10: print("1") elif ma...
true
true
1c2c45b6beabbc089285e913423b74d6687ece7b
777
py
Python
src/connect4_zero/lib/data_helper.py
maximerihouey/connect4-alpha-zero
952a47df1a15d1a4e0696c23c9109acefd727aa0
[ "MIT" ]
null
null
null
src/connect4_zero/lib/data_helper.py
maximerihouey/connect4-alpha-zero
952a47df1a15d1a4e0696c23c9109acefd727aa0
[ "MIT" ]
null
null
null
src/connect4_zero/lib/data_helper.py
maximerihouey/connect4-alpha-zero
952a47df1a15d1a4e0696c23c9109acefd727aa0
[ "MIT" ]
null
null
null
import json import os from glob import glob from logging import getLogger from connect4_zero.config import ResourceConfig logger = getLogger(__name__) def get_game_data_filenames(rc: ResourceConfig): pattern = os.path.join(rc.play_data_dir, rc.play_data_filename_tmpl % "*") files = list(sorted(glob(pattern)...
23.545455
81
0.724582
import json import os from glob import glob from logging import getLogger from connect4_zero.config import ResourceConfig logger = getLogger(__name__) def get_game_data_filenames(rc: ResourceConfig): pattern = os.path.join(rc.play_data_dir, rc.play_data_filename_tmpl % "*") files = list(sorted(glob(pattern)...
true
true
1c2c460c66670ad2aca1c91fa0fc74defb26f85a
491
py
Python
mover.py
OlopesMaster/mover_pastas
384ba76f0a820f07cc4e186b90e7df93f47dc1a7
[ "MIT" ]
1
2021-12-26T23:17:19.000Z
2021-12-26T23:17:19.000Z
mover.py
OlopesMaster/mover_pastas
384ba76f0a820f07cc4e186b90e7df93f47dc1a7
[ "MIT" ]
null
null
null
mover.py
OlopesMaster/mover_pastas
384ba76f0a820f07cc4e186b90e7df93f47dc1a7
[ "MIT" ]
null
null
null
import os import pathlib def mover_arquivos(caminho_origem, caminho_destino, formato): lista = list(set(str(path.parent) for path in pathlib.Path(f"{caminho_origem}\\.").glob(f"**/*{formato}"))) nome_arquivo = list() aux = 0 for c in lista: nome_arquivo.append(pathlib.PureWindowsPath(st...
32.733333
112
0.627291
import os import pathlib def mover_arquivos(caminho_origem, caminho_destino, formato): lista = list(set(str(path.parent) for path in pathlib.Path(f"{caminho_origem}\\.").glob(f"**/*{formato}"))) nome_arquivo = list() aux = 0 for c in lista: nome_arquivo.append(pathlib.PureWindowsPath(st...
true
true
1c2c468e4116f074bee492800d8729487553b458
41,198
py
Python
Simulating hydrogen/functionsHydrogenSimulation.py
animucki/2mmn40
c54c0e4e9c801d63f048fbb5d9abd8fe9432cfdc
[ "Unlicense" ]
null
null
null
Simulating hydrogen/functionsHydrogenSimulation.py
animucki/2mmn40
c54c0e4e9c801d63f048fbb5d9abd8fe9432cfdc
[ "Unlicense" ]
null
null
null
Simulating hydrogen/functionsHydrogenSimulation.py
animucki/2mmn40
c54c0e4e9c801d63f048fbb5d9abd8fe9432cfdc
[ "Unlicense" ]
null
null
null
################################################################################### ################################# FUNCTIONS ####################################### ################################################################################### import numpy as np import time from sklearn.metrics.pairwise im...
54.857523
2,014
0.609471
nol + gridVectors[0] for m in range(0, totalNumMolecules-1): if moleculeVector[m+1] == "Water": XYZinitial = np.concatenate((XYZinitial, basicWater + (1/numMoleculeOneDirec)*boxSize*gridVectors[m + 1])) else: XYZinitial = np.concatenate((XYZinitial, basicEthan...
true
true
1c2c46f99a82875b917a330d6ec76062222420de
20,238
py
Python
python/paddle/fluid/tests/unittests/test_compat.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
9
2017-12-04T02:58:01.000Z
2020-12-03T14:46:30.000Z
python/paddle/fluid/tests/unittests/test_compat.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
7
2017-12-05T20:29:08.000Z
2018-10-15T08:57:40.000Z
python/paddle/fluid/tests/unittests/test_compat.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
6
2018-03-19T22:38:46.000Z
2019-11-01T22:28:27.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
39.996047
74
0.523322
from __future__ import print_function import unittest import paddle.compat as cpt import six class TestCompatible(unittest.TestCase): def test_type(self): if six.PY2: self.assertEqual(cpt.int_type, int) self.assertEqual(cpt.long_type, long) else: ...
true
true
1c2c475e3ed7b3a3ebe61cc7556a74907074f8ef
70,637
py
Python
nova/compute/resource_tracker.py
mikalstill/nova
99ca7d60b41f63446f86ed9be86440a2b250f330
[ "Apache-2.0" ]
null
null
null
nova/compute/resource_tracker.py
mikalstill/nova
99ca7d60b41f63446f86ed9be86440a2b250f330
[ "Apache-2.0" ]
null
null
null
nova/compute/resource_tracker.py
mikalstill/nova
99ca7d60b41f63446f86ed9be86440a2b250f330
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
46.686715
79
0.617679
import collections import copy from keystoneauth1 import exceptions as ks_exc from oslo_log import log as logging from oslo_serialization import jsonutils import retrying from nova.compute import claims from nova.compute import monitors from nova.compute import stats as compute_stats from nova.compute ...
true
true
1c2c4942cd88d34d5c3829e03fcdff03e88a827c
3,893
py
Python
pc-compliance-alerts-get.py
sgordon46/pc-toolbox
a00cf2aa41eff683151a7f59ed108eaae0e3b384
[ "MIT" ]
null
null
null
pc-compliance-alerts-get.py
sgordon46/pc-toolbox
a00cf2aa41eff683151a7f59ed108eaae0e3b384
[ "MIT" ]
null
null
null
pc-compliance-alerts-get.py
sgordon46/pc-toolbox
a00cf2aa41eff683151a7f59ed108eaae0e3b384
[ "MIT" ]
null
null
null
from __future__ import print_function try: input = raw_input except NameError: pass import argparse import pc_lib_api import pc_lib_general import json # --Execution Block-- # # --Parse command line arguments-- # parser = argparse.ArgumentParser(prog='rltoolbox') parser.add_argument( '-u', '--usernam...
35.715596
121
0.702543
from __future__ import print_function try: input = raw_input except NameError: pass import argparse import pc_lib_api import pc_lib_general import json parser = argparse.ArgumentParser(prog='rltoolbox') parser.add_argument( '-u', '--username', type=str, help='*Required* - Prisma Cloud API Acc...
true
true
1c2c4a54661f935f34012845375fb387b79babf9
23,116
py
Python
neutron/tests/unit/extensions/test_l3_ext_gw_mode.py
deepak-dt/neutron
5226e50c68084dd3d76861d1247f9f292949b616
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/extensions/test_l3_ext_gw_mode.py
deepak-dt/neutron
5226e50c68084dd3d76861d1247f9f292949b616
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/extensions/test_l3_ext_gw_mode.py
deepak-dt/neutron
5226e50c68084dd3d76861d1247f9f292949b616
[ "Apache-2.0" ]
1
2018-08-28T17:13:16.000Z
2018-08-28T17:13:16.000Z
# Copyright 2013 VMware, Inc. # 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 ...
43.207477
79
0.62779
import mock import netaddr from neutron_lib.api.definitions import l3 as l3_apidef from neutron_lib import constants from neutron_lib import context as nctx from neutron_lib.db import api as db_api from neutron_lib.plugins import directory from oslo_config import cfg from oslo_db import exception as db_...
true
true
1c2c4b18f9235e6e3de66a3d2437f9377283e169
545
py
Python
bumblebee_status/modules/core/time.py
rosalogia/bumblebee-status
19c3975301d8700743df745ecd5ca2c05ecf5cf0
[ "MIT" ]
null
null
null
bumblebee_status/modules/core/time.py
rosalogia/bumblebee-status
19c3975301d8700743df745ecd5ca2c05ecf5cf0
[ "MIT" ]
null
null
null
bumblebee_status/modules/core/time.py
rosalogia/bumblebee-status
19c3975301d8700743df745ecd5ca2c05ecf5cf0
[ "MIT" ]
1
2020-10-22T09:23:54.000Z
2020-10-22T09:23:54.000Z
# pylint: disable=C0111,R0903 """Displays the current date and time. Parameters: * time.format: strftime()-compatible formatting string * time.locale: locale to use rather than the system default """ import core.decorators from .datetime import Module class Module(Module): @core.decorators.every(second...
22.708333
71
0.711927
import core.decorators from .datetime import Module class Module(Module): @core.decorators.every(seconds=59) def __init__(self, config, theme): super().__init__(config, theme) def default_format(self): return "%X"
true
true
1c2c4c4d7fd9e44abbf1d439a0919ddbed850e12
9,329
py
Python
stretch_render.py
CrunchyDuck/StretchRender
47d5bf2b34d2bcd6ec2da1317f30ac5e05044add
[ "MIT" ]
null
null
null
stretch_render.py
CrunchyDuck/StretchRender
47d5bf2b34d2bcd6ec2da1317f30ac5e05044add
[ "MIT" ]
null
null
null
stretch_render.py
CrunchyDuck/StretchRender
47d5bf2b34d2bcd6ec2da1317f30ac5e05044add
[ "MIT" ]
null
null
null
import bpy from bpy.types import (Panel, Operator) import os os.system("cls") # Clear console bl_info = { "name": "Stretch Render", "description": "Alternative rendering compression method.", "author": "CrunchyDuck <realvulpes@gmail.com>", "version": (0, 1, 1), "blender": (2, 83, 0), "category": "Render", "lo...
50.427027
279
0.748526
import bpy from bpy.types import (Panel, Operator) import os os.system("cls") bl_info = { "name": "Stretch Render", "description": "Alternative rendering compression method.", "author": "CrunchyDuck <realvulpes@gmail.com>", "version": (0, 1, 1), "blender": (2, 83, 0), "category": "Render", "location": "Opera...
true
true
1c2c4c5c9c96cc163def26125e1d56f2cde83a4f
1,522
py
Python
fontFeatures/feeLib/Conditional.py
m4rc1e/fontFeatures
522f60ac632ab0a087477cfb57e23a96c33aee99
[ "BSD-3-Clause" ]
null
null
null
fontFeatures/feeLib/Conditional.py
m4rc1e/fontFeatures
522f60ac632ab0a087477cfb57e23a96c33aee99
[ "BSD-3-Clause" ]
null
null
null
fontFeatures/feeLib/Conditional.py
m4rc1e/fontFeatures
522f60ac632ab0a087477cfb57e23a96c33aee99
[ "BSD-3-Clause" ]
null
null
null
""" Conditional =========== Rules can be applied conditionally using the `If` statement. These will make more sense when you can define variables. Examples:: If $dosub { Substitute a -> b; } """ import fontFeatures GRAMMAR = """ If_Args = boolean_condition:c wsc '{' wsc statement+:s wsc '}' -> (c,...
26.701754
92
0.567674
import fontFeatures GRAMMAR = """ If_Args = boolean_condition:c wsc '{' wsc statement+:s wsc '}' -> (c,s) boolean_condition = or | and | boolean_term boolean_term = bracketed | not | boolean_factor boolean_factor = integer:l ws comparison?:r -> parser.plugin_classes["If"].docomparison(l,r) comparison = ('>='|'>'|'<='...
true
true
1c2c4d37d63ffae4463d667f463fb1de61cc518f
2,692
py
Python
tests/models/validators/v2_1_2/jsd_6db9292d4f28a26b.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v2_1_2/jsd_6db9292d4f28a26b.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v2_1_2/jsd_6db9292d4f28a26b.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """DNA Center Add Fabric data model. Copyright (c) 2019-2020 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including wi...
32.047619
78
0.591382
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from dnacentersdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidator6Db9292D4F28A26B(object): def __init__(self): super(JSONSchema...
true
true
1c2c4d5411086ef5f379dfac412a371890acce06
18,350
py
Python
selfdrive/car/toyota/interface.py
iamlukewang/openpilot
d44f8c747b0c8764da8b84f208e40abf6e6b712a
[ "MIT" ]
1
2021-04-29T18:40:03.000Z
2021-04-29T18:40:03.000Z
selfdrive/car/toyota/interface.py
iamlukewang/openpilot
d44f8c747b0c8764da8b84f208e40abf6e6b712a
[ "MIT" ]
null
null
null
selfdrive/car/toyota/interface.py
iamlukewang/openpilot
d44f8c747b0c8764da8b84f208e40abf6e6b712a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from cereal import car from selfdrive.config import Conversions as CV from selfdrive.car.toyota.values import Ecu, ECU_FINGERPRINT, CAR, TSS2_CAR, FINGERPRINTS from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint from selfdriv...
42.575406
139
0.667248
from cereal import car from selfdrive.config import Conversions as CV from selfdrive.car.toyota.values import Ecu, ECU_FINGERPRINT, CAR, TSS2_CAR, FINGERPRINTS from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint from selfdrive.swaglog import cloud...
true
true
1c2c4e7dee45b65ff30006c880c9cbfc23744252
19,192
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
null
null
null
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_12_01/operations/_private_endpoint_connections_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
52.294278
251
0.685911
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.c...
true
true
1c2c4f726603ea041b7ba928b14302a2c024617d
63
py
Python
wagtail_tinify/__init__.py
lucasmoeskops/wagtail-tinify
d0a6bf3f52f8b7ded2b7bd2c408bc7c10edc95a6
[ "MIT" ]
null
null
null
wagtail_tinify/__init__.py
lucasmoeskops/wagtail-tinify
d0a6bf3f52f8b7ded2b7bd2c408bc7c10edc95a6
[ "MIT" ]
null
null
null
wagtail_tinify/__init__.py
lucasmoeskops/wagtail-tinify
d0a6bf3f52f8b7ded2b7bd2c408bc7c10edc95a6
[ "MIT" ]
null
null
null
default_app_config = 'wagtail_tinify.apps.WagtailTinifyConfig'
31.5
62
0.873016
default_app_config = 'wagtail_tinify.apps.WagtailTinifyConfig'
true
true
1c2c5152116a83913c132f0a97f1b7bcc9d02645
5,399
py
Python
data/p3BR/R1/benchmark/startQiskit_Class403.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startQiskit_Class403.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startQiskit_Class403.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=71 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
29.183784
140
0.629561
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test.mock import FakeVigo...
true
true
1c2c5293b6e6088817defdb6355b42a48bb97468
13,301
py
Python
expression/core/option.py
erlendvollset/Expression
888fd757d69e39efa5e3b76228d565b2607c1c5b
[ "MIT" ]
null
null
null
expression/core/option.py
erlendvollset/Expression
888fd757d69e39efa5e3b76228d565b2607c1c5b
[ "MIT" ]
null
null
null
expression/core/option.py
erlendvollset/Expression
888fd757d69e39efa5e3b76228d565b2607c1c5b
[ "MIT" ]
null
null
null
"""Option module. Contains a collection of static methods (functions) for operating on options. All functions takes the source as the last curried argument, i.e all functions returns a function that takes the source sequence as the only argument. """ from __future__ import annotations from abc import ABC, abstractmet...
27.089613
108
0.618826
from __future__ import annotations from abc import ABC, abstractmethod from typing import ( TYPE_CHECKING, Any, Callable, Generator, Iterable, Iterator, List, Optional, Protocol, TypeVar, Union, cast, get_origin, overload, ) from .error import EffectError from ....
true
true
1c2c52d5d734a20158e75ad1077782aa67773b86
3,867
py
Python
tests/test_modules.py
m3g4p0p/jsonscript
9f55c46bd75c5f55a6fa8235abeffa8e5d8ee31b
[ "MIT" ]
null
null
null
tests/test_modules.py
m3g4p0p/jsonscript
9f55c46bd75c5f55a6fa8235abeffa8e5d8ee31b
[ "MIT" ]
null
null
null
tests/test_modules.py
m3g4p0p/jsonscript
9f55c46bd75c5f55a6fa8235abeffa8e5d8ee31b
[ "MIT" ]
null
null
null
import json import pytest from jsonscript.interpreter import run class TestModules: @staticmethod @pytest.fixture def create_json(tmp_path): def create(file_path, obj): file = tmp_path / file_path file.parent.mkdir(exist_ok=True, parents=True) with open(file...
23.723926
61
0.376519
import json import pytest from jsonscript.interpreter import run class TestModules: @staticmethod @pytest.fixture def create_json(tmp_path): def create(file_path, obj): file = tmp_path / file_path file.parent.mkdir(exist_ok=True, parents=True) with open(file...
true
true
1c2c52fb474a12cf3a58bc7c2fe1b5a2f5c53cbc
3,267
py
Python
address/migrations/0004_auto__add_field_address_extended_address__chg_field_address_street_add.py
jacinda/django-address
c9a351b20e29c4fa9841a4bda849befa68f1c3de
[ "BSD-3-Clause" ]
2
2015-08-11T08:21:40.000Z
2016-01-24T05:51:08.000Z
address/migrations/0004_auto__add_field_address_extended_address__chg_field_address_street_add.py
jacinda/django-address
c9a351b20e29c4fa9841a4bda849befa68f1c3de
[ "BSD-3-Clause" ]
null
null
null
address/migrations/0004_auto__add_field_address_extended_address__chg_field_address_street_add.py
jacinda/django-address
c9a351b20e29c4fa9841a4bda849befa68f1c3de
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Address.extended_address' db.add_column(u'address_address', 'extended_address', ...
59.4
154
0.561983
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column(u'address_address', 'extended_address', self.gf('django.db.models.fields.CharField')(default='...
true
true
1c2c53300bd2714dada7580fe3e104cfec20b37b
11,723
py
Python
tests/db_engine_specs/mssql_tests.py
psbsgic/rabbitai
769e120ba605d56ac076f810a549c38dac410c8e
[ "Apache-2.0" ]
null
null
null
tests/db_engine_specs/mssql_tests.py
psbsgic/rabbitai
769e120ba605d56ac076f810a549c38dac410c8e
[ "Apache-2.0" ]
null
null
null
tests/db_engine_specs/mssql_tests.py
psbsgic/rabbitai
769e120ba605d56ac076f810a549c38dac410c8e
[ "Apache-2.0" ]
1
2021-07-09T16:29:50.000Z
2021-07-09T16:29:50.000Z
import unittest.mock as mock from textwrap import dedent from sqlalchemy import column, table from sqlalchemy.dialects import mssql from sqlalchemy.dialects.mssql import DATE, NTEXT, NVARCHAR, TEXT, VARCHAR from sqlalchemy.sql import select from sqlalchemy.types import String, UnicodeText from rabbitai.db_engine_spec...
39.738983
121
0.565981
import unittest.mock as mock from textwrap import dedent from sqlalchemy import column, table from sqlalchemy.dialects import mssql from sqlalchemy.dialects.mssql import DATE, NTEXT, NVARCHAR, TEXT, VARCHAR from sqlalchemy.sql import select from sqlalchemy.types import String, UnicodeText from rabbitai.db_engine_spec...
true
true
1c2c533fd377e36d4c3a4e909727f095973d5a8e
12,981
py
Python
nuitka/nodes/AttributeNodes.py
ronnymajani/Nuitka
0083a931e0bd085e4ac9991074b3b8bc05be52b1
[ "Apache-2.0" ]
null
null
null
nuitka/nodes/AttributeNodes.py
ronnymajani/Nuitka
0083a931e0bd085e4ac9991074b3b8bc05be52b1
[ "Apache-2.0" ]
null
null
null
nuitka/nodes/AttributeNodes.py
ronnymajani/Nuitka
0083a931e0bd085e4ac9991074b3b8bc05be52b1
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
33.199488
88
0.657191
from .ExpressionBases import ( ExpressionChildHavingBase, ExpressionChildrenHavingBase, ) from .NodeBases import StatementChildHavingBase, StatementChildrenHavingBase from .NodeMakingHelpers import wrapExpressionWithNodeSideEffects class StatementAssignmentAttribute(StatementChildrenHavingBa...
true
true
1c2c53aa16d9ea8677c56901730b8680fc9510da
272
py
Python
PySrc/3day/func12.py
Timmy-Oh/Adorable-Lab
c21454d011e6888fd28c41d1624721ea1826be40
[ "Apache-2.0" ]
null
null
null
PySrc/3day/func12.py
Timmy-Oh/Adorable-Lab
c21454d011e6888fd28c41d1624721ea1826be40
[ "Apache-2.0" ]
null
null
null
PySrc/3day/func12.py
Timmy-Oh/Adorable-Lab
c21454d011e6888fd28c41d1624721ea1826be40
[ "Apache-2.0" ]
null
null
null
# Func12.py ''' 1 @ 4 = 17 3 @ 4 = 25 2 @ 7 = 53 4 @ 8 = 80 ''' # 중첩 함수 def Test(x,y) : def Sum(i,j): return i+j def Pow(i): return i**2 return Sum(Pow(x), Pow(y)) print(Test(1,4)) # 17 print(Test(3,4)) # 25 print(Test(2,7)) # 53 print(Test(4,8)) # 80
14.315789
30
0.503676
 ''' 1 @ 4 = 17 3 @ 4 = 25 2 @ 7 = 53 4 @ 8 = 80 ''' def Test(x,y) : def Sum(i,j): return i+j def Pow(i): return i**2 return Sum(Pow(x), Pow(y)) print(Test(1,4)) print(Test(3,4)) print(Test(2,7)) print(Test(4,8))
false
true
1c2c5435cf1ab2a2633586653446fc7f3f8dc9f4
2,289
py
Python
rusentrel/classic/ctx/att_hidden_z_yang.py
nicolay-r/attitude-extraction-with-attention-and-ds
fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d
[ "MIT" ]
null
null
null
rusentrel/classic/ctx/att_hidden_z_yang.py
nicolay-r/attitude-extraction-with-attention-and-ds
fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d
[ "MIT" ]
1
2020-12-16T18:21:11.000Z
2020-12-30T10:08:27.000Z
rusentrel/classic/ctx/att_hidden_z_yang.py
nicolay-r/attitude-extraction-with-attention-and-ds
fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d
[ "MIT" ]
1
2021-03-29T20:58:26.000Z
2021-03-29T20:58:26.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import tensorflow as tf sys.path.append('../../../') from io_utils import RuSentRelBasedExperimentsIOUtils from arekit.contrib.networks.context.architectures.att_self_z_yang_bilstm import AttentionSelfZYangBiLSTM from arekit.contrib.networks.context.configurations...
43.188679
112
0.757536
import sys import tensorflow as tf sys.path.append('../../../') from io_utils import RuSentRelBasedExperimentsIOUtils from arekit.contrib.networks.context.architectures.att_self_z_yang_bilstm import AttentionSelfZYangBiLSTM from arekit.contrib.networks.context.configurations.att_self_z_yang_bilstm import Attention...
true
true
1c2c546cd2d3e521fb82afe1504f6f706a98dc6b
59,591
py
Python
tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py
thrau/moto
125aeea70ae8dad9f21545e34ae6214f696a8eb2
[ "Apache-2.0" ]
null
null
null
tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py
thrau/moto
125aeea70ae8dad9f21545e34ae6214f696a8eb2
[ "Apache-2.0" ]
1
2021-09-13T04:39:03.000Z
2021-09-13T04:39:03.000Z
tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py
thrau/moto
125aeea70ae8dad9f21545e34ae6214f696a8eb2
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import json from collections import OrderedDict from datetime import datetime, timedelta import pytz import boto3 from botocore.exceptions import ClientError, ValidationError import sure # noqa import pytest from moto import mock_cloudformation, mock_dynamodb2, mock_s3, mock...
35.094817
147
0.690222
from __future__ import unicode_literals import json from collections import OrderedDict from datetime import datetime, timedelta import pytz import boto3 from botocore.exceptions import ClientError, ValidationError import sure import pytest from moto import mock_cloudformation, mock_dynamodb2, mock_s3, mock_sqs, ...
true
true
1c2c55c0e9953e586f31be7674dab04396932620
2,783
py
Python
jiant-russian-v2/setup.py
RussianNLP/RussianSuperGLUE
dafecf6f734835ba22cff5ea3ec2ff70cca3cd3c
[ "MIT" ]
74
2020-06-11T11:37:57.000Z
2022-03-07T09:44:05.000Z
jiant-russian-v2/setup.py
RussianNLP/RussianSuperGLUE
dafecf6f734835ba22cff5ea3ec2ff70cca3cd3c
[ "MIT" ]
1
2020-06-11T12:08:50.000Z
2020-12-15T10:51:50.000Z
jiant-russian-v2/setup.py
RussianNLP/RussianSuperGLUE
dafecf6f734835ba22cff5ea3ec2ff70cca3cd3c
[ "MIT" ]
13
2020-06-18T11:53:19.000Z
2022-03-23T17:15:44.000Z
"""Setuptools package definition for PyPI/pip distribution Dependencies will need to be updated in the "install_requires" of setup() below. Those dependencies are used to create the CircleCI virtual environment. These are generally the same dependencies as in environment.yml, but should be limited to dependencies requ...
33.939024
100
0.679123
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="jiant", author="NYU Machine Learning for Language Group", author_email="bowman@nyu.edu", description="jiant is a software toolkit for natural language processing research, designed to \ fa...
true
true
1c2c5656f8cb8cb081a07cb79d30fe7e82e2ac65
2,110
py
Python
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/dummy_driver.py
baodongli/group-based-policy
f3b892ecdc1051b204376e18679f73bf457ce7dc
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/dummy_driver.py
baodongli/group-based-policy
f3b892ecdc1051b204376e18679f73bf457ce7dc
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/dummy_driver.py
baodongli/group-based-policy
f3b892ecdc1051b204376e18679f73bf457ce7dc
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
26.708861
78
0.693839
from oslo_log import helpers as log from gbpservice.neutron.services.servicechain.plugins.ncp import driver_base class NoopNodeDriver(driver_base.NodeDriverBase): initialized = False @log.log_method_call def initialize(self, name): self.initialized = True self._name = name ...
true
true
1c2c572a8c7ab69a86c0a51ef94ba47c41f04215
621
py
Python
tasks/migrations/0001_initial.py
akshaygepl1/NewTodoApp
87b697bd1e454279aa329154ec72ba8e9a40c4e6
[ "MIT" ]
null
null
null
tasks/migrations/0001_initial.py
akshaygepl1/NewTodoApp
87b697bd1e454279aa329154ec72ba8e9a40c4e6
[ "MIT" ]
null
null
null
tasks/migrations/0001_initial.py
akshaygepl1/NewTodoApp
87b697bd1e454279aa329154ec72ba8e9a40c4e6
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-07-30 09:08 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Task', fields=[ ('id', models.AutoField(aut...
25.875
114
0.57649
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Task', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fal...
true
true
1c2c593c533af0bcc8d96984fc534b7dcc96e506
19,656
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/protocols.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/protocols.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/protocols.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
38.315789
165
0.661172
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class Protocols(Base): __slots__ = () _SDM_NAME = 'protocols' _SDM_ATT_MAP = { 'ProtocolMaxNodeCount': 'protocolMaxNodeCount', } def __init__(self, parent): super(Protocols, self)...
true
true
1c2c59574a1b63bcdd79eda9edb55687ab1f37bd
9,787
py
Python
pgn_read/samples/_utilities.py
RogerMarsh/pgn-read
514031110afcdcda29bb769f532e0993525abc85
[ "BSD-3-Clause" ]
2
2021-02-21T07:13:48.000Z
2021-02-25T21:50:15.000Z
pgn_read/samples/_utilities.py
RogerMarsh/pgn-read
514031110afcdcda29bb769f532e0993525abc85
[ "BSD-3-Clause" ]
null
null
null
pgn_read/samples/_utilities.py
RogerMarsh/pgn-read
514031110afcdcda29bb769f532e0993525abc85
[ "BSD-3-Clause" ]
1
2021-02-21T14:47:29.000Z
2021-02-21T14:47:29.000Z
# _utilities.py # Copyright 2020 Roger Marsh # Licence: See LICENCE (BSD licence) """Utilities to run a sample module.""" import tkinter import tkinter.ttk import tkinter.filedialog import tkinter.messagebox import os import time from ..core.parser import PGN from ..core.game import generate_fen_for_position def r...
35.33213
79
0.547154
import tkinter import tkinter.ttk import tkinter.filedialog import tkinter.messagebox import os import time from ..core.parser import PGN from ..core.game import generate_fen_for_position def read_pgn(filename, game_class=None, size=10000000): game_ok_count = 0 game_not_ok_count = 0 game_ok_token_co...
true
true
1c2c5a98edc05a4e7efc4472c00d75f91a63068e
4,786
py
Python
sdk/python/pulumi_azure_nextgen/sql/v20200801preview/_inputs.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/sql/v20200801preview/_inputs.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/sql/v20200801preview/_inputs.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
33.468531
144
0.619933
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'ElasticPoolPerDatabaseSettingsArgs', 'SkuArgs', ] @pulumi.input_type class ElasticPoolPerDatabaseSettingsArgs: def __init__(__self__, *, ...
true
true
1c2c5bf02958a264687eb3a041c1006eb85b72bd
2,058
py
Python
competition/portfolio.py
xfuzzycomp/FuzzyChallenge2021
5876450fdb913c6707352bfe9fcc25748f041f52
[ "MIT" ]
null
null
null
competition/portfolio.py
xfuzzycomp/FuzzyChallenge2021
5876450fdb913c6707352bfe9fcc25748f041f52
[ "MIT" ]
null
null
null
competition/portfolio.py
xfuzzycomp/FuzzyChallenge2021
5876450fdb913c6707352bfe9fcc25748f041f52
[ "MIT" ]
null
null
null
from competition.scenarios import * portfolio = [ threat_test_1, threat_test_2, threat_test_3, threat_test_4, accuracy_test_1, accuracy_test_2, accuracy_test_3, accuracy_test_4, accuracy_test_5, accuracy_test_6, accuracy_test_7, accuracy_test_8, accuracy_test_9, ...
20.787879
78
0.729349
from competition.scenarios import * portfolio = [ threat_test_1, threat_test_2, threat_test_3, threat_test_4, accuracy_test_1, accuracy_test_2, accuracy_test_3, accuracy_test_4, accuracy_test_5, accuracy_test_6, accuracy_test_7, accuracy_test_8, accuracy_test_9, ...
true
true
1c2c5c765623036e293e8c37573a07c2f79363f7
27,063
py
Python
girderformindlogger/models/user.py
shnizzedy/mindlogger-app-backend
a8ba865af82fc95fa3fcc4251afb8a0d22e63cc3
[ "Apache-2.0" ]
null
null
null
girderformindlogger/models/user.py
shnizzedy/mindlogger-app-backend
a8ba865af82fc95fa3fcc4251afb8a0d22e63cc3
[ "Apache-2.0" ]
null
null
null
girderformindlogger/models/user.py
shnizzedy/mindlogger-app-backend
a8ba865af82fc95fa3fcc4251afb8a0d22e63cc3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import os import re from passlib.context import CryptContext from passlib.totp import TOTP, TokenError import six from girderformindlogger import events from girderformindlogger.constants import AccessType, CoreEventHandler, TokenScope from girderformindlogger.exceptions import ...
37.797486
104
0.586409
import datetime import os import re from passlib.context import CryptContext from passlib.totp import TOTP, TokenError import six from girderformindlogger import events from girderformindlogger.constants import AccessType, CoreEventHandler, TokenScope from girderformindlogger.exceptions import AccessException, Valida...
true
true
1c2c5cd62e42cd0bc8971612062aac4c733a7a57
466
py
Python
Apps/contatos/migrations/0021_alter_chat_data.py
arthur-asilva/rc_plataforma
7e6f7eb7f9a3b9089c02db98518b60d8e481ce4c
[ "BSD-2-Clause" ]
null
null
null
Apps/contatos/migrations/0021_alter_chat_data.py
arthur-asilva/rc_plataforma
7e6f7eb7f9a3b9089c02db98518b60d8e481ce4c
[ "BSD-2-Clause" ]
null
null
null
Apps/contatos/migrations/0021_alter_chat_data.py
arthur-asilva/rc_plataforma
7e6f7eb7f9a3b9089c02db98518b60d8e481ce4c
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 4.0 on 2022-02-24 18:48 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contatos', '0020_alter_chat_data'), ] operations = [ migrations.AlterField( model_name='chat', name='d...
23.3
122
0.620172
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contatos', '0020_alter_chat_data'), ] operations = [ migrations.AlterField( model_name='chat', name='data', field=models.DateTimeField(...
true
true
1c2c5cec8efd1af9f39dda1bf64c9fd122edf367
2,568
py
Python
virtual/lib/python3.8/site-packages/pylint/extensions/emptystring.py
erastus-1/GramApp
d926a8a894b5dc673d077b35f9df867dab737372
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
virtual/lib/python3.8/site-packages/pylint/extensions/emptystring.py
erastus-1/GramApp
d926a8a894b5dc673d077b35f9df867dab737372
[ "MIT" ]
10
2020-09-30T12:49:45.000Z
2020-10-04T10:26:33.000Z
virtual/lib/python3.8/site-packages/pylint/extensions/emptystring.py
erastus-1/GramApp
d926a8a894b5dc673d077b35f9df867dab737372
[ "MIT" ]
7
2021-03-15T13:39:20.000Z
2022-03-29T12:08:21.000Z
# Copyright (c) 2016 Alexander Todorov <atodorov@otb.bg> # Copyright (c) 2017-2018, 2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2019 Pierre Sassoulas <pierre.sassoulas@gmail.com> # Copyright (c) 2020 Anthony Sottile <asottile@umich.edu> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/...
33.789474
85
0.648754
import itertools import astroid from pylint import checkers, interfaces from pylint.checkers import utils def _is_constant_empty_str(node): return isinstance(node, astroid.Const) and node.value == "" class CompareToEmptyStringChecker(checkers.BaseChecker): __implements__ = (interfaces.IAstroidCh...
true
true
1c2c5dd65a70e92b292489a4bdb74b3f9b0e9ad5
773
py
Python
aiida/work/__init__.py
astamminger/aiida_core
b01ad8236f21804f273c9d2a0365ecee62255cbb
[ "BSD-2-Clause" ]
null
null
null
aiida/work/__init__.py
astamminger/aiida_core
b01ad8236f21804f273c9d2a0365ecee62255cbb
[ "BSD-2-Clause" ]
null
null
null
aiida/work/__init__.py
astamminger/aiida_core
b01ad8236f21804f273c9d2a0365ecee62255cbb
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
48.3125
75
0.454075
false
true
1c2c5e5c68e34865d3a608d0d05b86301c5d6ffe
2,661
py
Python
app/recipe/tests/test_tags_api.py
JDuskey/recipe-app-api
911c892b57fcfe62b9ba7fa74f3b7c998d0b7918
[ "MIT" ]
null
null
null
app/recipe/tests/test_tags_api.py
JDuskey/recipe-app-api
911c892b57fcfe62b9ba7fa74f3b7c998d0b7918
[ "MIT" ]
null
null
null
app/recipe/tests/test_tags_api.py
JDuskey/recipe-app-api
911c892b57fcfe62b9ba7fa74f3b7c998d0b7918
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') class PublicTa...
30.238636
76
0.652011
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') class PublicTa...
true
true
1c2c5e911abaf13e56c422deb67ffab421752834
4,993
py
Python
scripts/mo.py
aafulei/leetcode
e3a0ef9c912abf99a1d6e56eff8802ba44b0057d
[ "MIT" ]
2
2019-04-13T09:55:04.000Z
2019-05-16T12:47:40.000Z
scripts/mo.py
aafulei/leetcode
e3a0ef9c912abf99a1d6e56eff8802ba44b0057d
[ "MIT" ]
null
null
null
scripts/mo.py
aafulei/leetcode
e3a0ef9c912abf99a1d6e56eff8802ba44b0057d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 22/06/03 = Fri # 22/05/27 = Fri # ----------------- # Markdown Outliner # ----------------- # A Python module that support the LeetCode Information Tracker. It reads and # understands a markdown document. import bisect import io import os import sys class Section: def __init__(self, l...
27.434066
77
0.527939
import bisect import io import os import sys class Section: def __init__(self, level=0, name="", father=None, children=None): self.level = level self.name = name self.father = father self.children = [] if not children else children def __iter__(self): retur...
true
true
1c2c5fb1897434edf813ca11fee52e66fc56491b
458
py
Python
mspyteams/aiohttp.py
sander76/mspyteams
b8755afe8533fd1b9c059ca5d176b335f8070310
[ "MIT" ]
null
null
null
mspyteams/aiohttp.py
sander76/mspyteams
b8755afe8533fd1b9c059ca5d176b335f8070310
[ "MIT" ]
null
null
null
mspyteams/aiohttp.py
sander76/mspyteams
b8755afe8533fd1b9c059ca5d176b335f8070310
[ "MIT" ]
null
null
null
"""Send card using aiohttp""" import logging from typing import TYPE_CHECKING import aiohttp if TYPE_CHECKING: from mspyteams.card import Card _LOGGER = logging.getLogger(__name__) async def send(card: "Card", webhook_url, session: aiohttp.ClientSession): """Send the card to the teams webhook.""" data ...
25.444444
74
0.735808
import logging from typing import TYPE_CHECKING import aiohttp if TYPE_CHECKING: from mspyteams.card import Card _LOGGER = logging.getLogger(__name__) async def send(card: "Card", webhook_url, session: aiohttp.ClientSession): data = card.card_data() async with session.post(webhook_url, json=data) as re...
true
true
1c2c612e60bb50ea7a694d80419862366ba69591
2,514
py
Python
gmprocess/io/asdf/utils.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
54
2019-01-12T02:05:38.000Z
2022-03-29T19:43:56.000Z
gmprocess/io/asdf/utils.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
700
2018-12-18T19:44:31.000Z
2022-03-30T20:54:28.000Z
gmprocess/io/asdf/utils.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
41
2018-11-29T23:17:56.000Z
2022-03-31T04:04:23.000Z
"""Utilities for simple operations on an ASDF workspace. """ # third party imports import h5py class TallyStorage(object): """Tally storage used within each group.""" def __init__(self, group_detail=None): """Constructor. Args: group_detail (list): List of group ...
31.822785
78
0.536993
import h5py class TallyStorage(object): def __init__(self, group_detail=None): self.group_detail = group_detail if group_detail else [] return @staticmethod def compute_dataset_storage(dataset): assert isinstance(dataset, h5py.Dataset) return dataset.size * dataset.dtyp...
true
true
1c2c615b05e64ea5edd0451a394a00de6035afd7
5,596
py
Python
macro_benchmark/WideDeep/census_test.py
songhappy/ai-matrix
901078e480c094235c721c49f8141aec7a84e70e
[ "Apache-2.0" ]
180
2018-09-20T07:27:40.000Z
2022-03-19T07:55:42.000Z
macro_benchmark/WideDeep/census_test.py
songhappy/ai-matrix
901078e480c094235c721c49f8141aec7a84e70e
[ "Apache-2.0" ]
80
2018-09-26T18:55:56.000Z
2022-02-10T02:03:26.000Z
macro_benchmark/WideDeep/census_test.py
songhappy/ai-matrix
901078e480c094235c721c49f8141aec7a84e70e
[ "Apache-2.0" ]
72
2018-08-30T00:49:15.000Z
2022-02-15T23:22:40.000Z
# 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...
34.54321
80
0.682809
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf from utils.testing import integration import census_dataset import census_main import wide_deep_run_loop tf.logging.set_verbosity(tf.logging.ERROR) TEST_IN...
true
true
1c2c61708ea7a4fbdd8343ddaced6398fa026d2a
8,750
py
Python
base-LASED/build/lib/LASED/time_evolution_matrix.py
mvpmanish/LASED
7793037b3e77ee9205f631d7ff6c511895108400
[ "MIT" ]
7
2021-06-07T14:58:01.000Z
2022-03-24T18:08:13.000Z
base-LASED/LASED/.ipynb_checkpoints/time_evolution_matrix-checkpoint.py
mvpmanish/LASED
7793037b3e77ee9205f631d7ff6c511895108400
[ "MIT" ]
13
2021-06-07T14:15:54.000Z
2022-03-29T11:06:10.000Z
base-LASED/LASED/time_evolution_matrix.py
mvpmanish/LASED
7793037b3e77ee9205f631d7ff6c511895108400
[ "MIT" ]
2
2021-12-09T06:31:23.000Z
2022-03-18T17:29:48.000Z
''' This is a file to define a function to populate the time evolution matrix for a laser-atom system Author: Manish Patel Date created: 12/05/2021 ''' from LASED.state import * from LASED.detuning import * from LASED.symbolic_print import * from LASED.half_rabi_freq import * from LASED.decay_constant import * from LA...
49.157303
173
0.543886
from LASED.state import * from LASED.detuning import * from LASED.symbolic_print import * from LASED.half_rabi_freq import * from LASED.decay_constant import * from LASED.index import * from sympy import * from sympy import Symbol import numpy as np def timeEvolutionMatrix(n, E, G, Q, Q_decay, tau, laser_wavelength,...
true
true
1c2c620fe4e04f19a92c2ab7051646f1df26af3b
23,267
py
Python
bdgym/envs/driver_assistant/policy.py
RDLLab/benevolent-deception-gym
4d04e097609097e0f07c661aac221184ebdec2fe
[ "MIT" ]
null
null
null
bdgym/envs/driver_assistant/policy.py
RDLLab/benevolent-deception-gym
4d04e097609097e0f07c661aac221184ebdec2fe
[ "MIT" ]
null
null
null
bdgym/envs/driver_assistant/policy.py
RDLLab/benevolent-deception-gym
4d04e097609097e0f07c661aac221184ebdec2fe
[ "MIT" ]
null
null
null
"""Driver Policies for the Driver Assistant Environment """ from copy import deepcopy from typing import Tuple, Optional, List, Dict import numpy as np from highway_env.utils import not_zero, do_every from highway_env.types import Vector from highway_env.road.lane import AbstractLane from highway_env.envs.common.acti...
37.588045
79
0.614261
from copy import deepcopy from typing import Tuple, Optional, List, Dict import numpy as np from highway_env.utils import not_zero, do_every from highway_env.types import Vector from highway_env.road.lane import AbstractLane from highway_env.envs.common.action import Action from highway_env.vehicle.kinematics import ...
true
true
1c2c63506fee27886afc5a0f60d00cb3c9bfda8e
3,438
py
Python
research/astronet/astronet/data/generate_download_script.py
leftnoteasy/models
d8246d369cacb65f1625552e1f656c9c0d386d44
[ "Apache-2.0" ]
1
2018-04-02T08:32:55.000Z
2018-04-02T08:32:55.000Z
research/astronet/astronet/data/generate_download_script.py
leftnoteasy/models
d8246d369cacb65f1625552e1f656c9c0d386d44
[ "Apache-2.0" ]
null
null
null
research/astronet/astronet/data/generate_download_script.py
leftnoteasy/models
d8246d369cacb65f1625552e1f656c9c0d386d44
[ "Apache-2.0" ]
1
2019-05-07T06:18:49.000Z
2019-05-07T06:18:49.000Z
# Copyright 2018 The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
33.057692
106
0.676265
r"""Generates a bash script for downloading light curves. The input to this script is a CSV file of Kepler targets, for example the DR24 TCE table, which can be downloaded in CSV format from the NASA Exoplanet Archive at: https://exoplanetarchive.ipac.caltech.edu/cgi-bin/TblView/nph-tblView?app=ExoTbl...
false
true
1c2c635271b21d5a400449f0ebcfa562d6bb73e8
6,582
py
Python
qa/rpc-tests/txn_doublespend.py
raasakh/beenode
b28e026ab14059c5774a13210e65e376725c82ad
[ "MIT" ]
null
null
null
qa/rpc-tests/txn_doublespend.py
raasakh/beenode
b28e026ab14059c5774a13210e65e376725c82ad
[ "MIT" ]
null
null
null
qa/rpc-tests/txn_doublespend.py
raasakh/beenode
b28e026ab14059c5774a13210e65e376725c82ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with a double-spend conflict # from test_framework.test_framework import Bitc...
46.027972
111
0.609389
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class TxnMallTest(BitcoinTestFramework): def add_options(self, parser): parser.add_option("--mineblock", dest="mine_block", default=False, action="store_true", help="Test dou...
true
true
1c2c63f5b27e9b7d657b53a9fba7139c1916373d
3,314
py
Python
app/app/settings.py
dilnawaz07/recipe-app-api
bc6fe1693d5117390461f09a902dc6799c975b71
[ "MIT" ]
null
null
null
app/app/settings.py
dilnawaz07/recipe-app-api
bc6fe1693d5117390461f09a902dc6799c975b71
[ "MIT" ]
null
null
null
app/app/settings.py
dilnawaz07/recipe-app-api
bc6fe1693d5117390461f09a902dc6799c975b71
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.1.15. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bu...
25.492308
91
0.687085
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'u*g%p(%4(b&4dq)yh$1gw_cv3cag-=pqicw(q1y47_0_56pyt$' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
1c2c6486806e2c5d1e0bf1b01c8c40c028b80544
5,091
py
Python
nose/test_pearl.py
finn-dodgson/DeepHalos
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
[ "MIT" ]
2
2021-07-26T10:56:33.000Z
2021-12-20T17:30:53.000Z
nose/test_pearl.py
finn-dodgson/DeepHalos
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
[ "MIT" ]
1
2021-11-25T21:01:19.000Z
2021-12-05T01:40:53.000Z
nose/test_pearl.py
finn-dodgson/DeepHalos
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
[ "MIT" ]
1
2021-11-27T02:35:10.000Z
2021-11-27T02:35:10.000Z
import sys sys.path.append("/home/luisals/DeepHalos") from dlhalos_code import CNN from dlhalos_code import custom_regularizers as reg import dlhalos_code.data_processing as tn from dlhalos_code import evaluation as evalu from pickle import dump, load import numpy as np import os ########### CREATE GENERATORS FOR TRAI...
48.028302
121
0.607739
import sys sys.path.append("/home/luisals/DeepHalos") from dlhalos_code import CNN from dlhalos_code import custom_regularizers as reg import dlhalos_code.data_processing as tn from dlhalos_code import evaluation as evalu from pickle import dump, load import numpy as np import os random_subset_each_sim...
true
true
1c2c64d2b856540aff814af4368f6379ad600b93
1,598
py
Python
Numpy XOR/Tensor_ImageRecognition.py
chaseaucoin/Neural-Primer
d5163af8cd74ea5cea620069dffca8c124bffc05
[ "MIT" ]
1
2017-08-07T04:45:53.000Z
2017-08-07T04:45:53.000Z
Numpy XOR/Tensor_ImageRecognition.py
chaseaucoin/Neural-Primer
d5163af8cd74ea5cea620069dffca8c124bffc05
[ "MIT" ]
null
null
null
Numpy XOR/Tensor_ImageRecognition.py
chaseaucoin/Neural-Primer
d5163af8cd74ea5cea620069dffca8c124bffc05
[ "MIT" ]
null
null
null
from tensorflow.examples.tutorials.mnist import input_data #Get The MNIST Data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) import tensorflow as tf # Create the model inputs = tf.placeholder(tf.float32, [None, 784]) weights = tf.Variable(tf.zeros([784, 10])) biases = tf.Variable(tf.zeros(...
37.162791
96
0.706508
from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) import tensorflow as tf inputs = tf.placeholder(tf.float32, [None, 784]) weights = tf.Variable(tf.zeros([784, 10])) biases = tf.Variable(tf.zeros([10])) predictions = tf.matmul(inputs,...
true
true
1c2c652f3bebe66d5eab4b30dfd527aeb1c21307
252
py
Python
contest/abc084/B.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
contest/abc084/B.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
contest/abc084/B.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
a, b = map(int, input().split()) s = input() if len(s) == a + b + 1 and s[a] == '-': for i in range(len(s)): if i != a and not ('0' <= s[i] and s[i] <= '9'): print('No') exit() print('Yes') else: print('No')
22.909091
56
0.404762
a, b = map(int, input().split()) s = input() if len(s) == a + b + 1 and s[a] == '-': for i in range(len(s)): if i != a and not ('0' <= s[i] and s[i] <= '9'): print('No') exit() print('Yes') else: print('No')
true
true