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
revolt/embed.py
MutedByte/revolt.py
0
6628151
from __future__ import annotations from typing import TYPE_CHECKING, Optional, Union from .enums import EmbedType from .asset import Asset if TYPE_CHECKING: from .state import State from .types import Embed as EmbedPayload from .types import SendableEmbed as SendableEmbedPayload from .types import We...
from __future__ import annotations from typing import TYPE_CHECKING, Optional, Union from .enums import EmbedType from .asset import Asset if TYPE_CHECKING: from .state import State from .types import Embed as EmbedPayload from .types import SendableEmbed as SendableEmbedPayload from .types import We...
none
1
2.397474
2
marvin/frontpage/packageinfo.py
programa-stic/marvin-django
81
6628152
<reponame>programa-stic/marvin-django # Copyright (c) 2015, Fundacion Dr. <NAME> # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright...
# Copyright (c) 2015, Fundacion Dr. <NAME> # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and...
en
0.476154
# Copyright (c) 2015, Fundacion Dr. <NAME> # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and t...
1.301162
1
modules/dbnd/src/dbnd/_core/utils/basics/load_python_module.py
busunkim96/dbnd
224
6628153
<filename>modules/dbnd/src/dbnd/_core/utils/basics/load_python_module.py import importlib import logging import os import re import sys from dbnd._core.errors import DatabandError, friendly_error from dbnd._core.utils.basics.memoized import cached logger = logging.getLogger(__name__) try: import_errors = (Impor...
<filename>modules/dbnd/src/dbnd/_core/utils/basics/load_python_module.py import importlib import logging import os import re import sys from dbnd._core.errors import DatabandError, friendly_error from dbnd._core.utils.basics.memoized import cached logger = logging.getLogger(__name__) try: import_errors = (Impor...
en
0.951823
# we are python2 # in some cases it will not help # like "tests" package. # it too late to fix it as tests already loaded from site-packages.. # we'll try to load current folder to PYTHONPATH, just in case
2.389972
2
jerex/models/modules/coreference_resolution.py
Brant-Skywalker/jerex
39
6628154
import torch from torch import nn as nn from jerex import util class CoreferenceResolution(nn.Module): def __init__(self, hidden_size, meta_embedding_size, ed_embeddings_count, prop_drop): super().__init__() self.coref_linear = nn.Linear(hidden_size * 2 + meta_embedding_size, hidden_size) ...
import torch from torch import nn as nn from jerex import util class CoreferenceResolution(nn.Module): def __init__(self, hidden_size, meta_embedding_size, ed_embeddings_count, prop_drop): super().__init__() self.coref_linear = nn.Linear(hidden_size * 2 + meta_embedding_size, hidden_size) ...
en
0.686937
# classify corefs # coref # obtain coref logits # chunk processing to reduce memory usage # get pairs of entity mention representations # classify coref candidates
2.1549
2
demo/scripts/hot_tails.py
o-linder/runawayelectrongeneration
7
6628155
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- # # -----------------------------------------------------------------------------| # Header # -----------------------------------------------------------------------------| from matplotlib import rc import matplotlib.pyplot as plt #from modul...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # -----------------------------------------------------------------------------| # Header # -----------------------------------------------------------------------------| from matplotlib import rc import matplotlib.pyplot as plt #from modules.dataTools im...
en
0.429805
#!/usr/bin/env python # -*- coding: utf-8 -*- # # -----------------------------------------------------------------------------| # Header # -----------------------------------------------------------------------------| #from modules.dataTools import max_along_axis # ------------------------------------------------...
2.705318
3
espresso/tasks/speech_recognition.py
rakhi-alina/espresso
0
6628156
# Copyright (c) <NAME> # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import OrderedDict import itertools import json import logging import os from dataclasses import dataclass, field from typing import Optional import tor...
# Copyright (c) <NAME> # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import OrderedDict import itertools import json import logging import os from dataclasses import dataclass, field from typing import Optional import tor...
en
0.709116
# Copyright (c) <NAME> # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # TODO common vars below add to parent Parse data json and create dataset. See espresso/tools/asr_prep_json.py which pack json from raw files Json example: { ...
1.750382
2
tests/unit/bokeh/application/handlers/test_document_lifecycle.py
jeisch/bokeh
1
6628157
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
en
0.143991
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
1.303138
1
MagicCube/projection.py
MarioBerrios/RubikCube_2021
0
6628158
import numpy as np class Quaternion: """Quaternion Rotation: Class to aid in representing 3D rotations via quaternions. """ @classmethod def from_v_theta(cls, v, theta): """ Construct quaternions from unit vectors v and rotation angles theta Parameters ---------- ...
import numpy as np class Quaternion: """Quaternion Rotation: Class to aid in representing 3D rotations via quaternions. """ @classmethod def from_v_theta(cls, v, theta): """ Construct quaternions from unit vectors v and rotation angles theta Parameters ---------- ...
en
0.725653
Quaternion Rotation: Class to aid in representing 3D rotations via quaternions. Construct quaternions from unit vectors v and rotation angles theta Parameters ---------- v : array_like array of vectors, last dimension 3. Vectors will be normalized. theta : array_like ...
3.86424
4
homebrew.py
DiogoRibeiro7/homebrew_scraping
0
6628159
<gh_stars>0 import requests import json import time r = requests.get('https://formulae.brew.sh/api/formula.json') packages_json = r.json() results = [] t1 = time.perf_counter() for package in packages_json: packages_name = package['name'] packages_desc = package['desc'] packages_url = f'...
import requests import json import time r = requests.get('https://formulae.brew.sh/api/formula.json') packages_json = r.json() results = [] t1 = time.perf_counter() for package in packages_json: packages_name = package['name'] packages_desc = package['desc'] packages_url = f'https://form...
none
1
2.766248
3
client/redis_sploit.py
n57uctf/DestructiveFarm
0
6628160
<gh_stars>0 #!/usr/bin/env python3 import sys import redis with redis.Redis(host=sys.argv[1], port=6379, db=0) as r: keys = r.keys() # list all keys for key in keys: print(r.get(key)) # value by key
#!/usr/bin/env python3 import sys import redis with redis.Redis(host=sys.argv[1], port=6379, db=0) as r: keys = r.keys() # list all keys for key in keys: print(r.get(key)) # value by key
en
0.461653
#!/usr/bin/env python3 # list all keys # value by key
3.112936
3
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters.py
Christina-Kang/azure-sdk-for-python
1
6628161
<reponame>Christina-Kang/azure-sdk-for-python # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Mic...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
en
0.555896
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
1.827979
2
python/GafferSceneTest/TextTest.py
Tuftux/gaffer
1
6628162
<filename>python/GafferSceneTest/TextTest.py ########################################################################## # # Copyright (c) 2013, <NAME>. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
<filename>python/GafferSceneTest/TextTest.py ########################################################################## # # Copyright (c) 2013, <NAME>. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
en
0.61563
########################################################################## # # Copyright (c) 2013, <NAME>. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source ...
1.438328
1
InvertedPendulum-v1/01_tensor.py
hyunjun529/Learn-OpenAI-GYM
0
6628163
import logging import numpy as np import sys import tensorflow as tf import gym from gym import wrappers # logging gym.undo_logger_setup() logger = logging.getLogger() formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatter) logger.addHan...
import logging import numpy as np import sys import tensorflow as tf import gym from gym import wrappers # logging gym.undo_logger_setup() logger = logging.getLogger() formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatter) logger.addHan...
en
0.52546
# logging # Gym # TensorFlow # https://www.tensorflow.org/get_started/mnist/pros #https://github.com/hunkim/ReinforcementZeroToAll/blob/master/08_2_softmax_pg_cartpole.py # using logistic regression cost function # dicount reward function Takes 1d float array of rewards and computes discounted reward e.g. f([1, 1, ...
2.416929
2
vsts/vsts/file_container/v4_0/file_container_client.py
dhilmathy/azure-devops-python-api
0
6628164
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
en
0.610497
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
1.985438
2
administracion/serializers.py
ederivero/MinimarketDjango
0
6628165
<reponame>ederivero/MinimarketDjango<gh_stars>0 from rest_framework import serializers from .models import ProductoModel, AlmacenModel, ProductoAlmacenModel, CabeceraVentaModel, DetalleVentaModel class ProductoSerializer(serializers.ModelSerializer): class Meta: model = ProductoModel fields = "__al...
from rest_framework import serializers from .models import ProductoModel, AlmacenModel, ProductoAlmacenModel, CabeceraVentaModel, DetalleVentaModel class ProductoSerializer(serializers.ModelSerializer): class Meta: model = ProductoModel fields = "__all__" # si quisiese todos los campos meno...
es
0.925549
# si quisiese todos los campos menos uno u otro # exclude = ["campo1","campo2"...] # o uso el fields o uso el exclude, mas no se pueden usar los dos al mismo tiempo # print(self.validated_data["productoNombre"]) # self.instance retorna la instancia actual que hay en mi clase, esta se logra gracias a la instancia dada a...
2.336441
2
pdb2pqr-1.9.0/contrib/ZSI-2.1-a1/test/wsdl2py/test_TerraService.py
Acpharis/protein_prep
0
6628166
#!/usr/bin/env python ############################################################################ # <NAME>, LBNL # See LBNLCopyright for copyright notice! ########################################################################### import sys, unittest from ServiceTest import ServiceTestCase, ServiceTestSuite import ...
#!/usr/bin/env python ############################################################################ # <NAME>, LBNL # See LBNLCopyright for copyright notice! ########################################################################### import sys, unittest from ServiceTest import ServiceTestCase, ServiceTestSuite import ...
en
0.396761
#!/usr/bin/env python ############################################################################ # <NAME>, LBNL # See LBNLCopyright for copyright notice! ########################################################################### Unittest for contacting the TerraService Web service. WSDL: http://terraservice.net/Te...
2.457571
2
pytorch_utils.py
cswin/CADA
5
6628167
<gh_stars>1-10 import torch.nn as nn import torch import torch.nn.functional as F from torch.autograd import Variable def lr_poly(base_lr, iter, max_iter, power): return base_lr * ((1 - float(iter) / max_iter) ** (power)) def adjust_learning_rate(optimizer, i_iter, args): lr = lr_poly(args.learning_rate, i_...
import torch.nn as nn import torch import torch.nn.functional as F from torch.autograd import Variable def lr_poly(base_lr, iter, max_iter, power): return base_lr * ((1 - float(iter) / max_iter) ** (power)) def adjust_learning_rate(optimizer, i_iter, args): lr = lr_poly(args.learning_rate, i_iter, args.num_s...
en
0.65396
#Variable(class_weights.float()).cuda() #.exp() This function returns cross entropy loss for semantic segmentation # out shape batch_size x channels x h x w -> batch_size x channels x h x w # label shape h x w x 1 x batch_size -> batch_size x 1 x h x w #.cuda(gpu) # .cuda(gpu) Computes the Sørensen–Dice loss. Note...
2.457918
2
face_detection.py
Ankush1099/Face-Detection-
0
6628168
#Face Recognition #Importing the libraries import cv2 #Loading the cascades face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') #Defining the function that will do the detections def detect(gray, frane): faces = face_ca...
#Face Recognition #Importing the libraries import cv2 #Loading the cascades face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') #Defining the function that will do the detections def detect(gray, frane): faces = face_ca...
en
0.746858
#Face Recognition #Importing the libraries #Loading the cascades #Defining the function that will do the detections #faces are tuples that will contain coordinate x,y,w,h #Doing some face recognition with the webcam
3.314415
3
src/system_sensors.py
leelooauto/system_sensors
0
6628169
#!/usr/bin/env python3 from os import error import sys import time import yaml import signal import argparse import threading import paho.mqtt.client as mqtt from sensors import * mqttClient = None global poll_interval deviceName = None settings = {} class ProgramKilled(Exception): pass def signal_handler(si...
#!/usr/bin/env python3 from os import error import sys import time import yaml import signal import argparse import threading import paho.mqtt.client as mqtt from sensors import * mqttClient = None global poll_interval deviceName = None settings = {} class ProgramKilled(Exception): pass def signal_handler(si...
en
0.83924
#!/usr/bin/env python3 # skip sensors that have been disabled Generate argument parser # check if drives exist? # are these arguments necessary? #attach function to callback # sleep for 2 minutes if broker is unavailable and retry. # Make this value configurable? # this feels like a dirty hack. Is there some other way ...
2.664771
3
test/__init__.py
movermeyer/nibbler-python
0
6628170
import unittest class BaseTestCase(unittest.TestCase): def setUp(self): # Valid email addresses: self.valid_addresses = [ '<EMAIL>', '<EMAIL>', '<EMAIL>', 'dis<EMAIL>', '<EMAIL>', '"much.more unusual"@<EMAIL>', '"...
import unittest class BaseTestCase(unittest.TestCase): def setUp(self): # Valid email addresses: self.valid_addresses = [ '<EMAIL>', '<EMAIL>', '<EMAIL>', 'dis<EMAIL>', '<EMAIL>', '"much.more unusual"@<EMAIL>', '"...
en
0.141612
# Valid email addresses: #$%&\'*+-/=?^_`{}|~@<EMAIL>', #$%&\'*+-/=?^_`{}| ~.a"@<EMAIL>', # invalid email addresses:
3.252594
3
Sapphire/Parse7.py
Rhodolite/Parser-py
0
6628171
# # Copyright (c) 2017 <NAME>. All rights reserved. # @gem('Sapphire.Parse7') def gem(): require_gem('Sapphire.Core') require_gem('Sapphire.Expression') require_gem('Sapphire.Match') require_gem('Sapphire.Statement') show = false def parse7_expression(m): [ name, l...
# # Copyright (c) 2017 <NAME>. All rights reserved. # @gem('Sapphire.Parse7') def gem(): require_gem('Sapphire.Core') require_gem('Sapphire.Expression') require_gem('Sapphire.Match') require_gem('Sapphire.Statement') show = false def parse7_expression(m): [ name, l...
en
0.86582
# # Copyright (c) 2017 <NAME>. All rights reserved. #
2.4331
2
ansible/modules/cloud/amazon/efs_facts.py
EnjoyLifeFund/py36pkgs
0
6628172
<gh_stars>0 #!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is...
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
en
0.761336
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
1.623327
2
libs/automic.py
ufopilot/AutomicTerminal
0
6628173
import base64 import automic_rest as aut from . settings import Settings class Automic(): def __init__(self, system=None, client=None, user=None, password=None): self.settings = Settings() self.user = self.settings.items['user'] self.password = self.settings.items['password'] self.client = client self.syste...
import base64 import automic_rest as aut from . settings import Settings class Automic(): def __init__(self, system=None, client=None, user=None, password=None): self.settings = Settings() self.user = self.settings.items['user'] self.password = self.settings.items['password'] self.client = client self.syste...
en
0.078466
# base64 userid:password # defalut False # default True # default None # default 3600
2.466646
2
notion_database/migrations/0001_initial.py
marcphilippebeaujean-abertay/recur-notion
2
6628174
# Generated by Django 4.0.1 on 2022-01-20 06:54 import django.core.serializers.json from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="NotionDatabase", fields=[ ...
# Generated by Django 4.0.1 on 2022-01-20 06:54 import django.core.serializers.json from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="NotionDatabase", fields=[ ...
en
0.885175
# Generated by Django 4.0.1 on 2022-01-20 06:54
1.832095
2
experiment_gener.py
firstgenius/Sorts
0
6628175
from random import randint def random_generator_lst(n): gen_lst = [] for i in range(n): gen_lst.append(randint(-100000, 100000)) return gen_lst def increase_generator_lst(n): gen_lst = [] for i in range(n): gen_lst.append(i) return gen_lst def decrease_generator_lst(n): ge...
from random import randint def random_generator_lst(n): gen_lst = [] for i in range(n): gen_lst.append(randint(-100000, 100000)) return gen_lst def increase_generator_lst(n): gen_lst = [] for i in range(n): gen_lst.append(i) return gen_lst def decrease_generator_lst(n): ge...
none
1
3.529111
4
test/functional/feature_maxreorgdepth.py
MiracleCity/MiracleCity
0
6628176
<filename>test/functional/feature_maxreorgdepth.py #!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Miracle Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. "...
<filename>test/functional/feature_maxreorgdepth.py #!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Miracle Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. "...
en
0.607086
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Miracle Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. Max Reorg Test # self.extra_args = [[f"-maxreorg={se...
2.199921
2
test/test_callback_server.py
Tianhao-Gu/JobRunner
0
6628177
<filename>test/test_callback_server.py<gh_stars>0 # Import the Sanic app, usually created with Sanic(__name__) from JobRunner.callback_server import app import json from queue import Queue from unittest.mock import patch _TOKEN = 'bogus' def _post(data): header = {"Authorization": _TOKEN} sa = {'access_log':...
<filename>test/test_callback_server.py<gh_stars>0 # Import the Sanic app, usually created with Sanic(__name__) from JobRunner.callback_server import app import json from queue import Queue from unittest.mock import patch _TOKEN = 'bogus' def _post(data): header = {"Authorization": _TOKEN} sa = {'access_log':...
en
0.904072
# Import the Sanic app, usually created with Sanic(__name__)
2.267965
2
onigurumacffi.py
asottile/onigurumacffi
11
6628178
import enum import re from typing import Any from typing import Optional from typing import Tuple import _onigurumacffi _ffi = _onigurumacffi.ffi _lib = _onigurumacffi.lib _BACKREF_RE = re.compile(r'((?<!\\)(?:\\\\)*)\\([0-9]+)') class OnigError(RuntimeError): pass class OnigSearchOption(enum.IntEnum): N...
import enum import re from typing import Any from typing import Optional from typing import Tuple import _onigurumacffi _ffi = _onigurumacffi.ffi _lib = _onigurumacffi.lib _BACKREF_RE = re.compile(r'((?<!\\)(?:\\\\)*)\\([0-9]+)') class OnigError(RuntimeError): pass class OnigSearchOption(enum.IntEnum): N...
none
1
2.44557
2
AMmodel/transducer_wrap.py
ishine/TensorflowASR-1
1
6628179
import os import tensorflow as tf from utils.tools import shape_list, get_shape_invariants, merge_repeated from utils.text_featurizers import TextFeaturizer from AMmodel.layers.time_frequency import Melspectrogram, Spectrogram from AMmodel.layers.LayerNormLstmCell import LayerNormLSTMCell class TransducerPredic...
import os import tensorflow as tf from utils.tools import shape_list, get_shape_invariants, merge_repeated from utils.text_featurizers import TextFeaturizer from AMmodel.layers.time_frequency import Melspectrogram, Spectrogram from AMmodel.layers.LayerNormLstmCell import LayerNormLSTMCell class TransducerPredic...
en
0.768446
# lstms units must equal (for using beam search) # @tf.function(experimental_relax_shapes=True) # inputs has shape [B, U] # Zeros mean no initial_state # n_memory_states = [] # for i, lstm in enumerate(self.lstms): # new_memory_states = outputs[1:] # n_memory_states.append(new_memory_states) # return shapes [B, T, P], ...
2.278417
2
test/aws_permission_verification.py
LucidumInc/update-manager
0
6628180
<reponame>LucidumInc/update-manager<filename>test/aws_permission_verification.py import yaml class EnvironmentTest(): def __init__(self): self.yaml_configuration_file = '/usr/lucidum/connector-aws_latest/external/settings.yml' self.accounts = self._get_accounts() self.cloudtrail_state = self._get_cloud...
import yaml class EnvironmentTest(): def __init__(self): self.yaml_configuration_file = '/usr/lucidum/connector-aws_latest/external/settings.yml' self.accounts = self._get_accounts() self.cloudtrail_state = self._get_cloudtrail_state() self.cloudwatch_state = self._get_cloudwatch_state() self.c...
none
1
1.997129
2
ctpn/layers/models.py
adolf69/keras-ctpn
0
6628181
# -*- coding: utf-8 -*- """ File Name: models Description : 模型 Author : mick.yi date: 2019/3/13 """ import keras from keras import layers from keras import Input, Model import tensorflow as tf from .base_net import resnet50 from .anchor import CtpnAnchor from .target import CtpnTarget fr...
# -*- coding: utf-8 -*- """ File Name: models Description : 模型 Author : mick.yi date: 2019/3/13 """ import keras from keras import layers from keras import Input, Model import tensorflow as tf from .base_net import resnet50 from .anchor import CtpnAnchor from .target import CtpnTarget fr...
zh
0.446755
# -*- coding: utf-8 -*- File Name: models Description : 模型 Author : mick.yi date: 2019/3/13 # 网络构建 # input_image = Input(batch_shape=(config.IMAGES_PER_GPU,) + config.IMAGE_SHAPE, name='input_image') # input_image_meta = Input(batch_shape=(config.IMAGES_PER_GPU, 12), name='input_image_meta'...
2.403418
2
05_Practice1/Step02/yj.py
StudyForCoding/BEAKJOON
0
6628182
burger = [] drink = [] for i in range(3): a = int(input()) burger.append(a) for i in range(2): b = int(input()) drink.append(b) print(min(burger)+min(drink)-50)
burger = [] drink = [] for i in range(3): a = int(input()) burger.append(a) for i in range(2): b = int(input()) drink.append(b) print(min(burger)+min(drink)-50)
none
1
3.734303
4
tests/test_table.py
vpv11110000/pyss
0
6628183
<gh_stars>0 # #!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=line-too-long,missing-docstring,bad-whitespace import sys import os import unittest import random DIRNAME_MODULE = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0])))) + os.sep sys.path.append(DIRNAME_MODULE) sys.pa...
# #!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=line-too-long,missing-docstring,bad-whitespace import sys import os import unittest import random DIRNAME_MODULE = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0])))) + os.sep sys.path.append(DIRNAME_MODULE) sys.path.append(DI...
en
0.507895
# #!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=line-too-long,missing-docstring,bad-whitespace # # # t[P1]=0.1 # t[P1]=0.1 # t[P1]=0.1 # t[P1]=0.1
2.01126
2
src/tools/fuse/src/elektra_fuse/__init__.py
dev2718/libelektra
188
6628184
import argparse, logging, logging.handlers, sys from pathlib import Path from fuse import FUSE import kdb from .rootlevel_resolver import RootlevelResolver from . import elektra_util if __name__ == '__main__': main() def main(): parser = argparse.ArgumentParser() parser.add_argument('mountpoint') parser....
import argparse, logging, logging.handlers, sys from pathlib import Path from fuse import FUSE import kdb from .rootlevel_resolver import RootlevelResolver from . import elektra_util if __name__ == '__main__': main() def main(): parser = argparse.ArgumentParser() parser.add_argument('mountpoint') parser....
en
0.13503
#validate parent_key #configure logging
2.016932
2
concierge/admin.py
silverfix/django-concierge
2
6628185
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division, absolute_import from django.contrib import admin from django.contrib.admin import register from django.contrib.auth import admin as auth_admin, models as auth_models from django.contrib.auth.forms import UserChangeForm, AdminPasswordChangeForm...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division, absolute_import from django.contrib import admin from django.contrib.admin import register from django.contrib.auth import admin as auth_admin, models as auth_models from django.contrib.auth.forms import UserChangeForm, AdminPasswordChangeForm...
en
0.769321
# -*- coding: utf-8 -*-
1.779876
2
qiskit/circuit/library/grover_operator.py
WiFisunset/qiskit-terra
1
6628186
<reponame>WiFisunset/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0...
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
en
0.544176
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
2.834606
3
tests/test_downloadermiddleware_robotstxt.py
eliasdorneles/scrapy
1
6628187
from __future__ import absolute_import import re from twisted.internet import reactor, error from twisted.internet.defer import Deferred from twisted.python import failure from twisted.trial import unittest from scrapy.downloadermiddlewares.robotstxt import RobotsTxtMiddleware from scrapy.exceptions import IgnoreReques...
from __future__ import absolute_import import re from twisted.internet import reactor, error from twisted.internet.defer import Deferred from twisted.python import failure from twisted.trial import unittest from scrapy.downloadermiddlewares.robotstxt import RobotsTxtMiddleware from scrapy.exceptions import IgnoreReques...
en
0.860766
User-Agent: * Disallow: /admin/ Disallow: /static/ # There is a bit of neglect in robotstxt.py: robots.txt is fetched asynchronously, # and it is actually fetched only *after* first process_request completes. # So, first process_request will always succeed. # We defer test() because otherwise robots.txt...
2.25334
2
cata/constants.py
seblee97/student_teacher_catastrophic
2
6628188
LABEL_TASK_BOUNDARIES = "label_task_boundaries" LEARNER_CONFIGURATION = "learner_configuration" CONTINUAL = "continual" META = "meta" TEACHER_CONFIGURATION = "teacher_configuration" OVERLAPPING = "overlapping" NUM_TEACHERS = "num_teachers" LOSS_TYPE = "loss_type" REGRESSION = "regression" CLASSIFICATION = "classificati...
LABEL_TASK_BOUNDARIES = "label_task_boundaries" LEARNER_CONFIGURATION = "learner_configuration" CONTINUAL = "continual" META = "meta" TEACHER_CONFIGURATION = "teacher_configuration" OVERLAPPING = "overlapping" NUM_TEACHERS = "num_teachers" LOSS_TYPE = "loss_type" REGRESSION = "regression" CLASSIFICATION = "classificati...
en
0.589746
# Hard-coded subplot layouts for different numbers of graphs
1.697621
2
yardstick/benchmark/core/runner.py
alexnemes/yardstick_enc
1
6628189
<reponame>alexnemes/yardstick_enc ############################################################################## # Copyright (c) 2015 <NAME> and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this d...
############################################################################## # Copyright (c) 2015 <NAME> and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at #...
en
0.604777
############################################################################## # Copyright (c) 2015 <NAME> and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at #...
2.549711
3
tests/test_pages/test_inline.py
inducer/courseflow
0
6628190
<reponame>inducer/courseflow<filename>tests/test_pages/test_inline.py __copyright__ = "Copyright (C) 2018 <NAME>" __license__ = """ 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 restrict...
__copyright__ = "Copyright (C) 2018 <NAME>" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
en
0.658487
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, sublicense, and/or sell copies of the ...
1.579315
2
old-stuff-for-reference/nightjar-base/nightjar-src/python-src/nightjar/backend/api/tests/__init__.py
groboclown/nightjar-mesh
3
6628191
<gh_stars>1-10 """ Tests for the data_store module. """
""" Tests for the data_store module. """
it
0.330068
Tests for the data_store module.
1.055975
1
pcdet/models/backbones_3d/vfe/__init__.py
HenryLittle/OpenPCDet-HL
0
6628192
from .mean_vfe import MeanVFE from .pillar_vfe import PillarVFE from .image_vfe import ImageVFE from .vfe_template import VFETemplate from .fusion_vfe import ImageResNetVFE, ImageMaskRCNNVFE __all__ = { 'VFETemplate': VFETemplate, 'MeanVFE': MeanVFE, 'PillarVFE': PillarVFE, 'ImageVFE': ImageVFE, 'I...
from .mean_vfe import MeanVFE from .pillar_vfe import PillarVFE from .image_vfe import ImageVFE from .vfe_template import VFETemplate from .fusion_vfe import ImageResNetVFE, ImageMaskRCNNVFE __all__ = { 'VFETemplate': VFETemplate, 'MeanVFE': MeanVFE, 'PillarVFE': PillarVFE, 'ImageVFE': ImageVFE, 'I...
none
1
0.994543
1
challenges/trees/shortest_unique_prefix.py
lukasmartinelli/sharpen
13
6628193
<reponame>lukasmartinelli/sharpen """ Find shortest unique prefix to represent each word in the list. Input: [zebra, dog, duck, dove] Output: {z, dog, du, dov} where we can see that zebra = z dog = dog duck = du dove = dov Approach: Build a trie from the words first. root / \ zebra d ...
""" Find shortest unique prefix to represent each word in the list. Input: [zebra, dog, duck, dove] Output: {z, dog, du, dov} where we can see that zebra = z dog = dog duck = du dove = dov Approach: Build a trie from the words first. root / \ zebra d / / \ uck o ...
en
0.740124
Find shortest unique prefix to represent each word in the list. Input: [zebra, dog, duck, dove] Output: {z, dog, du, dov} where we can see that zebra = z dog = dog duck = du dove = dov Approach: Build a trie from the words first. root / \ zebra d / / \ uck o ...
3.858325
4
harfbuzz_metrics.py
mawillcockson/barcode-wheel
0
6628194
<reponame>mawillcockson/barcode-wheel """freetype_metrics.py but for HarfBuzz""" import sys import svgwrite from collections import namedtuple import pathlib import barcode_wheel def main(): file_name = pathlib.Path(sys.argv[0]).with_suffix(".svg") drawing = svgwrite.Drawing(filename=str(file_name), size=("...
"""freetype_metrics.py but for HarfBuzz""" import sys import svgwrite from collections import namedtuple import pathlib import barcode_wheel def main(): file_name = pathlib.Path(sys.argv[0]).with_suffix(".svg") drawing = svgwrite.Drawing(filename=str(file_name), size=("100%", "100%")) Window = namedtupl...
en
0.182387
freetype_metrics.py but for HarfBuzz # CSS styling svg {{ margin: 0px; padding: 0px; }}
2.385805
2
async/p192.py
ls-2018/tips
2
6628195
<reponame>ls-2018/tips # 发现回调时间长运行的回调函数 import asyncio import logging import sys import time # logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) def slow(): time.sleep(1.5) print('over') async def main(): loop = asyncio.get_running_loop() loop.slow_callback_duration = 1 loop.call_soon...
# 发现回调时间长运行的回调函数 import asyncio import logging import sys import time # logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) def slow(): time.sleep(1.5) print('over') async def main(): loop = asyncio.get_running_loop() loop.slow_callback_duration = 1 loop.call_soon(slow) asyncio.run(ma...
zh
0.49356
# 发现回调时间长运行的回调函数 # logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
3.209054
3
synergy/mx/freerun_action_handler.py
mushkevych/scheduler
15
6628196
__author__ = '<NAME>' import json from synergy.db.model.freerun_process_entry import FreerunProcessEntry from synergy.db.dao.freerun_process_dao import FreerunProcessDao from synergy.mx.base_request_handler import valid_action_request from synergy.mx.abstract_action_handler import AbstractActionHandler from synergy.s...
__author__ = '<NAME>' import json from synergy.db.model.freerun_process_entry import FreerunProcessEntry from synergy.db.dao.freerun_process_dao import FreerunProcessDao from synergy.mx.base_request_handler import valid_action_request from synergy.mx.abstract_action_handler import AbstractActionHandler from synergy.s...
none
1
1.861231
2
gala/potential/potential/util.py
ltlancas/gala
1
6628197
# coding: utf-8 """ Utilities for Potential classes """ from __future__ import division, print_function # Third-party import numpy as np # Project from .core import PotentialBase __all__ = ['from_equation'] # def _classnamify(s): # s = [x.lower() for x in str(s).split()] # words = [] # for word in s:...
# coding: utf-8 """ Utilities for Potential classes """ from __future__ import division, print_function # Third-party import numpy as np # Project from .core import PotentialBase __all__ = ['from_equation'] # def _classnamify(s): # s = [x.lower() for x in str(s).split()] # words = [] # for word in s:...
en
0.636766
# coding: utf-8 Utilities for Potential classes # Third-party # Project # def _classnamify(s): # s = [x.lower() for x in str(s).split()] # words = [] # for word in s: # words.append(word.capitalize()) # return "".join(words) Create a potential class from an expression for the potential. .. ...
3.404757
3
vilya/views/api/repos/issues.py
mubashshirjamal/code
1,582
6628198
<gh_stars>1000+ # -*- coding: utf-8 -*- from vilya.libs import api_errors from vilya.models.project_issue import ProjectIssue from vilya.views.api.utils import RestAPIUI class IssuesUI(RestAPIUI): _q_exports = [] _q_methods = ['get', 'post'] def __init__(self, repo): self.repo = repo def ge...
# -*- coding: utf-8 -*- from vilya.libs import api_errors from vilya.models.project_issue import ProjectIssue from vilya.views.api.utils import RestAPIUI class IssuesUI(RestAPIUI): _q_exports = [] _q_methods = ['get', 'post'] def __init__(self, repo): self.repo = repo def get(self, request)...
en
0.769321
# -*- coding: utf-8 -*-
2.179425
2
test/test_ihate.py
Profpatsch/beets
0
6628199
<reponame>Profpatsch/beets<gh_stars>0 """Tests for the 'ihate' plugin""" from _common import unittest from beets import importer from beets.library import Item from beetsplug.ihate import IHatePlugin class IHatePluginTest(unittest.TestCase): def test_hate(self): match_pattern = {} test_item = I...
"""Tests for the 'ihate' plugin""" from _common import unittest from beets import importer from beets.library import Item from beetsplug.ihate import IHatePlugin class IHatePluginTest(unittest.TestCase): def test_hate(self): match_pattern = {} test_item = Item( genre='TestGenre', ...
en
0.936845
Tests for the 'ihate' plugin # Empty query should let it pass. # 1 query match. # 2 query matches, either should trigger. # Query is blocked by AND clause. # Both queries are blocked by AND clause with unmatched condition. # Only one query should fire.
2.318341
2
src/gardena/devices/base_device.py
codacy-badger/py-smart-gardena
10
6628200
<gh_stars>1-10 from gardena.base_gardena_class import BaseGardenaClass class BaseDevice(BaseGardenaClass): """Base class informations about gardena devices""" id = "N/A" type = "N/A" battery_level = "N/A" battery_state = "N/A" name = "N/A" rf_link_level = "N/A" rf_link_state = "N/A" ...
from gardena.base_gardena_class import BaseGardenaClass class BaseDevice(BaseGardenaClass): """Base class informations about gardena devices""" id = "N/A" type = "N/A" battery_level = "N/A" battery_state = "N/A" name = "N/A" rf_link_level = "N/A" rf_link_state = "N/A" serial = "N/...
en
0.777413
Base class informations about gardena devices # Only one common field
2.778723
3
kernel/components/intersection/__init__.py
rinceyuan/WeFe
39
6628201
<gh_stars>10-100 from kernel.components.intersection.dh.dh_intersect_promoter import DhIntersectionPromoter from kernel.components.intersection.dh.dh_intersect_provider import DhIntersectionProvider from kernel.components.intersection.dhkey.dh_key_intersect_promoter import DhKeyIntersectionPromoter from kernel.comp...
from kernel.components.intersection.dh.dh_intersect_promoter import DhIntersectionPromoter from kernel.components.intersection.dh.dh_intersect_provider import DhIntersectionProvider from kernel.components.intersection.dhkey.dh_key_intersect_promoter import DhKeyIntersectionPromoter from kernel.components.intersection.d...
none
1
1.198763
1
src/rascore/util/constants/gene.py
mitch-parker/rascore
7
6628202
# -*- coding: utf-8 -*- """ Copyright 2022 <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 ...
# -*- coding: utf-8 -*- """ Copyright 2022 <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 ...
en
0.85495
# -*- coding: utf-8 -*- Copyright 2022 <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 agr...
1.270099
1
paddlex/ppcls/arch/backbone/legendary_models/mobilenet_v1.py
cheneyveron/PaddleX
8
6628203
<reponame>cheneyveron/PaddleX # copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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.596675
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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.414943
1
applications/ShapeOptimizationApplication/tests/algorithm_penalized_projection_test/run_test.py
AndreaVoltan/MyKratos7.0
2
6628204
<reponame>AndreaVoltan/MyKratos7.0 # Making KratosMultiphysics backward compatible with python 2.6 and 2.7 from __future__ import print_function, absolute_import, division # Import Kratos core and apps from KratosMultiphysics import * from KratosMultiphysics.ShapeOptimizationApplication import * # Additional imports ...
# Making KratosMultiphysics backward compatible with python 2.6 and 2.7 from __future__ import print_function, absolute_import, division # Import Kratos core and apps from KratosMultiphysics import * from KratosMultiphysics.ShapeOptimizationApplication import * # Additional imports from KratosMultiphysics.KratosUnitt...
en
0.365951
# Making KratosMultiphysics backward compatible with python 2.6 and 2.7 # Import Kratos core and apps # Additional imports # Read parameters # ======================================================================================================= # Define external analyzer # ============================================...
2.204788
2
src/1.DataPreprocessing/slice_extraction.py
AdrianArnaiz/Brain-MRI-Autoencoder
18
6628205
<reponame>AdrianArnaiz/Brain-MRI-Autoencoder """ Python script for extract slices from IXI volumes. We will use DeepBrainSliceExtractor class """ __author__ = "<NAME>" __email__ = "<EMAIL>" # Path improvement configuration from os.path import dirname import os import sys import numpy as np import pickle as pkl scrip...
""" Python script for extract slices from IXI volumes. We will use DeepBrainSliceExtractor class """ __author__ = "<NAME>" __email__ = "<EMAIL>" # Path improvement configuration from os.path import dirname import os import sys import numpy as np import pickle as pkl script_path = dirname(__file__) sys.path.append(sc...
en
0.573708
Python script for extract slices from IXI volumes. We will use DeepBrainSliceExtractor class # Path improvement configuration
2.310735
2
python/playingthechanges/ptc_fetch.py
mbland/google-code-archive
1
6628206
<filename>python/playingthechanges/ptc_fetch.py #! /usr/bin/python # coding=UTF-8 """ Fetches the MP3 files from playingthechanges.com to import into iTunes. Author: <NAME> (<EMAIL>) http://mike-bland.com/ Date: 2014-03-13 License: Creative Commons Attribution 4.0 International (CC By 4.0) http:/...
<filename>python/playingthechanges/ptc_fetch.py #! /usr/bin/python # coding=UTF-8 """ Fetches the MP3 files from playingthechanges.com to import into iTunes. Author: <NAME> (<EMAIL>) http://mike-bland.com/ Date: 2014-03-13 License: Creative Commons Attribution 4.0 International (CC By 4.0) http:/...
en
0.69008
#! /usr/bin/python # coding=UTF-8 Fetches the MP3 files from playingthechanges.com to import into iTunes. Author: <NAME> (<EMAIL>) http://mike-bland.com/ Date: 2014-03-13 License: Creative Commons Attribution 4.0 International (CC By 4.0) http://creativecommons.org/licenses/by/4.0/deed.en_US Gra...
2.737031
3
dump_to_sqlite.py
hargup/stackexchange-dump-to-postgres
0
6628207
<reponame>hargup/stackexchange-dump-to-postgres import sqlite3 import os import xml.etree.cElementTree as etree import logging ANATHOMY = { 'badges': { 'Id': 'INTEGER', 'UserId': 'INTEGER', 'Class': 'INTEGER', 'Name': 'TEXT', 'Date': 'DATETIME', 'TagBased': 'BOOLEAN', }, 'comments': { ...
import sqlite3 import os import xml.etree.cElementTree as etree import logging ANATHOMY = { 'badges': { 'Id': 'INTEGER', 'UserId': 'INTEGER', 'Class': 'INTEGER', 'Name': 'TEXT', 'Date': 'DATETIME', 'TagBased': 'BOOLEAN', }, 'comments': { 'Id': 'INTEGER', 'PostId': 'INTEGER', '...
en
0.762276
# 1: Question, 2: Answer # (only present if PostTypeId is 2) # (only present if PostTypeId is 1) # (present only if user has not been deleted) # ="<NAME>" #="2009-03-05T22:28:34.823" #="2009-03-11T12:51:01.480" #(present only if post is community wikied) # - 1: AcceptedByOriginator # - 2: UpMod # - 3: DownMod # -...
2.306658
2
lib/app.py
steverice/SlackTeamStatus
1
6628208
import os import subprocess from io import BytesIO from os.path import expanduser from pathlib import Path from typing import Dict from typing import List from urllib.parse import ParseResult from urllib.parse import urlparse from urllib.request import urlopen import emoji_data_python import yaml from lib.anybar_clien...
import os import subprocess from io import BytesIO from os.path import expanduser from pathlib import Path from typing import Dict from typing import List from urllib.parse import ParseResult from urllib.parse import urlparse from urllib.request import urlopen import emoji_data_python import yaml from lib.anybar_clien...
en
0.527719
# This is a standard emoji # Standard emoji # Skin tone variant
1.953409
2
udemy Model Predictive Control/tempCodeRunnerFile.py
davWilk/udemy_courses
0
6628209
<gh_stars>0 # if psi_t_1 > 2*pi: # psi_t_1 = psi_t_1 % (2*pi)
# if psi_t_1 > 2*pi: # psi_t_1 = psi_t_1 % (2*pi)
eu
0.205783
# if psi_t_1 > 2*pi: # psi_t_1 = psi_t_1 % (2*pi)
1.762331
2
ansible/roles/jupyterhub/files/jupyterhub_config_lti11.py
SebastianM-C/illumidesk
0
6628210
import os from illumidesk.apis.setup_course_service import get_current_service_definitions from illumidesk.authenticators.authenticator import LTI11Authenticator from illumidesk.authenticators.authenticator import setup_course_hook from illumidesk.grades.handlers import SendGradesHandler from illumidesk.spawners.spawn...
import os from illumidesk.apis.setup_course_service import get_current_service_definitions from illumidesk.authenticators.authenticator import LTI11Authenticator from illumidesk.authenticators.authenticator import setup_course_hook from illumidesk.grades.handlers import SendGradesHandler from illumidesk.spawners.spawn...
de
0.563156
# load the base configuration file (with common settings) # noqa: F821 ########################################## # BEGIN JUPYTERHUB APPLICATION ########################################## # LTI 1.1 authenticator class. # Spawn end-user container and enable extensions by role ########################################## #...
1.659603
2
python_pillow_numpy/520.blur.diagonal.py
takenobu-hs/pixel-manipulation-examples
0
6628211
from PIL import Image import numpy as np #-- read and convert im1 = Image.open('../images/img002.png').convert('RGB') im1nd = np.array(im1) width, height = im1.size im3 = np.zeros_like(im1nd) #-- filter coeff d = 2 n = (d*2+1)*(d*2+1) k = np.eye(5) / 5 #-- canvas loop for y in range(d, height-d): for x in ...
from PIL import Image import numpy as np #-- read and convert im1 = Image.open('../images/img002.png').convert('RGB') im1nd = np.array(im1) width, height = im1.size im3 = np.zeros_like(im1nd) #-- filter coeff d = 2 n = (d*2+1)*(d*2+1) k = np.eye(5) / 5 #-- canvas loop for y in range(d, height-d): for x in ...
pt
0.405706
#-- read and convert #-- filter coeff #-- canvas loop #-- get window #-- filter #-- put #-- save to png
3.084611
3
pre_commit_hooks/_version.py
devanshshukla99/pre-commit-hook-prohibit-string
0
6628212
# coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control version = '0.1.dev4+g713f51e' version_tuple = (0, 1, 'dev4+g713f51e')
# coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control version = '0.1.dev4+g713f51e' version_tuple = (0, 1, 'dev4+g713f51e')
en
0.964309
# coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control
0.998511
1
chatBotStable/actions.py
JKhan01/SM446_TeamXYZ
0
6628213
<reponame>JKhan01/SM446_TeamXYZ # This files contains your custom actions which can be used to run # custom Python code. # # See this guide on how to implement these action: # https://rasa.com/docs/rasa/core/actions/#custom-actions/ # This is a simple example for a custom action which utters "Hello World!" from typi...
# This files contains your custom actions which can be used to run # custom Python code. # # See this guide on how to implement these action: # https://rasa.com/docs/rasa/core/actions/#custom-actions/ # This is a simple example for a custom action which utters "Hello World!" from typing import Any, Text, Dict, List ...
en
0.437236
# This files contains your custom actions which can be used to run # custom Python code. # # See this guide on how to implement these action: # https://rasa.com/docs/rasa/core/actions/#custom-actions/ # This is a simple example for a custom action which utters "Hello World!" # if (tracker.get_slot("bitbucket_action")):...
2.600415
3
examples/TestTorchfly/MNIST/model.py
ECS-251-W2020/final-project-TorchFly
0
6628214
from abc import ABC, abstractmethod import torch import torch.nn as nn import torch.nn.functional as F from typing import Any, Dict class FlyModule(nn.Module, ABC): def __init__(self, *args, **kwargs): super().__init__() self.config = args[0] @abstractmethod def forward(self, *args, **kwa...
from abc import ABC, abstractmethod import torch import torch.nn as nn import torch.nn.functional as F from typing import Any, Dict class FlyModule(nn.Module, ABC): def __init__(self, *args, **kwargs): super().__init__() self.config = args[0] @abstractmethod def forward(self, *args, **kwa...
none
1
2.822729
3
Python/StringToIntegerAtoi.py
TonnyL/Windary
205
6628215
# -*- coding: UTF-8 -*- # # Implement atoi to convert a string to an integer. # # Hint: Carefully consider all possible input cases. If you want a challenge, # please do not see below and ask yourself what are the possible input cases. # # Notes: It is intended for this problem to be specified vaguely (ie, no given inp...
# -*- coding: UTF-8 -*- # # Implement atoi to convert a string to an integer. # # Hint: Carefully consider all possible input cases. If you want a challenge, # please do not see below and ask yourself what are the possible input cases. # # Notes: It is intended for this problem to be specified vaguely (ie, no given inp...
en
0.68676
# -*- coding: UTF-8 -*- # # Implement atoi to convert a string to an integer. # # Hint: Carefully consider all possible input cases. If you want a challenge, # please do not see below and ask yourself what are the possible input cases. # # Notes: It is intended for this problem to be specified vaguely (ie, no given inp...
3.247653
3
jamon/game/common/writer.py
jrburga/JamOn
3
6628216
##################################################################### # # writer.py # # Copyright (c) 2015, <NAME> # # Released under the MIT License (http://opensource.org/licenses/MIT) # ##################################################################### import numpy as np import os.path import wave from audio imp...
##################################################################### # # writer.py # # Copyright (c) 2015, <NAME> # # Released under the MIT License (http://opensource.org/licenses/MIT) # ##################################################################### import numpy as np import os.path import wave from audio imp...
en
0.396942
##################################################################### # # writer.py # # Copyright (c) 2015, <NAME> # # Released under the MIT License (http://opensource.org/licenses/MIT) # ##################################################################### # only use a single channel if we are in stereo # look for a ...
3.141351
3
src/paginateProcessDataTrainTestFiles.py
aws-samples/aim317-uncover-insights-customer-conversations
0
6628217
<filename>src/paginateProcessDataTrainTestFiles.py import boto3 import os import io import pandas as pd def lambda_handler(event, context): s3 = boto3.client('s3') raw_data = s3.get_object(Bucket=os.environ['comprehendBucket'], Key='comprehend/train/aim317-cust-class-train-data.csv') raw_content = pd.read...
<filename>src/paginateProcessDataTrainTestFiles.py import boto3 import os import io import pandas as pd def lambda_handler(event, context): s3 = boto3.client('s3') raw_data = s3.get_object(Bucket=os.environ['comprehendBucket'], Key='comprehend/train/aim317-cust-class-train-data.csv') raw_content = pd.read...
none
1
2.44084
2
magicauth/forms.py
JMIdeaMaker/django-magicauth
36
6628218
from django import forms from django.contrib.auth import get_user_model from django.utils.module_loading import import_string from django.core.validators import RegexValidator from django.core.exceptions import ValidationError from django_otp import user_has_device, devices_for_user from magicauth import settings as ...
from django import forms from django.contrib.auth import get_user_model from django.utils.module_loading import import_string from django.core.validators import RegexValidator from django.core.exceptions import ValidationError from django_otp import user_has_device, devices_for_user from magicauth import settings as ...
none
1
2.179513
2
dp/kth-largest-element-in-an-array.py
Neulana/leetcode
2
6628219
<gh_stars>1-10 """ 在未排序的数组中找到第 k 个最大的元素。请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。 示例 1: 输入: [3,2,1,5,6,4] 和 k = 2 输出: 5 示例 2: 输入: [3,2,3,1,2,4,5,5,6] 和 k = 4 输出: 4 说明: 你可以假设 k 总是有效的,且 1 ≤ k ≤ 数组的长度。 """ import random class Solution(object): def findKthLargest(self, nums, k): """ :type A: List[int] ...
""" 在未排序的数组中找到第 k 个最大的元素。请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。 示例 1: 输入: [3,2,1,5,6,4] 和 k = 2 输出: 5 示例 2: 输入: [3,2,3,1,2,4,5,5,6] 和 k = 4 输出: 4 说明: 你可以假设 k 总是有效的,且 1 ≤ k ≤ 数组的长度。 """ import random class Solution(object): def findKthLargest(self, nums, k): """ :type A: List[int] :type k: int ...
zh
0.964521
在未排序的数组中找到第 k 个最大的元素。请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。 示例 1: 输入: [3,2,1,5,6,4] 和 k = 2 输出: 5 示例 2: 输入: [3,2,3,1,2,4,5,5,6] 和 k = 4 输出: 4 说明: 你可以假设 k 总是有效的,且 1 ≤ k ≤ 数组的长度。 :type A: List[int] :type k: int :rtype: int
3.553932
4
test/sampleData/raspberrypi/ExampleSpiRegister.py
polfeliu/cyanobyte
70
6628220
# Copyright (C) 2019 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 or agreed to in writing, ...
# Copyright (C) 2019 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 or agreed to in writing, ...
en
0.800418
# Copyright (C) 2019 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 or agreed to in writing, ...
2.343322
2
guiengine_test.py
megatron0000/ces22-xadrez
0
6628221
import unittest from guiengine import * def initpygame(): pygame.init() pygame.display.set_mode((800, 600)) class TestEventBus(unittest.TestCase): def gen_cb(self, number): def cb(data): if data == 1: self.called[number] = True return cb def setUp(self...
import unittest from guiengine import * def initpygame(): pygame.init() pygame.display.set_mode((800, 600)) class TestEventBus(unittest.TestCase): def gen_cb(self, number): def cb(data): if data == 1: self.called[number] = True return cb def setUp(self...
pt
0.9725
# EventBus.active(None) # self.assertIsNone(EventBus.active()) :type outer TestOuterBus TODO: Testar MouseAware... ou não... # Deve retornar a mesma várias vezes, a não ser quando conteúdo ou cor mudar # Mesmo com esse evento, update_render ainda será chamado # porque a troca de cenas é "lazy" (só acontece quando dou t...
2.795155
3
homeassistant/components/notify/__init__.py
TastyPi/home-assistant
13
6628222
""" Provides functionality to notify people. For more details about this component, please refer to the documentation at https://home-assistant.io/components/notify/ """ import logging import os from functools import partial import voluptuous as vol import homeassistant.bootstrap as bootstrap import homeassistant.he...
""" Provides functionality to notify people. For more details about this component, please refer to the documentation at https://home-assistant.io/components/notify/ """ import logging import os from functools import partial import voluptuous as vol import homeassistant.bootstrap as bootstrap import homeassistant.he...
en
0.727835
Provides functionality to notify people. For more details about this component, please refer to the documentation at https://home-assistant.io/components/notify/ # Platform specific data # Text to notify user of # Target of the notification (user, device, etc) # Title of notification Send a notification message. Setup...
2.619767
3
napalm_ebayjunos/__init__.py
eBay/pynetforce
16
6628223
from junos_ebay import JunOsEbayDriver
from junos_ebay import JunOsEbayDriver
none
1
1.053681
1
ai_gym_train/gym_linefollower/__init__.py
michalnand/line_follower_rl
2
6628224
<filename>ai_gym_train/gym_linefollower/__init__.py from gym_linefollower.linefollower_bot import * from gym_linefollower.linefollower_env import * from gym_linefollower.motors import * from gym_linefollower.observation import * from gym_linefollower.track_load import *
<filename>ai_gym_train/gym_linefollower/__init__.py from gym_linefollower.linefollower_bot import * from gym_linefollower.linefollower_env import * from gym_linefollower.motors import * from gym_linefollower.observation import * from gym_linefollower.track_load import *
none
1
1.374831
1
api/migrations/versions/472bf293e0a1_.py
cclauss/Baobab
52
6628225
<gh_stars>10-100 """empty message Revision ID: <KEY> Revises: ('79c61673a487', '7e8bffa88454') Create Date: 2019-06-18 11:32:36.203013 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = ('79c61673a487', '7e8bffa88454') from alembic import op import sqlalchemy as sa def upgrade(): ...
"""empty message Revision ID: <KEY> Revises: ('79c61673a487', '7e8bffa88454') Create Date: 2019-06-18 11:32:36.203013 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = ('79c61673a487', '7e8bffa88454') from alembic import op import sqlalchemy as sa def upgrade(): pass def downgr...
en
0.251734
empty message Revision ID: <KEY> Revises: ('79c61673a487', '7e8bffa88454') Create Date: 2019-06-18 11:32:36.203013 # revision identifiers, used by Alembic.
1.011595
1
argparse_schema.py
FebruaryBreeze/argparse-schema
0
6628226
<reponame>FebruaryBreeze/argparse-schema import argparse import json import sys from pathlib import Path from typing import Any, Optional, Sequence, Union class Kwargs: def __init__(self): self.type = None self.default: Any = None self.required: bool = False self.help: Optional[str...
import argparse import json import sys from pathlib import Path from typing import Any, Optional, Sequence, Union class Kwargs: def __init__(self): self.type = None self.default: Any = None self.required: bool = False self.help: Optional[str] = None self.action: Optional[st...
en
0.478815
# pragma: no cover # pragma: no cover
2.784801
3
src/pythere/__main__.py
clint-lawrence/pythere
0
6628227
""" 1. Put you code into script/__main__.py 2. List any dependencies in script/requirements.txt (Optional) 3. Run "pythere user@remotehost script/" Pythere bundles any files in the script folder and execute on remote host. If script/requirements.txt exists, the listed dependencies will be available. (Only pure python ...
""" 1. Put you code into script/__main__.py 2. List any dependencies in script/requirements.txt (Optional) 3. Run "pythere user@remotehost script/" Pythere bundles any files in the script folder and execute on remote host. If script/requirements.txt exists, the listed dependencies will be available. (Only pure python ...
en
0.752616
1. Put you code into script/__main__.py 2. List any dependencies in script/requirements.txt (Optional) 3. Run "pythere user@remotehost script/" Pythere bundles any files in the script folder and execute on remote host. If script/requirements.txt exists, the listed dependencies will be available. (Only pure python pack...
2.502644
3
Python/SonicController.py
johnmwright/GaragePi
3
6628228
import RPi.GPIO as GPIO import time class SonicController: SPEED_OF_SOUND = 34000 #cm/s def __init__(self, triggerPin, echoPin): self.triggerPin = triggerPin self.echoPin = echoPin print("Initializing Ultrasonic Range Finder") GPIO.setup(self.triggerPin, GPIO.OUT, pull_up_down = GPIO.PUD_DOWN) ...
import RPi.GPIO as GPIO import time class SonicController: SPEED_OF_SOUND = 34000 #cm/s def __init__(self, triggerPin, echoPin): self.triggerPin = triggerPin self.echoPin = echoPin print("Initializing Ultrasonic Range Finder") GPIO.setup(self.triggerPin, GPIO.OUT, pull_up_down = GPIO.PUD_DOWN) ...
en
0.842303
#cm/s #sec # # Take multiple readings in order to counter the affects of # bad data due to non-realtime OS. Take a bunch of readings, # throw out the min and max, then average the rest. #
3.246076
3
Build_Web_With_Flask/Building web applications with Flask_Code/chapter04/chapter04/ex2.py
abacuspix/NFV_project
0
6628229
<gh_stars>0 # coding:utf-8 from wtforms import Form, ValidationError from wtforms import StringField, PasswordField from wtforms.validators import Length, InputRequired from werkzeug.datastructures import MultiDict import re def is_proper_username(form, field): if not re.match(r"^\w+$", field.data): msg...
# coding:utf-8 from wtforms import Form, ValidationError from wtforms import StringField, PasswordField from wtforms.validators import Length, InputRequired from werkzeug.datastructures import MultiDict import re def is_proper_username(form, field): if not re.match(r"^\w+$", field.data): msg = '%s shoul...
en
0.988085
# coding:utf-8 # has at least one uppercase character # has at least one number # has at least one special character
3.07591
3
pyclick/click_models/CM.py
gaudel/ranking_bandits
3
6628230
# # Copyright (C) 2015 <NAME> # # Full copyright notice can be found in LICENSE. # from __future__ import division from enum import Enum from pyclick.click_models.ClickModel import ClickModel from pyclick.click_models.Inference import MLEInference from pyclick.click_models.Param import ParamMLE from pyclick.click_mod...
# # Copyright (C) 2015 <NAME> # # Full copyright notice can be found in LICENSE. # from __future__ import division from enum import Enum from pyclick.click_models.ClickModel import ClickModel from pyclick.click_models.Inference import MLEInference from pyclick.click_models.Param import ParamMLE from pyclick.click_mod...
en
0.706594
# # Copyright (C) 2015 <NAME> # # Full copyright notice can be found in LICENSE. # The cascade click model (CM) according to the following paper: Craswell, Nick and Zoeter, Onno and Taylor, Michael and <NAME>. An experimental comparison of click position-bias models. Proceedings of WSDM, pages 87-94, 2008....
2.454369
2
TestGame.py
maythetsan13/PythonExercises
0
6628231
<reponame>maythetsan13/PythonExercises print("Hello") print("may")
print("Hello") print("may")
none
1
1.679951
2
src/sentry/runner/commands/exec.py
AlexWayfer/sentry
4
6628232
<filename>src/sentry/runner/commands/exec.py """ sentry.runner.commands.exec ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import six import sys import click # ...
<filename>src/sentry/runner/commands/exec.py """ sentry.runner.commands.exec ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import six import sys import click # ...
en
0.741611
sentry.runner.commands.exec ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. # If this changes, make sure to also update in the `__doc__` \ %(header)s try: %(body)s except Exception: import traceback traceback.p...
2.251971
2
solutions/python3/problem58.py
tjyiiuan/LeetCode
0
6628233
<filename>solutions/python3/problem58.py # -*- coding: utf-8 -*- """ 58. Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word do...
<filename>solutions/python3/problem58.py # -*- coding: utf-8 -*- """ 58. Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word do...
en
0.808311
# -*- coding: utf-8 -*- 58. Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word does not exist, return 0. Note: A word is defi...
3.952168
4
RobotMbed/src/test/resources/function/microbit_text_join_test.py
KevinLiu1010/openroberta-lab
1
6628234
<reponame>KevinLiu1010/openroberta-lab<filename>RobotMbed/src/test/resources/function/microbit_text_join_test.py import microbit import random import math class BreakOutOfALoop(Exception): pass class ContinueLoop(Exception): pass timer1 = microbit.running_time() item = "a" def run(): global timer1, item item...
import microbit import random import math class BreakOutOfALoop(Exception): pass class ContinueLoop(Exception): pass timer1 = microbit.running_time() item = "a" def run(): global timer1, item item = "".join(str(arg) for arg in ["sadf", "sdf"]) def main(): try: run() except Exception as e: ...
none
1
2.776121
3
tools/mytools/ARIA/src/py/aria/OrderedDict.py
fmareuil/Galaxy_test_pasteur
0
6628235
<reponame>fmareuil/Galaxy_test_pasteur """ ARIA -- Ambiguous Restraints for Iterative Assignment A software for automated NOE assignment Version 2.3 Copyright (C) <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> All rights reserved. NO WARRANTY. ...
""" ARIA -- Ambiguous Restraints for Iterative Assignment A software for automated NOE assignment Version 2.3 Copyright (C) <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> All rights reserved. NO WARRANTY. This software package is provided 'as i...
en
0.78598
ARIA -- Ambiguous Restraints for Iterative Assignment A software for automated NOE assignment Version 2.3 Copyright (C) <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> All rights reserved. NO WARRANTY. This software package is provided 'as is' without warr...
2.873028
3
Regular_expression/RE_check.py
waixd001/python_program_storage
0
6628236
# -*- coding: utf-8 -*- import numpy as np code = "1111011000111110110" RE = np.array[['S','0S'], ['S','1A'], ['S','0' ], ['A','1' ], ['A','1S'], ['A','0B'], ['B','1A'], ['B','0B']] print(RE)
# -*- coding: utf-8 -*- import numpy as np code = "1111011000111110110" RE = np.array[['S','0S'], ['S','1A'], ['S','0' ], ['A','1' ], ['A','1S'], ['A','0B'], ['B','1A'], ['B','0B']] print(RE)
en
0.769321
# -*- coding: utf-8 -*-
3.109059
3
setup.py
caramdache/data-importer
0
6628237
# encoding: utf-8 import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import data_importer def readme(): try: os.system('pandoc --from=markdown --to=rst README.md -o README.rst') with open('README.rst') as f: return f...
# encoding: utf-8 import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import data_importer def readme(): try: os.system('pandoc --from=markdown --to=rst README.md -o README.rst') with open('README.rst') as f: return f...
en
0.892281
# encoding: utf-8 **Django Data Importer** is a tool which allow you to transform easily a CSV, XML, XLS and XLSX file into a python object or a django model instance. It is based on the django-style declarative model. # import here, cause outside the eggs aren't loaded
1.950457
2
posts/tests.py
je-ss-y/Insta-memories
0
6628238
from django.test import TestCase from .models import Image,Profile,Comment from django.contrib.auth.models import User # Create your tests here. class ImageTestClass(TestCase): # set up method def setUp(self): self.user=User.objects.create(username='jessy') # self.profile=Profile.objects.create(i...
from django.test import TestCase from .models import Image,Profile,Comment from django.contrib.auth.models import User # Create your tests here. class ImageTestClass(TestCase): # set up method def setUp(self): self.user=User.objects.create(username='jessy') # self.profile=Profile.objects.create(i...
en
0.500054
# Create your tests here. # set up method # self.profile=Profile.objects.create(id=1,user=jessica,bio=creating,profile_photo="") #testing instance # self.assertTrue(isinstance(self.profile.Profile)) # set up method #testing instance
2.48617
2
Savage Chickens/savage_chickens.py
CAVIND46016/Web-Comics-Scraping
5
6628239
<reponame>CAVIND46016/Web-Comics-Scraping """ Web scrapes the comic website and creates a pdf version of it. """ import urllib.request as urllib2 import http import os from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support im...
""" Web scrapes the comic website and creates a pdf version of it. """ import urllib.request as urllib2 import http import os from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from seleni...
en
0.780106
Web scrapes the comic website and creates a pdf version of it. # <NAME> | <NAME> - Cartoons on Sticky Notes by <NAME> # Fixing the 'IncompleteRead' bug using http # https://stackoverflow.com/questions/14149100/incompleteread-using-httplib # firefox browser object Web scraping logic #Recursive logic Entry-point for the ...
3.395773
3
octavia/tests/unit/controller/worker/v2/tasks/test_network_tasks.py
buty4649/octavia
0
6628240
<reponame>buty4649/octavia # Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 2015 Hewlett-Packard Development Company, L.P. # # 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...
en
0.856245
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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...
1.398157
1
modules/models/example_loader.py
vwegmayr/entrack
1
6628241
<gh_stars>1-10 """This module contains functionality to load tractography training data. Credit goes to <NAME> Todo: Update doc """ import os import numpy as np import nibabel as nib import functools print = functools.partial(print, flush=True) def aff_to_rot(aff): """Computes the rotation matrix corresp...
"""This module contains functionality to load tractography training data. Credit goes to <NAME> Todo: Update doc """ import os import numpy as np import nibabel as nib import functools print = functools.partial(print, flush=True) def aff_to_rot(aff): """Computes the rotation matrix corresponding to the g...
en
0.791549
This module contains functionality to load tractography training data. Credit goes to <NAME> Todo: Update doc Computes the rotation matrix corresponding to the given affine matrix. Args: aff: The affine matrix (4, 4). Returns: rotation: The (3, 3) matrix corresponding to the rotation in t...
3.110762
3
third_party/webrtc/src/chromium/src/tools/perf/measurements/page_cycler.py
bopopescu/webrtc-streaming-node
8
6628242
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The page cycler measurement. This measurement registers a window load handler in which is forces a layout and then records the value of performance.now()...
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The page cycler measurement. This measurement registers a window load handler in which is forces a layout and then records the value of performance.now()...
en
0.915817
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. The page cycler measurement. This measurement registers a window load handler in which is forces a layout and then records the value of performance.now(). Th...
2.352242
2
provision/management/commands/checkipzmarkers.py
NOAA-GSD/qrba_os
1
6628243
<filename>provision/management/commands/checkipzmarkers.py # https://stackoverflow.com/questions/19475955/using-django-models-in-external-python-script from django.core.management.base import BaseCommand, CommandError from provision.models import IPzone, NfsExport, Restriction class Command(BaseCommand): help = ...
<filename>provision/management/commands/checkipzmarkers.py # https://stackoverflow.com/questions/19475955/using-django-models-in-external-python-script from django.core.management.base import BaseCommand, CommandError from provision.models import IPzone, NfsExport, Restriction class Command(BaseCommand): help = ...
en
0.426733
# https://stackoverflow.com/questions/19475955/using-django-models-in-external-python-script # z.set_ipaddrs(ipzmarker) # else: # print( "ipzmarker " + str(ipzmarker) + " found for z " + str(z) ) # ipzmarker = z.get_ipzone_marker() # ipaddrs = z.get_ipaddrs() # if str(ipzmarker) not in str(ipaddrs): # print( " ...
2.24996
2
great_expectations/rule_based_profiler/domain_builder/simple_semantic_type_domain_builder.py
victorcouste/great_expectations
2
6628244
from typing import Any, Dict, List, Optional, Union import great_expectations.exceptions as ge_exceptions from great_expectations import DataContext from great_expectations.core.batch import BatchRequest from great_expectations.execution_engine.execution_engine import MetricDomainTypes from great_expectations.profile....
from typing import Any, Dict, List, Optional, Union import great_expectations.exceptions as ge_exceptions from great_expectations import DataContext from great_expectations.core.batch import BatchRequest from great_expectations.execution_engine.execution_engine import MetricDomainTypes from great_expectations.profile....
en
0.708816
This DomainBuilder utilizes a "best-effort" semantic interpretation of ("storage") columns of a table. Args: data_context: DataContext batch_request: specified in DomainBuilder configuration to get Batch objects for domain computation. Find the semantic column type for each column and return all...
2.037777
2
opportunities/migrations/0013_auto_20210103_0116.py
MrEscape54/CRM
0
6628245
<reponame>MrEscape54/CRM # Generated by Django 3.1.4 on 2021-01-03 04:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0018_auto_20201230_1302'), ('opportunities', '0012_auto_20210103_0100'), ] ...
# Generated by Django 3.1.4 on 2021-01-03 04:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0018_auto_20201230_1302'), ('opportunities', '0012_auto_20210103_0100'), ] operations = [ ...
en
0.799879
# Generated by Django 3.1.4 on 2021-01-03 04:16
1.499081
1
antelope_core/entities/entities.py
AntelopeLCA/core
1
6628246
<filename>antelope_core/entities/entities.py from __future__ import print_function, unicode_literals import uuid from itertools import chain from numbers import Number from antelope import CatalogRef, BaseEntity, PropertyExists from synonym_dict import LowerDict entity_types = ('process', 'flow', 'quantity', 'fragm...
<filename>antelope_core/entities/entities.py from __future__ import print_function, unicode_literals import uuid from itertools import chain from numbers import Number from antelope import CatalogRef, BaseEntity, PropertyExists from synonym_dict import LowerDict entity_types = ('process', 'flow', 'quantity', 'fragm...
en
0.81832
All LC entities behave like dicts, but they all have some common properties, defined here. # memoize this Used to distinguish between entities and catalog refs (which answer False) :return: True for LcEntity subclasses This is used to propagate a change in origin semantics. Provide a dict that maps old origins ...
2.149227
2
tests/_util.py
Bouke/invoke
0
6628247
import os import sys try: import termios except ImportError: # Not available on Windows termios = None from contextlib import contextmanager from invoke.vendor.six import BytesIO, b, iteritems, wraps from mock import patch, Mock from spec import trap, Spec, eq_, ok_, skip from invoke import Program, Runn...
import os import sys try: import termios except ImportError: # Not available on Windows termios = None from contextlib import contextmanager from invoke.vendor.six import BytesIO, b, iteritems, wraps from mock import patch, Mock from spec import trap, Spec, eq_, ok_, skip from invoke import Program, Runn...
en
0.876372
# Not available on Windows # Preserve environment for later restore # Always do things relative to tests/_support # Chdir back to project root to avoid problems # Nuke changes to environ # Strip any test-support task collections from sys.modules to prevent # state bleed between tests; otherwise tests can incorrectly pa...
1.891033
2
trinity-eth2/components/eth2/discv5/component.py
vapory-testing/trinity-vap2
14
6628248
<reponame>vapory-testing/trinity-vap2<gh_stars>10-100 from argparse import ArgumentParser, _SubParsersAction import logging import pathlib import async_service from eth.db.backends.level import LevelDB from eth_keys.datatypes import PrivateKey from eth_utils import decode_hex, encode_hex from eth_utils.toolz import me...
from argparse import ArgumentParser, _SubParsersAction import logging import pathlib import async_service from eth.db.backends.level import LevelDB from eth_keys.datatypes import PrivateKey from eth_utils import decode_hex, encode_hex from eth_utils.toolz import merge from lahja import EndpointAPI from p2p.abc import ...
it
0.364061
# noqa: E501 # noqa: E501
1.460134
1
adlmagics/adlmagics/test/testcases/session_service_test.py
Azure/Azure-Data-Service-Notebook
6
6628249
import unittest from adlmagics.services.session_service import SessionService from adlmagics.session_consts import * from adlmagics.test.mocks.mock_json_persister import MockJsonPersister class SessionServiceTest(unittest.TestCase): def test_get_session_item_post_initialization(self): self.assertEqual(se...
import unittest from adlmagics.services.session_service import SessionService from adlmagics.session_consts import * from adlmagics.test.mocks.mock_json_persister import MockJsonPersister class SessionServiceTest(unittest.TestCase): def test_get_session_item_post_initialization(self): self.assertEqual(se...
none
1
2.339111
2
device_tree_overlays/dtogen/__init__.py
fpga-open-speech-tools/simulink_codegen
2
6628250
<reponame>fpga-open-speech-tools/simulink_codegen __title__ = 'dtogen' __author__ = '<NAME> <<EMAIL>>, <NAME> <<EMAIL>>' __license__ = 'GPL v3' __copyright__ = 'Copyright 2020 Audio Logic'
__title__ = 'dtogen' __author__ = '<NAME> <<EMAIL>>, <NAME> <<EMAIL>>' __license__ = 'GPL v3' __copyright__ = 'Copyright 2020 Audio Logic'
none
1
0.923102
1