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
python/calc_sum.py
lukasjoc/scritps
0
6627851
<reponame>lukasjoc/scritps<gh_stars>0 def factorize(lol, facts): for k, v in facts.items(): if v > 1: lol.append(k**v) else: lol.append(k) prod = 1 for factor in lol: prod = prod * factor return prod if __name__ == "__main__": facts = {7: 1, 5113051:...
def factorize(lol, facts): for k, v in facts.items(): if v > 1: lol.append(k**v) else: lol.append(k) prod = 1 for factor in lol: prod = prod * factor return prod if __name__ == "__main__": facts = {7: 1, 5113051: 1} lol = [] print(factorize(l...
none
1
3.491346
3
nlp_models.py
Spotify-Song-3/data-science
0
6627852
import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer nltk.download('vader_lexicon') nltk.download('punkt') sid = SentimentIntensityAnalyzer() import spacy from spacy.tokenizer import Tokenizer nlp = spacy.load("en_core_web_lg") tokenizer = Tokenizer(nlp.vocab) STOP_WORDS = nlp.Defaults.stop_words i...
import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer nltk.download('vader_lexicon') nltk.download('punkt') sid = SentimentIntensityAnalyzer() import spacy from spacy.tokenizer import Tokenizer nlp = spacy.load("en_core_web_lg") tokenizer = Tokenizer(nlp.vocab) STOP_WORDS = nlp.Defaults.stop_words i...
en
0.525063
Processes the text via spacy # Stemming Gets lemmas for text Processes the text via spacy # Lemmatization
2.97175
3
5_Functions/B_parameters.py
Oscar-Oliveira/Python3
0
6627853
""" Parameters """ def write_names(value1, value2): print("{} : {}".format(value1, value2)) def print_max(value1, value2): if value1 >= value2: print(value1) else: print(value2) def say(value, qty): print(value * qty) write_names("Student1", "123") write_names("Stude...
""" Parameters """ def write_names(value1, value2): print("{} : {}".format(value1, value2)) def print_max(value1, value2): if value1 >= value2: print(value1) else: print(value2) def say(value, qty): print(value * qty) write_names("Student1", "123") write_names("Stude...
ta
0.050049
Parameters
3.889729
4
scripts/update-helm.py
mkorthof/wg-access-server
0
6627854
<gh_stars>0 #!/usr/bin/env python3 # This script is intended to be run within GitHub Actions, triggered after new tags have been created. # It updates the version in the Helm Chart, packages it, renders the k8s quickstart.yaml, then commits and pushes everything. # A separate workflow triggered on pushes should then p...
#!/usr/bin/env python3 # This script is intended to be run within GitHub Actions, triggered after new tags have been created. # It updates the version in the Helm Chart, packages it, renders the k8s quickstart.yaml, then commits and pushes everything. # A separate workflow triggered on pushes should then publish the c...
en
0.788305
#!/usr/bin/env python3 # This script is intended to be run within GitHub Actions, triggered after new tags have been created. # It updates the version in the Helm Chart, packages it, renders the k8s quickstart.yaml, then commits and pushes everything. # A separate workflow triggered on pushes should then publish the ch...
2.221245
2
classes/manpage.py
ravermeister/xmpp-chatbot
1
6627855
# coding=utf-8 from common.strings import StaticAnswers # Linux Manpages Request class ManPageRequest: """ > query the Linux Manpages for the given argument """ def __init__(self, static_answers: StaticAnswers): # init all necessary variables self.static_answers = static_answers self.target, self.opt_arg = ...
# coding=utf-8 from common.strings import StaticAnswers # Linux Manpages Request class ManPageRequest: """ > query the Linux Manpages for the given argument """ def __init__(self, static_answers: StaticAnswers): # init all necessary variables self.static_answers = static_answers self.target, self.opt_arg = ...
en
0.315484
# coding=utf-8 # Linux Manpages Request > query the Linux Manpages for the given argument # init all necessary variables # noinspection PyUnusedLocal
3.061816
3
src/transmute/transmute.py
JohnStyleZ/botty
1
6627856
from asyncore import loop import itertools from random import randint, random import threading from config import Config from .inventory_collection import InventoryCollection from .stash import Stash from .gem_picking import SimpleGemPicking from item.item_finder import ItemFinder from screen import Screen from ui.ui_m...
from asyncore import loop import itertools from random import randint, random import threading from config import Config from .inventory_collection import InventoryCollection from .stash import Stash from .gem_picking import SimpleGemPicking from item.item_finder import ItemFinder from screen import Screen from ui.ui_m...
en
0.630254
#: {self._game_stats._game_counter}")
2.013327
2
models/api.py
suricactus/qgis-stac-browser
0
6627857
<reponame>suricactus/qgis-stac-browser<filename>models/api.py import re from urllib.parse import urlparse from .collection import Collection from .link import Link from .search_result import SearchResult from ..utils import network class API: def __init__(self, json=None): self._json = json self._...
import re from urllib.parse import urlparse from .collection import Collection from .link import Link from .search_result import SearchResult from ..utils import network class API: def __init__(self, json=None): self._json = json self._data = self._json.get('data', None) self._collections ...
none
1
2.5854
3
trust_stores_observatory/certificates_repository.py
stefanb/trust_stores_observatory
0
6627858
from binascii import hexlify from pathlib import Path import os from typing import Union, List from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.hashes import SHA256 from cryptography.hazmat.primitives.serialization import En...
from binascii import hexlify from pathlib import Path import os from typing import Union, List from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.hashes import SHA256 from cryptography.hazmat.primitives.serialization import En...
en
0.899665
A local folder where we store as many root certificates (as PEM files) as possible. # Parse each certificate so we can look them up with SHA1 # Parse the certificate to double check the fingerprint Store the supplied certificate as a PEM file. # A given certificate's path is always <SHA-256>.pem. # If the cert is NOT a...
2.580744
3
LargeScaleDeployment/fortimanager/fmg_api/vpn_manager.py
dmitryperets/testbeds
11
6627859
#!/usr/bin/env python3 from fmg_api.api_base import ApiSession class VpnManagerApi(ApiSession): ############################################################## # Add Overlay ############################################################## def addOverlay(self, overlay_name, hub_name, spoke_group, wan_int...
#!/usr/bin/env python3 from fmg_api.api_base import ApiSession class VpnManagerApi(ApiSession): ############################################################## # Add Overlay ############################################################## def addOverlay(self, overlay_name, hub_name, spoke_group, wan_int...
de
0.821471
#!/usr/bin/env python3 ############################################################## # Add Overlay ############################################################## ############################################################## # Update Overlay ############################################################## ##############...
1.892488
2
src/aioauth/base/server.py
danygielow/aioauth
0
6627860
<filename>src/aioauth/base/server.py from typing import Dict, Optional, Type, Union from ..grant_type import ( AuthorizationCodeGrantType, ClientCredentialsGrantType, GrantTypeBase, PasswordGrantType, RefreshTokenGrantType, ) from ..response_type import ( ResponseTypeAuthorizationCode, Resp...
<filename>src/aioauth/base/server.py from typing import Dict, Optional, Type, Union from ..grant_type import ( AuthorizationCodeGrantType, ClientCredentialsGrantType, GrantTypeBase, PasswordGrantType, RefreshTokenGrantType, ) from ..response_type import ( ResponseTypeAuthorizationCode, Resp...
none
1
1.992781
2
test/manual/workflows_scaling.py
BalthazarPavot/galaxy_project_reports
1
6627861
import functools import json import os import random import sys from threading import Thread from uuid import uuid4 galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) sys.path[1:1] = [ os.path.join( galaxy_root, "lib" ), os.path.join( galaxy_root, "test" ) ] try: ...
import functools import json import os import random import sys from threading import Thread from uuid import uuid4 galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) sys.path[1:1] = [ os.path.join( galaxy_root, "lib" ), os.path.join( galaxy_root, "test" ) ] try: ...
none
1
2.368937
2
starter_console.py
a-doom/address-converter
0
6627862
<filename>starter_console.py from address_converter.converter import Converter import argparse import sys def main(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description='''\ Address string parser Returns a list of separated values into output fi...
<filename>starter_console.py from address_converter.converter import Converter import argparse import sys def main(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description='''\ Address string parser Returns a list of separated values into output fi...
en
0.454603
\ Address string parser Returns a list of separated values into output file: [<input text>];[<resulting formatted address>];<ID address objects>...
3.425565
3
data_gather/get_movie_metadata.py
bkimmig/data-mining-project
1
6627863
import numpy as np import pandas as pd import json import requests # ------------------------------------------------------------------ # # Gather the data from the movie_metadata.csv file. This was # downloaded from Kaggle # https://www.kaggle.com/deepmatrix/imdb-5000-movie-dataset # We will use this movie list to...
import numpy as np import pandas as pd import json import requests # ------------------------------------------------------------------ # # Gather the data from the movie_metadata.csv file. This was # downloaded from Kaggle # https://www.kaggle.com/deepmatrix/imdb-5000-movie-dataset # We will use this movie list to...
en
0.621424
# ------------------------------------------------------------------ # # Gather the data from the movie_metadata.csv file. This was # downloaded from Kaggle # https://www.kaggle.com/deepmatrix/imdb-5000-movie-dataset # We will use this movie list to gather synopses and genres for each # movie, from the OMDB API, in thi...
3.222292
3
gene/analysis/fisher_exact.py
tbj128/gene-expression-analyzer
0
6627864
<reponame>tbj128/gene-expression-analyzer<gh_stars>0 # =========================================== # # mian Analysis Data Mining/ML Library # @author: tbj128 # # =========================================== # # Imports # # # ======== R specific setup ========= # import rpy2.robjects as robjects import rpy2.rlike.cont...
# =========================================== # # mian Analysis Data Mining/ML Library # @author: tbj128 # # =========================================== # # Imports # # # ======== R specific setup ========= # import rpy2.robjects as robjects import rpy2.rlike.container as rlc from rpy2.robjects.packages import Signa...
en
0.448911
# =========================================== # # mian Analysis Data Mining/ML Library # @author: tbj128 # # =========================================== # # Imports # # # ======== R specific setup ========= # fisher_exact <- function(base, groups, cat2, cat1, minthreshold) { if (ncol(base) <= 0) { ...
2.188932
2
pineboolib/application/utils/check_dependencies.py
deavid/pineboo
2
6627865
<gh_stars>1-10 # -*- coding: utf-8 -*- """Check the application dependencies.""" import sys from pineboolib.core.utils import logging from pineboolib.core.utils.utils_base import is_deployed from pineboolib.core.utils.check_dependencies import get_dependency_errors from pineboolib.core.utils.check_dependencies import ...
# -*- coding: utf-8 -*- """Check the application dependencies.""" import sys from pineboolib.core.utils import logging from pineboolib.core.utils.utils_base import is_deployed from pineboolib.core.utils.check_dependencies import get_dependency_errors from pineboolib.core.utils.check_dependencies import DependencyCheck...
en
0.734964
# -*- coding: utf-8 -*- Check the application dependencies. Check if a package is installed and return the result. @param dict_. Dict with the name of the agency and the module to be checked. @param exit . Exit if dependence fails.
2.179031
2
lm/evaluator.py
aistairc/lm_syntax_negative
3
6627866
import torch from lm_trainer import TokenNegLossCalculator import utils class Evaluator(object): def __init__(self, pad_id): self.pad_id = pad_id class DocumentEvaluator(Evaluator): def __init__(self, bptt, pad_id): super().__init__(pad_id) self.bptt = bptt def evaluate(self, ...
import torch from lm_trainer import TokenNegLossCalculator import utils class Evaluator(object): def __init__(self, pad_id): self.pad_id = pad_id class DocumentEvaluator(Evaluator): def __init__(self, bptt, pad_id): super().__init__(pad_id) self.bptt = bptt def evaluate(self, ...
en
0.691408
# Turn on evaluation mode which disables dropout. exclude: excluded token index. exclude=[0, -1, -2] means excluding first, last tokens, and eos. # neg_loss_calculator should only be used during training. # exclude, on the other hand, should only be used for testing. # margin_loss, n_correct = self._margin_loss...
2.356591
2
azure/Kqlmagic/kusto_engine.py
lupino3/jupyter-Kqlmagic
0
6627867
<reponame>lupino3/jupyter-Kqlmagic # ------------------------------------------------------------------------- # 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. # -------------------------------------------------------------------------- from Kqlm...
en
0.662444
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # Constant...
1.897387
2
src/python/nimbusml/examples/examples_from_dataframe/OnnxRunner_df.py
montehoover/NimbusML
134
6627868
import os import tempfile import numpy as np import pandas as pd from nimbusml import Pipeline from nimbusml.preprocessing import OnnxRunner from nimbusml.preprocessing.normalization import MinMaxScaler def get_tmp_file(suffix=None): fd, file_name = tempfile.mkstemp(suffix=suffix) fl = os.fdopen(fd, 'w') ...
import os import tempfile import numpy as np import pandas as pd from nimbusml import Pipeline from nimbusml.preprocessing import OnnxRunner from nimbusml.preprocessing.normalization import MinMaxScaler def get_tmp_file(suffix=None): fd, file_name = tempfile.mkstemp(suffix=suffix) fl = os.fdopen(fd, 'w') ...
en
0.665048
# Generate the train and test data # Fit a MinMaxScaler Pipeline # Export the pipeline to ONNX # Perform the transform using the standard ML.Net backend # c1 c2 # 0 0.025025 0.000998 # 1 0.305305 0.000998 # Perform the transform using the ONNX backend. # Note, the extra columns and column name diffe...
2.776532
3
misc/renNumPlDl.py
gxjit/PyUtils
0
6627869
import argparse import pathlib import re def parseArgs(): def dirPath(pth): pthObj = pathlib.Path(pth) if pthObj.is_dir(): return pthObj else: raise argparse.ArgumentTypeError("Invalid Directory path") parser = argparse.ArgumentParser(description="Does Stuff.")...
import argparse import pathlib import re def parseArgs(): def dirPath(pth): pthObj = pathlib.Path(pth) if pthObj.is_dir(): return pthObj else: raise argparse.ArgumentTypeError("Invalid Directory path") parser = argparse.ArgumentParser(description="Does Stuff.")...
en
0.191729
# print("\n----") # print(file.stem) # print(newName) # print("----\n")
3.304115
3
NightlyTests/torch/test_ignoring_layers_for_quantization_MNIST.py
Rohan-Chaudhury/aimet
3
6627870
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2018, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2018, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
en
0.667523
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2018, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
1.058817
1
src/parser.py
copyrosicky/MlbEngagementCompetition
7
6627871
# import ujson import json import pandas as pd from src.row import Row def _to_datetime(d): if 'date' in d: date = d['date'] else: date = d.name return pd.to_datetime(date, format='%Y%m%d').to_numpy() def parse_row(row: pd.Series): def _parse(_row, idx): if idx in _row and ...
# import ujson import json import pandas as pd from src.row import Row def _to_datetime(d): if 'date' in d: date = d['date'] else: date = d.name return pd.to_datetime(date, format='%Y%m%d').to_numpy() def parse_row(row: pd.Series): def _parse(_row, idx): if idx in _row and ...
fr
0.344587
# import ujson
2.722677
3
web/forms.py
Hedwika/Czechitas-Data-Games
1
6627872
import math from datetime import datetime from django import forms from web import models from web.models import Assignment class RightAnswer(forms.Form): answer = forms.CharField(max_length=200, label="", widget=forms.TextInput(attrs={"class": "form-control"})) assignment: mode...
import math from datetime import datetime from django import forms from web import models from web.models import Assignment class RightAnswer(forms.Form): answer = forms.CharField(max_length=200, label="", widget=forms.TextInput(attrs={"class": "form-control"})) assignment: mode...
none
1
2.368672
2
garbo/storage/__init__.py
natict/garbo
1
6627873
<filename>garbo/storage/__init__.py __author__ = 'nati'
<filename>garbo/storage/__init__.py __author__ = 'nati'
none
1
1.076472
1
markov_slackbot/main.py
bigshebang/clovis
0
6627874
<reponame>bigshebang/clovis # -*- coding: utf-8 -*- import json from os import path, makedirs, walk from markov_slackbot.markov_slackbot import MarkovSlackbot def markov_slackbot(config_file): """API equivalent to using markov_slackbot at the command line. :param config_file: User configuration path file. ...
# -*- coding: utf-8 -*- import json from os import path, makedirs, walk from markov_slackbot.markov_slackbot import MarkovSlackbot def markov_slackbot(config_file): """API equivalent to using markov_slackbot at the command line. :param config_file: User configuration path file. """ config = json.l...
en
0.677073
# -*- coding: utf-8 -*- API equivalent to using markov_slackbot at the command line. :param config_file: User configuration path file. Create an example config file. Prepare the environment for the bot.
2.791404
3
pytmpdir/DirectoryTest.py
brentonford/pytmpdir
0
6627875
<reponame>brentonford/pytmpdir # Created by Synerty Pty Ltd # Copyright (C) 2013-2017 Synerty Pty Ltd (Australia) # # This software is open source, the MIT license applies. # # Website : http://www.synerty.com # Support : <EMAIL> import os import random import string import unittest from tempfile import mkstemp from...
# Created by Synerty Pty Ltd # Copyright (C) 2013-2017 Synerty Pty Ltd (Australia) # # This software is open source, the MIT license applies. # # Website : http://www.synerty.com # Support : <EMAIL> import os import random import string import unittest from tempfile import mkstemp from pytmpdir.Directory import Direc...
en
0.739476
# Created by Synerty Pty Ltd # Copyright (C) 2013-2017 Synerty Pty Ltd (Australia) # # This software is open source, the MIT license applies. # # Website : http://www.synerty.com # Support : <EMAIL> # print "Creating new path %s" % newPath # Create files with bad paths # Create a file that already exists
2.322644
2
library/azure_rm_cdnprofile_facts.py
mc-corey50/Azure-Ansible
0
6627876
<filename>library/azure_rm_cdnprofile_facts.py #!/usr/bin/python # # Copyright (c) 2018 <NAME>, <<EMAIL>>, <NAME> <<EMAIL>> # # 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_function __metaclass__ = type ANSIBLE_META...
<filename>library/azure_rm_cdnprofile_facts.py #!/usr/bin/python # # Copyright (c) 2018 <NAME>, <<EMAIL>>, <NAME> <<EMAIL>> # # 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_function __metaclass__ = type ANSIBLE_META...
en
0.63955
#!/usr/bin/python # # Copyright (c) 2018 <NAME>, <<EMAIL>>, <NAME> <<EMAIL>> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- module: azure_rm_cdnprofile_facts version_added: "2.8" short_description: Get Azure CDN profile facts description: - Get facts for a spec...
2.109573
2
pyinfra/facts/util/packaging.py
ryan109/pyinfra
1
6627877
# pyinfra # File: pyinfra/facts/util/packaging.py # Desc: common functions for packaging facts import re def parse_packages(regex, output, lower=True): packages = {} for line in output: matches = re.match(regex, line) if matches: # Sort out name name = matches.group(...
# pyinfra # File: pyinfra/facts/util/packaging.py # Desc: common functions for packaging facts import re def parse_packages(regex, output, lower=True): packages = {} for line in output: matches = re.match(regex, line) if matches: # Sort out name name = matches.group(...
en
0.649417
# pyinfra # File: pyinfra/facts/util/packaging.py # Desc: common functions for packaging facts # Sort out name
2.746058
3
Adversarial Label Learning/experiments/default_reader.py
VTCSML/Adversarial-Label-Learning
1
6627878
<filename>Adversarial Label Learning/experiments/default_reader.py import numpy as np import json def create_weak_signal_view(path, views, load_and_process_data): """ :param path: relative path to the dataset :type: string :param views: dictionary containing the index of the weak signals where t...
<filename>Adversarial Label Learning/experiments/default_reader.py import numpy as np import json def create_weak_signal_view(path, views, load_and_process_data): """ :param path: relative path to the dataset :type: string :param views: dictionary containing the index of the weak signals where t...
en
0.679768
:param path: relative path to the dataset :type: string :param views: dictionary containing the index of the weak signals where the keys are numbered from 0 :type: dict :param load_and_process_data: method that loads the dataset and process it into a table form :type: function :return: tup...
3.085178
3
gcloud/iam_auth/resource_helpers/base.py
springborland/bk-sops
1
6627879
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this fi...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
en
0.864615
# -*- coding: utf-8 -*- Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compli...
1.768611
2
var/spack/repos/builtin/packages/timedatex/package.py
player1537-forks/spack
11
6627880
<reponame>player1537-forks/spack<filename>var/spack/repos/builtin/packages/timedatex/package.py # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * clas...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Timedatex(MakefilePackage): """timedatex is a D-Bus service that implements the org.fr...
en
0.788173
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) timedatex is a D-Bus service that implements the org.freedesktop.timedate1 interface. It can be used to read and se...
2.073464
2
dynamo/plot/scPotential.py
davisidarta/dynamo-release
0
6627881
<reponame>davisidarta/dynamo-release from ..tools.utils import update_dict from .utils import save_fig def show_landscape(adata, Xgrid, Ygrid, Zgrid, basis="umap", save_show_or_return='show', save_kwargs={...
from ..tools.utils import update_dict from .utils import save_fig def show_landscape(adata, Xgrid, Ygrid, Zgrid, basis="umap", save_show_or_return='show', save_kwargs={}, ): """Plot ...
en
0.585851
Plot the quasi-potential landscape. Parameters ---------- adata: :class:`~anndata.AnnData` AnnData object that contains Xgrid, Ygrid and Zgrid data for visualizing potential landscape. Xgrid: `numpy.ndarray` x-coordinates of the Grid produced from the meshgrid function. ...
2.634554
3
arcrest/projections.py
Esri/arcpy-server-util-rest
10
6627882
import os class Projection(object): def __init__(self): self._name_mapping = {} for key, val in self._projections.items(): self._name_mapping[int(val)] = key setattr(self, key.replace('-', '_'), val) def __getitem__(self, index): return self._name_mappin...
import os class Projection(object): def __init__(self): self._name_mapping = {} for key, val in self._projections.items(): self._name_mapping[int(val)] = key setattr(self, key.replace('-', '_'), val) def __getitem__(self, index): return self._name_mappin...
none
1
3.147694
3
neural_sp/models/modules/causal_conv.py
ishine/neural_sp
577
6627883
# Copyright 2020 Kyoto University (<NAME>) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Dilated causal convolution.""" import logging import torch.nn as nn from neural_sp.models.modules.initialization import init_with_lecun_normal from neural_sp.models.modules.initialization import init_with_xavier...
# Copyright 2020 Kyoto University (<NAME>) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Dilated causal convolution.""" import logging import torch.nn as nn from neural_sp.models.modules.initialization import init_with_lecun_normal from neural_sp.models.modules.initialization import init_with_xavier...
en
0.484195
# Copyright 2020 Kyoto University (<NAME>) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) Dilated causal convolution. 1D dilated causal convolution. Args: in_channels (int): input channel size out_channels (int): output channel size kernel_size (int): kernel size dilati...
2.217309
2
autorski/extras/prepare_view.py
jchmura/suchary-django
0
6627884
from functools import reduce import operator from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from autorski.models import Joke def __add_pages(request, jokes): paginator = Paginator(jokes, 15) page = request.GET.get('page') try: jokes = pagi...
from functools import reduce import operator from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from autorski.models import Joke def __add_pages(request, jokes): paginator = Paginator(jokes, 15) page = request.GET.get('page') try: jokes = pagi...
en
0.67353
# If page is not an integer, deliver first page. # If page is out of range (e.g. 9999), deliver last page of results.
2.34975
2
src/paramiko-master/tests/test_kex.py
zhanggen3714/zhanggen_audit
1
6627885
<reponame>zhanggen3714/zhanggen_audit # Copyright (C) 2003-2009 <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 th...
# Copyright (C) 2003-2009 <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.828808
# Copyright (C) 2003-2009 <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...
1.933229
2
pypy/module/cpyext/unicodeobject.py
benoitc/pypy
1
6627886
<gh_stars>1-10 from pypy.interpreter.error import OperationError from pypy.rpython.lltypesystem import rffi, lltype from pypy.rpython.lltypesystem import llmemory from pypy.module.unicodedata import unicodedb from pypy.module.cpyext.api import ( CANNOT_FAIL, Py_ssize_t, build_type_checkers, cpython_api, bootstr...
from pypy.interpreter.error import OperationError from pypy.rpython.lltypesystem import rffi, lltype from pypy.rpython.lltypesystem import llmemory from pypy.module.unicodedata import unicodedb from pypy.module.cpyext.api import ( CANNOT_FAIL, Py_ssize_t, build_type_checkers, cpython_api, bootstrap_function, Py...
en
0.790604
## See comment in stringobject.py. # Buffer for the default encoding (used by PyUnicde_GetDefaultEncoding) Allocatse a PyUnicodeObject and its buffer, but without a corresponding interpreter object. The buffer may be mutated, until unicode_realize() is called. Creates the unicode in the interpreter. The PyUnic...
1.781231
2
weather/migrations/0003_auto_20190502_0425.py
JemisaR/Current-Weather
0
6627887
# Generated by Django 2.2.1 on 2019-05-02 01:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('weather', '0002_city_zip_code'), ] operations = [ migrations.AlterField( model_name='city', name='latitude', ...
# Generated by Django 2.2.1 on 2019-05-02 01:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('weather', '0002_city_zip_code'), ] operations = [ migrations.AlterField( model_name='city', name='latitude', ...
en
0.760129
# Generated by Django 2.2.1 on 2019-05-02 01:25
1.696507
2
cibyl/sources/zuul/apis/utils/tests/ansible/finder.py
rhos-infra/cibyl
3
6627888
""" # Copyright 2022 Red Hat # # 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 agr...
""" # Copyright 2022 Red Hat # # 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 agr...
en
0.721974
# Copyright 2022 Red Hat # # 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 ...
2.115412
2
discordobjects/client/client_sync.py
igo95862/DiscordBot_lib
0
6627889
import typing from .client_async import DiscordClientAsync import asyncio import threading class DiscordClientSync: def __init__(self, token: str, use_socket: bool = True, proxies: dict = None, default_timeout: int = 10): """ wrapper template return asyncio.run_coroutine_threadsafe( ...
import typing from .client_async import DiscordClientAsync import asyncio import threading class DiscordClientSync: def __init__(self, token: str, use_socket: bool = True, proxies: dict = None, default_timeout: int = 10): """ wrapper template return asyncio.run_coroutine_threadsafe( ...
en
0.387857
wrapper template return asyncio.run_coroutine_threadsafe( self.async_client. , self.client_event_loop ).result(timeout=self.timeout) :param token: :param use_socket: :param proxies: :param default_timeout: async def dm_create(self, recipient_id:...
2.58919
3
monitor/myapp/server.py
medamines1/monitor
6
6627890
import redis from myapp.models import open_instances as o from myapp.models import delay_track as t import uuid,time,requests from django.conf import settings #change loc to header on production from twilio.rest import Client def send_msg(host): account = settings.TWILIO_ACCOUNT token = settings.TWILIO_TOEKN cl...
import redis from myapp.models import open_instances as o from myapp.models import delay_track as t import uuid,time,requests from django.conf import settings #change loc to header on production from twilio.rest import Client def send_msg(host): account = settings.TWILIO_ACCOUNT token = settings.TWILIO_TOEKN cl...
en
0.701988
#change loc to header on production #imporove this before deploy
1.990355
2
GGProject/workflow/urls.py
VarenTechInternship/greeterguru
0
6627891
from django.urls import path from . import views urlpatterns = [ path('ad/', views.UpdateAD.as_view(), name = 'updatead'), path('authfactor/', views.AuthFactor.as_view(), name = 'authfactor'), ]
from django.urls import path from . import views urlpatterns = [ path('ad/', views.UpdateAD.as_view(), name = 'updatead'), path('authfactor/', views.AuthFactor.as_view(), name = 'authfactor'), ]
none
1
1.667423
2
src/sage/combinat/subset.py
bopopescu/classic_diff_geom
0
6627892
r""" Subsets The combinatorial class of the subsets of a finite set. The set can be given as a list or a Set or else as an integer `n` which encodes the set `\{1,2,...,n\}`. See :class:`Subsets` for more information and examples. AUTHORS: - <NAME>: initial version - <NAME> (2009/02/06): doc improvements + new metho...
r""" Subsets The combinatorial class of the subsets of a finite set. The set can be given as a list or a Set or else as an integer `n` which encodes the set `\{1,2,...,n\}`. See :class:`Subsets` for more information and examples. AUTHORS: - <NAME>: initial version - <NAME> (2009/02/06): doc improvements + new metho...
en
0.609338
Subsets The combinatorial class of the subsets of a finite set. The set can be given as a list or a Set or else as an integer `n` which encodes the set `\{1,2,...,n\}`. See :class:`Subsets` for more information and examples. AUTHORS: - <NAME>: initial version - <NAME> (2009/02/06): doc improvements + new methods #*...
3.062224
3
tableau_rest_api/methods/subscription.py
Kamran-ov/tableau_tools
0
6627893
from requests.exceptions import HTTPError from .rest_api_base import * class SubscriptionMethods(): def __init__(self, rest_api_base: TableauRestApiBase): self.rest_api_base = rest_api_base def __getattr__(self, attr): return getattr(self.rest_api_base, attr) def query_subscriptions(self...
from requests.exceptions import HTTPError from .rest_api_base import * class SubscriptionMethods(): def __init__(self, rest_api_base: TableauRestApiBase): self.rest_api_base = rest_api_base def __getattr__(self, attr): return getattr(self.rest_api_base, attr) def query_subscriptions(self...
en
0.810768
# Does this search make sense my itself?
2.306672
2
Dataset.py
leopoldwhite/BotRGCN
1
6627894
<filename>Dataset.py import torch import numpy as np import pandas as pd import json import os from transformers import pipeline from datetime import datetime as dt from torch.utils.data import Dataset class Twibot20(Dataset): def __init__(self,root='./Data/',device='cpu',process=True,save=True): self.root...
<filename>Dataset.py import torch import numpy as np import pandas as pd import json import os from transformers import pipeline from datetime import datetime as dt from torch.utils.data import Dataset class Twibot20(Dataset): def __init__(self,root='./Data/',device='cpu',process=True,save=True): self.root...
none
1
2.48024
2
gluonocr/nn/block.py
Davids929/gluon-ocr
2
6627895
<filename>gluonocr/nn/block.py # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (...
<filename>gluonocr/nn/block.py # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (...
en
0.725487
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2.313449
2
grr/test/grr_response_test/end_to_end_tests/tests/osquery.py
tsehori/grr
1
6627896
#!/usr/bin/env python """E2E tests for the osquery flow.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from grr_response_test.end_to_end_tests import test_base class TestOsquery(test_base.EndToEndTest): """Class with generic osquery tests runnable...
#!/usr/bin/env python """E2E tests for the osquery flow.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from grr_response_test.end_to_end_tests import test_base class TestOsquery(test_base.EndToEndTest): """Class with generic osquery tests runnable...
en
0.722945
#!/usr/bin/env python E2E tests for the osquery flow. Class with generic osquery tests runnable on every platform. SELECT name FROM os_version; # Windows client prints spurious warnings. # e.g. for Debian it is 'Debian GNU/Linux'. # e.g. 'Microsoft Windows 10 Enterprise' SELECT path FROM osquery_info JOIN process...
2.225316
2
ml-agents/mlagents/model_serialization.py
bobcy2015/ml-agents
1
6627897
<gh_stars>1-10 from distutils.util import strtobool import os from typing import Any, List, Set, NamedTuple from distutils.version import LooseVersion try: import onnx from tf2onnx.tfonnx import process_tf_graph, tf_optimize from tf2onnx import optimizer ONNX_EXPORT_ENABLED = True except ImportError: ...
from distutils.util import strtobool import os from typing import Any, List, Set, NamedTuple from distutils.version import LooseVersion try: import onnx from tf2onnx.tfonnx import process_tf_graph, tf_optimize from tf2onnx import optimizer ONNX_EXPORT_ENABLED = True except ImportError: # Either on...
en
0.903528
# Either onnx and tf2onnx not installed, or they're not compatible with the version of tensorflow # ONNX is only tested on 1.12.0 and later Exports latest saved model to .nn format for Unity embedding. # Save frozen graph # Convert to barracuda # Save to onnx too (if we were able to import it) # Make conversion errors ...
2.005637
2
qiskit/circuit/library/probability_distributions/normal.py
Elliot-Coupe/qiskit-terra
1
6627898
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # 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...
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # 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.652994
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # 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...
3.175323
3
exercises/0242-ValidAnagram/valid_anagram_test.py
tqa236/leetcode-solutions
1
6627899
<reponame>tqa236/leetcode-solutions<gh_stars>1-10 import unittest from valid_anagram import Solution class Test(unittest.TestCase): def test_1(self): solution = Solution() self.assertEqual(solution.isAnagram("anagram", "nagaram"), True) def test_2(self): solution = Solution() ...
import unittest from valid_anagram import Solution class Test(unittest.TestCase): def test_1(self): solution = Solution() self.assertEqual(solution.isAnagram("anagram", "nagaram"), True) def test_2(self): solution = Solution() self.assertEqual(solution.isAnagram("rat", "car")...
none
1
3.362917
3
backend/app/tests/test_pollView.py
ExZos/Mound
0
6627900
from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient class getPendingPollsInSpaceTests(TestCase): client = APIClient() @classmethod def setUpTestData(self): self.client.post('/api/spaces/', {'name': 'Home'}, format='json') self.client...
from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient class getPendingPollsInSpaceTests(TestCase): client = APIClient() @classmethod def setUpTestData(self): self.client.post('/api/spaces/', {'name': 'Home'}, format='json') self.client...
none
1
2.419676
2
jax/interpreters/partial_eval.py
dpiponi/jax
0
6627901
<reponame>dpiponi/jax # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
en
0.832567
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
1.810279
2
resto_client/functions/utils.py
CNES/resto_client
6
6627902
<filename>resto_client/functions/utils.py<gh_stars>1-10 # -*- coding: utf-8 -*- """ .. admonition:: License Copyright 2019 CNES 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...
<filename>resto_client/functions/utils.py<gh_stars>1-10 # -*- coding: utf-8 -*- """ .. admonition:: License Copyright 2019 CNES 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...
en
0.777408
# -*- coding: utf-8 -*- .. admonition:: License Copyright 2019 CNES 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 b...
2.194863
2
flex/db/cli.py
centergy/flex
0
6627903
<filename>flex/db/cli.py<gh_stars>0 import os import argparse from flex.core.cli import Manager, prompt_bool from .utils import app_get_db_client from flask import current_app from .migrations import Config, migrations from alembic import command console = Manager(usage="Perform SQL database migrations and operation...
<filename>flex/db/cli.py<gh_stars>0 import os import argparse from flex.core.cli import Manager, prompt_bool from .utils import app_get_db_client from flask import current_app from .migrations import Config, migrations from alembic import command console = Manager(usage="Perform SQL database migrations and operation...
en
0.602278
Creates the configured database and tables from sqlalchemy models. Drops the current sqlalchemy database. # @console.command # def recreatedb(create_tables=True, drop_tables=False): # """Recreates the database and tables (same as issuing 'drop_db' and then 'create_db').""" # dropdb(drop_tables) # createdb(create_tab...
2.641903
3
safemrl/utils/metrics.py
krishpop/google-research
0
6627904
<filename>safemrl/utils/metrics.py # coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
<filename>safemrl/utils/metrics.py # coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
en
0.753511
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
1.961649
2
src/pyhees/section4_7_n.py
jjj-design/pyhees
0
6627905
<reponame>jjj-design/pyhees<filename>src/pyhees/section4_7_n.py # ============================================================================ # 付録 N 地中熱ヒートポンプ温水暖房機 # ============================================================================ import numpy as np from pyhees.section4_7_common import get_Q_out_H_hs_d_t ...
# ============================================================================ # 付録 N 地中熱ヒートポンプ温水暖房機 # ============================================================================ import numpy as np from pyhees.section4_7_common import get_Q_out_H_hs_d_t from pyhees.section4_8_a import calc_e_ref_H_th import pyhees.se...
ja
0.920386
# ============================================================================ # 付録 N 地中熱ヒートポンプ温水暖房機 # ============================================================================ # ============================================================================ # N3. 暖房エネルギー消費量 # ==========================================...
2.227813
2
tempest/tests/test_tempest_plugin.py
mail2nsrajesh/tempest
1
6627906
# Copyright (c) 2015 Deutsche Telekom AG # 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 r...
# Copyright (c) 2015 Deutsche Telekom AG # 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 r...
en
0.890241
# Copyright (c) 2015 Deutsche Telekom AG # 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 r...
1.990282
2
example-django/app/templatetags/backend_utils.py
noisy/python-social-auth-steemconnect-examples
6
6627907
<reponame>noisy/python-social-auth-steemconnect-examples import re from django import template from social_core.backends.oauth import OAuthAuth from social_django.utils import Storage register = template.Library() name_re = re.compile(r'([^O])Auth') @register.filter def backend_name(backend): name = backend...
import re from django import template from social_core.backends.oauth import OAuthAuth from social_django.utils import Storage register = template.Library() name_re = re.compile(r'([^O])Auth') @register.filter def backend_name(backend): name = backend.__class__.__name__ name = name.replace('OAuth', ' OA...
none
1
2.175033
2
examples/interactive_scripting.py
mrocklin/napari
1
6627908
<reponame>mrocklin/napari<filename>examples/interactive_scripting.py import numpy as np import napari from napari.qt import thread_worker import time with napari.gui_qt(): # create the viewer with an image data = np.random.random((512, 512)) viewer = napari.Viewer() layer = viewer.add_image(data) ...
import numpy as np import napari from napari.qt import thread_worker import time with napari.gui_qt(): # create the viewer with an image data = np.random.random((512, 512)) viewer = napari.Viewer() layer = viewer.add_image(data) @thread_worker(start_thread=True) def layer_update(*, update_per...
en
0.875352
# create the viewer with an image # number of times to update # check that data layer is properly assigned and not blocked?
2.771127
3
examples/numerical_optimizations.py
sergimasot/PycQED_py3
1
6627909
# import numpy as np # import scipy # from pycqed.measurement import sweep_functions as swf # from sweep_functions import (Sweep_function, Soft_Sweep) # from pycqed.measurement import AWG_sweep_functions as awg_swf # from pycqed.measurement import detector_functions as det # import matplotlib.pyplot as plt # from pycqe...
# import numpy as np # import scipy # from pycqed.measurement import sweep_functions as swf # from sweep_functions import (Sweep_function, Soft_Sweep) # from pycqed.measurement import AWG_sweep_functions as awg_swf # from pycqed.measurement import detector_functions as det # import matplotlib.pyplot as plt # from pycqe...
en
0.748529
# import numpy as np # import scipy # from pycqed.measurement import sweep_functions as swf # from sweep_functions import (Sweep_function, Soft_Sweep) # from pycqed.measurement import AWG_sweep_functions as awg_swf # from pycqed.measurement import detector_functions as det # import matplotlib.pyplot as plt # from pycqe...
2.078907
2
test/test_pghoard.py
Adnuntius/pghoard
731
6627910
<filename>test/test_pghoard.py """ pghoard Copyright (c) 2015 Ohmu Ltd See LICENSE for details """ import datetime import io import json import os import tarfile import time from pathlib import Path from unittest.mock import Mock, patch from pghoard import common from pghoard.common import (BaseBackupFormat, create_a...
<filename>test/test_pghoard.py """ pghoard Copyright (c) 2015 Ohmu Ltd See LICENSE for details """ import datetime import io import json import os import tarfile import time from pathlib import Path from unittest.mock import Mock, patch from pghoard import common from pghoard.common import (BaseBackupFormat, create_a...
en
0.942438
pghoard Copyright (c) 2015 Ohmu Ltd See LICENSE for details # pylint: disable=attribute-defined-outside-init # This is the "final storage location" when using "local" storage type \ systemid|6222667313856416063 timeline|1 xlogpos|0/B003760 dbname| # Handle case where metadata file does not exist # 3 of the backups are...
2.163243
2
pop/mods/pop/seed.py
smokeytheblair/pop
48
6627911
''' Seed a new project with a directory tree and first files ''' # Import python libs import os SETUP = '''#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Import python libs import os import sys import shutil from setuptools import setup, Command NAME = '%%NAME%%' DESC = ('') # Version info -- read without importi...
''' Seed a new project with a directory tree and first files ''' # Import python libs import os SETUP = '''#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Import python libs import os import sys import shutil from setuptools import setup, Command NAME = '%%NAME%%' DESC = ('') # Version info -- read without importi...
en
0.487314
Seed a new project with a directory tree and first files # Import python libs #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Import python libs import os import sys import shutil from setuptools import setup, Command NAME = '%%NAME%%' DESC = ('') # Version info -- read without importing _locals = {} with open('{}/...
2.322806
2
server/user/lls.py
lingochamp/open-wechat-scorer
4
6627912
<gh_stars>1-10 import asyncio import json import aiohttp class GetAccessTokenError(Exception): def __init__(self, message, original_exception=None, wx_response=''): super().__init__(message) self.original_exception = original_exception self.wx_response = wx_response async def get_access...
import asyncio import json import aiohttp class GetAccessTokenError(Exception): def __init__(self, message, original_exception=None, wx_response=''): super().__init__(message) self.original_exception = original_exception self.wx_response = wx_response async def get_access_token(session,...
en
0.629978
Sample implementation of getting access token. This routine expects your service to accept JSON-RPC 2.0 requests and be reachable on the HTTP URL that `config.wechatgo_jsonrpc_addr` specifies. JSON-RPC 2.0 Specification: http://www.jsonrpc.org/specification Request method is 'WeChat.AccessToken' R...
2.629972
3
scripts/termExtractor.py
tacitia/ThoughtFlow
0
6627913
import json import sys from topia.termextract import tag from topia.termextract import extract import nltk def uniqify(seq, idFun=None): # order preserving if idFun is None: def idFun(x): return x seen = {} result = [] for item in seq: marker = idFun(item) if marker in seen: continue seen[marker] = 1...
import json import sys from topia.termextract import tag from topia.termextract import extract import nltk def uniqify(seq, idFun=None): # order preserving if idFun is None: def idFun(x): return x seen = {} result = [] for item in seq: marker = idFun(item) if marker in seen: continue seen[marker] = 1...
en
0.700193
# order preserving # initialize the tagger with the required language # create the extractor with the tagger # invoke tagging the text # extract all the terms, even the "weak" ones # extract # get a results # for r in result: # discard the weights for now, not using them at this point and defaulting to lowercase keywor...
2.903149
3
fleamarket/urls.py
geraldofada/flea-market
0
6627914
<filename>fleamarket/urls.py from django.conf.urls.static import static from django.contrib import admin from django.urls import path from django.urls.conf import include from fleamarket import views, settings urlpatterns = [ path('', views.index, name='index'), path('', include('users.urls')), path('produ...
<filename>fleamarket/urls.py from django.conf.urls.static import static from django.contrib import admin from django.urls import path from django.urls.conf import include from fleamarket import views, settings urlpatterns = [ path('', views.index, name='index'), path('', include('users.urls')), path('produ...
none
1
1.881007
2
TouchLauncher/script.py
cafehaine/tiling4tablets
1
6627915
<reponame>cafehaine/tiling4tablets # Gui stuff import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk # XDG stuff to fetch the application list from os.path import join from glob import glob from xdg import Menu, DesktopEntry from subprocess import call # String manipulation thingies import uni...
# Gui stuff import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk # XDG stuff to fetch the application list from os.path import join from glob import glob from xdg import Menu, DesktopEntry from subprocess import call # String manipulation thingies import unicodedata import re def remove_acce...
en
0.63586
# Gui stuff # XDG stuff to fetch the application list # String manipulation thingies function by MiniQuark over at stackoverflow https://stackoverflow.com/a/517974/2279323 # close button
2.537773
3
networks/layers/dense_resnet_value.py
google-research/ibc
180
6627916
<gh_stars>100-1000 # coding=utf-8 # Copyright 2022 The Reach ML 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...
# coding=utf-8 # Copyright 2022 The Reach ML 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 ...
en
0.827924
# coding=utf-8 # Copyright 2022 The Reach ML 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 ...
2.451541
2
menu.py
ludoloops/miningpool
1
6627917
# -*- coding: utf-8 -* from urllib.request import Request, urlopen import json Coin=("adzcoin", "auroracoin-qubit", "bitcoin", "bitcoin-cash", "bitcoin-gold", "dash", "digibyte-groestl", "digibyte-qubit", "digibyte-skein", "electroneum", "ethereum", "ethereum-classic", "expanse", "feathercoin", "gamecred...
# -*- coding: utf-8 -* from urllib.request import Request, urlopen import json Coin=("adzcoin", "auroracoin-qubit", "bitcoin", "bitcoin-cash", "bitcoin-gold", "dash", "digibyte-groestl", "digibyte-qubit", "digibyte-skein", "electroneum", "ethereum", "ethereum-classic", "expanse", "feathercoin", "gamecred...
en
0.591166
# -*- coding: utf-8 -* #comment to enable coin menu selection #comment to enable action menu selection
2.275413
2
runner/srv.py
StarNumber12046/activities
3
6627918
from flask import Flask, request import json, traceback test = Flask("test") @test.route("/add", methods=['GET', 'POST']) def bruh(): if request.method == "POST": print(request) print(dir(request.data)) print(request.data.decode()) correct = request.data.decode().replace("'", '"')...
from flask import Flask, request import json, traceback test = Flask("test") @test.route("/add", methods=['GET', 'POST']) def bruh(): if request.method == "POST": print(request) print(dir(request.data)) print(request.data.decode()) correct = request.data.decode().replace("'", '"')...
en
0.506601
#print(json.loads(request.data.decode())) #change with your priority list of apps in main.py
2.544496
3
glassball/cmd_rawfeed.py
bwanders/glassball-rss
0
6627919
<filename>glassball/cmd_rawfeed.py import pprint import textwrap import feedparser from .common import Configuration, CommandError, log_error, log_message def register_command(commands, common_args): args = commands.add_parser('raw-feed', help='Retrieves and dumps a raw feed', parents=[common_args]) args.ad...
<filename>glassball/cmd_rawfeed.py import pprint import textwrap import feedparser from .common import Configuration, CommandError, log_error, log_message def register_command(commands, common_args): args = commands.add_parser('raw-feed', help='Retrieves and dumps a raw feed', parents=[common_args]) args.ad...
en
0.873948
# Helper to do an indented pretty print # This is completely opinionated: anything not starting with `http` is not # retrievable... # If we are given a config, we can try to look up a non-URL parameter # against the feeds in the config # Proceed to retrieve the feed
2.86599
3
main.py
edwardchuang/appengine-operation-monitor
0
6627920
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
en
0.757273
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
2.359375
2
collect_image/models.py
ShivanS93/nutrify
1
6627921
import os from django_countries.fields import CountryField from django.contrib.postgres.fields import ArrayField from django.db import models from django.utils.deconstruct import deconstructible from hashid_field import HashidAutoField, Hashid from config.settings import HASHID_FIELD_SALT, AUTH_USER_MODEL @deconst...
import os from django_countries.fields import CountryField from django.contrib.postgres.fields import ArrayField from django.db import models from django.utils.deconstruct import deconstructible from hashid_field import HashidAutoField, Hashid from config.settings import HASHID_FIELD_SALT, AUTH_USER_MODEL @deconst...
en
0.926393
Renaming the image to the pk # hash'd name, also the reference_id does not equal the name # of the image file in storage
2.155383
2
tfmodule/trainer.py
kangyounglee/tf-code-pattern-lenet5
1
6627922
<reponame>kangyounglee/tf-code-pattern-lenet5 # Copyright 2018 <NAME> (<EMAIL>) # 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...
# Copyright 2018 <NAME> (<EMAIL>) # 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 writi...
en
0.72297
# Copyright 2018 <NAME> (<EMAIL>) # 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 writi...
2.242902
2
bazel_tools/scala.bzl
gaborh-da/daml
0
6627923
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 load( "@io_bazel_rules_scala//scala:scala.bzl", "scala_binary", "scala_library", "scala_macro_library", "scala_test", "scala_test_suite", ) load( "@io_baze...
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 load( "@io_bazel_rules_scala//scala:scala.bzl", "scala_binary", "scala_library", "scala_macro_library", "scala_test", "scala_test_suite", ) load( "@io_baze...
en
0.678589
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # This file defines common Scala compiler flags and plugins used throughout # this repository. The initial set of flags is taken from the ledger-client # project. If you find that addi...
1.52488
2
ResponsiveWebDesign/main.py
Flo-Slv/freeCodeCamp
0
6627924
import time from http.server import HTTPServer from server import Server HOST_NAME = 'localhost' PORT = 8000 if __name__ == "__main__": httpd = HTTPServer((HOST_NAME,PORT),Server) print(time.asctime(), "Start server - %s:%s"%(HOST_NAME,PORT)) try: httpd.serve_forever() except KeyboardInterrupt...
import time from http.server import HTTPServer from server import Server HOST_NAME = 'localhost' PORT = 8000 if __name__ == "__main__": httpd = HTTPServer((HOST_NAME,PORT),Server) print(time.asctime(), "Start server - %s:%s"%(HOST_NAME,PORT)) try: httpd.serve_forever() except KeyboardInterrupt...
none
1
2.558605
3
pysc2/tests/random_agent_test.py
zeuseyera/pysc2
20
6627925
#!/usr/bin/python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
#!/usr/bin/python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
en
0.846204
#!/usr/bin/python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
2.316403
2
daily_programmer/384.py
davidlowryduda/pythonMiniProjects
0
6627926
<filename>daily_programmer/384.py """ Sample Use ========== echo -e "3d6\n10d13\n2d5" | python3 384.py Description =========== I love playing D&D with my friends, and my favorite part is creating character sheets (my DM is notorious for killing us all off by level 3 or so). One major part of making character sheets...
<filename>daily_programmer/384.py """ Sample Use ========== echo -e "3d6\n10d13\n2d5" | python3 384.py Description =========== I love playing D&D with my friends, and my favorite part is creating character sheets (my DM is notorious for killing us all off by level 3 or so). One major part of making character sheets...
en
0.931697
Sample Use ========== echo -e "3d6\n10d13\n2d5" | python3 384.py Description =========== I love playing D&D with my friends, and my favorite part is creating character sheets (my DM is notorious for killing us all off by level 3 or so). One major part of making character sheets is rolling the character's stats. Sad...
3.302452
3
userbot/modules/misc/b64.py
ZJRDroid/PaperplaneRemix
0
6627927
import pybase64 from ..help import add_help_item from userbot.events import register from userbot.utils.tgdoc import * @register(outgoing=True, pattern=r"^\.b64\s+(en|de)(?:\s+(.*))?") async def endecrypt(e): """ For .b64 command, find the base64 encoding of the given string. """ reply_message = await e.get_...
import pybase64 from ..help import add_help_item from userbot.events import register from userbot.utils.tgdoc import * @register(outgoing=True, pattern=r"^\.b64\s+(en|de)(?:\s+(.*))?") async def endecrypt(e): """ For .b64 command, find the base64 encoding of the given string. """ reply_message = await e.get_...
en
0.390855
For .b64 command, find the base64 encoding of the given string. `.b64 (en|de) (message)` Or, in reply to a message `.b64 (en|de)`
2.515272
3
tests/test_state.py
wboxx1/boxx-pymonad
0
6627928
# -------------------------------------------------------- # (c) Copyright 2014, 2020 by <NAME>. # Licensed under BSD 3-clause licence. # -------------------------------------------------------- import unittest import common_tests import pymonad from pymonad.state import _State class EqState(pymonad.monad.MonadAlias,...
# -------------------------------------------------------- # (c) Copyright 2014, 2020 by <NAME>. # Licensed under BSD 3-clause licence. # -------------------------------------------------------- import unittest import common_tests import pymonad from pymonad.state import _State class EqState(pymonad.monad.MonadAlias,...
en
0.514836
# -------------------------------------------------------- # (c) Copyright 2014, 2020 by <NAME>. # Licensed under BSD 3-clause licence. # --------------------------------------------------------
2.464656
2
webindexer/__init__.py
rr-/pyindexer
3
6627929
from .indexer import application
from .indexer import application
none
1
1.088134
1
xlsxwriter/test/comparison/test_set_row03.py
Rippling/XlsxWriter-1
0
6627930
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2019, <NAME>, <EMAIL> # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelCo...
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2019, <NAME>, <EMAIL> # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelCo...
en
0.410052
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2019, <NAME>, <EMAIL> # Test file created by XlsxWriter against a file created by Excel. Test the creation of a simple XlsxWriter file.
2.640836
3
src/wenet/interface/exceptions.py
Dyuko/common-models-py
0
6627931
<reponame>Dyuko/common-models-py from __future__ import absolute_import, annotations class AuthenticationException(ValueError): def __init__(self, interface: str, http_status_code: int, server_response: str) -> None: super().__init__(f"Not a valid authentication for the [{interface}] interface. Request h...
from __future__ import absolute_import, annotations class AuthenticationException(ValueError): def __init__(self, interface: str, http_status_code: int, server_response: str) -> None: super().__init__(f"Not a valid authentication for the [{interface}] interface. Request has return a code [{http_status_co...
none
1
2.655267
3
dev/fastai2/metrics.py
anhquan0412/fastai_dev
380
6627932
<gh_stars>100-1000 #AUTOGENERATED! DO NOT EDIT! File to edit: dev/13a_metrics.ipynb (unless otherwise specified). __all__ = ['AccumMetric', 'skm_to_fastai', 'optim_metric', 'accuracy', 'error_rate', 'top_k_accuracy', 'APScore', 'BalancedAccuracy', 'BrierScore', 'CohenKappa', 'F1Score', 'FBeta', 'HammingLoss...
#AUTOGENERATED! DO NOT EDIT! File to edit: dev/13a_metrics.ipynb (unless otherwise specified). __all__ = ['AccumMetric', 'skm_to_fastai', 'optim_metric', 'accuracy', 'error_rate', 'top_k_accuracy', 'APScore', 'BalancedAccuracy', 'BrierScore', 'CohenKappa', 'F1Score', 'FBeta', 'HammingLoss', 'Jaccard', ...
en
0.564004
#AUTOGENERATED! DO NOT EDIT! File to edit: dev/13a_metrics.ipynb (unless otherwise specified). #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Cell #Ce...
1.629042
2
subpartcode/Camera Vision/objcenter.py
LesterYHZ/Automated-Bridge-Inspection-Robot-Project
1
6627933
# goal of this code is to use OpenCV's Blob detector to detector the washers using an # OpenCV's Canny edge detection filter (not color) # it needs the video frame as an input # outputs the x and y coordinate to the closest blob detected # the blob parameters are needed to limit the things that are detected as a "blob"...
# goal of this code is to use OpenCV's Blob detector to detector the washers using an # OpenCV's Canny edge detection filter (not color) # it needs the video frame as an input # outputs the x and y coordinate to the closest blob detected # the blob parameters are needed to limit the things that are detected as a "blob"...
en
0.762008
# goal of this code is to use OpenCV's Blob detector to detector the washers using an # OpenCV's Canny edge detection filter (not color) # it needs the video frame as an input # outputs the x and y coordinate to the closest blob detected # the blob parameters are needed to limit the things that are detected as a "blob"...
3.453279
3
bot/exts/__init__.py
sam-heller/sir-lancebot
1
6627934
<gh_stars>1-10 import logging import pkgutil from typing import Iterator __all__ = ("get_package_names",) log = logging.getLogger(__name__) def get_package_names() -> Iterator[str]: """Iterate names of all packages located in /bot/exts/.""" for package in pkgutil.iter_modules(__path__): if package.i...
import logging import pkgutil from typing import Iterator __all__ = ("get_package_names",) log = logging.getLogger(__name__) def get_package_names() -> Iterator[str]: """Iterate names of all packages located in /bot/exts/.""" for package in pkgutil.iter_modules(__path__): if package.ispkg: ...
en
0.985517
Iterate names of all packages located in /bot/exts/.
2.438308
2
piccolo/table_reflection.py
techolas23/piccolo
6
6627935
""" This is an advanced Piccolo feature which allows runtime reflection of database tables. """ import asyncio import typing as t from dataclasses import dataclass from piccolo.apps.schema.commands.generate import get_output_schema from piccolo.table import Table class Immutable(object): def _immutable(self, *a...
""" This is an advanced Piccolo feature which allows runtime reflection of database tables. """ import asyncio import typing as t from dataclasses import dataclass from piccolo.apps.schema.commands.generate import get_output_schema from piccolo.table import Table class Immutable(object): def _immutable(self, *a...
en
0.759556
This is an advanced Piccolo feature which allows runtime reflection of database tables. # type: ignore # type: ignore A dictionary that is not publicly mutable. # type: ignore # noqa: E501 insert an item into the dictionary directly. Delete an item from dictionary directly. A metaclass that creates a Singleton base cl...
2.569912
3
Farm.py
queengroot/Python-Old-McDonald
0
6627936
#<NAME> #Practice #<NAME> def chorus(animal, sound): print("<NAME> had a farm, E-I-E-I-O, and on that farm he had a " + animal + " E-I-E-I-O.") print("With a " + sound + " " + sound + " here and a " + sound + " " + sound+ " there. ") print("Here a " + sound + " there a "+ ...
#<NAME> #Practice #<NAME> def chorus(animal, sound): print("<NAME> had a farm, E-I-E-I-O, and on that farm he had a " + animal + " E-I-E-I-O.") print("With a " + sound + " " + sound + " here and a " + sound + " " + sound+ " there. ") print("Here a " + sound + " there a "+ ...
en
0.874812
#<NAME> #Practice #<NAME> #variables #call title #while i is less than the length of the string go through each array #i is 0, so it points to the first spot in the array! #then when it becomes one it goes to the next spot in the array. #call backwards #subtract two from the length, thus not repeating the last cluck cl...
4.059488
4
src/api/schemas/parts.py
skbu3u/core
1
6627937
<filename>src/api/schemas/parts.py import re from typing import List from pydantic import BaseModel, validator from src.api.schemas.consumables import Consumable class PartCreate(BaseModel): name: str price: int compatibility: str @validator('name') def name_match(cls, name): if not re....
<filename>src/api/schemas/parts.py import re from typing import List from pydantic import BaseModel, validator from src.api.schemas.consumables import Consumable class PartCreate(BaseModel): name: str price: int compatibility: str @validator('name') def name_match(cls, name): if not re....
en
0.575527
# TODO Add price validations for parts
2.746345
3
application/api/resources/images_list.py
imghack/image_bot
3
6627938
from flask_restful import Resource # TODO: db connection should be one for all blueprints from application.db.db import get_all_images class ImagesList(Resource): def get(self): return get_all_images()
from flask_restful import Resource # TODO: db connection should be one for all blueprints from application.db.db import get_all_images class ImagesList(Resource): def get(self): return get_all_images()
en
0.748234
# TODO: db connection should be one for all blueprints
2.394089
2
layouts.py
codepatel/dcf
1
6627939
<filename>layouts.py from math import log10 import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc import dash_table as dt # Local imports from __init__ import VERSION, DEFAULT_TICKER, DEFAULT_SNAPSHOT_UUID from dash_utils import make_card, ticker_inputs, make_ite...
<filename>layouts.py from math import log10 import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc import dash_table as dt # Local imports from __init__ import VERSION, DEFAULT_TICKER, DEFAULT_SNAPSHOT_UUID from dash_utils import make_card, ticker_inputs, make_ite...
en
0.639522
# Local imports # Reference and some Dashboard components inspired by: https://medium.com/swlh/how-to-create-a-dashboard-to-dominate-the-stock-market-using-python-and-dash-c35a12108c93 # html.H3('DCF Valuation Analysis'), # MD text area Element for Introduction ### Purpose of this web app ### ##### To be on...
2.027479
2
Bugscan_exploits-master/exp_list/exp-2426.py
csadsl/poc_exp
11
6627940
#!/usr/bin/env python # refer:http://www.wooyun.org/bugs/wooyun-2010-0144595 import urlparse def assign(service, arg): if service == "www": r = urlparse.urlparse(arg) return True, 'https://%s:4848/' %(r.netloc) def audit(arg): payload = 'theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%a...
#!/usr/bin/env python # refer:http://www.wooyun.org/bugs/wooyun-2010-0144595 import urlparse def assign(service, arg): if service == "www": r = urlparse.urlparse(arg) return True, 'https://%s:4848/' %(r.netloc) def audit(arg): payload = 'theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%a...
en
0.198952
#!/usr/bin/env python # refer:http://www.wooyun.org/bugs/wooyun-2010-0144595
2.322156
2
models/latent_vector_collaborative_recommend_forserver.py
doritos0812/deep-learning-project-platform
2
6627941
# -*- coding: utf-8 -*- """Latent_Vector_Collaborative_Recommend_forServer.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15QsNrUfOFlIBW_rCJoE399hayVUqN3XX """ from sklearn.decomposition import TruncatedSVD from scipy.sparse.linalg import svds ...
# -*- coding: utf-8 -*- """Latent_Vector_Collaborative_Recommend_forServer.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15QsNrUfOFlIBW_rCJoE399hayVUqN3XX """ from sklearn.decomposition import TruncatedSVD from scipy.sparse.linalg import svds ...
ko
0.968688
# -*- coding: utf-8 -*- Latent_Vector_Collaborative_Recommend_forServer.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15QsNrUfOFlIBW_rCJoE399hayVUqN3XX ### 해당 코드 실행 시 colab에서 실행중인 폴더의 /content/drive/My Drive가 구글 드라이브에 연결됨 # 데이터셋 불러오기(MovieLens 1...
2.686142
3
karapace/rapu.py
hackaugusto/karapace
0
6627942
<gh_stars>0 """ karapace - Custom middleware system on top of `aiohttp` implementing HTTP server and client components for use in Aiven's REST applications. Copyright (c) 2019 Aiven Ltd See LICENSE for details """ from karapace.statsd import StatsClient from karapace.utils import json_encode from karapace.version impo...
""" karapace - Custom middleware system on top of `aiohttp` implementing HTTP server and client components for use in Aiven's REST applications. Copyright (c) 2019 Aiven Ltd See LICENSE for details """ from karapace.statsd import StatsClient from karapace.utils import json_encode from karapace.version import __version...
en
0.764651
karapace - Custom middleware system on top of `aiohttp` implementing HTTP server and client components for use in Aiven's REST applications. Copyright (c) 2019 Aiven Ltd See LICENSE for details # TODO -> accept more general values as well # sensible default A custom Response object derived from Exception so it can be ...
2.053267
2
dfirtrack_main/models.py
0xflotus/dfirtrack
4
6627943
from django.contrib.auth.models import User from django.db import models import logging from time import strftime # initialize logger stdlogger = logging.getLogger(__name__) class Analysisstatus(models.Model): # primary key analysisstatus_id = models.AutoField(primary_key=True) # main entity information...
from django.contrib.auth.models import User from django.db import models import logging from time import strftime # initialize logger stdlogger = logging.getLogger(__name__) class Analysisstatus(models.Model): # primary key analysisstatus_id = models.AutoField(primary_key=True) # main entity information...
en
0.482766
# initialize logger # primary key # main entity information # string representation # define logger # primary key # foreign key(s) # main entity information # meta information # string representation # define logger # primary key # main entity information # meta information # string representation # define logger # pri...
2.33391
2
app/recipe/tests/test_ingredients_api.py
FernandoI7/recipe-app-api
0
6627944
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingred...
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingred...
pt
0.827162
Testes da API pública de ingredientes Testa se o login é obrigatório para acessar o endpoint Testes da API privada de ingredientes Testa se a consulta de ingredientes Testa se a consulta de ingredientes está limitada ao usuário logado Testa a criação dos ingredientes Testa a criação dos ingredients com paylo...
2.59122
3
retina/model/anchors/builder.py
mike112223/retina
0
6627945
from retina.utils import build_from_cfg from .registry import ANCHORS def build_anchor(cfg, default_args=None): anchor = build_from_cfg(cfg, ANCHORS, default_args) return anchor
from retina.utils import build_from_cfg from .registry import ANCHORS def build_anchor(cfg, default_args=None): anchor = build_from_cfg(cfg, ANCHORS, default_args) return anchor
none
1
1.61391
2
env/__init__.py
jidiai/ai_lib
99
6627946
from .snakes import * from .reversi import * from .gobang import * from .sokoban import * from .ccgame import * from .football import * from .MiniWorld import * from .minigrid import * from .particleenv import * from .overcookedai import * from .magent import * from .gridworld import * from .cliffwalking import * from ...
from .snakes import * from .reversi import * from .gobang import * from .sokoban import * from .ccgame import * from .football import * from .MiniWorld import * from .minigrid import * from .particleenv import * from .overcookedai import * from .magent import * from .gridworld import * from .cliffwalking import * from ...
none
1
1.139227
1
tests/unit/driver/test_sync_driver.py
dmulyalin/scrapli_netconf
61
6627947
<reponame>dmulyalin/scrapli_netconf<filename>tests/unit/driver/test_sync_driver.py<gh_stars>10-100 from scrapli_netconf.constants import NetconfVersion def test_get(monkeypatch, dummy_conn): monkeypatch.setattr( "scrapli_netconf.channel.sync_channel.NetconfChannel.send_input_netconf", lambda cls, ...
from scrapli_netconf.constants import NetconfVersion def test_get(monkeypatch, dummy_conn): monkeypatch.setattr( "scrapli_netconf.channel.sync_channel.NetconfChannel.send_input_netconf", lambda cls, channel_input: b"<sent!>", ) filter_ = """ <interface-configurations xmlns="http://cisco.co...
en
0.220313
<interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"> <interface-configuration> <active>act</active> </interface-configuration> </interface-configurations> <?xml version=\'1.0\' encoding=\'utf-8\'?>\n<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101"><get>...
1.925885
2
adminlte/static/plugins/datatables/extensions/KeyTable/Readme.txt.py
dnaextrim/django_adminlte_x
4
6627948
<reponame>dnaextrim/django_adminlte_x<gh_stars>1-10 X XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXXXXXXX XXX XXXXXXXXXX XXXXXXX XXX XXXXXXXXXX XXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXX XXXX XXXXXXXXXX XX XXX XXXXXX XXXXXX XXXXXXX XXXXX XXXXXX XXXX XXX XX XXXXXXXX XX XXXXXXXXXX XXXXXX XXXXXXXX XXXX XX XXX XXXXX XX XXXXX X...
X XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXXXXXXX XXX XXXXXXXXXX XXXXXXX XXX XXXXXXXXXX XXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXX XXXX XXXXXXXXXX XX XXX XXXXXX XXXXXX XXXXXXX XXXXX XXXXXX XXXX XXX XX XXXXXXXX XX XXXXXXXXXX XXXXXX XXXXXXXX XXXX XX XXX XXXXX XX XXXXX XXXXXXXX XXXXXXXXXXX XXXXXXXXX XXX XXXXXXXX XXXXXXXX ...
none
1
1.346326
1
utest/test_development_functionality.py
mawentao119/robotframework-browser
0
6627949
<filename>utest/test_development_functionality.py from Browser.keywords.playwright_state import PlaywrightState def test_pause_on_failure(): def whole_lib(): pass whole_lib._pause_on_failure = set() whole_lib.playwright = whole_lib browser = PlaywrightState(whole_lib) def func(*args, **kw...
<filename>utest/test_development_functionality.py from Browser.keywords.playwright_state import PlaywrightState def test_pause_on_failure(): def whole_lib(): pass whole_lib._pause_on_failure = set() whole_lib.playwright = whole_lib browser = PlaywrightState(whole_lib) def func(*args, **kw...
none
1
2.000015
2
dsatools/_base/_arma/_ar_levenson_durbin.py
diarmaidocualain/dsatools
31
6627950
<reponame>diarmaidocualain/dsatools<filename>dsatools/_base/_arma/_ar_levenson_durbin.py import numpy as np import scipy from ... import operators #------------------------------------------ def ar_levenson_durbin(x, order,mode='same',unbias = False): ''' The autoregressive model approximation, ba...
import numpy as np import scipy from ... import operators #------------------------------------------ def ar_levenson_durbin(x, order,mode='same',unbias = False): ''' The autoregressive model approximation, based on the Levenson-Dubrin itterative method for solution toeplitz matrix equati...
en
0.631046
#------------------------------------------ The autoregressive model approximation, based on the Levenson-Dubrin itterative method for solution toeplitz matrix equations. Parameters ------------------- * x: is 1-d input ndarray. * order: int, is the order of the desired mod...
2.537355
3