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
2015/01/fc_2015_01_07.py
mfwarren/FreeCoding
0
6629751
<reponame>mfwarren/FreeCoding<gh_stars>0 #!/usr/bin/env python3 # imports go here import os import gspread import datetime import argparse from oauth2client.client import OAuth2WebServerFlow from oauth2client import tools from oauth2client.file import Storage import smtplib from email.mime.text import MIMEText # # ...
#!/usr/bin/env python3 # imports go here import os import gspread import datetime import argparse from oauth2client.client import OAuth2WebServerFlow from oauth2client import tools from oauth2client.file import Storage import smtplib from email.mime.text import MIMEText # # Free Coding session for 2015-01-07 # Writ...
en
0.689975
#!/usr/bin/env python3 # imports go here # # Free Coding session for 2015-01-07 # Written by <NAME> # # convert to list of dictionaries using first row as keys # port 465 or 587
2.925262
3
code/abc115_d_01.py
KoyanagiHitoshi/AtCoder
3
6629752
<gh_stars>1-10 N,X=map(int,input().split()) a,p=[1],[1] for i in range(N): a.append(a[i]*2+3) p.append(p[i]*2+1) def f(n,x): if n==0:return 0 if x<=0 else 1 elif x<=1+a[n-1]:return f(n-1,x-1) else:return p[n-1]+1+f(n-1,x-2-a[n-1]) print(f(N,X))
N,X=map(int,input().split()) a,p=[1],[1] for i in range(N): a.append(a[i]*2+3) p.append(p[i]*2+1) def f(n,x): if n==0:return 0 if x<=0 else 1 elif x<=1+a[n-1]:return f(n-1,x-1) else:return p[n-1]+1+f(n-1,x-2-a[n-1]) print(f(N,X))
none
1
3.078359
3
brownie/cli/run.py
acolytec3/brownie
0
6629753
<filename>brownie/cli/run.py #!/usr/bin/python3 from docopt import docopt from brownie import network, project, run from brownie.test.output import print_gas_profile from brownie._config import ARGV, CONFIG, update_argv_from_docopt __doc__ = f"""Usage: brownie run <filename> [<function>] [options] Arguments: <fi...
<filename>brownie/cli/run.py #!/usr/bin/python3 from docopt import docopt from brownie import network, project, run from brownie.test.output import print_gas_profile from brownie._config import ARGV, CONFIG, update_argv_from_docopt __doc__ = f"""Usage: brownie run <filename> [<function>] [options] Arguments: <fi...
en
0.490269
#!/usr/bin/python3 Usage: brownie run <filename> [<function>] [options] Arguments: <filename> The name of the script to run [<function>] The function to call (default is main) Options: --network [name] Use a specific network (default {CONFIG['network']['default']}) --gas -g ...
2.567316
3
youtube_dl/extractor/spankbang.py
pierrephilip31/download
1
6629754
<gh_stars>1-10 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class SpankBangIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|m|[a-z]{2})\.)?spankbang\.com/(?P<id>[\da-z]+)/video' _TESTS = [{ 'url': 'http://spankbang.com/3vv...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class SpankBangIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|m|[a-z]{2})\.)?spankbang\.com/(?P<id>[\da-z]+)/video' _TESTS = [{ 'url': 'http://spankbang.com/3vvn/video/fantasy...
en
0.429547
# 480p only # no uploader # mobile page var\s+stream_key\s*=\s*['"](.+?)['"]
2.214331
2
chainerlp/extensions/restart_lr_scheduler.py
kumasento/gradient-scaling
7
6629755
<reponame>kumasento/gradient-scaling """ This extension implements the LR schedule from the SGDR paper. Reference: [1] https://gist.github.com/hrsma2i/9c6514e94cd5e802d9e216aef2bcfe59 """ import numpy as np from chainer.training import extension class RestartLRScheduler(extension.Extension): """ Implements the e...
""" This extension implements the LR schedule from the SGDR paper. Reference: [1] https://gist.github.com/hrsma2i/9c6514e94cd5e802d9e216aef2bcfe59 """ import numpy as np from chainer.training import extension class RestartLRScheduler(extension.Extension): """ Implements the extension """ def __init__(self, ...
en
0.779081
This extension implements the LR schedule from the SGDR paper. Reference: [1] https://gist.github.com/hrsma2i/9c6514e94cd5e802d9e216aef2bcfe59 Implements the extension CTOR # state # to calculate the current T Initialize the content in the trainer # resuming from snapshot # starting from 1 Resume Main update function. ...
2.582136
3
src/models/ensemble/__init__.py
universome/loss-patterns
84
6629756
from .plane_ensemble import PlaneEnsemble from .mapping_ensemble import MappingEnsemble from .normal_ensemble import NormalEnsemble __all__ = [ "PlaneEnsemble", "MappingEnsemble", "NormalEnsemble" ]
from .plane_ensemble import PlaneEnsemble from .mapping_ensemble import MappingEnsemble from .normal_ensemble import NormalEnsemble __all__ = [ "PlaneEnsemble", "MappingEnsemble", "NormalEnsemble" ]
none
1
0.969167
1
inline-callbacks/inline-callbacks-1.py
yukityan/twisted-intro
430
6629757
from twisted.internet.defer import inlineCallbacks, Deferred @inlineCallbacks def my_callbacks(): from twisted.internet import reactor print('first callback') result = yield 1 # yielded values that aren't deferred come right back print('second callback got', result) d = Deferred() reactor.ca...
from twisted.internet.defer import inlineCallbacks, Deferred @inlineCallbacks def my_callbacks(): from twisted.internet import reactor print('first callback') result = yield 1 # yielded values that aren't deferred come right back print('second callback got', result) d = Deferred() reactor.ca...
en
0.912887
# yielded values that aren't deferred come right back # yielded deferreds will pause the generator # the result of the deferred # the exception from the deferred
2.605013
3
mirumon/infra/infra_model.py
mirumon/mirumon-backend
19
6629758
<gh_stars>10-100 from typing import Any, TypeVar from pydantic import BaseModel from mirumon.domain.core.entity import Entity EntityT = TypeVar("EntityT", bound=Entity) class InfraModel(BaseModel): # type: ignore """Base class for models used in the infrastructure layer.""" id: Any # type: ignore @...
from typing import Any, TypeVar from pydantic import BaseModel from mirumon.domain.core.entity import Entity EntityT = TypeVar("EntityT", bound=Entity) class InfraModel(BaseModel): # type: ignore """Base class for models used in the infrastructure layer.""" id: Any # type: ignore @classmethod d...
en
0.689808
# type: ignore Base class for models used in the infrastructure layer. # type: ignore
2.524287
3
slu_test.py
hursung1/coach
72
6629759
<gh_stars>10-100 from src.utils import init_experiment from src.slu.datareader import datareader, read_file, binarize_data from src.slu.dataloader import get_dataloader, Dataset, DataLoader, collate_fn from src.slu.baseline_loader import get_dataloader as get_baselineloader from src.slu.baseline_loader import collate_...
from src.utils import init_experiment from src.slu.datareader import datareader, read_file, binarize_data from src.slu.dataloader import get_dataloader, Dataset, DataLoader, collate_fn from src.slu.baseline_loader import get_dataloader as get_baselineloader from src.slu.baseline_loader import collate_fn as baseline_col...
en
0.812102
# get dataloader # get dataloader # read seen and unseen data # read seen and unseen data
2.054438
2
webnotes/model/bean.py
gangadhar-kadam/sapphite_lib
0
6629760
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals """ Transactions are defined as collection of classes, a Bean represents collection of Document objects for a transaction with main and children. Group actions like save, etc are performed on...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals """ Transactions are defined as collection of classes, a Bean represents collection of Document objects for a transaction with main and children. Group actions like save, etc are performed on...
en
0.848497
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt Transactions are defined as collection of classes, a Bean represents collection of Document objects for a transaction with main and children. Group actions like save, etc are performed on doclists Collection of Documents with one par...
1.983729
2
part2.py
TanishqGoel/ValueIteration
0
6629761
import numpy as np from copy import deepcopy from functools import reduce import sys from operator import add HashArr=["C","N","E","S","W"] HashArr1=["R","D"] NewUtil=np.NINF BestAction="NULL" HEALTH_RANGE = 5 ARROWS_RANGE = 4 MATERIALS_RANGE=3 POSITION_RANGE=5 MONSTER_STATES_RANGE=2 ACTION_RANGE=10 HEALTH_VALUES ...
import numpy as np from copy import deepcopy from functools import reduce import sys from operator import add HashArr=["C","N","E","S","W"] HashArr1=["R","D"] NewUtil=np.NINF BestAction="NULL" HEALTH_RANGE = 5 ARROWS_RANGE = 4 MATERIALS_RANGE=3 POSITION_RANGE=5 MONSTER_STATES_RANGE=2 ACTION_RANGE=10 HEALTH_VALUES ...
en
0.794079
#print(ACTION_VALUES) # 0, 25, 50, 75, 100 # 0, 1, 2, 3 # 0, 1, 2 # 0, 1, 2, 3, 4 #0: Ready, 1: Dormant #COST=-10 # Center=0, North=1, East=2, South=3, West=4 # one iteration of value iteration # temp=np.zeros(utilities.shape) # returns cost, array of tuple of (probability, state) # state = State(*state) #"NONE" #Pos::...
2.410497
2
uniter_model/eval/nlvr2.py
intersun/LightningDOT
64
6629762
""" copied from official NLVR2 github python eval/nlvr2.py <output.csv> <annotation.json> """ import json import sys # Load the predictions file. Assume it is a CSV. predictions = { } for line in open(sys.argv[1]).readlines(): if line: splits = line.strip().split(",") # We assume identifiers are in the forma...
""" copied from official NLVR2 github python eval/nlvr2.py <output.csv> <annotation.json> """ import json import sys # Load the predictions file. Assume it is a CSV. predictions = { } for line in open(sys.argv[1]).readlines(): if line: splits = line.strip().split(",") # We assume identifiers are in the forma...
en
0.828511
copied from official NLVR2 github python eval/nlvr2.py <output.csv> <annotation.json> # Load the predictions file. Assume it is a CSV. # We assume identifiers are in the format "split-####-#-#.png". # Load the labeled examples. # If not, identify the ones that are missing, and exit. # Get the precision by iterating thr...
3.239065
3
users/services.py
Mohamed-Kaizen/home_recruiters
1
6629763
from typing import Dict, List, Optional from fastapi import HTTPException, status from tortoise import exceptions as tortoise_exceptions from .models import User, User_Pydantic from .schema import CustomerCreate, WorkerCreate from .utils import create_password_hash, verify_password class UserServices: @staticme...
from typing import Dict, List, Optional from fastapi import HTTPException, status from tortoise import exceptions as tortoise_exceptions from .models import User, User_Pydantic from .schema import CustomerCreate, WorkerCreate from .utils import create_password_hash, verify_password class UserServices: @staticme...
none
1
2.366214
2
tests/functional/Hydro/BlobTest/CloudMassFraction.py
jmikeowen/Spheral
22
6629764
<reponame>jmikeowen/Spheral #------------------------------------------------------------------------------- # Measure the cloud mass fraction for the blob test, as in Figure 6 from # # 1. <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, et al. # Fundamental differences between SPH and grid methods. Monthly Noti...
#------------------------------------------------------------------------------- # Measure the cloud mass fraction for the blob test, as in Figure 6 from # # 1. <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, et al. # Fundamental differences between SPH and grid methods. Monthly Notices of # the Royal Ast...
en
0.393308
#------------------------------------------------------------------------------- # Measure the cloud mass fraction for the blob test, as in Figure 6 from # # 1. <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, et al. # Fundamental differences between SPH and grid methods. Monthly Notices of # the Royal Astro...
2.095734
2
fwd9m/tensorflow/patch_bias_add.py
rym-khettab/determinism-DL
209
6629765
# Copyright 2020 NVIDIA Corporation. 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 l...
# Copyright 2020 NVIDIA Corporation. 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 l...
en
0.84202
# Copyright 2020 NVIDIA Corporation. 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 l...
1.633925
2
conftest.py
risclog-solution/batou
34
6629766
<reponame>risclog-solution/batou pytest_plugins = "batou.fixtures"
pytest_plugins = "batou.fixtures"
none
1
0.914316
1
sdk/python/pulumi_azure_native/purview/v20210701/outputs.py
polivbr/pulumi-azure-native
0
6629767
<filename>sdk/python/pulumi_azure_native/purview/v20210701/outputs.py # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mappi...
<filename>sdk/python/pulumi_azure_native/purview/v20210701/outputs.py # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mappi...
en
0.729838
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** The URIs that are the public endpoints of the account. The URIs that are the public endpoints of the account. :param str catalog: Gets the catal...
1.818208
2
src/sardana/macroserver/test/test_msrecordermanager.py
marc2332/sardana
43
6629768
<reponame>marc2332/sardana #!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it ...
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
en
0.77683
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under the...
1.618479
2
experiment/examine_effectiveness_sync.py
i14kwmr/python_source_separation
0
6629769
<gh_stars>0 # 順列計算に使用 import argparse import time import scipy.signal as sp from util import * from util_bss import * from util_sim import * parser = argparse.ArgumentParser() parser.add_argument("sro", type=float, default=0.0) # 単位はppm args = parser.parse_args() def examine_effectiveness_sync(): # 乱数の種を初期化 ...
# 順列計算に使用 import argparse import time import scipy.signal as sp from util import * from util_bss import * from util_sim import * parser = argparse.ArgumentParser() parser.add_argument("sro", type=float, default=0.0) # 単位はppm args = parser.parse_args() def examine_effectiveness_sync(): # 乱数の種を初期化 np.random...
ja
0.998375
# 順列計算に使用 # 単位はppm # 乱数の種を初期化 # 畳み込みに用いる音声波形 # 音源数 # 長さを調べる # ファイルを読み込む # ファイルを読み込む # サンプリング周波数 # フレームサイズ # 周波数の数 # シミュレーションのパラメータ # リサンプリング # 0 # 畳み込んだ波形をファイルに書き込む # 畳み込んだ波形をファイルに書き込む # 畳み込んだ波形をファイルに書き込む # 短時間フーリエ変換を行う # ICAの繰り返し回数 # ICAの分離フィルタを初期化 # 自然勾配法に基づくIVA実行コード(引数に与える関数を変更するだけ) # IP法に基づくIVA実行コード(引数に与える関数を変更するだけ...
2.350712
2
python_service/singleton/mynewsite/python_book/models.py
Mishco/Gof_patterns
0
6629770
<filename>python_service/singleton/mynewsite/python_book/models.py from django.db import models from django.contrib.auth.models import User # Create your models here. class Task(models.Model): TASK_STATUS = ( ('on_hold', 'On Hold'), ('complete', 'Complete'), ('in_progress', 'In Progress'),...
<filename>python_service/singleton/mynewsite/python_book/models.py from django.db import models from django.contrib.auth.models import User # Create your models here. class Task(models.Model): TASK_STATUS = ( ('on_hold', 'On Hold'), ('complete', 'Complete'), ('in_progress', 'In Progress'),...
en
0.963489
# Create your models here.
2.364683
2
init_db.py
Aspect13/shared
0
6629771
from .db_manager import Base, engine def init_db(): from .models import vault Base.metadata.create_all(bind=engine)
from .db_manager import Base, engine def init_db(): from .models import vault Base.metadata.create_all(bind=engine)
none
1
1.417576
1
Lib/site-packages/poyo/_nodes.py
hirorin-demon/hirorin-streamlit
144
6629772
<filename>Lib/site-packages/poyo/_nodes.py # -*- coding: utf-8 -*- class TreeElement(object): """Helper class to identify internal classes.""" def __init__(self, **kwargs): pass class ContainerMixin(object): """Mixin that can hold TreeElement instances. Containers can be called to return a...
<filename>Lib/site-packages/poyo/_nodes.py # -*- coding: utf-8 -*- class TreeElement(object): """Helper class to identify internal classes.""" def __init__(self, **kwargs): pass class ContainerMixin(object): """Mixin that can hold TreeElement instances. Containers can be called to return a...
en
0.897765
# -*- coding: utf-8 -*- Helper class to identify internal classes. Mixin that can hold TreeElement instances. Containers can be called to return a dict representation. If the given object is an instance of Child add it to self and register self as a parent. Mixin that can be attached to Container object. P...
2.584162
3
django_eventstream/eventstream.py
Vutivi/group-jabber
0
6629773
<gh_stars>0 import copy from .storage import EventDoesNotExist from .eventresponse import EventResponse from .utils import make_id, publish_event, publish_kick, \ get_storage, get_channelmanager, have_channels class EventPermissionError(Exception): def __init__(self, message, channels=[]): super(Exception, self)._...
import copy from .storage import EventDoesNotExist from .eventresponse import EventResponse from .utils import make_id, publish_event, publish_kick, \ get_storage, get_channelmanager, have_channels class EventPermissionError(Exception): def __init__(self, message, channels=[]): super(Exception, self).__init__(mess...
en
0.708657
# send to local listeners # publish through grip proxy # kick local listeners # kick users connected to grip proxy
1.969462
2
mocks_factory/Cats2healpixmaps.py
mehdirezaie/SYSNet
6
6629774
''' code to read the cut sky mocks and make them like a healpix map mpirun -np 2 python Cats2healpixmaps.py --path /Volumes/TimeMachine/data/mocks/dr5mocks/ --ext seed*/3dbox_nmesh1024_L5274.0_bias1.5_seed*.cat --nside 256 --zlim 0.7 1.2 ''' import healpy as hp import numpy as np def hpixsum(nside, ra, dec, ...
''' code to read the cut sky mocks and make them like a healpix map mpirun -np 2 python Cats2healpixmaps.py --path /Volumes/TimeMachine/data/mocks/dr5mocks/ --ext seed*/3dbox_nmesh1024_L5274.0_bias1.5_seed*.cat --nside 256 --zlim 0.7 1.2 ''' import healpy as hp import numpy as np def hpixsum(nside, ra, dec, ...
en
0.567667
code to read the cut sky mocks and make them like a healpix map mpirun -np 2 python Cats2healpixmaps.py --path /Volumes/TimeMachine/data/mocks/dr5mocks/ --ext seed*/3dbox_nmesh1024_L5274.0_bias1.5_seed*.cat --nside 256 --zlim 0.7 1.2 cc: Imaginglss Ellie and Yu make a healpix map from ra-dec hpixsum(...
2.03348
2
open_seq2seq/data/speech2text/speech_utils.py
borisgin/OpenSeq2Seq
1
6629775
# Copyright (c) 2018 NVIDIA Corporation from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import math import os import h5py import numpy as np import resampy as rs import scipy.io.wavfile as wave BACKENDS = [] try: import python_speech_features as psf BACKEND...
# Copyright (c) 2018 NVIDIA Corporation from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import math import os import h5py import numpy as np import resampy as rs import scipy.io.wavfile as wave BACKENDS = [] try: import python_speech_features as psf BACKEND...
en
0.685036
# Copyright (c) 2018 NVIDIA Corporation Exception that is thrown to not load preprocessed features from disk; recompute on-the-fly. This saves disk space (if you're experimenting with data input formats/preprocessing) but can be slower. The slowdown is especially apparent for small, fast NNs. Exception that is ...
2.663194
3
src/fakeformat/elements.py
roelandschoukens/fake-format-ml
0
6629776
from collections import OrderedDict from . import regexshim as _re import sys """ tags which we consider empty. This is largely the same as HTML but includes a few more. """ _EMPTY_TAGS = ( 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'sour...
from collections import OrderedDict from . import regexshim as _re import sys """ tags which we consider empty. This is largely the same as HTML but includes a few more. """ _EMPTY_TAGS = ( 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'sour...
en
0.813697
tags which we consider empty. This is largely the same as HTML but includes a few more. This matches a 'token' which may be delimited by spaces. Exclude spaces, quotes and tag metacharacters. matches 1 or more 'blank' characters matches 1 or more spaces matches 1 or more non-space characters # the pattern below has th...
3.05339
3
oppertions/08.py
mallimuondu/python-practice
0
6629777
i=1 while i<6 print(i) i += 1
i=1 while i<6 print(i) i += 1
none
1
2.927403
3
django_tenants_q/custom.py
chaitanyadevle/django_tenants_q
0
6629778
# local from django_tenants_q.utils import QUtilities from django_q.conf import Conf from django_q.brokers import get_broker class Iter(object): """ An async task with iterable arguments customised for django_tenants_q """ def __init__( self, func=None, args=None, kwa...
# local from django_tenants_q.utils import QUtilities from django_q.conf import Conf from django_q.brokers import get_broker class Iter(object): """ An async task with iterable arguments customised for django_tenants_q """ def __init__( self, func=None, args=None, kwa...
en
0.772941
# local An async task with iterable arguments customised for django_tenants_q add arguments to the set Start queueing the tasks to the worker cluster :return: the task id return the full list of results. :param int wait: how many milliseconds to wait for a result :return: an unsorted list of res...
2.347042
2
tensorflow/lite/experimental/examples/lstm/tflite_lstm.py
khodges42/tensorflow
3
6629779
# Copyright 2018 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 2018 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.79447
# Copyright 2018 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...
1.650672
2
mg/model/MusicTransformer/train.py
SJTMusicTeam/MusicGeneration
6
6629780
# import sys # sys.path.append('/data2/qt/MusicGeneration/mg/model/Musictransformer') from network import MusicTransformer from metrics import * from criterion import SmoothCrossEntropyLoss, CustomSchedule import config from data import Data import utils import datetime import time import optparse import torch import ...
# import sys # sys.path.append('/data2/qt/MusicGeneration/mg/model/Musictransformer') from network import MusicTransformer from metrics import * from criterion import SmoothCrossEntropyLoss, CustomSchedule import config from data import Data import utils import datetime import time import optparse import torch import ...
en
0.33211
# import sys # sys.path.append('/data2/qt/MusicGeneration/mg/model/Musictransformer') # from tensorboardX import SummaryWriter # ------------------------------------------------------------------------ #EventSeq.dim() # ======================================================================== # Load model and dataset # ...
2.051392
2
events/views.py
aduuna/edsa-ug
0
6629781
from django.shortcuts import render, get_object_or_404, get_list_or_404 from django.http import Http404, HttpResponse, HttpResponseRedirect from .models import Event from .forms import EventRegisterForm from django.utils import timezone from django.urls import reverse # Create your views here. def index(request): n...
from django.shortcuts import render, get_object_or_404, get_list_or_404 from django.http import Http404, HttpResponse, HttpResponseRedirect from .models import Event from .forms import EventRegisterForm from django.utils import timezone from django.urls import reverse # Create your views here. def index(request): n...
en
0.968116
# Create your views here.
2.093593
2
modules/s3db/req.py
arnavsharma93/eden
0
6629782
# -*- coding: utf-8 -*- """ Sahana Eden Request Model @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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 witho...
# -*- coding: utf-8 -*- """ Sahana Eden Request Model @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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 witho...
en
0.549571
# -*- coding: utf-8 -*- Sahana Eden Request Model @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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 ...
1.24843
1
api/tests/integration/tests/basic/molfile_stereoparity.py
f1nzer/Indigo
0
6629783
import sys sys.path.append("../../common") from env_indigo import * indigo = Indigo() indigo.setOption("molfile-saving-skip-date", "1") print( "This test checks correct saving of parity values for stereocenters for atoms" ) print( "For molfile 3000 format parity value is stored after an atom with CFG=val" ) ...
import sys sys.path.append("../../common") from env_indigo import * indigo = Indigo() indigo.setOption("molfile-saving-skip-date", "1") print( "This test checks correct saving of parity values for stereocenters for atoms" ) print( "For molfile 3000 format parity value is stored after an atom with CFG=val" ) ...
de
0.122536
#%d ***" % (num + 1)) #%d ***" % (num + 1))
2.082048
2
33/portscanner_threads.py
tonybaloney/cpython-book-samples
160
6629784
from threading import Thread from queue import Queue import socket import time timeout = 1.0 def check_port(host: str, port: int, results: Queue): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(timeout) result = sock.connect_ex((host, port)) if result == 0: results.p...
from threading import Thread from queue import Queue import socket import time timeout = 1.0 def check_port(host: str, port: int, results: Queue): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(timeout) result = sock.connect_ex((host, port)) if result == 0: results.p...
none
1
3.113801
3
utils/lib/deps.py
Laksen/symbiflow-arch-defs
0
6629785
#!/usr/bin/env python3 """ This file needs to be kept in sync with ../../make/deps.mk """ import os import os.path MY_DIR = os.path.dirname(os.path.abspath(__file__)) TOP_DIR = os.path.abspath(os.path.join(MY_DIR, "..", "..")) DEPS_DIR = ".deps" DEPS_EXT = ".d" DEPMK_EXT = ".dmk" def makefile_dir(filepath): ""...
#!/usr/bin/env python3 """ This file needs to be kept in sync with ../../make/deps.mk """ import os import os.path MY_DIR = os.path.dirname(os.path.abspath(__file__)) TOP_DIR = os.path.abspath(os.path.join(MY_DIR, "..", "..")) DEPS_DIR = ".deps" DEPS_EXT = ".d" DEPMK_EXT = ".dmk" def makefile_dir(filepath): ""...
en
0.37242
#!/usr/bin/env python3 This file needs to be kept in sync with ../../make/deps.mk Get the directory part of a path in the same way make does. Python version of the makefile `$(dir xxx)` function. >>> makefile_dir("blah1") '' >>> makefile_dir("a/blah2") 'a/' >>> makefile_dir("../b/blah3") '...
3.095222
3
jbank/migrations/0066_wsediconnection_pin.py
bachvtuan/django-jbank
0
6629786
<gh_stars>0 # Generated by Django 3.0.8 on 2020-07-17 23:22 from django.db import migrations import jutil.modelfields class Migration(migrations.Migration): dependencies = [ ("jbank", "0065_wsediconnection_bank_root_cert_file"), ] operations = [ migrations.AddField( model_na...
# Generated by Django 3.0.8 on 2020-07-17 23:22 from django.db import migrations import jutil.modelfields class Migration(migrations.Migration): dependencies = [ ("jbank", "0065_wsediconnection_bank_root_cert_file"), ] operations = [ migrations.AddField( model_name="wsedicon...
en
0.79023
# Generated by Django 3.0.8 on 2020-07-17 23:22
1.629836
2
ttt/game/admin.py
idegtiarov/ttt-wg
0
6629787
from django.contrib import admin from .models import Progress @admin.register(Progress) class ProgressAdmin(admin.ModelAdmin): pass
from django.contrib import admin from .models import Progress @admin.register(Progress) class ProgressAdmin(admin.ModelAdmin): pass
none
1
1.117385
1
rdmo/core/constants.py
m6121/rdmo
77
6629788
<gh_stars>10-100 from django.utils.translation import gettext_lazy as _ VALUE_TYPE_TEXT = 'text' VALUE_TYPE_URL = 'url' VALUE_TYPE_INTEGER = 'integer' VALUE_TYPE_FLOAT = 'float' VALUE_TYPE_BOOLEAN = 'boolean' VALUE_TYPE_DATETIME = 'datetime' VALUE_TYPE_OPTIONS = 'option' VALUE_TYPE_FILE = 'file' VALUE_TYPE_CHOICES = (...
from django.utils.translation import gettext_lazy as _ VALUE_TYPE_TEXT = 'text' VALUE_TYPE_URL = 'url' VALUE_TYPE_INTEGER = 'integer' VALUE_TYPE_FLOAT = 'float' VALUE_TYPE_BOOLEAN = 'boolean' VALUE_TYPE_DATETIME = 'datetime' VALUE_TYPE_OPTIONS = 'option' VALUE_TYPE_FILE = 'file' VALUE_TYPE_CHOICES = ( (VALUE_TYPE_...
none
1
1.861901
2
kornia/contrib/spatial_soft_argmax2d.py
timaebi/kornia
0
6629789
import torch import torch.nn as nn import torch.nn.functional as F from kornia.utils import create_meshgrid def spatial_soft_argmax2d( input: torch.Tensor, temperature: torch.Tensor = torch.tensor(1.0), normalized_coordinates: bool = True, eps: float = 1e-8) -> torch.Tensor: r"""F...
import torch import torch.nn as nn import torch.nn.functional as F from kornia.utils import create_meshgrid def spatial_soft_argmax2d( input: torch.Tensor, temperature: torch.Tensor = torch.tensor(1.0), normalized_coordinates: bool = True, eps: float = 1e-8) -> torch.Tensor: r"""F...
en
0.555851
Function that computes the Spatial Soft-Argmax 2D of a given input heatmap. Returns the index of the maximum 2d coordinates of the give map. The output order is x-coord and y-coord. Arguments: temperature (torch.Tensor): factor to apply to input. Default is 1. normalized_coordinates (b...
2.974088
3
pytealutils/transaction/__init__.py
nullun/pyteal-utils
20
6629790
<gh_stars>10-100 from .inner_transactions import axfer, pay from .transaction import assert_no_asset_close_to, assert_no_close_to, assert_no_rekey
from .inner_transactions import axfer, pay from .transaction import assert_no_asset_close_to, assert_no_close_to, assert_no_rekey
none
1
1.025323
1
instance/song.py
atipi/FlaskMongodbRESTApi_Demo
0
6629791
# -*- coding: utf-8 -*- __version__ = '0.1.0' __author__ = '<NAME>' import bson from flask import json, current_app app = current_app def create_from_file(file_path=None): """ Import song data from JSON file. :param file_path: full file path to JSON file :return: status: True if creation is done ...
# -*- coding: utf-8 -*- __version__ = '0.1.0' __author__ = '<NAME>' import bson from flask import json, current_app app = current_app def create_from_file(file_path=None): """ Import song data from JSON file. :param file_path: full file path to JSON file :return: status: True if creation is done ...
en
0.597857
# -*- coding: utf-8 -*- Import song data from JSON file. :param file_path: full file path to JSON file :return: status: True if creation is done successfully Convert data to list :param listItem: list of items for converting :return: list: list of valid dictionary data # app.logger.debug('== output: %...
3.155267
3
cirq-google/cirq_google/engine/abstract_local_program.py
kevinsung/Cirq
1
6629792
<filename>cirq-google/cirq_google/engine/abstract_local_program.py # Copyright 2021 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses...
<filename>cirq-google/cirq_google/engine/abstract_local_program.py # Copyright 2021 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses...
en
0.842021
# Copyright 2021 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
2.535386
3
src/sage/schemes/elliptic_curves/ell_tate_curve.py
bopopescu/sage-5
2
6629793
r""" Tate's parametrisation of `p`-adic curves with multiplicative reduction Let `E` be an elliptic curve defined over the `p`-adic numbers `\QQ_p`. Suppose that `E` has multiplicative reduction, i.e. that the `j`-invariant of `E` has negative valuation, say `n`. Then there exists a parameter `q` in `\ZZ_p` of valuati...
r""" Tate's parametrisation of `p`-adic curves with multiplicative reduction Let `E` be an elliptic curve defined over the `p`-adic numbers `\QQ_p`. Suppose that `E` has multiplicative reduction, i.e. that the `j`-invariant of `E` has negative valuation, say `n`. Then there exists a parameter `q` in `\ZZ_p` of valuati...
en
0.612424
Tate's parametrisation of `p`-adic curves with multiplicative reduction Let `E` be an elliptic curve defined over the `p`-adic numbers `\QQ_p`. Suppose that `E` has multiplicative reduction, i.e. that the `j`-invariant of `E` has negative valuation, say `n`. Then there exists a parameter `q` in `\ZZ_p` of valuation `n...
2.440238
2
tvrenamer/constants.py
shad7/tvrenamer
1
6629794
"""Application constants.""" INIT = 'initialized' PREPARSE = 'parsing' POSTPARSE = 'parsed' PREENHANCE = 'enhancing' POSTENHANCE = 'enhanced' PREFORMAT = 'formatting' POSTFORMAT = 'formatted' PRENAME = 'renaming' POSTNAME = 'renamed' DONE = 'finished' FAILED = 'failed'
"""Application constants.""" INIT = 'initialized' PREPARSE = 'parsing' POSTPARSE = 'parsed' PREENHANCE = 'enhancing' POSTENHANCE = 'enhanced' PREFORMAT = 'formatting' POSTFORMAT = 'formatted' PRENAME = 'renaming' POSTNAME = 'renamed' DONE = 'finished' FAILED = 'failed'
en
0.651379
Application constants.
1.243297
1
MIDAS/CountMinSketch.py
kimMichael/MIDAS.Python
0
6629795
# ------------------------------------------------------------------------------ # Copyright 2020 <NAME> (@liurui39660) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apach...
# ------------------------------------------------------------------------------ # Copyright 2020 <NAME> (@liurui39660) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apach...
en
0.721812
# ------------------------------------------------------------------------------ # Copyright 2020 <NAME> (@liurui39660) # # 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....
2.987072
3
gal/views.py
BrilliantGrant/unsplash
0
6629796
from django.shortcuts import render,HttpResponse from .models import Images,Category from django.template.context_processors import request # Create your views here. def index(request): image = Images.get_images() return render(request,'index.html',{"image":image}) def image(request, image_id): image = I...
from django.shortcuts import render,HttpResponse from .models import Images,Category from django.template.context_processors import request # Create your views here. def index(request): image = Images.get_images() return render(request,'index.html',{"image":image}) def image(request, image_id): image = I...
en
0.968116
# Create your views here.
2.179011
2
testkb/m.py
happyseayou/tello_the_force
1
6629797
<reponame>happyseayou/tello_the_force<gh_stars>1-10 import os import cv2 import gc import time from multiprocessing import Process, Manager # 向共享缓冲栈中写入数据: def write(stack, cam, top: int) -> None: print('Process to write: %s' % os.getpid()) cap = cv2.VideoCapture(cam) while True: _, img = cap.rea...
import os import cv2 import gc import time from multiprocessing import Process, Manager # 向共享缓冲栈中写入数据: def write(stack, cam, top: int) -> None: print('Process to write: %s' % os.getpid()) cap = cv2.VideoCapture(cam) while True: _, img = cap.read() if _: stack.append(img) ...
zh
0.484877
# 向共享缓冲栈中写入数据: # 每到一定容量清空一次缓冲栈 # 利用gc库,手动清理内存垃圾,防止内存溢出 # 在缓冲栈中读取数据: #提醒返回值是一个None #MPEG-4.2q # displays the frame rate every 1 second # print("正在读取第%d帧:" %index)s # 逐帧保存为图片 # resize_frame = cv2.resize(frame, (720, 480), interpolation=cv2.INTER_AREA) # cv2.imwrite("frame" + "%03d.jpg" % index,resize_frame ) #直接保存视频 #计算f...
2.51527
3
ml_project/src/train_pipeline.py
made-ml-in-prod-2021/liliyamakhmutova-
0
6629798
<filename>ml_project/src/train_pipeline.py import json import logging import logging.config import yaml import sys import click import pandas as pd from sklearn.tree import DecisionTreeClassifier from sklearn.linear_model import LogisticRegression from src.data import read_data, split_train_val_data from src.enities.t...
<filename>ml_project/src/train_pipeline.py import json import logging import logging.config import yaml import sys import click import pandas as pd from sklearn.tree import DecisionTreeClassifier from sklearn.linear_model import LogisticRegression from src.data import read_data, split_train_val_data from src.enities.t...
none
1
3.076148
3
gmshModel/Model/GenericModel.py
gawelk/F3DAS
45
6629799
<reponame>gawelk/F3DAS ################################################################################ # CLASS DEFINITION FOR MESHING MODELS GENERATED USING THE GMSH-PYTHON-API # ################################################################################ # Within this file, the generic Model class is defined...
################################################################################ # CLASS DEFINITION FOR MESHING MODELS GENERATED USING THE GMSH-PYTHON-API # ################################################################################ # Within this file, the generic Model class is defined. It is the base class ...
en
0.478093
################################################################################ # CLASS DEFINITION FOR MESHING MODELS GENERATED USING THE GMSH-PYTHON-API # ################################################################################ # Within this file, the generic Model class is defined. It is the base class ...
2.023766
2
app/server/list/views.py
tderleth/2-item-catalog
0
6629800
<reponame>tderleth/2-item-catalog #!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """List views.""" from app.server.auth import login_required from app.server.database import db_session from app.server.database.list import List from flask import session as login_session from flask import Blueprint, render_template...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """List views.""" from app.server.auth import login_required from app.server.database import db_session from app.server.database.list import List from flask import session as login_session from flask import Blueprint, render_template, redirect from flask import jsoni...
en
0.747921
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- List views. Get all lists. Get single list via id. Store new list. Delete list. Update list.
2.597986
3
src/scripts/make_data_birdsongrec.py
JaerongA/tweetynet
1
6629801
<reponame>JaerongA/tweetynet #!/usr/bin/env python # coding: utf-8 """ (re)make data directory containing results obtained with BirdsongRecognition data repository uses config.ini files from src/config/ to find the results of creating a learning curve for song of each individual bird in directory, then copies sub-dire...
#!/usr/bin/env python # coding: utf-8 """ (re)make data directory containing results obtained with BirdsongRecognition data repository uses config.ini files from src/config/ to find the results of creating a learning curve for song of each individual bird in directory, then copies sub-directory containing results of m...
en
0.806983
#!/usr/bin/env python # coding: utf-8 (re)make data directory containing results obtained with BirdsongRecognition data repository uses config.ini files from src/config/ to find the results of creating a learning curve for song of each individual bird in directory, then copies sub-directory containing results of measu...
2.433612
2
output/models/nist_data/list_pkg/non_negative_integer/schema_instance/nistschema_sv_iv_list_non_negative_integer_enumeration_3_xsd/nistschema_sv_iv_list_non_negative_integer_enumeration_3.py
tefra/xsdata-w3c-tests
1
6629802
<gh_stars>1-10 from dataclasses import dataclass, field from enum import Enum from typing import Optional __NAMESPACE__ = "NISTSchema-SV-IV-list-nonNegativeInteger-enumeration-3-NS" class NistschemaSvIvListNonNegativeIntegerEnumeration3Type(Enum): VALUE_2593582_35325331953622096_59928376274271011_369143139238641...
from dataclasses import dataclass, field from enum import Enum from typing import Optional __NAMESPACE__ = "NISTSchema-SV-IV-list-nonNegativeInteger-enumeration-3-NS" class NistschemaSvIvListNonNegativeIntegerEnumeration3Type(Enum): VALUE_2593582_35325331953622096_59928376274271011_369143139238641_40475227009628...
none
1
2.375718
2
masonite/info.py
Kush22/core
0
6629803
"""Module for specifying the Masonite version in a central location. """ VERSION = '2.0.25'
"""Module for specifying the Masonite version in a central location. """ VERSION = '2.0.25'
en
0.666915
Module for specifying the Masonite version in a central location.
1.345234
1
demo.py
liefswanson/455final
0
6629804
<filename>demo.py from tkinter import filedialog from math import ceil import math from matplotlib.image import imread, imsave from matplotlib.ticker import FuncFormatter import matplotlib.pyplot as plt from timeit import default_timer as timer from jinja2 import Template import pycuda.autoinit import pycuda.driver as ...
<filename>demo.py from tkinter import filedialog from math import ceil import math from matplotlib.image import imread, imsave from matplotlib.ticker import FuncFormatter import matplotlib.pyplot as plt from timeit import default_timer as timer from jinja2 import Template import pycuda.autoinit import pycuda.driver as ...
en
0.303272
__global__ void chiaroscuro(unsigned char *dest, unsigned char *img) { const int row = threadIdx.x + blockDim.x*blockIdx.x; const int col = threadIdx.y + blockDim.y*blockIdx.y; const int idx = col*{{depth}} + row*{{depth}}*{{height}}; if (idx+2 > {{width}}*{{height}}*{{depth}}) { ...
2.339118
2
terrascript/provider/datadog.py
mjuenema/python-terrascript
507
6629805
<filename>terrascript/provider/datadog.py # terrascript/provider/datadog.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:15:03 UTC) # # For imports without namespace, e.g. # # >>> import terrascript.provider.datadog # # instead of # # >>> import terrascript.provider.DataDog.datadog # # This is onl...
<filename>terrascript/provider/datadog.py # terrascript/provider/datadog.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:15:03 UTC) # # For imports without namespace, e.g. # # >>> import terrascript.provider.datadog # # instead of # # >>> import terrascript.provider.DataDog.datadog # # This is onl...
en
0.479998
# terrascript/provider/datadog.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:15:03 UTC) # # For imports without namespace, e.g. # # >>> import terrascript.provider.datadog # # instead of # # >>> import terrascript.provider.DataDog.datadog # # This is only available for 'official' and 'partner' p...
1.275481
1
sympy/core/basic_methods.py
certik/sympy-oldcore
1
6629806
""" Implementation of Basic low-level methods. """ import decimal from assumptions import AssumeMeths # used for canonical ordering of symbolic sequences # via __cmp__ method: ordering_of_classes = [ # singleton numbers 'Zero', 'One','Half','Infinity','NaN','NegativeOne','NegativeInfinity', # numbers ...
""" Implementation of Basic low-level methods. """ import decimal from assumptions import AssumeMeths # used for canonical ordering of symbolic sequences # via __cmp__ method: ordering_of_classes = [ # singleton numbers 'Zero', 'One','Half','Infinity','NaN','NegativeOne','NegativeInfinity', # numbers ...
en
0.795146
Implementation of Basic low-level methods. # used for canonical ordering of symbolic sequences # via __cmp__ method: # singleton numbers # numbers # singleton symbols # symbols # Functions that should come before Pow/Add/Mul # arithmetic operations # function values # defined singleton functions # special polynomials #...
2.550861
3
models/backbone.py
padeler/PE-former
15
6629807
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backbone modules. """ from collections import OrderedDict import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from uti...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backbone modules. """ from collections import OrderedDict import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from uti...
en
0.725205
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved Backbone modules. BatchNorm2d where the batch statistics and the affine parameters are fixed. Copy-paste from torchvision.misc.ops with added eps before rqsrt, without which any other models than torchvision.models.resnet[18,34,50,101] ...
2.014183
2
imagekit/management/commands/generateimages.py
jiinus/django-imagekit
0
6629808
import re from django.core.management.base import BaseCommand from ...exceptions import MissingSource from ...registry import cachefile_registry, generator_registry class Command(BaseCommand): help = ("""Generate files for the specified image generators (or all of them if none was provided). Simple, glob-like w...
import re from django.core.management.base import BaseCommand from ...exceptions import MissingSource from ...registry import cachefile_registry, generator_registry class Command(BaseCommand): help = ("""Generate files for the specified image generators (or all of them if none was provided). Simple, glob-like w...
en
0.921761
Generate files for the specified image generators (or all of them if none was provided). Simple, glob-like wildcards are allowed, with * matching all characters within a segment, and ** matching across segments. (Segments are separated with colons.) So, for example, "a:*:c" will match "a:b:c", but not "a:b:x:c", wherea...
2.29702
2
cumulusci/robotframework/locator_manager.py
edmondo1984/CumulusCI
1
6629809
from robot.libraries.BuiltIn import BuiltIn import functools from cumulusci.core.utils import dictmerge """ This module supports managing multiple location strategies. It works like this: 0. Locators are stored in a global LOCATORS dictionary. The keys are the locator prefixes, the values are dictionaries containi...
from robot.libraries.BuiltIn import BuiltIn import functools from cumulusci.core.utils import dictmerge """ This module supports managing multiple location strategies. It works like this: 0. Locators are stored in a global LOCATORS dictionary. The keys are the locator prefixes, the values are dictionaries containi...
en
0.82195
This module supports managing multiple location strategies. It works like this: 0. Locators are stored in a global LOCATORS dictionary. The keys are the locator prefixes, the values are dictionaries containing the locators 1. Libraries can register a dictionary of locators with a prefix (eg: register_locator...
3.135866
3
pahelix/utils/splitters.py
WorldEditors/PaddleHelix
0
6629810
# 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...
# 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.687837
# 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.399199
2
streambox/test/tweet.py
chenzongxiong/streambox
3
6629811
all_tests = [ { "name" : "test-tweet-fast", "exec" : "./test-tweet.bin", "records" : 1000 * 1000, # records per epoch "record_size" : 200, "target_ms" : 1000, "input_file" : "/ssd/twitter_download/filtered_tweets.txt", # --- optional --- # # "cores" : 54, # if unspecified, fall back to app defau...
all_tests = [ { "name" : "test-tweet-fast", "exec" : "./test-tweet.bin", "records" : 1000 * 1000, # records per epoch "record_size" : 200, "target_ms" : 1000, "input_file" : "/ssd/twitter_download/filtered_tweets.txt", # --- optional --- # # "cores" : 54, # if unspecified, fall back to app defau...
en
0.746804
# records per epoch # --- optional --- # # "cores" : 54, # if unspecified, fall back to app default # used to be compared with the test results # the throughput value that test should try first # --- control --- # # "disable" : True # XXX skip the test
1.3836
1
lxmlx/test/test_xml_writer.py
innodatalabs/lxmlx
5
6629812
import unittest from lxmlx.xml_writer import XmlWriter import io import lxml.etree as et from lxmlx.event import scan class XmlWriterHelper(XmlWriter): def __init__(self, xml_declaration=False): self.__io = io.BytesIO() XmlWriter.__init__(self, self.__io, xml_declaration=xml_declaration) @pr...
import unittest from lxmlx.xml_writer import XmlWriter import io import lxml.etree as et from lxmlx.event import scan class XmlWriterHelper(XmlWriter): def __init__(self, xml_declaration=False): self.__io = io.BytesIO() XmlWriter.__init__(self, self.__io, xml_declaration=xml_declaration) @pr...
en
0.125846
#65;ello&amp;</root>', model=b'<root>HAello&amp;</root>') #10;here"/>', model=b'<root text="hello\'&#10;here"/>')
2.772478
3
grtr/utils.py
msamogh/GRTr
0
6629813
<filename>grtr/utils.py # Copyright (c) 2019-present, HuggingFace Inc. # All rights reserved. This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import copy import logging import os import tarfile import tempfile from collections import deque,...
<filename>grtr/utils.py # Copyright (c) 2019-present, HuggingFace Inc. # All rights reserved. This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import copy import logging import os import tarfile import tempfile from collections import deque,...
en
0.84782
# Copyright (c) 2019-present, HuggingFace Inc. # All rights reserved. This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. Download and extract finetuned model from S3 # metadataset instances are (x, domain) Build a sequence of input from 3 segm...
1.810028
2
pyxdsm/matrix_eqn.py
marcomangano/pyXDSM
0
6629814
from __future__ import division import os import numpy as np from collections import namedtuple # color pallette link: http://paletton.com/#uid=72Q1j0kllllkS5tKC9H96KClOKC base_file_start = r"""\documentclass[border=0pt]{standalone} % <NAME> 2018 % Based off code by <NAME> (2014), who based his code off <NAME>: h...
from __future__ import division import os import numpy as np from collections import namedtuple # color pallette link: http://paletton.com/#uid=72Q1j0kllllkS5tKC9H96KClOKC base_file_start = r"""\documentclass[border=0pt]{standalone} % <NAME> 2018 % Based off code by <NAME> (2014), who based his code off <NAME>: h...
en
0.571437
# color pallette link: http://paletton.com/#uid=72Q1j0kllllkS5tKC9H96KClOKC \documentclass[border=0pt]{standalone} % <NAME> 2018 % Based off code by <NAME> (2014), who based his code off <NAME>: http://www.alecjacobson.com/weblog/?p=1289 % nc = necessary comment [do not remove] % Four rules for using these macros: % ...
2.709649
3
python/src/main/python/pyalink/alink/common/types/model_info.py
wenwei8268/Alink
0
6629815
from .bases.j_obj_wrapper import JavaObjectWrapperWithAutoTypeConversion from ..utils.packages import in_ipython class ClusteringModelInfo(JavaObjectWrapperWithAutoTypeConversion): _j_cls_name = 'com.alibaba.alink.operator.common.clustering.ClusteringModelInfo' def __init__(self, j_obj): self._j_obj ...
from .bases.j_obj_wrapper import JavaObjectWrapperWithAutoTypeConversion from ..utils.packages import in_ipython class ClusteringModelInfo(JavaObjectWrapperWithAutoTypeConversion): _j_cls_name = 'com.alibaba.alink.operator.common.clustering.ClusteringModelInfo' def __init__(self, j_obj): self._j_obj ...
en
0.215665
# noinspection PyTypeChecker # noinspection PyTypeChecker
2.227759
2
examples/manual/demo4b.py
eLBati/pyxb
123
6629816
# examples/manual/demo4b.py from __future__ import print_function import address addr = address.USAddress('<NAME>', '8 Oak Avenue', 'Anytown', 'AK', 12341) print(addr.toxml("utf-8", element_name='USAddress').decode('utf-8'))
# examples/manual/demo4b.py from __future__ import print_function import address addr = address.USAddress('<NAME>', '8 Oak Avenue', 'Anytown', 'AK', 12341) print(addr.toxml("utf-8", element_name='USAddress').decode('utf-8'))
es
0.272109
# examples/manual/demo4b.py
2.635158
3
irods_consortium_continuous_integration_test_hook.py
alanking/irods_resource_plugin_s3
0
6629817
<filename>irods_consortium_continuous_integration_test_hook.py from __future__ import print_function import optparse import os import shutil import glob import time import random import string import subprocess import irods_python_ci_utilities def get_build_prerequisites_apt(): return[] def get_build_prerequis...
<filename>irods_consortium_continuous_integration_test_hook.py from __future__ import print_function import optparse import os import shutil import glob import time import random import string import subprocess import irods_python_ci_utilities def get_build_prerequisites_apt(): return[] def get_build_prerequis...
en
0.593666
# cmake from externals requires newer libstdc++ on ub12 #irods_python_ci_utilities.install_os_packages(get_build_prerequisites())
1.898539
2
calibration/WeightSensor-calibration.py
TyBeeProject/TyBeeHive
2
6629818
<reponame>TyBeeProject/TyBeeHive<filename>calibration/WeightSensor-calibration.py #This script permit to calibrate weight sensors
#This script permit to calibrate weight sensors
en
0.623761
#This script permit to calibrate weight sensors
1.18304
1
Week7/ex7_1.py
North-Guard/BigToolsComplicatedData
0
6629819
from mrjob.job import MRJob class MRWordCount(MRJob): def mapper(self, key, line): yield "words", len(line.split()) def reducer(self, key, values): yield key, sum(values) if __name__ == "__main__": MRWordCount.run()
from mrjob.job import MRJob class MRWordCount(MRJob): def mapper(self, key, line): yield "words", len(line.split()) def reducer(self, key, values): yield key, sum(values) if __name__ == "__main__": MRWordCount.run()
none
1
2.790516
3
backend/api/avrae/cogs5e/sheets/abc.py
XoriensLair/XoriensLair.github.io
0
6629820
<reponame>XoriensLair/XoriensLair.github.io class SheetLoaderABC: def __init__(self, url): self.url = url self.character_data = None async def load_character(self, owner_id: str, args): raise NotImplemented # gsheet # v3: added stat cvars # v4: consumables # v5: spellbook # v6: v2.0 su...
class SheetLoaderABC: def __init__(self, url): self.url = url self.character_data = None async def load_character(self, owner_id: str, args): raise NotImplemented # gsheet # v3: added stat cvars # v4: consumables # v5: spellbook # v6: v2.0 support (level vars, resistances, extra spells...
en
0.688145
# gsheet # v3: added stat cvars # v4: consumables # v5: spellbook # v6: v2.0 support (level vars, resistances, extra spells/attacks) # v7: race/background (experimental) # v8: skill/save effects # v15: version fix # dicecloud # v6: added stat cvars # v7: added check effects (adv/dis) # v8: consumables # v9: spellbook #...
1.996106
2
sfeprapy/mcs0/__init__.py
fsepy/sfeprapy
4
6629821
<reponame>fsepy/sfeprapy<gh_stars>1-10 # -*- coding: utf-8 -*- import pandas as pd from sfeprapy.func.mcs_gen import dict_flatten def __example_config_dict(): return dict(n_threads=2, cwd='') def __example_input_dict(): y = { "Standard Case 1": dict( case_name="Standard Case 1", ...
# -*- coding: utf-8 -*- import pandas as pd from sfeprapy.func.mcs_gen import dict_flatten def __example_config_dict(): return dict(n_threads=2, cwd='') def __example_input_dict(): y = { "Standard Case 1": dict( case_name="Standard Case 1", n_simulations=1000, fi...
en
0.555674
# -*- coding: utf-8 -*- # mm/min # MJ/kg # [kg/m3] # [mm/min] # [MJ/kg] # [kg/m3] # mm/min # MJ/kg # [kg/m3]
2.138483
2
tests/test_bindings.py
mr-rodgers/coil
0
6629822
<filename>tests/test_bindings.py<gh_stars>0 import asyncio from typing import Any, AsyncIterable, List, Tuple, cast import pytest from aiostream import pipe, stream from coil import bind from coil.protocols import Bindable, Bound, TwoWayBound from .conftest import Size, Window @pytest.mark.asyncio @pytest.mark.par...
<filename>tests/test_bindings.py<gh_stars>0 import asyncio from typing import Any, AsyncIterable, List, Tuple, cast import pytest from aiostream import pipe, stream from coil import bind from coil.protocols import Bindable, Bound, TwoWayBound from .conftest import Size, Window @pytest.mark.asyncio @pytest.mark.par...
none
1
2.161466
2
utils/files_to_constants.py
yaqwsx/CppLink
0
6629823
#! /usr/bin/env python import sys import ntpath escape = [('\\', '\\\\'), ('\'', '\\\''), ('"', '\\"'), ('?', '\\?'), ('\n', '\\n'), ('\r', ''), ('#pragma once', '')] if len(sys.argv) < 3: print("Invalid usage! Please specify output file and source files") sys.exit(1) with open(sys.argv[1] + ".h", "w") ...
#! /usr/bin/env python import sys import ntpath escape = [('\\', '\\\\'), ('\'', '\\\''), ('"', '\\"'), ('?', '\\?'), ('\n', '\\n'), ('\r', ''), ('#pragma once', '')] if len(sys.argv) < 3: print("Invalid usage! Please specify output file and source files") sys.exit(1) with open(sys.argv[1] + ".h", "w") ...
ru
0.148623
#! /usr/bin/env python
2.607186
3
instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py
epsagon/opentelemetry-python-contrib
0
6629824
<gh_stars>0 # Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
en
0.784373
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
1.871557
2
Scripts/transform_xml_to_df.py
jiunsiew/NY_Philarchive_performanceHistory
0
6629825
# -*- coding: utf-8 -*- """ Created on Tue Apr 26 21:53:24 2016 @author: jiun Data out of xml and into a Postgres db. Largely based on composer_frequency.py """ #import modules from __future__ import division # from sys import argv import re # from collections import Counter # from sets import Set # import matplotl...
# -*- coding: utf-8 -*- """ Created on Tue Apr 26 21:53:24 2016 @author: jiun Data out of xml and into a Postgres db. Largely based on composer_frequency.py """ #import modules from __future__ import division # from sys import argv import re # from collections import Counter # from sets import Set # import matplotl...
en
0.743938
# -*- coding: utf-8 -*- Created on Tue Apr 26 21:53:24 2016 @author: jiun Data out of xml and into a Postgres db. Largely based on composer_frequency.py #import modules # from sys import argv # from collections import Counter # from sets import Set # import matplotlib.pyplot as plt #create xml collection of "docs" (...
2.697751
3
items.py
rullmann/bundlewrap-centos-vnstat
0
6629826
pkg_dnf = { 'vnstat': {}, } svc_systemd = { 'vnstat': { 'needs': ['pkg_dnf:vnstat'] }, } actions = {} files = { '/etc/sysconfig/vnstat': { 'source': 'sysconfig_vnstat', 'mode': '0644', 'content_type': 'mako', 'needs': ['pkg_dnf:vnstat'], 'triggers': ['s...
pkg_dnf = { 'vnstat': {}, } svc_systemd = { 'vnstat': { 'needs': ['pkg_dnf:vnstat'] }, } actions = {} files = { '/etc/sysconfig/vnstat': { 'source': 'sysconfig_vnstat', 'mode': '0644', 'content_type': 'mako', 'needs': ['pkg_dnf:vnstat'], 'triggers': ['s...
none
1
1.805488
2
hbase_test_log_analyse/__init__.py
byscut/azrael-py27
0
6629827
# -*- coding: utf-8 -*- # @Time : 2019/1/17 16:45 # @Author : Azrael.Bai # @File : __init__.py.py
# -*- coding: utf-8 -*- # @Time : 2019/1/17 16:45 # @Author : Azrael.Bai # @File : __init__.py.py
en
0.195301
# -*- coding: utf-8 -*- # @Time : 2019/1/17 16:45 # @Author : Azrael.Bai # @File : __init__.py.py
0.937292
1
lib/admin.py
drkitty/cyder
6
6629828
"""Originally from funfactory (funfactory/admin.py) on a380a54""" from django.contrib import admin as django_admin from django.contrib.admin.sites import AdminSite from session_csrf import anonymous_csrf class SessionCsrfAdminSite(AdminSite): """Custom admin site that handles login with session_csrf.""" de...
"""Originally from funfactory (funfactory/admin.py) on a380a54""" from django.contrib import admin as django_admin from django.contrib.admin.sites import AdminSite from session_csrf import anonymous_csrf class SessionCsrfAdminSite(AdminSite): """Custom admin site that handles login with session_csrf.""" de...
en
0.75193
Originally from funfactory (funfactory/admin.py) on a380a54 Custom admin site that handles login with session_csrf. # This is for sites that import this file directly.
2.075806
2
python/selenium/apihelper.py
jtraver/dev
0
6629829
#!/usr/bin/python """Cheap and simple API helper This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. """ __author__ = "<NAME> (<EMAIL>)" __version__ = "$Revision: 1.3 $" __date__ = "$Date: 2004/05/05 21:57:19 $" __copyr...
#!/usr/bin/python """Cheap and simple API helper This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. """ __author__ = "<NAME> (<EMAIL>)" __version__ = "$Revision: 1.3 $" __date__ = "$Date: 2004/05/05 21:57:19 $" __copyr...
en
0.765234
#!/usr/bin/python Cheap and simple API helper This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. # While this is a good example script to teach about introspection, # in real life it has been superceded by PyDoc, which i...
3.70287
4
game/game_adapted.py
Killy85/game_ai_trainer
0
6629830
<reponame>Killy85/game_ai_trainer<gh_stars>0 # -*- coding: cp1252 -*- from random import random from pygame import * from math import cos, sin, pi import os.path import sys """ Une addaptation du jeu pour communiquer aver l'ia Description : - start () : void - action("Droite"/"gauche") : action_feedback """ # cou...
# -*- coding: cp1252 -*- from random import random from pygame import * from math import cos, sin, pi import os.path import sys """ Une addaptation du jeu pour communiquer aver l'ia Description : - start () : void - action("Droite"/"gauche") : action_feedback """ # couleurs black = (0, 0, 0) red = (255, 0, 0) gre...
fr
0.961405
# -*- coding: cp1252 -*- Une addaptation du jeu pour communiquer aver l'ia Description : - start () : void - action("Droite"/"gauche") : action_feedback # couleurs #Fonction pour charger les images Les briques sont détruites par la balle. Une balle qui se déplace sur l'écran. # pi/3.3 #Collision sur les parois de l'é...
3.307967
3
meta_reward_learning/semantic_parsing/nsm/word_embeddings.py
kiss2u/google-research
7
6629831
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
en
0.836306
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
2.588117
3
src/ncclient/get.py
fredhsu/openmgmt
30
6629832
<filename>src/ncclient/get.py from ncclient import manager eos=manager.connect(host="10.83.28.203", port="830", timeout=30, username="arista", password="<PASSWORD>", hostkey_verify=False) # Get interface Ethernet 3 operational status int_eth3_op_status = ''' <interfaces> <interface> <name> Ethe...
<filename>src/ncclient/get.py from ncclient import manager eos=manager.connect(host="10.83.28.203", port="830", timeout=30, username="arista", password="<PASSWORD>", hostkey_verify=False) # Get interface Ethernet 3 operational status int_eth3_op_status = ''' <interfaces> <interface> <name> Ethe...
en
0.215162
# Get interface Ethernet 3 operational status <interfaces> <interface> <name> Ethernet3 </name> <state> <oper-status> </oper-status> </state> </interface> </interfaces>
2.054289
2
src/api/bkuser_core/tests/apis/v2/profiles/test_login.py
Canway-shiisa/bk-user
0
6629833
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
en
0.546383
# -*- coding: utf-8 -*- TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License...
1.797201
2
frappe/query_builder/__init__.py
techo0001/Frappe-v13.19
0
6629834
<filename>frappe/query_builder/__init__.py from frappe.query_builder.terms import ParameterizedValueWrapper, ParameterizedFunction import pypika pypika.terms.ValueWrapper = ParameterizedValueWrapper pypika.terms.Function = ParameterizedFunction from pypika import * from frappe.query_builder.utils import DocType, get_...
<filename>frappe/query_builder/__init__.py from frappe.query_builder.terms import ParameterizedValueWrapper, ParameterizedFunction import pypika pypika.terms.ValueWrapper = ParameterizedValueWrapper pypika.terms.Function = ParameterizedFunction from pypika import * from frappe.query_builder.utils import DocType, get_...
none
1
1.467013
1
bin/_run.py
ssebs/ssebsms
2
6629835
<reponame>ssebs/ssebsms<filename>bin/_run.py ### # ssebsMS.py - ssebsMS cli utility # (c) 2018 - <NAME> - FOSS MIT License ### ## # This file should be ran by the ssebsMS.py file ## import http.server import socketserver import os def srv(site_name,port): os.chdir("./" + site_name + "/public/") handl...
### # ssebsMS.py - ssebsMS cli utility # (c) 2018 - <NAME> - FOSS MIT License ### ## # This file should be ran by the ssebsMS.py file ## import http.server import socketserver import os def srv(site_name,port): os.chdir("./" + site_name + "/public/") handler = http.server.SimpleHTTPRequestHandler ...
en
0.535338
### # ssebsMS.py - ssebsMS cli utility # (c) 2018 - <NAME> - FOSS MIT License ### ## # This file should be ran by the ssebsMS.py file ## # end srv() # end run_entry()
2.17025
2
tehbot/plugins/botstats.py
tehron/tehbot
6
6629836
<filename>tehbot/plugins/botstats.py from tehbot.plugins import * import psutil import os import time import platform class BotStatsPlugin(StandardCommand): """Shows various information about tehbot""" def commands(self): return "botstats" @staticmethod def format_time(ts): years = in...
<filename>tehbot/plugins/botstats.py from tehbot.plugins import * import psutil import os import time import platform class BotStatsPlugin(StandardCommand): """Shows various information about tehbot""" def commands(self): return "botstats" @staticmethod def format_time(ts): years = in...
en
0.484224
Shows various information about tehbot #stats.append("Version: 0.2.1")
2.533336
3
test/functional/tool_signet_miner.py
rag-hav/bitcoin
6
6629837
#!/usr/bin/env python3 # Copyright (c) 2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test signet miner tool""" import os.path import subprocess import sys import time from test_framework.key ...
#!/usr/bin/env python3 # Copyright (c) 2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test signet miner tool""" import os.path import subprocess import sys import time from test_framework.key ...
en
0.570043
#!/usr/bin/env python3 # Copyright (c) 2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. Test signet miner tool # generate and specify signet challenge (simple p2wpkh script) # import private key need...
2.051924
2
dist/weewx-4.3.0b3/bin/weewx/xtypes.py
v0rts/docker-weewx
10
6629838
# # Copyright (c) 2019-2020 <NAME> <<EMAIL>> # # See the file LICENSE.txt for your full rights. # """User-defined extensions to the WeeWX type system""" import math import weedb import weeutil.weeutil import weewx import weewx.units import weewx.wxformulas from weeutil.weeutil import isStartOfDay from weewx.uni...
# # Copyright (c) 2019-2020 <NAME> <<EMAIL>> # # See the file LICENSE.txt for your full rights. # """User-defined extensions to the WeeWX type system""" import math import weedb import weeutil.weeutil import weewx import weewx.units import weewx.wxformulas from weeutil.weeutil import isStartOfDay from weewx.uni...
en
0.83212
# # Copyright (c) 2019-2020 <NAME> <<EMAIL>> # # See the file LICENSE.txt for your full rights. # User-defined extensions to the WeeWX type system # A list holding the type extensions. Each entry should be a subclass of XType, defined below. Base class for extensions to the WeeWX type system. Calculate a scalar. ...
2.474832
2
a2ml/cmdl/cmdl.py
gitter-badger/a2ml
0
6629839
<filename>a2ml/cmdl/cmdl.py import sys import click from a2ml.api.utils.context import CONTEXT_SETTINGS from a2ml.api.utils.context import pass_context COMMANDS = [ 'auth', 'new', 'import', 'train', 'evaluate', 'deploy', 'predict', 'review', 'project', 'dataset', 'experiment', 'model', 'serve...
<filename>a2ml/cmdl/cmdl.py import sys import click from a2ml.api.utils.context import CONTEXT_SETTINGS from a2ml.api.utils.context import pass_context COMMANDS = [ 'auth', 'new', 'import', 'train', 'evaluate', 'deploy', 'predict', 'review', 'project', 'dataset', 'experiment', 'model', 'serve...
en
0.741619
A2ML command line interface.
2.3993
2
libcc/gets.py
MICLab-Unicamp/inCCsight
2
6629840
<reponame>MICLab-Unicamp/inCCsight # coding: utf-8 def getTheCC(segmentation): import numpy as np from skimage.measure import label, regionprops labels = label(segmentation, neighbors=4) regions = regionprops(labels) theCC = [] maxwidth = 0 i = 1 ymed = None xmed = None # b...
# coding: utf-8 def getTheCC(segmentation): import numpy as np from skimage.measure import label, regionprops labels = label(segmentation, neighbors=4) regions = regionprops(labels) theCC = [] maxwidth = 0 i = 1 ymed = None xmed = None # background is labeled as 0 for p...
en
0.670278
# coding: utf-8 # background is labeled as 0 # kmeans = result of cluster.Kmeans().fit_predict() # Get min and max idx from same label # Middle term idx # Get value using idx # kmeans = result of cluster.Kmeans().fit_predict() # offset = how many points in the borders will be ignored # Get min and max idx from same lab...
2.468541
2
output_video.py
stfkolev/Solaris-IPG
1
6629841
import cv2 import numpy as np import os import argparse # parser = argparse.ArgumentParser(description='arguments') # parser.add_argument('--target', action='store_true', help='plot paths') # args = parser.parse_args() from os.path import isfile, join # Here is all the parameters you need to change fps = 5.0 # shuou...
import cv2 import numpy as np import os import argparse # parser = argparse.ArgumentParser(description='arguments') # parser.add_argument('--target', action='store_true', help='plot paths') # args = parser.parse_args() from os.path import isfile, join # Here is all the parameters you need to change fps = 5.0 # shuou...
en
0.445768
# parser = argparse.ArgumentParser(description='arguments') # parser.add_argument('--target', action='store_true', help='plot paths') # args = parser.parse_args() # Here is all the parameters you need to change # shuould be 1/dt where dt is your sampling rate # should be the type of figure you want to plot # either: li...
2.865496
3
setup.py
tooxo/distest
0
6629842
#!/usr/bin/env python3 # encoding: utf-8 from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="distest", version="0.3.1", description="Automate the testing of discord bots... With discord bots!", long_description=long_description, long_desc...
#!/usr/bin/env python3 # encoding: utf-8 from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="distest", version="0.3.1", description="Automate the testing of discord bots... With discord bots!", long_description=long_description, long_desc...
en
0.303075
#!/usr/bin/env python3 # encoding: utf-8
1.268732
1
examples/attach/boshclient.py
McPo/strophejs
1,047
6629843
<reponame>McPo/strophejs import sys, os import httplib, urllib import random, binascii from urlparse import urlparse from punjab.httpb import HttpbParse from twisted.words.xish import domish from twisted.words.protocols.jabber import jid TLS_XMLNS = 'urn:ietf:params:xml:ns:xmpp-tls' SASL_XMLNS = 'urn:ietf:params:xml...
import sys, os import httplib, urllib import random, binascii from urlparse import urlparse from punjab.httpb import HttpbParse from twisted.words.xish import domish from twisted.words.protocols.jabber import jid TLS_XMLNS = 'urn:ietf:params:xml:ns:xmpp-tls' SASL_XMLNS = 'urn:ietf:params:xml:ns:xmpp-sasl' BIND_XMLNS...
en
0.757027
Build a BOSH body. Send the body. # start new session # Create a session # create body # go ahead and auth # TODO: add authzid # poll for data # send session # did not bind, TODO - add a retry? # bump up the rid, punjab already # received self.rid
2.248299
2
atlaselectrophysiology/load_data_local.py
GaelleChapuis/iblapps
0
6629844
<gh_stars>0 import numpy as np from datetime import datetime import ibllib.atlas as atlas from pathlib import Path import alf.io import glob import json # brain_atlas = atlas.AllenAtlas(25) class LoadDataLocal: def __init__(self): self.brain_atlas = atlas.AllenAtlas(25) self.folder_...
import numpy as np from datetime import datetime import ibllib.atlas as atlas from pathlib import Path import alf.io import glob import json # brain_atlas = atlas.AllenAtlas(25) class LoadDataLocal: def __init__(self): self.brain_atlas = atlas.AllenAtlas(25) self.folder_path = [] ...
en
0.865802
# brain_atlas = atlas.AllenAtlas(25) Read in the local json file to see if any previous alignments exist # If previous alignment json file exists, read in previous alignments Find out the starting alignmnet # Define alf_path and ephys_path (a bit redundant but so it is compatible with plot data) # Read in notes for thi...
2.512211
3
conpaas-director/cpsdirector/iaas/clouds/openstack.py
bopopescu/conpaas-2
5
6629845
import math, time from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver from libcloud.common.exceptions import BaseHTTPError from .base import Cloud class OpenStackCloud(Cloud): def __init__(self, cloud_name, iaas_config): Cloud.__init__(self, cloud_name) ...
import math, time from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver from libcloud.common.exceptions import BaseHTTPError from .base import Cloud class OpenStackCloud(Cloud): def __init__(self, cloud_name, iaas_config): Cloud.__init__(self, cloud_name) ...
en
0.297258
# connect to openstack cloud # Driver = get_driver(Provider.EUCALYPTUS) # self.driver = Driver(self.user, self.passwd, secure=False, # host=self.host, port=8773, path='/services/Cloud') # def new_instances(self, count, name='conpaas', inst_type=None, volumes={}): # if self.connected is False: # self._co...
2.295928
2
conf/mpiscanner.py
maxhgerlach/mpi4py
533
6629846
# Very, very naive RE-based way for collecting declarations inside # 'cdef extern from *' Cython blocks in in source files, and next # generate compatibility headers for MPI-2 partially implemented or # built, or MPI-1 implementations, perhaps providing a subset of MPI-2 from textwrap import dedent from warnings impor...
# Very, very naive RE-based way for collecting declarations inside # 'cdef extern from *' Cython blocks in in source files, and next # generate compatibility headers for MPI-2 partially implemented or # built, or MPI-1 implementations, perhaps providing a subset of MPI-2 from textwrap import dedent from warnings impor...
en
0.309751
# Very, very naive RE-based way for collecting declarations inside # 'cdef extern from *' Cython blocks in in source files, and next # generate compatibility headers for MPI-2 partially implemented or # built, or MPI-1 implementations, perhaps providing a subset of MPI-2 \ #ifndef PyMPI_HAVE_%(name)s #undef %(...
2.136461
2
ooobuild/lo/task/x_master_password_handling2.py
Amourspirit/ooo_uno_tmpl
0
6629847
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
en
0.777954
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
1.666897
2
scripts/data/get_info.py
morrislab/plos-medicine-joint-patterns
0
6629848
<reponame>morrislab/plos-medicine-joint-patterns<filename>scripts/data/get_info.py """ Extracts information about the data. """ import click import pandas as pd import yaml import tqdm from logging import * @click.command() @click.option( '--input', required=True, multiple=True, help='read input dat...
""" Extracts information about the data. """ import click import pandas as pd import yaml import tqdm from logging import * @click.command() @click.option( '--input', required=True, multiple=True, help='read input data from Excel files INPUT') @click.option( '--output', required=True, he...
en
0.548619
Extracts information about the data.
3.008339
3
tests/admin/clush-tests/NodeSetGroupTest.py
utdsimmons/ohpc
692
6629849
<filename>tests/admin/clush-tests/NodeSetGroupTest.py #!/usr/bin/env python # ClusterShell.Node* test suite """Unit test for NodeSet with Group support""" import copy import shutil import sys import unittest sys.path.insert(0, '../lib') from TLib import * # Wildcard import for testing purpose from ClusterShell.No...
<filename>tests/admin/clush-tests/NodeSetGroupTest.py #!/usr/bin/env python # ClusterShell.Node* test suite """Unit test for NodeSet with Group support""" import copy import shutil import sys import unittest sys.path.insert(0, '../lib') from TLib import * # Wildcard import for testing purpose from ClusterShell.No...
en
0.542338
#!/usr/bin/env python # ClusterShell.Node* test suite Unit test for NodeSet with Group support # Wildcard import for testing purpose Create a temporary group file 1 # oss: montana5,montana4 mds: montana6 io: montana[4-6] #42: montana3 compute: montana[32-163] chassis1: montana[32-33] chassis2: montana[34-35] chassis3...
2.349771
2
Lib/site-packages/plotly/validators/sankey/link/concentrationscales/__init__.py
tytanya/my-first-blog
4
6629850
<gh_stars>1-10 from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._label import LabelValidator from ._colorscale import ColorscaleValidator from ._cmin import CminValidator from ._cmax import CmaxValidator
from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._label import LabelValidator from ._colorscale import ColorscaleValidator from ._cmin import CminValidator from ._cmax import CmaxValidator
none
1
1.044776
1