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
cinderclient/tests/v1/test_volume_encryption_types.py
citrix-openstack-build/python-cinderclient
0
6624351
<gh_stars>0 # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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...
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
en
0.813483
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
2.123585
2
api/qymatix/etl_clarus.py
manisharmagarg/qymatix
0
6624352
import datetime from api.qymatix import uploader # from . import file_uploader class EtlBase(): def __init__(self, dbname, file_name=None, since=None): import datetime from api.qymatix import uploader self.dbname = dbname self.file_name = file_name self.since = since ...
import datetime from api.qymatix import uploader # from . import file_uploader class EtlBase(): def __init__(self, dbname, file_name=None, since=None): import datetime from api.qymatix import uploader self.dbname = dbname self.file_name = file_name self.since = since ...
en
0.207195
# from . import file_uploader :return: # 'Kundennr.': 'Account Name', # 'Re-/Gu-Nr.': , # 'ME': , # 'Breite': , # 'Positionswert': , # 'Pos.': , # 'F': , # 'Unterkundennr.': , # 'Auftragsposnr.': , # 'Menge ext.': , # 'DEK-Preis': , # 'LEK-Preis': , # 'VK-Preis': , # 'Umsatz EK': , # 'Auftr.Art': , # 'Auftragsartbez.':...
2.214325
2
BOJ/graph_boj/bfs_reference.py
mrbartrns/swacademy_structure
0
6624353
<gh_stars>0 # 미로 탈출 """ n * m 크기의 직사각형 형태의 미로에 갖혔다. 미로에는 여러마리의 괴물이 있어 이를 피해 탈출해야 한다. 동빈이의 위치는 (1, 1)이며, 출구는 (n, m)이다. 한번에 한칸씩만 이동할 수 있다. 탈출하기 위한 최소 이동거리를 출력하라 """ from collections import deque def bfs(x, y): que = deque() que.append((x, y)) while que: x, y = que.popleft() for i in range(...
# 미로 탈출 """ n * m 크기의 직사각형 형태의 미로에 갖혔다. 미로에는 여러마리의 괴물이 있어 이를 피해 탈출해야 한다. 동빈이의 위치는 (1, 1)이며, 출구는 (n, m)이다. 한번에 한칸씩만 이동할 수 있다. 탈출하기 위한 최소 이동거리를 출력하라 """ from collections import deque def bfs(x, y): que = deque() que.append((x, y)) while que: x, y = que.popleft() for i in range(4): ...
ko
1.000069
# 미로 탈출 n * m 크기의 직사각형 형태의 미로에 갖혔다. 미로에는 여러마리의 괴물이 있어 이를 피해 탈출해야 한다. 동빈이의 위치는 (1, 1)이며, 출구는 (n, m)이다. 한번에 한칸씩만 이동할 수 있다. 탈출하기 위한 최소 이동거리를 출력하라 # print(graph)
3.4522
3
src/ipyradiant/visualization/interactive_exploration.py
sanbales/ipyradiant
0
6624354
# Copyright (c) 2021 ipyradiant contributors. # Distributed under the terms of the Modified BSD License. import traitlets as trt import ipycytoscape import ipywidgets as W import rdflib from ipycytoscape import Edge, Node from ipyradiant.query.api import SPARQLQueryFramer from ipyradiant.rdf2nx.uri_converter import U...
# Copyright (c) 2021 ipyradiant contributors. # Distributed under the terms of the Modified BSD License. import traitlets as trt import ipycytoscape import ipywidgets as W import rdflib from ipycytoscape import Edge, Node from ipyradiant.query.api import SPARQLQueryFramer from ipyradiant.rdf2nx.uri_converter import U...
en
0.863131
# Copyright (c) 2021 ipyradiant contributors. # Distributed under the terms of the Modified BSD License. # "label": "data(iri)", # "label": "data(iri)", Return all triples for non-Literal objects (and the optional object labels). SELECT DISTINCT ?s ?p ?o ?label WHERE { ?s ?p ?o . FILTER (!isLiteral...
1.874906
2
examples/pesum_kediyaram/to_audio.py
nv-d/open-tamil
2
6624355
# -*- coding: utf8 -*- # This file is distributed under MIT License # 2015 <NAME> <<EMAIL>> # import datetime import time import os import sys import tamil import winsound import wave def get_time(): time_as_string = time.ctime() # access only the date today = datetime.date.today() dnt_now = datetime...
# -*- coding: utf8 -*- # This file is distributed under MIT License # 2015 <NAME> <<EMAIL>> # import datetime import time import os import sys import tamil import winsound import wave def get_time(): time_as_string = time.ctime() # access only the date today = datetime.date.today() dnt_now = datetime...
en
0.536063
# -*- coding: utf8 -*- # This file is distributed under MIT License # 2015 <NAME> <<EMAIL>> # # access only the date # access hour, minute, second and microsecond fields # 1) Generate the numeral for number # 2) Find the relevant audio file # 3) Generate a single audio file # 4) Play this newly created audio file # 5) ...
3.086103
3
pandas/tseries/tests/test_plotting.py
bjacobowski/pandas
0
6624356
<reponame>bjacobowski/pandas<filename>pandas/tseries/tests/test_plotting.py from datetime import datetime, timedelta, date, time import nose from pandas.compat import lrange, zip import numpy as np from numpy.testing.decorators import slow from pandas import Index, Series, DataFrame from pandas.tseries.index import...
from datetime import datetime, timedelta, date, time import nose from pandas.compat import lrange, zip import numpy as np from numpy.testing.decorators import slow from pandas import Index, Series, DataFrame from pandas.tseries.index import date_range, bdate_range from pandas.tseries.offsets import DateOffset, Week...
en
0.729248
# GH2877 # For issue #8765 # inferred freq # axes freq # N > 1 # it works #B was plotted # note this is added to the annual plot already in existence, and changes its freq field # tsplot # GH2571 # string # datetim # irregular # non-ts # GH 9852 # GH 9852 # tsplot # idxl lines # tsplot # idxl lines # low to high # chec...
2.349677
2
leetcode/easy/linkedList/test_delete_node_in_a_linked_list.py
yenbohuang/online-contest-python
0
6624357
# https://leetcode.com/problems/delete-node-in-a-linked-list/ import unittest from ...leetcode_data_model import ListNode class Solution(object): def deleteNode(self, node): """ :type node: ListNode :rtype: void Do not return anything, modify node in-place instead. """ nod...
# https://leetcode.com/problems/delete-node-in-a-linked-list/ import unittest from ...leetcode_data_model import ListNode class Solution(object): def deleteNode(self, node): """ :type node: ListNode :rtype: void Do not return anything, modify node in-place instead. """ nod...
en
0.692952
# https://leetcode.com/problems/delete-node-in-a-linked-list/ :type node: ListNode :rtype: void Do not return anything, modify node in-place instead.
3.902002
4
Visualisation/voxel_to_mesh.py
ayushjain1144/SeeingByMoving
13
6624358
<gh_stars>10-100 import skimage from skimage.measure import marching_cubes as mcl from mayavi import mlab import numpy as np import ipdb st = ipdb.set_trace def save_voxel_to_mesh(voxel_grid, output_fname): verts, faces, normals, values = mcl(voxel_grid, 0.0) mlab.triangular_mesh([vert[0] for vert in verts...
import skimage from skimage.measure import marching_cubes as mcl from mayavi import mlab import numpy as np import ipdb st = ipdb.set_trace def save_voxel_to_mesh(voxel_grid, output_fname): verts, faces, normals, values = mcl(voxel_grid, 0.0) mlab.triangular_mesh([vert[0] for vert in verts], ...
en
0.287742
# load voxel grid #st()
2.277357
2
django/utils/encoding.py
mitar/django
1
6624359
import types import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str_...
import types import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str_...
en
0.858916
A class whose __str__ returns its __unicode__ as a UTF-8 bytestring. Useful as a mix-in. Returns a unicode object representing 's'. Treats bytestrings using the 'encoding' codec. If strings_only is True, don't convert (some) non-string-like objects. # The input is the result of a gettext_lazy() call. Dete...
2.557197
3
detection_train.py
cclauss/simpledet
0
6624360
import argparse import importlib import logging import os import pprint import pickle as pkl from functools import reduce from core.detection_module import DetModule from utils import callback from utils.memonger_v2 import search_plan_to_layer from utils.lr_scheduler import WarmupMultiFactorScheduler, LRSequential, Ad...
import argparse import importlib import logging import os import pprint import pickle as pkl from functools import reduce from core.detection_module import DetModule from utils import callback from utils.memonger_v2 import search_plan_to_layer from utils.lr_scheduler import WarmupMultiFactorScheduler, LRSequential, Ad...
en
0.636597
# only rank==0 print all debug infos # for distributed training using shared file system # set up logger # setup multi-gpu # print config # if rank == 0: # logger.info(pprint.pformat(config)) # load dataset and prepare imdb for training # filter empty image # add flip roi record # infer shape # memonger # load and ...
1.89022
2
sequence_search/consumer/nhmmer_parse.py
RNAcentral/sequence_search
2
6624361
<gh_stars>1-10 """ Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 appl...
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 a...
en
0.495856
Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 agree...
2.589684
3
test/dialect/mssql/test_reflection.py
lxl0928/timi_sqlalchemy
1
6624362
# -*- encoding: utf-8 from sqlalchemy import Column from sqlalchemy import DDL from sqlalchemy import event from sqlalchemy import ForeignKey from sqlalchemy import Index from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import PrimaryKeyConstraint from sqlalc...
# -*- encoding: utf-8 from sqlalchemy import Column from sqlalchemy import DDL from sqlalchemy import event from sqlalchemy import ForeignKey from sqlalchemy import Index from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import PrimaryKeyConstraint from sqlalc...
en
0.947667
# -*- encoding: utf-8 # FLOAT(5) comes back as REAL create table foo (id integer primary key, data xml) # test for issue #4228 test [ticket:3504]. Here we are testing not just that the "max" token comes back as None, but also that these types accept "max" as the value of "length" on constructio...
2.208454
2
robocode-python-ls-core/src/robocode_ls_core/subprocess_wrapper.py
emanlove/robotframework-lsp
0
6624363
<reponame>emanlove/robotframework-lsp<filename>robocode-python-ls-core/src/robocode_ls_core/subprocess_wrapper.py import subprocess def _fix_subprocess(): import sys from robocode_ls_core.constants import IS_PY37_ONWARDS # Workaround for https://bugs.python.org/issue37380 in older versions of Python. ...
import subprocess def _fix_subprocess(): import sys from robocode_ls_core.constants import IS_PY37_ONWARDS # Workaround for https://bugs.python.org/issue37380 in older versions of Python. # i.e.: OSError: [WinError 6] The handle is invalid if IS_PY37_ONWARDS: return # This is fixed in 3....
en
0.914415
# Workaround for https://bugs.python.org/issue37380 in older versions of Python. # i.e.: OSError: [WinError 6] The handle is invalid # This is fixed in 3.7 onwards. # Just check that there is in fact a _cleanup attribute there. # This is the fix. # This can happen if two threads create a new Popen instance. # It's harm...
2.360623
2
Lib/test/test_traceback.py
odeke-em/cpython
0
6624364
"""Test cases for traceback module""" from collections import namedtuple from io import StringIO import linecache import sys import unittest import re from test.support import run_unittest, Error, captured_output from test.support import TESTFN, unlink, cpython_only from test.script_helper import assert_python_ok impo...
"""Test cases for traceback module""" from collections import namedtuple from io import StringIO import linecache import sys import unittest import re from test.support import run_unittest, Error, captured_output from test.support import TESTFN, unlink, cpython_only from test.script_helper import assert_python_ok impo...
en
0.780875
Test cases for traceback module # For now, a very minimal set of tests. I want to be sure that # formatting of SyntaxErrors works based on changes for 2.1. # third line has caret # in the right place # third line has caret # and no additional newline # in the right place # third line has caret # and no additional newl...
2.771586
3
Predict_Score.py
US579/RecommenderSystems
0
6624365
<reponame>US579/RecommenderSystems import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import mean_squared_error from math import sqrt from sklearn.metrics.pairwise import cosine_similarity import scipy.sparse as sp from scipy.sparse.linalg import svds from sklearn.model_selectio...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import mean_squared_error from math import sqrt from sklearn.metrics.pairwise import cosine_similarity import scipy.sparse as sp from scipy.sparse.linalg import svds from sklearn.model_selection import train_test_split from skle...
en
0.475529
# Read Data and Cleaning # Uitem_header = ['item_id', 'movie_title', 'release_date', 'video_release_date', # 'IMDb_URL', 'unknown', 'Action', 'Adventure' ,'Animation', # 'Childrens','Comedy', 'Crime', 'Documentary', 'Drama', 'Fantasy', # 'Film-Noir', 'Horror', 'Musical', 'Mys...
2.254189
2
scraper/test_scraper.py
ecohealthalliance/grits-api
3
6624366
# coding=utf8 import unittest import scraper import process_resources import logging import translation logging.basicConfig(level=logging.INFO) logger = logging.getLogger('scraper') logger.setLevel(logging.INFO) class TestScraper(unittest.TestCase): def test_promed_1(self): result = scraper.scrape("http://...
# coding=utf8 import unittest import scraper import process_resources import logging import translation logging.basicConfig(level=logging.INFO) logger = logging.getLogger('scraper') logger.setLevel(logging.INFO) class TestScraper(unittest.TestCase): def test_promed_1(self): result = scraper.scrape("http://...
en
0.55513
# coding=utf8 # print process_resources.extract_clean_content(result['htmlContent']) # print process_resources.extract_clean_content(result['htmlContent']) # print process_resources.extract_clean_content(result['htmlContent']) # print process_resources.extract_clean_content(result['htmlContent']) # print process_resour...
2.575717
3
handy/rand/number.py
Al3xChen/handy
5
6624367
# -*- coding: utf-8 -*- """ Created on Wed Dec 27 22:20:38 2017 @author: Frank """ from random import choice #封装函数,生成随机手机号码 def randomPN(): area_num = ['187','186','186','158','155','156','138','135','136','177','176','144','147'] #获取手机号码区域号 area_number = choice(area_num) #生成后8位手机号码 seed = "1234567890" ...
# -*- coding: utf-8 -*- """ Created on Wed Dec 27 22:20:38 2017 @author: Frank """ from random import choice #封装函数,生成随机手机号码 def randomPN(): area_num = ['187','186','186','158','155','156','138','135','136','177','176','144','147'] #获取手机号码区域号 area_number = choice(area_num) #生成后8位手机号码 seed = "1234567890" ...
zh
0.621582
# -*- coding: utf-8 -*- Created on Wed Dec 27 22:20:38 2017 @author: Frank #封装函数,生成随机手机号码 #获取手机号码区域号 #生成后8位手机号码 #拼接生成完整手机号码
3.401988
3
Day66-75/code/example02.py
EngrSaad2/Python-100-Days
37
6624368
<reponame>EngrSaad2/Python-100-Days<gh_stars>10-100 from bs4 import BeautifulSoup import re def main(): html = """ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>首页</title> </head> <body> <h1>Hello, world!</h1> ...
from bs4 import BeautifulSoup import re def main(): html = """ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>首页</title> </head> <body> <h1>Hello, world!</h1> <p>这是一个<em>神奇</em>的网站!</p> <hr> ...
ja
0.125663
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>首页</title> </head> <body> <h1>Hello, world!</h1> <p>这是一个<em>神奇</em>的网站!</p> <hr> <div> <h2>这是一个例子程序</h2> <p>静夜思</p> ...
3.126176
3
scripts/xor_4f/xor_4f_diagnostics.py
NRuf77/proset
0
6624369
"""Score proset classifier trained on the 'continuous XOR' problem with 4 features. Copyright by <NAME> Released under the MIT license - see LICENSE file for details """ import gzip import os import pickle import numpy as np from sklearn.metrics import classification_report, log_loss, roc_auc_score imp...
"""Score proset classifier trained on the 'continuous XOR' problem with 4 features. Copyright by <NAME> Released under the MIT license - see LICENSE file for details """ import gzip import os import pickle import numpy as np from sklearn.metrics import classification_report, log_loss, roc_auc_score imp...
en
0.926049
Score proset classifier trained on the 'continuous XOR' problem with 4 features. Copyright by <NAME> Released under the MIT license - see LICENSE file for details # select test samples which have identical class based on the first two features # fix remaining features to positive sign # noinspection PyUnresolvedRef...
2.32154
2
acc_utils/errors.py
cap-lab/MidapSim
2
6624370
<gh_stars>1-10 from __future__ import absolute_import, division, print_function, unicode_literals # Define possible errors in simulator def _assert(cand, note=""): if not cand: raise ValueError(note) class ModelBuildError(Exception): def __init__(self, msg='Not defined'): self.msg = 'MIDAP ...
from __future__ import absolute_import, division, print_function, unicode_literals # Define possible errors in simulator def _assert(cand, note=""): if not cand: raise ValueError(note) class ModelBuildError(Exception): def __init__(self, msg='Not defined'): self.msg = 'MIDAP MODEL Build Err...
en
0.50854
# Define possible errors in simulator
2.37515
2
tests/test_folder.py
phaustin/canvasapi
0
6624371
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import requests_mock import warnings from canvasapi import Canvas from canvasapi.file import File from canvasapi.folder import Folder from tests import settings from tests.util import register_uris @requests_mock.Mock...
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import requests_mock import warnings from canvasapi import Canvas from canvasapi.file import File from canvasapi.folder import Folder from tests import settings from tests.util import register_uris @requests_mock.Mock...
en
0.096998
# __str__() # list_files() # get_files() # delete() # list_folders() # get_folders() # create_folder() # update() # copy_file()
2.365379
2
aispider/test.py
East196/aispider
1
6624372
# -*- coding: utf-8 -*- import urllib from bs4 import BeautifulSoup from random import randint import time import json import codecs file_name = u"d:/anjuke.index.html" # home = 'http://sz.fang.anjuke.com/loupan/all/' # response = urllib2.urlopen(home) # html = response.read() # # f = open(file_name, 'w') # f.write...
# -*- coding: utf-8 -*- import urllib from bs4 import BeautifulSoup from random import randint import time import json import codecs file_name = u"d:/anjuke.index.html" # home = 'http://sz.fang.anjuke.com/loupan/all/' # response = urllib2.urlopen(home) # html = response.read() # # f = open(file_name, 'w') # f.write...
en
0.323748
# -*- coding: utf-8 -*- # home = 'http://sz.fang.anjuke.com/loupan/all/' # response = urllib2.urlopen(home) # html = response.read() # # f = open(file_name, 'w') # f.write(html) # f = open(file_name, 'r') # html = f.read().encode("utf-8") # soup = BeautifulSoup(html, "lxml") # for c in soup.children: # print c.getp...
2.896704
3
unittests/test_models/test_db.py
BoroviyOrest/QuizzesAPI
0
6624373
import pytest from bson import ObjectId from pydantic import ValidationError from models.db import DBModelMixin @pytest.fixture def id_data(): return {'_id': '<KEY>'} def test_db_model_mixin_correct_data(id_data): model = DBModelMixin(**id_data) assert model.id == ObjectId(id_data['_id']) @pytest.mar...
import pytest from bson import ObjectId from pydantic import ValidationError from models.db import DBModelMixin @pytest.fixture def id_data(): return {'_id': '<KEY>'} def test_db_model_mixin_correct_data(id_data): model = DBModelMixin(**id_data) assert model.id == ObjectId(id_data['_id']) @pytest.mar...
none
1
2.456089
2
grakel/kernels/pyramid_match.py
vishalbelsare/GraKeL
0
6624374
"""The pyramid match kernel as in :cite:`nikolentzos2017matching`.""" # Author: <NAME> <<EMAIL>> # License: BSD 3 clause import collections import warnings import numpy as np from itertools import chain from scipy.sparse import csr_matrix from scipy.sparse.linalg import eigs from grakel.graph import Graph from grak...
"""The pyramid match kernel as in :cite:`nikolentzos2017matching`.""" # Author: <NAME> <<EMAIL>> # License: BSD 3 clause import collections import warnings import numpy as np from itertools import chain from scipy.sparse import csr_matrix from scipy.sparse.linalg import eigs from grakel.graph import Graph from grak...
en
0.783617
The pyramid match kernel as in :cite:`nikolentzos2017matching`. # Author: <NAME> <<EMAIL>> # License: BSD 3 clause # Python 2/3 cross-compatibility import Pyramid match kernel class. Kernel defined in :cite:`nikolentzos2017matching` Parameters ---------- with_labels : bool, default=True A flag...
2.783228
3
prompt_tuning/data/metrics_test.py
techthiyanes/prompt-tuning
0
6624375
# Copyright 2022 Google. # # 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, soft...
# Copyright 2022 Google. # # 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, soft...
en
0.85137
# Copyright 2022 Google. # # 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, soft...
2.302775
2
python/mxnet/_ctypes/symbol.py
bill-teng/mxnet-test
5
6624376
<reponame>bill-teng/mxnet-test # coding: utf-8 # pylint: disable=invalid-name, protected-access, too-many-arguments, global-statement """Symbolic configuration API.""" from __future__ import absolute_import as _abs import ctypes import sys import numpy as _numpy from ..base import _LIB from ..base import c_array, c_s...
# coding: utf-8 # pylint: disable=invalid-name, protected-access, too-many-arguments, global-statement """Symbolic configuration API.""" from __future__ import absolute_import as _abs import ctypes import sys import numpy as _numpy from ..base import _LIB from ..base import c_array, c_str, mx_uint, py_str from ..base...
en
0.516885
# coding: utf-8 # pylint: disable=invalid-name, protected-access, too-many-arguments, global-statement Symbolic configuration API. Symbol is symbolic graph. # pylint: disable=no-member Initialize the function with handle Parameters ---------- handle : SymbolHandle the handle to the...
2.242832
2
creatorRSA.py
munozariasjm/RSA_toyModel
0
6624377
<gh_stars>0 import numpy as np import math def isPrime(k): ban=True for z in range(2,k): if k%z==0: ban=False return ban sec=100 def setSec(secs): sec=secs def generarVals(numerito): e=65537 p=11;q=17 #primesP = [i for i in range(13,numerito) if isPrime(i)...
import numpy as np import math def isPrime(k): ban=True for z in range(2,k): if k%z==0: ban=False return ban sec=100 def setSec(secs): sec=secs def generarVals(numerito): e=65537 p=11;q=17 #primesP = [i for i in range(13,numerito) if isPrime(i) and i%e!=1]...
en
0.13215
#primesP = [i for i in range(13,numerito) if isPrime(i) and i%e!=1] #p = np.random.choice(primesP) #primesQ = [i for i in range(17,numerito) if isPrime(i) and i%e!=1] #q = np.random.choice(primesQ) #print("public Key es: {}{}".format(n,e)) #print("private Key es: {} ".format(int(d)))
2.998129
3
examples/kubeflow/main.py
rbrishabh/fairing
0
6624378
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
en
0.834099
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
2.275605
2
_test_projects/unittests/index.py
oren0e/cob
2
6624379
# cob: type=views mountpoint=/index from cob import route from . import mymodels from flask import jsonify @route('/list_models') def get_all_models(): return jsonify([{'id': p.id} for p in mymodels.Person.query.all()])
# cob: type=views mountpoint=/index from cob import route from . import mymodels from flask import jsonify @route('/list_models') def get_all_models(): return jsonify([{'id': p.id} for p in mymodels.Person.query.all()])
en
0.727207
# cob: type=views mountpoint=/index
2.099873
2
tasks.py
slekwati/dotfiles-1
0
6624380
#!/usr/bin/env python3 from invoke import task import sys from typing import List from deploy_nixos import DeployHost, DeployGroup def deploy_nixos(hosts: List[DeployHost]) -> None: """ Deploy to all hosts in parallel """ g = DeployGroup(hosts) def deploy(h: DeployHost) -> None: h.run_l...
#!/usr/bin/env python3 from invoke import task import sys from typing import List from deploy_nixos import DeployHost, DeployGroup def deploy_nixos(hosts: List[DeployHost]) -> None: """ Deploy to all hosts in parallel """ g = DeployGroup(hosts) def deploy(h: DeployHost) -> None: h.run_l...
en
0.568665
#!/usr/bin/env python3 Deploy to all hosts in parallel Deploy to eve, eva and localhost Deploy to bernie Deploy to matchbox Deploy to matchbox Deploy to dotfiles sudo -u joerg zsh <<'EOF' cd $HOME source $HOME/.zshrc homeshick pull homeshick symlink homeshick cd dotfiles nix build --out-link $HOME/.hm-activate ".#hmCon...
2.026087
2
ledgerwallet/proto/listApps_pb2.py
Vedrillan/ledgerctl
26
6624381
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: listApps.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refl...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: listApps.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refl...
en
0.505465
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: listApps.proto # @@protoc_insertion_point(imports) # @@protoc_insertion_point(class_scope:listapps.App) # @@protoc_insertion_point(class_scope:listapps.AppList) # @@protoc_insertion_point(module_scope)
1.167686
1
SVS/model/archive/preprocessing/kaldi_data.py
PeterGuoRuc/SVS_system
78
6624382
"""Copyright [2019] [<NAME>]. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
"""Copyright [2019] [<NAME>]. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
en
0.767329
Copyright [2019] [<NAME>]. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
2.062063
2
H36M_BasePredModel.py
xcyan/eccv18_mtvae
37
6624383
"""Base class for Human3.6M Keypoint Generation.""" import os import numpy as np import tensorflow as tf import h36m_input as input_generator import h36m_losses as losses import utils import model_utils from preprocess.video_proc_utils import VideoProc slim = tf.contrib.slim def _get_data_from_provider(inputs, bat...
"""Base class for Human3.6M Keypoint Generation.""" import os import numpy as np import tensorflow as tf import h36m_input as input_generator import h36m_losses as losses import utils import model_utils from preprocess.video_proc_utils import VideoProc slim = tf.contrib.slim def _get_data_from_provider(inputs, bat...
de
0.300657
Base class for Human3.6M Keypoint Generation. Load data from input_genetator. Defines Human3.6M motion generation model. # # Loads a batch of input from a single source. Loads given dataset and split. # Data augmentation. Initialize assignment operator function used while training. Python function. ####################...
2.315866
2
examples/combat_sim/entities.py
LearnPythonAndMakeGames/ecs
6
6624384
#!/usr/bin/env python import sys from ecs import Entity from components import Health, Damage if sys.platform.startswith('2'): range = xrange def setup_entities(number_of_cowboys=100, number_of_aliens=100): '''Sets up all the entities''' # Generate entities and add components to them cowboys = [] ...
#!/usr/bin/env python import sys from ecs import Entity from components import Health, Damage if sys.platform.startswith('2'): range = xrange def setup_entities(number_of_cowboys=100, number_of_aliens=100): '''Sets up all the entities''' # Generate entities and add components to them cowboys = [] ...
en
0.711847
#!/usr/bin/env python Sets up all the entities # Generate entities and add components to them # Convenient dictionary splitting the two types of entities
2.826732
3
3_6Dpose_estimator/train_YOLO/scripts/gt_single_object.py
Minipeps/betapose
66
6624385
<gh_stars>10-100 import os import yaml import random from tqdm import tqdm from shutil import copyfile opj = os.path.join NUM_SEQS = 15 CLASS_NAMES = ('ape', 'bvise', 'bowl', 'camera', 'can', 'cat', 'cup', 'driller', 'duck', 'eggbo', 'glue', 'holepuncher', 'iron', 'lamp', 'phone') SIXD = '/home/data/six...
import os import yaml import random from tqdm import tqdm from shutil import copyfile opj = os.path.join NUM_SEQS = 15 CLASS_NAMES = ('ape', 'bvise', 'bowl', 'camera', 'can', 'cat', 'cup', 'driller', 'duck', 'eggbo', 'glue', 'holepuncher', 'iron', 'lamp', 'phone') SIXD = '/home/data/sixd/hinterstoisser/...
la
0.810422
# image # anno
2.309425
2
pay-api/src/pay_api/services/statement_settings.py
thorwolpert/sbc-pay
4
6624386
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
en
0.876177
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
1.911011
2
mesh.py
MarcoCiaramella/Voxelize
1
6624387
from voxel import Voxel from color import Color class Mesh: PLY_HEADER_TOP = "ply\nformat ascii 1.0\nelement vertex %d\n" PLY_HEADER_VERTEX = "property float x\nproperty float y\nproperty float z\n" PLY_HEADER_NORMAL = "property float nx\nproperty float ny\nproperty float nz\n" PLY_HEADER_COLOR = "p...
from voxel import Voxel from color import Color class Mesh: PLY_HEADER_TOP = "ply\nformat ascii 1.0\nelement vertex %d\n" PLY_HEADER_VERTEX = "property float x\nproperty float y\nproperty float z\n" PLY_HEADER_NORMAL = "property float nx\nproperty float ny\nproperty float nz\n" PLY_HEADER_COLOR = "p...
none
1
2.777761
3
DataStructure and algorithms/LinkedList/reverseLL.py
Rajatkhatri7/Project-Milap
0
6624388
<reponame>Rajatkhatri7/Project-Milap #!/usr/bin/env python3 class Node: def __init__(self,data): self.data = data self.next = next class LinkedList: def __init__(self): self.head = None def appending(self,data): if self.head is None: new_node = Node(data)...
#!/usr/bin/env python3 class Node: def __init__(self,data): self.data = data self.next = next class LinkedList: def __init__(self): self.head = None def appending(self,data): if self.head is None: new_node = Node(data) self.head = new_node ...
en
0.618715
#!/usr/bin/env python3 #swapping via iteration #base case when current reach the end of linked list ,current is None #see in the results swapping happens
4.247748
4
roialign/roi_align/crop_and_resize.py
chan4899/pytorch-mask-rcnn
0
6624389
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function from . import crop_and_resize as _backend class CropAndResizeFunction(Function): def __init__(self, crop_height, crop_width, extrapolation_value=0): self.crop_height = crop_height s...
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function from . import crop_and_resize as _backend class CropAndResizeFunction(Function): def __init__(self, crop_height, crop_width, extrapolation_value=0): self.crop_height = crop_height s...
en
0.787265
# save for backward Crop and resize ported from tensorflow See more details on https://www.tensorflow.org/api_docs/python/tf/image/crop_and_resize
2.655502
3
var/spack/repos/builtin/packages/openblas/package.py
pbrady/spack
348
6624390
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import re from spack import * from spack.package_test import compare_output_file, compile_c_and_execute class...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import re from spack import * from spack.package_test import compare_output_file, compile_c_and_execute class...
en
0.836932
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) OpenBLAS: An optimized BLAS library # virtual dependency # OpenBLAS >=3.0 has an official way to disable internal parallel ...
1.729921
2
api/handlers.py
gabriellsesam/oracle-transform
0
6624391
def generic_handler(dbconnection, variables, logger, entity): """For a given entity, I query the given database and return the entity appended with 'query_result' :param OracleDB dbconnection: Connection to a given database. :param VariablesConfig variables: Object with environment variables. :param se...
def generic_handler(dbconnection, variables, logger, entity): """For a given entity, I query the given database and return the entity appended with 'query_result' :param OracleDB dbconnection: Connection to a given database. :param VariablesConfig variables: Object with environment variables. :param se...
en
0.623142
For a given entity, I query the given database and return the entity appended with 'query_result' :param OracleDB dbconnection: Connection to a given database. :param VariablesConfig variables: Object with environment variables. :param sesam_logger logger: Logger to log info/errors to. :param dict enti...
2.921747
3
caffe2/contrib/fakelowp/test/test_fc_nnpi_fp16.py
Stonepia/pytorch
1
6624392
<gh_stars>1-10 import numpy as np import unittest import caffe2.python.fakelowp.init_shared_libs # noqa from hypothesis import given, settings from hypothesis import strategies as st from caffe2.proto import caffe2_pb2 from caffe2.python import core from caffe2.python import workspace from caffe2.python.onnx.onnxifi ...
import numpy as np import unittest import caffe2.python.fakelowp.init_shared_libs # noqa from hypothesis import given, settings from hypothesis import strategies as st from caffe2.proto import caffe2_pb2 from caffe2.python import core from caffe2.python import workspace from caffe2.python.onnx.onnxifi import onnxifi_...
en
0.86203
# noqa Test that the matmul engine is working, this doesn't test precision # Run Glow net # Run caffe2 net Test numerics, use examples found from the unit test. Use Fp16FCAcc16NNPI as a reference. # keep onnxifi happy by feeding something with a shape # Run Glow net Test numerics, fix a dimensio...
2.117378
2
nscan/nscan.py
Unam3dd/Train-2018-2020
4
6624393
<reponame>Unam3dd/Train-2018-2020<gh_stars>1-10 #!/usr/bin/python2 #-*- coding:utf-8 -*- import socket import subprocess import os import netifaces import threading import thread from datetime import datetime import time import shlex import platform import sys import argparse banner = ''' ███▄ █ ██████ ▄████▄...
#!/usr/bin/python2 #-*- coding:utf-8 -*- import socket import subprocess import os import netifaces import threading import thread from datetime import datetime import time import shlex import platform import sys import argparse banner = ''' ███▄ █ ██████ ▄████▄ ▄▄▄ ███▄ █ ██ ▀█ █ ▒██ ▒ ▒██▀ ...
zh
0.156745
#!/usr/bin/python2 #-*- coding:utf-8 -*- ███▄ █ ██████ ▄████▄ ▄▄▄ ███▄ █ ██ ▀█ █ ▒██ ▒ ▒██▀ ▀█ ▒████▄ ██ ▀█ █ ▓██ ▀█ ██▒░ ▓██▄ ▒▓█ ▄ ▒██ ▀█▄ ▓██ ▀█ ██▒ ▓██▒ ▐▌██▒ ▒ ██▒▒▓▓▄ ▄██▒░██▄▄▄▄██ ▓██▒ ▐▌██▒ ▒██░ ▓██░▒██████▒▒▒ ▓███▀ ░ ▓█ ▓██▒▒██░ ▓██░ ░ ▒░ ▒ ▒ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ...
2.455667
2
testsuite/tests/apicast/parameters/apicast_path_routing/test_apicast_path_routing.py
dlaso99/3scale-tests
5
6624394
"""Rewrite of spec/openshift_specs/path_based_routing_two_backends_spec.rb When `APICAST_PATH_ROUTING` parameter is set to true, the gateway will use path-based routing in addition to the default host-based routing. The API request will be routed to the first service that has a matching mapping rule, from the list of ...
"""Rewrite of spec/openshift_specs/path_based_routing_two_backends_spec.rb When `APICAST_PATH_ROUTING` parameter is set to true, the gateway will use path-based routing in addition to the default host-based routing. The API request will be routed to the first service that has a matching mapping rule, from the list of ...
en
0.857678
Rewrite of spec/openshift_specs/path_based_routing_two_backends_spec.rb When `APICAST_PATH_ROUTING` parameter is set to true, the gateway will use path-based routing in addition to the default host-based routing. The API request will be routed to the first service that has a matching mapping rule, from the list of ser...
2.622244
3
tests/test_cloudwatch/test_cloudwatch_boto3.py
akingscote/moto
5,460
6624395
import boto3 import pytest import pytz import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError from datetime import datetime, timedelta from dateutil.tz import tzutc from decimal import Decimal from freezegun import freeze_time from operator import itemgetter from uuid import uu...
import boto3 import pytest import pytz import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError from datetime import datetime, timedelta from dateutil.tz import tzutc from decimal import Decimal from freezegun import freeze_time from operator import itemgetter from uuid import uu...
en
0.79261
# noqa # pylint: disable=unused-import # no Value to test https://github.com/spulec/moto/issues/1615 # TODO: test statistics - https://github.com/spulec/moto/issues/1615 # put metric data with different dimensions # list of (<kwargs>, <expectedSum>, <expectedAverage>) # get metric stats with no restriction on dimensio...
1.870384
2
summary/sumy/sklearn/multiclass.py
WangWenjun559/MITS
6
6624396
<reponame>WangWenjun559/MITS """ Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module...
""" Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they re...
en
0.764568
Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they requir...
3.153011
3
dffml/cli/dataflow.py
sauravsrijan/dffml
0
6624397
import sys import pathlib import hashlib import contextlib from ..base import BaseConfig from ..df.base import BaseOrchestrator from ..df.types import DataFlow, Stage, Operation, Input from ..df.memory import ( MemoryOrchestrator, MemoryInputSet, MemoryInputSetConfig, StringInputSetContext, ) from ..co...
import sys import pathlib import hashlib import contextlib from ..base import BaseConfig from ..df.base import BaseOrchestrator from ..df.types import DataFlow, Stage, Operation, Input from ..df.memory import ( MemoryOrchestrator, MemoryInputSet, MemoryInputSetConfig, StringInputSetContext, ) from ..co...
en
0.841806
# The merged dataflow # For entering ConfigLoader contexts # Load config loaders we'll need as we see their file types # Export the dataflow Run dataflow for all repos in sources This method exists so that it can be overriden by RunRepoSet # Orchestrate the running of these operations # Add our inputs to the input netw...
2.042589
2
timm/models/dla.py
guitarmind/pytorch-image-models
80
6624398
""" Deep Layer Aggregation and DLA w/ Res2Net DLA original adapted from Official Pytorch impl at: DLA Paper: `Deep Layer Aggregation` - https://arxiv.org/abs/1707.06484 Res2Net additions from: https://github.com/gasvn/Res2Net/ Res2Net Paper: `Res2Net: A New Multi-scale Backbone Architecture` - https://arxiv.org/abs/19...
""" Deep Layer Aggregation and DLA w/ Res2Net DLA original adapted from Official Pytorch impl at: DLA Paper: `Deep Layer Aggregation` - https://arxiv.org/abs/1707.06484 Res2Net additions from: https://github.com/gasvn/Res2Net/ Res2Net Paper: `Res2Net: A New Multi-scale Backbone Architecture` - https://arxiv.org/abs/19...
en
0.748606
Deep Layer Aggregation and DLA w/ Res2Net DLA original adapted from Official Pytorch impl at: DLA Paper: `Deep Layer Aggregation` - https://arxiv.org/abs/1707.06484 Res2Net additions from: https://github.com/gasvn/Res2Net/ Res2Net Paper: `Res2Net: A New Multi-scale Backbone Architecture` - https://arxiv.org/abs/1904.0...
2.200943
2
molecule/f5bigip_gtm_monitor_http/tests/test_default.py
erjac77/ansible-role-f5
1
6624399
<filename>molecule/f5bigip_gtm_monitor_http/tests/test_default.py<gh_stars>1-10 from ansible_vault import Vault from f5.bigip import ManagementRoot def test_default(host): vars = host.ansible.get_variables() vault_pass = open("../../molecule/.vault_pass", "r").read().replace("\n", "") vault = Vault(vault_...
<filename>molecule/f5bigip_gtm_monitor_http/tests/test_default.py<gh_stars>1-10 from ansible_vault import Vault from f5.bigip import ManagementRoot def test_default(host): vars = host.ansible.get_variables() vault_pass = open("../../molecule/.vault_pass", "r").read().replace("\n", "") vault = Vault(vault_...
none
1
2.003715
2
hexrd/ui/powder_calibration_dialog.py
psavery/hexrdgui
0
6624400
<reponame>psavery/hexrdgui<filename>hexrd/ui/powder_calibration_dialog.py<gh_stars>0 from hexrd.ui.hexrd_config import HexrdConfig from hexrd.ui.ui_loader import UiLoader class PowderCalibrationDialog: def __init__(self, parent=None): loader = UiLoader() self.ui = loader.load_file('powder_calibra...
from hexrd.ui.hexrd_config import HexrdConfig from hexrd.ui.ui_loader import UiLoader class PowderCalibrationDialog: def __init__(self, parent=None): loader = UiLoader() self.ui = loader.load_file('powder_calibration_dialog.ui', parent) self.update_gui_from_config() self.setup_co...
none
1
1.998263
2
MinorScripts/Sort_Line/Sort_Line.py
Rickodesea/GeneralScripts
0
6624401
<filename>MinorScripts/Sort_Line/Sort_Line.py import argparse import re def readtext_lines(): with open("text.txt", "r") as f: return f.readlines(); return "" def write(name, slist): with open(name, "w") as f: for s in slist: f.write(s + "\n") def main(): arg = argparse.ArgumentParser(description='Sort Li...
<filename>MinorScripts/Sort_Line/Sort_Line.py import argparse import re def readtext_lines(): with open("text.txt", "r") as f: return f.readlines(); return "" def write(name, slist): with open(name, "w") as f: for s in slist: f.write(s + "\n") def main(): arg = argparse.ArgumentParser(description='Sort Li...
none
1
3.804686
4
samples/cli/accelbyte_py_sdk_cli/platform/_public_get_category.py
AccelByte/accelbyte-python-sdk
0
6624402
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template_file: python-cli-command.j2 # justice-platform-service (4.10.0) # pylint: disable=duplicate-co...
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template_file: python-cli-command.j2 # justice-platform-service (4.10.0) # pylint: disable=duplicate-co...
en
0.656805
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template_file: python-cli-command.j2 # justice-platform-service (4.10.0) # pylint: disable=duplicate-code ...
1.826384
2
sympy/integrals/integrals.py
skieffer/sympy
0
6624403
<reponame>skieffer/sympy from sympy.concrete.expr_with_limits import AddWithLimits from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.compatibility import is_sequence from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.function import diff from sympy.c...
from sympy.concrete.expr_with_limits import AddWithLimits from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.compatibility import is_sequence from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.function import diff from sympy.core.logic import fuzzy_bo...
en
0.819471
Represents unevaluated integral. Create an unevaluated integral. Explanation =========== Arguments are an integrand followed by one or more limits. If no limits are given and there is only one free symbol in the expression, that symbol will be used, otherwise an error will be ...
1.896061
2
tests/providers/http/operators/test_http.py
gtossou/airflow
2
6624404
# # 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...
# # 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...
en
0.836834
# # 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...
2.274054
2
jupyter_notebook_config.py
DigiKlausur/e2x-nbtools
0
6624405
<gh_stars>0 from e2x_nbtools.contents.filecheckpoints import E2XFileCheckpoints c = get_config() c.ContentsManager.checkpoints_class = E2XFileCheckpoints c.ContentsManager.checkpoints_class.number_of_checkpoints = 3
from e2x_nbtools.contents.filecheckpoints import E2XFileCheckpoints c = get_config() c.ContentsManager.checkpoints_class = E2XFileCheckpoints c.ContentsManager.checkpoints_class.number_of_checkpoints = 3
none
1
1.244221
1
example.py
elebow/confuse
257
6624406
#!/usr/bin/env python import example example.main()
#!/usr/bin/env python import example example.main()
ru
0.26433
#!/usr/bin/env python
1.277698
1
testsuite/utils/callinfo.py
itrofimow/yandex-taxi-testsuite
0
6624407
<filename>testsuite/utils/callinfo.py import asyncio import inspect import typing class BaseError(Exception): """Base exception class for this module.""" class CallQueueError(BaseError): pass class CallQueueEmptyError(CallQueueError): """Call queue is empty error.""" class CallQueueTimeoutError(Call...
<filename>testsuite/utils/callinfo.py import asyncio import inspect import typing class BaseError(Exception): """Base exception class for this module.""" class CallQueueError(BaseError): pass class CallQueueEmptyError(CallQueueError): """Call queue is empty error.""" class CallQueueTimeoutError(Call...
en
0.72873
Base exception class for this module. Call queue is empty error. Timed out while waiting for call. Function wrapper that puts information about function call into async queue. This class provides methods to wait/check function underlying function calls. Call underlying function. Clear call queue. Returns `...
2.678311
3
Tutorial/playon_fem/plotFEMDomain.py
kazulagi/plantfem_min
21
6624408
<reponame>kazulagi/plantfem_min import json import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D json_file = open('domain.json', 'r') json_object = json.load(json_file) # メッシュオブジェクト中の節点座標配列を取り出す nodcoord = np.array(json_object["mesh"]["NodCoord"]) # 以下、matplotlibで描画 #x軸とy軸にラベル付...
import json import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D json_file = open('domain.json', 'r') json_object = json.load(json_file) # メッシュオブジェクト中の節点座標配列を取り出す nodcoord = np.array(json_object["mesh"]["NodCoord"]) # 以下、matplotlibで描画 #x軸とy軸にラベル付け fig = plt.figure() ax = Axes3D...
ja
0.986686
# メッシュオブジェクト中の節点座標配列を取り出す # 以下、matplotlibで描画 #x軸とy軸にラベル付け # 節点を描画 # 図を表示
2.880128
3
pypi-tools/examples/example-package/tests/test.py
strangeworks/cloud-builders-community
0
6624409
from myPackage import somePython def test_fahrToKelv(): ''' make sure freezing is calculated correctly ''' assert somePython.fahrToKelv(32) == 273.15, 'incorrect freezing point!'
from myPackage import somePython def test_fahrToKelv(): ''' make sure freezing is calculated correctly ''' assert somePython.fahrToKelv(32) == 273.15, 'incorrect freezing point!'
en
0.971626
make sure freezing is calculated correctly
2.555982
3
pyroomacoustics/denoise/spectral_subtraction.py
HemaZ/pyroomacoustics
1
6624410
<reponame>HemaZ/pyroomacoustics # Single Channel Noise Removal using Spectral Subtraction # Copyright (C) 2019 <NAME>, <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restri...
# Single Channel Noise Removal using Spectral Subtraction # Copyright (C) 2019 <NAME>, <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitat...
en
0.778641
# Single Channel Noise Removal using Spectral Subtraction # Copyright (C) 2019 <NAME>, <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitat...
2.237237
2
Tools/scripts/patchcheck.py
jaswdr/cpython
1
6624411
#!/usr/bin/env python3 """Check proposed changes for common issues.""" import re import sys import shutil import os.path import subprocess import sysconfig import reindent import untabify # Excluded directories which are copies of external libraries: # don't check their coding style EXCLUDE_DIRS = [os.path.join('Mod...
#!/usr/bin/env python3 """Check proposed changes for common issues.""" import re import sys import shutil import os.path import subprocess import sysconfig import reindent import untabify # Excluded directories which are copies of external libraries: # don't check their coding style EXCLUDE_DIRS = [os.path.join('Mod...
en
0.842187
#!/usr/bin/env python3 Check proposed changes for common issues. # Excluded directories which are copies of external libraries: # don't check their coding style Return 'N file(s)' with the proper plurality on 'file'. Decorator to output status info to stdout. Get the symbolic name for the current git branch Get the rem...
2.119668
2
apps/simple_history.py
kevingduck/transmission
19
6624412
<gh_stars>10-100 """ Copyright 2019 ShipChain, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
""" Copyright 2019 ShipChain, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
en
0.831746
Copyright 2019 ShipChain, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
1.764202
2
fdia_simulation/tests/filters/test_filters_ta.py
QDucasse/FDIA_simulation
7
6624413
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Mon Jul 22 09:19:36 2019 @author: qde """ import unittest import numpy as np from pprint import pprint from copy import deepcopy from math import sqrt,atan2, exp from nose.tools import raises from numpy.linalg ...
# -*- coding: utf-8 -*- """ Created on Mon Jul 22 09:19:36 2019 @author: qde """ import unittest import numpy as np from pprint import pprint from copy import deepcopy from math import sqrt,atan2, exp from nose.tools import raises from numpy.linalg import ...
en
0.436819
# -*- coding: utf-8 -*- Created on Mon Jul 22 09:19:36 2019 @author: qde # ========================================================================== # ========================= Initialization tests =========================== # ========================================================================== # =============...
2.291819
2
gas/outside_solution.py
corbinmcneill/codejam
0
6624414
#!/usr/bin/env python3 # Round 1C 2012 import sys from fractions import Fraction from math import sqrt line = sys.stdin.readline() fields = line.split() assert len(fields) == 1 ntc = int(fields[0]) def solve(d, a, other_car): wait_time = Fraction(0) first = True for time, distance in other_car: i...
#!/usr/bin/env python3 # Round 1C 2012 import sys from fractions import Fraction from math import sqrt line = sys.stdin.readline() fields = line.split() assert len(fields) == 1 ntc = int(fields[0]) def solve(d, a, other_car): wait_time = Fraction(0) first = True for time, distance in other_car: i...
en
0.175623
#!/usr/bin/env python3 # Round 1C 2012 #{0}:'.format(tc))
3.663368
4
01_syntax/09_set.py
amamov/Pythonic
2
6624415
#### set : 데이터의 중복이 없고 순서가 없다. 데이터의 중복을 확인할때 주로 많이 사용하는 자료형이다. #### 순서(X), 중복(X), 수정(O), 삭제(O) """ 교집합 연산 : & ex) set1 & set2 합집합 연산 : | ex) set1 | set2 차집합 연산 : - """ my_set_1 = set((1, 2, 3)) my_set_2 = set((3, 4, 5)) print(my_set_1) # {1, 2, 3} print(my_set_1 & my_set_2) # {3} print(my_set_1 | my_set_2) # ...
#### set : 데이터의 중복이 없고 순서가 없다. 데이터의 중복을 확인할때 주로 많이 사용하는 자료형이다. #### 순서(X), 중복(X), 수정(O), 삭제(O) """ 교집합 연산 : & ex) set1 & set2 합집합 연산 : | ex) set1 | set2 차집합 연산 : - """ my_set_1 = set((1, 2, 3)) my_set_2 = set((3, 4, 5)) print(my_set_1) # {1, 2, 3} print(my_set_1 & my_set_2) # {3} print(my_set_1 | my_set_2) # ...
ko
0.997709
#### set : 데이터의 중복이 없고 순서가 없다. 데이터의 중복을 확인할때 주로 많이 사용하는 자료형이다. #### 순서(X), 중복(X), 수정(O), 삭제(O) 교집합 연산 : & ex) set1 & set2 합집합 연산 : | ex) set1 | set2 차집합 연산 : - # {1, 2, 3} # {3} # {1, 2, 3, 4, 5} # {1, 2} # 추가 # {18, 1, 2, 3} # 제거 # {1, 2, 3}
4.185008
4
hello-strongbox-pypi/setup.py
BjoernAkAManf/strongbox-examples
0
6624416
<filename>hello-strongbox-pypi/setup.py<gh_stars>0 from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="hello-world-pypi", packages = ['hello-world-pypi'], license='Apache 2.0', version="1.0.0", author="<NAME>", author_email="<EMAIL>", ...
<filename>hello-strongbox-pypi/setup.py<gh_stars>0 from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="hello-world-pypi", packages = ['hello-world-pypi'], license='Apache 2.0', version="1.0.0", author="<NAME>", author_email="<EMAIL>", ...
none
1
1.845983
2
volview/slice_widget.py
cmbruns/volview
0
6624417
import math from PySide6 import QtCore, QtGui, QtWidgets from PySide6.QtCore import Qt class SliceWidget(QtWidgets.QWidget): """ Canvas widget showing 2D slice of volume rendering stuff. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.eye_im...
import math from PySide6 import QtCore, QtGui, QtWidgets from PySide6.QtCore import Qt class SliceWidget(QtWidgets.QWidget): """ Canvas widget showing 2D slice of volume rendering stuff. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.eye_im...
en
0.608695
Canvas widget showing 2D slice of volume rendering stuff. # enable hover for mouseMoveEvent # print(self.angle) # print("paintEvent") # view ray # picture of eye
2.731307
3
setup.py
lrq3000/fdict
8
6624418
<reponame>lrq3000/fdict #!/usr/bin/env python # -*- coding: utf-8 -*- import os try: from setuptools import setup except ImportError: from distutils.core import setup import sys from subprocess import check_call from io import open as io_open # For Makefile parsing import shlex try: # pragma: no cover im...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os try: from setuptools import setup except ImportError: from distutils.core import setup import sys from subprocess import check_call from io import open as io_open # For Makefile parsing import shlex try: # pragma: no cover import ConfigParser im...
en
0.794776
#!/usr/bin/env python # -*- coding: utf-8 -*- # For Makefile parsing # pragma: no cover # pragma: no cover # Makefile auxiliary functions # Parse a makefile to find commands and substitute variables. Expects a makefile with only aliases and a line return between each command. Returns a dict, with a list of com...
2.188389
2
tools/wraptypes/preprocessor.py
regular/pyglet-avbin-optimizations
2
6624419
#!/usr/bin/env python '''Preprocess a C source file. Limitations: * Whitespace is not preserved. * # and ## operators not handled. Reference is C99: * http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf * Also understands Objective-C #import directive * Also understands GNU #include_next ''' __doc...
#!/usr/bin/env python '''Preprocess a C source file. Limitations: * Whitespace is not preserved. * # and ## operators not handled. Reference is C99: * http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf * Also understands Objective-C #import directive * Also understands GNU #include_next ''' __doc...
en
0.470174
#!/usr/bin/env python Preprocess a C source file. Limitations: * Whitespace is not preserved. * # and ## operators not handled. Reference is C99: * http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf * Also understands Objective-C #import directive * Also understands GNU #include_next # Helper: subst...
1.915795
2
q3/q3/bootstrap/tests/benSAP1/cpu_D_latch_8bitreg_ei_test.py
virtimus/makaronLab
2
6624420
from q3.api import * import q3.bootstrap.tests.benSAP1.common as cmn import q3.bootstrap.tests.benSAP1.cpu_D_latch_8bitreg_ei as reg8bit if __name__ == '__main__': modv = modvAdd('testtt1') m =modv.module() m1 = reg8bit.makeDlatch8bitregEI('cpu-D-latch-8bitreg-ei1',m) m2 = reg8bit.makeDlatch8bitregEI...
from q3.api import * import q3.bootstrap.tests.benSAP1.common as cmn import q3.bootstrap.tests.benSAP1.cpu_D_latch_8bitreg_ei as reg8bit if __name__ == '__main__': modv = modvAdd('testtt1') m =modv.module() m1 = reg8bit.makeDlatch8bitregEI('cpu-D-latch-8bitreg-ei1',m) m2 = reg8bit.makeDlatch8bitregEI...
zh
0.097471
#mod('cpu-D-latch-8bitreg-ei1').n('8O').setIntSignalAsDrive()
1.798779
2
deeprobust/image/netmodels/train_model.py
CrownX/DeepRobust
3
6624421
""" This function help to train model of different archtecture easily. Select model archtecture and training data, then output corresponding model. """ from __future__ import print_function import os import argparse import torch import torch.nn as nn import torch.nn.functional as F #233 import torch.optim as optim fro...
""" This function help to train model of different archtecture easily. Select model archtecture and training data, then output corresponding model. """ from __future__ import print_function import os import argparse import torch import torch.nn as nn import torch.nn.functional as F #233 import torch.optim as optim fro...
en
0.288343
This function help to train model of different archtecture easily. Select model archtecture and training data, then output corresponding model. #233 train. Parameters ---------- model : model(option:'CNN', 'ResNet18', 'ResNet34', 'ResNet50', 'densenet', 'vgg11', 'vgg13', 'vgg16', 'vgg19') data ...
3.114006
3
World/Object/Unit/Constants/NPCFlags.py
sundayz/idewave-core
10
6624422
<reponame>sundayz/idewave-core from enum import Enum class NPCFlags(Enum): NONE = 0 GOSSIP = 1 QUESTGIVER = 2 VENDOR = 4 FLIGHTMASTER = 8 TRAINER = 16 SPIRITHEALER = 32 SPIRITGUIDE = 64 INNKEEPER ...
from enum import Enum class NPCFlags(Enum): NONE = 0 GOSSIP = 1 QUESTGIVER = 2 VENDOR = 4 FLIGHTMASTER = 8 TRAINER = 16 SPIRITHEALER = 32 SPIRITGUIDE = 64 INNKEEPER = 128 BANKER ...
none
1
1.782918
2
Calculadora de IMC.py
wobegone/Calculadora_de_IMC
0
6624423
<reponame>wobegone/Calculadora_de_IMC peso = int(input('¿Cuál es tu peso?(en kg): ')) altura = int(input('¿Cuál es tu altura?(en cm): ')) altura2 = altura / 100 imc = peso / ((altura2) ** 2) total = round(imc,2) print('Tu índice de masa corporal es '+str(total)) #incluido if total >= 18 and total < 25: print('Tu I...
peso = int(input('¿Cuál es tu peso?(en kg): ')) altura = int(input('¿Cuál es tu altura?(en cm): ')) altura2 = altura / 100 imc = peso / ((altura2) ** 2) total = round(imc,2) print('Tu índice de masa corporal es '+str(total)) #incluido if total >= 18 and total < 25: print('Tu IBM está normal') elif total >= 25: ...
none
1
3.723524
4
parsl/monitoring/visualization/plots/default/workflow_resource_plots.py
aquanauts/parsl
0
6624424
<reponame>aquanauts/parsl import math import numpy as np import pandas as pd import plotly.graph_objs as go from plotly.offline import plot def resource_distribution_plot(df_resources, df_task, type='psutil_process_time_user', label='CPU Time Distribution', option='avg', columns=20,): # E.g., psutil_process_time_...
import math import numpy as np import pandas as pd import plotly.graph_objs as go from plotly.offline import plot def resource_distribution_plot(df_resources, df_task, type='psutil_process_time_user', label='CPU Time Distribution', option='avg', columns=20,): # E.g., psutil_process_time_user or psutil_process_mem...
en
0.874965
# E.g., psutil_process_time_user or psutil_process_memory_percent # skip tasks with no running start time.
2.697743
3
ucsmsdk/mometa/trig/TrigLocalAbsWindow.py
anoop1984/python_sdk
0
6624425
<reponame>anoop1984/python_sdk """This module contains the general information for TrigLocalAbsWindow ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class TrigLocalAbsWindowConsts(): CONCUR_CAP_U...
"""This module contains the general information for TrigLocalAbsWindow ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class TrigLocalAbsWindowConsts(): CONCUR_CAP_UNLIMITED = "unlimited" PROC...
en
0.350234
This module contains the general information for TrigLocalAbsWindow ManagedObject. This is TrigLocalAbsWindow class. ((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1} ([0-9]){4}-([0-9]){2}-([0-9]){2}T([0-9]){2}:([0-9]){2}:([0-9]){2}((\.([0-9]){3})){0,1} [\-\.:_a-zA-Z0-9]{0,16} [0-9]+:(...
1.909034
2
python/ray/tests/test_memstat.py
dsctt/ray
1
6624426
import numpy as np import os import time import pytest import ray from ray.cluster_utils import Cluster, cluster_not_supported from ray.internal.internal_api import memory_summary # RayConfig to enable recording call sites during ObjectRej creations. ray_config = {"record_ref_creation_sites": True} # Unique strings....
import numpy as np import os import time import pytest import ray from ray.cluster_utils import Cluster, cluster_not_supported from ray.internal.internal_api import memory_summary # RayConfig to enable recording call sites during ObjectRej creations. ray_config = {"record_ref_creation_sites": True} # Unique strings....
en
0.778435
# RayConfig to enable recording call sites during ObjectRej creations. # Unique strings. # Reference status. # Call sites. # Only 22 characters can be matched because longer strings are wrapped around. # Group by and sort by parameters. # Task argument plus task return ids. # Note, the actor will always hold a handle t...
2.225714
2
core/completion.py
gnprice/oil
0
6624427
#!/usr/bin/env python # Copyright 2016 <NAME>. 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 """ completion.py - Tab comp...
#!/usr/bin/env python # Copyright 2016 <NAME>. 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 """ completion.py - Tab comp...
en
0.870563
#!/usr/bin/env python # Copyright 2016 <NAME>. 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 completion.py - Tab completi...
1.854989
2
monai/transforms/spatial/dictionary.py
ajabri/MONAI
1
6624428
<filename>monai/transforms/spatial/dictionary.py<gh_stars>1-10 # Copyright 2020 - 2021 MONAI Consortium # 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/LICE...
<filename>monai/transforms/spatial/dictionary.py<gh_stars>1-10 # Copyright 2020 - 2021 MONAI Consortium # 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/LICE...
en
0.651416
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
1.524124
2
habitat_baselines/rl/ppo/policy.py
tommyz94/objectnav
0
6624429
<reponame>tommyz94/objectnav #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import abc from typing import Dict import numpy as np from gym import spaces import torch f...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import abc from typing import Dict import numpy as np from gym import spaces import torch from torch import nn as nn fro...
en
0.768273
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. Sequential, but with annotation for JIT compatibility in forwarding of dict # copied from sequential # The following confi...
2.235401
2
filu/apps.py
pythonmentor/teiva-p11
0
6624430
<filename>filu/apps.py from django.apps import AppConfig class FiluConfig(AppConfig): name = "filu"
<filename>filu/apps.py from django.apps import AppConfig class FiluConfig(AppConfig): name = "filu"
none
1
1.305364
1
dripy/survey.py
bthornton191/drilling
0
6624431
<reponame>bthornton191/drilling<gh_stars>0 import pandas from numpy import arange from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from thornpy import plotting class SurveyData(): """Stores data from a well survey. Parameters ---------- filename : str Filename of ra...
import pandas from numpy import arange from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from thornpy import plotting class SurveyData(): """Stores data from a well survey. Parameters ---------- filename : str Filename of raw survey data file. Can be in excel format...
en
0.513307
Stores data from a well survey. Parameters ---------- filename : str Filename of raw survey data file. Can be in excel format or csv format. vendor : str Vendor that produced the file. This determines the expected format of the file. For options see the keys of :attr:`VENDOR_SETT...
3.040629
3
djangoserver/server/logic/graph/test_example.py
simonneuville/runamic_server
1
6624432
from django.test import TestCase from server.logic.graph.graph import Graph from server.logic.graph.poison import PoisonedGraph class TestExample(TestCase): """ Example of how to use this graph library Please read this carefully if you're going to work with it. """ """ While this e...
from django.test import TestCase from server.logic.graph.graph import Graph from server.logic.graph.poison import PoisonedGraph class TestExample(TestCase): """ Example of how to use this graph library Please read this carefully if you're going to work with it. """ """ While this e...
en
0.955293
Example of how to use this graph library Please read this carefully if you're going to work with it. While this example is still useful in understanding how the graph works, the example itself does not work anymore, since the ffi boundary screwed dynamic graph entries. Check the Rust tes...
2.862687
3
library/periphery.py
lompal/USBIPManager
24
6624433
<filename>library/periphery.py from library import bar, compatibility, config, ini, lang, log, queue from os import path from json import load from threading import Thread, Event from asyncio import get_event_loop, sleep from PyQt5.QtCore import Qt from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QLabel, QWid...
<filename>library/periphery.py from library import bar, compatibility, config, ini, lang, log, queue from os import path from json import load from threading import Thread, Event from asyncio import get_event_loop, sleep from PyQt5.QtCore import Qt from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QLabel, QWid...
en
0.666954
# noinspection PyPep8Naming, PyMethodMayBeStatic Base class for periphery manager Function template for separator instance Peripheral action separator - generator Global peripheral action separator - dummy function to resolve reference issue Local peripheral action separator - dummy function to resolve reference issue ...
2.236718
2
main_seq2seq.py
saparina/SeaRNN-open
47
6624434
import argparse import random from itertools import chain import numpy as np import torch.backends.cudnn import optimization import train from datasets.conll import ConllDataset from datasets.nmt import NmtDataset from datasets.ocr import OcrDataset from evaluation.logging_utils import restore_from_checkpoint from mo...
import argparse import random from itertools import chain import numpy as np import torch.backends.cudnn import optimization import train from datasets.conll import ConllDataset from datasets.nmt import NmtDataset from datasets.ocr import OcrDataset from evaluation.logging_utils import restore_from_checkpoint from mo...
en
0.612064
Entry point. # dataset # CONLL specific settings # model # training approach # labels sampling # optimization # parameters of the schedule to anneal learning rate # logging # misc # set this to use faster convolutions # print all the options # random seed # load the dataset # function to init params # encoder # decoder...
2.168174
2
libs/util/decorators.py
chicosilva/csms
0
6624435
<gh_stars>0 # coding=utf-8 def threaded(func): from threading import Thread from functools import wraps @wraps(func) def async_func(*args, **kwargs): func_hl = Thread(target = func, args = args, kwargs = kwargs) func_hl.start() return func_hl return async_func
# coding=utf-8 def threaded(func): from threading import Thread from functools import wraps @wraps(func) def async_func(*args, **kwargs): func_hl = Thread(target = func, args = args, kwargs = kwargs) func_hl.start() return func_hl return async_func
en
0.644078
# coding=utf-8
2.954667
3
HSM/utils/db.py
18F/10x-MLaaS
13
6624436
<filename>HSM/utils/db.py from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, JSON, Integer, String, ForeignKey from sqlalchemy.orm import relationship, sessionmaker from utils.config import SQLALCHEMY_URI Base = declarative_base() class DataAcc...
<filename>HSM/utils/db.py from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, JSON, Integer, String, ForeignKey from sqlalchemy.orm import relationship, sessionmaker from utils.config import SQLALCHEMY_URI Base = declarative_base() class DataAcc...
none
1
2.506149
3
EigVal.py
OceanNuclear/Statistics
0
6624437
<reponame>OceanNuclear/Statistics<gh_stars>0 import numpy as np import matplotlib.pyplot as plt import numpy.random as rn from numpy import array as ary from numpy import sqrt from numpy.linalg import svd, eig, eigvals, inv, pinv def set_offdiag(mat, triu, inplace=True): '''sets the off-diagonal elements o...
import numpy as np import matplotlib.pyplot as plt import numpy.random as rn from numpy import array as ary from numpy import sqrt from numpy.linalg import svd, eig, eigvals, inv, pinv def set_offdiag(mat, triu, inplace=True): '''sets the off-diagonal elements of a symmetric matrix when the top triangle's ...
en
0.672509
sets the off-diagonal elements of a symmetric matrix when the top triangle's values are given. # equal aspect ratio
2.888093
3
PaddleCV/rcnn/infer.py
XiaoguangHu01/models
4
6624438
<reponame>XiaoguangHu01/models<gh_stars>1-10 # Copyright (c) 2018 PaddlePaddle 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/li...
# Copyright (c) 2018 PaddlePaddle 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 app...
en
0.851415
# Copyright (c) 2018 PaddlePaddle 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 app...
2.019158
2
test/io_tests/tunnel_test.py
gr0vity-dev/xknx
0
6624439
"""Unit test for KNX/IP Tunnelling Request/Response.""" import asyncio from unittest.mock import AsyncMock, Mock, patch import pytest from xknx import XKNX from xknx.dpt import DPTArray from xknx.io import Tunnel from xknx.knxip import ( HPAI, CEMIFrame, ConnectRequest, ConnectResponse, DisconnectR...
"""Unit test for KNX/IP Tunnelling Request/Response.""" import asyncio from unittest.mock import AsyncMock, Mock, patch import pytest from xknx import XKNX from xknx.dpt import DPTArray from xknx.io import Tunnel from xknx.knxip import ( HPAI, CEMIFrame, ConnectRequest, ConnectResponse, DisconnectR...
en
0.691568
Unit test for KNX/IP Tunnelling Request/Response. Test class for xknx/io/Tunnel objects. Set up test class. # pylint: disable=attribute-defined-outside-init Test Tunnel for calling send_ack on normal frames. # LDataInd GroupValueWrite from 1.1.22 to to 5/1/22 with DPT9 payload 0C 3F # communication_channel_id: 0x02 s...
2.38469
2
Example_Reddit_Bot2_Crosspost.py
Roibal/Reddit-Twitter-Social-Media-Bots
15
6624440
""" The purpose of this bot is to repost high-quality content to various subreddits """ import praw import time import random #Create Bot1 with login and private key - username - password bot1 = praw.Reddit(user_agent='crosspost_bot1 v0.1', client_id='', client_secret='', username='', password='') ...
""" The purpose of this bot is to repost high-quality content to various subreddits """ import praw import time import random #Create Bot1 with login and private key - username - password bot1 = praw.Reddit(user_agent='crosspost_bot1 v0.1', client_id='', client_secret='', username='', password='') ...
en
0.904268
The purpose of this bot is to repost high-quality content to various subreddits #Create Bot1 with login and private key - username - password #Create List of topics to search for (cryptocurrency) #Create List of Subreddits to post content from #Create List of crossposted titles #Time in seconds to pause between crosspo...
3.250826
3
resizeimage/apps.py
gilvanti/resize_image
0
6624441
from django.apps import AppConfig class ResizeimageConfig(AppConfig): name = 'resizeimage'
from django.apps import AppConfig class ResizeimageConfig(AppConfig): name = 'resizeimage'
none
1
1.170072
1
partname_resolver/units/capacitanceTolerance.py
sakoPO/partname-resolver
0
6624442
<reponame>sakoPO/partname-resolver from decimal import Decimal from .range_base import RangeBase from partname_resolver.units.capacitance import Capacitance class Tolerance(RangeBase): def __init__(self, tolerance_min, tolerance_max=None): if tolerance_max is None: if tolerance_min.find('%') !...
from decimal import Decimal from .range_base import RangeBase from partname_resolver.units.capacitance import Capacitance class Tolerance(RangeBase): def __init__(self, tolerance_min, tolerance_max=None): if tolerance_max is None: if tolerance_min.find('%') != -1: self.is_relat...
none
1
2.850926
3
sale_order_payment_mode/__manifest__.py
odooerpdevelopers/odoo14-addons
1
6624443
<filename>sale_order_payment_mode/__manifest__.py # -*- coding: utf-8 -*- { 'name': "Modo de pago en Sale Order", 'summary': """ Modulo de prueba para el curso de Odoo 14 """, 'description': """ Modulo de prueba para el curso de Odoo 14 """, 'author': "<NAME>", 'website...
<filename>sale_order_payment_mode/__manifest__.py # -*- coding: utf-8 -*- { 'name': "Modo de pago en Sale Order", 'summary': """ Modulo de prueba para el curso de Odoo 14 """, 'description': """ Modulo de prueba para el curso de Odoo 14 """, 'author': "<NAME>", 'website...
es
0.843335
# -*- coding: utf-8 -*- Modulo de prueba para el curso de Odoo 14 Modulo de prueba para el curso de Odoo 14 # always loaded
0.751588
1
tests/testunits/testdevices/testadbdevice/testadbdevice.py
rsnakamura/oldape
0
6624444
from unittest import TestCase from mock import MagicMock from nose.tools import raises from apetools.devices import adbdevice LOG_MESSAGE = "how now frau cow" class AdbDeviceTest(TestCase): def setUp(self): self.connection = MagicMock() self.adbdevice = adbdevice.AdbDevice(self.connection) ...
from unittest import TestCase from mock import MagicMock from nose.tools import raises from apetools.devices import adbdevice LOG_MESSAGE = "how now frau cow" class AdbDeviceTest(TestCase): def setUp(self): self.connection = MagicMock() self.adbdevice = adbdevice.AdbDevice(self.connection) ...
en
0.400913
# end class AdbDeviceTest
2.695653
3
pygsp/graphs/nngraphs/bunny.py
jafluri/pygsp
341
6624445
<gh_stars>100-1000 # -*- coding: utf-8 -*- from pygsp import utils from pygsp.graphs import NNGraph # prevent circular import in Python < 3.5 class Bunny(NNGraph): r"""Stanford bunny (NN-graph). References ---------- See :cite:`turk1994zippered`. Examples -------- >>> import matplotlib...
# -*- coding: utf-8 -*- from pygsp import utils from pygsp.graphs import NNGraph # prevent circular import in Python < 3.5 class Bunny(NNGraph): r"""Stanford bunny (NN-graph). References ---------- See :cite:`turk1994zippered`. Examples -------- >>> import matplotlib.pyplot as plt ...
en
0.484385
# -*- coding: utf-8 -*- # prevent circular import in Python < 3.5 Stanford bunny (NN-graph). References ---------- See :cite:`turk1994zippered`. Examples -------- >>> import matplotlib.pyplot as plt >>> G = graphs.Bunny() >>> fig = plt.figure() >>> ax1 = fig.add_subplot(121) >>...
3.159535
3
visualization.py
naikshubham/Tensorboard-Visualization
1
6624446
import os,cv2 import numpy as np import matplotlib.pyplot as plt import pickle import tensorflow as tf from tensorflow.contrib.tensorboard.plugins import projector tf.__version__ PATH = 'D:/Projects/tensorboard/tensorboard_printedVshandwritten/' LOG_DIR = PATH+ 'embedding-logs/' #metadata = os.path.join(LOG_DIR, 'met...
import os,cv2 import numpy as np import matplotlib.pyplot as plt import pickle import tensorflow as tf from tensorflow.contrib.tensorboard.plugins import projector tf.__version__ PATH = 'D:/Projects/tensorboard/tensorboard_printedVshandwritten/' LOG_DIR = PATH+ 'embedding-logs/' #metadata = os.path.join(LOG_DIR, 'met...
en
0.639644
#metadata = os.path.join(LOG_DIR, 'metadata2.tsv') #%% #with open(metadata, 'w') as metadata_file: # for row in range(210): # c = y[row] # metadata_file.write('{}\n'.format(c)) # num of samples in each class #for i in range(210): # metadata_file.write('%06d\t%s\n' % (i, names[y[i]])) #metadata_file....
2.678783
3
src/luminol/__init__.py
nevinkjohn/luminol
1,042
6624447
<gh_stars>1000+ # coding=utf-8 """ © 2015 LinkedIn Corp. 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 applicabl...
# coding=utf-8 """ © 2015 LinkedIn Corp. 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 law or agreed ...
en
0.834887
# coding=utf-8 © 2015 LinkedIn Corp. 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 law or agreed to i...
2.588281
3
twitter/oauth.py
igeeker/v2ex
161
6624448
<gh_stars>100-1000 # coding=utf-8 """ The MIT License Copyright (c) 2007 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
# coding=utf-8 """ The MIT License Copyright (c) 2007 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
en
0.67629
# coding=utf-8 The MIT License Copyright (c) 2007 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
2.538307
3
mltk/rl/replay.py
lqf96/mltk
0
6624449
from typing import Generic, Optional from mltk.types.gym import Env import torch as th from sortedcontainers import SortedList import mltk.util as mu from mltk.adt import Deque, RecDeque, RecDequeSchema from .types import Transition __all__ = [ "ReplayBuffer" ] class ReplayBuffer(): def __init__(self, env: ...
from typing import Generic, Optional from mltk.types.gym import Env import torch as th from sortedcontainers import SortedList import mltk.util as mu from mltk.adt import Deque, RecDeque, RecDequeSchema from .types import Transition __all__ = [ "ReplayBuffer" ] class ReplayBuffer(): def __init__(self, env: ...
en
0.837288
# Data type for observation and action space # Data schema of the replay buffer # type: ignore # Experience buffer # Capacity of the replay buffer is always bounded # Add experience to buffer # Record begin of an episode # Update number of steps # Current replay buffer size # Offset between number of steps and indices ...
2.070978
2
bert_e/server/webhook.py
scality/bert-e
0
6624450
<reponame>scality/bert-e<filename>bert_e/server/webhook.py # Copyright 2016-2018 Scality # # 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 2016-2018 Scality # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
en
0.780689
# Copyright 2016-2018 Scality # # 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,...
1.916589
2