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
contrib/buildrefactor/tests/python/pants_test/contrib/buildrefactor/test_meta_rename_integration.py
revl/pants
1
6626151
<reponame>revl/pants<filename>contrib/buildrefactor/tests/python/pants_test/contrib/buildrefactor/test_meta_rename_integration.py # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.testutil.pants_run_integration_test import Pant...
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest class MetaRenameIntegrationTest(PantsRunIntegrationTest): def test_meta_rename(self): pre_depen...
en
0.528453
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE).
2.034334
2
setup.py
didorothy/coverage-badge
0
6626152
<filename>setup.py from setuptools import setup readme = open('README.rst').read() setup(name='coverage-badge', version='1.0.2', description='Generate coverage badges for Coverage.py.', author='<NAME>', author_email='<EMAIL>', url='https://github.com/dbrgn/coverage-badge', install_...
<filename>setup.py from setuptools import setup readme = open('README.rst').read() setup(name='coverage-badge', version='1.0.2', description='Generate coverage badges for Coverage.py.', author='<NAME>', author_email='<EMAIL>', url='https://github.com/dbrgn/coverage-badge', install_...
none
1
1.099869
1
src/corpus2csv.py
tiefenauer/ip9
4
6626153
import argparse import random from datetime import timedelta from operator import getitem from os import listdir, makedirs, remove from os.path import join, exists, getsize import h5py import librosa import numpy as np import pandas as pd import soundfile as sf from python_speech_features import mfcc from scipy.io imp...
import argparse import random from datetime import timedelta from operator import getitem from os import listdir, makedirs, remove from os.path import join, exists, getsize import h5py import librosa import numpy as np import pandas as pd import soundfile as sf from python_speech_features import mfcc from scipy.io imp...
en
0.660585
Export speech segments of corpus to CSV files and synthesize data WARNING: target directory {target_dir} already exists. Override? (this will overwrite all existing files in {target_dir} with the same names!!!) (Y/n) # (num_timesteps x num_features)
2.161662
2
chj/pyserver/flask_app.py
kestreltechnology/CodeHawk-Java
0
6626154
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: <NAME> # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-2020 Kestrel Technology LLC # Copyright (c) 2021 <NAME> # # Pe...
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: <NAME> # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-2020 Kestrel Technology LLC # Copyright (c) 2021 <NAME> # # Pe...
en
0.425344
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: <NAME> # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-2020 Kestrel Technology LLC # Copyright (c) 2021 <NAME> # # Pe...
1.353099
1
scripts/create_icons.py
tdmorello/imagecatalog
0
6626155
"""Script to create a set of images.""" import random from pathlib import Path from random import randrange from typing import List, Tuple, Union from PIL import Image, ImageDraw PathLike = Union[str, bytes, Path] def make_random_image(im_size, single_color=None): def get_random_hex(): return f"#{randr...
"""Script to create a set of images.""" import random from pathlib import Path from random import randrange from typing import List, Tuple, Union from PIL import Image, ImageDraw PathLike = Union[str, bytes, Path] def make_random_image(im_size, single_color=None): def get_random_hex(): return f"#{randr...
en
0.723258
Script to create a set of images.
3.430656
3
docs/extensions/promises.py
stephendwolff/django-localflavor
0
6626156
<gh_stars>0 try: from django.utils.encoding import force_unicode except ImportError: # We are on Python 3, force_text is force_unicode. from django.utils.encoding import force_text as force_unicode from django.utils.functional import Promise from sphinx.util.inspect import object_description list_or_tupl...
try: from django.utils.encoding import force_unicode except ImportError: # We are on Python 3, force_text is force_unicode. from django.utils.encoding import force_text as force_unicode from django.utils.functional import Promise from sphinx.util.inspect import object_description list_or_tuple = lambda x...
en
0.658266
# We are on Python 3, force_text is force_unicode. # noqa
2.15318
2
AutotestWebD/apps/mock_server/views/http_interface_debug.py
yangjourney/sosotest
422
6626157
from django.shortcuts import render,HttpResponse from apps.interface.services.HTTP_interface_debugService import HTTP_interfaceDebugService from apps.common.func.CommonFunc import * from apps.common.func.LanguageFunc import * from apps.common.helper.ApiReturn import ApiReturn from AutotestWebD import settings import js...
from django.shortcuts import render,HttpResponse from apps.interface.services.HTTP_interface_debugService import HTTP_interfaceDebugService from apps.common.func.CommonFunc import * from apps.common.func.LanguageFunc import * from apps.common.helper.ApiReturn import ApiReturn from AutotestWebD import settings import js...
en
0.067893
#初始设置接口debug的时间是1小时 # debugId = HTTP_interfaceDebugService.interfaceDebugAdd(data,request.session.get("loginName")).id # return HttpResponse(ApiReturn(ApiReturn.CODE_OK,langDict['web']['httpInterfaceDebugAdd'],str(debugId)).toJson()) #aaabbb # HTTP_interfaceDebugService.setDebugFail(request.session.get("loginName"),deb...
1.958606
2
nempy/market_constraints.py
bje-/nempy
0
6626158
<gh_stars>0 from nempy import helper_functions as hf import pandas as pd def energy(demand, next_constraint_id): """Create the constraints that ensure the amount of supply dispatched in each region equals demand. If only one region exists then the constraint will be of the form: unit 1 output + unit...
from nempy import helper_functions as hf import pandas as pd def energy(demand, next_constraint_id): """Create the constraints that ensure the amount of supply dispatched in each region equals demand. If only one region exists then the constraint will be of the form: unit 1 output + unit 2 output +....
en
0.665062
Create the constraints that ensure the amount of supply dispatched in each region equals demand. If only one region exists then the constraint will be of the form: unit 1 output + unit 2 output +. . .+ unit n output = region demand If multiple regions exist then a constraint will ne created for each ...
3.863979
4
pretraining.py
gregsherrid/docker_bert_as_service
1
6626159
from bert_serving.client import BertClient bc = BertClient(check_length=False) txt = input("Name output file: ") txt +='.txt' encoded_array = bc.encode(["The antagonist in the test is Julian. Julian is the antagonist because he was a bully to Auggie through the entire school year and anybody who is as mean as Julian...
from bert_serving.client import BertClient bc = BertClient(check_length=False) txt = input("Name output file: ") txt +='.txt' encoded_array = bc.encode(["The antagonist in the test is Julian. Julian is the antagonist because he was a bully to Auggie through the entire school year and anybody who is as mean as Julian...
none
1
3.165273
3
splider.py
lyc-123/audioStory
0
6626160
<filename>splider.py import requests import urllib import re import os import time class YsSpider: def __init__(self, name): self.search_name = name self.search_url = "http://www.ting89.com/search.asp?searchword=" self.home_url = "http://www.ting89.com/books/" self.index_pattern = r"...
<filename>splider.py import requests import urllib import re import os import time class YsSpider: def __init__(self, name): self.search_name = name self.search_url = "http://www.ting89.com/search.asp?searchword=" self.home_url = "http://www.ting89.com/books/" self.index_pattern = r"...
zh
0.395821
<a href="/books/([0-9]+).html" title="(.+?)" target='_blank'> <a href='(/down/\?[^-]+-\d+.html)' target="_blank">(.+?)</a> url=(.*)/(.+?)\.mp3 # 返回搜索书目的id # str = input("输入你要下载的书目名称序号: ") #获取各章节list和url # 获得所有的章节的下载地址 # return result # 保存指定URL的文件 # 所有的章节对应的下载地址
3.142861
3
tests/api/endpoints/test_file_comments.py
odontomachus/seahub
0
6626161
import json from django.core.urlresolvers import reverse import seaserv from seaserv import seafile_api, ccnet_api from seahub.base.models import FileComment from seahub.notifications.models import UserNotification from seahub.test_utils import BaseTestCase from seahub.file_participants.models import FileParticipant ...
import json from django.core.urlresolvers import reverse import seaserv from seaserv import seafile_api, ccnet_api from seahub.base.models import FileComment from seahub.notifications.models import UserNotification from seahub.test_utils import BaseTestCase from seahub.file_participants.models import FileParticipant ...
en
0.70325
# share repo and add participant
2.244789
2
ex073.py
jgabriel1607/Python
0
6626162
<gh_stars>0 print('Vamos ver alguns times do Campeonato Brasileiro 2021') times = ('Palmeiras', 'Atlético-MG', 'Fortaleza', 'Bragantino', 'Athletico-PR', 'Flamengo', 'Ceará SC', 'Atlético-GO', 'Bahia', 'Corinthians', 'Fluminense', 'Santos', 'Juventude', 'Internacional', 'Cuiabá', 'Sport Recife', 'São ...
print('Vamos ver alguns times do Campeonato Brasileiro 2021') times = ('Palmeiras', 'Atlético-MG', 'Fortaleza', 'Bragantino', 'Athletico-PR', 'Flamengo', 'Ceará SC', 'Atlético-GO', 'Bahia', 'Corinthians', 'Fluminense', 'Santos', 'Juventude', 'Internacional', 'Cuiabá', 'Sport Recife', 'São Paulo', 'Amé...
pt
0.790792
Outra forma de resolver esse exercício de forma mais fácil. print('=' * 30) print(f'Lista de Times do Campeonato Brasileiro: {times}') print('=' * 30) print(f'Os 5 primeiros são {times[0:5]}') print('=' * 30) print(f'Os 4 útimos são {times[-4:]}') print('=' * 30) print(f'Em ordem alfabética ficam: {sorted(times)}') pr...
4.103332
4
movierecommender/datahandler/DataExtractors.py
apostolis1/Movie-recommender
0
6626163
<reponame>apostolis1/Movie-recommender import pandas as pd import numpy as np from movierecommender.datahandler.DbHandler import DbHandler from sqlalchemy import text import pathlib import os root_dir = pathlib.Path(__file__).parent.parent.parent.resolve() DATA_PATH = os.path.join(root_dir, "data/") class BaseExtra...
import pandas as pd import numpy as np from movierecommender.datahandler.DbHandler import DbHandler from sqlalchemy import text import pathlib import os root_dir = pathlib.Path(__file__).parent.parent.parent.resolve() DATA_PATH = os.path.join(root_dir, "data/") class BaseExtractor: def __init__(self, tsv_file=N...
en
0.782677
tconst titleType primaryTitle originalTitle isAdult startYear endYear runtimeMinutes genres E2E function that handles everything from reading the tsv to inserting in the db after filtering :return: tconst ordering nconst category job characters E2E function that handles everything from reading the tsv to insert...
2.800485
3
vc_assistance/indico_vc_assistance/util.py
OmeGak/indico-plugins-cern
4
6626164
<filename>vc_assistance/indico_vc_assistance/util.py<gh_stars>1-10 # This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2021 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. ...
<filename>vc_assistance/indico_vc_assistance/util.py<gh_stars>1-10 # This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2021 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. ...
en
0.879485
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2021 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. Check if a user can request VC assistance Check if a user is VC supp...
2.096877
2
scripts/sources/S_PredictAssess.py
dpopadic/arpmRes
6
6626165
<filename>scripts/sources/S_PredictAssess.py<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3...
<filename>scripts/sources/S_PredictAssess.py<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3...
en
0.533549
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # S_Pre...
1.924883
2
verres/architecture/layers/regu_relu.py
csxeba/Verres
0
6626166
import tensorflow as tf class TargetedL2(tf.keras.regularizers.Regularizer): def __init__(self, target_value, ord="euclidean"): self.target_value = target_value self.ord = ord def __call__(self, x): return tf.norm(self.target_value - x, ord=self.ord) class LinearPReLUInitializer(tf...
import tensorflow as tf class TargetedL2(tf.keras.regularizers.Regularizer): def __init__(self, target_value, ord="euclidean"): self.target_value = target_value self.ord = ord def __call__(self, x): return tf.norm(self.target_value - x, ord=self.ord) class LinearPReLUInitializer(tf...
none
1
2.626847
3
datasets/otbdataset.py
bit-ml/sftrackpp
1
6626167
import numpy as np from ltr.data.image_loader import jpeg4py_loader from pytracking.evaluation.data import BaseDataset, Sequence, SequenceList from pytracking.utils.load_text import load_text class OTBDataset(BaseDataset): """ OTB-2015 dataset Publication: Object Tracking Benchmark <NAME>, <N...
import numpy as np from ltr.data.image_loader import jpeg4py_loader from pytracking.evaluation.data import BaseDataset, Sequence, SequenceList from pytracking.utils.load_text import load_text class OTBDataset(BaseDataset): """ OTB-2015 dataset Publication: Object Tracking Benchmark <NAME>, <N...
en
0.665257
OTB-2015 dataset Publication: Object Tracking Benchmark <NAME>, <NAME>, and <NAME> TPAMI, 2015 http://faculty.ucmerced.edu/mhyang/papers/pami15_tracking_benchmark.pdf Download the dataset from http://cvlab.hanyang.ac.kr/tracker_benchmark/index.html # NOTE: OTB has some weird an...
2.33147
2
evaluation/models/ordering.py
airKlizz/passage-ordering
1
6626168
<gh_stars>1-10 from training.scripts.models.bart_simple import BartForSequenceOrdering from evaluation.model import Model class OrderingModel(Model): """ Class for BART for the ordering model """ def __init__( self, name, model_name, tokenizer_name, device, ...
from training.scripts.models.bart_simple import BartForSequenceOrdering from evaluation.model import Model class OrderingModel(Model): """ Class for BART for the ordering model """ def __init__( self, name, model_name, tokenizer_name, device, quantizati...
en
0.898041
Class for BART for the ordering model
2.627981
3
pygon/problem.py
TsarN/pygon
4
6626169
<gh_stars>1-10 # Copyright (c) 2019 <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, publis...
# Copyright (c) 2019 <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, publish, # distribute...
en
0.832702
# Copyright (c) 2019 <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, publish, # distribute...
2.047965
2
1_basics/3_luftballon.py
Coding-for-the-Arts/drawbot-samples
0
6626170
<filename>1_basics/3_luftballon.py """ Heissluftballon """ newPage(1000, 1000) oval(300, 400, 500, 500) rect(100, 100, 200, 200) """ - Klicke auf «run» (cmd r) - Ändere die Werte in den Klammern und klicke auf «run» (cmd r) - Wähle einen Wert aus, drücke die cmd-Taste und drücke/ziehe am Trackpad nach links/rechts...
<filename>1_basics/3_luftballon.py """ Heissluftballon """ newPage(1000, 1000) oval(300, 400, 500, 500) rect(100, 100, 200, 200) """ - Klicke auf «run» (cmd r) - Ändere die Werte in den Klammern und klicke auf «run» (cmd r) - Wähle einen Wert aus, drücke die cmd-Taste und drücke/ziehe am Trackpad nach links/rechts...
de
0.985989
Heissluftballon - Klicke auf «run» (cmd r) - Ändere die Werte in den Klammern und klicke auf «run» (cmd r) - Wähle einen Wert aus, drücke die cmd-Taste und drücke/ziehe am Trackpad nach links/rechts. - Bewege den Korb unter den Ballon.
1.879408
2
test/benchmark/throughput.py
lzjzx1122/FaaSFlow
24
6626171
<gh_stars>10-100 from typing_extensions import final from gevent import monkey; monkey.patch_all(thread=False) import requests from tqdm import tqdm import repository import gevent import uuid import time # import prepare_basic_input import sys repo = repository.Repository() speed = 400 # request / minute latency_res...
from typing_extensions import final from gevent import monkey; monkey.patch_all(thread=False) import requests from tqdm import tqdm import repository import gevent import uuid import time # import prepare_basic_input import sys repo = repository.Repository() speed = 400 # request / minute latency_results = [] workflo...
en
0.19968
# import prepare_basic_input # request / minute # print('----preparing input ', request_id, '----') # prepare_basic_input.prepare_basic_input(request_id) # print('!!!! 95%: ', results[-5], ' 99%: ', results[-1], ' !!!!') # prepare()
2.137427
2
python/torch/exp11_blocked_matrices.py
Navid-github/LAMP_benchmark
4
6626172
import logging from benchmarker import benchmark import torch as torch logger = logging.getLogger('exp11_blocked_matrices') @benchmark def blocked_solve_naive(A1, A2, B, C): C = torch.linalg.solve(torch.cat( (torch.cat((A1, torch.zeros((A1.shape[0], A1.shape[1]), dtype=torch.float64)), dim=1), t...
import logging from benchmarker import benchmark import torch as torch logger = logging.getLogger('exp11_blocked_matrices') @benchmark def blocked_solve_naive(A1, A2, B, C): C = torch.linalg.solve(torch.cat( (torch.cat((A1, torch.zeros((A1.shape[0], A1.shape[1]), dtype=torch.float64)), dim=1), t...
none
1
2.313904
2
src/dynamic_graph/sot_talos_balance/test/test_dcmZmpCopControl.py
nim65s/sot-talos-balance
0
6626173
<filename>src/dynamic_graph/sot_talos_balance/test/test_dcmZmpCopControl.py '''Test CoM admittance control as described in paper.''' from time import sleep from dynamic_graph.sot_talos_balance.utils.run_test_utils import (ask_for_confirmation, run_ft_calibration, run_test, ...
<filename>src/dynamic_graph/sot_talos_balance/test/test_dcmZmpCopControl.py '''Test CoM admittance control as described in paper.''' from time import sleep from dynamic_graph.sot_talos_balance.utils.run_test_utils import (ask_for_confirmation, run_ft_calibration, run_test, ...
en
0.760115
Test CoM admittance control as described in paper. # Python 2 # noqa # Connect ZMP reference and reset controllers # raw_input("Wait before dumping the data") # runCommandClient('dump_tracer(robot.tracer)')
2.373072
2
Algorithms/tf2algos/iqn.py
Abluceli/HRG-SAC
5
6626174
<filename>Algorithms/tf2algos/iqn.py import numpy as np import tensorflow as tf import Nn from utils.sth import sth from Algorithms.tf2algos.base.off_policy import Off_Policy from utils.expl_expt import ExplorationExploitationClass from utils.tf2_utils import huber_loss class IQN(Off_Policy): ''' Implicit Qua...
<filename>Algorithms/tf2algos/iqn.py import numpy as np import tensorflow as tf import Nn from utils.sth import sth from Algorithms.tf2algos.base.off_policy import Off_Policy from utils.expl_expt import ExplorationExploitationClass from utils.tf2_utils import huber_loss class IQN(Off_Policy): ''' Implicit Qua...
ja
0.548474
Implicit Quantile Networks, https://arxiv.org/abs/1806.06923 Double DQN xxxxxxxx       xxxxxxx       xxx    xxx       xxxxxxxx      xxxxxxxxx      xxxx   xxx         xxx         xxxx  xxxx     xxxxx  xxx         xxx         xxx    xxx     xxxxx  xxx         xxx        xxxx    xxx     xxxxxx xxx         xxx        x...
2.114041
2
google-cloud-sdk/platform/gsutil/third_party/apitools/apitools/gen/service_registry.py
bopopescu/searchparty
1
6626175
<gh_stars>1-10 #!/usr/bin/env python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
#!/usr/bin/env python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
en
0.779645
#!/usr/bin/env python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
1.862594
2
mv_gaussian/low_dim_w_five_obs/run_script_snpe_c.py
SamuelWiqvist/snpla
2
6626176
# Imports import sys import torch import os import numpy as np import time from torch.distributions.multivariate_normal import MultivariateNormal from sbi.inference import SNPE_C, prepare_for_sbi # Initial set up lunarc = int(sys.argv[1]) dim = int(sys.argv[2]) seed = int(sys.argv[3]) seed_data = int(sys.argv[4]) hp_t...
# Imports import sys import torch import os import numpy as np import time from torch.distributions.multivariate_normal import MultivariateNormal from sbi.inference import SNPE_C, prepare_for_sbi # Initial set up lunarc = int(sys.argv[1]) dim = int(sys.argv[2]) seed = int(sys.argv[3]) seed_data = int(sys.argv[4]) hp_t...
en
0.730469
# Imports # Initial set up # if hp_tuning = 0, no hyper-param tuning, else hp_tuning for that sample of the hp # normal run: seed = 1:10, hp_tuning = 0 # hp search: seed = 11, hp_tuning = 1:10 # Set wd # set the wd to the base folder for the project # Load all utility functions for all methods # Set model and generate ...
1.907861
2
qm3/actions/neb.py
sergio-marti/ren-qm3
0
6626177
import math import numpy import typing def distribute( nodes: int, guess: list ) -> list: """ guess (list) MUST contain at least the initial (coor_0) and end (coor_f) coordinate numpy.arrays """ delt = [] for i in range( 1, len( guess ) ): delt.append( numpy.linalg.norm( guess[i] - gues...
import math import numpy import typing def distribute( nodes: int, guess: list ) -> list: """ guess (list) MUST contain at least the initial (coor_0) and end (coor_f) coordinate numpy.arrays """ delt = [] for i in range( 1, len( guess ) ): delt.append( numpy.linalg.norm( guess[i] - gues...
en
0.403737
guess (list) MUST contain at least the initial (coor_0) and end (coor_f) coordinate numpy.arrays the value of 'kumb' should be approx the same of the potential energy barrier when optimizing the whole band, set the 'gradient_tolerance' equal to [0.1:0.5] * nodes (_kJ/mol.A) J. Chem. Phys. v113, p9978 (2000) [...
2.988815
3
gruvii.py
smthnspcl/gruvii
0
6626178
#!/usr/bin/python3 from sys import argv from os.path import isdir, exists from os import listdir, makedirs, system from pipes import quote import numpy as np import scipy.io.wavfile as wav import tensorflow as tf class Configuration(object): dataset_directory = None model_iterations = None sampling_frequ...
#!/usr/bin/python3 from sys import argv from os.path import isdir, exists from os import listdir, makedirs, system from pipes import quote import numpy as np import scipy.io.wavfile as wav import tensorflow as tf class Configuration(object): dataset_directory = None model_iterations = None sampling_frequ...
en
0.64777
#!/usr/bin/python3 # Normalize 16-bit input to [-1, 1] range # Add special end block composed of all zeros # Mean across num examples and num timesteps # Clamp variance if too tiny # Mean 0 # Variance 1 # Mean 0 # Variance 1
2.556235
3
ccdl/tests/test_ccdl.py
xabgesagtx/ccdl
1
6626179
<reponame>xabgesagtx/ccdl from unittest import TestCase from ccdl import CcDownload class TestCcDownload(TestCase): def test_get_new_filename(self): ccDl = CcDownload() self.assertEqual("test.S02E086.mp4",ccDl.get_new_filename("test","http://www.cc.com/full-episodes/ijy227/the-nightly-show-with-larry-wilmore-...
from unittest import TestCase from ccdl import CcDownload class TestCcDownload(TestCase): def test_get_new_filename(self): ccDl = CcDownload() self.assertEqual("test.S02E086.mp4",ccDl.get_new_filename("test","http://www.cc.com/full-episodes/ijy227/the-nightly-show-with-larry-wilmore-april-5--2016---bill-nye-s...
none
1
2.748636
3
Modules/01_calculate_logarithm.py
MihailMarkovski/Python-Advanced-2020
4
6626180
<reponame>MihailMarkovski/Python-Advanced-2020<filename>Modules/01_calculate_logarithm.py from math import log number = int(input()) base = input() if base == 'natural': print(f'{log(number):.2f}') else: print(f'{log(number, float(base)):.2f}')
from math import log number = int(input()) base = input() if base == 'natural': print(f'{log(number):.2f}') else: print(f'{log(number, float(base)):.2f}')
none
1
3.785071
4
deauth.py
nipatiitti/deauth_beast
0
6626181
#!/usr/bin/env python import sys if len(sys.argv) != 3: print ("Miten: ./scapy-deauth.py bssid aika") print ("BSSIDS: airport -s") sys.exit(1) from scapy import all from scapy.all import * # conf.verb = 0 # Silence scapy conf.iface = "en0" bssid = sys.argv[1] time = int(sys.argv[2]) clients = [] ''' p...
#!/usr/bin/env python import sys if len(sys.argv) != 3: print ("Miten: ./scapy-deauth.py bssid aika") print ("BSSIDS: airport -s") sys.exit(1) from scapy import all from scapy.all import * # conf.verb = 0 # Silence scapy conf.iface = "en0" bssid = sys.argv[1] time = int(sys.argv[2]) clients = [] ''' p...
en
0.484063
#!/usr/bin/env python # conf.verb = 0 # Silence scapy packet = RadioTap()/Dot11(type=0,subtype=12,addr1=client,addr2=bssid,addr3=bssid)/Dot11Deauth(reason=7) for n in range(int(count)): sendp(packet) print ('Deauth lahetetty: ' + conf.iface + ' to BSSID: ' + bssid + ' for Client: ' + client) #if p.type in [1, 2]:
2.64344
3
data-models/python-datawrangling/src/gda/datawrangling/test_data_web_spidering.py
zhoujiagen/giant-data-analysis
2
6626182
# -*- coding: utf-8 -*- """ 网络爬虫. """ import unittest import scrapy from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor # use Chrome Dev Tools to extract element's XPath # run with # $ bin/scrapy runspider ../src/gda/datawrangling/test_data_web_spidering.py class PythonPacka...
# -*- coding: utf-8 -*- """ 网络爬虫. """ import unittest import scrapy from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor # use Chrome Dev Tools to extract element's XPath # run with # $ bin/scrapy runspider ../src/gda/datawrangling/test_data_web_spidering.py class PythonPacka...
en
0.364557
# -*- coding: utf-8 -*- 网络爬虫. # use Chrome Dev Tools to extract element's XPath # run with # $ bin/scrapy runspider ../src/gda/datawrangling/test_data_web_spidering.py # response.xpath('//div[@class="section"]/h1/text()').extract()
2.655295
3
electrum_plcu/gui/kivy/uix/dialogs/invoices.py
plc-ultima/electrum-plcu
0
6626183
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from decimal import Decimal Builder.load_string(''' <InvoicesLabel@Label> #color: .305, .309, .309, 1 text_size: self.width, None halign: 'left' valign: 'top' <InvoiceItem...
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from decimal import Decimal Builder.load_string(''' <InvoicesLabel@Label> #color: .305, .309, .309, 1 text_size: self.width, None halign: 'left' valign: 'top' <InvoiceItem...
en
0.494637
<InvoicesLabel@Label> #color: .305, .309, .309, 1 text_size: self.width, None halign: 'left' valign: 'top' <InvoiceItem@CardItem> requestor: '' memo: '' amount: '' status: '' date: '' icon: 'atlas://electrum_plcu/gui/kivy/theming/light/important' Image: id: icon ...
2.090873
2
pyqt_image_file_explorer_table_widget/imageLabelWidget.py
yjg30737/pyqt-image-file-explorer
2
6626184
import os.path from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout from PyQt5.QtCore import Qt from pyqt_image_file_explorer_table_widget.imageWidget import ImageWidget class ImageLabelWidget(QWidget): def __init__(self, filename='', parent=None): super().__init__(pa...
import os.path from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout from PyQt5.QtCore import Qt from pyqt_image_file_explorer_table_widget.imageWidget import ImageWidget class ImageLabelWidget(QWidget): def __init__(self, filename='', parent=None): super().__init__(pa...
none
1
2.601587
3
stardog/http/client.py
alimoabd2127/pystardog
0
6626185
<reponame>alimoabd2127/pystardog<gh_stars>0 import requests import requests.auth import requests_toolbelt.multipart as multipart from .. import exceptions as exceptions class Client(object): DEFAULT_ENDPOINT = "http://localhost:5820" DEFAULT_USERNAME = "admin" DEFAULT_PASSWORD = "<PASSWORD>" def __...
import requests import requests.auth import requests_toolbelt.multipart as multipart from .. import exceptions as exceptions class Client(object): DEFAULT_ENDPOINT = "http://localhost:5820" DEFAULT_USERNAME = "admin" DEFAULT_PASSWORD = "<PASSWORD>" def __init__( self, endpoint=None,...
en
0.860195
# XXX this might not be right when the auth object is used. Ideally we could drop storing this # information with this object but it is used when a store procedure is made as the "creator" # allows using e.g. proxy configuration defined explicitly # besides standard environment variables like http_proxy, https_proxy, ...
2.663983
3
src/trafficSimulator/vehicle_generator.py
slack-TU/trafficSimulator
156
6626186
from .vehicle import Vehicle from numpy.random import randint class VehicleGenerator: def __init__(self, sim, config={}): self.sim = sim # Set default configurations self.set_default_config() # Update configurations for attr, val in config.items(): setattr(self...
from .vehicle import Vehicle from numpy.random import randint class VehicleGenerator: def __init__(self, sim, config={}): self.sim = sim # Set default configurations self.set_default_config() # Update configurations for attr, val in config.items(): setattr(self...
en
0.747144
# Set default configurations # Update configurations # Calculate properties Set default configuration Returns a random vehicle from self.vehicles with random proportions Add vehicles # If time elasped after last added vehicle is # greater than vehicle_period; generate a vehicle # If there is space for the generated veh...
3.059097
3
python/paddle/fluid/tests/unittests/test_save_inference_model_conditional_op.py
zmxdream/Paddle
8
6626187
<gh_stars>1-10 # Copyright (c) 2020 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 ...
# Copyright (c) 2020 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.763452
# Copyright (c) 2020 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.261843
2
graphs/implementation.py
albexl/data-structures-for-teaching
2
6626188
from typing import Dict, Iterator, List, Protocol, TypeVar, Tuple Location = TypeVar('Location') class Graph(Protocol): def neighbors(self, id: Location) -> List[Location]: pass class SimpleGraph: def __init__(self): self.edges: Dict[Location, List[Location]] = {} def neighbors(self, ...
from typing import Dict, Iterator, List, Protocol, TypeVar, Tuple Location = TypeVar('Location') class Graph(Protocol): def neighbors(self, id: Location) -> List[Location]: pass class SimpleGraph: def __init__(self): self.edges: Dict[Location, List[Location]] = {} def neighbors(self, ...
none
1
3.324218
3
math/1093.statistics-from-a-large-sample.py
y1zhou/leetcode
0
6626189
<filename>math/1093.statistics-from-a-large-sample.py # # @lc app=leetcode id=1093 lang=python3 # # [1093] Statistics from a Large Sample # from typing import List class Solution: def sampleStats(self, count: List[int]) -> List[float]: imin, imax, imode, smean, smedian = -1, 0, 0, 0, 0 ...
<filename>math/1093.statistics-from-a-large-sample.py # # @lc app=leetcode id=1093 lang=python3 # # [1093] Statistics from a Large Sample # from typing import List class Solution: def sampleStats(self, count: List[int]) -> List[float]: imin, imax, imode, smean, smedian = -1, 0, 0, 0, 0 ...
en
0.586579
# # @lc app=leetcode id=1093 lang=python3 # # [1093] Statistics from a Large Sample #
3.048805
3
venv/lib/python3.8/site-packages/lark/load_grammar.py
YuehanLee/CS190I
0
6626190
"""Parses and creates Grammar objects""" import hashlib import os.path import sys from collections import namedtuple from copy import copy, deepcopy from io import open import pkgutil from ast import literal_eval from numbers import Integral from .utils import bfs, Py36, logger, classify_bool, is_id_continue, is_id_st...
"""Parses and creates Grammar objects""" import hashlib import os.path import sys from collections import namedtuple from copy import copy, deepcopy from io import open import pkgutil from ast import literal_eval from numbers import Integral from .utils import bfs, Py36, logger, classify_bool, is_id_continue, is_id_st...
en
0.810385
Parses and creates Grammar objects # Grammar Parser # a : b c+ d # --> # a : b _c d # _c : _c c | c; # a : b c* d # --> # a : b _c? d # _c : _c c | c; # rules_list unpacking # a : b (c|d) e # --> # a : b c e | b d e # # In AST terms: # expansion(b, expansions(c, d), e) # --> # expansions( expansion(b, c, e), exp...
2.373142
2
tricks and tips/multi args function.py
DharaniAnche/python-programs
1
6626191
<filename>tricks and tips/multi args function.py #function that takes as many inputs as users wants #user desired number of arguments - multi-args def addition(*num): #normal way res=0 for i in num: res=res+i return res def add(*num): #using list_comprehension and walrus operator ...
<filename>tricks and tips/multi args function.py #function that takes as many inputs as users wants #user desired number of arguments - multi-args def addition(*num): #normal way res=0 for i in num: res=res+i return res def add(*num): #using list_comprehension and walrus operator ...
en
0.788733
#function that takes as many inputs as users wants #user desired number of arguments - multi-args #normal way #using list_comprehension and walrus operator #returns last element in a list
4.346739
4
packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/Operation/PhactoriSampledCellInfo.py
tokusanya/seacas
0
6626192
<reponame>tokusanya/seacas # Copyright(C) 1999-2020 National Technology & Engineering Solutions # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with # NTESS, the U.S. Government retains certain rights in this software. # # Redistribution and use in source and binary forms, with or without # modifica...
# Copyright(C) 1999-2020 National Technology & Engineering Solutions # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with # NTESS, the U.S. Government retains certain rights in this software. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provide...
en
0.669321
# Copyright(C) 1999-2020 National Technology & Engineering Solutions # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with # NTESS, the U.S. Government retains certain rights in this software. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provide...
0.822171
1
daal4py/sklearn/model_selection/_split.py
yumorozov/scikit-learn-intelex
1
6626193
#!/usr/bin/env python #=============================================================================== # Copyright 2014 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
#!/usr/bin/env python #=============================================================================== # Copyright 2014 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
en
0.706353
#!/usr/bin/env python #=============================================================================== # Copyright 2014 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
2.067617
2
progressivis/table/tablechanges_base.py
jdfekete/progressivis
51
6626194
""" Base class for object keeping track of changes in a Table/Column """ from abc import ABCMeta, abstractmethod class BaseChanges(metaclass=ABCMeta): "Base class for object keeping track of changes in a Table" def __str__(self): return type(self) @abstractmethod def add_created(self, locs): ...
""" Base class for object keeping track of changes in a Table/Column """ from abc import ABCMeta, abstractmethod class BaseChanges(metaclass=ABCMeta): "Base class for object keeping track of changes in a Table" def __str__(self): return type(self) @abstractmethod def add_created(self, locs): ...
en
0.872343
Base class for object keeping track of changes in a Table/Column
3.593965
4
dataloader.py
Rhcsky/cifar100-classification
0
6626195
import os import torch import torchvision.datasets as datasets import torchvision.transforms as transforms from torch.utils.data import DataLoader, Dataset # import albumentations as A # from albumentations.pytorch import ToTensorV2 def get_dataloader(args): train_dir = './data/train_loader' test_dir = './...
import os import torch import torchvision.datasets as datasets import torchvision.transforms as transforms from torch.utils.data import DataLoader, Dataset # import albumentations as A # from albumentations.pytorch import ToTensorV2 def get_dataloader(args): train_dir = './data/train_loader' test_dir = './...
en
0.337882
# import albumentations as A # from albumentations.pytorch import ToTensorV2 # transform_albumentations = A.Compose([ # A.Resize(36, 36), # A.RandomCrop(32, 32), # A.OneOf([ # A.HorizontalFlip(p=1), # A.RandomRotate90(p=1), # A.VerticalFlip(p=1) # ], p=1), # A.OneOf([ # ...
2.43962
2
tests/extractcode/test_archive.py
TechnicallyMay/scancode-toolkit
0
6626196
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
en
0.729317
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
1.242739
1
tests/unit/test_nucleotide_sequences.py
samirelanduk/valerius
0
6626197
<filename>tests/unit/test_nucleotide_sequences.py from unittest import TestCase from unittest.mock import Mock, patch, PropertyMock, MagicMock from valerius.sequences import NucleotideSequence class GcContentTests(TestCase): def test_can_get_gc_content(self): s = NucleotideSequence("ABC") self.ass...
<filename>tests/unit/test_nucleotide_sequences.py from unittest import TestCase from unittest.mock import Mock, patch, PropertyMock, MagicMock from valerius.sequences import NucleotideSequence class GcContentTests(TestCase): def test_can_get_gc_content(self): s = NucleotideSequence("ABC") self.ass...
none
1
2.72298
3
Python/Fluent_Python/chapter5/section15/mirror.py
sunyunxian/test_lib
1
6626198
class LookingGlass: def __enter__(self): import sys self.original_write = sys.stdout.write sys.stdout.write = self.reverse_write return 'JABBERWOCKY' def __exit__(self, exc_type, exc_value, traceback): import sys sys.stdout.write = self.original_write ...
class LookingGlass: def __enter__(self): import sys self.original_write = sys.stdout.write sys.stdout.write = self.reverse_write return 'JABBERWOCKY' def __exit__(self, exc_type, exc_value, traceback): import sys sys.stdout.write = self.original_write ...
none
1
3.12262
3
Amplo/GridSearch/_GridSearch.py
Amplo-GmbH/AutoML
5
6626199
from abc import abstractmethod import multiprocessing as mp import re from typing import Any, Dict, List, Tuple, Optional, Union import numpy as np import pandas as pd from sklearn.model_selection import KFold from sklearn.metrics import SCORERS from sklearn.metrics._scorer import _BaseScorer # noqa __all__ = ['_Gr...
from abc import abstractmethod import multiprocessing as mp import re from typing import Any, Dict, List, Tuple, Optional, Union import numpy as np import pandas as pd from sklearn.model_selection import KFold from sklearn.metrics import SCORERS from sklearn.metrics._scorer import _BaseScorer # noqa __all__ = ['_Gr...
en
0.422549
# noqa Abstract base class for grid search. Purposes: - Enforces to inheriting classes to implement all abstract methods. - Defines the hyperparameter search space as it's the same for all grid search methods. Parameters ---------- model : Amplo.Au...
2.618208
3
modules/Dataset.py
sfwyly/Loader
1
6626200
""" @Author: sfwyly @Date: 2021/3/28 @Description: process Dataset """ import numpy as np import pathlib import json import platform """ Dataset: provide more methods for operate Dataset """ class Dataset(object): """ is_split: decide to whether split dataset ...
""" @Author: sfwyly @Date: 2021/3/28 @Description: process Dataset """ import numpy as np import pathlib import json import platform """ Dataset: provide more methods for operate Dataset """ class Dataset(object): """ is_split: decide to whether split dataset ...
en
0.565342
@Author: sfwyly @Date: 2021/3/28 @Description: process Dataset Dataset: provide more methods for operate Dataset is_split: decide to whether split dataset image_size: image size root_path: data root path (including train or test) # category2label # labels numbers # storage two-level category...
2.510698
3
tests/integration/test_dynamodb.py
ninhkd/localstack
0
6626201
<filename>tests/integration/test_dynamodb.py # -*- coding: utf-8 -*- import unittest import json from localstack.services.dynamodbstreams.dynamodbstreams_api import get_kinesis_stream_name from localstack.utils import testutil from localstack.utils.aws import aws_stack from localstack.utils.aws.aws_models import Kine...
<filename>tests/integration/test_dynamodb.py # -*- coding: utf-8 -*- import unittest import json from localstack.services.dynamodbstreams.dynamodbstreams_api import get_kinesis_stream_name from localstack.utils import testutil from localstack.utils.aws import aws_stack from localstack.utils.aws.aws_models import Kine...
en
0.79249
# -*- coding: utf-8 -*- # write some items containing non-ASCII characters # need to fix up the JSON and convert str to unicode for Python 2 # clean up # Create a large amount of items # Retrieve the items. The data will be transmitted to the client with chunked transfer encoding # clean up # Insert some items to the t...
2.075442
2
tests/test_chunk.py
isConic/mr_streams
2
6626202
<filename>tests/test_chunk.py import mr_streams as ms import unittest # :::: auxilary functions :::: def repeat_n_times(x, n = 1): return [x] * n def double(x): return [x,x] class TestChunk(unittest.TestCase): def test_chunk(self): _ = ms.stream([1,2,3,4,5]).chunk(2).drain() def test_less_th...
<filename>tests/test_chunk.py import mr_streams as ms import unittest # :::: auxilary functions :::: def repeat_n_times(x, n = 1): return [x] * n def double(x): return [x,x] class TestChunk(unittest.TestCase): def test_chunk(self): _ = ms.stream([1,2,3,4,5]).chunk(2).drain() def test_less_th...
en
0.481162
# :::: auxilary functions ::::
2.92977
3
src/python/T0/WMBS/Oracle/Tier0Feeder/GetDeploymentID.py
hufnagel/T0
0
6626203
""" _GetDeploymentID_ Oracle implementation of GetDeploymentID Retrieves T0 deployment ID """ from WMCore.Database.DBFormatter import DBFormatter class GetDeploymentID(DBFormatter): def execute(self, conn = None, transaction = False): sql = """SELECT id from t0_deployment_id""" ...
""" _GetDeploymentID_ Oracle implementation of GetDeploymentID Retrieves T0 deployment ID """ from WMCore.Database.DBFormatter import DBFormatter class GetDeploymentID(DBFormatter): def execute(self, conn = None, transaction = False): sql = """SELECT id from t0_deployment_id""" ...
en
0.589639
_GetDeploymentID_ Oracle implementation of GetDeploymentID Retrieves T0 deployment ID SELECT id from t0_deployment_id
2.434263
2
tests/cpp/test_cpp_client.py
EricGustin/SmartRedis
0
6626204
<reponame>EricGustin/SmartRedis import pytest from os import path as osp from glob import glob from shutil import which from subprocess import Popen, PIPE, TimeoutExpired import time RANKS = 1 TEST_PATH = osp.dirname(osp.abspath(__file__)) def get_test_names(): """Obtain test names by globbing for client_test ...
import pytest from os import path as osp from glob import glob from shutil import which from subprocess import Popen, PIPE, TimeoutExpired import time RANKS = 1 TEST_PATH = osp.dirname(osp.abspath(__file__)) def get_test_names(): """Obtain test names by globbing for client_test Add tests manually if necessary...
en
0.821245
Obtain test names by globbing for client_test Add tests manually if necessary Execute a command # spawning the subprocess and connecting to its output
2.195747
2
tools/data_source/genbank.py
tdans1/Use-Galaxy
4
6626205
#!/usr/bin/env python from __future__ import print_function import sys import textwrap from Bio import GenBank assert sys.version_info[:2] >= (2, 4) def make_fasta(rec): '''Creates fasta format from a record''' gi = rec.annotations.get('gi', '') org = rec.annotations.get('organism', '') date = rec....
#!/usr/bin/env python from __future__ import print_function import sys import textwrap from Bio import GenBank assert sys.version_info[:2] >= (2, 4) def make_fasta(rec): '''Creates fasta format from a record''' gi = rec.annotations.get('gi', '') org = rec.annotations.get('organism', '') date = rec....
en
0.455255
#!/usr/bin/env python Creates fasta format from a record # check if inputs are all numbers
2.751599
3
yearn/prices/curve.py
pmdaly/yearn-exporter
0
6626206
""" Curve Registry adapter. Supports regular pools, factory pools and crypto pools. See also https://curve.readthedocs.io/registry-address-provider.html Main Registry (id 0) v1 = 0x7D86446dDb609eD0F5f8684AcF30380a356b2B4c v2 = 0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5 Exchanges (id 2) v1 = 0xD1602F68CC7C4...
""" Curve Registry adapter. Supports regular pools, factory pools and crypto pools. See also https://curve.readthedocs.io/registry-address-provider.html Main Registry (id 0) v1 = 0x7D86446dDb609eD0F5f8684AcF30380a356b2B4c v2 = 0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5 Exchanges (id 2) v1 = 0xD1602F68CC7C4...
en
0.816256
Curve Registry adapter. Supports regular pools, factory pools and crypto pools. See also https://curve.readthedocs.io/registry-address-provider.html Main Registry (id 0) v1 = 0x7D86446dDb609eD0F5f8684AcF30380a356b2B4c v2 = 0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5 Exchanges (id 2) v1 = 0xD1602F68CC7C4c7B5...
2.018266
2
cscs-checks/compile/haswell_fma_check.py
stevenvdb/reframe
0
6626207
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm import reframe.utility.sanity as sn @rfm.required_version('>=2.14') @rfm.simple_test class HaswellFmaC...
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm import reframe.utility.sanity as sn @rfm.required_version('>=2.14') @rfm.simple_test class HaswellFmaC...
en
0.60807
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause # Ignore CPATH warning
1.8206
2
bin/run.py
alexdy2007/SussedAddTimeTableToGoogleCalander
0
6626208
from getClasses import getClasses from addToCalender import addTocalendar def run(): print("Starting") getNumberOfWeekInAdvance = 2 try: timeTableClasses = getClasses(getNumberOfWeekInAdvance) except Exception as e: print(format("A error has occured in retriving classes : {}", str(e))) ...
from getClasses import getClasses from addToCalender import addTocalendar def run(): print("Starting") getNumberOfWeekInAdvance = 2 try: timeTableClasses = getClasses(getNumberOfWeekInAdvance) except Exception as e: print(format("A error has occured in retriving classes : {}", str(e))) ...
none
1
3.13325
3
generate_all.py
fyviezhao/dressing-in-order
172
6626209
"""General-purpose training script for image-to-image translation. This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization). You need to specify the dataset ('--dataroot'), e...
"""General-purpose training script for image-to-image translation. This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization). You need to specify the dataset ('--dataroot'), e...
en
0.619603
General-purpose training script for image-to-image translation. This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization). You need to specify the dataset ('--dataroot'), expe...
2.820544
3
joystick/pubsub_stick.py
quintest/Cloud-IoT-Core-Kit-Examples
66
6626210
#!/usr/bin/python # 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...
#!/usr/bin/python # 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...
en
0.779804
#!/usr/bin/python # 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...
2.472507
2
missing_video_finder/utils.py
KylianCadet/missing-video-finder
3
6626211
<gh_stars>1-10 from missing_video_finder.exception import * import os import sys def filter_deleted_videos(videos): return [video for video in videos if video['status']['privacyStatus'] != 'public'] def get_id_from_videos(videos): return [video['contentDetails']['videoId'] for video in videos] def exec_api(f...
from missing_video_finder.exception import * import os import sys def filter_deleted_videos(videos): return [video for video in videos if video['status']['privacyStatus'] != 'public'] def get_id_from_videos(videos): return [video['contentDetails']['videoId'] for video in videos] def exec_api(fn, *args): ...
none
1
2.411191
2
setup.py
KarimHShawky/tespy
1
6626212
<reponame>KarimHShawky/tespy #!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setupt...
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages fro...
en
0.367975
#!/usr/bin/env python # -*- encoding: utf-8 -*-
1.830077
2
atmosForcing.py
jvmcgovern/model2roms_MI
0
6626213
<gh_stars>0 import sys from datetime import datetime import extrapolate as ex import numpy as np from netCDF4 import Dataset, num2date import IOatmos import grd try: import ESMF # import esmf except ImportError: print("Could not find module ESMF. Required") sys.exit() _author_ = '<NAME>' _email_ = '...
import sys from datetime import datetime import extrapolate as ex import numpy as np from netCDF4 import Dataset, num2date import IOatmos import grd try: import ESMF # import esmf except ImportError: print("Could not find module ESMF. Required") sys.exit() _author_ = '<NAME>' _email_ = '<EMAIL>' _cr...
en
0.584144
# import esmf This function creates atmospheric forcing files for ROMS def createAtmosFileUV(grdROMS, outfilename, output_format) To check the file for CF compliancy: http://titania.badc.rl.ac.uk/cgi-bin/cf-checker.pl?cfversion=1.0 # Create the objects for source and destination grids # Create the outputfile ...
2.300786
2
src/hub/dataload/sources/ensembl_metazoa/dump.py
mlebeur/mygene.info
78
6626214
import os from ftplib import FTP from config import DATA_ARCHIVE_ROOT, logger as logging from biothings.utils.dataload import tab2list from biothings.utils.common import is_int from hub.dataload.sources.ensembl.dump import GenericBioMart, XML_QUERY_TEMPLATE class EnsemblMetazoaBioMart(GenericBioMart): SRC_NAME = ...
import os from ftplib import FTP from config import DATA_ARCHIVE_ROOT, logger as logging from biothings.utils.dataload import tab2list from biothings.utils.common import is_int from hub.dataload.sources.ensembl.dump import GenericBioMart, XML_QUERY_TEMPLATE class EnsemblMetazoaBioMart(GenericBioMart): SRC_NAME = ...
en
0.667785
# used to get latest release number & list of available species
2.028759
2
Dependencies/gyp-master/test/win/compiler-flags/compile-as-managed.gyp
knight666/exlibris
0
6626215
# Copyright (c) 2015 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'test-compile-as-managed', 'type': 'executable', 'msvs_settings': { 'VCCLCompilerTool': { ...
# Copyright (c) 2015 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'test-compile-as-managed', 'type': 'executable', 'msvs_settings': { 'VCCLCompilerTool': { ...
en
0.922811
# Copyright (c) 2015 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # /clr is incompatible with /EHs
1.015707
1
lighttpd/tests/common.py
tanner-bruce/integrations-core
0
6626216
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from datadog_checks.dev import get_docker_hostname HERE = os.path.dirname(os.path.abspath(__file__)) HOST = get_docker_hostname() STATUS_URL = 'http://{}:9449/server-status'.format(HOST) FLAVO...
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from datadog_checks.dev import get_docker_hostname HERE = os.path.dirname(os.path.abspath(__file__)) HOST = get_docker_hostname() STATUS_URL = 'http://{}:9449/server-status'.format(HOST) FLAVO...
en
0.764575
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE)
1.885984
2
PyHyphen-2.0.5/setup.py
GraceJonn123/github-resources
0
6626217
<filename>PyHyphen-2.0.5/setup.py # setup.py for the PyHyphen hyphenation package # (c) Dr. Leo (fhaxbox66 <at> gmail >dot< com) import sys, os, shutil, imp, py_compile, codecs, locale, platform from string import Template from distutils.core import setup, Extension from warnings import warn # URL of the default rep...
<filename>PyHyphen-2.0.5/setup.py # setup.py for the PyHyphen hyphenation package # (c) Dr. Leo (fhaxbox66 <at> gmail >dot< com) import sys, os, shutil, imp, py_compile, codecs, locale, platform from string import Template from distutils.core import setup, Extension from warnings import warn # URL of the default rep...
en
0.780495
# setup.py for the PyHyphen hyphenation package # (c) Dr. Leo (fhaxbox66 <at> gmail >dot< com) # URL of the default repository. It goes into config.py. # Change this if you want to download dictionaries from somewhere else by default. # Note that you can also specify the repository individualy # when calling hyphen.dic...
2.160836
2
simplepay/management/commands/exporttxn.py
sunlightlabs/django-simplepay
1
6626218
from django.core.management.base import BaseCommand, CommandError from simplepay.models import Transaction import csv import datetime import sys FIELDS = ('reference_id','amazon_id','name','email','amount','date_created','date_processed','status') def _str(o): if o is None: return u'' elif isinstance(...
from django.core.management.base import BaseCommand, CommandError from simplepay.models import Transaction import csv import datetime import sys FIELDS = ('reference_id','amazon_id','name','email','amount','date_created','date_processed','status') def _str(o): if o is None: return u'' elif isinstance(...
none
1
2.150586
2
test/test_contact_info_home_page.py
imakarenko2017/python_training
0
6626219
from random import randrange import re def test_contact_info_home_page(app): index = randrange(len(app.contact.get_contacts_list())) contact_from_home_page = app.contact.get_contacts_list()[index] contact_from_edit_page = app.contact.get_contact_info_from_edit_page(index) #compare phones assert con...
from random import randrange import re def test_contact_info_home_page(app): index = randrange(len(app.contact.get_contacts_list())) contact_from_home_page = app.contact.get_contacts_list()[index] contact_from_edit_page = app.contact.get_contact_info_from_edit_page(index) #compare phones assert con...
en
0.350931
#compare phones #compare emails #compare address #compare FIO
2.640799
3
keystone/test/client/test_d5_compat_calls.py
admiyo/keystone
0
6626220
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
en
0.870789
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
1.913538
2
sympy/calculus/__init__.py
yupbank/sympy
1
6626221
<reponame>yupbank/sympy """Calculus-related methods.""" from .euler import euler_equations from .singularities import (singularities, is_increasing, is_strictly_increasing, is_decreasing, is_strictly_decreasing, is_monotonic) from .finite_diff import finite_diff_...
"""Calculus-related methods.""" from .euler import euler_equations from .singularities import (singularities, is_increasing, is_strictly_increasing, is_decreasing, is_strictly_decreasing, is_monotonic) from .finite_diff import finite_diff_weights, apply_finite_di...
en
0.963753
Calculus-related methods.
2.343934
2
src/models/dataset.py
martin-fabbri/hf-sentiment-analysis
0
6626222
import torch from torch.utils.data import Dataset from transformers import PreTrainedTokenizerBase from pandas import DataFrame class BertDataset(Dataset): def __init__(self, encodings, labels): self.encodings = encodings self.labels = labels def __len__(self): return len(self.labels)...
import torch from torch.utils.data import Dataset from transformers import PreTrainedTokenizerBase from pandas import DataFrame class BertDataset(Dataset): def __init__(self, encodings, labels): self.encodings = encodings self.labels = labels def __len__(self): return len(self.labels)...
none
1
2.878124
3
acestream/ACEStream/Core/NATFirewall/NatCheck.py
GrandPaRPi/p2ptv-pi
0
6626223
<gh_stars>0 #Embedded file name: ACEStream\Core\NATFirewall\NatCheck.pyo import socket import sys DEBUG = False def Test1(udpsock, serveraddr): retVal = {'resp': False, 'ex_ip': None, 'ex_port': None} BUFSIZ = 1024 reply = '' request = 'ping1' udpsock.sendto(request, serveraddr) try: ...
#Embedded file name: ACEStream\Core\NATFirewall\NatCheck.pyo import socket import sys DEBUG = False def Test1(udpsock, serveraddr): retVal = {'resp': False, 'ex_ip': None, 'ex_port': None} BUFSIZ = 1024 reply = '' request = 'ping1' udpsock.sendto(request, serveraddr) try: repl...
en
0.457667
#Embedded file name: ACEStream\Core\NATFirewall\NatCheck.pyo
2.671549
3
sdk/lusid_asyncio/models/valuation_schedule.py
finbourne/lusid-sdk-python-asyncio-preview
0
6626224
# coding: utf-8 """ LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.3923 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec ...
# coding: utf-8 """ LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.3923 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec ...
en
0.751514
# coding: utf-8 LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.3923 Contact: <EMAIL> Generated by: https://openapi-generator.tech # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the c...
1.780438
2
scripts/maint/practracker/practracker_tests.py
golegen/tor
1
6626225
<gh_stars>1-10 #!/usr/bin/python """Some simple tests for practracker metrics""" import unittest import StringIO import metrics function_file = """static void fun(directory_request_t *req, const char *resource) { time_t if_modified_since = 0; uint8_t or_diff_from[DIGEST256_LEN]; } static void fun(directory_re...
#!/usr/bin/python """Some simple tests for practracker metrics""" import unittest import StringIO import metrics function_file = """static void fun(directory_request_t *req, const char *resource) { time_t if_modified_since = 0; uint8_t or_diff_from[DIGEST256_LEN]; } static void fun(directory_request_t *req, ...
en
0.540426
#!/usr/bin/python Some simple tests for practracker metrics static void fun(directory_request_t *req, const char *resource) { time_t if_modified_since = 0; uint8_t or_diff_from[DIGEST256_LEN]; } static void fun(directory_request_t *req, const char *resource) { time_t if_modified_since = 0; uint8_t or_dif...
2.627759
3
test/unit/common/test_manager.py
OyTao/swift-learning
0
6626226
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
en
0.787095
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
1.758685
2
web3d/web3d.py
romain-li/Web3dXBlock
0
6626227
<reponame>romain-li/Web3dXBlock<gh_stars>0 """TO-DO: Write a description of what this XBlock is.""" import pkg_resources from xblock.core import XBlock from xblock.fields import Scope, String from xblock.fragment import Fragment class Web3dXBlock(XBlock): """ A web 3D Xblock. """ display_name = Str...
"""TO-DO: Write a description of what this XBlock is.""" import pkg_resources from xblock.core import XBlock from xblock.fields import Scope, String from xblock.fragment import Fragment class Web3dXBlock(XBlock): """ A web 3D Xblock. """ display_name = String(display_name="Display name", default="w...
en
0.749601
TO-DO: Write a description of what this XBlock is. A web 3D Xblock. Handy helper for getting resources from our kit. The primary view of the Web3dXBlock, shown to students when viewing courses. A canned scenario for display in the workbench. <vertical_demo> <web3d/> </vertical_de...
2.601725
3
src/DroneVision/DroneVision_src/hardware/ImageLink.py
swipswaps/Wind-Blade-Inspection
0
6626228
<reponame>swipswaps/Wind-Blade-Inspection ''' Author: <NAME> Email: <EMAIL> Project: Master's Thesis - Autonomous Inspection Of Wind Blades Repository: Master's Thesis - CV (Computer Vision) ''' import os, glob from imageTools import GetImage from src.DroneVision.DroneVision_src.imgProcessing.frameTools.frameTools ...
''' Author: <NAME> Email: <EMAIL> Project: Master's Thesis - Autonomous Inspection Of Wind Blades Repository: Master's Thesis - CV (Computer Vision) ''' import os, glob from imageTools import GetImage from src.DroneVision.DroneVision_src.imgProcessing.frameTools.frameTools import GetShape ''' @brief Set up image ...
en
0.669579
Author: <NAME> Email: <EMAIL> Project: Master's Thesis - Autonomous Inspection Of Wind Blades Repository: Master's Thesis - CV (Computer Vision) @brief Set up image linke. @param folder (folder where the files are located) @param image_filenames (Single or multiple (list) images without structured light) @param ...
2.469517
2
othertests/recurse.py
SebastianOpiyo/algorithms
6
6626229
<reponame>SebastianOpiyo/algorithms<filename>othertests/recurse.py def recurse(level): print('recurse(%s)', level) if level: recurse(level - 1) return def not_called(): print('This function is never called.') print(recurse(8))
def recurse(level): print('recurse(%s)', level) if level: recurse(level - 1) return def not_called(): print('This function is never called.') print(recurse(8))
none
1
3.540471
4
python/common.py
VictorAtPL/random-global-optimization-methods
1
6626230
from enum import Enum from hyperopt import hp class Functions(Enum): RASTRIGIN = "RASTRIGIN" ROSENBROCK = "ROSENBROCK" def __str__(self): return self.name.lower() def __repr__(self): return str(self) @staticmethod def argparse(s): try: return Functions[s...
from enum import Enum from hyperopt import hp class Functions(Enum): RASTRIGIN = "RASTRIGIN" ROSENBROCK = "ROSENBROCK" def __str__(self): return self.name.lower() def __repr__(self): return str(self) @staticmethod def argparse(s): try: return Functions[s...
none
1
2.975575
3
setup_run.py
opteroncx/MoePhoto
192
6626231
import os import json from python import moe_utils from python.updater import update_ffmpeg, isWindows import shutil import argparse manifestPath = './manifest.json' parser = argparse.ArgumentParser(description='Moe build') parser.add_argument('--npm', default=True, nargs='?', const=True, type=eval, ...
import os import json from python import moe_utils from python.updater import update_ffmpeg, isWindows import shutil import argparse manifestPath = './manifest.json' parser = argparse.ArgumentParser(description='Moe build') parser.add_argument('--npm', default=True, nargs='?', const=True, type=eval, ...
none
1
2.312636
2
minecraftinventario/users/models.py
E2PC/MineChest
4
6626232
<gh_stars>1-10 from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): bio = models.TextField(blank=True)
from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): bio = models.TextField(blank=True)
none
1
1.90344
2
hw/vendor/pulp_platform_register_interface/vendor/lowrisc_opentitan/util/topgen/__init__.py
diorga/snitch
62
6626233
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # noqa: F401 These functions are used in topgen.py from .merge import merge_top, amend_clocks # noqa: F401 from .validate import validate_top # noqa: F401 from .lib impor...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # noqa: F401 These functions are used in topgen.py from .merge import merge_top, amend_clocks # noqa: F401 from .validate import validate_top # noqa: F401 from .lib impor...
en
0.530735
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # noqa: F401 These functions are used in topgen.py # noqa: F401 # noqa: F401 # noqa: F401
1.381234
1
migrations/versions/20200705_16-09-04__add_slack_user_table.py
alysivji/github-adapter
55
6626234
<filename>migrations/versions/20200705_16-09-04__add_slack_user_table.py """add slack_user table Revision ID: eddd9fbf0db6 Revises: <PASSWORD> Create Date: 2020-07-05 16:09:04.051330 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "<KEY>6" down_revision = "<PASS...
<filename>migrations/versions/20200705_16-09-04__add_slack_user_table.py """add slack_user table Revision ID: eddd9fbf0db6 Revises: <PASSWORD> Create Date: 2020-07-05 16:09:04.051330 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "<KEY>6" down_revision = "<PASS...
en
0.46171
add slack_user table Revision ID: eddd9fbf0db6 Revises: <PASSWORD> Create Date: 2020-07-05 16:09:04.051330 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembi...
1.540864
2
proto-tests/test_tim.py
kaushikcfd/loopy
0
6626235
from __future__ import division import numpy as np import pyopencl as cl import loopy as lp from pyopencl.tools import pytest_generate_tests_for_pyopencl \ as pytest_generate_tests 1/0 # see sem_reagan? def test_tim2d(ctx_factory): dtype = np.float32 ctx = ctx_factory() order = "C" n = 8 ...
from __future__ import division import numpy as np import pyopencl as cl import loopy as lp from pyopencl.tools import pytest_generate_tests_for_pyopencl \ as pytest_generate_tests 1/0 # see sem_reagan? def test_tim2d(ctx_factory): dtype = np.float32 ctx = ctx_factory() order = "C" n = 8 ...
en
0.226134
# see sem_reagan? # K - run-time symbolic # lp.ConstantArrayArg("D", dtype, shape=(n, n), order=order), # lp.ImageArg("D", dtype, shape=(n, n)), #, slabs=(0, 1)) # knl = lp.add_prefetch(knl, "G", [2,3], default_tag=None) # axis/argument indices on G # axis/argument indices on G #TW: ^^^^^^^^^...
2.036205
2
setup.py
bumplzz69/vyper
3
6626236
<reponame>bumplzz69/vyper # -*- coding: utf-8 -*- from setuptools import setup, find_packages test_deps = [ 'pytest', 'pytest-cov', 'py-evm==0.2.0a34', 'eth-tester==0.1.0b33', 'web3==4.8.2', ] extras = { 'test': test_deps } setup( name='vyper', # *IMPORTANT*: Don't manually change...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages test_deps = [ 'pytest', 'pytest-cov', 'py-evm==0.2.0a34', 'eth-tester==0.1.0b33', 'web3==4.8.2', ] extras = { 'test': test_deps } setup( name='vyper', # *IMPORTANT*: Don't manually change the version here. Use the...
en
0.74374
# -*- coding: utf-8 -*- # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
1.2187
1
tests/test_reload_conf.py
tac0x2a/o-namazu
1
6626237
from unittest.mock import MagicMock, call, ANY from pathlib import Path from . import conftest as ct from onamazu.onamazu import ONamazu from onamazu.watcher import NamazuEvent def test_return_empty_when_no_config_file(): o = ONamazu(ct.ROOT_DIR, 60) o.event_handler = MagicMock(name="event_handler") o....
from unittest.mock import MagicMock, call, ANY from pathlib import Path from . import conftest as ct from onamazu.onamazu import ONamazu from onamazu.watcher import NamazuEvent def test_return_empty_when_no_config_file(): o = ONamazu(ct.ROOT_DIR, 60) o.event_handler = MagicMock(name="event_handler") o....
en
0.22234
# apply # apply # apply
2.400609
2
webcomix/tests/test_search.py
J-CPelletier/WebComicToCBZ
29
6626238
<filename>webcomix/tests/test_search.py from webcomix.comic import Comic from webcomix.search import discovery from webcomix.tests.fake_websites.fixture import ( one_webpage_searchable_uri, three_webpages_uri, three_webpages_classes_uri, ) def test_search_searchable_website(mocker, three_webpages_classes_...
<filename>webcomix/tests/test_search.py from webcomix.comic import Comic from webcomix.search import discovery from webcomix.tests.fake_websites.fixture import ( one_webpage_searchable_uri, three_webpages_uri, three_webpages_classes_uri, ) def test_search_searchable_website(mocker, three_webpages_classes_...
none
1
2.328262
2
dm_pix/_src/augment_test.py
SupreethRao99/dm_pix
0
6626239
<reponame>SupreethRao99/dm_pix # Copyright 2020 DeepMind Technologies Limited. 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/LICE...
# Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
en
0.841524
# Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
2.050374
2
mc-sema/protobuf-2.5.0/python/google/protobuf/descriptor_database.py
randolphwong/mcsema
252
6626240
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
en
0.704856
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
1.573636
2
gipsy/dashboard/__init__.py
marwahaha/gipsy-1
10
6626241
<filename>gipsy/dashboard/__init__.py default_app_config = "gipsy.dashboard.apps.DefaultAppConfig"
<filename>gipsy/dashboard/__init__.py default_app_config = "gipsy.dashboard.apps.DefaultAppConfig"
none
1
1.176349
1
measure_mate/migrations/0037_auto_20161211_2345.py
niche-tester/measure-mate
15
6626242
<reponame>niche-tester/measure-mate<gh_stars>10-100 # -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-11 23:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('measure_mate', '0036_auto_20161208_0108'...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-11 23:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('measure_mate', '0036_auto_20161208_0108'), ] operations = [ migrations.Alte...
en
0.813481
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-11 23:45
1.567537
2
inflation_forecasting/config.py
fornasari12/time-series-forecasting
4
6626243
import logging import yaml logging.basicConfig( format="%(asctime)s.%(msecs)03d %(message)s", datefmt="%Y-%m-%d,%H:%M:%S", level=logging.INFO, ) logger = logging.getLogger() logger.setLevel(logging.INFO) def load_config(path): with open(path) as f: config = yaml.load(f, Loader=yaml.Loader) ...
import logging import yaml logging.basicConfig( format="%(asctime)s.%(msecs)03d %(message)s", datefmt="%Y-%m-%d,%H:%M:%S", level=logging.INFO, ) logger = logging.getLogger() logger.setLevel(logging.INFO) def load_config(path): with open(path) as f: config = yaml.load(f, Loader=yaml.Loader) ...
none
1
2.552885
3
run.py
Kystalll/ProxyPool
0
6626244
from ProxyPool.proxypool.scheduler import Scheduler import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') def main(): try: s = Scheduler() s.run() except: main() if __name__ == '__main__': main()
from ProxyPool.proxypool.scheduler import Scheduler import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') def main(): try: s = Scheduler() s.run() except: main() if __name__ == '__main__': main()
none
1
1.96078
2
trio_guest_win32.py
richardsheridan/trio-guest
10
6626245
# # Copyright 2020 <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, sof...
# # Copyright 2020 <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, sof...
en
0.612896
# # Copyright 2020 <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, sof...
1.839124
2
server/misc/ocr.py
SarthakRout/gradeLess
0
6626246
<filename>server/misc/ocr.py import sys imgpath = sys.argv[1] fin = open('coord.txt', 'r') lines_list = fin.readlines() for line in lines_list: coord = line.split(' ') xref11 = coord[0] yref11 = coord[1] xref21 = coord[2] yref21 = coord[3] print('xref11:' + xref11) print('yref11:' + yref11) print('xref21:' + xref...
<filename>server/misc/ocr.py import sys imgpath = sys.argv[1] fin = open('coord.txt', 'r') lines_list = fin.readlines() for line in lines_list: coord = line.split(' ') xref11 = coord[0] yref11 = coord[1] xref21 = coord[2] yref21 = coord[3] print('xref11:' + xref11) print('yref11:' + yref11) print('xref21:' + xref...
none
1
2.821782
3
library/binance/bsswap.py
danyanyam/ftx
2
6626247
<reponame>danyanyam/ftx from base import BaseApiClass import datetime as dt # TODO Enums, Raises class BSSwap(BaseApiClass): """https://binance-docs.github.io/apidocs/spot/en/#margin-account-trade""" def __init__(self, api_key: str, secret_key: str): super().__init__(api_key, secret_key) def li...
from base import BaseApiClass import datetime as dt # TODO Enums, Raises class BSSwap(BaseApiClass): """https://binance-docs.github.io/apidocs/spot/en/#margin-account-trade""" def __init__(self, api_key: str, secret_key: str): super().__init__(api_key, secret_key) def list_all_swap_pools(self, ...
en
0.602611
# TODO Enums, Raises https://binance-docs.github.io/apidocs/spot/en/#margin-account-trade https://binance-docs.github.io/apidocs/spot/en/#blvt-nav-kline-candlestick-streams https://binance-docs.github.io/apidocs/spot/en/#get-liquidity-information-of-a-pool-user_data https://binance-docs.github.io/apidocs/spot/en/#add-l...
2.4446
2
ops.py
yahsieh37/Visual-Saliency-Prediction
0
6626248
import tensorflow as tf import tensorflow.contrib as tf_contrib import numpy as np # Xavier : tf_contrib.layers.xavier_initializer() # He : tf_contrib.layers.variance_scaling_initializer() # Normal : tf.random_normal_initializer(mean=0.0, stddev=0.02) # l2_decay : tf_contrib.layers.l2_regularizer(0.0001) weight_init ...
import tensorflow as tf import tensorflow.contrib as tf_contrib import numpy as np # Xavier : tf_contrib.layers.xavier_initializer() # He : tf_contrib.layers.variance_scaling_initializer() # Normal : tf.random_normal_initializer(mean=0.0, stddev=0.02) # l2_decay : tf_contrib.layers.l2_regularizer(0.0001) weight_init ...
de
0.207595
# Xavier : tf_contrib.layers.xavier_initializer() # He : tf_contrib.layers.variance_scaling_initializer() # Normal : tf.random_normal_initializer(mean=0.0, stddev=0.02) # l2_decay : tf_contrib.layers.l2_regularizer(0.0001) ################################################################################## # Layer ######...
2.444705
2
car/sensors/objcenter_ssd.py
zhijiahu/gopigo-car
2
6626249
from collections import deque from collections import namedtuple import numpy as np import imutils import cv2 from .sensorbase import SensorBase class ObjCenterSSD(SensorBase): def __init__(self, args): super(ObjCenterSSD, self).__init__(args) # set instance variables self.objType = arg...
from collections import deque from collections import namedtuple import numpy as np import imutils import cv2 from .sensorbase import SensorBase class ObjCenterSSD(SensorBase): def __init__(self, args): super(ObjCenterSSD, self).__init__(args) # set instance variables self.objType = arg...
en
0.857192
# set instance variables # initialize the list of class labels MobileNet SSD was # trained to detect, then generate a set of bounding box # colors for each class # check if the object type is a part of class labels # MobileNet SDD was trained to detect # load our serialized model from disk # otherwise, alert the user r...
2.857825
3
tests/unit/modules/test_pkgutil.py
xiaowei582648206/saltx
1
6626250
<reponame>xiaowei582648206/saltx<gh_stars>1-10 # -*- coding: utf-8 -*- ''' :codeauthor: <NAME> <<EMAIL>> ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.supp...
# -*- coding: utf-8 -*- ''' :codeauthor: <NAME> <<EMAIL>> ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( Mock, MagicMock, ...
en
0.641839
# -*- coding: utf-8 -*- :codeauthor: <NAME> <<EMAIL>> # Import Python Libs # Import Salt Testing Libs # Import Salt Libs Test cases for salt.modules.pkgutil # 'refresh_db' function tests: 1 Test if it updates the pkgutil repo database (pkgutil -U). # 'upgrade_available' function tests: 1 Test if there is an upgrade ava...
2.186774
2