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
tests/integration/test_outpost_kubernetes.py
BeryJu/passbook
15
6631551
"""outpost tests""" from unittest.mock import MagicMock, patch from django.test import TestCase from kubernetes.client import AppsV1Api from kubernetes.client.exceptions import OpenApiException from authentik.core.tests.utils import create_test_flow from authentik.lib.config import CONFIG from authentik.outposts.cont...
"""outpost tests""" from unittest.mock import MagicMock, patch from django.test import TestCase from kubernetes.client import AppsV1Api from kubernetes.client.exceptions import OpenApiException from authentik.core.tests.utils import create_test_flow from authentik.lib.config import CONFIG from authentik.outposts.cont...
en
0.925836
outpost tests Test Kubernetes Controllers # Ensure that local connection have been created test that deployment requires update test that objects get deleted and re-created with new names Test an update that triggers all objects
2.075818
2
chemreg/substance/apps.py
Chemical-Curation/chemcurator
1
6631552
<filename>chemreg/substance/apps.py from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class SubstanceConfig(AppConfig): name = "chemreg.substance" verbose_name = _("Substance") def ready(self): try: import chemreg.substance.signals # noqa F401 ...
<filename>chemreg/substance/apps.py from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class SubstanceConfig(AppConfig): name = "chemreg.substance" verbose_name = _("Substance") def ready(self): try: import chemreg.substance.signals # noqa F401 ...
uz
0.378174
# noqa F401
1.431409
1
downloadScans.py
LvanWissen/saa-scanDownloader
0
6631553
<reponame>LvanWissen/saa-scanDownloader """ saa-scanDownloader Usage: downloadScans.py <collectionNumber> <inventoryNumber> <path> <nscans> <folder> downloadScans.py <collectionNumber> <inventoryNumber> <path> <nscans> <folder> --concordance False downloadScans.py (-h | --help) Arguments: collectionNumb...
""" saa-scanDownloader Usage: downloadScans.py <collectionNumber> <inventoryNumber> <path> <nscans> <folder> downloadScans.py <collectionNumber> <inventoryNumber> <path> <nscans> <folder> --concordance False downloadScans.py (-h | --help) Arguments: collectionNumber Collection number in the SAA invento...
en
0.726851
saa-scanDownloader Usage: downloadScans.py <collectionNumber> <inventoryNumber> <path> <nscans> <folder> downloadScans.py <collectionNumber> <inventoryNumber> <path> <nscans> <folder> --concordance False downloadScans.py (-h | --help) Arguments: collectionNumber Collection number in the SAA inventory. ...
3.277225
3
Chapter4_TheGreatestTheoremNeverTold/top_pic_comments.py
pyarnold/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
1
6631554
<reponame>pyarnold/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers<gh_stars>1-10 import sys import numpy as np from IPython.core.display import Image import praw reddit = praw.Reddit("BayesianMethodsForHackers") subreddit = reddit.get_subreddit("pics") top_submissions = subreddit.get_top() n_pic = int...
import sys import numpy as np from IPython.core.display import Image import praw reddit = praw.Reddit("BayesianMethodsForHackers") subreddit = reddit.get_subreddit("pics") top_submissions = subreddit.get_top() n_pic = int(sys.argv[1]) if sys.argv[1] else 1 i = 0 while i < n_pic: top_submission = top_submiss...
en
0.769779
# make sure it is linking to an image, not a webpage. #top_submission.replace_more_comments(limit=5, threshold=0)
2.908817
3
src/sylvie/ast_based/nodes.py
MrAdityaAlok/Sylvie
1
6631555
<reponame>MrAdityaAlok/Sylvie<gh_stars>1-10 from dataclasses import dataclass, field from typing import Union from sylvie.ast_based.ast import AST from sylvie.tokens import Token @dataclass class BinOp(AST): right_child: Token op: Token left_child: Token @dataclass class Num(AST): token: Token ...
from dataclasses import dataclass, field from typing import Union from sylvie.ast_based.ast import AST from sylvie.tokens import Token @dataclass class BinOp(AST): right_child: Token op: Token left_child: Token @dataclass class Num(AST): token: Token value: Union[int, float] = field(init=False)...
none
1
2.546417
3
bedrock/doc/annotation.py
openmednlp/bedrock
2
6631556
<gh_stars>1-10 class Annotation: ID = 'id' BEGIN = 'begin' END = 'end' LAYER = 'layer' FEATURE = 'feature' FEATURE_VAL = 'feature_value' COLS = [ID, BEGIN, END, LAYER, FEATURE, FEATURE_VAL]
class Annotation: ID = 'id' BEGIN = 'begin' END = 'end' LAYER = 'layer' FEATURE = 'feature' FEATURE_VAL = 'feature_value' COLS = [ID, BEGIN, END, LAYER, FEATURE, FEATURE_VAL]
none
1
1.589744
2
exercises/zh/test_02_06.py
Jette16/spacy-course
2,085
6631557
<reponame>Jette16/spacy-course def test(): assert ( "import Doc, Span" or "import Span, Doc" in __solution__ ), "你有正确导入Doc和Span吗?" assert doc.text == "我喜欢周杰伦", "你有正确创建Doc吗?" assert span.text == "周杰伦", "有正确创建span吗?" assert span.label_ == "PERSON", "你有把标签PERSON加到span中吗?" assert "doc.ents =...
def test(): assert ( "import Doc, Span" or "import Span, Doc" in __solution__ ), "你有正确导入Doc和Span吗?" assert doc.text == "我喜欢周杰伦", "你有正确创建Doc吗?" assert span.text == "周杰伦", "有正确创建span吗?" assert span.label_ == "PERSON", "你有把标签PERSON加到span中吗?" assert "doc.ents =" in __solution__, "你有覆盖doc.ent...
none
1
2.477262
2
lib/bes/thread/global_thread_pool.py
reconstruir/bes
0
6631558
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import atexit from threading import Lock from .thread_pool import thread_pool from bes.system.log import log class global_thread_pool(object): 'A global thread pool that can be used for misc async tasks that dont require over...
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import atexit from threading import Lock from .thread_pool import thread_pool from bes.system.log import log class global_thread_pool(object): 'A global thread pool that can be used for misc async tasks that dont require over...
en
0.595088
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
2.750668
3
setup.py
dciampa/transitivecitation
0
6631559
<reponame>dciampa/transitivecitation<gh_stars>0 # !/usr/bin/env python from distutils.core import setup setup( name='transitive-citation', packages=[], version='0.1.0', description='Transitive Citation', author='<NAME>, <NAME>, and <NAME>', license='MIT', author_email='<EMAIL>', url='ht...
# !/usr/bin/env python from distutils.core import setup setup( name='transitive-citation', packages=[], version='0.1.0', description='Transitive Citation', author='<NAME>, <NAME>, and <NAME>', license='MIT', author_email='<EMAIL>', url='https://github.com/dciampa/transitivecitation', ...
fr
0.163581
# !/usr/bin/env python
0.9645
1
DonkiDirector/DonkiDirector_cmdline.py
ess-dmsc/do-ess-data-simulator
0
6631560
#!/usr/bin/env python from DirectorBgnThread import directorThread import traceback """ if __name__ == "__main__": dt = directorThread(None) dt.start() dt.max_triggers = 50 dt.EnableDataSaving = False nFiles = 1 dt.set_file_prefix("mytest") dt.set_file_path(".") dt.set_files_contiguous...
#!/usr/bin/env python from DirectorBgnThread import directorThread import traceback """ if __name__ == "__main__": dt = directorThread(None) dt.start() dt.max_triggers = 50 dt.EnableDataSaving = False nFiles = 1 dt.set_file_prefix("mytest") dt.set_file_path(".") dt.set_files_contiguous...
en
0.28253
#!/usr/bin/env python if __name__ == "__main__": dt = directorThread(None) dt.start() dt.max_triggers = 50 dt.EnableDataSaving = False nFiles = 1 dt.set_file_prefix("mytest") dt.set_file_path(".") dt.set_files_contiguous(True) dt.set_files_to_save(nFiles) dt.set_file_size(dt.max_...
2.68102
3
src/openscm_runner/run.py
znicholls/openscm-runner-1
0
6631561
<reponame>znicholls/openscm-runner-1 """ High-level run function """ import scmdata from dotenv import find_dotenv, load_dotenv from tqdm.autonotebook import tqdm from .adapters import MAGICC7 # is this the right place to put this... load_dotenv(find_dotenv(), verbose=True) def run( climate_models_cfgs, sce...
""" High-level run function """ import scmdata from dotenv import find_dotenv, load_dotenv from tqdm.autonotebook import tqdm from .adapters import MAGICC7 # is this the right place to put this... load_dotenv(find_dotenv(), verbose=True) def run( climate_models_cfgs, scenarios, output_variables=("Surfac...
en
0.754043
High-level run function # is this the right place to put this... Run a number of climate models over a number of scenarios Parameters ---------- climate_models_cfgs : dict[str: list] Dictionary where each key is a model and each value is the configs with which to run the model. The configs ...
2.653917
3
examples/App/FXConverter/suites.py
chiragmatkar/testplan
96
6631562
"""FX conversion tests.""" import os from testplan.testing.multitest import testsuite, testcase def msg_to_bytes(msg, standard="utf-8"): """Encode text to bytes.""" return bytes(msg.encode(standard)) def bytes_to_msg(seq, standard="utf-8"): """Decode bytes to text.""" return seq.decode(standard) ...
"""FX conversion tests.""" import os from testplan.testing.multitest import testsuite, testcase def msg_to_bytes(msg, standard="utf-8"): """Encode text to bytes.""" return bytes(msg.encode(standard)) def bytes_to_msg(seq, standard="utf-8"): """Decode bytes to text.""" return seq.decode(standard) ...
en
0.829799
FX conversion tests. Encode text to bytes. Decode bytes to text. Return original docstring (if available) and parametrization arguments in the format ``key: value``. Sample currency conversion operations. Client sends a request to the currency converter app. The converter retrieves the conversion rate from ...
2.789874
3
tools/nntool/execution/execution_progress.py
00-01/gap_sdk
118
6631563
<filename>tools/nntool/execution/execution_progress.py<gh_stars>100-1000 # Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version...
<filename>tools/nntool/execution/execution_progress.py<gh_stars>100-1000 # Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version...
en
0.880961
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This program...
2.209239
2
scripts/build_gear_input_set.py
mammadjv/GEAR
88
6631564
<gh_stars>10-100 ENCODING = 'utf-8' SENTENCE_NUM = 5 def is_evidence_exist(evidence_set, evid): for evidence in evidence_set: if evid[1] == evidence[1] and evid[2] == evidence[2]: return True return False ''' Build GEAR train set with truth evidence and retrieval evidence. ''' def bui...
ENCODING = 'utf-8' SENTENCE_NUM = 5 def is_evidence_exist(evidence_set, evid): for evidence in evidence_set: if evid[1] == evidence[1] and evid[2] == evidence[2]: return True return False ''' Build GEAR train set with truth evidence and retrieval evidence. ''' def build_with_truth_and...
en
0.351591
Build GEAR train set with truth evidence and retrieval evidence. # flog = open(label_file, 'wb') # flog.write(label_line.encode(ENCODING)) # flog.close() Build GEAR dev/test set with retrieval evidence. # build_with_threshold('../data/bert/bert-nli-dev-retrieve-set.tsv', '../data/gear/gear-dev-set-0_1.tsv', 0.1) # buil...
3.165559
3
scripts/physics_filter.py
underworlds-robot/uwds_physics_clients
0
6631565
#!/usr/bin/env python # -*- coding: UTF-8 -*- import rospy import pybullet as p import numpy as np from tf import transformations as tf import math import uuid from pyuwds.reconfigurable_client import ReconfigurableClient from uwds_msgs.msg import Changes, Situation, Property, Invalidations from pyuwds.uwds import FIL...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import rospy import pybullet as p import numpy as np from tf import transformations as tf import math import uuid from pyuwds.reconfigurable_client import ReconfigurableClient from uwds_msgs.msg import Changes, Situation, Property, Invalidations from pyuwds.uwds import FIL...
en
0.644289
#!/usr/bin/env python # -*- coding: UTF-8 -*- # 1cm # reasoning parameters # simulator parameters # self.nb_step_fall = int(self.fall_simulation_step / self.time_step) # init simulator #p.setPhysicsEngineParameter(contactBreakingThreshold=0.01) #t_prev = tf.compose_matrix(angles=tf.euler_from_quaternion(self.previous_o...
2.102189
2
graphwalker/cli.py
spotify/python-graphwalker
66
6631566
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB """Tool for testing based on finite state machine graphs. Graphwalker reads FSMs specified by graphs, plans paths, calls model methods by name from graph labels and reports progress and results. While conceptually derived from the Graphwalker p...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB """Tool for testing based on finite state machine graphs. Graphwalker reads FSMs specified by graphs, plans paths, calls model methods by name from graph labels and reports progress and results. While conceptually derived from the Graphwalker p...
en
0.851868
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB Tool for testing based on finite state machine graphs. Graphwalker reads FSMs specified by graphs, plans paths, calls model methods by name from graph labels and reports progress and results. While conceptually derived from the Graphwalker proj...
2.730156
3
track2/icnet/model_icnet.py
omshinde/dfc2019
123
6631567
# Minor modifications added by <NAME>, 2018 # - Original code adapted from https://github.com/aitorzip/Keras-ICNet # - Keras implementation of ICNet: https://arxiv.org/abs/1704.08545 # - Added output summary of model with PNG illustration # - Generalized for arbitrary numbers of image bands # - Removed input image scal...
# Minor modifications added by <NAME>, 2018 # - Original code adapted from https://github.com/aitorzip/Keras-ICNet # - Keras implementation of ICNet: https://arxiv.org/abs/1704.08545 # - Added output summary of model with PNG illustration # - Generalized for arbitrary numbers of image bands # - Removed input image scal...
en
0.778989
# Minor modifications added by <NAME>, 2018 # - Original code adapted from https://github.com/aitorzip/Keras-ICNet # - Keras implementation of ICNet: https://arxiv.org/abs/1704.08545 # - Added output summary of model with PNG illustration # - Generalized for arbitrary numbers of image bands # - Removed input image scal...
2.151869
2
enaml/widgets/constraints_widget.py
ContinuumIO/enaml
2
6631568
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
en
0.7739
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
2.029515
2
DataSynthesizer/datatypes/utils/AttributeLoader.py
crangelsmith/synthetic-data-tutorial
68
6631569
from pandas import Series from datatypes.DateTimeAttribute import DateTimeAttribute from datatypes.FloatAttribute import FloatAttribute from datatypes.IntegerAttribute import IntegerAttribute from datatypes.SocialSecurityNumberAttribute import SocialSecurityNumberAttribute from datatypes.StringAttribute import StringA...
from pandas import Series from datatypes.DateTimeAttribute import DateTimeAttribute from datatypes.FloatAttribute import FloatAttribute from datatypes.IntegerAttribute import IntegerAttribute from datatypes.SocialSecurityNumberAttribute import SocialSecurityNumberAttribute from datatypes.StringAttribute import StringA...
none
1
2.977364
3
sdb/commands/zfs/dbuf.py
alan-maguire/sdb
0
6631570
# # Copyright 2019 Delphix # # 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...
# # Copyright 2019 Delphix # # 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...
en
0.828498
# # Copyright 2019 Delphix # # 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...
2.111146
2
image_gallery/migrations/0004_gallery_slug.py
tehfink/cmsplugin-image-gallery
0
6631571
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-27 18:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('image_gallery', '0003_auto_20190120_2316'), ] operations = [ migrations.Ad...
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-27 18:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('image_gallery', '0003_auto_20190120_2316'), ] operations = [ migrations.Ad...
en
0.68825
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-27 18:08
1.520075
2
toppra/algorithm/algorithm.py
Linjackffy/toppra
0
6631572
""" """ import numpy as np from ..constants import TINY from toppra.interpolator import SplineInterpolator, AbstractGeometricPath import toppra.interpolator as interpolator import logging logger = logging.getLogger(__name__) class ParameterizationAlgorithm(object): """Base class for all parameterization algori...
""" """ import numpy as np from ..constants import TINY from toppra.interpolator import SplineInterpolator, AbstractGeometricPath import toppra.interpolator as interpolator import logging logger = logging.getLogger(__name__) class ParameterizationAlgorithm(object): """Base class for all parameterization algori...
en
0.587478
Base class for all parameterization algorithms. All algorithms should have three attributes: `constraints`, `path` and `gridpoints` and also implement the method `compute_parameterization`. Parameters ---------- constraint_list: list of `Constraint` path: `AbstractGeometricPath` Th...
2.854184
3
tools/chrome_proxy/integration_tests/chrome_proxy_metrics_unittest.py
kjthegod/chromium
1
6631573
<filename>tools/chrome_proxy/integration_tests/chrome_proxy_metrics_unittest.py # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import base64 import unittest from integration_tests import chrome_proxy_met...
<filename>tools/chrome_proxy/integration_tests/chrome_proxy_metrics_unittest.py # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import base64 import unittest from integration_tests import chrome_proxy_met...
en
0.868906
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Timeline events used in tests. # An HTML not via proxy. # An HTML via proxy with the deprecated Via header. # An image via proxy with Via header and it is c...
2.051633
2
Phase5/script.py
DamianoP/AdaptiveMethods
2
6631574
import os import sys import subprocess import json import re import IPython as ip import pandas as pd import matplotlib import time from matplotlib.patches import Rectangle matplotlib.use('Agg') import numpy as np import matplotlib as mp import seaborn as sb import ck.kernel as ck import matplotlib.pyplot as plt from m...
import os import sys import subprocess import json import re import IPython as ip import pandas as pd import matplotlib import time from matplotlib.patches import Rectangle matplotlib.use('Agg') import numpy as np import matplotlib as mp import seaborn as sb import ck.kernel as ck import matplotlib.pyplot as plt from m...
en
0.384333
#"alexnetDecisionTree" #raw_input("Name of dataset: ") #"false" #"midgard" #int(raw_input("Image graph generation (digit 1 for yes, or 0 for not): "))#1 for generate the images, 0 for generate only the text file ######### ######### #PREPROCESSING #LOADING DATA # TIME FOR THE CALCULATION OF ALL THE DATASET # TIME FOR TH...
2.530672
3
replay/management/commands/record.py
Liliai/django-replay
1
6631575
"""Record Management Command TODO * Add support for "runserver" options. """ import itertools from django.core.management import call_command from django.core.management.base import BaseCommand class Command(BaseCommand): can_import_settings = True def handle(self, *args, **options): # pylint: di...
"""Record Management Command TODO * Add support for "runserver" options. """ import itertools from django.core.management import call_command from django.core.management.base import BaseCommand class Command(BaseCommand): can_import_settings = True def handle(self, *args, **options): # pylint: di...
en
0.609655
Record Management Command TODO * Add support for "runserver" options. # pylint: disable=import-outside-toplevel
2.069059
2
predictions/utils/future.py
SimonMolinsky/pygda-hydra
1
6631576
<filename>predictions/utils/future.py import pandas as pd def set_future_series(forecasted_values, series_name, last_date, steps_ahead, frequency): """ Function sets future predictions. :param forecasted_values: array of predictions, :param series_name: name of the forecasted series, :param last_...
<filename>predictions/utils/future.py import pandas as pd def set_future_series(forecasted_values, series_name, last_date, steps_ahead, frequency): """ Function sets future predictions. :param forecasted_values: array of predictions, :param series_name: name of the forecasted series, :param last_...
en
0.805858
Function sets future predictions. :param forecasted_values: array of predictions, :param series_name: name of the forecasted series, :param last_date: the last observation time, :param steps_ahead: how many steps ahead of predictions, :param frequency: frequency of time steps. :return: Series ...
3.465598
3
src/assets/spanish/year7.py
pz325/one-page-a-day
0
6631577
# -*- coding: utf-8 -*- # pylint: disable=C0301 ''' contents of Zhenglin's Spanish year 7 ''' ZHENGLIN_YEAR7 = { 'title': 'Spanish Year 7', 'user': 'Zhenglin', 'template': 'table', 'subject': 'spanish', 'sections':[ { 'title': 'Numbers 1 - 10', 'exercises': [ ...
# -*- coding: utf-8 -*- # pylint: disable=C0301 ''' contents of Zhenglin's Spanish year 7 ''' ZHENGLIN_YEAR7 = { 'title': 'Spanish Year 7', 'user': 'Zhenglin', 'template': 'table', 'subject': 'spanish', 'sections':[ { 'title': 'Numbers 1 - 10', 'exercises': [ ...
en
0.475138
# -*- coding: utf-8 -*- # pylint: disable=C0301 contents of Zhenglin's Spanish year 7 # a section object # a section object # a section object # a section object # a section object contents of ZOOM espanol 1 # a section object # a section object # a section object # a section object # a section object # a section obje...
2.44469
2
discopy/drawing.py
Doomsk/discopy
1
6631578
<reponame>Doomsk/discopy # -*- coding: utf-8 -*- """ Drawing module. """ import os from tempfile import NamedTemporaryFile, TemporaryDirectory import networkx as nx from PIL import Image import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.patches import PathPatch COLORS = { 'red': '...
# -*- coding: utf-8 -*- """ Drawing module. """ import os from tempfile import NamedTemporaryFile, TemporaryDirectory import networkx as nx from PIL import Image import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.patches import PathPatch COLORS = { 'red': '#e8a5a5', 'green': '#...
en
0.632527
# -*- coding: utf-8 -*- Drawing module. Builds a networkx graph, called by :meth:`Diagram.draw`. Returns ------- graph, positions, labels : tuple where: * :code:`graph` is a networkx graph with nodes for inputs, outputs, boxes and wires, * :code:`positions` is a dict from...
3.036516
3
ThirdParty/pybluez2-macos_fix/macos/_lightblue.py
zhaocy14/SmartWalker
2
6631579
<gh_stars>1-10 # Copyright (c) 2009 <NAME>. All rights reserved. # # This file is part of LightBlue. # # LightBlue is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
# Copyright (c) 2009 <NAME>. All rights reserved. # # This file is part of LightBlue. # # LightBlue is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
en
0.848475
# Copyright (c) 2009 <NAME>. All rights reserved. # # This file is part of LightBlue. # # LightBlue is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
1.8235
2
scripts/pyqt/qlist_clicked_sqlite.py
meramsey/python-scripts-collection
2
6631580
<reponame>meramsey/python-scripts-collection import re import sys from datetime import date from PySide2.QtCore import Qt from qtpy import QtSql from PySide2.QtSql import QSqlDatabase, QSqlQueryModel, QSqlQuery from PySide2.QtWidgets import QTableView, QApplication import sys command_category = 'FirewallChecks' # se...
import re import sys from datetime import date from PySide2.QtCore import Qt from qtpy import QtSql from PySide2.QtSql import QSqlDatabase, QSqlQueryModel, QSqlQuery from PySide2.QtWidgets import QTableView, QApplication import sys command_category = 'FirewallChecks' # self.commandcategorydropdown def replace(stri...
en
0.329727
# self.commandcategorydropdown # domain = self.domaininput.text() # url = self.urlinput.text() # email = self.emailinput.text() # email2 = self.emailinput2.text() # username = self.usernameinput.text() # clientip = self.clientipinput.text() # date_time_input = self.dateTimeinput.text() # DomainInputField # Email1InputF...
2.555063
3
web/evaluate/Parsers/RJParser.py
ChristoferHuynh/web
0
6631581
<reponame>ChristoferHuynh/web<gh_stars>0 ''' Created on May 3, 2017 @author: jesper ''' import itertools import yaml from symbol import comparison from multiprocessing.forking import duplicate from sqlalchemy.sql.functions import next_value class AuditModule(): @staticmethod def read(file): pass ...
''' Created on May 3, 2017 @author: jesper ''' import itertools import yaml from symbol import comparison from multiprocessing.forking import duplicate from sqlalchemy.sql.functions import next_value class AuditModule(): @staticmethod def read(file): pass @staticmethod def evaluate(info, yaml...
en
0.710245
Created on May 3, 2017 @author: jesper # [1:-2] is to trim the filename from from quotation marks # [permissions][?][owner][group][size][month][day][hour:min][filename] # for key in yaml_dict: # if info.has_key(key): # customer_value = info[key] # # for comparison in...
2.135804
2
aidants_connect_web/tests/test_functional/test_view_autorisations.py
betagouv/Aidants_Connect
16
6631582
<filename>aidants_connect_web/tests/test_functional/test_view_autorisations.py<gh_stars>10-100 from datetime import timedelta from django.test import tag from django.utils import timezone from aidants_connect_web.tests.factories import ( AidantFactory, AutorisationFactory, MandatFactory, UsagerFactory...
<filename>aidants_connect_web/tests/test_functional/test_view_autorisations.py<gh_stars>10-100 from datetime import timedelta from django.test import tag from django.utils import timezone from aidants_connect_web.tests.factories import ( AidantFactory, AutorisationFactory, MandatFactory, UsagerFactory...
fr
0.337974
# Login # Espace Aidant home # autorisation List
2.093207
2
resnet_imagenet.py
ivankreso/resnet-tensorflow
2
6631583
import time import tensorflow as tf import argparse import os, re import numpy as np import h5py import tensorflow.contrib.layers as layers from tensorflow.contrib.framework import arg_scope # model depth can be 50, 101 or 152 MODEL_DEPTH = 50 #DATA_MEAN = [103.939, 116.779, 123.68] DATA_MEAN = np.load('imagenet_mean...
import time import tensorflow as tf import argparse import os, re import numpy as np import h5py import tensorflow.contrib.layers as layers from tensorflow.contrib.framework import arg_scope # model depth can be 50, 101 or 152 MODEL_DEPTH = 50 #DATA_MEAN = [103.939, 116.779, 123.68] DATA_MEAN = np.load('imagenet_mean...
en
0.538911
# model depth can be 50, 101 or 152 #DATA_MEAN = [103.939, 116.779, 123.68] # Decay for the moving averages. # epsilon to prevent 0s in variance. # None to force the updates #image = tf.pad(image, [[0,0],[3,3],[3,3],[0,0]]) #net = layers.convolution2d(image, 64, 7, stride=2, padding='VALID',
2.17268
2
transformers_sandbox/reformer.py
aikindergarten/transformers_sandbox
1
6631584
<reponame>aikindergarten/transformers_sandbox # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/04a_models.reformer.ipynb (unless otherwise specified). __all__ = ['Chunk', 'ChunkedFeedForward', 'Deterministic', 'ReversibleBlock', 'IrreversibleBlock', 'ReversibleSequence', 'RevSwap', 'RevHalfResidual', 'RevChu...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/04a_models.reformer.ipynb (unless otherwise specified). __all__ = ['Chunk', 'ChunkedFeedForward', 'Deterministic', 'ReversibleBlock', 'IrreversibleBlock', 'ReversibleSequence', 'RevSwap', 'RevHalfResidual', 'RevChunk', 'RevMerge', 'ReversibleSequenceV2', 'Reve...
en
0.526001
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/04a_models.reformer.ipynb (unless otherwise specified). # Cell # Cell # Cell # Cell Wrapper module to ensure determinism for backward pass following example for saving and setting rng here https://pytorch.org/docs/stable/_modules/torch/utils/checkpoint.html # Cell...
2.214108
2
pygame_demo4/playmp3test.py
chivitc1/pygamedemo
0
6631585
import pygame MUSIC_PATH = "/home/chinv/Music/rap_viet/ViDoLaEm-OsadShinHyunWoo.mp3" pygame.mixer.pre_init(44100, 16, 2, 4096) pygame.init() pygame.display.set_mode((200,100)) pygame.mixer.music.load(MUSIC_PATH) pygame.mixer.music.play() pygame.time.wait(5000) pygame.mixer.music.load("/home/chinv/Music/rap_viet/HaiTr...
import pygame MUSIC_PATH = "/home/chinv/Music/rap_viet/ViDoLaEm-OsadShinHyunWoo.mp3" pygame.mixer.pre_init(44100, 16, 2, 4096) pygame.init() pygame.display.set_mode((200,100)) pygame.mixer.music.load(MUSIC_PATH) pygame.mixer.music.play() pygame.time.wait(5000) pygame.mixer.music.load("/home/chinv/Music/rap_viet/HaiTr...
de
0.176934
# pygame.event.poll()
2.764001
3
flask/app/forms.py
pnnl/Temwizard
2
6631586
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, FloatField, IntegerField from wtforms.validators import DataRequired class FirstSublattice(FlaskForm): scale_image = FloatField("2. Scale Image", default=1) pixels_nanometer = FloatField("3. Pixels per na...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, FloatField, IntegerField from wtforms.validators import DataRequired class FirstSublattice(FlaskForm): scale_image = FloatField("2. Scale Image", default=1) pixels_nanometer = FloatField("3. Pixels per na...
en
0.29666
#90 #218.365 #.19 #.24 #max_dist image scale_image pixels_nanometer
2.604084
3
core/struct/mc.py
iceman121/pathforger
0
6631587
<reponame>iceman121/pathforger import pickle class MainCharacter: def __init__(self): """ Class to hold character information """ # Main character id self.name = None self.p1 = None self.p1_is = None self.p2 = None self.p3 = None def new...
import pickle class MainCharacter: def __init__(self): """ Class to hold character information """ # Main character id self.name = None self.p1 = None self.p1_is = None self.p2 = None self.p3 = None def new_game(self, name, p1, p1_is, p2...
en
0.754987
Class to hold character information # Main character id Start new game :param name: Toon name :param p1: Subject pronoun :param p1_is: Subject pronoun verb :param p2: Possessive pronoun :param p3: Object pronoun :return: Load game from file :param choice: name of ...
3.381972
3
middleware/legato/templates/legato_gfx_pda_5000/Support_BSP_PIC32MZ_EF_Curiosity.py
rbryson74/gfx
0
6631588
# coding: utf-8 ############################################################################## # Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. # # Subject to your compliance with these terms, you may use Microchip software # and any derivatives exclusively with Microchip products. It is your # resp...
# coding: utf-8 ############################################################################## # Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. # # Subject to your compliance with these terms, you may use Microchip software # and any derivatives exclusively with Microchip products. It is your # resp...
en
0.433803
# coding: utf-8 ############################################################################## # Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. # # Subject to your compliance with these terms, you may use Microchip software # and any derivatives exclusively with Microchip products. It is your # resp...
1.081395
1
sgtpy/gammamie_pure/g2mca_chain.py
MatKie/SGTPy
12
6631589
from __future__ import division, print_function, absolute_import import numpy as np # Equation (62) Paper 2014 def g2mca(xhi00, khs, xs_m, da2new, suma_g2, eps_ii, a1vdw_cteii): g2 = 3 * da2new / eps_ii g2 -= khs * suma_g2 / xhi00 g2 /= xs_m g2 /= - a1vdw_cteii return g2 def dg2mca_dxhi00(xhi00...
from __future__ import division, print_function, absolute_import import numpy as np # Equation (62) Paper 2014 def g2mca(xhi00, khs, xs_m, da2new, suma_g2, eps_ii, a1vdw_cteii): g2 = 3 * da2new / eps_ii g2 -= khs * suma_g2 / xhi00 g2 /= xs_m g2 /= - a1vdw_cteii return g2 def dg2mca_dxhi00(xhi00...
en
0.607808
# Equation (62) Paper 2014
2.269409
2
daemon/files.py
arijitdas123student/jina
15,179
6631590
<gh_stars>1000+ import os import re from itertools import chain from pathlib import Path from typing import Dict, List, Union from fastapi import UploadFile from jina.logging.logger import JinaLogger from jina.excepts import DaemonInvalidDockerfile from . import __rootdir__, __dockerfiles__, jinad_args from .helper i...
import os import re from itertools import chain from pathlib import Path from typing import Dict, List, Union from fastapi import UploadFile from jina.logging.logger import JinaLogger from jina.excepts import DaemonInvalidDockerfile from . import __rootdir__, __dockerfiles__, jinad_args from .helper import get_worksp...
en
0.757414
Store the uploaded files in local disk :param workspace_id: workspace id representing the local directory :param files: files uploaded to the workspace endpoint :param logger: JinaLogger to use Check if filename is of requirements.txt format :param filename: filename :return: True if filename is i...
2.411075
2
webapp/views/mlva_query_view.py
fasemoreakinyemi/coxbase_webapp
0
6631591
<gh_stars>0 #!/usr/bin/env python # -*- coding: iso-8859-15 -*- from pyramid.view import view_config from pyramid.response import Response from pyramid.httpexceptions import HTTPFound from sqlalchemy.exc import DBAPIError from pyramid.paster import get_appsettings from sqlalchemy import engine_from_config, create_engi...
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- from pyramid.view import view_config from pyramid.response import Response from pyramid.httpexceptions import HTTPFound from sqlalchemy.exc import DBAPIError from pyramid.paster import get_appsettings from sqlalchemy import engine_from_config, create_engine from sqla...
en
0.76493
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- # query = request.db2_session.query(isolates).join(isolatesRef, isolates.isolateid == isolatesRef.isolate_id).filter(isolatesRef.pmid == 25037926).filter( # isolates.mlvaGenotype == ID) \ Pyramid is having a problem using your SQL database. The problem might be c...
1.896822
2
annotation/validate_genome.py
Hua-CM/HuaSmallTools
21
6631592
# -*- coding: utf-8 -*- # @Time : 2021/8/23 13:09 # @Author : <NAME> # @File : validate_genome.py # @Usage : # @Note : # @E-mail : <EMAIL> import argparse import copy from BCBio import GFF from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqFeature import Feature...
# -*- coding: utf-8 -*- # @Time : 2021/8/23 13:09 # @Author : <NAME> # @File : validate_genome.py # @Usage : # @Note : # @E-mail : <EMAIL> import argparse import copy from BCBio import GFF from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqFeature import Feature...
en
0.329656
# -*- coding: utf-8 -*- # @Time : 2021/8/23 13:09 # @Author : <NAME> # @File : validate_genome.py # @Usage : # @Note : # @E-mail : <EMAIL> # extension # modify_gene # modify_gene # modify_gene # modify_gene # modify_gene # can not handle for now # for second round
2.377015
2
screenplay_selenium/actions/click_on.py
byran/ScreenPlaySelenium
0
6631593
from screenplay import Action, Actor, log_message from screenplay_selenium.abilities.browse_the_web import waiting_browser_for from selenium.common.exceptions import StaleElementReferenceException, NoSuchElementException from ._handle_no_such_element_base_action import handle_no_such_element_base_action class _click_...
from screenplay import Action, Actor, log_message from screenplay_selenium.abilities.browse_the_web import waiting_browser_for from selenium.common.exceptions import StaleElementReferenceException, NoSuchElementException from ._handle_no_such_element_base_action import handle_no_such_element_base_action class _click_...
none
1
2.515979
3
backend/monitoring/python_RPA_scripts/test.py
khouloudS/RPA_Telecom_Drive_tests
0
6631594
import time import sys import random import time count=0 while True: if count%60==0: value=random.randint(0,1) if(value==0): run('C:\\Users\\Khouloud\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe') wait() #maximize_window('Welcome - Visual Studio Code') move_mouse_...
import time import sys import random import time count=0 while True: if count%60==0: value=random.randint(0,1) if(value==0): run('C:\\Users\\Khouloud\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe') wait() #maximize_window('Welcome - Visual Studio Code') move_mouse_...
en
0.265196
#maximize_window('Welcome - Visual Studio Code') # open project
2.601119
3
src/exabgp/configuration/process/parser.py
pierky/exabgp
1,560
6631595
# encoding: utf-8 """ parse_process.py Created by <NAME> on 2015-06-18. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ import os import stat def encoder(tokeniser): value = tokeniser() if value not in ('text', 'json'): raise ValueError...
# encoding: utf-8 """ parse_process.py Created by <NAME> on 2015-06-18. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ import os import stat def encoder(tokeniser): value = tokeniser() if value not in ('text', 'json'): raise ValueError...
en
0.82942
# encoding: utf-8 parse_process.py Created by <NAME> on 2015-06-18. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) # without abspath the path is not / prefixed ! # race conditions are possible, those are sanity checks not security ones ...
2.328371
2
extractor.py
alangadiel/whatsapp-android-extractor
0
6631596
<reponame>alangadiel/whatsapp-android-extractor import sqlite3 import csv import sys import os import codecs from datetime import datetime def fmt_phone(number, name): if number is None: return number = number.replace(' ', '').replace('-', '').replace('+', '') if number == '': return i...
import sqlite3 import csv import sys import os import codecs from datetime import datetime def fmt_phone(number, name): if number is None: return number = number.replace(' ', '').replace('-', '').replace('+', '') if number == '': return if not number.startswith('549'): number =...
en
0.341667
# TODO: replace unicode chars for files # get contact list from csv # skip first item. # get groups from whatsapp db SELECT jid, display_name FROM wa_contacts WHERE display_name IS NOT NULL # get messages from whatsapp db SELECT DISTINCT key_remote_jid FROM messages # is a contact # get name # q...
3.218523
3
src/compas_rhino/ui/mouse.py
arpastrana/compas
0
6631597
from __future__ import print_function import compas if compas.IPY: from Rhino.UI import MouseCallback else: class MouseCallback(object): pass __all__ = ['Mouse'] class Mouse(MouseCallback): """""" def __init__(self, parent=None): super(Mouse, self).__init__() self.parent =...
from __future__ import print_function import compas if compas.IPY: from Rhino.UI import MouseCallback else: class MouseCallback(object): pass __all__ = ['Mouse'] class Mouse(MouseCallback): """""" def __init__(self, parent=None): super(Mouse, self).__init__() self.parent =...
en
0.57007
# x-coordinate of 2D point in the viewport # y-coordinate of 2D point in the viewport # start of the frustum line in world coordinates # end of the frustum line in world coordinates # ============================================================================== # Main # ================================================...
2.563555
3
bark_ml/tests/py_bark_behavior_model_tests.py
bark-simulator/rl
58
6631598
# Copyright (c) 2020 fortiss GmbH # # Authors: <NAME> # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import unittest import numpy as np import gym # BARK from bark.runtime.commons.parameters import ParameterServer # BARK-ML from bark_ml.librar...
# Copyright (c) 2020 fortiss GmbH # # Authors: <NAME> # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import unittest import numpy as np import gym # BARK from bark.runtime.commons.parameters import ParameterServer # BARK-ML from bark_ml.librar...
en
0.855509
# Copyright (c) 2020 fortiss GmbH # # Authors: <NAME> # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # BARK # BARK-ML # pylint: disable=unused-import # NOTE: should be the same as mean is taken from the agents
1.789001
2
pwndbg/symbol.py
CrackerCat/pwndbg_linux_kernel
1
6631599
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Looking up addresses for function names / symbols, and vice-versa. Uses IDA when available if there isn't sufficient symbol information available. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __fu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Looking up addresses for function names / symbols, and vice-versa. Uses IDA when available if there isn't sufficient symbol information available. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __fu...
en
0.750832
#!/usr/bin/env python # -*- coding: utf-8 -*- Looking up addresses for function names / symbols, and vice-versa. Uses IDA when available if there isn't sufficient symbol information available. Retrieve the debug file directory path. The debug file directory path ('show debug-file-directory') is a comma- separ...
2.39905
2
surf/train_data.py
githmy/vnpymy
1
6631600
<reponame>githmy/vnpymy # coding: utf-8 from surf.script_tab import keytab import os, json, time, re, codecs, glob from surf.surf_tool import regex2pairs import matplotlib.pyplot as plt import matplotlib as mpl import logging.handlers import pandas as pd import itertools import numpy as np import lightgbm as lgb clas...
# coding: utf-8 from surf.script_tab import keytab import os, json, time, re, codecs, glob from surf.surf_tool import regex2pairs import matplotlib.pyplot as plt import matplotlib as mpl import logging.handlers import pandas as pd import itertools import numpy as np import lightgbm as lgb class TrainFunc(object): ...
zh
0.310279
# coding: utf-8 # "tcn": None, # "tabnet": None, # fig2 = plt.figure(figsize=(20, 20)) # ax = fig2.subplots() # lgb.plot_tree(model, tree_index=1, ax=ax) # plt.show() # lgb.create_tree_digraph(model, tree_index=1) # print('画出训练结果...') # # lgb.plot_metric(evals_result, metric='auc') # lgb.plot_metric(evals_result, metri...
2.250041
2
shapenet.py
roatienza/pc2pix
12
6631601
import json import logging import os.path as osp from queue import Empty, Queue from threading import Thread, current_thread import numpy as np import functools from config import SHAPENET_IM from config import SHAPENET_PC from loader import read_camera, read_depth, read_im, read_quat, read_vol, read_view, read_gray,...
import json import logging import os.path as osp from queue import Empty, Queue from threading import Thread, current_thread import numpy as np import functools from config import SHAPENET_IM from config import SHAPENET_PC from loader import read_camera, read_depth, read_im, read_quat, read_vol, read_view, read_gray,...
en
0.652813
# Exhausted all data
2.171426
2
1 - python/implementacao2/taylor.py
Ellian-aragao/IFB-CN
0
6631602
<reponame>Ellian-aragao/IFB-CN<filename>1 - python/implementacao2/taylor.py<gh_stars>0 def FdeX(x): # função de x return (- 0.1 * x ** 4 - 0.15 * x ** 3 - 0.5 * x ** 2 - 0.25 * x + 1.2) def Taylor(coeficientes, x, i): # função de Taylor return (coeficientes * x ** i) # coeficientes dados pela lista coefic...
- python/implementacao2/taylor.py<gh_stars>0 def FdeX(x): # função de x return (- 0.1 * x ** 4 - 0.15 * x ** 3 - 0.5 * x ** 2 - 0.25 * x + 1.2) def Taylor(coeficientes, x, i): # função de Taylor return (coeficientes * x ** i) # coeficientes dados pela lista coeficientes = [1.2, -0.25, -0.5, -0.15, -0.1] ...
pt
0.982018
# função de x # função de Taylor # coeficientes dados pela lista # intervalo dado [0,4] que foi dividido em dez partes # alterando os valores de x # realizando as iterações de taylor para chegar no valor de f(x) # critério de parada quando elementos são iguais
3.716439
4
tensor2tensor/models/research/r_transformer.py
spacegoing/t2t_caps
0
6631603
<reponame>spacegoing/t2t_caps # coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 # #...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
en
0.768994
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
1.97163
2
test/torchaudio_unittest/backend/soundfile/load_test.py
underdogliu/audio
0
6631604
import os import tarfile from unittest.mock import patch import torch from parameterized import parameterized from torchaudio._internal import module_utils as _mod_utils from torchaudio.backend import soundfile_backend from torchaudio_unittest.common_utils import ( get_wav_data, load_wav, normalize_wav, ...
import os import tarfile from unittest.mock import patch import torch from parameterized import parameterized from torchaudio._internal import module_utils as _mod_utils from torchaudio.backend import soundfile_backend from torchaudio_unittest.common_utils import ( get_wav_data, load_wav, normalize_wav, ...
en
0.384736
When format is WAV or NIST, normalize=False will return the native dtype Tensor, otherwise float32 Returns native dtype when normalize=False else float32 Returns float32 always Returns float32 always `soundfile_backend.load` can load ogg format. `soundfile_backend.load` can load wav format correctly. Wav data ...
2.313033
2
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
Polidea/SiriusObfuscator
427
6631605
<reponame>Polidea/SiriusObfuscator<gh_stars>100-1000 """Test Python APIs for process IO.""" from __future__ import print_function import os import sys import time import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class ProcessIOTestCase(Te...
"""Test Python APIs for process IO.""" from __future__ import print_function import os import sys import time import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class ProcessIOTestCase(TestBase): mydir = TestBase.compute_mydir(__file__...
en
0.766122
Test Python APIs for process IO. # Call super's setUp(). # Get the full path to our executable to be debugged. # stdio manipulation unsupported on Windows Exercise SBProcess.PutSTDIN(). # stdio manipulation unsupported on Windows Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR. ...
2.046483
2
budgetml/gcp/addresses.py
strickvl/budgetml
1,316
6631606
<gh_stars>1000+ import logging import time def promote_ephemeral_ip( compute, project, region, ephemeral_ip, address_name, subnetwork): config = { "addressType": "INTERNAL", "address": ephemeral_ip, "name": address_name, "subnetwork":...
import logging import time def promote_ephemeral_ip( compute, project, region, ephemeral_ip, address_name, subnetwork): config = { "addressType": "INTERNAL", "address": ephemeral_ip, "name": address_name, "subnetwork": subnetwork ...
none
1
2.352772
2
pytaon/decorators.py
rodrigocam/pytaon
5
6631607
def vector_argument(func): """ Decorador que transforma função que recebe um vetor como único argumento posicional (e qualquer número de argumentos passados por nome) e retorna uma função que aceita tanto um vetor ou tupla como único argumento ou dois argumentos posicionais com cada coordenada. ...
def vector_argument(func): """ Decorador que transforma função que recebe um vetor como único argumento posicional (e qualquer número de argumentos passados por nome) e retorna uma função que aceita tanto um vetor ou tupla como único argumento ou dois argumentos posicionais com cada coordenada. ...
pt
0.81312
Decorador que transforma função que recebe um vetor como único argumento posicional (e qualquer número de argumentos passados por nome) e retorna uma função que aceita tanto um vetor ou tupla como único argumento ou dois argumentos posicionais com cada coordenada. Examples: >>> @vector_argument ...
4.382422
4
model_monitor_template.py
cwiecha/eaisystems2022
0
6631608
<reponame>cwiecha/eaisystems2022<filename>model_monitor_template.py<gh_stars>0 import boto3 from botocore.config import Config from boto3.dynamodb.conditions import Key, Attr import time import csv from datetime import datetime import requests import sys my_config = Config( region_name = '<your region>' ) # Get t...
import boto3 from botocore.config import Config from boto3.dynamodb.conditions import Key, Attr import time import csv from datetime import datetime import requests import sys my_config = Config( region_name = '<your region>' ) # Get the service resource. session = boto3.Session( aws_access_key_id='<key>', ...
en
0.856682
# Get the service resource. # build the training feature set #features.append(item['Label']) # copy original training data to new training_file_name.csv # check https://docs.python.org/3/library/shutil.html for info on how to do the file system copy! # use the example REST invocations in the model driver python script ...
2.277534
2
fuckcovid/auth/views.py
jespino/hospitales-covid19
0
6631609
from fuckcovid.auth.models import User from django.shortcuts import get_object_or_404 from .serializers import UserSerializer from rest_framework import viewsets from rest_framework.response import Response class UserViewSet(viewsets.ModelViewSet): """ A ViewSet for listing and retrieving users. """ ...
from fuckcovid.auth.models import User from django.shortcuts import get_object_or_404 from .serializers import UserSerializer from rest_framework import viewsets from rest_framework.response import Response class UserViewSet(viewsets.ModelViewSet): """ A ViewSet for listing and retrieving users. """ ...
en
0.680043
A ViewSet for listing and retrieving users.
1.923653
2
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/g/generic_alias/generic_alias_collections_py37_with_typing.py
ciskoinch8/vimrc
463
6631610
<reponame>ciskoinch8/vimrc """Test generic alias support for stdlib types (added in PY39). Raise [unsubscriptable-object] error for PY37 and PY38. Make sure `import typing` doesn't change anything. """ # flake8: noqa # pylint: disable=missing-docstring,pointless-statement,unused-import # pylint: disable=too-few-public...
"""Test generic alias support for stdlib types (added in PY39). Raise [unsubscriptable-object] error for PY37 and PY38. Make sure `import typing` doesn't change anything. """ # flake8: noqa # pylint: disable=missing-docstring,pointless-statement,unused-import # pylint: disable=too-few-public-methods,multiple-statement...
en
0.444118
Test generic alias support for stdlib types (added in PY39). Raise [unsubscriptable-object] error for PY37 and PY38. Make sure `import typing` doesn't change anything. # flake8: noqa # pylint: disable=missing-docstring,pointless-statement,unused-import # pylint: disable=too-few-public-methods,multiple-statements,line-...
1.961525
2
test/ds_utilities_test.py
jordantcarlisle/Lambdata-DSPT6-JTC
0
6631611
<reponame>jordantcarlisle/Lambdata-DSPT6-JTC import unittest from my_lambdata.ds_utilities import enlarge class TestDsUtilities(unittest.TestCase): def test_enlarge(self): self.assertEqual(enlarge(3), 300) if __name__ == '__main__': unittest.main()
import unittest from my_lambdata.ds_utilities import enlarge class TestDsUtilities(unittest.TestCase): def test_enlarge(self): self.assertEqual(enlarge(3), 300) if __name__ == '__main__': unittest.main()
none
1
2.379987
2
tests/stats_logger_tests.py
franksam007/incubator-superset
108
6631612
# 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...
# 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...
en
0.864943
# 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.088899
2
tr.py
TshakeA/TshakeV2-files
0
6631613
from utlis.rank import setrank,isrank,remrank,remsudos,setsudo, GPranks,IDrank from utlis.send import send_msg, BYusers, GetLink,Name,Glang from utlis.locks import st,getOR from utlis.tg import Bot from config import * from pyrogram import ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton import threadin...
from utlis.rank import setrank,isrank,remrank,remsudos,setsudo, GPranks,IDrank from utlis.send import send_msg, BYusers, GetLink,Name,Glang from utlis.locks import st,getOR from utlis.tg import Bot from config import * from pyrogram import ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton import threadin...
none
1
2.257157
2
src/managed_deployment/subnet_lambda.py
anotherhobby/carve
0
6631614
import os import urllib3 import socket import json ''' this subnet lambda code file is kept separate from the VPC stack CFN template for easier editing/testing and is injected into the CFN template at deploy time by carve-core lambda ''' def hc(beacon): http = urllib3.PoolManager() try: r = http.requ...
import os import urllib3 import socket import json ''' this subnet lambda code file is kept separate from the VPC stack CFN template for easier editing/testing and is injected into the CFN template at deploy time by carve-core lambda ''' def hc(beacon): http = urllib3.PoolManager() try: r = http.requ...
en
0.892084
this subnet lambda code file is kept separate from the VPC stack CFN template for easier editing/testing and is injected into the CFN template at deploy time by carve-core lambda
2.181369
2
contrib/rackspace/rackspace/clients.py
NeCTAR-RC/heat
1
6631615
<filename>contrib/rackspace/rackspace/clients.py # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
<filename>contrib/rackspace/rackspace/clients.py # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
en
0.793317
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
1.970859
2
resources/PyInstaller-3.0/tests/old_suite/basic/pkg2/extra/b.py
dvt32/mypymodoro
0
6631616
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
en
0.597055
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
2.595455
3
examples/class_image_TEST.py
rengezri/imsis
1
6631617
#!/usr/bin/env python ''' Class Image test ''' import os import imsis as ims import numpy as np print("Starting...") fn = r".\images\bberry.jpg" im_blueberry = ims.Image.load(fn) fn = r".\images\rice.jpg" im_rice = ims.Image.load(fn) fn = r".\images\spa_rice.tif" im_spa_rice = ims.Image.load(fn) ...
#!/usr/bin/env python ''' Class Image test ''' import os import imsis as ims import numpy as np print("Starting...") fn = r".\images\bberry.jpg" im_blueberry = ims.Image.load(fn) fn = r".\images\rice.jpg" im_rice = ims.Image.load(fn) fn = r".\images\spa_rice.tif" im_spa_rice = ims.Image.load(fn) ...
en
0.696281
#!/usr/bin/env python Class Image test # first bin than resize to original size # fisheye
2.549991
3
accounting_tech/migrations/0052_auto_20200305_1017.py
Tim-Ilin/asup_corp_site
0
6631618
# Generated by Django 2.1.7 on 2020-03-05 07:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounting_tech', '0051_auto_20191218_0950'), ] operations = [ migrations.AlterField( model_name='equipment', name='...
# Generated by Django 2.1.7 on 2020-03-05 07:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounting_tech', '0051_auto_20191218_0950'), ] operations = [ migrations.AlterField( model_name='equipment', name='...
en
0.742884
# Generated by Django 2.1.7 on 2020-03-05 07:17
1.31602
1
tools/network_vulnerability.py
andre-morelli/Urban-Analytics
0
6631619
import random import numpy as np from .utils import get_igraph, get_full_igraph import networkx as nx def remove_nodes_by_attr(G, attr, remove_proportion, ascending=False): """ Remove some proportion of nodes (and attached edges) from a graph based on an atrribute's numeric order. Parameters -----...
import random import numpy as np from .utils import get_igraph, get_full_igraph import networkx as nx def remove_nodes_by_attr(G, attr, remove_proportion, ascending=False): """ Remove some proportion of nodes (and attached edges) from a graph based on an atrribute's numeric order. Parameters -----...
en
0.6676
Remove some proportion of nodes (and attached edges) from a graph based on an atrribute's numeric order. Parameters ---------- G : NetworkX Graph structure Graph of the network. attr : string Reference attribute (must be on nodes of the graph). remove_proportion : float between ...
3.177043
3
implementations/week5/primitive_calculator.py
MichelML/edx_algos_micromaster
0
6631620
<reponame>MichelML/edx_algos_micromaster # Uses python3 def optimal_sequence(n): sequence = [] a = [0]*(n+1) for i in range(1, len(a)): a[i] = a[i-1] + 1 if i % 2 == 0: a[i] = min(1+a[i//2], a[i]) if i % 3 == 0: a[i] = min(1+a[i//3], a[i]) while n > 1: ...
# Uses python3 def optimal_sequence(n): sequence = [] a = [0]*(n+1) for i in range(1, len(a)): a[i] = a[i-1] + 1 if i % 2 == 0: a[i] = min(1+a[i//2], a[i]) if i % 3 == 0: a[i] = min(1+a[i//3], a[i]) while n > 1: sequence.append(n) if a[n-1]...
en
0.163637
# Uses python3
3.490116
3
day09/solution1.py
evanbrumley/aoc2021
0
6631621
<filename>day09/solution1.py import statistics class TubeMap: def __init__(self, rows): self.rows = rows self.cols = list(map(list, zip(*self.rows))) self.width = len(self.rows[0]) self.height = len(self.cols[0]) @classmethod def from_raw_lines(cls, lines): rows = ...
<filename>day09/solution1.py import statistics class TubeMap: def __init__(self, rows): self.rows = rows self.cols = list(map(list, zip(*self.rows))) self.width = len(self.rows[0]) self.height = len(self.cols[0]) @classmethod def from_raw_lines(cls, lines): rows = ...
none
1
3.313037
3
vaa/urls.py
arnists/vaa
1
6631622
<filename>vaa/urls.py """vaa URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...
<filename>vaa/urls.py """vaa URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...
en
0.540335
vaa URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based view...
2.541102
3
server/app.py
4-1-2/BIOBOT
0
6631623
# TODO: DEPRECATED # use rest_app.py from cloudant import Cloudant from flask import Flask, render_template, request, jsonify from ibm_botocore.client import Config import ibm_boto3 import numpy as np import atexit import os import json import io as libio from PIL import Image app = Flask(__name__) from biobot.model im...
# TODO: DEPRECATED # use rest_app.py from cloudant import Cloudant from flask import Flask, render_template, request, jsonify from ibm_botocore.client import Config import ibm_boto3 import numpy as np import atexit import os import json import io as libio from PIL import Image app = Flask(__name__) from biobot.model im...
en
0.51113
# TODO: DEPRECATED # use rest_app.py # Write image STORAGE IBM cgsWriteImage: \n\tBucket=%s \n\tFile=%s \n\tArraySize=%d %s RawSize=%d\n # DB IBM # STORAGE IBM #!im = numpy.array(pic) # On IBM Cloud Cloud Foundry, get the port number from the environment variable # PORT when running ...
2.215753
2
methods/detection/utils.py
ciampluca/counting_perineuronal_nets
6
6631624
import torch import torch.distributed as dist def collate_fn(batch): return list(zip(*batch)) def build_coco_compliant_batch(image_and_target_batch): images, bboxes = zip(*image_and_target_batch) def _get_coco_target(bboxes): n_boxes = len(bboxes) boxes = [[x0, y0, x1, y1] for y0, x0, y...
import torch import torch.distributed as dist def collate_fn(batch): return list(zip(*batch)) def build_coco_compliant_batch(image_and_target_batch): images, bboxes = zip(*image_and_target_batch) def _get_coco_target(bboxes): n_boxes = len(bboxes) boxes = [[x0, y0, x1, y1] for y0, x0, y...
en
0.913738
# there is only one class # suppose all instances are not crowd Args: input_dict (dict): all the values will be reduced average (bool): whether to do average or sum Reduce the values in the dictionary from all processes so that all processes have the averaged results. Returns a dict with the sam...
2.53906
3
alipay/aop/api/response/MybankCreditProdarrangementContracttextQueryResponse.py
articuly/alipay-sdk-python-all
0
6631625
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse class MybankCreditProdarrangementContracttextQueryResponse(AlipayResponse): def __init__(self): super(MybankCreditProdarrangementContracttextQueryResponse, self).__in...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse class MybankCreditProdarrangementContracttextQueryResponse(AlipayResponse): def __init__(self): super(MybankCreditProdarrangementContracttextQueryResponse, self).__in...
en
0.352855
#!/usr/bin/env python # -*- coding: utf-8 -*-
2.45067
2
tumblr/spiders/tumblr_spider.py
RickyChen30/scrapy-tumblr-loader
1
6631626
<gh_stars>1-10 # -*- coding: utf-8 -*- import os import re from urllib.parse import urlparse import scrapy class TumblrSpiderSpider(scrapy.Spider): name = 'tumblr-spider' @staticmethod def parse_cookies(cookie: str) -> dict: cookie = cookie.split(':')[-1] q = {k.strip(): v for k, v in re...
# -*- coding: utf-8 -*- import os import re from urllib.parse import urlparse import scrapy class TumblrSpiderSpider(scrapy.Spider): name = 'tumblr-spider' @staticmethod def parse_cookies(cookie: str) -> dict: cookie = cookie.split(':')[-1] q = {k.strip(): v for k, v in re.findall(r'(.*?...
en
0.609089
# -*- coding: utf-8 -*- # cookies = self.parse_cookies(self.cookies_str) # print(cookies) create file name from url all images should be stored in 'images/hostname' folder :param hostname: tumblr blog hostname :param image_url: image url :return: file name # print('image link ' + image_l...
3.11147
3
migrations/0003_2018-09-23_22-50-22.py
nadermx/didishiptoday
1
6631627
# -*- coding: utf-8 -*- # Generated by Pony ORM 0.8-dev on 2018-09-23 22:50 from __future__ import unicode_literals import datetime from pony import orm from pony.migrate import diagram_ops as op dependencies = ['0002_2018-09-23_21-51-50'] operations = [ op.AddAttr('Ship', 'dt_shipped', orm.Optional(datetime.dat...
# -*- coding: utf-8 -*- # Generated by Pony ORM 0.8-dev on 2018-09-23 22:50 from __future__ import unicode_literals import datetime from pony import orm from pony.migrate import diagram_ops as op dependencies = ['0002_2018-09-23_21-51-50'] operations = [ op.AddAttr('Ship', 'dt_shipped', orm.Optional(datetime.dat...
en
0.791422
# -*- coding: utf-8 -*- # Generated by Pony ORM 0.8-dev on 2018-09-23 22:50
1.696427
2
Models/UNet.py
zeeshanalipnhwr/Semantic-Segmentation-Keras
3
6631628
from keras.models import Model from keras.layers.normalization import BatchNormalization from keras.layers.convolutional import Conv2D, MaxPooling2D, Conv2DTranspose from keras.layers.core import Activation, Flatten, Dropout, Dense from keras.layers import Input, concatenate from keras import backend as K class UNet: ...
from keras.models import Model from keras.layers.normalization import BatchNormalization from keras.layers.convolutional import Conv2D, MaxPooling2D, Conv2DTranspose from keras.layers.core import Activation, Flatten, Dropout, Dense from keras.layers import Input, concatenate from keras import backend as K class UNet: ...
none
1
2.744689
3
bin/find-songs-make-markov.py
edyesed/bobdylan_ebooks
0
6631629
<filename>bin/find-songs-make-markov.py #!/usr/bin/env python # # If you want to run locally, you can run this # import elasticsearch import os import sys import pymarkovchain from pprint import pprint ES_HOST = os.environ.get('ELASTICSEARCH_URL', 'http://localhost:9200') # Search es, and return the results. we need ...
<filename>bin/find-songs-make-markov.py #!/usr/bin/env python # # If you want to run locally, you can run this # import elasticsearch import os import sys import pymarkovchain from pprint import pprint ES_HOST = os.environ.get('ELASTICSEARCH_URL', 'http://localhost:9200') # Search es, and return the results. we need ...
en
0.713857
#!/usr/bin/env python # # If you want to run locally, you can run this # # Search es, and return the results. we need a minimum number of # results for a reasonable chain # # However, if we don't have a reasonable number of results, we can search # twitter for more text, and then build a markov out of whatever we have ...
2.872552
3
tools/mipgen_smmip_collapser.py
risqueslab/PolyG-MIP
20
6631630
# Written by <NAME> # boylee [at] uw.edu import sys import re import numpy as np from scipy import optimize as optimize from random import choice from optparse import OptionParser from string import maketrans from genome_sam_collapser import * if __name__ == "__main__": parser = OptionParser("%prog (ST...
# Written by <NAME> # boylee [at] uw.edu import sys import re import numpy as np from scipy import optimize as optimize from random import choice from optparse import OptionParser from string import maketrans from genome_sam_collapser import * if __name__ == "__main__": parser = OptionParser("%prog (ST...
en
0.85371
# Written by <NAME> # boylee [at] uw.edu
2.490537
2
doc/example/dimerization_kinetics.py
yannikschaelte/SSA
0
6631631
import ssa import numpy as np import matplotlib.pyplot as plt def run(): reactants = np.array([[2, 0], [0, 1]]) products = np.array([[0, 1], [2, 0]]) volume = 1e-15 use_na = True k_det = np.array([5e5, 0.2]) k1 = ssa.util.k_det_to_k_stoch( k_det, reactants=reactants, volume=volume, u...
import ssa import numpy as np import matplotlib.pyplot as plt def run(): reactants = np.array([[2, 0], [0, 1]]) products = np.array([[0, 1], [2, 0]]) volume = 1e-15 use_na = True k_det = np.array([5e5, 0.2]) k1 = ssa.util.k_det_to_k_stoch( k_det, reactants=reactants, volume=volume, u...
none
1
2.235693
2
setup.py
ratt-ru/radiopadre-client
1
6631632
from setuptools import setup import os from radiopadre_client.default_config import __version__ build_root = os.path.dirname(__file__) install_requires = ['six', 'psutil'] def readme(): """Get readme content for package long description""" with open(os.path.join(build_root, 'README.rst')) as f: retu...
from setuptools import setup import os from radiopadre_client.default_config import __version__ build_root = os.path.dirname(__file__) install_requires = ['six', 'psutil'] def readme(): """Get readme content for package long description""" with open(os.path.join(build_root, 'README.rst')) as f: retu...
en
0.425696
Get readme content for package long description
1.585702
2
pyExplore/preprocessing/cleaner.py
rahul1809/pyExplore
0
6631633
""" Module Contents functionality to process the dirty preprocessing and make it useable for future analysis """ import pandas as pd from sklearn.preprocessing import OneHotEncoder from pyExplore.util import util class Dataset: def __init__(self, df): self.df = df @classmethod def load_data(cls...
""" Module Contents functionality to process the dirty preprocessing and make it useable for future analysis """ import pandas as pd from sklearn.preprocessing import OneHotEncoder from pyExplore.util import util class Dataset: def __init__(self, df): self.df = df @classmethod def load_data(cls...
en
0.750902
Module Contents functionality to process the dirty preprocessing and make it useable for future analysis Drop multiple columns based on their column names Input : pandas dataframe, List of column names in the preprocessing set # remove white space from the beginning and end of string Changing dtypes to save mem...
2.968466
3
for-proriv/myfuture/companies/models.py
DmitryAA/EdVision
0
6631634
<reponame>DmitryAA/EdVision from django.db import models from students.models import Address from django.contrib.auth.models import User class Companies(models.Model): name = models.CharField(max_length = 200, verbose_name = 'НАзвание фирмы') legalName = models.CharField(max_length = 200, verbose_name = '<NAME>вание...
from django.db import models from students.models import Address from django.contrib.auth.models import User class Companies(models.Model): name = models.CharField(max_length = 200, verbose_name = 'НАзвание фирмы') legalName = models.CharField(max_length = 200, verbose_name = '<NAME>вание') description = models.Cha...
none
1
2.125196
2
graphwave/roleX.py
mtang724/graphwave
0
6631635
# -*- coding: utf-8 -*- """ Created on Wed May 3 09:57:52 2017 @author: Lab41: Github: Circulo/circulo/algorithms/rolx.py #### https://github.com/Lab41/Circulo/blob/master/circulo/algorithms/rolx.py Set of functions to compute the RolX featurization """ import sys import math import igraph import numpy as np from...
# -*- coding: utf-8 -*- """ Created on Wed May 3 09:57:52 2017 @author: Lab41: Github: Circulo/circulo/algorithms/rolx.py #### https://github.com/Lab41/Circulo/blob/master/circulo/algorithms/rolx.py Set of functions to compute the RolX featurization """ import sys import math import igraph import numpy as np from...
en
0.687766
# -*- coding: utf-8 -*- Created on Wed May 3 09:57:52 2017 @author: Lab41: Github: Circulo/circulo/algorithms/rolx.py #### https://github.com/Lab41/Circulo/blob/master/circulo/algorithms/rolx.py Set of functions to compute the RolX featurization Top-level function. Extracts node-role matrix and sensemaking role-fe...
2.544985
3
training_api/application/data_preparation/models/column_name.py
hadikoub/BMW-TensorFlow-Training-GUI
1
6631636
from enum import Enum # noinspection SpellCheckingInspection class ColumnName(Enum): """ A class Enum used to get column names inside the csv file """ file_name: str = "filename" width: str = "width" height: str = "height" class_name: str = "class" xmin: str = "xmin" xmax: str ...
from enum import Enum # noinspection SpellCheckingInspection class ColumnName(Enum): """ A class Enum used to get column names inside the csv file """ file_name: str = "filename" width: str = "width" height: str = "height" class_name: str = "class" xmin: str = "xmin" xmax: str ...
en
0.543541
# noinspection SpellCheckingInspection A class Enum used to get column names inside the csv file
3.761128
4
hplip-3.20.3/ui4/devicesetupdialog_base.py
Deril-Pana/wikiBlackcoinNL
0
6631637
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui4/devicesetupdialog_base.ui' # # Created: Mon May 4 14:30:32 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Dialog(object): def setupUi...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui4/devicesetupdialog_base.ui' # # Created: Mon May 4 14:30:32 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Dialog(object): def setupUi...
en
0.776503
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui4/devicesetupdialog_base.ui' # # Created: Mon May 4 14:30:32 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost!
1.797499
2
cloudkitty-9.0.0/cloudkitty/common/db/models.py
scottwedge/OpenStack-Stein
0
6631638
# -*- coding: utf-8 -*- # Copyright 2016 Objectif Libre # # 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 2016 Objectif Libre # # 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 ...
en
0.827342
# -*- coding: utf-8 -*- # Copyright 2016 Objectif Libre # # 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 ...
2.126645
2
prody/routines/__init__.py
gokceneraslan/ProDy
0
6631639
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
en
0.846578
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
2.139619
2
orange3/Orange/data/table.py
rgschmitz1/BioDepot-workflow-builder
54
6631640
<filename>orange3/Orange/data/table.py import operator import os import zlib from collections import MutableSequence, Iterable, Sequence, Sized from functools import reduce from itertools import chain from numbers import Real, Integral from threading import Lock, RLock import bottleneck as bn import numpy as np from s...
<filename>orange3/Orange/data/table.py import operator import os import zlib from collections import MutableSequence, Iterable, Sequence, Sized from functools import reduce from itertools import chain from numbers import Real, Integral from threading import Lock, RLock import bottleneck as bn import numpy as np from s...
en
0.681363
# import for io.py Domain conversion cache used in Table.from_table. It is global so that chaining of domain conversions also works with caching even with descendants of Table. Construct a data instance representing the given row of the table. # Make sure to stop printing variables if we limit the output # noinspection...
2.14162
2
examples/main_simple-vit.py
khuongnd/pagi
0
6631641
import os from datetime import datetime from typing import Any, Generator, Mapping, Tuple import dataget import jax import jax.numpy as jnp import matplotlib.pyplot as plt import numpy as np from tensorboardX.writer import SummaryWriter import typer import optax import einops import elegy class ViT(elegy.Module): ...
import os from datetime import datetime from typing import Any, Generator, Mapping, Tuple import dataget import jax import jax.numpy as jnp import matplotlib.pyplot as plt import numpy as np from tensorboardX.writer import SummaryWriter import typer import optax import einops import elegy class ViT(elegy.Module): ...
en
0.4616
Standard LeNet-300-100 MLP network. # normalize data # make patch embeddings # add predict token # create positional embeddings # add positional embeddings # apply N transformers encoder layers # get predict output token # apply predict head # elegy.regularizers.GlobalL2(l=1e-4), # get random samples # get predictions ...
2.028142
2
ip/models/prefix.py
xUndero/noc
0
6631642
<filename>ip/models/prefix.py # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Prefix model # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # -------------------------------------...
<filename>ip/models/prefix.py # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Prefix model # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # -------------------------------------...
en
0.55731
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Prefix model # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # -------------------------------------------------------------------...
1.752978
2
i18n_l18n.py
britodfbr/curso-i18n-1602670068
0
6631643
# /bin/env python # -*- encode: utf-8 -*- __author__ = '@britodfbr' """https://under-linux.org/entry.php?b=1273""" import time import locale numero = 154623.56 valor = 1123.5 sdate = "%A, %d %B %Y" # default print(f'{numero}; {valor}; {time.strftime(sdate)}') # locale local locale.setlocale(locale.LC_ALL, '') print(...
# /bin/env python # -*- encode: utf-8 -*- __author__ = '@britodfbr' """https://under-linux.org/entry.php?b=1273""" import time import locale numero = 154623.56 valor = 1123.5 sdate = "%A, %d %B %Y" # default print(f'{numero}; {valor}; {time.strftime(sdate)}') # locale local locale.setlocale(locale.LC_ALL, '') print(...
en
0.540748
# /bin/env python # -*- encode: utf-8 -*- https://under-linux.org/entry.php?b=1273 # default # locale local # locale en # locale de-DE # locale es-Es # locale fr_FR # locale ar_LB # locale hi-IN # locale ja-JP
3.080256
3
src/game.py
adoth/Blackjack
0
6631644
<reponame>adoth/Blackjack<filename>src/game.py from Blackjack.src.deck import Deck from Blackjack.src.player import Player from Blackjack.src.dealer import Dealer class Game: def __init__(self): self.player = Player('player') self.dealer = Dealer('dealer') self.deck = Deck() self.p...
from Blackjack.src.deck import Deck from Blackjack.src.player import Player from Blackjack.src.dealer import Dealer class Game: def __init__(self): self.player = Player('player') self.dealer = Dealer('dealer') self.deck = Deck() self.player_left = self.player_right = None def ...
none
1
3.089242
3
elegantrl_helloworld/env.py
SaadSaeed150/local_elegant
752
6631645
import gym gym.logger.set_level(40) # Block warning class PreprocessEnv(gym.Wrapper): # environment wrapper def __init__(self, env, if_print=True): self.env = gym.make(env) if isinstance(env, str) else env super().__init__(self.env) (self.env_name, self.state_dim, self.action_dim, self....
import gym gym.logger.set_level(40) # Block warning class PreprocessEnv(gym.Wrapper): # environment wrapper def __init__(self, env, if_print=True): self.env = gym.make(env) if isinstance(env, str) else env super().__init__(self.env) (self.env_name, self.state_dim, self.action_dim, self....
en
0.77642
# Block warning # environment wrapper # sometimes state_dim is a list # for discrete action space # for continuous action space
2.625421
3
figures/tmb/pcawg/VICC_01_R2/analysis.py
OmnesRes/ATGC
0
6631646
import numpy as np import pickle import pandas as pd import tensorflow as tf from tensorflow.python.framework.ops import disable_eager_execution from sklearn.model_selection import StratifiedKFold from sklearn.metrics import r2_score disable_eager_execution() physical_devices = tf.config.experimental.list_physical_devi...
import numpy as np import pickle import pandas as pd import tensorflow as tf from tensorflow.python.framework.ops import disable_eager_execution from sklearn.model_selection import StratifiedKFold from sklearn.metrics import r2_score disable_eager_execution() physical_devices = tf.config.experimental.list_physical_devi...
en
0.455479
##bin position # set y label ##test eval #mse #mae #r2 ##counting has to be nonsyn to nonsyn ##counting stats #mse #mae #r2
1.740971
2
applications/incompressible_fluid_application/python_scripts/monolithic_solver_lagrangian_compressible_two_fluids_splited.py
lcirrott/Kratos
2
6631647
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * from KratosMultiphysics.IncompressibleFluidApplication import * from KratosMultiphysics.PFEMApplication import * from Kra...
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * from KratosMultiphysics.IncompressibleFluidApplication import * from KratosMultiphysics.PFEMApplication import * from Kra...
en
0.404152
#makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library # adding dofs # # definition of the solvers # self.linear_solver = SkylineLUFactorizationSolver() # self.linear_solver =SuperLUSolver() # pPrecond = ILU0Preconditioner() # definition of the convergence criteria # self....
1.771124
2
quex/engine/analyzer/mega_state/path_walker/state.py
Liby99/quex
0
6631648
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 <NAME>; #_______________________________________________________________________________ # (C) 2010-2014 <NAME> from quex.engine.operations.operation_list import Op from quex.engine.analyzer.mega_state.core ...
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 <NAME>; #_______________________________________________________________________________ # (C) 2010-2014 <NAME> from quex.engine.operations.operation_list import Op from quex.engine.analyzer.mega_state.core ...
en
0.780258
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 <NAME>; #_______________________________________________________________________________ # (C) 2010-2014 <NAME> ________________________________________________________________________ A path walker state is a state that can walk along one ...
1.769523
2
great_expectations/render/renderer/page_renderer.py
louispotok/great_expectations
0
6631649
import logging import pypandoc from great_expectations.data_context.util import instantiate_class_from_config from .renderer import Renderer from ..types import ( RenderedDocumentContent, RenderedSectionContent, RenderedComponentContent, ) from collections import OrderedDict logger = logging.getLogger(_...
import logging import pypandoc from great_expectations.data_context.util import instantiate_class_from_config from .renderer import Renderer from ..types import ( RenderedDocumentContent, RenderedSectionContent, RenderedComponentContent, ) from collections import OrderedDict logger = logging.getLogger(_...
en
0.875778
# Group EVRs by column # "data_asset_name": short_data_asset_name, # This if statement is a precaution in case the expectation suite doesn't contain expectations. # Once we have more strongly typed classes for suites, this shouldn't be necessary. # TODO: Leaving these two paragraphs as placeholders for later developmen...
2.069104
2
tests/tests.py
dparrini/python-comtrade
39
6631650
<gh_stars>10-100 import datetime as dt import math import os import struct import time import unittest import comtrade from comtrade import Comtrade COMTRADE_SAMPLE_1_CFG = """STATION_NAME,EQUIPMENT,2001 2,1A,1D 1, IA ,,,A,2.762,0,0, -32768,32767,1,1,S 1, Diff Trip A ,,,0 60 0 0,2 01/01/2000, 10:30:0...
import datetime as dt import math import os import struct import time import unittest import comtrade from comtrade import Comtrade COMTRADE_SAMPLE_1_CFG = """STATION_NAME,EQUIPMENT,2001 2,1A,1D 1, IA ,,,A,2.762,0,0, -32768,32767,1,1,S 1, Diff Trip A ,,,0 60 0 0,2 01/01/2000, 10:30:00.228000 01/01/2...
en
0.668267
STATION_NAME,EQUIPMENT,2001 2,1A,1D 1, IA ,,,A,2.762,0,0, -32768,32767,1,1,S 1, Diff Trip A ,,,0 60 0 0,2 01/01/2000, 10:30:00.228000 01/01/2000,10:30:00.722000 ASCII 1 ,,1999 2,1A,1D 1,,,,A,2.762,0,0, -32768,32767,1,1,S 1,,,, 0 0,2 , ASCII 1 STATION_NAME,EQUIPMENT,2013 2,1A,1D 1, Signal,,,A,1,0,0,-...
2.638741
3