max_stars_repo_path
stringlengths
4
286
max_stars_repo_name
stringlengths
5
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.03M
content_cleaned
stringlengths
6
1.03M
language
stringclasses
111 values
language_score
float64
0.03
1
comments
stringlengths
0
556k
edu_score
float64
0.32
5.03
edu_int_score
int64
0
5
app/display_modules/hmp/tests/test_module.py
MetaGenScope/metagenscope-server
0
6631051
"""Test suite for HMP model.""" from mongoengine import ValidationError from app.analysis_results.analysis_result_models import AnalysisResultWrapper from app.display_modules.display_module_base_test import BaseDisplayModuleTest from app.display_modules.hmp import HMPDisplayModule from app.samples.sample_models impor...
"""Test suite for HMP model.""" from mongoengine import ValidationError from app.analysis_results.analysis_result_models import AnalysisResultWrapper from app.display_modules.display_module_base_test import BaseDisplayModuleTest from app.display_modules.hmp import HMPDisplayModule from app.samples.sample_models impor...
en
0.733959
Test suite for HMP model. Test suite for HMP model. Ensure getting a single HMP behaves correctly. Ensure HMP model is created correctly. Ensure saving model fails if category is missing from `data`. # pylint: disable=invalid-name Ensure hmp run_sample_group produces correct results. Create unique sample for index i.
2.461471
2
src/test/testcases/testMemPBA.py
open-power/sbe
9
6631052
# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/test/testcases/testMemPBA.py $ # # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/test/testcases/testMemPBA.py $ # # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
en
0.653911
# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/test/testcases/testMemPBA.py $ # # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
1.849238
2
source/code/testing/kms.py
eshack94/aws-ops-automator
1
6631053
###################################################################################################################### # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
###################################################################################################################### # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
en
0.51853
###################################################################################################################### # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
2.135765
2
tensorflow/python/ops/init_ops_v2.py
computationalartist/tensorflow
190,993
6631054
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
en
0.593878
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
2.166435
2
alura/design_patterns_python/calculador_desconto.py
flaviogf/Cursos
2
6631055
<reponame>flaviogf/Cursos<gh_stars>1-10 from desconto import DescontoPorCincoItens, SemDesconto class CalculadorDesconto: def calcula(self, orcamento): return DescontoPorCincoItens(SemDesconto()).calcula(orcamento)
from desconto import DescontoPorCincoItens, SemDesconto class CalculadorDesconto: def calcula(self, orcamento): return DescontoPorCincoItens(SemDesconto()).calcula(orcamento)
none
1
2.475264
2
conftest.py
githubmata/projects
0
6631056
# -*- coding: utf8 -*- import pytest from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.common.exceptions import WebDriverException, TimeoutException pytest.app = "https://www.disney.com/" # pytest.data = { "firstName": "tester", "lastName": "t...
# -*- coding: utf8 -*- import pytest from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.common.exceptions import WebDriverException, TimeoutException pytest.app = "https://www.disney.com/" # pytest.data = { "firstName": "tester", "lastName": "t...
en
0.443217
# -*- coding: utf8 -*- # pytest.data = { "firstName": "tester", "lastName": "testing", "email address":"<EMAIL>"
2.731041
3
tests/fields/test_json_field.py
mdanse/wtforms-components
54
6631057
<reponame>mdanse/wtforms-components from tests import MultiDict, SimpleFieldTestCase from wtforms_components import JSONField class TestJSONField(SimpleFieldTestCase): field_class = JSONField def setup_method(self, method): self.valid_jsons = [ '{"a": {"b": true, "c": "lv", "d": 3}, "e": ...
from tests import MultiDict, SimpleFieldTestCase from wtforms_components import JSONField class TestJSONField(SimpleFieldTestCase): field_class = JSONField def setup_method(self, method): self.valid_jsons = [ '{"a": {"b": true, "c": "lv", "d": 3}, "e": {"f": {"g": [85]}}}' ] ...
none
1
2.963247
3
autokeras/utils.py
MustafaKadioglu/autokeras
1
6631058
import csv import os import pickle import sys import tempfile import zipfile import warnings import imageio import numpy as np import requests import torch import subprocess import string import random from autokeras.constant import Constant from scipy.ndimage import zoom class NoImprovementError(Exception): def...
import csv import os import pickle import sys import tempfile import zipfile import warnings import imageio import numpy as np import requests import torch import subprocess import string import random from autokeras.constant import Constant from scipy.ndimage import zoom class NoImprovementError(Exception): def...
en
0.770993
Create directory if it does not exist. Create path if it does not exist. Check if the given path exists. Load the pickle file from the provided path and returns the object. Save the pickle file to the specified path. # TODO cannot detect nvidia-smi in Windows normally. We need a fall back for windows If CUDA is availab...
2.259336
2
qurator/dinglehopper/align.py
JKamlah/dinglehopper
0
6631059
from .edit_distance import * def align(t1, t2): """Align text.""" s1 = list(grapheme_clusters(unicodedata.normalize('NFC', t1))) s2 = list(grapheme_clusters(unicodedata.normalize('NFC', t2))) return seq_align(s1, s2) def seq_align(s1, s2): """Align general sequences.""" s1 = list(s1) s2 ...
from .edit_distance import * def align(t1, t2): """Align text.""" s1 = list(grapheme_clusters(unicodedata.normalize('NFC', t1))) s2 = list(grapheme_clusters(unicodedata.normalize('NFC', t2))) return seq_align(s1, s2) def seq_align(s1, s2): """Align general sequences.""" s1 = list(s1) s2 ...
en
0.394181
Align text. Align general sequences.
2.767178
3
addons/point_of_sale/models/pos_order.py
SHIVJITH/Odoo_Machine_Test
0
6631060
<reponame>SHIVJITH/Odoo_Machine_Test # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from datetime import timedelta from functools import partial import psycopg2 import pytz import re from odoo import api, fields, models, tools, _ from odoo.tools impor...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from datetime import timedelta from functools import partial import psycopg2 import pytz import re from odoo import api, fields, models, tools, _ from odoo.tools import float_is_zero, float_round from odo...
en
0.820083
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # This deals with orders that belong to a closed session. In order # to recover from this situation we create a new rescue session, # making it obvious that something went wrong. # A new, separate, rescue session is prefe...
2.142655
2
rotkehlchen/tests/external_apis/test_coingecko.py
rotkehlchenio/rotkehlchen
137
6631061
<filename>rotkehlchen/tests/external_apis/test_coingecko.py import pytest from rotkehlchen.assets.asset import EthereumToken from rotkehlchen.constants.assets import A_BTC, A_ETH, A_EUR, A_YFI from rotkehlchen.errors.asset import UnsupportedAsset from rotkehlchen.externalapis.coingecko import CoingeckoAssetData from r...
<filename>rotkehlchen/tests/external_apis/test_coingecko.py import pytest from rotkehlchen.assets.asset import EthereumToken from rotkehlchen.constants.assets import A_BTC, A_ETH, A_EUR, A_YFI from rotkehlchen.errors.asset import UnsupportedAsset from rotkehlchen.externalapis.coingecko import CoingeckoAssetData from r...
en
0.33574
# else # noqa: E501 # PRL, a token without coingecko page # noqa: E501
2.226618
2
software/glasgow/applet/video/ws2812_output/__init__.py
electroniceel/Glasgow
1,014
6631062
<reponame>electroniceel/Glasgow<filename>software/glasgow/applet/video/ws2812_output/__init__.py import logging import asyncio from nmigen import * from ....support.endpoint import * from ....gateware.pads import * from ....gateware.pll import * from ... import * class VideoWS2812Output(Elaboratable): def __init...
import logging import asyncio from nmigen import * from ....support.endpoint import * from ....gateware.pads import * from ....gateware.pll import * from ... import * class VideoWS2812Output(Elaboratable): def __init__(self, pads): self.pads = pads self.out = Signal(len(pads)) def elaborate(...
en
0.547233
# Safe timings: # bit period needs to be > 1250ns and < 7µs # 0 bits should be 100 - 500 ns # 1 bits should be > 750ns and < (period - 200ns) # reset should be >300µs Output RGB frames from a socket to one or more WS2812(B) LED strings. # ---------------------------------------------------------------------------------...
2.225807
2
Bio/AlignIO/FastaIO.py
ttung/biopython
0
6631063
# Copyright 2008-2016 by <NAME>. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Bio.AlignIO support for ...
# Copyright 2008-2016 by <NAME>. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Bio.AlignIO support for ...
en
0.847083
# Copyright 2008-2016 by <NAME>. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. Bio.AlignIO support for "fa...
2.732175
3
sign-language-hand-gesture-recognition/classify_webcam.py
kriti3108/CoC_PeRKS
1
6631064
<reponame>kriti3108/CoC_PeRKS import sys import os import matplotlib import numpy as np import matplotlib.pyplot as plt import copy import cv2 # Disable tensorflow compilation warnings os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf sequence="" def predict(image_data): sess = tf.Session() predi...
import sys import os import matplotlib import numpy as np import matplotlib.pyplot as plt import copy import cv2 # Disable tensorflow compilation warnings os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf sequence="" def predict(image_data): sess = tf.Session() predictions = sess.run(softmax_tens...
en
0.839301
# Disable tensorflow compilation warnings # Sort to show labels of first prediction in order of confidence # Loads label file, strips off carriage return # Unpersists graph from file # Feed the image_data as input to the graph and get first prediction # waits to see if `esc` is pressed # when `esc` is pressed # Followi...
2.617869
3
serve.py
chughtaimh/slack-slash-commands
0
6631065
from app import app def main(): """Runs webservice""" from paste import httpserver httpserver.serve(app, host='127.0.0.1', port='8080') if __name__ == '__main__': main()
from app import app def main(): """Runs webservice""" from paste import httpserver httpserver.serve(app, host='127.0.0.1', port='8080') if __name__ == '__main__': main()
de
0.808817
Runs webservice
2.101086
2
pypubtrack/__init__.py
the16thpythonist/pypubtrack
0
6631066
"""Top-level package for pypubtrack.""" __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '0.1.0' from pypubtrack.pypubtrack import Pubtrack
"""Top-level package for pypubtrack.""" __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '0.1.0' from pypubtrack.pypubtrack import Pubtrack
en
0.67701
Top-level package for pypubtrack. <NAME>
1.213774
1
src/booking/urls.py
dcosentino/django-booking
1
6631067
<filename>src/booking/urls.py #-*- coding: utf-8 -*- from django.conf.urls import * from views import * urlpatterns = [ ]
<filename>src/booking/urls.py #-*- coding: utf-8 -*- from django.conf.urls import * from views import * urlpatterns = [ ]
en
0.636498
#-*- coding: utf-8 -*-
1.172117
1
evaluation/dpbench/metrics/pmse.py
Tecnarca/patectsdgym
2
6631068
import numpy as np import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split def pmse_ratio(data, synthetic_data): """ In order to determine how similar the synthetic and real data are to each other (general quality of synthetic) we can tra...
import numpy as np import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split def pmse_ratio(data, synthetic_data): """ In order to determine how similar the synthetic and real data are to each other (general quality of synthetic) we can tra...
en
0.814994
In order to determine how similar the synthetic and real data are to each other (general quality of synthetic) we can train a discriminator to attempt to distinguish between real and synthetic. The poorer the performance of the discriminator, the more similar the two datasets are. From "Really Use...
3.355882
3
scripts/experiments/multiple-scripts/01_train_models.py
timothygebhard/hsr4hci
1
6631069
<filename>scripts/experiments/multiple-scripts/01_train_models.py """ Train a collection of half-sibling regression models. """ # ----------------------------------------------------------------------------- # IMPORTS # ----------------------------------------------------------------------------- from pathlib import ...
<filename>scripts/experiments/multiple-scripts/01_train_models.py """ Train a collection of half-sibling regression models. """ # ----------------------------------------------------------------------------- # IMPORTS # ----------------------------------------------------------------------------- from pathlib import ...
en
0.331401
Train a collection of half-sibling regression models. # ----------------------------------------------------------------------------- # IMPORTS # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # MAIN CODE # --...
2.029256
2
tests/shelf_tools/test_tool_paste_items.py
Hengle/Houdini-Toolbox
136
6631070
"""Test the tool_paste_items.shelf file.""" # ============================================================================= # TESTS # ============================================================================= def test_paste_items(mocker, exec_tool_script): """Test the paste_items tool.""" mock_paste = moc...
"""Test the tool_paste_items.shelf file.""" # ============================================================================= # TESTS # ============================================================================= def test_paste_items(mocker, exec_tool_script): """Test the paste_items tool.""" mock_paste = moc...
en
0.347418
Test the tool_paste_items.shelf file. # ============================================================================= # TESTS # ============================================================================= Test the paste_items tool.
2.273395
2
nannies/netapp_balance.py
DEiselt/openstack-nannies
0
6631071
<reponame>DEiselt/openstack-nannies<gh_stars>0 #!/usr/bin/env python3 # # Copyright (c) 2020 SAP SE # 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 # # ...
#!/usr/bin/env python3 # # Copyright (c) 2020 SAP SE # 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 # #...
en
0.799719
#!/usr/bin/env python3 # # Copyright (c) 2020 SAP SE # 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 # #...
1.918887
2
sos_trades_core/sos_processes/test/test_disc1_disc3_simple_multi_scenario/process.py
os-climate/sostrades-core
8
6631072
<gh_stars>1-10 ''' Copyright 2022 Airbus SAS 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 writin...
''' Copyright 2022 Airbus SAS 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 dis...
en
0.794997
Copyright 2022 Airbus SAS 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 distrib...
1.487466
1
sispo/sim/compositor.py
oknuutti/sispo
0
6631073
""" The compositor module combines the different output files of the simulation. As the simulation module outputs different files for background and foreground and because the intensity of the blender rendered images are not constant, the compositor is required to fix the intensity issue and add the star background. "...
""" The compositor module combines the different output files of the simulation. As the simulation module outputs different files for background and foreground and because the intensity of the blender rendered images are not constant, the compositor is required to fix the intensity issue and add the star background. "...
en
0.768546
The compositor module combines the different output files of the simulation. As the simulation module outputs different files for background and foreground and because the intensity of the blender rendered images are not constant, the compositor is required to fix the intensity issue and add the star background. #Astr...
2.299898
2
tests/__init__.py
duypham2108/dev_st
67
6631074
"""Unit test package for stlearn."""
"""Unit test package for stlearn."""
en
0.789885
Unit test package for stlearn.
0.786733
1
plugin.video.foxystreams/resources/lib/ui.py
rrosajp/foxystreams
1
6631075
<filename>plugin.video.foxystreams/resources/lib/ui.py from .router import router import xbmc import xbmcgui import xbmcplugin def build_listitems(names, videos=False): listitems = [] for name in names: li = xbmcgui.ListItem(name) if videos: li.setProperty('IsPlayable', 'true') ...
<filename>plugin.video.foxystreams/resources/lib/ui.py from .router import router import xbmc import xbmcgui import xbmcplugin def build_listitems(names, videos=False): listitems = [] for name in names: li = xbmcgui.ListItem(name) if videos: li.setProperty('IsPlayable', 'true') ...
none
1
2.097019
2
third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/Xml/CommonXml.py
Fimbure/icebox-1
521
6631076
<gh_stars>100-1000 ## @file # This file is used to parse a PCD file of .PKG file # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distrib...
## @file # This file is used to parse a PCD file of .PKG file # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The full tex...
en
0.63888
## @file # This file is used to parse a PCD file of .PKG file # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The full tex...
1.651989
2
GA_classifier/MLP.py
raj-1411/Deep-Convolutional-Neural-Networks-improvisation-with-applied-Genetic-Algorithm
0
6631077
from sklearn.neural_network import MLPClassifier def model_classif(train_space, val_space): model = MLPClassifier() model.fit(train_space[:,:-1], train_space[:,-1]) val_pred = model.predict(val_space[:,:-1 ]) return val_pred
from sklearn.neural_network import MLPClassifier def model_classif(train_space, val_space): model = MLPClassifier() model.fit(train_space[:,:-1], train_space[:,-1]) val_pred = model.predict(val_space[:,:-1 ]) return val_pred
none
1
3.031672
3
tensorflow/contrib/opt/python/training/lars_optimizer_test.py
uve/tensorflow
0
6631078
<reponame>uve/tensorflow<filename>tensorflow/contrib/opt/python/training/lars_optimizer_test.py # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0. Licensed to the Apache # Software Foundation. You may not use this file except in compliance with the # Li...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0. Licensed to the Apache # Software Foundation. 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...
en
0.804283
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0. Licensed to the Apache # Software Foundation. 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 #...
2.115706
2
medrecords_app/forms.py
davidwrq/medrecords
0
6631079
from django import forms from django.contrib.auth import get_user_model from medrecords_app.models import MedicalRecord User = get_user_model() class MedicalRecordCreationForm(forms.ModelForm): class Meta: model = MedicalRecord fields = "__all__" def __init__(self, *args, **kwargs): ...
from django import forms from django.contrib.auth import get_user_model from medrecords_app.models import MedicalRecord User = get_user_model() class MedicalRecordCreationForm(forms.ModelForm): class Meta: model = MedicalRecord fields = "__all__" def __init__(self, *args, **kwargs): ...
none
1
2.269588
2
junction_manager.py
h3ct0r/junction_detection_occgrid
0
6631080
<reponame>h3ct0r/junction_detection_occgrid #!/usr/bin/env python """ Junction Manager""" from copy import copy import rospy from threading import Lock from nav_msgs.msg import OccupancyGrid import numpy as np import cv2 import time import collections class JunctionManager(object): def __init__(self): s...
#!/usr/bin/env python """ Junction Manager""" from copy import copy import rospy from threading import Lock from nav_msgs.msg import OccupancyGrid import numpy as np import cv2 import time import collections class JunctionManager(object): def __init__(self): self.lock = Lock() self.map_deque = c...
en
0.771274
#!/usr/bin/env python Junction Manager # size of maps to join, default to 1 (not joining anything) # Parameters # Subscribers main entry point check for initial data needed for this node convert nav_msgs/OccupancyGrid to OpenCV mat small noise in the occ grid is removed by thresholding on the ...
2.312369
2
python/sketch1/universe.py
ivukotic/GrayMatter
0
6631081
import random import threading import logging from tkinter import Tk, Label, StringVar, BOTTOM from brain import Brain from code import Code from environment import Environment from vizualize import platno import configuration as conf logging.basicConfig(level=logging.DEBUG, format='(%(threadName)-10s) %(message)s',...
import random import threading import logging from tkinter import Tk, Label, StringVar, BOTTOM from brain import Brain from code import Code from environment import Environment from vizualize import platno import configuration as conf logging.basicConfig(level=logging.DEBUG, format='(%(threadName)-10s) %(message)s',...
en
0.62539
# these two events start/restart brain threads processing. # wait until all brains delivered tick result. # logging.debug('do actual collection') # b.prnt() # print('pos:', nx, ny, 'direct:', dx, dy, 'reward:', reward, view)
2.93566
3
test_api/WPM_OMRI.py
loucif/mcdm-cv
0
6631082
<reponame>loucif/mcdm-cv<filename>test_api/WPM_OMRI.py # Filename: wpm_OMRI.py # Description: wpm_OMRI method from numpy import * import BWM import timeit from normalisation_fuc import omri_normalisation # Step 1+2: normalise and compute the values S_i def wpm_omri(D, w, ab): """ D is the matrix of t...
# Filename: wpm_OMRI.py # Description: wpm_OMRI method from numpy import * import BWM import timeit from normalisation_fuc import omri_normalisation # Step 1+2: normalise and compute the values S_i def wpm_omri(D, w, ab): """ D is the matrix of the population, w is the criteria's weights arr...
en
0.699414
# Filename: wpm_OMRI.py # Description: wpm_OMRI method # Step 1+2: normalise and compute the values S_i D is the matrix of the population, w is the criteria's weights array p is the criteria min/max values, #calculate normalised dataset # calculate fij and sum wj*fij
3.082231
3
postgresqleu/util/management/commands/check_messaging_integrations.py
bradfordboyle/pgeu-system
11
6631083
<reponame>bradfordboyle/pgeu-system # # Script to (optionally) validate all messaging integrations # # This can include for example checking that webhooks are still existing, # and marked as valid. Actual implementation depends on the messaging provider. # from django.core.management.base import BaseCommand import d...
# # Script to (optionally) validate all messaging integrations # # This can include for example checking that webhooks are still existing, # and marked as valid. Actual implementation depends on the messaging provider. # from django.core.management.base import BaseCommand import datetime import io import sys from co...
en
0.87929
# # Script to (optionally) validate all messaging integrations # # This can include for example checking that webhooks are still existing, # and marked as valid. Actual implementation depends on the messaging provider. #
2.125007
2
Adafruit_Python_MAX31855/setup.py
wadooddaoud/Gast_Iot_Sensor_Development
41
6631084
<filename>Adafruit_Python_MAX31855/setup.py<gh_stars>10-100 try: # Try using ez_setup to install setuptools if not already installed. from ez_setup import use_setuptools use_setuptools() except ImportError: # Ignore import error and assume Python 3 which already has setuptools. pass from setuptools...
<filename>Adafruit_Python_MAX31855/setup.py<gh_stars>10-100 try: # Try using ez_setup to install setuptools if not already installed. from ez_setup import use_setuptools use_setuptools() except ImportError: # Ignore import error and assume Python 3 which already has setuptools. pass from setuptools...
en
0.789815
# Try using ez_setup to install setuptools if not already installed. # Ignore import error and assume Python 3 which already has setuptools. #egg=Adafruit-GPIO-0.6.5'],
1.786969
2
ietf/stats/resources.py
ekr/ietfdb
2
6631085
# Autogenerated by the makeresources management command 2017-02-15 10:10 PST from tastypie.resources import ModelResource from tastypie.fields import ToManyField # pyflakes:ignore from tastypie.constants import ALL, ALL_WITH_RELATIONS # pyflakes:ignore from tastypie.cache import SimpleCache from ietf ...
# Autogenerated by the makeresources management command 2017-02-15 10:10 PST from tastypie.resources import ModelResource from tastypie.fields import ToManyField # pyflakes:ignore from tastypie.constants import ALL, ALL_WITH_RELATIONS # pyflakes:ignore from tastypie.cache import SimpleCache from ietf ...
en
0.541816
# Autogenerated by the makeresources management command 2017-02-15 10:10 PST # pyflakes:ignore # pyflakes:ignore # pyflakes:ignore #resource_name = 'countryalias' #resource_name = 'affiliationignoredending' #resource_name = 'affiliationalias' #resource_name = 'meetingregistration'
1.869038
2
solver/solver_basic.py
cyclone923/sokoban_pygame
0
6631086
from game.logic import FLOOR, WALL, WORKER_ON_FLOOR, DOCK, BOX_ON_DOCK, BOX, WORKER_ON_DOCK from collections import namedtuple class SokobanSolverBasic(object): def __init__(self, map): self.walls = set() self.playabel = set() self.docks = set() self.init_boxes_loc = set() s...
from game.logic import FLOOR, WALL, WORKER_ON_FLOOR, DOCK, BOX_ON_DOCK, BOX, WORKER_ON_DOCK from collections import namedtuple class SokobanSolverBasic(object): def __init__(self, map): self.walls = set() self.playabel = set() self.docks = set() self.init_boxes_loc = set() s...
none
1
3.077729
3
scripts/addons/mouselook_navigation/dairin0d/utils_arrangement.py
Tilapiatsu/blender-custom_conf
2
6631087
<filename>scripts/addons/mouselook_navigation/dairin0d/utils_arrangement.py # ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
<filename>scripts/addons/mouselook_navigation/dairin0d/utils_arrangement.py # ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
en
0.806342
# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distri...
1.962651
2
PaddleCV/rcnn/models/model_builder.py
suoych/models
0
6631088
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # #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...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # #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...
en
0.8189
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # #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...
1.971057
2
scripts/util/system_util.py
tksharpless/facebook360_dep
6
6631089
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """General systems utility used across all scripts. Defines functions for abstracting away command line inte...
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """General systems utility used across all scripts. Defines functions for abstracting away command line inte...
en
0.764277
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. General systems utility used across all scripts. Defines functions for abstracting away command line interface...
2.490849
2
blobxfer/models/metadata.py
amishra-dev/blobxfer
147
6631090
# Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT 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 limitation # the rights...
# Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT 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 limitation # the rights...
en
0.571934
# Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT 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 limitation # the rights...
1.379315
1
splatter.py
anana10c/handtracking
0
6631091
import cv2 import random # from threading import Timer class Splatter: def __init__(self, topleft, bottomright, color=None): imgnum = str(random.randint(1,8)) self.outline = cv2.imread(str('splatter-'+imgnum+'.png'), -1) self.outline = cv2.resize(self.outline, (bottomright[0]-topleft[0], b...
import cv2 import random # from threading import Timer class Splatter: def __init__(self, topleft, bottomright, color=None): imgnum = str(random.randint(1,8)) self.outline = cv2.imread(str('splatter-'+imgnum+'.png'), -1) self.outline = cv2.resize(self.outline, (bottomright[0]-topleft[0], b...
en
0.748877
# from threading import Timer #remember to try to convert frame to RGBA also #self.outline[self.outline[:, :, 3] >= 4] -= 4
2.804884
3
safedelete/tests/test_admin.py
makinacorpus/django-safedelete
505
6631092
<reponame>makinacorpus/django-safedelete # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.admin.views.main import ChangeList from django.contrib.auth.models import User from django.db import models from...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.admin.views.main import ChangeList from django.contrib.auth.models import User from django.db import models from django.test import RequestFactory, TestC...
en
0.915921
# -*- coding: utf-8 -*- # New parameter in Django 2.1 Test deleted objects are in red in admin listing. Test whether admin XSS is blocked. # It should be escaped Test objects are undeleted and action is logged.
2.015605
2
addons/hr_payroll_community/models/res_config_settings.py
gleis44/stellwerk
0
6631093
# -*- coding: utf-8 -*- from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' module_account_accountant = fields.Boolean(string='Account Accountant') module_l10n_fr_hr_payroll = fields.Boolean(string='French Payroll') module_l10n_be_hr_payro...
# -*- coding: utf-8 -*- from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' module_account_accountant = fields.Boolean(string='Account Accountant') module_l10n_fr_hr_payroll = fields.Boolean(string='French Payroll') module_l10n_be_hr_payro...
en
0.769321
# -*- coding: utf-8 -*-
1.818124
2
src/three_pl/three_pl_utils.py
eribean/girth
43
6631094
<reponame>eribean/girth import numpy as np def _compute_partial_integral_3pl(theta, difficulty, discrimination, guessing, the_sign): """ Computes the partial integral for a set of item parameters Args: theta: (array) evaluation points difficulty: (array) set of difficulty parameters ...
import numpy as np def _compute_partial_integral_3pl(theta, difficulty, discrimination, guessing, the_sign): """ Computes the partial integral for a set of item parameters Args: theta: (array) evaluation points difficulty: (array) set of difficulty parameters discrimination: (arra...
en
0.67136
Computes the partial integral for a set of item parameters Args: theta: (array) evaluation points difficulty: (array) set of difficulty parameters discrimination: (array | number) set of discrimination parameters guessing: (array) set of guessing parameters the_sign: (array...
3.627983
4
setup.py
google/weather-tools
66
6631095
<filename>setup.py # Copyright 2021 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 agr...
<filename>setup.py # Copyright 2021 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 agr...
en
0.807871
# Copyright 2021 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, ...
1.193037
1
lesson4/pract2.py
anhellina/lessons
0
6631096
""" Написать программу, которая выведет на экран все числа от 1 до 100 которые кратные n (n вводится с клавиатуры). """ n = int(input("Enter number")) for x in range(1,101): if x% n == 0: print(x)
""" Написать программу, которая выведет на экран все числа от 1 до 100 которые кратные n (n вводится с клавиатуры). """ n = int(input("Enter number")) for x in range(1,101): if x% n == 0: print(x)
ru
0.997745
Написать программу, которая выведет на экран все числа от 1 до 100 которые кратные n (n вводится с клавиатуры).
3.777406
4
Audio/StarGAN-VC/utils/preprocess.py
LiuHaolan/models
43
6631097
<filename>Audio/StarGAN-VC/utils/preprocess.py import os import glob import shutil import argparse import zipfile from datetime import datetime import librosa import numpy as np import pyworld FEATURE_DIM = 36 SAMPLE_RATE = 16000 FRAMES = 512 FFTSIZE = 1024 CHUNK_SIZE = 1 EPSILON = 1e-10 MODEL_NAME = "starganvc_mode...
<filename>Audio/StarGAN-VC/utils/preprocess.py import os import glob import shutil import argparse import zipfile from datetime import datetime import librosa import numpy as np import pyworld FEATURE_DIM = 36 SAMPLE_RATE = 16000 FRAMES = 512 FFTSIZE = 1024 CHUNK_SIZE = 1 EPSILON = 1e-10 MODEL_NAME = "starganvc_mode...
en
0.733613
data dict contains all audios file path & resdict contains all wav files Yield successive n-sized chunks from iterable. convert wavs to mcep feature using image repr # concate wavs # process one batch of wavs # split mcep t0 muliti files cal mcep given wav singnal the frame_period used only for pad_wav_to_g...
2.360999
2
nyuki/workflow/db/metadata.py
surycat/nyuki-legacy
8
6631098
<reponame>surycat/nyuki-legacy import logging from pymongo import ReturnDocument from .utils.indexes import check_index_names log = logging.getLogger(__name__) class MetadataCollection: """ { "workflow_template_id": <uuid4>, "title": <str>, "tags": [<str>] } """ def _...
import logging from pymongo import ReturnDocument from .utils.indexes import check_index_names log = logging.getLogger(__name__) class MetadataCollection: """ { "workflow_template_id": <uuid4>, "title": <str>, "tags": [<str>] } """ def __init__(self, db): self...
en
0.134314
{ "workflow_template_id": <uuid4>, "title": <str>, "tags": [<str>] } Return metadata for one template. Insert new metadata for a template. Update and return the updated metadata. Delete metadata for one template.
2.431939
2
codes_/0101_Symmetric_Tree.py
SaitoTsutomu/leetcode
0
6631099
<gh_stars>0 # %% [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) class Solution: def isSymmetric(self, root: TreeNode) -> bool: return isSymmetric(root, root) def isSymmetric(left, right): if left and right: return ( left.val == right.val and isSymm...
# %% [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) class Solution: def isSymmetric(self, root: TreeNode) -> bool: return isSymmetric(root, root) def isSymmetric(left, right): if left and right: return ( left.val == right.val and isSymmetric(left.l...
en
0.707448
# %% [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)
3.775927
4
test/functional/s3api/__init__.py
fossabot/swift-1
1
6631100
<gh_stars>1-10 # Copyright (c) 2011-2014 OpenStack Foundation. # # 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...
# Copyright (c) 2011-2014 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
en
0.782809
# Copyright (c) 2011-2014 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
1.883843
2
format.py
cobhan/python-problems
0
6631101
<reponame>cobhan/python-problems for i in range(1,11): print('{:2d} {:3d} {:4d} {:5d}'.format(i, i**2, i**3, i**4)) a = 5 print(f"The value of a is {a} and a+1 is {a+1}.") for i in range(1,11): print(f'{i} {i**2} {i**3} {i**4}')
for i in range(1,11): print('{:2d} {:3d} {:4d} {:5d}'.format(i, i**2, i**3, i**4)) a = 5 print(f"The value of a is {a} and a+1 is {a+1}.") for i in range(1,11): print(f'{i} {i**2} {i**3} {i**4}')
none
1
4.020288
4
apps/admin/urls.py
x-utest/server-api
20
6631102
<filename>apps/admin/urls.py """ 运管和超管后台 主要包含的功能: 1. 注册用户的查看 2. 各种活动日志 """ from apps.admin.handlers import * from dtlib import filetool app_path = filetool.get_parent_folder_name(__file__) # set the relative path in one place url = [ # 用户信息 # (r"/%s/get-all-user-info/" % app_path, ListUserInfo), # 获取所有的注...
<filename>apps/admin/urls.py """ 运管和超管后台 主要包含的功能: 1. 注册用户的查看 2. 各种活动日志 """ from apps.admin.handlers import * from dtlib import filetool app_path = filetool.get_parent_folder_name(__file__) # set the relative path in one place url = [ # 用户信息 # (r"/%s/get-all-user-info/" % app_path, ListUserInfo), # 获取所有的注...
zh
0.651349
运管和超管后台 主要包含的功能: 1. 注册用户的查看 2. 各种活动日志 # set the relative path in one place # 用户信息 # (r"/%s/get-all-user-info/" % app_path, ListUserInfo), # 获取所有的注册用户的基本信息 # (r"/%s/delete-user/" % app_path, DeleteUser), # 删除用户 # (r"/%s/online-user/" % app_path, OnlineUser), # 在线用户 # (r"/%s/get-user-counts/" % app_path, GetUserCoun...
2.213818
2
code/python_call_screening/python_call_screening.py
niravcodes/signalwire-guides
10
6631103
from flask import Flask, request from signalwire.voice_response import VoiceResponse import os app = Flask(__name__) def get_blocklist(): # there is a default here you can change if you don't want to use the environment variable return os.getenv('BLOCKLIST', '+1555778899').split(',') @app.route('/check', ...
from flask import Flask, request from signalwire.voice_response import VoiceResponse import os app = Flask(__name__) def get_blocklist(): # there is a default here you can change if you don't want to use the environment variable return os.getenv('BLOCKLIST', '+1555778899').split(',') @app.route('/check', ...
en
0.930185
# there is a default here you can change if you don't want to use the environment variable
2.356086
2
libqtile/backend/wayland/wlrq.py
duxedo/qtile
1
6631104
<filename>libqtile/backend/wayland/wlrq.py<gh_stars>1-10 # Copyright (c) 2021 <NAME> # # 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 ri...
<filename>libqtile/backend/wayland/wlrq.py<gh_stars>1-10 # Copyright (c) 2021 <NAME> # # 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 ri...
en
0.788455
# Copyright (c) 2021 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
1.389336
1
research_mnist/mnist_visualization_pca.py
Gaon-Choi/CSE4007
0
6631105
<filename>research_mnist/mnist_visualization_pca.py import matplotlib.pyplot as plt import sklearn.linear_model import sklearn.discriminant_analysis import sklearn.svm import sklearn.neighbors import sklearn.neural_network from sklearn import datasets from sklearn.model_selection import train_test_split import numpy a...
<filename>research_mnist/mnist_visualization_pca.py import matplotlib.pyplot as plt import sklearn.linear_model import sklearn.discriminant_analysis import sklearn.svm import sklearn.neighbors import sklearn.neural_network from sklearn import datasets from sklearn.model_selection import train_test_split import numpy a...
en
0.472941
# flatten the images
3.140311
3
table2json/management/commands/csv.py
amoghmadan/Table2JSON
4
6631106
<reponame>amoghmadan/Table2JSON from pandas import read_csv from table2json.management import Table2JSONBaseCommand class Command(Table2JSONBaseCommand): """CSV Command""" help = "Read from XSV write to JSON" def add_command_arguments(self, parser): """Add Arguments for CSV Command""" ...
from pandas import read_csv from table2json.management import Table2JSONBaseCommand class Command(Table2JSONBaseCommand): """CSV Command""" help = "Read from XSV write to JSON" def add_command_arguments(self, parser): """Add Arguments for CSV Command""" parser.add_argument("path", type...
en
0.457989
CSV Command Add Arguments for CSV Command CSV Handling Logic
3.238709
3
initiative/ui/stat_display/stat_display_form.py
nicjohnson145/initiative
0
6631107
import curses import npyscreen from initiative.ui.stat_display.grid_box import GridBox BUTTON_COLUMNS = 4 BOX_HEIGHT = 6 ENTRY_HEIGHT = BOX_HEIGHT - 2 class StatDisplay(npyscreen.ActionFormMinimal): def create(self): self.add_handlers({ 'q': lambda *args: self.parentApp.switchFormPrevious(...
import curses import npyscreen from initiative.ui.stat_display.grid_box import GridBox BUTTON_COLUMNS = 4 BOX_HEIGHT = 6 ENTRY_HEIGHT = BOX_HEIGHT - 2 class StatDisplay(npyscreen.ActionFormMinimal): def create(self): self.add_handlers({ 'q': lambda *args: self.parentApp.switchFormPrevious(...
none
1
2.453535
2
Day 21 Classes and Objects/classes.py
Sumanth-Talluri/30-Days-Of-Python
3
6631108
<reponame>Sumanth-Talluri/30-Days-Of-Python class Statistics: def __init__(self, lst): self.lst = lst def count(self): return len(self.lst) def sum(self): total = 0 for item in self.lst: total += item return total def min(self): minn = self...
class Statistics: def __init__(self, lst): self.lst = lst def count(self): return len(self.lst) def sum(self): total = 0 for item in self.lst: total += item return total def min(self): minn = self.lst[0] for item in self.lst: ...
none
1
3.325228
3
bin/Packager/DesktopEntry.py
C-EO/craft
55
6631109
# -*- coding: utf-8 -*- # Copyright <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the fol...
# -*- coding: utf-8 -*- # Copyright <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the fol...
en
0.674979
# -*- coding: utf-8 -*- # Copyright <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the fol...
1.309969
1
core/domain/wipeout_domain_test.py
jlau323/oppia
2
6631110
<gh_stars>1-10 # coding: utf-8 # # Copyright 2018 The Oppia 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 #...
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
en
0.773291
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
1.866051
2
base/src/shallowflow/base/help/_Markdown.py
waikato-datamining/shallow-flow
0
6631111
<filename>base/src/shallowflow/base/help/_Markdown.py from shallowflow.api.config import Option from shallowflow.api.help import AbstractHelpGenerator class Markdown(AbstractHelpGenerator): """ Generates help in plain text format. """ def file_extension(self): """ Returns the preferre...
<filename>base/src/shallowflow/base/help/_Markdown.py from shallowflow.api.config import Option from shallowflow.api.help import AbstractHelpGenerator class Markdown(AbstractHelpGenerator): """ Generates help in plain text format. """ def file_extension(self): """ Returns the preferre...
en
0.485185
Generates help in plain text format. Returns the preferred file extension. :return: the file extension (incl dot) :rtype: str Indents the lines in the string. :param s: the string to indent :type s: str :param num: the number of spaces to use for indentation :type num: ...
2.818697
3
backend/api/db/models/__init__.py
kkevinn114/Yacht
0
6631112
<reponame>kkevinn114/Yacht<filename>backend/api/db/models/__init__.py<gh_stars>0 from .containers import *
from .containers import *
none
1
1.194881
1
fd.py
buhuhaha/python
0
6631113
import cv2 face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') img = cv2.imread('IMG_0711.JPG') faces = face_cascade.detectMultiScale(img, 1.1, 4) for (x, y, w, h) in faces: cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 0), 2) cv2.imwrite("face_detected.png", img) print('Successfully s...
import cv2 face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') img = cv2.imread('IMG_0711.JPG') faces = face_cascade.detectMultiScale(img, 1.1, 4) for (x, y, w, h) in faces: cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 0), 2) cv2.imwrite("face_detected.png", img) print('Successfully s...
none
1
2.884437
3
openstackclient/volume/v3/volume_group.py
mydevice/python-openstackclient
262
6631114
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
en
0.738849
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
1.949013
2
healpy/tutorial/pbpbUCC/rapidity08_uccData_power_spectrum.py
tuos/FlowAndCorrelations
0
6631115
<reponame>tuos/FlowAndCorrelations import healpy as hp import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.colors import LogNorm # Set the number of sources and the coordinates for the input #nsources = int(2664001) #nsources = int(3149) nsources = int(1268174) nside = 64 npix...
import healpy as hp import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.colors import LogNorm # Set the number of sources and the coordinates for the input #nsources = int(2664001) #nsources = int(3149) nsources = int(1268174) nside = 64 npix = hp.nside2npix(nside) # npix= 12...
en
0.365461
# Set the number of sources and the coordinates for the input #nsources = int(2664001) #nsources = int(3149) # npix= 12*nside^2 # Coordinates and the density field f #thetas = np.random.random(nsources) * np.pi #phis = np.random.random(nsources) * np.pi * 2. #print (lines[1].split()[1]) #if(thetas[0]<0 or thetas[0]>3.1...
2.19469
2
pyearcal/l10n/italian.py
janpipek/pyearcal
3
6631116
# -*- coding: utf-8 -*- from .default import DefaultLocale from dateutil.easter import easter from datetime import date, timedelta import calendar class ItalianLocale(DefaultLocale): """Italian variant of the calendar. Includes holiday both national and local. Specify province or city (by its Italian nam...
# -*- coding: utf-8 -*- from .default import DefaultLocale from dateutil.easter import easter from datetime import date, timedelta import calendar class ItalianLocale(DefaultLocale): """Italian variant of the calendar. Includes holiday both national and local. Specify province or city (by its Italian nam...
en
0.683224
# -*- coding: utf-8 -*- Italian variant of the calendar. Includes holiday both national and local. Specify province or city (by its Italian name) in the constructor if needed. Local holidays are included for the following: **Cities:** Bari, Bologna, Cagliari, Firenze, Genova, Milano, Napol...
3.612832
4
height_map/cci_water_bodies_v4.py
jaluebbe/HeightMap
5
6631117
import os from height_map.geotiff_handler import GeoTiffHandler class WaterBodies: attribution_url = 'https://www.mdpi.com/2072-4292/9/1/36' attribution_name = 'CCI Water Bodies v4.0' attribution = '&copy <a href="{}">{}</a>'.format(attribution_url, attribution_name) def __init__(self, path=...
import os from height_map.geotiff_handler import GeoTiffHandler class WaterBodies: attribution_url = 'https://www.mdpi.com/2072-4292/9/1/36' attribution_name = 'CCI Water Bodies v4.0' attribution = '&copy <a href="{}">{}</a>'.format(attribution_url, attribution_name) def __init__(self, path=...
none
1
2.814025
3
bashhub/model/command_form.py
rationalthinker1/bashhub-client
1
6631118
from time import * import uuid from serializable import Serializable class CommandForm(Serializable): def __init__(self, command, path, exit_status, process_id, process_start_time): self.uuid = uuid.uuid4().__str__() self.command = command self.path = path self.exi...
from time import * import uuid from serializable import Serializable class CommandForm(Serializable): def __init__(self, command, path, exit_status, process_id, process_start_time): self.uuid = uuid.uuid4().__str__() self.command = command self.path = path self.exi...
none
1
2.653652
3
iucn_sim/transition_rates.py
tobiashofmann88/iucn_extinction_simulator
11
6631119
<reponame>tobiashofmann88/iucn_extinction_simulator #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ MCMC-estimation of status transition rates from IUCN record Created on Mon Oct 28 14:43:44 2019 @author: <NAME> (<EMAIL>) """ import iucn_sim.iucn_sim as iucn_sim def add_arguments(parser): parser.add_argument...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ MCMC-estimation of status transition rates from IUCN record Created on Mon Oct 28 14:43:44 2019 @author: <NAME> (<EMAIL>) """ import iucn_sim.iucn_sim as iucn_sim def add_arguments(parser): parser.add_argument( '--species_data', required=True, ...
en
0.704743
#!/usr/bin/env python3 # -*- coding: utf-8 -*- MCMC-estimation of status transition rates from IUCN record Created on Mon Oct 28 14:43:44 2019 @author: <NAME> (<EMAIL>) # the load_from_file option should always be true when run from command line, but can be turned off when running from R or python
2.648878
3
0x04-python-more_data_structures/3-common_elements.py
Nahi-Terefe/alx-higher_level_programming
0
6631120
#!/usr/bin/python3 def common_elements(set_1, set_2): first_list = set(set_1) sec_list = set(set_2) final_list = first_list & sec_list return final_list
#!/usr/bin/python3 def common_elements(set_1, set_2): first_list = set(set_1) sec_list = set(set_2) final_list = first_list & sec_list return final_list
fr
0.386793
#!/usr/bin/python3
2.967803
3
npz2npz4custom_load.py
k5iogura/YOLOv2-chainer
0
6631121
#! /usr/bin/env python3 # encoding: utf-8 import sys, os import argparse import numpy as np import chainer import chainer.links as L from chainer import serializers from yolov2 import YOLOv2, load_npz def statistics(ndarray): ndarray_ = ndarray.reshape(-1) return np.std(ndarray_), np.mean(ndarray_), np.max(nda...
#! /usr/bin/env python3 # encoding: utf-8 import sys, os import argparse import numpy as np import chainer import chainer.links as L from chainer import serializers from yolov2 import YOLOv2, load_npz def statistics(ndarray): ndarray_ = ndarray.reshape(-1) return np.std(ndarray_), np.mean(ndarray_), np.max(nda...
en
0.183633
#! /usr/bin/env python3 # encoding: utf-8 #x = np.zeros((1, 3, 416, 416), dtype=np.float32)
2.67378
3
src/assets/data_example/sync.py
studiorvandco/Website
0
6631122
<filename>src/assets/data_example/sync.py<gh_stars>0 import os import requests import json # Crontab command # */10 * * * * python3 /path/to/sync.py >/dev/null 2>&1 # Script path __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) # --- Get statistics --- statistics = requests.get("...
<filename>src/assets/data_example/sync.py<gh_stars>0 import os import requests import json # Crontab command # */10 * * * * python3 /path/to/sync.py >/dev/null 2>&1 # Script path __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) # --- Get statistics --- statistics = requests.get("...
en
0.380445
# Crontab command # */10 * * * * python3 /path/to/sync.py >/dev/null 2>&1 # Script path # --- Get statistics --- ########################" + #######################################").json() # --- Get content creators --- ########################" + #######################################").json() ######################...
2.550011
3
3d/upload.py
selipe/Flask-Miguel-Safari
151
6631123
<reponame>selipe/Flask-Miguel-Safari import os import imghdr from flask import Flask, render_template from flask.ext.bootstrap import Bootstrap from flask.ext.wtf import Form from wtforms import FileField, SubmitField, ValidationError app = Flask(__name__) app.config['SECRET_KEY'] = 'top secret!' bootstrap = Bootstrap...
import os import imghdr from flask import Flask, render_template from flask.ext.bootstrap import Bootstrap from flask.ext.wtf import Form from wtforms import FileField, SubmitField, ValidationError app = Flask(__name__) app.config['SECRET_KEY'] = 'top secret!' bootstrap = Bootstrap(app) class UploadForm(Form): i...
none
1
2.658594
3
src/python/pants/init/target_roots.py
lahosken/pants
1
6631124
<filename>src/python/pants/init/target_roots.py<gh_stars>1-10 # coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
<filename>src/python/pants/init/target_roots.py<gh_stars>1-10 # coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
en
0.654548
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). Raised when invalid constraints are given via target specs and arguments like --changed*. Determines the target roots for a given pants run. Parse string specs into unique `S...
2.274674
2
adafruit_as7341.py
jposada202020/Adafruit_CircuitPython_AS7341
0
6631125
# SPDX-FileCopyrightText: 2017 <NAME>, written for Adafruit Industries # SPDX-FileCopyrightText: Copyright (c) 2020 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_as7341` ================================================================================ CircuitPython library for use with t...
# SPDX-FileCopyrightText: 2017 <NAME>, written for Adafruit Industries # SPDX-FileCopyrightText: Copyright (c) 2020 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_as7341` ================================================================================ CircuitPython library for use with t...
en
0.705871
# SPDX-FileCopyrightText: 2017 <NAME>, written for Adafruit Industries # SPDX-FileCopyrightText: Copyright (c) 2020 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT `adafruit_as7341` ================================================================================ CircuitPython library for use with the A...
1.807199
2
test/selenium/src/lib/page/modal/create_new_object.py
Smotko/ggrc-core
0
6631126
<reponame>Smotko/ggrc-core<filename>test/selenium/src/lib/page/modal/create_new_object.py # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: <EMAIL> # Maintained By: <EMAIL> """Models for LHN modals...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: <EMAIL> # Maintained By: <EMAIL> """Models for LHN modals when creating new objects""" from lib.page.modal import base class Programs(base.Progr...
en
0.833313
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: <EMAIL> # Maintained By: <EMAIL> Models for LHN modals when creating new objects Class representing a program modal Class representing a control mod...
2.166251
2
tests/swagger20_validator/type_validator_test.py
Timothyyung/bravado-opt-usfca
0
6631127
<reponame>Timothyyung/bravado-opt-usfca # -*- coding: utf-8 -*- from mock import patch from bravado_core.swagger20_validator import type_validator @patch('jsonschema._validators.type_draft4') def test_skip_when_validating_a_parameter_schema_and_parameter_value_is_None( m_draft4_type_validator, minimal_swagge...
# -*- coding: utf-8 -*- from mock import patch from bravado_core.swagger20_validator import type_validator @patch('jsonschema._validators.type_draft4') def test_skip_when_validating_a_parameter_schema_and_parameter_value_is_None( m_draft4_type_validator, minimal_swagger_spec): param_schema = {'name': 'fo...
en
0.087398
# -*- coding: utf-8 -*- # parameter value # property value
2.064494
2
CTFd/plugins/ctfd-owl/frp_utils.py
Lz1y/H1ve
1
6631128
import requests from .db_utils import DBUtils from .models import DynamicCheckChallenge class FrpUtils: @staticmethod def update_frp_redirect(): configs = DBUtils.get_all_configs() containers = DBUtils.get_all_alive_container() # frps config output = configs.get("frpc_config_...
import requests from .db_utils import DBUtils from .models import DynamicCheckChallenge class FrpUtils: @staticmethod def update_frp_redirect(): configs = DBUtils.get_all_configs() containers = DBUtils.get_all_alive_container() # frps config output = configs.get("frpc_config_...
en
0.131014
# frps config # print(output)
2.1675
2
tests/test_core.py
abersheeran/asgi-ratelim
1
6631129
import httpx import pytest from ratelimit import RateLimitMiddleware, Rule from ratelimit.auths import EmptyInformation from ratelimit.backends.redis import RedisBackend from ratelimit.types import Receive, Scope, Send async def hello_world(scope, receive, send): assert scope["type"] == "http" await send( ...
import httpx import pytest from ratelimit import RateLimitMiddleware, Rule from ratelimit.auths import EmptyInformation from ratelimit.backends.redis import RedisBackend from ratelimit.types import Receive, Scope, Send async def hello_world(scope, receive, send): assert scope["type"] == "http" await send( ...
en
0.356766
# type: bytes, bytes # type: httpx.AsyncClient # No headers result in EmptyInformation # Raise the right exception # type: httpx.AsyncClient # type: httpx.AsyncClient # type: httpx.AsyncClient
2.321676
2
prometheus.py
M4RC02U1F4A4/LOG-Discord
0
6631130
<gh_stars>0 import os import discord from dotenv import load_dotenv import datetime from prometheus_client import Gauge from prometheus_client import Counter from prometheus_client import start_http_server load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') GUILD = os.getenv('DISCORD_GUILD_NAME') bot = discord.Client() ...
import os import discord from dotenv import load_dotenv import datetime from prometheus_client import Gauge from prometheus_client import Counter from prometheus_client import start_http_server load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') GUILD = os.getenv('DISCORD_GUILD_NAME') bot = discord.Client() @bot.event a...
none
1
2.3791
2
muranodashboard/common/fields.py
sbrf-clouddev/murano-dashboard
37
6631131
# 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...
# 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...
en
0.872656
# 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...
2.32647
2
pypy/module/pypyjit/test/test_jit_not_in_trace.py
nanjekyejoannah/pypy
381
6631132
class AppTestJitNotInTrace(object): spaceconfig = dict(usemodules=('pypyjit',)) def test_not_from_assembler(self): import pypyjit @pypyjit.not_from_assembler def f(x, y): return 42 r = f(3, 4) assert r is f def test_not_from_assembler_exception(self): ...
class AppTestJitNotInTrace(object): spaceconfig = dict(usemodules=('pypyjit',)) def test_not_from_assembler(self): import pypyjit @pypyjit.not_from_assembler def f(x, y): return 42 r = f(3, 4) assert r is f def test_not_from_assembler_exception(self): ...
none
1
2.367831
2
source/core-api/custom_resources/initialize_state.py
aws-solutions/aws-virtual-waiting-room
30
6631133
<filename>source/core-api/custom_resources/initialize_state.py<gh_stars>10-100 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ This module is the custom resource used to intialize the various counters used by the core API. It also redeploys the public and ...
<filename>source/core-api/custom_resources/initialize_state.py<gh_stars>10-100 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ This module is the custom resource used to intialize the various counters used by the core API. It also redeploys the public and ...
en
0.903725
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 This module is the custom resource used to intialize the various counters used by the core API. It also redeploys the public and private APIs whenever there's an update. # connection info and other globals This fu...
2.335431
2
setup.py
docloud/luna.sso
0
6631134
#!/usr/bin/env python from setuptools import setup, find_packages entry_points = [ ] setup( name='luna.sso', version='0.0.1', description='Luna Project', url='http://github.com/luna/luna', include_package_data=True, packages=find_packages(), entry_points={"console_scripts": entry_points},...
#!/usr/bin/env python from setuptools import setup, find_packages entry_points = [ ] setup( name='luna.sso', version='0.0.1', description='Luna Project', url='http://github.com/luna/luna', include_package_data=True, packages=find_packages(), entry_points={"console_scripts": entry_points},...
en
0.201281
#!/usr/bin/env python # package_data={'folder': ['']},
1.111567
1
tests/common/bridgecrew/vulnerability_scanning/integrations/test_package_scanning.py
pmalkki/checkov
1
6631135
<gh_stars>1-10 import os from pathlib import Path import pytest from aioresponses import aioresponses from pytest_mock import MockerFixture from checkov.common.bridgecrew.vulnerability_scanning.integrations.package_scanning import package_scanning_integration def get_report_url() -> str: base_url = "https://www...
import os from pathlib import Path import pytest from aioresponses import aioresponses from pytest_mock import MockerFixture from checkov.common.bridgecrew.vulnerability_scanning.integrations.package_scanning import package_scanning_integration def get_report_url() -> str: base_url = "https://www.bridgecrew.clo...
en
0.245449
# given # when # then # given # when # then # given # when # then
2.189933
2
openprocurement/auction/texas/event_source.py
OrysiaDrabych/openprocurement.auction.texas
0
6631136
<gh_stars>0 from sse import Sse as PySse from gevent.queue import Queue from flask import ( current_app, Blueprint, request, session, Response, jsonify, abort ) from openprocurement.auction.event_source import ( send_event_to_client, send_event, SseStream ) from openprocurement.auction.utils import ( pr...
from sse import Sse as PySse from gevent.queue import Queue from flask import ( current_app, Blueprint, request, session, Response, jsonify, abort ) from openprocurement.auction.event_source import ( send_event_to_client, send_event, SseStream ) from openprocurement.auction.utils import ( prepare_extra_...
none
1
2.111104
2
tfx/tools/cli/container_builder/builder.py
Anon-Artist/tfx
3
6631137
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
en
0.806617
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
1.946285
2
4_test_tpe.py
g00nsquad/face-identification-tpe
245
6631138
import json import matplotlib.pyplot as plt import numpy as np from bottleneck import Bottleneck from cnn import build_cnn from identification import get_scores, calc_metrics from tpe import build_tpe n_in = 256 n_out = 256 with open('data/meta.json', 'r') as f: meta = json.load(f) cnn = build_cnn(227, meta['n...
import json import matplotlib.pyplot as plt import numpy as np from bottleneck import Bottleneck from cnn import build_cnn from identification import get_scores, calc_metrics from tpe import build_tpe n_in = 256 n_out = 256 with open('data/meta.json', 'r') as f: meta = json.load(f) cnn = build_cnn(227, meta['n...
none
1
2.309342
2
tf_external/__init__.py
allez-allez-allez/terraform-external-file-cache
0
6631139
# -*- coding: utf-8 -*- """Provides wrapper implementing the terraform external interface.""" from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import json class TfExternal(object): """Wrap Terraform External provider.""" @staticmeth...
# -*- coding: utf-8 -*- """Provides wrapper implementing the terraform external interface.""" from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import json class TfExternal(object): """Wrap Terraform External provider.""" @staticmeth...
en
0.522363
# -*- coding: utf-8 -*- Provides wrapper implementing the terraform external interface. Wrap Terraform External provider. Load json object from stdin. Print result to stdout.
2.162975
2
mvpd/MVPD_L2_LR.py
sccnlab/PyMVPD
6
6631140
# MVPD - Regularized (L2) Linear Regression Model import os import numpy as np import nibabel as nib import itertools as it from mvpd.dataloader.loader_regression import ROI_Dataset from mvpd.func_regression.L2_LR import L2_LR from mvpd.evaluation import var_expl from mvpd.viz import viz_map def run_L2_LR(model_type, ...
# MVPD - Regularized (L2) Linear Regression Model import os import numpy as np import nibabel as nib import itertools as it from mvpd.dataloader.loader_regression import ROI_Dataset from mvpd.func_regression.L2_LR import L2_LR from mvpd.evaluation import var_expl from mvpd.viz import viz_map def run_L2_LR(model_type, ...
en
0.64219
# MVPD - Regularized (L2) Linear Regression Model # create output folder if not exists # Load functioanl data and ROI masks # Training # Testing # L2 Regularized Linear Regression Model # Evaluation: variance explained # Visualization
2.423099
2
src/openpersonen/api/tests/test_data/__init__.py
maykinmedia/open-personen
2
6631141
from .ingeschreven_persoon import * # noqa from .kind import * # noqa from .nationaliteit_historie import * # noqa from .ouder import * # noqa from .partner import * # noqa from .partner_historie import * # noqa from .verblijf_plaats_historie import * # noqa from .verblijfs_titel_historie import * # noqa
from .ingeschreven_persoon import * # noqa from .kind import * # noqa from .nationaliteit_historie import * # noqa from .ouder import * # noqa from .partner import * # noqa from .partner_historie import * # noqa from .verblijf_plaats_historie import * # noqa from .verblijfs_titel_historie import * # noqa
uz
0.449824
# noqa # noqa # noqa # noqa # noqa # noqa # noqa # noqa
1.039865
1
mailqueue/tests/utils.py
winfieldco/django-mail-queue
0
6631142
<reponame>winfieldco/django-mail-queue from ..models import MailerMessage def create_email(**kwargs): """ Utility function to make creating MailerMessage instances easier when testing. You can create a MailerMessage with default options in the database:: message = create_email() You can over...
from ..models import MailerMessage def create_email(**kwargs): """ Utility function to make creating MailerMessage instances easier when testing. You can create a MailerMessage with default options in the database:: message = create_email() You can override default options:: message...
en
0.39645
Utility function to make creating MailerMessage instances easier when testing. You can create a MailerMessage with default options in the database:: message = create_email() You can override default options:: message = create_email(subject="My subject", content="My content") You can als...
2.832484
3
install/app_store/tk-multi-shotgunpanel/v1.4.9/python/app/action_manager.py
JoanAzpeitia/lp_sg
0
6631143
# Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
# Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
en
0.755321
# Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
1.894489
2
env/Lib/site-packages/google_images_search/fetch_resize_save.py
theXtroyer1221/Climate-luft
1
6631144
<filename>env/Lib/site-packages/google_images_search/fetch_resize_save.py import os import curses import requests import threading from PIL import Image from resizeimage import resizeimage, imageexceptions from .google_api import GoogleCustomSearch IMAGES_NUM_LIMIT = 10 class FetchResizeSave(object): """Class ...
<filename>env/Lib/site-packages/google_images_search/fetch_resize_save.py import os import curses import requests import threading from PIL import Image from resizeimage import resizeimage, imageexceptions from .google_api import GoogleCustomSearch IMAGES_NUM_LIMIT = 10 class FetchResizeSave(object): """Class ...
en
0.693213
Class with resizing and downloading logic # initialise google api # user nserted progressbar fn # initialise internal progressbar Set data for Google api search, save and resize :param search_params: parameters for Google API Search :param path_to_dir: path where the images should be downloaded ...
2.765059
3
setup.py
Virtlink/mavenpy
0
6631145
<gh_stars>0 from setuptools import setup setup( name='mavenpy', version='0.1.2', description='Wrapper for calling Maven from Python', url='http://github.com/Gohla/mavenpy', author='<NAME>', author_email='<EMAIL>', license='Apache 2.0', packages=['mavenpy'], install_requires=['pystache'], test_suite...
from setuptools import setup setup( name='mavenpy', version='0.1.2', description='Wrapper for calling Maven from Python', url='http://github.com/Gohla/mavenpy', author='<NAME>', author_email='<EMAIL>', license='Apache 2.0', packages=['mavenpy'], install_requires=['pystache'], test_suite='nose.colle...
none
1
1.158213
1
junior/packg/__init__.py
Firekiss/python_learn
0
6631146
<gh_stars>0 from . import ali_pay
from . import ali_pay
none
1
1.02841
1
indy_common/test/test_transactions.py
anikitinDSR/indy-node-jenkins-test
0
6631147
from indy_common.constants import NYM, NODE, ATTRIB, SCHEMA, CLAIM_DEF, DISCLO, GET_ATTR, GET_NYM, GET_TXNS, \ GET_SCHEMA, GET_CLAIM_DEF, POOL_UPGRADE, NODE_UPGRADE, POOL_CONFIG, REVOC_REG_DEF, REVOC_REG_ENTRY, \ GET_REVOC_REG_DEF, GET_REVOC_REG, GET_REVOC_REG_DELTA, POOL_RESTART, VALIDATOR_INFO, CHANGE_KEY, AU...
from indy_common.constants import NYM, NODE, ATTRIB, SCHEMA, CLAIM_DEF, DISCLO, GET_ATTR, GET_NYM, GET_TXNS, \ GET_SCHEMA, GET_CLAIM_DEF, POOL_UPGRADE, NODE_UPGRADE, POOL_CONFIG, REVOC_REG_DEF, REVOC_REG_ENTRY, \ GET_REVOC_REG_DEF, GET_REVOC_REG, GET_REVOC_REG_DELTA, POOL_RESTART, VALIDATOR_INFO, CHANGE_KEY, AU...
none
1
1.46459
1
GANsynth_pytorch/loader.py
tbazin/GANsynth-pytorch
0
6631148
from typing import Tuple, Callable, Any, Iterable import functools import math import torch from torch.utils.data import Dataset from torchvision import transforms from .spectrograms_helper import SpectrogramsHelper DatasetElement = Tuple[torch.Tensor, Iterable[Any]] class WavToSpectrogramDataLoader(torch.utils.da...
from typing import Tuple, Callable, Any, Iterable import functools import math import torch from torch.utils.data import Dataset from torchvision import transforms from .spectrograms_helper import SpectrogramsHelper DatasetElement = Tuple[torch.Tensor, Iterable[Any]] class WavToSpectrogramDataLoader(torch.utils.da...
en
0.768669
Extend data transform to operate on elements of a Dataset with targets Efficient audio-to-spectrogram conversion using CUDA if available Set IF to 0 where 2020/01/17(theis): threshold set at -13~~log(2e-6) since the spectrograms returned by the NSynth dataset have minimum amplitude: spec_helpers.SPEC_T...
2.565046
3
Session_07/car.py
CristiPV/kea-pyton
0
6631149
class Car: def __init__( self, make, model, bhp, mph ): self.make = make self.model = model self.bhp = bhp self.mph = mph @property def make( self ): return self.__make @property def model( self ): return self.__model @property def bhp( ...
class Car: def __init__( self, make, model, bhp, mph ): self.make = make self.model = model self.bhp = bhp self.mph = mph @property def make( self ): return self.__make @property def model( self ): return self.__model @property def bhp( ...
none
1
3.970747
4
user_settings.sample.py
vsod99/proton-ge-custom
0
6631150
<reponame>vsod99/proton-ge-custom #To enable these settings, name this file "user_settings.py". #Settings here will take effect for all games run in this Proton version. user_settings = { #Logs are saved to $HOME/steam-<STEAM_GAME_ID>.log, overwriting any previous log with that name. #Wine debug logging ...
#To enable these settings, name this file "user_settings.py". #Settings here will take effect for all games run in this Proton version. user_settings = { #Logs are saved to $HOME/steam-<STEAM_GAME_ID>.log, overwriting any previous log with that name. #Wine debug logging "WINEDEBUG": "+timestamp,+pid,+tid...
en
0.746508
#To enable these settings, name this file "user_settings.py". #Settings here will take effect for all games run in this Proton version. #Logs are saved to $HOME/steam-<STEAM_GAME_ID>.log, overwriting any previous log with that name. #Wine debug logging #DXVK debug logging #wine-mono debug logging (Wine's .NET replaceme...
1.524801
2