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
benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py
TugberkArkose/MLScheduler
0
10200
<filename>benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold L...
<filename>benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold L...
none
1
1.286766
1
packages/gtmcore/gtmcore/environment/conda.py
gigabackup/gigantum-client
60
10201
from typing import List, Dict import json from gtmcore.http import ConcurrentRequestManager, ConcurrentRequest from gtmcore.environment.packagemanager import PackageManager, PackageResult, PackageMetadata from gtmcore.container import container_for_context from gtmcore.labbook import LabBook from gtmcore.logging impor...
from typing import List, Dict import json from gtmcore.http import ConcurrentRequestManager, ConcurrentRequest from gtmcore.environment.packagemanager import PackageManager, PackageResult, PackageMetadata from gtmcore.container import container_for_context from gtmcore.labbook import LabBook from gtmcore.logging impor...
en
0.821075
Class to implement the conda package manager # String to be set in child classes indicating which python version you are checking. Typically should be either # python 3.6* or python 2.7* # String of the name of the conda environment (e.g. py36 or py27, as created via container build) # Note, currently we hard code chan...
2.353314
2
netchos/io/io_mpl_to_px.py
brainets/netchos
11
10202
<gh_stars>10-100 """Conversion of Matplotlib / Seaborn inputs to plotly.""" import os.path as op from pkg_resources import resource_filename import json def mpl_to_px_inputs(inputs, plt_types=None): """Convert typical matplotlib inputs to plotly to simplify API. Parameters ---------- inputs : dict ...
"""Conversion of Matplotlib / Seaborn inputs to plotly.""" import os.path as op from pkg_resources import resource_filename import json def mpl_to_px_inputs(inputs, plt_types=None): """Convert typical matplotlib inputs to plotly to simplify API. Parameters ---------- inputs : dict Dictionary ...
en
0.415941
Conversion of Matplotlib / Seaborn inputs to plotly. Convert typical matplotlib inputs to plotly to simplify API. Parameters ---------- inputs : dict Dictionary of inputs plt_types : string or list or None Sub select some plotting types (e.g heatmap, line etc.). If None, all typ...
3.279682
3
fizzbuzz_for_02.py
toastyxen/FizzBuzz
0
10203
"""Fizzbuzz for loop variant 3""" for x in range(1, 101): OUTPUT = "" if x % 3 == 0: OUTPUT += "Fizz" if x % 5 == 0: OUTPUT += "Buzz" print(OUTPUT or x)
"""Fizzbuzz for loop variant 3""" for x in range(1, 101): OUTPUT = "" if x % 3 == 0: OUTPUT += "Fizz" if x % 5 == 0: OUTPUT += "Buzz" print(OUTPUT or x)
en
0.564812
Fizzbuzz for loop variant 3
3.897786
4
cnn/struct/layer/parse_tensor_module.py
hslee1539/GIS_GANs
0
10204
from tensor.main_module import Tensor import numpy as np def getTensor(value): if type(value) is np.ndarray: return Tensor.numpy2Tensor(value) elif type(value) is Tensor: return value else: raise Exception
from tensor.main_module import Tensor import numpy as np def getTensor(value): if type(value) is np.ndarray: return Tensor.numpy2Tensor(value) elif type(value) is Tensor: return value else: raise Exception
none
1
2.842778
3
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py
hemantsonawane95/horizon-apelby
0
10205
<reponame>hemantsonawane95/horizon-apelby<filename>openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.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.apach...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
en
0.789195
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
1.806878
2
data_structure/const_tree.py
alipay/StructuredLM_RTDT
42
10206
<reponame>alipay/StructuredLM_RTDT # coding=utf-8 # Copyright (c) 2021 <NAME> import sys LABEL_SEP = '@' INDENT_STRING1 = '│   ' INDENT_STRING2 = '├──' EMPTY_TOKEN = '___EMPTY___' def print_tree(const_tree, indent=0, out=sys.stdout): for i in range(indent - 1): out.write(INDENT_STRING1) if indent >...
# coding=utf-8 # Copyright (c) 2021 <NAME> import sys LABEL_SEP = '@' INDENT_STRING1 = '│   ' INDENT_STRING2 = '├──' EMPTY_TOKEN = '___EMPTY___' def print_tree(const_tree, indent=0, out=sys.stdout): for i in range(indent - 1): out.write(INDENT_STRING1) if indent > 0: out.write(INDENT_STRING...
en
0.743059
# coding=utf-8 # Copyright (c) 2021 <NAME> # is lexicon Construct ConstTree from parenthesis representation. :param string: string of parenthesis representation :return: ConstTree root and all leaf Lexicons
3.503178
4
tests/test_minimize.py
The-Ludwig/iminuit
0
10207
<filename>tests/test_minimize.py import pytest from iminuit import minimize import numpy as np from numpy.testing import assert_allclose, assert_equal opt = pytest.importorskip("scipy.optimize") def func(x, *args): c = args[0] if args else 1 return c + x[0] ** 2 + (x[1] - 1) ** 2 + (x[2] - 2) ** 2 def grad...
<filename>tests/test_minimize.py import pytest from iminuit import minimize import numpy as np from numpy.testing import assert_allclose, assert_equal opt = pytest.importorskip("scipy.optimize") def func(x, *args): c = args[0] if args else 1 return c + x[0] ** 2 + (x[1] - 1) ** 2 + (x[2] - 2) ** 2 def grad...
none
1
2.427253
2
murtanto/parsing.py
amandatv20/botfb
1
10208
<filename>murtanto/parsing.py # coded by: salism3 # 23 - 05 - 2020 23:18 (<NAME>) from bs4 import BeautifulSoup as parser from . import sorting import re def to_bs4(html): return parser(html, "html.parser") def refsrc(html): return True if re.search(r'http.+\Wrefsrc', html) else False def parsing_hre...
<filename>murtanto/parsing.py # coded by: salism3 # 23 - 05 - 2020 23:18 (<NAME>) from bs4 import BeautifulSoup as parser from . import sorting import re def to_bs4(html): return parser(html, "html.parser") def refsrc(html): return True if re.search(r'http.+\Wrefsrc', html) else False def parsing_hre...
en
0.44789
# coded by: salism3 # 23 - 05 - 2020 23:18 (<NAME>)
2.850233
3
test/test_watchdog_status.py
ike709/tgs4-api-pyclient
0
10209
# coding: utf-8 """ TGS API A production scale tool for BYOND server management # noqa: E501 OpenAPI spec version: 9.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.model...
# coding: utf-8 """ TGS API A production scale tool for BYOND server management # noqa: E501 OpenAPI spec version: 9.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.model...
en
0.55272
# coding: utf-8 TGS API A production scale tool for BYOND server management # noqa: E501 OpenAPI spec version: 9.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: E501 WatchdogStatus unit test stubs Test WatchdogStatus # FIXME: construct object with mandatory attributes wi...
1.742767
2
setup.py
joesan/housing-classification-example
0
10210
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Python codebase for the housing classification ML problem', author='Joesan', license='', )
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Python codebase for the housing classification ML problem', author='Joesan', license='', )
none
1
1.049739
1
tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py
wangruohui/mmediting
45
10211
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmedit.models.backbones.sr_backbones.edvr_net import (EDVRNet, PCDAlignment, TSAFusion) def test_pcd_alignment(): "...
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmedit.models.backbones.sr_backbones.edvr_net import (EDVRNet, PCDAlignment, TSAFusion) def test_pcd_alignment(): "...
en
0.78364
# Copyright (c) OpenMMLab. All rights reserved. Test PCDAlignment. # cpu # gpu Test TSAFusion. # cpu # gpu Test EDVRNet. # cpu # with tsa # without tsa # The height and width of inputs should be a multiple of 4 # pretrained should be str or None # gpu # with tsa # without tsa # The height and width of inputs should be ...
2.108957
2
mat2py/core/datastoreio.py
mat2py/mat2py
0
10212
# type: ignore __all__ = [ "readDatastoreImage", "datastore", ] def readDatastoreImage(*args): raise NotImplementedError("readDatastoreImage") def datastore(*args): raise NotImplementedError("datastore")
# type: ignore __all__ = [ "readDatastoreImage", "datastore", ] def readDatastoreImage(*args): raise NotImplementedError("readDatastoreImage") def datastore(*args): raise NotImplementedError("datastore")
it
0.190853
# type: ignore
1.800924
2
enjoliver-api/tests/test_generate_groups.py
netturpin/enjoliver
11
10213
import os from shutil import rmtree from tempfile import mkdtemp from unittest import TestCase from enjoliver import generator class GenerateGroupTestCase(TestCase): api_uri = None test_matchbox_path = None test_resources_path = None tests_path = None @classmethod def setUpClass(cls): ...
import os from shutil import rmtree from tempfile import mkdtemp from unittest import TestCase from enjoliver import generator class GenerateGroupTestCase(TestCase): api_uri = None test_matchbox_path = None test_resources_path = None tests_path = None @classmethod def setUpClass(cls): ...
none
1
2.376044
2
HackerRank/Calendar Module/solution.py
nikku1234/Code-Practise
9
10214
# Enter your code here. Read input from STDIN. Print output to STDOUT import calendar mm,dd,yyyy = map(int,input().split()) day = ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"] val = int (calendar.weekday(yyyy,mm,dd)) print(day[val])
# Enter your code here. Read input from STDIN. Print output to STDOUT import calendar mm,dd,yyyy = map(int,input().split()) day = ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"] val = int (calendar.weekday(yyyy,mm,dd)) print(day[val])
en
0.824269
# Enter your code here. Read input from STDIN. Print output to STDOUT
3.817077
4
scale/trigger/models.py
stevevarner/scale
0
10215
"""Defines the models for trigger rules and events""" from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import models, transaction from django.utils.timezone import now class TriggerEventManager(models.Manager): """Provides additional methods for handling trigger events...
"""Defines the models for trigger rules and events""" from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import models, transaction from django.utils.timezone import now class TriggerEventManager(models.Manager): """Provides additional methods for handling trigger events...
en
0.757686
Defines the models for trigger rules and events Provides additional methods for handling trigger events Creates a new trigger event and returns the event model. The given rule model, if not None, must have already been saved in the database (it must have an ID). The returned trigger event model will be saved in...
2.763077
3
leetcode/0506_relative_ranks.py
chaosWsF/Python-Practice
0
10216
""" Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The fir...
""" Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The fir...
en
0.931818
Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The first t...
4.113877
4
barriers/models/history/assessments/economic_impact.py
felix781/market-access-python-frontend
1
10217
from ..base import BaseHistoryItem, GenericHistoryItem from ..utils import PolymorphicBase class ArchivedHistoryItem(BaseHistoryItem): field = "archived" field_name = "Valuation assessment: Archived" def get_value(self, value): if value is True: return "Archived" elif value is...
from ..base import BaseHistoryItem, GenericHistoryItem from ..utils import PolymorphicBase class ArchivedHistoryItem(BaseHistoryItem): field = "archived" field_name = "Valuation assessment: Archived" def get_value(self, value): if value is True: return "Archived" elif value is...
none
1
2.689965
3
link_prob_show.py
Rheinwalt/spatial-effects-networks
3
10218
<filename>link_prob_show.py import sys import numpy as np from sern import * ids, lon, lat = np.loadtxt('nodes', unpack = True) links = np.loadtxt('links', dtype = 'int') A, b = AdjacencyMatrix(ids, links) lon, lat = lon[b], lat[b] n = A.shape[0] # LinkProbability expects A as triu A = A[np.triu_indices(n, 1)] # pla...
<filename>link_prob_show.py import sys import numpy as np from sern import * ids, lon, lat = np.loadtxt('nodes', unpack = True) links = np.loadtxt('links', dtype = 'int') A, b = AdjacencyMatrix(ids, links) lon, lat = lon[b], lat[b] n = A.shape[0] # LinkProbability expects A as triu A = A[np.triu_indices(n, 1)] # pla...
en
0.989835
# LinkProbability expects A as triu # play around with the scale, maybe you don't need log binning?
2.420012
2
controller/components/app.py
isabella232/flight-lab
15
10219
# Copyright 2018 Flight Lab 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright 2018 Flight Lab 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
en
0.859134
# Copyright 2018 Flight Lab 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
2.215003
2
botorch/acquisition/__init__.py
jmren168/botorch
1
10220
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .acquisition import AcquisitionFunction from .analytic import ( AnalyticAcquisitionFunction, ConstrainedExpectedImprovement, ExpectedImprovement, NoisyExpectedImprovement, PosteriorMean, Probabil...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .acquisition import AcquisitionFunction from .analytic import ( AnalyticAcquisitionFunction, ConstrainedExpectedImprovement, ExpectedImprovement, NoisyExpectedImprovement, PosteriorMean, Probabil...
en
0.797894
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
1.340029
1
examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py
felipeek/bullet3
9,136
10221
"""Randomize the minitaur_gym_alternating_leg_env when reset() is called. The randomization include swing_offset, extension_offset of all legs that mimics bent legs, desired_pitch from user input, battery voltage and motor damping. """ import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(in...
"""Randomize the minitaur_gym_alternating_leg_env when reset() is called. The randomization include swing_offset, extension_offset of all legs that mimics bent legs, desired_pitch from user input, battery voltage and motor damping. """ import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(in...
en
0.691932
Randomize the minitaur_gym_alternating_leg_env when reset() is called. The randomization include swing_offset, extension_offset of all legs that mimics bent legs, desired_pitch from user input, battery voltage and motor damping. # Absolute range. A randomizer that changes the minitaur_gym_alternating_leg_env.
2.704479
3
pygsti/modelmembers/states/tensorprodstate.py
pyGSTi-Developers/pyGSTi
73
10222
""" The TensorProductState class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U....
""" The TensorProductState class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U....
en
0.753729
The TensorProductState class and supporting functionality. #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Gover...
1.80285
2
edivorce/apps/core/views/graphql.py
gerritvdm/eDivorce
6
10223
<filename>edivorce/apps/core/views/graphql.py import graphene import graphene_django from django.http import HttpResponseForbidden from graphene_django.views import GraphQLView from graphql import GraphQLError from edivorce.apps.core.models import Document class PrivateGraphQLView(GraphQLView): def dispatch(self...
<filename>edivorce/apps/core/views/graphql.py import graphene import graphene_django from django.http import HttpResponseForbidden from graphene_django.views import GraphQLView from graphql import GraphQLError from edivorce.apps.core.models import Document class PrivateGraphQLView(GraphQLView): def dispatch(self...
none
1
2.255126
2
amazing/maze.py
danieloconell/maze-solver
0
10224
from .exceptions import MazeNotSolved, AlgorithmNotFound from .dijkstra import Dijkstra from .astar import Astar from functools import wraps import warnings from daedalus import Maze as _maze from PIL import Image warnings.simplefilter("once", UserWarning) class Maze: """ Create a maze and solve it. A...
from .exceptions import MazeNotSolved, AlgorithmNotFound from .dijkstra import Dijkstra from .astar import Astar from functools import wraps import warnings from daedalus import Maze as _maze from PIL import Image warnings.simplefilter("once", UserWarning) class Maze: """ Create a maze and solve it. A...
en
0.809515
Create a maze and solve it. Available algorithms: dijkstra astar (WIP) Steps: 1. Create maze using the daedalus library. 2. Convert maze to graph. 3. Solve maze with algorithm. Set algorithm to be used when solving. Args: algorithm (str) to be used when solving ...
3.357956
3
config.py
FarbodFarhangfar/midi_player_python
0
10225
<reponame>FarbodFarhangfar/midi_player_python import os def get_note_dic(): _note_dic = {'C': 0, 'C#': 1, 'Db': 1, 'D': 2, 'D#': 3, 'Eb': 3, 'E': 4, 'F': 5, 'F#': 6, 'Gb': 6, 'G': 7, 'G#': 8, 'Ab': 8, 'A': 9, 'A#': 10, 'Bb': 10, 'B': 11} return _note_dic def get_value_list(...
import os def get_note_dic(): _note_dic = {'C': 0, 'C#': 1, 'Db': 1, 'D': 2, 'D#': 3, 'Eb': 3, 'E': 4, 'F': 5, 'F#': 6, 'Gb': 6, 'G': 7, 'G#': 8, 'Ab': 8, 'A': 9, 'A#': 10, 'Bb': 10, 'B': 11} return _note_dic def get_value_list(): values = {"16": 16, "8": 8, "4": 4, "2"...
en
0.497871
#': 1, 'Db': 1, 'D': 2, 'D#': 3, 'Eb': 3, 'E': 4, 'F': 5, 'F#': 6, #': 8, 'Ab': 8, 'A': 9, 'A#': 10, 'Bb': 10, 'B': 11} # Piano # Chromatic Percussion # Organ # Guitar # Bass # Strings # Ensemble # Brass # Reed # Pipe # Synth Lead # Synth Pad # Synth Effects # Ethnic # Percussive # Sound effects
2.8247
3
roles/openshift_health_checker/library/ocutil.py
shgriffi/openshift-ansible
164
10226
#!/usr/bin/python """Interface to OpenShift oc command""" import os import shlex import shutil import subprocess from ansible.module_utils.basic import AnsibleModule ADDITIONAL_PATH_LOOKUPS = ['/usr/local/bin', os.path.expanduser('~/bin')] def locate_oc_binary(): """Find and return oc binary file""" # htt...
#!/usr/bin/python """Interface to OpenShift oc command""" import os import shlex import shutil import subprocess from ansible.module_utils.basic import AnsibleModule ADDITIONAL_PATH_LOOKUPS = ['/usr/local/bin', os.path.expanduser('~/bin')] def locate_oc_binary(): """Find and return oc binary file""" # htt...
en
0.793541
#!/usr/bin/python Interface to OpenShift oc command Find and return oc binary file # https://github.com/openshift/openshift-ansible/issues/3410 # oc can be in /usr/local/bin in some cases, but that may not # be in $PATH due to ansible/sudo # Use shutil.which if it is available, otherwise fallback to a naive path search...
2.471472
2
code/network/__init__.py
michalochman/complex-networks
0
10227
import fractions class Network(object): def __init__(self, network): self.network = network def degree(self, link_type, key): return len(self.network.get(link_type).get(key)) def average_degree(self, link_type): degree = 0 for link in self.network.get(link_type).itervalue...
import fractions class Network(object): def __init__(self, network): self.network = network def degree(self, link_type, key): return len(self.network.get(link_type).get(key)) def average_degree(self, link_type): degree = 0 for link in self.network.get(link_type).itervalue...
none
1
3.337132
3
invoke_ansible.py
samvarankashyap/ansible_api_usage
0
10228
import ansible import pprint from ansible import utils from jinja2 import Environment, PackageLoader from collections import namedtuple from ansible import utils from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.executor.playb...
import ansible import pprint from ansible import utils from jinja2 import Environment, PackageLoader from collections import namedtuple from ansible import utils from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.executor.playb...
en
0.212026
Invokes playbook
2.031261
2
bin/python/csv2es.py
reid-wagner/proteomics-pipelines
2
10229
#!/usr/bin/env python3 import itertools import string from elasticsearch import Elasticsearch,helpers import sys import os from glob import glob import pandas as pd import json host = sys.argv[1] port = int(sys.argv[2]) alias = sys.argv[3] print(host) print(port) print(alias) es = Elasticsearch([{'host':...
#!/usr/bin/env python3 import itertools import string from elasticsearch import Elasticsearch,helpers import sys import os from glob import glob import pandas as pd import json host = sys.argv[1] port = int(sys.argv[2]) alias = sys.argv[3] print(host) print(port) print(alias) es = Elasticsearch([{'host':...
en
0.575823
#!/usr/bin/env python3 # create our test index # Get all csv files in /root/data # Make sure there is no duplicate indexing # Create an index table in elasticsearch to locate the files
2.789907
3
main/src/preparation/parsers/tree-sitter-python/examples/crlf-line-endings.py
jason424217/Artificial-Code-Gen
0
10230
<filename>main/src/preparation/parsers/tree-sitter-python/examples/crlf-line-endings.py<gh_stars>0 print a if b: if c: d e
<filename>main/src/preparation/parsers/tree-sitter-python/examples/crlf-line-endings.py<gh_stars>0 print a if b: if c: d e
none
1
1.835831
2
Src/main.py
DukeA/DAT02X-19-03-MachineLearning-Starcraft2
0
10231
from absl import app from mainLoop import main if __name__ == '__main__': app.run(main)
from absl import app from mainLoop import main if __name__ == '__main__': app.run(main)
none
1
1.250541
1
bos_sarcat_scraper/__main__.py
hysds/bos_sarcat_scraper
1
10232
<gh_stars>1-10 from __future__ import absolute_import from builtins import str from builtins import input import sys import argparse from . import bosart_scrape import datetime import json def valid_date(s): try: try: date = datetime.datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%fZ") except...
from __future__ import absolute_import from builtins import str from builtins import input import sys import argparse from . import bosart_scrape import datetime import json def valid_date(s): try: try: date = datetime.datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%fZ") except: d...
en
0.404797
# construct the parameter list based on user specified restrictions
2.897735
3
vgm2electron.py
simondotm/vgm2electron
2
10233
#!/usr/bin/env python # vgm2electron.py # Tool for converting SN76489-based PSG VGM data to Acorn Electron # By <NAME> (https://github.com/simondotm/) # See https://github.com/simondotm/vgm-packer # # Copyright (c) 2019 <NAME>. All rights reserved. # # "MIT License": # Permission is hereby granted, free of charge, to a...
#!/usr/bin/env python # vgm2electron.py # Tool for converting SN76489-based PSG VGM data to Acorn Electron # By <NAME> (https://github.com/simondotm/) # See https://github.com/simondotm/vgm-packer # # Copyright (c) 2019 <NAME>. All rights reserved. # # "MIT License": # Permission is hereby granted, free of charge, to a...
en
0.590557
#!/usr/bin/env python # vgm2electron.py # Tool for converting SN76489-based PSG VGM data to Acorn Electron # By <NAME> (https://github.com/simondotm/) # See https://github.com/simondotm/vgm-packer # # Copyright (c) 2019 <NAME>. All rights reserved. # # "MIT License": # Permission is hereby granted, free of charge, to a...
1.670812
2
twitter_sent.py
rthorst/TwitterSentiment
6
10234
<gh_stars>1-10 import webapp2 import tweepy import json import csv import os import statistics import bokeh from bokeh.io import show, output_file from bokeh.plotting import figure from bokeh.models import HoverTool, ColumnDataSource from bokeh.embed import components, json_item from bokeh.resources import INLINE from ...
import webapp2 import tweepy import json import csv import os import statistics import bokeh from bokeh.io import show, output_file from bokeh.plotting import figure from bokeh.models import HoverTool, ColumnDataSource from bokeh.embed import components, json_item from bokeh.resources import INLINE from bokeh.models.gl...
en
0.824098
---AUTHOR: --- <NAME> <EMAIL> ---LICENSE: --- MIT License. ---ABOUT: --- Application to get the sentiment of recent tweets based on a keyword. Example: keyword -> "taco bell" retrieve 300 recent tweets mentioning taco bell. get average sentiment. plot distribution of tweets and sentiment. plot mo...
2.989811
3
tests/testcgatools.py
ereide/pyga-camcal
5
10235
<reponame>ereide/pyga-camcal<gh_stars>1-10 import unittest import clifford as cl from clifford import g3c from numpy import pi, e import numpy as np from scipy.sparse.linalg.matfuncs import _sinch as sinch from clifford import MultiVector from pygacal.common.cgatools import ( Sandwich, Dilator, Translator, Reflec...
import unittest import clifford as cl from clifford import g3c from numpy import pi, e import numpy as np from scipy.sparse.linalg.matfuncs import _sinch as sinch from clifford import MultiVector from pygacal.common.cgatools import ( Sandwich, Dilator, Translator, Reflector, inversion, Ro...
en
0.775235
#Plane to line #How do we define order/direction? #Rotation amount #Rotation Plane #Translation vector #Decomposition into normal component #Decomposition into paralel component #Normal to P #Normal to P #Parallel to P #Parallel to P #Non zero product #Rotor properties #Equalities #Random bivectors to test this as well...
2.070098
2
router/posts.py
DiegoLing33/prestij.xyz-api
0
10236
# ██╗░░░░░██╗███╗░░██╗░██████╗░░░░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗ # ██║░░░░░██║████╗░██║██╔════╝░░░░██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝ # ██║░░░░░██║██╔██╗██║██║░░██╗░░░░██████╦╝██║░░░░░███████║██║░░╚═╝█████═╝░ # ██║░░░░░██║██║╚████║██║░░╚██╗░░░██╔══██╗██║░░░░░██╔══██║██║░░██╗██╔═██╗░ # ███████╗██║██...
# ██╗░░░░░██╗███╗░░██╗░██████╗░░░░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗ # ██║░░░░░██║████╗░██║██╔════╝░░░░██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝ # ██║░░░░░██║██╔██╗██║██║░░██╗░░░░██████╦╝██║░░░░░███████║██║░░╚═╝█████═╝░ # ██║░░░░░██║██║╚████║██║░░╚██╗░░░██╔══██╗██║░░░░░██╔══██║██║░░██╗██╔═██╗░ # ███████╗██║██...
en
0.085405
# ██╗░░░░░██╗███╗░░██╗░██████╗░░░░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗ # ██║░░░░░██║████╗░██║██╔════╝░░░░██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝ # ██║░░░░░██║██╔██╗██║██║░░██╗░░░░██████╦╝██║░░░░░███████║██║░░╚═╝█████═╝░ # ██║░░░░░██║██║╚████║██║░░╚██╗░░░██╔══██╗██║░░░░░██╔══██║██║░░██╗██╔═██╗░ # ███████╗██║██...
2.165511
2
toontown/catalog/CatalogChatBalloon.py
CrankySupertoon01/Toontown-2
1
10237
<filename>toontown/catalog/CatalogChatBalloon.py from pandac.PandaModules import * class CatalogChatBalloon: TEXT_SHIFT = (0.1, -0.05, 1.1) TEXT_SHIFT_REVERSED = -0.05 TEXT_SHIFT_PROP = 0.08 NATIVE_WIDTH = 10.0 MIN_WIDTH = 2.5 MIN_HEIGHT = 1 BUBBLE_PADDING = 0.3 BUBBLE_PADDING_PROP = 0....
<filename>toontown/catalog/CatalogChatBalloon.py from pandac.PandaModules import * class CatalogChatBalloon: TEXT_SHIFT = (0.1, -0.05, 1.1) TEXT_SHIFT_REVERSED = -0.05 TEXT_SHIFT_PROP = 0.08 NATIVE_WIDTH = 10.0 MIN_WIDTH = 2.5 MIN_HEIGHT = 1 BUBBLE_PADDING = 0.3 BUBBLE_PADDING_PROP = 0....
en
0.842173
# Add balloon geometry: # Render the text into a TextNode, using the font: # Turn off depth write for the text: The place in the depth buffer is # held by the chat bubble anyway, and the text renders after the bubble # so there's no risk of the bubble overwriting the text's pixels. # The nametag code wants the text on ...
2.802248
3
TTS/vocoder/tf/utils/io.py
mightmay/Mien-TTS
0
10238
import datetime import pickle import tensorflow as tf def save_checkpoint(model, current_step, epoch, output_path, **kwargs): """ Save TF Vocoder model """ state = { 'model': model.weights, 'step': current_step, 'epoch': epoch, 'date': datetime.date.today().strftime("%B %d, %Y"...
import datetime import pickle import tensorflow as tf def save_checkpoint(model, current_step, epoch, output_path, **kwargs): """ Save TF Vocoder model """ state = { 'model': model.weights, 'step': current_step, 'epoch': epoch, 'date': datetime.date.today().strftime("%B %d, %Y"...
en
0.399366
Save TF Vocoder model Load TF Vocoder model
2.468851
2
tests/test_path_choice.py
jataware/flee
3
10239
<reponame>jataware/flee from flee import flee """ Generation 1 code. Incorporates only distance, travel always takes one day. """ def test_path_choice(): print("Testing basic data handling and simulation kernel.") flee.SimulationSettings.MinMoveSpeed = 5000.0 flee.SimulationSettings.MaxMoveSpeed = 5000....
from flee import flee """ Generation 1 code. Incorporates only distance, travel always takes one day. """ def test_path_choice(): print("Testing basic data handling and simulation kernel.") flee.SimulationSettings.MinMoveSpeed = 5000.0 flee.SimulationSettings.MaxMoveSpeed = 5000.0 flee.SimulationSet...
en
0.281603
Generation 1 code. Incorporates only distance, travel always takes one day. # l2 = e.addLocation(name="B", movechance=1.0) # l3 = e.addLocation(name="C1", movechance=1.0) # l4 = e.addLocation(name="C2", movechance=1.0) # l5 = e.addLocation(name="D1", movechance=1.0) # l6 = e.addLocation(name="D2", movechance=1.0) # l7 ...
2.96455
3
archive/old_plots/plot_supplemental_divergence_correlations.py
garudlab/mother_infant
2
10240
<reponame>garudlab/mother_infant<filename>archive/old_plots/plot_supplemental_divergence_correlations.py import matplotlib matplotlib.use('Agg') import config import parse_midas_data import parse_HMP_data import os.path import pylab import sys import numpy import diversity_utils import gene_diversity_utils import c...
import matplotlib matplotlib.use('Agg') import config import parse_midas_data import parse_HMP_data import os.path import pylab import sys import numpy import diversity_utils import gene_diversity_utils import calculate_substitution_rates import stats_utils import matplotlib.colors as colors import matplotlib.cm a...
en
0.498721
################################################################################ # # Standard header to read in argument information # ################################################################################ ################################################################################ #######################...
2.018415
2
multivis/plotFeatures.py
brettChapman/cimcb_vis
1
10241
import sys import copy import matplotlib import matplotlib.pyplot as plt import seaborn as sns from collections import Counter from .utils import * import numpy as np import pandas as pd class plotFeatures: usage = """Produces different feature plots given a data table and peak table. Initial_Paramete...
import sys import copy import matplotlib import matplotlib.pyplot as plt import seaborn as sns from collections import Counter from .utils import * import numpy as np import pandas as pd class plotFeatures: usage = """Produces different feature plots given a data table and peak table. Initial_Paramete...
en
0.600224
Produces different feature plots given a data table and peak table. Initial_Parameters ---------- peaktable : Pandas dataframe containing peak data. Must contain 'Name' and 'Label'. datatable : Pandas dataframe containing matrix of values to plot (N samples x N features)...
3.178132
3
core/data/DataWriter.py
berendkleinhaneveld/Registrationshop
25
10242
<reponame>berendkleinhaneveld/Registrationshop<gh_stars>10-100 """ DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to ...
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
en
0.563685
DataWriter.py DataWriter writes an image data object to disk using the provided format.
2.945427
3
parkings/models/permit.py
klemmari1/parkkihubi
12
10243
from itertools import chain from django.conf import settings from django.contrib.gis.db import models as gis_models from django.db import models, router, transaction from django.utils import timezone from django.utils.translation import gettext_lazy as _ from ..fields import CleaningJsonField from ..validators import...
from itertools import chain from django.conf import settings from django.contrib.gis.db import models as gis_models from django.db import models, router, transaction from django.utils import timezone from django.utils.translation import gettext_lazy as _ from ..fields import CleaningJsonField from ..validators import...
none
1
1.983396
2
poi_mining/biz/LSA/logEntropy.py
yummydeli/machine_learning
1
10244
<filename>poi_mining/biz/LSA/logEntropy.py #!/usr/bin/env python # encoding:utf-8 # ############################################################################## # The MIT License (MIT) # # Copyright (c) [2015] [baidu.com] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
<filename>poi_mining/biz/LSA/logEntropy.py #!/usr/bin/env python # encoding:utf-8 # ############################################################################## # The MIT License (MIT) # # Copyright (c) [2015] [baidu.com] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
en
0.504559
#!/usr/bin/env python # encoding:utf-8 # ############################################################################## # The MIT License (MIT) # # Copyright (c) [2015] [baidu.com] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the...
1.218488
1
Python/swap_numbers.py
saurabhcommand/Hello-world
1,428
10245
a = 5 b = 7 a,b = b,a print a print b
a = 5 b = 7 a,b = b,a print a print b
none
1
2.308451
2
algorithms/tests/test_unionfind.py
tommyod/PythonAlgorithms
1
10246
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Tests for the union find data structure. """ try: from ..unionfind import UnionFind except ValueError: pass def test_unionfind_basics(): """ Test the basic properties of unionfind. """ u = UnionFind([1, 2, 3]) assert u.in_same_set(1,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Tests for the union find data structure. """ try: from ..unionfind import UnionFind except ValueError: pass def test_unionfind_basics(): """ Test the basic properties of unionfind. """ u = UnionFind([1, 2, 3]) assert u.in_same_set(1,...
en
0.808516
#!/usr/bin/env python3 # -*- coding: utf-8 -*- Tests for the union find data structure. Test the basic properties of unionfind. Test adding operations, mostly syntactic sugar. Test on a slightly more invovled example. Test that we can take union of more than two elements. Test path compression and the union by rank. # ...
3.456439
3
a3/ga.py
mishless/LearningSystems
1
10247
<filename>a3/ga.py # Genetic Algorithm for solving the Traveling Salesman problem # Authors: <NAME>, <NAME> # Includes import configparser import math import matplotlib.pyplot as plt import numpy import random import sys from operator import itemgetter #Global variables(yay!) # Configuration variables(read from co...
<filename>a3/ga.py # Genetic Algorithm for solving the Traveling Salesman problem # Authors: <NAME>, <NAME> # Includes import configparser import math import matplotlib.pyplot as plt import numpy import random import sys from operator import itemgetter #Global variables(yay!) # Configuration variables(read from co...
en
0.516051
# Genetic Algorithm for solving the Traveling Salesman problem # Authors: <NAME>, <NAME> # Includes #Global variables(yay!) # Configuration variables(read from config.txt) # General global variables # We must begin at first city # Create list of city indexes # We must end at first city #" + str(i) + ": " + str(in...
2.929989
3
products/migrations/0010_remove_product_updated_at.py
UB-ES-2021-A1/wannasell-backend
0
10248
# Generated by Django 3.2.8 on 2021-11-25 17:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('products', '0009_auto_20211125_1846'), ] operations = [ migrations.RemoveField( model_name='product', name='updated_at', ...
# Generated by Django 3.2.8 on 2021-11-25 17:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('products', '0009_auto_20211125_1846'), ] operations = [ migrations.RemoveField( model_name='product', name='updated_at', ...
en
0.882256
# Generated by Django 3.2.8 on 2021-11-25 17:50
1.295391
1
ResumeAnalyser/apps.py
samyakj2307/recruitai_resume_backend
0
10249
<gh_stars>0 from django.apps import AppConfig class ResumeanalyserConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'ResumeAnalyser'
from django.apps import AppConfig class ResumeanalyserConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'ResumeAnalyser'
none
1
1.263755
1
plugins/core/player_manager_plugin/__init__.py
StarryPy/StarryPy-Historic
38
10250
<filename>plugins/core/player_manager_plugin/__init__.py<gh_stars>10-100 from plugins.core.player_manager_plugin.plugin import PlayerManagerPlugin from plugins.core.player_manager_plugin.manager import ( Banned, UserLevels, permissions, PlayerManager )
<filename>plugins/core/player_manager_plugin/__init__.py<gh_stars>10-100 from plugins.core.player_manager_plugin.plugin import PlayerManagerPlugin from plugins.core.player_manager_plugin.manager import ( Banned, UserLevels, permissions, PlayerManager )
none
1
1.208188
1
src/config/svc-monitor/svc_monitor/services/loadbalancer/drivers/ha_proxy/custom_attributes/haproxy_validator.py
jnpr-pranav/contrail-controller
37
10251
from builtins import str from builtins import range from builtins import object import logging import inspect import os class CustomAttr(object): """This type handles non-flat data-types like int, str, bool. """ def __init__(self, key, value): self._value = value self._key = key ...
from builtins import str from builtins import range from builtins import object import logging import inspect import os class CustomAttr(object): """This type handles non-flat data-types like int, str, bool. """ def __init__(self, key, value): self._value = value self._key = key ...
en
0.725463
This type handles non-flat data-types like int, str, bool. #Sanitize the value
2.978925
3
python/janitor/typecache.py
monkeyman79/janitor
2
10252
import gdb class TypeCache(object): def __init__(self): self.cache = {} self.intptr_type = False def clear(self): self.cache = {} self.intptr_type = False def get_type(self, typename): if typename in self.cache: return self.cache[typename] ...
import gdb class TypeCache(object): def __init__(self): self.cache = {} self.intptr_type = False def clear(self): self.cache = {} self.intptr_type = False def get_type(self, typename): if typename in self.cache: return self.cache[typename] ...
none
1
2.447621
2
key_phrase.py
Santara/autoSLR
1
10253
import os import sys directory = sys.argv[1] outfile = open("key_phrases.csv","w") files = {} for filename in os.listdir(directory): text=[] with open(os.path.join(directory, filename)) as f: text=[l.strip() for l in f if len(l.strip())>2] data='' for t in text: if len(t.split()) > 1: data = data+'. '+t.s...
import os import sys directory = sys.argv[1] outfile = open("key_phrases.csv","w") files = {} for filename in os.listdir(directory): text=[] with open(os.path.join(directory, filename)) as f: text=[l.strip() for l in f if len(l.strip())>2] data='' for t in text: if len(t.split()) > 1: data = data+'. '+t.s...
none
1
2.646277
3
tests/test_utils.py
aced-differentiate/dft-input-gen
1
10254
"""Unit tests for helper utilities in :mod:`dftinputgen.utils`.""" import os import pytest from ase import io as ase_io from dftinputgen.utils import get_elem_symbol from dftinputgen.utils import read_crystal_structure from dftinputgen.utils import get_kpoint_grid_from_spacing from dftinputgen.utils import DftInputG...
"""Unit tests for helper utilities in :mod:`dftinputgen.utils`.""" import os import pytest from ase import io as ase_io from dftinputgen.utils import get_elem_symbol from dftinputgen.utils import read_crystal_structure from dftinputgen.utils import get_kpoint_grid_from_spacing from dftinputgen.utils import DftInputG...
en
0.726543
Unit tests for helper utilities in :mod:`dftinputgen.utils`. # str with path to crystal structure file is OK # any other type of input should throw an error
2.515499
3
core/models.py
nforesperance/Django-Channels-ChatApp
2
10255
from django.contrib.auth.models import User from django.db.models import (Model, TextField, DateTimeField, ForeignKey, CASCADE) from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from django.db import models import json class MessageModel(Model): ""...
from django.contrib.auth.models import User from django.db.models import (Model, TextField, DateTimeField, ForeignKey, CASCADE) from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from django.db import models import json class MessageModel(Model): ""...
en
0.771246
This class represents a chat message. It has a owner (user), timestamp and the message body. Toy function to count body characters. :return: body's char number Inform client there is a new message. Trims white spaces, saves the message and notifies the recipient via WS if the message is new. # Trimm...
2.333341
2
backup/model.py
jsikyoon/ASNP-RMR
8
10256
<reponame>jsikyoon/ASNP-RMR import tensorflow as tf import numpy as np # utility methods def batch_mlp(input, output_sizes, variable_scope): """Apply MLP to the final axis of a 3D tensor (reusing already defined MLPs). Args: input: input tensor of shape [B,n,d_in]. output_sizes: An iterable containing t...
import tensorflow as tf import numpy as np # utility methods def batch_mlp(input, output_sizes, variable_scope): """Apply MLP to the final axis of a 3D tensor (reusing already defined MLPs). Args: input: input tensor of shape [B,n,d_in]. output_sizes: An iterable containing the output sizes of the MLP a...
en
0.72758
# utility methods Apply MLP to the final axis of a 3D tensor (reusing already defined MLPs). Args: input: input tensor of shape [B,n,d_in]. output_sizes: An iterable containing the output sizes of the MLP as defined in `basic.Linear`. variable_scope: String giving the name of the variable scop...
3.012563
3
minotaur/_minotaur.py
giannitedesco/minotaur
172
10257
<filename>minotaur/_minotaur.py from typing import Dict, Tuple, Optional from pathlib import Path import asyncio from ._mask import Mask from ._event import Event from ._base import InotifyBase __all__ = ('Minotaur',) class Notification: __slots__ = ( '_path', '_type', '_isdir', ...
<filename>minotaur/_minotaur.py from typing import Dict, Tuple, Optional from pathlib import Path import asyncio from ._mask import Mask from ._event import Event from ._base import InotifyBase __all__ = ('Minotaur',) class Notification: __slots__ = ( '_path', '_type', '_isdir', ...
en
0.932626
Fancy interface for Inotify which does questionable things like: 1. Resolve watch-descriptors back to paths (which races with renames of original paths and can't be used safely, but other inotify packages provide this feature, so here it is for your delectation). 2. Link rename_from/rename_to eve...
2.328925
2
pyclustering/container/examples/__init__.py
JosephChataignon/pyclustering
1,013
10258
<reponame>JosephChataignon/pyclustering """! @brief Collection of examples devoted to containers. @authors <NAME> (<EMAIL>) @date 2014-2020 @copyright BSD-3-Clause """
"""! @brief Collection of examples devoted to containers. @authors <NAME> (<EMAIL>) @date 2014-2020 @copyright BSD-3-Clause """
en
0.532854
! @brief Collection of examples devoted to containers. @authors <NAME> (<EMAIL>) @date 2014-2020 @copyright BSD-3-Clause
1.233931
1
novelty-detection/train_wood_vgg19.py
matherm/python-data-science
1
10259
<reponame>matherm/python-data-science import argparse import sys import torch import numpy as np import torch.nn as nn from torch.utils.data import DataLoader from torchvision.datasets import MNIST from torchvision.datasets import CIFAR10 import torchvision.transforms as transforms import matplotlib.pyplot as plt pars...
import argparse import sys import torch import numpy as np import torch.nn as nn from torch.utils.data import DataLoader from torchvision.datasets import MNIST from torchvision.datasets import CIFAR10 import torchvision.transforms as transforms import matplotlib.pyplot as plt parser = argparse.ArgumentParser(descripti...
de
0.33531
# TRAINING PARAMS # WOOD # Novelty # Train # Val ###################################################### # NORMAL DISTRIBUTION ###################################################### # Model # LOSS # INSTANTIATE OPTIMIZER #Evaluator # Activate matplotlib # CREATE A TRAINER # START TRAINING ###############################...
2.441559
2
sample_architectures/cnn.py
hvarS/PyTorch-Refer
0
10260
# -*- coding: utf-8 -*- """CNN.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1Tq6HUya2PrC0SmyOIFo2c_eVtguRED2q """ import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import DataL...
# -*- coding: utf-8 -*- """CNN.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1Tq6HUya2PrC0SmyOIFo2c_eVtguRED2q """ import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import DataL...
en
0.798453
# -*- coding: utf-8 -*- CNN.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1Tq6HUya2PrC0SmyOIFo2c_eVtguRED2q #get data to cuda if possible #backward #gradient_descent or adam-step # Check the accuracy for the training step
3.112416
3
aispace/layers/callbacks/qa_evaluators.py
SmileGoat/AiSpace
32
10261
<reponame>SmileGoat/AiSpace # -*- coding: utf-8 -*- # @Time : 2020-07-30 15:06 # @Author : yingyuankai # @Email : <EMAIL> # @File : qa_evaluators.py import os import logging import numpy as np import tensorflow as tf import json from pprint import pprint from collections import defaultdict from aispace.util...
# -*- coding: utf-8 -*- # @Time : 2020-07-30 15:06 # @Author : yingyuankai # @Email : <EMAIL> # @File : qa_evaluators.py import os import logging import numpy as np import tensorflow as tf import json from pprint import pprint from collections import defaultdict from aispace.utils.eval_utils import calc_em_...
en
0.509923
# -*- coding: utf-8 -*- # @Time : 2020-07-30 15:06 # @Author : yingyuankai # @Email : <EMAIL> # @File : qa_evaluators.py start_top_log_prob and end_top_log_prob's shape is [batch, k] ref: https://keras.io/examples/nlp/text_extraction_with_bert/ # [b, k] # [b, k] # predict results # raw inputs # if example[...
2.171053
2
tests/conftest.py
junjunjunk/torchgpipe
532
10262
<reponame>junjunjunk/torchgpipe import pytest import torch @pytest.fixture(autouse=True) def manual_seed_zero(): torch.manual_seed(0) @pytest.fixture(scope='session') def cuda_sleep(): # Warm-up CUDA. torch.empty(1, device='cuda') # From test/test_cuda.py in PyTorch. start = torch.cuda.Event(en...
import pytest import torch @pytest.fixture(autouse=True) def manual_seed_zero(): torch.manual_seed(0) @pytest.fixture(scope='session') def cuda_sleep(): # Warm-up CUDA. torch.empty(1, device='cuda') # From test/test_cuda.py in PyTorch. start = torch.cuda.Event(enable_timing=True) end = torc...
en
0.545309
# Warm-up CUDA. # From test/test_cuda.py in PyTorch.
2.126187
2
lib/python/treadmill/scheduler/__init__.py
drienyov/treadmill
0
10263
"""Treadmill hierarchical scheduler. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import collections import datetime import heapq import itertools import logging import operator import sys import tim...
"""Treadmill hierarchical scheduler. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import collections import datetime import heapq import itertools import logging import operator import sys import tim...
en
0.88203
Treadmill hierarchical scheduler. # 21 day # 1 day # 7 days # Default partition threshold # pylint: disable=C0302,too-many-lines Returns number of bits set. Returns zero capacity vector. Returns eps capacity vector. Use timestamp in nanoseconds, from Jan 1st 2014, to break tie in scheduling conflicts for apps of th...
2.319293
2
banners/bannerRan.py
gothyyy/AIDungeon
1
10264
<filename>banners/bannerRan.py import random import sys import time import json import os import warnings import numpy as np import glob, os stat_mini = 1 stat_max = 0 listBanners = [] #HOW TO USE IT: #1 copy the opening.txt #2 remove the graphic (but do keep top logo for consistency) #3 add ASCII art that i...
<filename>banners/bannerRan.py import random import sys import time import json import os import warnings import numpy as np import glob, os stat_mini = 1 stat_max = 0 listBanners = [] #HOW TO USE IT: #1 copy the opening.txt #2 remove the graphic (but do keep top logo for consistency) #3 add ASCII art that i...
en
0.72102
#HOW TO USE IT: #1 copy the opening.txt #2 remove the graphic (but do keep top logo for consistency) #3 add ASCII art that is 78 or less characters in width #4 save txt file under a complete new name #insert function to get random #load text and get proper numbers #randmom, picks between X and Y # directory of banners...
3.18566
3
BondMarket/app/theme_lib.py
Meith0717/BondMarket
0
10265
<reponame>Meith0717/BondMarket<filename>BondMarket/app/theme_lib.py from dataclasses import dataclass @dataclass class theme: name : str bg_color : str fg_color : str lb_color : str ttk_theme : str LIGHT = theme( name='LIGHT', bg_color=None, ...
from dataclasses import dataclass @dataclass class theme: name : str bg_color : str fg_color : str lb_color : str ttk_theme : str LIGHT = theme( name='LIGHT', bg_color=None, fg_color='black', lb_color='#f0f0f0', ttk_them...
none
1
2.749645
3
run.py
rimijoker/CA-MTL
1
10266
import os import sys import re import json import logging import torch from transformers import ( HfArgumentParser, set_seed, AutoTokenizer, AutoConfig, EvalPrediction, ) from src.model.ca_mtl import CaMtl, CaMtlArguments from src.utils.misc import MultiTaskDataArguments, Split from src.mtl_traine...
import os import sys import re import json import logging import torch from transformers import ( HfArgumentParser, set_seed, AutoTokenizer, AutoConfig, EvalPrediction, ) from src.model.ca_mtl import CaMtl, CaMtlArguments from src.utils.misc import MultiTaskDataArguments, Split from src.mtl_traine...
en
0.717475
# Loop to handle MNLI double evaluation (matched, mis-matched) # For xla_spawn (TPUs)
1.848349
2
examples/readWebsocket.py
uadlq/PhyPiDAQ-PiOS11
0
10267
#!/usr/bin/env python3 """Read data in CSV format from websocket """ import sys import asyncio import websockets # read url from command line if len(sys.argv) >= 2: uri = sys.argv[1] else: # host url and port uri = "ws://localhost:8314" print("*==* ", sys.argv[0], " Lese Daten von url ", uri) async def ...
#!/usr/bin/env python3 """Read data in CSV format from websocket """ import sys import asyncio import websockets # read url from command line if len(sys.argv) >= 2: uri = sys.argv[1] else: # host url and port uri = "ws://localhost:8314" print("*==* ", sys.argv[0], " Lese Daten von url ", uri) async def ...
en
0.68723
#!/usr/bin/env python3 Read data in CSV format from websocket # read url from command line # host url and port asynchronous read from websocket # test connection # get data # empty record, end # run web client
3.16624
3
settings/__init__.py
arcana261/python-grpc-boilerplate
0
10268
<gh_stars>0 import os import sys import itertools import json _NONE = object() class SettingManager: _sentry = object() def __init__(self): self.env = os.getenv('ENV', 'prd') try: self._default = __import__('settings.default', fromlist=['*']) except ModuleNotFoundError: ...
import os import sys import itertools import json _NONE = object() class SettingManager: _sentry = object() def __init__(self): self.env = os.getenv('ENV', 'prd') try: self._default = __import__('settings.default', fromlist=['*']) except ModuleNotFoundError: ...
none
1
2.350849
2
roblox/partials/partialgroup.py
speer-kinjo/ro.py
28
10269
""" This file contains partial objects related to Roblox groups. """ from __future__ import annotations from typing import TYPE_CHECKING from ..bases.basegroup import BaseGroup from ..bases.baseuser import BaseUser if TYPE_CHECKING: from ..client import Client class AssetPartialGroup(BaseGroup): """ R...
""" This file contains partial objects related to Roblox groups. """ from __future__ import annotations from typing import TYPE_CHECKING from ..bases.basegroup import BaseGroup from ..bases.baseuser import BaseUser if TYPE_CHECKING: from ..client import Client class AssetPartialGroup(BaseGroup): """ R...
en
0.809606
This file contains partial objects related to Roblox groups. Represents a partial group in the context of a Roblox asset. Intended to parse the `data[0]["creator"]` data from https://games.roblox.com/v1/games. Attributes: _client: The Client object, which is passed to all objects this Client generates....
2.923253
3
services/UserService.py
erginbalta/FarmChain
1
10270
<filename>services/UserService.py import mysql.connector import socket from contextlib import closing import json import random packetType= ["INF","TRN","USR"] database = mysql.connector.connect( host="localhost", user="root", port="3307", passwd="<PASSWORD>", database="farmchain" ) def userIdCrea...
<filename>services/UserService.py import mysql.connector import socket from contextlib import closing import json import random packetType= ["INF","TRN","USR"] database = mysql.connector.connect( host="localhost", user="root", port="3307", passwd="<PASSWORD>", database="farmchain" ) def userIdCrea...
none
1
2.468183
2
tests/blackbox/access_settings/test_bb_access_settings.py
csanders-git/waflz
1
10271
#!/usr/bin/python '''Test WAF Access settings''' #TODO: make so waflz_server only runs once and then can post to it # ------------------------------------------------------------------------------ # Imports # ------------------------------------------------------------------------------ import pytest import subprocess...
#!/usr/bin/python '''Test WAF Access settings''' #TODO: make so waflz_server only runs once and then can post to it # ------------------------------------------------------------------------------ # Imports # ------------------------------------------------------------------------------ import pytest import subprocess...
en
0.232524
#!/usr/bin/python Test WAF Access settings #TODO: make so waflz_server only runs once and then can post to it # ------------------------------------------------------------------------------ # Imports # ------------------------------------------------------------------------------ # ------------------------------------...
1.7865
2
cosmosis/runtime/analytics.py
ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra
1
10272
<gh_stars>1-10 #coding: utf-8 from __future__ import print_function from builtins import zip from builtins import object from cosmosis import output as output_module import numpy as np import sys import os class Analytics(object): def __init__(self, params, pool=None): self.params = params self.p...
#coding: utf-8 from __future__ import print_function from builtins import zip from builtins import object from cosmosis import output as output_module import numpy as np import sys import os class Analytics(object): def __init__(self, params, pool=None): self.params = params self.pool = pool ...
en
0.748833
#coding: utf-8 # takes current traces and returns # gather trace statistics to master process # TODO: check for 0-values in W
2.507523
3
sdcc2elf.py
Vector35/llil_transpiler
14
10273
<filename>sdcc2elf.py #!/usr/bin/env python # # convert SDCC .rel files to 32-bit ELF relocatable # # resulting file is simple: # # ------------------------ # ELF header # ------------------------ # .text section # .shstrtab section # .strtab section # .symtab section # ------------------------ # NULL elf32_shdr # .tex...
<filename>sdcc2elf.py #!/usr/bin/env python # # convert SDCC .rel files to 32-bit ELF relocatable # # resulting file is simple: # # ------------------------ # ELF header # ------------------------ # .text section # .shstrtab section # .strtab section # .symtab section # ------------------------ # NULL elf32_shdr # .tex...
en
0.244853
#!/usr/bin/env python # # convert SDCC .rel files to 32-bit ELF relocatable # # resulting file is simple: # # ------------------------ # ELF header # ------------------------ # .text section # .shstrtab section # .strtab section # .symtab section # ------------------------ # NULL elf32_shdr # .text elf32_shdr # .shstrt...
2.546184
3
eval.py
nikinsta/deep-siamese-text-similarity-on-python-3
0
10274
#! /usr/bin/env python import tensorflow as tf import numpy as np import os import time import datetime from tensorflow.contrib import learn from input_helpers import InputHelper # Parameters # ================================================== # Eval Parameters tf.flags.DEFINE_integer("batch_size", 64, "Batch Size (...
#! /usr/bin/env python import tensorflow as tf import numpy as np import os import time import datetime from tensorflow.contrib import learn from input_helpers import InputHelper # Parameters # ================================================== # Eval Parameters tf.flags.DEFINE_integer("batch_size", 64, "Batch Size (...
en
0.594187
#! /usr/bin/env python # Parameters # ================================================== # Eval Parameters # Misc Parameters # load data and map id-transform based on training time vocabulary # Evaluation # ================================================== # Load the saved meta graph and restore variables # Get the pl...
2.301202
2
accounts/views.py
nikhiljohn10/django-auth
0
10275
<gh_stars>0 from django.urls import reverse from django.conf import settings from django.contrib import messages from django.shortcuts import render, redirect from django.core.mail import send_mail from django.contrib.auth import login, logout, views, authenticate from django.views.generic.edit import CreateView from d...
from django.urls import reverse from django.conf import settings from django.contrib import messages from django.shortcuts import render, redirect from django.core.mail import send_mail from django.contrib.auth import login, logout, views, authenticate from django.views.generic.edit import CreateView from django.contri...
none
1
2.163409
2
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationTupleType.py
truthiswill/intellij-community
2
10276
v<caret>ar = (1, 'foo', None)
v<caret>ar = (1, 'foo', None)
none
1
1.302547
1
bot/venv/lib/python3.7/site-packages/scipy/version.py
manaccac/sc2_bot
76
10277
<gh_stars>10-100 # THIS FILE IS GENERATED FROM SCIPY SETUP.PY short_version = '1.5.4' version = '1.5.4' full_version = '1.5.4' git_revision = '19acfed431060aafaa963f7e530c95e70cd4b85c' release = True if not release: version = full_version
# THIS FILE IS GENERATED FROM SCIPY SETUP.PY short_version = '1.5.4' version = '1.5.4' full_version = '1.5.4' git_revision = '19acfed431060aafaa963f7e530c95e70cd4b85c' release = True if not release: version = full_version
en
0.387835
# THIS FILE IS GENERATED FROM SCIPY SETUP.PY
0.960018
1
emrichen/input/__init__.py
jbek7/emrichen
0
10278
<reponame>jbek7/emrichen from typing import TextIO, Union from .json import load_json from .yaml import load_yaml PARSERS = { 'yaml': load_yaml, 'json': load_json, } def parse(data: Union[TextIO, str], format: str): if format in PARSERS: return PARSERS[format](data) else: raise Value...
from typing import TextIO, Union from .json import load_json from .yaml import load_yaml PARSERS = { 'yaml': load_yaml, 'json': load_json, } def parse(data: Union[TextIO, str], format: str): if format in PARSERS: return PARSERS[format](data) else: raise ValueError('No parser for form...
none
1
2.85197
3
sdk/python/pulumi_aws_native/workspaces/get_workspace.py
pulumi/pulumi-aws-native
29
10279
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
en
0.897218
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # pylint: disable=using-constant-test Resource Type definition for AWS::WorkSpaces::Workspace Resource Type definition for AWS::WorkSpaces::Workspace
1.825763
2
testtools/__init__.py
afy2103/spambayes-9-10-Frozen
0
10280
__author__ = 'AlexYang'
__author__ = 'AlexYang'
none
1
0.949948
1
tests/test_distance.py
mkclairhong/quail
1
10281
<reponame>mkclairhong/quail # -*- coding: utf-8 -*- from quail.distance import * import numpy as np import pytest from scipy.spatial.distance import cdist def test_match(): a = 'A' b = 'B' assert np.equal(match(a, b), 1) def test_euclidean_list(): a = [0, 1, 0] b = [0, 1, 0] assert np.equal(e...
# -*- coding: utf-8 -*- from quail.distance import * import numpy as np import pytest from scipy.spatial.distance import cdist def test_match(): a = 'A' b = 'B' assert np.equal(match(a, b), 1) def test_euclidean_list(): a = [0, 1, 0] b = [0, 1, 0] assert np.equal(euclidean(a, b), 0) def test...
en
0.769321
# -*- coding: utf-8 -*-
2.58452
3
utils/manisfestManager.py
ovitrac/pizza3
1
10282
#!/usr/bin/env python ############################################################################### # # # manifestManager.py # # ...
#!/usr/bin/env python ############################################################################### # # # manifestManager.py # # ...
de
0.35631
#!/usr/bin/env python ############################################################################### # # # manifestManager.py # # ...
1.474562
1
temperature.py
rhwlr/TEST_PRELIM_SKILLS_EXAM
0
10283
class Temperature: def __init__(self, kelvin=None, celsius=None, fahrenheit=None): values = [x for x in [kelvin, celsius, fahrenheit] if x] if len(values) < 1: raise ValueError('Need argument') if len(values) > 1: raise ValueError('Only one argument') if ce...
class Temperature: def __init__(self, kelvin=None, celsius=None, fahrenheit=None): values = [x for x in [kelvin, celsius, fahrenheit] if x] if len(values) < 1: raise ValueError('Need argument') if len(values) > 1: raise ValueError('Only one argument') if ce...
none
1
3.667491
4
af/shovel/test_canning.py
mimi89999/pipeline
0
10284
<gh_stars>0 #!/usr/bin/env python2.7 import unittest import canning class TestNop(unittest.TestCase): def test_nop(self): canning.NopTeeFd.write("asdf") class TestSlice(unittest.TestCase): REPORT = "20130505T065614Z-VN-AS24173-dns_consistency-no_report_id-0.1.0-probe.yaml" @staticmethod d...
#!/usr/bin/env python2.7 import unittest import canning class TestNop(unittest.TestCase): def test_nop(self): canning.NopTeeFd.write("asdf") class TestSlice(unittest.TestCase): REPORT = "20130505T065614Z-VN-AS24173-dns_consistency-no_report_id-0.1.0-probe.yaml" @staticmethod def rpt(year)...
en
0.713974
#!/usr/bin/env python2.7 # FIXME: is it really good behaviour?...
2.742623
3
Exercicios/ex061.py
jlsmirandela/Curso_Python
0
10285
<reponame>jlsmirandela/Curso_Python print('-+-' *10) print(' <NAME> PA') print('+-+' * 10) c = 1 ter = int(input('Insira o primeiro termo - ')) rz = int(input('Insira a razão - ')) while c <= 10: print(ter, ' → ', end=' ') ter += rz c += 1 print('FIM')
print('-+-' *10) print(' <NAME> PA') print('+-+' * 10) c = 1 ter = int(input('Insira o primeiro termo - ')) rz = int(input('Insira a razão - ')) while c <= 10: print(ter, ' → ', end=' ') ter += rz c += 1 print('FIM')
none
1
3.760039
4
gpytorch/models/approximate_gp.py
phumm/gpytorch
1
10286
<reponame>phumm/gpytorch #!/usr/bin/env python3 from .gp import GP from .pyro import _PyroMixin # This will only contain functions if Pyro is installed class ApproximateGP(GP, _PyroMixin): def __init__(self, variational_strategy): super().__init__() self.variational_strategy = variational_strate...
#!/usr/bin/env python3 from .gp import GP from .pyro import _PyroMixin # This will only contain functions if Pyro is installed class ApproximateGP(GP, _PyroMixin): def __init__(self, variational_strategy): super().__init__() self.variational_strategy = variational_strategy def forward(self,...
en
0.645391
#!/usr/bin/env python3 # This will only contain functions if Pyro is installed As in the exact GP setting, the user-defined forward method should return the GP prior mean and covariance evaluated at input locations x. (For Pyro integration only). The component of a `pyro.guide` that corresponds to drawi...
2.455583
2
tests/test_ping.py
d-wysocki/flask-resty
86
10287
import pytest from flask_resty import Api from flask_resty.testing import assert_response # ----------------------------------------------------------------------------- @pytest.fixture(autouse=True) def routes(app): api = Api(app, "/api") api.add_ping("/ping") # ------------------------------------------...
import pytest from flask_resty import Api from flask_resty.testing import assert_response # ----------------------------------------------------------------------------- @pytest.fixture(autouse=True) def routes(app): api = Api(app, "/api") api.add_ping("/ping") # ------------------------------------------...
en
0.12172
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
2.447855
2
tests/test_vetters.py
pllim/exovetter
0
10288
<filename>tests/test_vetters.py from numpy.testing import assert_allclose from astropy.io import ascii from astropy import units as u import lightkurve as lk from exovetter import const as exo_const from exovetter import vetters from exovetter.tce import Tce from astropy.utils.data import get_pkg_data_filename def ...
<filename>tests/test_vetters.py from numpy.testing import assert_allclose from astropy.io import ascii from astropy import units as u import lightkurve as lk from exovetter import const as exo_const from exovetter import vetters from exovetter.tce import Tce from astropy.utils.data import get_pkg_data_filename def ...
none
1
2.232303
2
pyqtgraph/dockarea/DockDrop.py
hishizuka/pyqtgraph
2,762
10289
<reponame>hishizuka/pyqtgraph # -*- coding: utf-8 -*- from ..Qt import QtCore, QtGui class DockDrop(object): """Provides dock-dropping methods""" def __init__(self, allowedAreas=None): object.__init__(self) if allowedAreas is None: allowedAreas = ['center', 'right', 'left', 'top', '...
# -*- coding: utf-8 -*- from ..Qt import QtCore, QtGui class DockDrop(object): """Provides dock-dropping methods""" def __init__(self, allowedAreas=None): object.__init__(self) if allowedAreas is None: allowedAreas = ['center', 'right', 'left', 'top', 'bottom'] self.allowedA...
en
0.723234
# -*- coding: utf-8 -*- Provides dock-dropping methods #print "drag enter accept" #print "drag enter ignore" #print "drag move" # QDragMoveEvent inherits QDropEvent which provides posF() # PyQt6 provides only position() #print " no self-center" #print " not allowed" #print " ok" Overlay widget that draws drop areas ...
2.803189
3
data/download.py
pyaf/google-ai-open-images-object-detection-track
0
10290
import os from subprocess import call files = ['000002b66c9c498e.jpg', '000002b97e5471a0.jpg', '000002c707c9895e.jpg', '0000048549557964.jpg', '000004f4400f6ec5.jpg', '0000071d71a0a6f6.jpg', '000013ba71c12506.jpg', '000018acd19b4ad3.jpg', '00001bc2c4027449.jpg', '00001bcc92282a38.jpg', '0000201cd362f303.jpg', '0000207...
import os from subprocess import call files = ['000002b66c9c498e.jpg', '000002b97e5471a0.jpg', '000002c707c9895e.jpg', '0000048549557964.jpg', '000004f4400f6ec5.jpg', '0000071d71a0a6f6.jpg', '000013ba71c12506.jpg', '000018acd19b4ad3.jpg', '00001bc2c4027449.jpg', '00001bcc92282a38.jpg', '0000201cd362f303.jpg', '0000207...
none
1
2.214116
2
cisco-ios-xr/ydk/models/cisco_ios_xr/SNMP_FRAMEWORK_MIB.py
bopopescu/ACI
0
10291
""" SNMP_FRAMEWORK_MIB """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64 from ydk.filters import YFilter from ydk.errors import YError, YModelError from ydk.errors.error_handler import handle_type_er...
""" SNMP_FRAMEWORK_MIB """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64 from ydk.filters import YFilter from ydk.errors import YError, YModelError from ydk.errors.error_handler import handle_type_er...
en
0.23202
SNMP_FRAMEWORK_MIB SnmpSecurityLevel (Enum Class) .. data:: noAuthNoPriv = 1 .. data:: authNoPriv = 2 .. data:: authPriv = 3 .. attribute:: snmpengine **type**\: :py:class:`Snmpengine <ydk.models.cisco_ios_xr.SNMP_FRAMEWORK_MIB.SNMPFRAMEWORKMIB.Snmpengine>` .. attribute:: snmpengineid ...
2.099786
2
handlers/redirects.py
Bainky/Ventify
6
10292
from aiogram.utils.markdown import hide_link from aiogram.types import CallbackQuery from loader import dp from utils import ( get_object, get_attributes_of_object ) from keyboards import ( anime_choose_safe_category, anime_sfw_categories, anime_nsfw_categories, animals_categories, ...
from aiogram.utils.markdown import hide_link from aiogram.types import CallbackQuery from loader import dp from utils import ( get_object, get_attributes_of_object ) from keyboards import ( anime_choose_safe_category, anime_sfw_categories, anime_nsfw_categories, animals_categories, ...
en
0.634356
Function for sending a menu, with a selection of safe content # Editing the message Redirect to select anime actions # Editing the message Redirect to anime content # Send answer # Editing the message Redirect to animals content # Editing the message Function for sending photos # Get json document # We get a link ...
2.767742
3
1stRound/Medium/322-Coin Change/DP.py
ericchen12377/Leetcode-Algorithm-Python
2
10293
class Solution: def coinChange(self, coins: List[int], amount: int) -> int: M = float('inf') # dynamic programming dp = [0] + [M] * amount for i in range(1, amount+1): dp[i] = 1 + min([dp[i-c] for c in coins if i >= c] or [M]) return dp[-1] if dp[-1] < M else -1
class Solution: def coinChange(self, coins: List[int], amount: int) -> int: M = float('inf') # dynamic programming dp = [0] + [M] * amount for i in range(1, amount+1): dp[i] = 1 + min([dp[i-c] for c in coins if i >= c] or [M]) return dp[-1] if dp[-1] < M else -1
en
0.760267
# dynamic programming
3.276278
3
segmentation_test/Scripts/medpy_graphcut_voxel.py
rominashirazi/SpineSegmentation
0
10294
#!c:\users\hooma\documents\github\spinesegmentation\segmentation_test\scripts\python.exe """ Execute a graph cut on a voxel image based on some foreground and background markers. Copyright (C) 2013 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Publi...
#!c:\users\hooma\documents\github\spinesegmentation\segmentation_test\scripts\python.exe """ Execute a graph cut on a voxel image based on some foreground and background markers. Copyright (C) 2013 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Publi...
en
0.843025
#!c:\users\hooma\documents\github\spinesegmentation\segmentation_test\scripts\python.exe Execute a graph cut on a voxel image based on some foreground and background markers. Copyright (C) 2013 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
3.006441
3
_notes/book/conf.py
AstroMatt/astronaut-training-en
1
10295
author = '<NAME>' email = '<EMAIL>' project = 'Astronaut Training Program' description = 'Astronaut Training Program' extensions = [ 'sphinx.ext.todo', 'sphinx.ext.imgmath', ] todo_emit_warnings = False todo_include_todos = True exclude_patterns = [] # --------------------------------------------------------...
author = '<NAME>' email = '<EMAIL>' project = 'Astronaut Training Program' description = 'Astronaut Training Program' extensions = [ 'sphinx.ext.todo', 'sphinx.ext.imgmath', ] todo_emit_warnings = False todo_include_todos = True exclude_patterns = [] # --------------------------------------------------------...
en
0.307774
# ----------------------------------------------------------------------------- # Standard book config # ----------------------------------------------------------------------------- # Fix for: LaTeX Backend Fails with Citations In Figure Captions \usepackage{etoolbox} \AtBeginEnvironment{figure}{\renewcommand{...
1.463351
1
tutorial_application/forms.py
yamasakih/django_rdkit_tutorial
2
10296
from django_rdkit import models from django.forms.models import ModelForm from .models import Compound class SubstructureSearchForm(ModelForm): class Meta: model = Compound fields = ('molecule', )
from django_rdkit import models from django.forms.models import ModelForm from .models import Compound class SubstructureSearchForm(ModelForm): class Meta: model = Compound fields = ('molecule', )
none
1
1.472171
1
data_structures/trees/tree.py
onyonkaclifford/data-structures-and-algorithms
0
10297
from abc import ABC, abstractmethod from typing import Any, Generator, Iterable, List, Union class Empty(Exception): pass class Tree(ABC): """A tree is a hierarchical collection of nodes containing items, with each node having a unique parent and zero, one or many children items. The topmost element in ...
from abc import ABC, abstractmethod from typing import Any, Generator, Iterable, List, Union class Empty(Exception): pass class Tree(ABC): """A tree is a hierarchical collection of nodes containing items, with each node having a unique parent and zero, one or many children items. The topmost element in ...
en
0.846048
A tree is a hierarchical collection of nodes containing items, with each node having a unique parent and zero, one or many children items. The topmost element in a non-empty tree, the root, has no parent. Tree vocabularies include, but are not limited to: 1. Root - the topmost element in a non-empty tree, ...
4.014211
4
nodes/audio.py
sddhrthrt/COVFEFE
0
10298
<filename>nodes/audio.py from abc import ABC, abstractmethod import os import logging from nodes.helper import FileOutputNode from utils import file_utils from utils import signal_processing as sp from utils.shell_run import shell_run from config import OPENSMILE_HOME class Mp3ToWav(FileOutputNode): def run(self...
<filename>nodes/audio.py from abc import ABC, abstractmethod import os import logging from nodes.helper import FileOutputNode from utils import file_utils from utils import signal_processing as sp from utils.shell_run import shell_run from config import OPENSMILE_HOME class Mp3ToWav(FileOutputNode): def run(self...
en
0.87316
Take as input a format string representing a shell command that can accept an in_file and out_file. For example "someCommand -i {in_file} -o {out_file}" ext: Extension of the output file, ex. "wav", "csv" conf_file: Either absolute path to an opensmile conf file or the name of a config file in opensmile...
2.441041
2
texar/torch/modules/pretrained/gpt2.py
VegB/VLN-Transformer
19
10299
<reponame>VegB/VLN-Transformer # Copyright 2019 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
# Copyright 2019 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
en
0.765635
# Copyright 2019 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
1.772229
2