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
setup.py
killionadmin/ILOscripts
0
6625851
<filename>setup.py<gh_stars>0 from setuptools import setup, find_packages setup(name='python-ilorest-library', version='1.6.0', description='iLO Rest Python Library', author = 'Hewlett Packard Enterprise', author_email = '<EMAIL>', classifiers=[ 'Development Status :: 3 - Alph...
<filename>setup.py<gh_stars>0 from setuptools import setup, find_packages setup(name='python-ilorest-library', version='1.6.0', description='iLO Rest Python Library', author = 'Hewlett Packard Enterprise', author_email = '<EMAIL>', classifiers=[ 'Development Status :: 3 - Alph...
none
1
1.509692
2
info/InfoMeta.py
ffov/node_hierarchy
0
6625852
import json class InfoMeta(object): def __init__(self): self.resultNodes = None self.resultGraph = None def __generateNodesJson__(self): if self.resultNodes == None: return [] result = [] for node in self.resultNodes: result.appen...
import json class InfoMeta(object): def __init__(self): self.resultNodes = None self.resultGraph = None def __generateNodesJson__(self): if self.resultNodes == None: return [] result = [] for node in self.resultNodes: result.appen...
en
0.426433
#add array of public IPv6 Addresses
2.909115
3
jet_hadron/event_gen/pythia6.py
raymondEhlers/alice-jet-hadron
1
6625853
<reponame>raymondEhlers/alice-jet-hadron #!/usr/bin/env python import numpy as np import pyjet.utils from typing import Any, Iterable, Optional, Tuple from jet_hadron.event_gen import generator DTYPE_EP = np.dtype([("E", np.float64), ("px", np.float64), ("py", np.float64), ("pz", np.float64)]) class Pythia6(generat...
#!/usr/bin/env python import numpy as np import pyjet.utils from typing import Any, Iterable, Optional, Tuple from jet_hadron.event_gen import generator DTYPE_EP = np.dtype([("E", np.float64), ("px", np.float64), ("py", np.float64), ("pz", np.float64)]) class Pythia6(generator.Generator): """ PYTHIA 6 event gen...
en
0.855444
#!/usr/bin/env python PYTHIA 6 event generator. Defaults to the Perugia 2012 tune (tune number 370). Note: TPythia6 is a singleton class (even though this isn't called out super clearly in the docs). Each ``Initialize(...)`` call will go to the singleton instance. Args: sqrt_s: Ce...
2.34183
2
pypowerbi/datasets.py
rouzbeh-afrasiabi/pypowerbi
0
6625854
<reponame>rouzbeh-afrasiabi/pypowerbi # -*- coding: future_fstrings -*- import requests import simplejson as json from requests.exceptions import HTTPError from .dataset import * class Datasets: # url snippets groups_snippet = 'groups' datasets_snippet = 'datasets' tables_snippet = 'tables' rows_...
# -*- coding: future_fstrings -*- import requests import simplejson as json from requests.exceptions import HTTPError from .dataset import * class Datasets: # url snippets groups_snippet = 'groups' datasets_snippet = 'datasets' tables_snippet = 'tables' rows_snippet = 'rows' parameters_snippe...
en
0.753336
# -*- coding: future_fstrings -*- # url snippets # json keys Evaluates the number of datasets :param group_id: The optional group id :return: The number of datasets as returned by the API Evaluates if the dataset exists :param dataset_id: The id of the dataset to evaluate :param group_id...
2.713503
3
test_haystack/test_models.py
sgaist/django-haystack
1
6625855
<reponame>sgaist/django-haystack # encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import logging as std_logging import pickle from django.test import TestCase from test_haystack.core.models import MockModel from haystack import connections from haystack.models imp...
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import logging as std_logging import pickle from django.test import TestCase from test_haystack.core.models import MockModel from haystack import connections from haystack.models import SearchResult from haystack.ut...
en
0.894365
# encoding: utf-8 # The str(1) bit might seem unnecessary but it avoids test_unicode needing to handle # the differences between repr() output on Python 2 and 3 for a unicode literal: # Stow. # Without registering, we should receive an empty dict. # Include the index & try again. # Restore. # Failed lookups should fail...
2.320584
2
setup.py
Aiman-Shaa/PyPi-pakage
0
6625856
import setuptools setuptools.setup( name = 'xmath', version = '0.1', author = '<NAME>', author_email = '<EMAIL>', description = 'xmath module contains many simple and advanced mathematical operations', packages = setuptools.find_packages(), classifiers = [ "Programming Language ::...
import setuptools setuptools.setup( name = 'xmath', version = '0.1', author = '<NAME>', author_email = '<EMAIL>', description = 'xmath module contains many simple and advanced mathematical operations', packages = setuptools.find_packages(), classifiers = [ "Programming Language ::...
none
1
1.311812
1
backend/breach/tests/test_views.py
nkrios/rupture
184
6625857
<filename>backend/breach/tests/test_views.py from django.test import Client, TestCase from django.core.urlresolvers import reverse from breach.models import Target, Victim, Round, SampleSet import json from binascii import hexlify from mock import patch class ViewsTestCase(TestCase): def setUp(self): self...
<filename>backend/breach/tests/test_views.py from django.test import Client, TestCase from django.core.urlresolvers import reverse from breach.models import Target, Victim, Round, SampleSet import json from binascii import hexlify from mock import patch class ViewsTestCase(TestCase): def setUp(self): self...
en
0.720035
Test post requests for /target # Create the request Test post requests for /victim # Create the request Test post requests for /victim # Create the request Test post requests for /victim # Create the request
2.297182
2
metrics.py
helloholmes/dog_detection_gluoncv
2
6625858
<reponame>helloholmes/dog_detection_gluoncv<filename>metrics.py # coding:utf-8 ''' python 3.5 mxnet 1.3.0 gluoncv 0.3.0 visdom 0.1.7 gluonbook 0.6.9 auther: helloholmes ''' import mxnet as mx import numpy as np import os import time import pickle from mxnet import gluon from mxnet import init from mxnet import nd from ...
# coding:utf-8 ''' python 3.5 mxnet 1.3.0 gluoncv 0.3.0 visdom 0.1.7 gluonbook 0.6.9 auther: helloholmes ''' import mxnet as mx import numpy as np import os import time import pickle from mxnet import gluon from mxnet import init from mxnet import nd from mxnet import autograd from mxnet.gluon import nn class RPNAccMe...
en
0.307443
# coding:utf-8 python 3.5 mxnet 1.3.0 gluoncv 0.3.0 visdom 0.1.7 gluonbook 0.6.9 auther: helloholmes
2.03533
2
app/modules/encounters/schemas.py
karenc/houston
0
6625859
<gh_stars>0 # -*- coding: utf-8 -*- """ Serialization schemas for Encounters resources RESTful API ---------------------------------------------------- """ from flask_marshmallow import base_fields from flask_restx_patched import ModelSchema from .models import Encounter class BaseEncounterSchema(ModelSchema): ...
# -*- coding: utf-8 -*- """ Serialization schemas for Encounters resources RESTful API ---------------------------------------------------- """ from flask_marshmallow import base_fields from flask_restx_patched import ModelSchema from .models import Encounter class BaseEncounterSchema(ModelSchema): """ Base...
en
0.618408
# -*- coding: utf-8 -*- Serialization schemas for Encounters resources RESTful API ---------------------------------------------------- Base Encounter schema exposes only the most general fields. # pylint: disable=missing-docstring Detailed Encounter schema exposes all useful fields.
2.13557
2
antareslauncher/use_cases/check_remote_queue/slurm_queue_show.py
AntaresSimulatorTeam/antares-launcher
0
6625860
from dataclasses import dataclass from antareslauncher.display.idisplay import IDisplay from antareslauncher.remote_environnement.iremote_environment import ( IRemoteEnvironment, ) @dataclass class SlurmQueueShow: env: IRemoteEnvironment display: IDisplay def run(self): """Displays all the j...
from dataclasses import dataclass from antareslauncher.display.idisplay import IDisplay from antareslauncher.remote_environnement.iremote_environment import ( IRemoteEnvironment, ) @dataclass class SlurmQueueShow: env: IRemoteEnvironment display: IDisplay def run(self): """Displays all the j...
en
0.247984
Displays all the jobs un the slurm queue
2.260015
2
tests/test_misc.py
vkleen/skidl
700
6625861
<gh_stars>100-1000 # -*- coding: utf-8 -*- # The MIT License (MIT) - Copyright (c) 2016-2021 <NAME>. import pytest from skidl import Net, Part from .setup_teardown import setup_function, teardown_function def test_string_indices_1(): vreg1 = Part("xess.lib", "1117", footprint="null") gnd = Net("GND") ...
# -*- coding: utf-8 -*- # The MIT License (MIT) - Copyright (c) 2016-2021 <NAME>. import pytest from skidl import Net, Part from .setup_teardown import setup_function, teardown_function def test_string_indices_1(): vreg1 = Part("xess.lib", "1117", footprint="null") gnd = Net("GND") vin = Net("Vin") ...
en
0.675338
# -*- coding: utf-8 -*- # The MIT License (MIT) - Copyright (c) 2016-2021 <NAME>.
2.269826
2
python/cugraph/structure/renumber.py
codereport/cugraph
0
6625862
<reponame>codereport/cugraph<gh_stars>0 # Copyright (c) 2019, <NAME>. # 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 a...
# Copyright (c) 2019, <NAME>. # 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, s...
en
0.639223
# Copyright (c) 2019, <NAME>. # 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, s...
2.576602
3
tests/use_cases/test_get_location.py
trewjames/tdd-chess
0
6625863
<filename>tests/use_cases/test_get_location.py<gh_stars>0 from chess.engine import Move, get_location from chess.board import Board from chess.pieces import * import pytest def test_start_config_white(start_board): lst = get_location(start_board) assert lst == set([(6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6...
<filename>tests/use_cases/test_get_location.py<gh_stars>0 from chess.engine import Move, get_location from chess.board import Board from chess.pieces import * import pytest def test_start_config_white(start_board): lst = get_location(start_board) assert lst == set([(6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6...
en
0.7061
# --- Find Pieces --- # noqa # white rooks, both alive # black night, one alive # white king # black king # black bishop, none alive
2.273567
2
corehq/apps/users/urls.py
SEL-Columbia/commcare-hq
1
6625864
<filename>corehq/apps/users/urls.py #from django.conf.urls.defaults import patterns, url from corehq.apps.users.views import DefaultProjectUserSettingsView, EditWebUserView, EditMyAccountDomainView, ListWebUsersView, InviteWebUserView from corehq.apps.users.views.mobile.groups import EditGroupsView, EditGroupMembersVie...
<filename>corehq/apps/users/urls.py #from django.conf.urls.defaults import patterns, url from corehq.apps.users.views import DefaultProjectUserSettingsView, EditWebUserView, EditMyAccountDomainView, ListWebUsersView, InviteWebUserView from corehq.apps.users.views.mobile.groups import EditGroupsView, EditGroupMembersVie...
en
0.162699
#from django.conf.urls.defaults import patterns, url
1.686858
2
accounts/views.py
mowhammadrezaa/ecommerce
0
6625865
from django.contrib.auth.views import LoginView from django.shortcuts import render from accounts.forms import LoginForm, RegisterForm from django.contrib.auth.models import User class LoginViewCustom(LoginView): template_name = 'accounts/login_page.html' authentication_form = LoginForm extra_context = { ...
from django.contrib.auth.views import LoginView from django.shortcuts import render from accounts.forms import LoginForm, RegisterForm from django.contrib.auth.models import User class LoginViewCustom(LoginView): template_name = 'accounts/login_page.html' authentication_form = LoginForm extra_context = { ...
none
1
2.146585
2
beta/nncf/tensorflow/pruning/callbacks.py
xiao1228/nncf
0
6625866
<reponame>xiao1228/nncf<gh_stars>0 """ Copyright (c) 2021 Intel Corporation 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 ap...
""" Copyright (c) 2021 Intel Corporation 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...
en
0.852653
Copyright (c) 2021 Intel Corporation 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, so...
1.915671
2
services/tests/test_indexing.py
hanaahajj/Serviceinfo_hanaa
0
6625867
from django.test import TestCase from services.tests.factories import ServiceFactory from services.models import Service from services.search_indexes import ServiceIndex class IndexingTest(TestCase): def setUp(self): self.service_ar = ServiceFactory( name_ar='Arabic', name_en='', name_fr='',...
from django.test import TestCase from services.tests.factories import ServiceFactory from services.models import Service from services.search_indexes import ServiceIndex class IndexingTest(TestCase): def setUp(self): self.service_ar = ServiceFactory( name_ar='Arabic', name_en='', name_fr='',...
none
1
2.349317
2
monopyly/cards/__init__.py
YSabarad/monopyly
4
6625868
<filename>monopyly/cards/__init__.py from .deck import Deck from .chance_deck import ChanceDeck from .community_chest_deck import CommunityChestDeck from .elected_chairman import ElectedChairman from .reward_card import RewardCard from .fine_card import FineCard from .get_out_of_jail_free import GetOutOfJailFree from ....
<filename>monopyly/cards/__init__.py from .deck import Deck from .chance_deck import ChanceDeck from .community_chest_deck import CommunityChestDeck from .elected_chairman import ElectedChairman from .reward_card import RewardCard from .fine_card import FineCard from .get_out_of_jail_free import GetOutOfJailFree from ....
none
1
1.190482
1
tensorflow_federated/python/core/utils/differential_privacy_test.py
RosieLiu/federated
0
6625869
# Copyright 2019, The TensorFlow Federated 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 o...
# Copyright 2019, The TensorFlow Federated 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 o...
en
0.849148
# Copyright 2019, The TensorFlow Federated 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 o...
1.818897
2
Code/set_test.py
kmurata798/CS-1.3-Core-Data-Structures
0
6625870
from set import HashSet import unittest class SetTest(unittest.TestCase): def test_init(self): elements = ['1', '2', '3'] set = HashSet(elements) assert set.size is 3 def test_size(self): elements = ['A', 'B', 'C', '1', '2'] set = HashSet(elements) assert set.s...
from set import HashSet import unittest class SetTest(unittest.TestCase): def test_init(self): elements = ['1', '2', '3'] set = HashSet(elements) assert set.size is 3 def test_size(self): elements = ['A', 'B', 'C', '1', '2'] set = HashSet(elements) assert set.s...
en
0.908311
# Element already exists # Element already exists # Element doesn not exist # Element does not exist # Element does not exist anymore # Item order does not matter # Item order does not matter # Item order does not matter # Item order does not matter # Item order does not matter # Item order does not matter
3.803358
4
ddot/Ontology.py
antonkratz/ddot
0
6625871
from __future__ import absolute_import, print_function, division import itertools, multiprocessing, logging, os, collections, random, math, sys, time from itertools import groupby, combinations from operator import * from collections import Counter import tempfile from subprocess import Popen, PIPE, STDOUT import insp...
from __future__ import absolute_import, print_function, division import itertools, multiprocessing, logging, os, collections, random, math, sys, time from itertools import groupby, combinations from operator import * from collections import Counter import tempfile from subprocess import Popen, PIPE, STDOUT import insp...
en
0.679411
Collapses a node in a Graph (igraph package) while preserving long-range hierarchical relations between descendants and ancestral nodes. # A faster collapse that adds all new edges # simultaneously. Ignores edge attributes # Only add an edge if it doesn't already exist # Set default value of edge attributes to ...
1.910095
2
bar_chart.py
Evan-Yanagida/simple-bar-chart
0
6625872
import matplotlib.pyplot as plt #See Line 39 #Calculate x_offset (in order to center text for number of steps walked each day to each bar) def calc_x_offset(steps_walked_value): num_of_digits = len(str(steps_walked_value)) x_offset = .925 - (num_of_digits - 1)*.075 return x_offset #INPUT DATA days_of_the_week = [...
import matplotlib.pyplot as plt #See Line 39 #Calculate x_offset (in order to center text for number of steps walked each day to each bar) def calc_x_offset(steps_walked_value): num_of_digits = len(str(steps_walked_value)) x_offset = .925 - (num_of_digits - 1)*.075 return x_offset #INPUT DATA days_of_the_week = [...
en
0.780596
#See Line 39 #Calculate x_offset (in order to center text for number of steps walked each day to each bar) #INPUT DATA #See Line 39 #Allows the labeling of number of steps (blue bold text) to work #TEXT: Hide y-axis label and ticks #TEXT: Set x-axis label and ticks #TEXT: Set title for the bar chart #TEXT: Add the valu...
3.690231
4
qiskit/test/base.py
AkashNarayanan/qiskit-terra
1,599
6625873
<reponame>AkashNarayanan/qiskit-terra<gh_stars>1000+ # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/l...
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
en
0.792995
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
1.92395
2
apetools/parameters/iperf_test_parameters.py
rsnakamura/oldape
0
6625874
<reponame>rsnakamura/oldape # python standard library from collections import namedtuple class IperfTestParameters(namedtuple("IperfTestParameters", ["filename", "iperf_parameters"])): """ IperfTestParameters add a filename to the iperf parameters....
# python standard library from collections import namedtuple class IperfTestParameters(namedtuple("IperfTestParameters", ["filename", "iperf_parameters"])): """ IperfTestParameters add a filename to the iperf parameters. """ def __str__(self...
en
0.307204
# python standard library IperfTestParameters add a filename to the iperf parameters. :return: string representation of iperf_parameters # end class IperfTestParameters
3.01742
3
src/saas/bkuser_shell/organization/urls.py
Canway-shiisa/bk-user
0
6625875
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
en
0.744854
# -*- coding: utf-8 -*- TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License...
1.668963
2
lib/python/treadmill/tests/cli_test.py
bretttegartms/treadmill
133
6625876
<reponame>bretttegartms/treadmill """Unit test for treadmill.cli. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import sys import unittest import click import mock import six from treadmill ...
"""Unit test for treadmill.cli. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import sys import unittest import click import mock import six from treadmill import cli from treadmill import c...
en
0.585894
Unit test for treadmill.cli. Convert table to list of lines. These are Tests for teadmill.warm. Tests table output. Tests wrapping function with exceptions wrapper. Sample exception. Another exception. Raise A exception. Raise B exception. Test combining lists. Test parsing cell CLI option. Test parsing cell CLI option...
2.895557
3
check_model.py
Bharat-Runwal/path2vec
31
6625877
#!/usr/bin/python3 # coding: utf-8 import sys import gensim import logging from itertools import combinations logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) modelfile = sys.argv[1] if modelfile.endswith('.bin.gz'): model = gensim.models.KeyedVectors.load_word2vec_fo...
#!/usr/bin/python3 # coding: utf-8 import sys import gensim import logging from itertools import combinations logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) modelfile = sys.argv[1] if modelfile.endswith('.bin.gz'): model = gensim.models.KeyedVectors.load_word2vec_fo...
en
0.362849
#!/usr/bin/python3 # coding: utf-8
2.759651
3
bitglitter/write/render/videorender.py
eurekaX696/BitGlitter-Python
1
6625878
<filename>bitglitter/write/render/videorender.py import cv2 import logging from pathlib import Path def render_video(stream_output_path, default_output_path, stream_name_file_output, working_directory, total_frames, frames_per_second, stream_sha256, block_width, block_height, pixel_width, stream_nam...
<filename>bitglitter/write/render/videorender.py import cv2 import logging from pathlib import Path def render_video(stream_output_path, default_output_path, stream_name_file_output, working_directory, total_frames, frames_per_second, stream_sha256, block_width, block_height, pixel_width, stream_nam...
en
0.86544
Taking in whichever arguments, it takes all of the rendered frames, and merges them into an .mp4 .
3.040292
3
DataInsights/src/prose/__init__.py
vincentpun/ConformanceConstraintsReproducibility
0
6625879
<gh_stars>0 # Copyright (c) Microsoft Corporation. All rights reserved. __import__("pkg_resources").declare_namespace(__name__)
# Copyright (c) Microsoft Corporation. All rights reserved. __import__("pkg_resources").declare_namespace(__name__)
en
0.865191
# Copyright (c) Microsoft Corporation. All rights reserved.
1.148173
1
2056/slu.py
matrixjoeq/timus_solutions
0
6625880
<filename>2056/slu.py #!/usr/bin/python # -*- coding: utf-8 -*- ''' 2056. Scholarship Time limit: 1.0 second Memory limit: 64 MB [Description] At last the first term at the University came to its finish. Android Vasya has already passed all the exams and wants to know if he gets a scholarship. There is the following ...
<filename>2056/slu.py #!/usr/bin/python # -*- coding: utf-8 -*- ''' 2056. Scholarship Time limit: 1.0 second Memory limit: 64 MB [Description] At last the first term at the University came to its finish. Android Vasya has already passed all the exams and wants to know if he gets a scholarship. There is the following ...
en
0.926159
#!/usr/bin/python # -*- coding: utf-8 -*- 2056. Scholarship Time limit: 1.0 second Memory limit: 64 MB [Description] At last the first term at the University came to its finish. Android Vasya has already passed all the exams and wants to know if he gets a scholarship. There is the following practice of giving scholars...
3.478914
3
classy_mermaid/tree/graphs.py
e-lo/classy-mermaid
0
6625881
<filename>classy_mermaid/tree/graphs.py from networkx import DiGraph from .module_tree import ModuleTree def tree_to_graph(tree: ModuleTree) -> DiGraph: """ Convert a tree to a graph. """ graph = DiGraph() for node_id, node in tree.nodes.items(): graph.add_node(node_id) for child...
<filename>classy_mermaid/tree/graphs.py from networkx import DiGraph from .module_tree import ModuleTree def tree_to_graph(tree: ModuleTree) -> DiGraph: """ Convert a tree to a graph. """ graph = DiGraph() for node_id, node in tree.nodes.items(): graph.add_node(node_id) for child...
en
0.890172
Convert a tree to a graph.
3.349045
3
demo/validate_peer_interface.py
111pontes/xr-um
1
6625882
<reponame>111pontes/xr-um #!/usr/bin/env python3 # # Copyright 2019 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
#!/usr/bin/env python3 # # Copyright 2019 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
en
0.638909
#!/usr/bin/env python3 # # Copyright 2019 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
2.0186
2
code/NumpyIntro.py
ju1-eu/pyAnfaenger
0
6625883
<reponame>ju1-eu/pyAnfaenger import numpy as np # liste in array wandeln mit numpy noten_list = [100, 89, 44, 78, 45, 24, 18] noten_np_array = np.array(noten_list, dtype=np.int8) # max und min noten_max = np.max(noten_np_array) noten_min = np.min(noten_np_array) # argmax git den index zurück # 0 1 2 3 4 ...
import numpy as np # liste in array wandeln mit numpy noten_list = [100, 89, 44, 78, 45, 24, 18] noten_np_array = np.array(noten_list, dtype=np.int8) # max und min noten_max = np.max(noten_np_array) noten_min = np.min(noten_np_array) # argmax git den index zurück # 0 1 2 3 4 5 6 # [100, 89, 44, 78, 45,...
de
0.8524
# liste in array wandeln mit numpy # max und min # argmax git den index zurück # 0 1 2 3 4 5 6 # [100, 89, 44, 78, 45, 24, 18] # mittelwert und median
2.973754
3
networking_vpp/agent/server.py
Ebrink/networking-vpp
0
6625884
<filename>networking_vpp/agent/server.py # Copyright (c) 2017 Cisco Systems, 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....
<filename>networking_vpp/agent/server.py # Copyright (c) 2017 Cisco Systems, 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....
en
0.867024
# Copyright (c) 2017 Cisco Systems, 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 re...
1.878843
2
packages/pegasus-python/src/Pegasus/db/workflow/stampede_statistics.py
ahnitz/pegasus
127
6625885
<filename>packages/pegasus-python/src/Pegasus/db/workflow/stampede_statistics.py """ Library to generate statistics from the new Stampede 3.1 backend. Usage:: stats = StampedeStatistics(connString='sqlite:///montage.db') stats.initialize('unique_wf_uuid') stats.set_job_filter('dax') print stats.get_total_jobs_stat...
<filename>packages/pegasus-python/src/Pegasus/db/workflow/stampede_statistics.py """ Library to generate statistics from the new Stampede 3.1 backend. Usage:: stats = StampedeStatistics(connString='sqlite:///montage.db') stats.initialize('unique_wf_uuid') stats.set_job_filter('dax') print stats.get_total_jobs_stat...
en
0.636561
Library to generate statistics from the new Stampede 3.1 backend. Usage:: stats = StampedeStatistics(connString='sqlite:///montage.db') stats.initialize('unique_wf_uuid') stats.set_job_filter('dax') print stats.get_total_jobs_status() print stats.get_total_succeeded_jobs_status() stats.set_job_filter('dag') pri...
2.425778
2
jet_bridge/__init__.py
BradyBromley/jet-bridge
1
6625886
VERSION = '0.4.8'
VERSION = '0.4.8'
none
1
1.112639
1
assemblyline/assemblyline/al/service/list_queue_sizes.py
dendisuhubdy/grokmachine
46
6625887
#!/usr/bin/env python import logging from assemblyline.al.common import forge ds = None log = logging.getLogger('assemblyline.al.service') def get_service_queue_length(service_name): # noinspection PyBroadException try: svc_queue = forge.get_service_queue(service_name.split(".")[-1]) return...
#!/usr/bin/env python import logging from assemblyline.al.common import forge ds = None log = logging.getLogger('assemblyline.al.service') def get_service_queue_length(service_name): # noinspection PyBroadException try: svc_queue = forge.get_service_queue(service_name.split(".")[-1]) return...
en
0.436893
#!/usr/bin/env python # noinspection PyBroadException # pylint: disable=W0603 # Default is to return all services in a dict of class_name: queue_size. # noinspection PyBroadException # pylint: disable=W0703
2.12044
2
datacube/testutils/io.py
agdc-research-trial/gdf
1
6625888
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np import toolz from ..model import Dataset from ..storage import reproject_and_fuse, BandInfo from ..storage._rio import Raste...
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np import toolz from ..model import Dataset from ..storage import reproject_and_fuse, BandInfo from ..storage._rio import Raste...
en
0.72892
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 # type: ignore[attr-defined] This is only used in test code :param ds: Dataset :param measurements: List of band names to load Compute nativ...
2.068309
2
github_linter/tests/pylintrc.py
yaleman/github_linter
0
6625889
<filename>github_linter/tests/pylintrc.py<gh_stars>0 """ checks for dependabot config """ from configparser import ConfigParser, NoOptionError # , NoSectionError from typing import List, Optional, TypedDict # from jinja2 import Environment, PackageLoader, select_autoescape # import jinja2.exceptions import json5 as ...
<filename>github_linter/tests/pylintrc.py<gh_stars>0 """ checks for dependabot config """ from configparser import ConfigParser, NoOptionError # , NoSectionError from typing import List, Optional, TypedDict # from jinja2 import Environment, PackageLoader, select_autoescape # import jinja2.exceptions import json5 as ...
en
0.475585
checks for dependabot config # , NoSectionError # from jinja2 import Environment, PackageLoader, select_autoescape # import jinja2.exceptions # TODO: look in "/<repo.name>/.pylintrc" defines the settings for a pylintrc file config typing for module config # https://pylint.pycqa.org/en/latest/user_guide/run.html # docum...
2.252327
2
.history/routes_20200723152523.py
rkustas/taskmanager
0
6625890
from app import app, db from flask import render_template, redirect, url_for, flash, get_flashed_messages from models import Task from datetime import datetime import forms # Basic route @app.route('/') @app.route('/index') def index(): tasks = Task.query.all() return render_template('index.html', tasks=tasks...
from app import app, db from flask import render_template, redirect, url_for, flash, get_flashed_messages from models import Task from datetime import datetime import forms # Basic route @app.route('/') @app.route('/index') def index(): tasks = Task.query.all() return render_template('index.html', tasks=tasks...
en
0.810421
# Basic route
2.314652
2
tmaps_mtmoran_getoutputinfo.py
CI-WATER/tmaps
0
6625891
<reponame>CI-WATER/tmaps<filename>tmaps_mtmoran_getoutputinfo.py #!/usr/bin/python # -*- coding: utf-8 -*- ''' ******************************************************************************** * Name: TMAPS ADHydro * Author: <NAME> * Created On: May 20, 2015 * Copyright: (c) Brigham Young University 2015 * License: BSD...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' ******************************************************************************** * Name: TMAPS ADHydro * Author: <NAME> * Created On: May 20, 2015 * Copyright: (c) Brigham Young University 2015 * License: BSD 2-Clause *******************************************************...
en
0.458711
#!/usr/bin/python # -*- coding: utf-8 -*- ******************************************************************************** * Name: TMAPS ADHydro * Author: <NAME> * Created On: May 20, 2015 * Copyright: (c) Brigham Young University 2015 * License: BSD 2-Clause ************************************************************...
1.969196
2
src/config/api-server/vnc_cfg_api_server/vnc_cfg_api_server.py
sasikrishna2014/contrail-controller
0
6625892
<gh_stars>0 # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ This is the main module in vnc_cfg_api_server package. It manages interaction between http/rest, address management, authentication and database interfaces. """ from gevent import monkey monkey.patch_all() from gevent import hub # fr...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ This is the main module in vnc_cfg_api_server package. It manages interaction between http/rest, address management, authentication and database interfaces. """ from gevent import monkey monkey.patch_all() from gevent import hub # from neutron p...
en
0.675173
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # This is the main module in vnc_cfg_api_server package. It manages interaction between http/rest, address management, authentication and database interfaces. # from neutron plugin to api server, the request URL could be large. # fix the const # import ...
1.43485
1
sanansaattaja/website/forms/message_form.py
KEZKA/YL-WEB-PROJECT
3
6625893
<reponame>KEZKA/YL-WEB-PROJECT from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, TextAreaField from wtforms.validators import DataRequired class MessageForm(FlaskForm): addressee = StringField('Whom', validators=[DataRequired()]) text = TextAreaField("Text", validators=[DataRequire...
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, TextAreaField from wtforms.validators import DataRequired class MessageForm(FlaskForm): addressee = StringField('Whom', validators=[DataRequired()]) text = TextAreaField("Text", validators=[DataRequired()]) submit = SubmitField(...
none
1
2.556902
3
data.py
LiuXinyu12378/MatchingNetworks
1
6625894
import os import numpy as np import cv2 import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import tqdm import concurrent.futures import pickle from skimage import transform def augment_image(image, k, channels): if channels==1: image = image[:, :, 0] image = transform.rota...
import os import numpy as np import cv2 import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import tqdm import concurrent.futures import pickle from skimage import transform def augment_image(image, k, channels): if channels==1: image = image[:, :, 0] image = transform.rota...
en
0.780753
:param batch_size: The batch size to use for the data loader :param last_training_class_index: The final index for the training set, used to restrict the training set if needed. E.g. if training set is 1200 classes and last_training_class_index=900 then only the first 900 classes will be used ...
2.844445
3
webstore/webstore/databases.py
AlbertoAdolfo27/webstore-python
0
6625895
from pathlib import Path class Databases: BASE_DIR = Path(__file__).resolve().parent.parent SQLITE3 = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } MYSQL = { 'default': { 'ENGINE': 'django....
from pathlib import Path class Databases: BASE_DIR = Path(__file__).resolve().parent.parent SQLITE3 = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } MYSQL = { 'default': { 'ENGINE': 'django....
none
1
2.007681
2
windows/win32/paramiko-1.14.0/paramiko/kex_group1.py
mytliulei/DCNRobotInstallPackages
2
6625896
<gh_stars>1-10 # Copyright (C) 2003-2007 <NAME> <<EMAIL>> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your ...
# Copyright (C) 2003-2007 <NAME> <<EMAIL>> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any l...
en
0.815923
# Copyright (C) 2003-2007 <NAME> <<EMAIL>> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any l...
2.256977
2
Chapter09/production/tensorflow_serving/apis/input_pb2.py
PacktPublishing/Machine-Learning-with-TensorFlow-1.x
12
6625897
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow_serving/apis/input.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impor...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow_serving/apis/input.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impor...
en
0.204555
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow_serving/apis/input.proto # @@protoc_insertion_point(imports) #tensorflow_serving/apis/input.proto\x12\x12tensorflow.serving\x1a%tensorflow/core/example/example.proto\"4\n\x0b\x45xampleList\x12%\n\x08\x65xamples\x18\x01 \x03(\x0b\x32\x13.ten...
1.127437
1
02_neural_networks/2-7_introduction_to_pytorch/2-7_simple_mlp/fmnist_mlp_optimizer_eval.py
vseib/deep-learning-nano-degree
1
6625898
<gh_stars>1-10 import torch from torch import nn from torch import optim from torchvision import datasets, transforms import torch.nn.functional as F from datetime import datetime time_format_dt = '%Y-%m-%d %H:%M:%S' time_format_t = '%H:%M:%S' # Define a transform to normalize the data transform = transforms.Compose(...
import torch from torch import nn from torch import optim from torchvision import datasets, transforms import torch.nn.functional as F from datetime import datetime time_format_dt = '%Y-%m-%d %H:%M:%S' time_format_t = '%H:%M:%S' # Define a transform to normalize the data transform = transforms.Compose([transforms.ToT...
en
0.759283
# Define a transform to normalize the data # Download and load the training data # check for cuda # Define the loss # Build a feed-forward network # move to gpu if available # define optimizer # move to gpu if available # move to gpu if available # get probabilities and compute accuracy # store losses and accuracy # pl...
2.588522
3
caffe2onnx/src/OPs/Pooling.py
LaudateCorpus1/caffe2onnx
0
6625899
<gh_stars>0 import numpy as np import caffe2onnx.src.c2oObject as Node ##-----------------------------------------------------Pooling--------------------------------------------------## # Get hyperparameters def getPoolingAttri(layer): # Pooled core size kernel_shape = np.array([layer.pooling_param.kernel_size]...
import numpy as np import caffe2onnx.src.c2oObject as Node ##-----------------------------------------------------Pooling--------------------------------------------------## # Get hyperparameters def getPoolingAttri(layer): # Pooled core size kernel_shape = np.array([layer.pooling_param.kernel_size]*2).flatten(...
en
0.711432
##-----------------------------------------------------Pooling--------------------------------------------------## # Get hyperparameters # Pooled core size # Step # the default is 1 # Filling # the default is 0 # Here is the same as when convolution, if there is a pad, it is set according to its value # Hyperparameter ...
2.831077
3
tests/integration_tests/test_keras.py
seungjaeryanlee/optuna
0
6625900
from keras.layers import Dense from keras import Sequential import numpy as np import pytest import optuna from optuna.integration import KerasPruningCallback from optuna.testing.integration import create_running_trial from optuna.testing.integration import DeterministicPruner @pytest.mark.parametrize("interval, epo...
from keras.layers import Dense from keras import Sequential import numpy as np import pytest import optuna from optuna.integration import KerasPruningCallback from optuna.testing.integration import create_running_trial from optuna.testing.integration import DeterministicPruner @pytest.mark.parametrize("interval, epo...
en
0.613426
# type: (int, int) -> None # type: (optuna.trial.Trial) -> float # type: () -> None
2.245705
2
graphsaint/tensorflow_version/model.py
alexs131/GraphSAINT
316
6625901
<filename>graphsaint/tensorflow_version/model.py<gh_stars>100-1000 import tensorflow as tf from graphsaint.globals import * from graphsaint.tensorflow_version.inits import * import graphsaint.tensorflow_version.layers as layers from graphsaint.utils import * import pdb class GraphSAINT: def __init__(se...
<filename>graphsaint/tensorflow_version/model.py<gh_stars>100-1000 import tensorflow as tf from graphsaint.globals import * from graphsaint.tensorflow_version.inits import * import graphsaint.tensorflow_version.layers as layers from graphsaint.utils import * import pdb class GraphSAINT: def __init__(se...
en
0.778394
Args: - placeholders: TensorFlow placeholder object. - features: Numpy array with node features. - adj: Numpy array with adjacency lists (padded with random re-samples) - degrees: Numpy array with node degrees. - sigmoid_loss: Set to true if nodes can bel...
2.30439
2
examples/server.py
insomniacslk/fbtftp
1
6625902
#!/usr/bin/env python3 # Copyright 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE-examples file in the root directory of this source tree. import argparse import logging import os from fbtftp.base_handler import BaseHandler from fbtftp.bas...
#!/usr/bin/env python3 # Copyright 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE-examples file in the root directory of this source tree. import argparse import logging import os from fbtftp.base_handler import BaseHandler from fbtftp.bas...
en
0.817262
#!/usr/bin/env python3 # Copyright 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE-examples file in the root directory of this source tree. Print server stats - see the ServerStats class # NOTE: remember to reset the counters you use, to allo...
2.182776
2
systemd_helper.py
CyberKoo/ClashMagicRouter
2
6625903
<gh_stars>1-10 import os from command_helper import CommandHelper class SystemdHelper: @staticmethod def service_exists(name): search_path = SystemdHelper._get_search_path() for path in search_path: if os.path.exists('{}/{}.service'.format(path, name)): return Tru...
import os from command_helper import CommandHelper class SystemdHelper: @staticmethod def service_exists(name): search_path = SystemdHelper._get_search_path() for path in search_path: if os.path.exists('{}/{}.service'.format(path, name)): return True retu...
none
1
2.710327
3
tests/test_claircli.py
joelee2012/claircli
16
6625904
<filename>tests/test_claircli.py import json import logging import os import shutil import unittest from argparse import Namespace from collections import defaultdict from os.path import isdir, isfile import responses from requests import get as req_get from six.moves.urllib.parse import quote, urlencode from claircl...
<filename>tests/test_claircli.py import json import logging import os import shutil import unittest from argparse import Namespace from collections import defaultdict from os.path import isdir, isfile import responses from requests import get as req_get from six.moves.urllib.parse import quote, urlencode from claircl...
en
0.153258
# if isfile(self.html): # os.remove(self.html) # Include a check for ignored arguments
2.043989
2
locustfiles/loadtest.py
18F/identity-give-load-testin
0
6625905
<gh_stars>0 """ Locustfile for load testing IDVA functionality """ import os from locust import HttpUser, task, constant_pacing, tag HTTP_FLOW_PATH = f"/v1/company/wdK3fH48XuoXzvZyeNJEYFA9i8K72BZg/flows/IU1iDIvviIth5jiYmNvgsS43Kg29RxyB/start" SK_API_KEY = os.getenv("SK_API_KEY") class SKLoadTestUser(HttpUser): "...
""" Locustfile for load testing IDVA functionality """ import os from locust import HttpUser, task, constant_pacing, tag HTTP_FLOW_PATH = f"/v1/company/wdK3fH48XuoXzvZyeNJEYFA9i8K72BZg/flows/IU1iDIvviIth5jiYmNvgsS43Kg29RxyB/start" SK_API_KEY = os.getenv("SK_API_KEY") class SKLoadTestUser(HttpUser): """Load test ...
en
0.416422
Locustfile for load testing IDVA functionality Load test SK Invoke basic sk test flow
2.339033
2
leetcode/python/maximumDepthOfBinaryTree.py
yaoxuanw007/forfun
0
6625906
<gh_stars>0 # https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/ # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None # 11:02 - 11:08 class Solution: # @param root, a tree node # @return an integer def maxDepth(sel...
# https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/ # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None # 11:02 - 11:08 class Solution: # @param root, a tree node # @return an integer def maxDepth(self, root): ...
en
0.561996
# https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/ # Definition for a binary tree node # 11:02 - 11:08 # @param root, a tree node # @return an integer
3.888313
4
mundo_1/ex006.py
tseiiti/curso_em_video
0
6625907
from os import system, name system('cls' if name == 'nt' else 'clear') dsc = ('''DESAFIO 006: Faça um algoritmo que leia um número e mostre na tela o seu dobro, triplo e raiz quadrada. ''') n = float(input('Digite um número: ')) print('o dobro é: {}'.format(n * 2)) print('o triplo é: {}'.format(n * 3)) print('a raiz ...
from os import system, name system('cls' if name == 'nt' else 'clear') dsc = ('''DESAFIO 006: Faça um algoritmo que leia um número e mostre na tela o seu dobro, triplo e raiz quadrada. ''') n = float(input('Digite um número: ')) print('o dobro é: {}'.format(n * 2)) print('o triplo é: {}'.format(n * 3)) print('a raiz ...
pt
0.861652
DESAFIO 006: Faça um algoritmo que leia um número e mostre na tela o seu dobro, triplo e raiz quadrada.
3.661867
4
test/IntentEngineTest.py
fakegit/adapt
796
6625908
# Copyright 2018 Mycroft AI 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 writin...
# Copyright 2018 Mycroft AI 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 writin...
en
0.872663
# Copyright 2018 Mycroft AI 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 writin...
2.321787
2
libtbx/sphinx/pubmed.py
ErwinP/cctbx_project
0
6625909
from __future__ import absolute_import, division, print_function import docutils.parsers.rst import multiprocessing from Bio import Entrez _biolock = multiprocessing.Lock() def setup(app): app.add_directive('pubmed', PubMedDirective) return {"parallel_read_safe": True} class PubMedDirective(docutils.parsers.rst...
from __future__ import absolute_import, division, print_function import docutils.parsers.rst import multiprocessing from Bio import Entrez _biolock = multiprocessing.Lock() def setup(app): app.add_directive('pubmed', PubMedDirective) return {"parallel_read_safe": True} class PubMedDirective(docutils.parsers.rst...
en
0.739174
# this disables content in the directive # Title/doi link: # Remove trailing dot and all control characters, including newline chars, from title. # Author list # Journal reference # try: # print("vvv") # print("\n".join(text)) # print("^^^") # except Exception: # pass # insert rst
2.248182
2
cscs-checks/prgenv/cuda/cuda_aware_mpi.py
jacwah/reframe
0
6625910
<reponame>jacwah/reframe<filename>cscs-checks/prgenv/cuda/cuda_aware_mpi.py # Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import os import reframe as rfm import reframe.uti...
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import os import reframe as rfm import reframe.utility.sanity as sn import cscstests.microbenchmarks.gpu.hooks as hooks @rf...
en
0.661538
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause Run the case in one node. Run the case across two nodes.
1.85104
2
hack/benchmark/run-consensus.py
xvzf/htw-saar-vaa
0
6625911
import os import time # Deploy environmet for i in range(10): print(f"[+] Deploy test{i}") os.system(f"tk apply environments/consensus --dangerous-auto-approve --name=test{i}") print("[+] Wait for pods to be up") os.system("kubectl wait -n default --for=condition=Ready pod --all") print("[+] Wait 30s") time...
import os import time # Deploy environmet for i in range(10): print(f"[+] Deploy test{i}") os.system(f"tk apply environments/consensus --dangerous-auto-approve --name=test{i}") print("[+] Wait for pods to be up") os.system("kubectl wait -n default --for=condition=Ready pod --all") print("[+] Wait 30s") time...
en
0.241929
# Deploy environmet # print("[+] Wait 30s") # time.sleep(30) # print("[+] Teardown") # os.system("kubectl delete -n default pod --all --grace-period=0")
2.139918
2
pybeehive/asyn/__init__.py
sentrip/pybeehive
2
6625912
<filename>pybeehive/asyn/__init__.py from ..core import Event from .core import Listener, Streamer from .hive import Hive from .utils import async_generator __all__ = [ 'Event', 'Listener', 'Streamer', 'Hive', 'async_generator' ]
<filename>pybeehive/asyn/__init__.py from ..core import Event from .core import Listener, Streamer from .hive import Hive from .utils import async_generator __all__ = [ 'Event', 'Listener', 'Streamer', 'Hive', 'async_generator' ]
none
1
1.271277
1
birdfsd_yolov5/label_studio_helpers/watchdog.py
bird-feeder/BirdFSD-YOLOv5
0
6625913
<filename>birdfsd_yolov5/label_studio_helpers/watchdog.py #!/usr/bin/env python # coding: utf-8 import argparse import copy import imghdr import shutil import time import uuid from glob import glob from pathlib import Path from PIL import Image, UnidentifiedImageError from dotenv import load_dotenv from loguru import...
<filename>birdfsd_yolov5/label_studio_helpers/watchdog.py #!/usr/bin/env python # coding: utf-8 import argparse import copy import imghdr import shutil import time import uuid from glob import glob from pathlib import Path from PIL import Image, UnidentifiedImageError from dotenv import load_dotenv from loguru import...
en
0.325294
#!/usr/bin/env python # coding: utf-8
2.155038
2
util.py
pl8848/jd-assistant
0
6625914
#!/usr/bin/env python # -*- coding:utf-8 -*- import functools import json import os import re import warnings from base64 import b64encode import requests from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 from log import logger RSA_PUBLIC_KEY = """-----<KEY> -----END PUBLIC K...
#!/usr/bin/env python # -*- coding:utf-8 -*- import functools import json import os import re import warnings from base64 import b64encode import requests from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 from log import logger RSA_PUBLIC_KEY = """-----<KEY> -----END PUBLIC K...
zh
0.438102
#!/usr/bin/env python # -*- coding:utf-8 -*- -----<KEY> -----END PUBLIC KEY----- #USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36' # for Windows # for Linux # for Mac 将商品id字符串解析为字典 商品id字符串采用英文逗号进行分割。 可以在每个id后面用冒号加上数字,代表该商品的数量,如果不...
2.331229
2
tools/envoy_headersplit/headersplit_test.py
vazra/envoy
2
6625915
# Lint as: python3 """Tests for headersplit.""" import headersplit import unittest # libclang imports from clang.cindex import TranslationUnit, Index class HeadersplitTest(unittest.TestCase): # A header contains a simple class print hello world source_code_hello_world = open("tools/envoy_headersplit/code_co...
# Lint as: python3 """Tests for headersplit.""" import headersplit import unittest # libclang imports from clang.cindex import TranslationUnit, Index class HeadersplitTest(unittest.TestCase): # A header contains a simple class print hello world source_code_hello_world = open("tools/envoy_headersplit/code_co...
en
0.756739
# Lint as: python3 Tests for headersplit. # libclang imports # A header contains a simple class print hello world # A C++ source code contains definition for several classes # almost the same as above, but classes are not enclosed by namespace # A C++ source code contains method implementations for class_defn.h # Test ...
2.420217
2
labm8/py/dockerutil.py
ChrisCummins/labm8
3
6625916
"""A module for launching docker images from within python applications.""" import contextlib import pathlib import random import subprocess import typing from labm8.py import app from labm8.py import bazelutil from labm8.py import labtypes def IsDockerContainer() -> bool: """Determine if running inside a docker c...
"""A module for launching docker images from within python applications.""" import contextlib import pathlib import random import subprocess import typing from labm8.py import app from labm8.py import bazelutil from labm8.py import labtypes def IsDockerContainer() -> bool: """Determine if running inside a docker c...
en
0.744011
A module for launching docker images from within python applications. Determine if running inside a docker container. Build a docker process invocation. A transient context for running docker images. Build the command line arguments to execute the requested command. Args: args: A list of string positional ar...
3.005674
3
bazel/python_toolchain.bzl
khansiddiquekc/magma
539
6625917
# Copyright 2021 The Magma Authors. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARR...
# Copyright 2021 The Magma Authors. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARR...
en
0.863951
# Copyright 2021 The Magma Authors. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRAN...
1.480795
1
delete.py
Max00355/ByteMail-1
4
6625918
<gh_stars>1-10 import db import ssl import json from rsa import * import base64 def delete(obj, ip, data): message = db.messages.find("messages", {"id":data['id']}) pubkey_expression = db.nodes.find("nodes", {"addr":data['to']})[0]['publickey'] if pubkey_expression.startswith("PublicKey(") and pubkey_expre...
import db import ssl import json from rsa import * import base64 def delete(obj, ip, data): message = db.messages.find("messages", {"id":data['id']}) pubkey_expression = db.nodes.find("nodes", {"addr":data['to']})[0]['publickey'] if pubkey_expression.startswith("PublicKey(") and pubkey_expression.endswith(...
none
1
2.630599
3
isi_mip/pages/migrations/0041_auto_20210525_1051.py
ISI-MIP/isimip
0
6625919
<filename>isi_mip/pages/migrations/0041_auto_20210525_1051.py<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2021-05-25 08:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pages', '0040_pape...
<filename>isi_mip/pages/migrations/0041_auto_20210525_1051.py<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2021-05-25 08:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pages', '0040_pape...
en
0.774162
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2021-05-25 08:51
1.237673
1
tensorflow_estimator/python/estimator/tpu/tpu_estimator_integration_test.py
pranve/estimator
0
6625920
<filename>tensorflow_estimator/python/estimator/tpu/tpu_estimator_integration_test.py<gh_stars>0 # Copyright 2021 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...
<filename>tensorflow_estimator/python/estimator/tpu/tpu_estimator_integration_test.py<gh_stars>0 # Copyright 2021 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...
en
0.805318
# Copyright 2021 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...
1.678806
2
src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py
jfcoz/azure-cli
0
6625921
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
en
0.761878
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
1.916876
2
src/balancing_platform/video_processing.py
amalieKo/Balancing-Platform
0
6625922
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Object tracking based on a HSV-mask, and will contour out the biggest object and find its coordinates in the x and y plane. Code by: <NAME>, Dated: 05.10-2018 Contact: <EMAIL> Website: https://github.com/magnusoy/Balancing-Platform """ # Importing packages import cv2 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Object tracking based on a HSV-mask, and will contour out the biggest object and find its coordinates in the x and y plane. Code by: <NAME>, Dated: 05.10-2018 Contact: <EMAIL> Website: https://github.com/magnusoy/Balancing-Platform """ # Importing packages import cv2 ...
en
0.792214
#!/usr/bin/env python # -*- coding: utf-8 -*- Object tracking based on a HSV-mask, and will contour out the biggest object and find its coordinates in the x and y plane. Code by: <NAME>, Dated: 05.10-2018 Contact: <EMAIL> Website: https://github.com/magnusoy/Balancing-Platform # Importing packages Finds biggest object...
3.183322
3
venv/lib/python3.6/site-packages/ansible_collections/community/aws/plugins/modules/aws_waf_web_acl.py
usegalaxy-no/usegalaxy
1
6625923
<filename>venv/lib/python3.6/site-packages/ansible_collections/community/aws/plugins/modules/aws_waf_web_acl.py #!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_fu...
<filename>venv/lib/python3.6/site-packages/ansible_collections/community/aws/plugins/modules/aws_waf_web_acl.py #!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_fu...
en
0.742233
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) module: aws_waf_web_acl short_description: Create and delete WAF Web ACLs. version_added: 1.0.0 description: - Read the AWS documentation for WAF U(https://aws.amazon...
1.810016
2
xetra/common/constants.py
Kenebehi/xetra-production-etl-pipeline
0
6625924
<reponame>Kenebehi/xetra-production-etl-pipeline """ File to store constants """ from enum import Enum class S3FileTypes(Enum): """ supported file types for S3BucketConnector """ CSV = 'csv' PARQUET = 'parquet' class MetaProcessFormat(Enum): """ formation for MetaProcess class """ ...
""" File to store constants """ from enum import Enum class S3FileTypes(Enum): """ supported file types for S3BucketConnector """ CSV = 'csv' PARQUET = 'parquet' class MetaProcessFormat(Enum): """ formation for MetaProcess class """ META_DATE_FORMAT = '%Y-%m-%d' META_PROCESS_D...
en
0.796934
File to store constants supported file types for S3BucketConnector formation for MetaProcess class
2.595341
3
tests/extensions/jwt/test_jwt.py
ssfdust/full-stack-flask-smorest
33
6625925
<reponame>ssfdust/full-stack-flask-smorest #!/usr/bin/env python # -*- coding: utf-8 -*- from flask import jsonify class TestJwt: def test_jwt_manager(self, app, db, monkeypatch, jwt): from app.extensions.jwt.uitls import add_token_to_database from flask_jwt_extended import create_access_token, j...
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import jsonify class TestJwt: def test_jwt_manager(self, app, db, monkeypatch, jwt): from app.extensions.jwt.uitls import add_token_to_database from flask_jwt_extended import create_access_token, jwt_required, current_user from app....
en
0.352855
#!/usr/bin/env python # -*- coding: utf-8 -*-
2.308673
2
sample_project/appmedia/views.py
dokterbob/django-admin-sortable
0
6625926
import os, os.path as osp from django.conf import settings from django.views.static import serve as django_serve from django.views.decorators.cache import cache_page from django.db.models import get_apps from django.core.cache import cache from django.http import Http404, HttpResponse def serve(request, app,...
import os, os.path as osp from django.conf import settings from django.views.static import serve as django_serve from django.views.decorators.cache import cache_page from django.db.models import get_apps from django.core.cache import cache from django.http import Http404, HttpResponse def serve(request, app,...
en
0.644785
#we get the models module here # this can happen only in case when models are an directory #continue #we get the models module here #we get the models module here
2.231952
2
scantools/.history/scanbak/scanbackup_20210224150857.py
Octoberr/swm0920
2
6625927
""" 1、文件到这里 一份给ES 一份给自己 新增ES旧索引入库 在继承原有功能的基础上 重构备份程序,按照数据内的 国家-当前时间(年-月-日) 如果按照数据内的时间的话也会面临和按国家端口备份的问题 不用再分端口了 create by judy 20201217 """ from pathlib import Path import threading import json from queue import Queue import traceback import datetime import time from shutil import copyfile import zipfile import shutil ...
""" 1、文件到这里 一份给ES 一份给自己 新增ES旧索引入库 在继承原有功能的基础上 重构备份程序,按照数据内的 国家-当前时间(年-月-日) 如果按照数据内的时间的话也会面临和按国家端口备份的问题 不用再分端口了 create by judy 20201217 """ from pathlib import Path import threading import json from queue import Queue import traceback import datetime import time from shutil import copyfile import zipfile import shutil ...
zh
0.970092
1、文件到这里 一份给ES 一份给自己 新增ES旧索引入库 在继承原有功能的基础上 重构备份程序,按照数据内的 国家-当前时间(年-月-日) 如果按照数据内的时间的话也会面临和按国家端口备份的问题 不用再分端口了 create by judy 20201217 # super().__init__() # 所有数据先到这 # 所有数据先复制一份到这, 这个是程序不用管的文件夹 # 将要备份的数据放到这, 要处理的数据全部放在这里 # 备份线程默认为一个,可以在配置里面更改重启 # 增加一个是否拷贝到ES的功能 # 文件是否需要拷贝一份到旧索引 # 需要用到的参数 # 文件锁,同一时间只允许一个线程操作文件 # 因为压缩可能处理的时间...
2.328407
2
venv/lib/python3.5/site-packages/igraph/test/bipartite.py
dtklinh/Protein-Rigid-Domains-Estimation
2
6625928
<filename>venv/lib/python3.5/site-packages/igraph/test/bipartite.py import unittest from igraph import * class BipartiteTests(unittest.TestCase): def testCreateBipartite(self): g = Graph.Bipartite([0, 1]*5, [(0,1),(2,3),(4,5),(6,7),(8,9)]) self.assertTrue(g.vcount() == 10 and g.ecount() == 5 and g....
<filename>venv/lib/python3.5/site-packages/igraph/test/bipartite.py import unittest from igraph import * class BipartiteTests(unittest.TestCase): def testCreateBipartite(self): g = Graph.Bipartite([0, 1]*5, [(0,1),(2,3),(4,5),(6,7),(8,9)]) self.assertTrue(g.vcount() == 10 and g.ecount() == 5 and g....
none
1
3.216071
3
frappe/core/doctype/role/role.py
jimmyrianto/frappe
5
6625929
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Role(Document): def before_rename(self, old, new, merge=False): if old in ("Guest", "Administrator", "System Ma...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Role(Document): def before_rename(self, old, new, merge=False): if old in ("Guest", "Administrator", "System Ma...
en
0.852487
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Get email addresses of all users that have been assigned this role
2.1158
2
src/Main.py
nekonyanneko/GA
0
6625930
# -*- coding: utf-8 -*- import random from scoop import futures from deap import base from deap import creator from deap import tools from deap import cma import Enum as enu import Employee as emp import Shift as shi import EvalShift as eva """ deap setting """ # 評価関数のFit率の重要度(小さい値の方が重要視される) creator.create("FitnessP...
# -*- coding: utf-8 -*- import random from scoop import futures from deap import base from deap import creator from deap import tools from deap import cma import Enum as enu import Employee as emp import Shift as shi import EvalShift as eva """ deap setting """ # 評価関数のFit率の重要度(小さい値の方が重要視される) creator.create("FitnessP...
ja
0.956138
# -*- coding: utf-8 -*- deap setting # 評価関数のFit率の重要度(小さい値の方が重要視される) creator.create("FitnessPeopleCount", base.Fitness, weights=( enu.EVA_WEIGHT_1, enu.EVA_WEIGHT_2, enu.EVA_WEIGHT_3, enu.EVA_WEIGHT_4, enu.EVA_WEIGHT_5, enu.EVA_WEIGHT_6, enu.EVA_WEIGHT_7, enu.EVA_WEIGHT_8, enu.EVA_WEIGHT_9,...
1.775223
2
Leetcode/0515. Find Largest Value in Each Tree Row/0515.py
Next-Gen-UI/Code-Dynamics
0
6625931
<filename>Leetcode/0515. Find Largest Value in Each Tree Row/0515.py class Solution: def largestValues(self, root: Optional[TreeNode]) -> List[int]: if not root: return [] ans = [] q = deque([root]) while q: maxi = -math.inf for _ in range(len(q)): root = q.popleft() ...
<filename>Leetcode/0515. Find Largest Value in Each Tree Row/0515.py class Solution: def largestValues(self, root: Optional[TreeNode]) -> List[int]: if not root: return [] ans = [] q = deque([root]) while q: maxi = -math.inf for _ in range(len(q)): root = q.popleft() ...
none
1
3.549036
4
ode/Development/emulatedClientApps/SituationalDataApp/tests/test_ODE_Multiple_Clients.py
OSADP/SEMI-ODE
0
6625932
<reponame>OSADP/SEMI-ODE import unittest import sys import os import json import logging import time import datetime from __init__ import LogThisTestCase import testRunnerHelper try: import odeClient except: current_file_path = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(1, os.path.join(cur...
import unittest import sys import os import json import logging import time import datetime from __init__ import LogThisTestCase import testRunnerHelper try: import odeClient except: current_file_path = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(1, os.path.join(current_file_path, '..', '.....
en
0.265533
# TODO Assert Something # Assert Location and Date time is correct # assert # self.logger.info( m.toJson() ) # self.logger.info( m.toJson()) # TODO Assert Something # Assert Location and Date time is correct # assert # self.logger.info( m.toJson() ) # self.logger.info( m.toJson()) # self.assertGreaterEqual(len(msg1), 5...
2.238812
2
powerdown_startup.py
Wish1991/Python
1
6625933
# Script Name : powerdown_startup.py # Author : <NAME> # Created : 05th January 2012 # Last Modified : 21th September 2017 # Version : 1.0 # Modifications : # Description : This goes through the server list and pings the machine, if it's up it will load the putty session, if its not it will noti...
# Script Name : powerdown_startup.py # Author : <NAME> # Created : 05th January 2012 # Last Modified : 21th September 2017 # Version : 1.0 # Modifications : # Description : This goes through the server list and pings the machine, if it's up it will load the putty session, if its not it will noti...
en
0.743449
# Script Name : powerdown_startup.py # Author : <NAME> # Created : 05th January 2012 # Last Modified : 21th September 2017 # Version : 1.0 # Modifications : # Description : This goes through the server list and pings the machine, if it's up it will load the putty session, if its not it will notify...
3.166847
3
2021.4/runs/benchmark/bionetwork/cobra_models/bionetwork.py
CIDARLAB/genetic-circuit-partitioning
1
6625934
<filename>2021.4/runs/benchmark/bionetwork/cobra_models/bionetwork.py ''' -------------------------------------------------------------------------------- Description: Roadmap: Written by <NAME> <<EMAIL>>, DAMP Lab 2020 -------------------------------------------------------------------------------- ''' import cobra i...
<filename>2021.4/runs/benchmark/bionetwork/cobra_models/bionetwork.py ''' -------------------------------------------------------------------------------- Description: Roadmap: Written by <NAME> <<EMAIL>>, DAMP Lab 2020 -------------------------------------------------------------------------------- ''' import cobra i...
en
0.449962
-------------------------------------------------------------------------------- Description: Roadmap: Written by <NAME> <<EMAIL>>, DAMP Lab 2020 -------------------------------------------------------------------------------- # graph = nx.DiGraph() # input_model = cobra.io.read_sbml_model("e_coli_core.xml") # for reac...
2.154191
2
updater.py
The-Hacker894/LOG-A-PING
0
6625935
<filename>updater.py # # #Made by https://github.com/iraizo # # import requests import sys import time import subprocess import config from git import Repo url = str(config.versionurl) r = requests.get(url) cache = r.text # version with dots currentversion = cache.replace(".", "") # version without dots try: # ge...
<filename>updater.py # # #Made by https://github.com/iraizo # # import requests import sys import time import subprocess import config from git import Repo url = str(config.versionurl) r = requests.get(url) cache = r.text # version with dots currentversion = cache.replace(".", "") # version without dots try: # ge...
en
0.830052
# # #Made by https://github.com/iraizo # # # version with dots # version without dots # getting local version.txt to compare it /read it # if version.txt isnt found # removing dots # checking if new version is available # asking for path
3.097164
3
crypto/frank/src/client.py
cclauss/fbctf-2019-challenges
213
6625936
<gh_stars>100-1000 import binascii import os import socket from collections import defaultdict import crypto class RemoteServer(object): def __init__(self, host, port): self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._sock.connect((host, port)) def _get_line_str(self): ...
import binascii import os import socket from collections import defaultdict import crypto class RemoteServer(object): def __init__(self, host, port): self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._sock.connect((host, port)) def _get_line_str(self): out = b'' ...
none
1
3.062675
3
pyleecan/Methods/Geometry/Arc1/reverse.py
IrakozeFD/pyleecan
95
6625937
<reponame>IrakozeFD/pyleecan<filename>pyleecan/Methods/Geometry/Arc1/reverse.py def reverse(self): """Reverse the begin and end point of the Line Parameters ---------- self : Arc1 An Arc1 object Returns ------- """ end = self.end self.end = self.begin self.begin = end ...
def reverse(self): """Reverse the begin and end point of the Line Parameters ---------- self : Arc1 An Arc1 object Returns ------- """ end = self.end self.end = self.begin self.begin = end self.radius = -self.radius self.is_trigo_direction = not self.is_trigo_d...
en
0.357807
Reverse the begin and end point of the Line Parameters ---------- self : Arc1 An Arc1 object Returns -------
3.917638
4
Neural Machine Translation/search/__init__.py
jtianesq/protein-prediction-nmt-evo
0
6625938
<filename>Neural Machine Translation/search/__init__.py<gh_stars>0 # __init__.py from .beam import beam from utils import flatten, pack_sequence_as __all__ = ["beam", "select_nbest"] # nested: a nested structure of shape batch * dim # indices: indices to select def select_nbest(nested, indices): if not isinsta...
<filename>Neural Machine Translation/search/__init__.py<gh_stars>0 # __init__.py from .beam import beam from utils import flatten, pack_sequence_as __all__ = ["beam", "select_nbest"] # nested: a nested structure of shape batch * dim # indices: indices to select def select_nbest(nested, indices): if not isinsta...
en
0.645207
# __init__.py # nested: a nested structure of shape batch * dim # indices: indices to select
2.446321
2
examples/excelExpr.py
james-emerton/pyparsing
2
6625939
# excelExpr.py # # Copyright 2010, <NAME> # # A partial implementation of a parser of Excel formula expressions. # from pyparsing import (CaselessKeyword, Suppress, Word, alphas, alphanums, nums, Optional, Group, oneOf, Forward, Regex, infixNotation, opAssoc, dblQuotedString, delimitedList, Com...
# excelExpr.py # # Copyright 2010, <NAME> # # A partial implementation of a parser of Excel formula expressions. # from pyparsing import (CaselessKeyword, Suppress, Word, alphas, alphanums, nums, Optional, Group, oneOf, Forward, Regex, infixNotation, opAssoc, dblQuotedString, delimitedList, Com...
en
0.555142
# excelExpr.py # # Copyright 2010, <NAME> # # A partial implementation of a parser of Excel formula expressions. # \ =3*A7+5 =3*Sheet1!$A$7+5 =3*'Sheet 1'!$A$7+5" =3*'O''Reilly''s sheet'!$A$7+5 =if(Sum(A1:A25)>42,Min(B1:B25),if(Sum(C1:C25)>3.14, (Min(C1:C25)+3)*18,Max(B1:B25))) =sum(a1:a25...
2.723086
3
code/Experiments/neon-master/neon/backends/nervanacpu.py
matthijsvk/convNets
53
6625940
# ---------------------------------------------------------------------------- # Copyright 2014-2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
# ---------------------------------------------------------------------------- # Copyright 2014-2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
en
0.694363
# ---------------------------------------------------------------------------- # Copyright 2014-2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
1.822438
2
config/settings/base.py
Billykat7/btkweathers
0
6625941
import os import configparser from pathlib import Path from decouple import config BASE_DIR = os.path.dirname( os.path.dirname( os.path.dirname( os.path.abspath(__file__) ...
import os import configparser from pathlib import Path from decouple import config BASE_DIR = os.path.dirname( os.path.dirname( os.path.dirname( os.path.abspath(__file__) ...
en
0.620971
# Application definition # API # 3rd party Apps # Project's Apps # DATABASE_ROUTERS = ['config.router.AuthRouter'] # Password validation # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators # Internationalization # https://docs.djangoproject.com/en/3.1/topics/i18n/ # Static files (CSS, JavaScr...
1.75915
2
scripts/speechToText.py
UNICEF-AI-For-Child-Online-Violence/AI-for-child-online-violence
3
6625942
from google.cloud import speech import os import io import libs.Constants import wave import contextlib __file__ = libs.Constants.FILE_PATH os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = libs.Constants.GOOGLE_APPLICATION_CREDENTIALS def frame_rate_channel(audio_file_name): print(audio_file_name) with wave.o...
from google.cloud import speech import os import io import libs.Constants import wave import contextlib __file__ = libs.Constants.FILE_PATH os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = libs.Constants.GOOGLE_APPLICATION_CREDENTIALS def frame_rate_channel(audio_file_name): print(audio_file_name) with wave.o...
en
0.857668
# Creates google client # Full path of the audio file, Replace with your file name # file_name = os.path.join(os.path.dirname(__file__),"test.wav") #Loads the audio file into memory # Sends the request to google to transcribe the audio # Reads the response Transcribe the given audio file asynchronously. Note that trans...
3.192695
3
setup.py
elParaguayo/qtile-widget-unitstatus
2
6625943
from setuptools import setup setup( name='qtile-widget-unitstatus', packages=['unitstatus'], version='0.1.0', description='A widget to show status of systemd unit', author='elParaguayo', url='https://github.com/elparaguayo/qtile-widget-unitstatus', license='MIT', install_requires=['qtil...
from setuptools import setup setup( name='qtile-widget-unitstatus', packages=['unitstatus'], version='0.1.0', description='A widget to show status of systemd unit', author='elParaguayo', url='https://github.com/elparaguayo/qtile-widget-unitstatus', license='MIT', install_requires=['qtil...
none
1
1.383459
1
csv_utils.py
zionchao/AutoPublish
3
6625944
# @author zhangchao # @date 2020/5/30 14:18 import csv def read_contents(file_path,codec="utf-8"): contents = [] with open(file_path, newline='\n', encoding=codec) as csv_file: rows = csv.reader(csv_file) for i, row in enumerate(rows): if i == 0: continue ...
# @author zhangchao # @date 2020/5/30 14:18 import csv def read_contents(file_path,codec="utf-8"): contents = [] with open(file_path, newline='\n', encoding=codec) as csv_file: rows = csv.reader(csv_file) for i, row in enumerate(rows): if i == 0: continue ...
zh
0.781692
# @author zhangchao # @date 2020/5/30 14:18 # 1. 创建文件对象 # 2. 基于文件对象构建 csv写入对象 # 3. 构建列表头 # 4. 写入csv文件内容
3.086559
3
raspberryPi/stream_client.py
albert0329/Final_project
3,417
6625945
<reponame>albert0329/Final_project<gh_stars>1000+ import io import socket import struct import time import picamera # create socket and bind host client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client_socket.connect(('192.168.1.100', 8000)) connection = client_socket.makefile('wb') try: with p...
import io import socket import struct import time import picamera # create socket and bind host client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client_socket.connect(('192.168.1.100', 8000)) connection = client_socket.makefile('wb') try: with picamera.PiCamera() as camera: camera.resolu...
en
0.701981
# create socket and bind host # pi camera resolution # 15 frames/sec # give 2 secs for camera to initilize # send jpeg format video stream
2.748872
3
css/models.py
jasonsawatzky/CSS
0
6625946
<reponame>jasonsawatzky/CSS from django.db import models from django.contrib.auth.models import User from django.contrib.auth.models import Group from django.conf import settings import MySQLdb import re from django.db import IntegrityError from django.core.exceptions import ValidationError, ObjectDoesNotExist from uti...
from django.db import models from django.contrib.auth.models import User from django.contrib.auth.models import Group from django.conf import settings import MySQLdb import re from django.db import IntegrityError from django.core.exceptions import ValidationError, ObjectDoesNotExist from util import DepartmentSettings ...
en
0.852421
# System User class, # Wrapper for django builtin class, contains user + application specific data # Password must: # be 8-32 chars, have: 1 alphachar, 1 digit, 1 specialchar #$%^&*?+])[A-Za-z0-9-._!@#$%^&*?+]{8,32}$', password) is None: # If user is faculty, create an associated faculty details # Target work hours and...
2.151053
2
piece.py
fdusek/Checkers
0
6625947
<gh_stars>0 from enums import * class Piece(object): def __init__(self, piece_type): if isinstance(piece_type, Piece_type): self.ptype = piece_type else: raise ValueError("Piece type has to be instance of 'class Piece_type (Enum)' it is " + str(piece_type)) def promoted(self): piece_type = s...
from enums import * class Piece(object): def __init__(self, piece_type): if isinstance(piece_type, Piece_type): self.ptype = piece_type else: raise ValueError("Piece type has to be instance of 'class Piece_type (Enum)' it is " + str(piece_type)) def promoted(self): piece_type = self.ptype ...
en
0.816938
# this piece can move in all diagonal directions # this piece can move up diagonally # this piece can move down diagonally # print(self.ptype)
3.397829
3
setup.py
vd2org/runigma
1
6625948
# Copyright (C) 2016-2019 by Vd. # Copyright (C) 2012 by <NAME>. # This file is part of RuNigma, the RuNigma Machine. # RuNigma is released under the MIT License (see LICENSE). import setuptools from os.path import join, dirname import runigma setuptools.setup( name='runigma', version=runigma.__version__, ...
# Copyright (C) 2016-2019 by Vd. # Copyright (C) 2012 by <NAME>. # This file is part of RuNigma, the RuNigma Machine. # RuNigma is released under the MIT License (see LICENSE). import setuptools from os.path import join, dirname import runigma setuptools.setup( name='runigma', version=runigma.__version__, ...
en
0.865082
# Copyright (C) 2016-2019 by Vd. # Copyright (C) 2012 by <NAME>. # This file is part of RuNigma, the RuNigma Machine. # RuNigma is released under the MIT License (see LICENSE).
1.309097
1
dvc/cache/gdrive.py
Christoph-1/dvc
0
6625949
from .base import CloudCache class GDriveCache(CloudCache): DEFAULT_VERIFY = True
from .base import CloudCache class GDriveCache(CloudCache): DEFAULT_VERIFY = True
none
1
1.335187
1
e2e/scripts/st_arrow_table_styling.py
ChangHoon-Sung/streamlit
1
6625950
# Copyright 2018-2022 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# Copyright 2018-2022 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
en
0.748949
# Copyright 2018-2022 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
3.379432
3