repo_name
stringlengths
7
94
repo_path
stringlengths
4
237
repo_head_hexsha
stringlengths
40
40
content
stringlengths
10
680k
apis
stringlengths
2
680k
scmarquez/Hause-Price-Kaggle-Competition
analisis_de_variables.py
5fe32fed87a7bf2c6e5f41761ea1c4dd00761f21
# -*- coding: utf-8 -*- """ Created on Fri Dec 29 16:40:53 2017 @author: Sergio """ #Analisis de variables import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn import ensemble, tree, linear_model from sklearn.model_selection import train_test_split, cr...
[((470, 503), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (493, 503), False, 'import warnings\n'), ((605, 629), 'pandas.read_csv', 'pd.read_csv', (['"""train.csv"""'], {}), "('train.csv')\n", (616, 629), True, 'import pandas as pd\n'), ((692, 715), 'pandas.read_csv', 'p...
mdatsev/prostgres
query-gen.py
3418258a8b832546ef4d5009867bf1cf79248b7b
import random import sys ntables = 100 ncols = 100 nrows = 10000 def printstderr(s): sys.stderr.write(s + '\n') sys.stderr.flush() def get_value(): return random.randint(-99999999, 99999999) for t in range(ntables): printstderr(f'{t}/{ntables}') print(f"create table x ({','.join(['x int'] * ncols)});") ...
[((89, 115), 'sys.stderr.write', 'sys.stderr.write', (["(s + '\\n')"], {}), "(s + '\\n')\n", (105, 115), False, 'import sys\n'), ((118, 136), 'sys.stderr.flush', 'sys.stderr.flush', ([], {}), '()\n', (134, 136), False, 'import sys\n'), ((164, 199), 'random.randint', 'random.randint', (['(-99999999)', '(99999999)'], {})...
joshbenner/sensu-ansible-role
molecule/default/tests/test_default.py
ecc92ba3462d7edf50ad96ddda61080ba58c29f8
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_packages(host): package = host.package('sensu') assert package.is_installed assert '1.7.0' in package.version def test_di...
[]
moepman/wgskex
wgskex/worker/netlink.py
7a931088b5910f8034ad5a1362777e08c47c42fe
import hashlib import logging import re from dataclasses import dataclass from datetime import datetime, timedelta from textwrap import wrap from typing import Dict, List from pyroute2 import IPRoute, NDB, WireGuard from wgskex.common.utils import mac2eui64 logger = logging.getLogger(__name__) # TODO make loglevel c...
[((270, 297), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (287, 297), False, 'import logging\n'), ((502, 515), 'hashlib.md5', 'hashlib.md5', ([], {}), '()\n', (513, 515), False, 'import hashlib\n'), ((633, 652), 'textwrap.wrap', 'wrap', (['hashed_key', '(2)'], {}), '(hashed_key, 2)\n',...
Ju99ernaut/super-fastapi
api/main.py
83c232bcaff1006d413a9945ced3ba398b673505
import uvicorn from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from routes import items import config from constants import * config.parse_args() app = FastAPI( title="API", description="API boilerplate", version="1.0.0", openapi_tags=API_TAGS_METADATA, ) app.add_midd...
[((161, 180), 'config.parse_args', 'config.parse_args', ([], {}), '()\n', (178, 180), False, 'import config\n'), ((187, 291), 'fastapi.FastAPI', 'FastAPI', ([], {'title': '"""API"""', 'description': '"""API boilerplate"""', 'version': '"""1.0.0"""', 'openapi_tags': 'API_TAGS_METADATA'}), "(title='API', description='API...
vallka/djellifique
gellifinsta/models.py
fb84fba6be413f9d38276d89ae84aeaff761218f
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.html import mark_safe # Create your models here. class Gellifinsta(models.Model): class Meta: ordering = ['-taken_at_datetime'] shortcode = models.CharField(_("Shortcode"), max_length=20) taken_...
[((279, 293), 'django.utils.translation.ugettext_lazy', '_', (['"""Shortcode"""'], {}), "('Shortcode')\n", (280, 293), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((355, 368), 'django.utils.translation.ugettext_lazy', '_', (['"""taken at"""'], {}), "('taken at')\n", (356, 368), True, 'from djang...
wsqy/sacn_server
scanBase/migrations/0003_ipsection.py
e91a41a71b27926fbcfbe3f22bbb6bbc61b39461
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-01-16 13:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('scanBase', '0002_auto_20180116_1321'), ] operations ...
[((430, 523), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (446, 523), False, 'from django.db import migrations, models\...
LostCow/KLUE
sts/train.py
73b1b0526cf6b1b6f5ef535b9527d8abe6ca1a77
import argparse import numpy as np import os import torch from transformers import AutoTokenizer, AutoConfig, Trainer, TrainingArguments from model import RobertaForStsRegression from dataset import KlueStsWithSentenceMaskDataset from utils import read_json, seed_everything from metric import compute_metrics def ma...
[((419, 470), 'transformers.AutoConfig.from_pretrained', 'AutoConfig.from_pretrained', (['args.model_name_or_path'], {}), '(args.model_name_or_path)\n', (445, 470), False, 'from transformers import AutoTokenizer, AutoConfig, Trainer, TrainingArguments\n'), ((527, 581), 'transformers.AutoTokenizer.from_pretrained', 'Aut...
walkr/nanoservice
test/test_base_client.py
e2098986b1baa5f283167ae487d14f3c6c21961a
import unittest from nanoservice import Responder from nanoservice import Requester class BaseTestCase(unittest.TestCase): def setUp(self): addr = 'inproc://test' self.client = Requester(addr) self.service = Responder(addr) self.service.register('divide', lambda x, y: x / y) ...
[((1744, 1759), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1757, 1759), False, 'import unittest\n'), ((201, 216), 'nanoservice.Requester', 'Requester', (['addr'], {}), '(addr)\n', (210, 216), False, 'from nanoservice import Requester\n'), ((240, 255), 'nanoservice.Responder', 'Responder', (['addr'], {}), '(ad...
chidioguejiofor/airtech-api
airtech_api/flight/models.py
45d77da0cc4230dd3cb7ab4cbb5168a9239850f5
from airtech_api.utils.auditable_model import AuditableBaseModel from django.db import models # Create your models here. class Flight(AuditableBaseModel): class Meta: db_table = 'Flight' capacity = models.IntegerField(null=False) location = models.TextField(null=False) destination = models.Te...
[((217, 248), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'null': '(False)'}), '(null=False)\n', (236, 248), False, 'from django.db import models\n'), ((264, 292), 'django.db.models.TextField', 'models.TextField', ([], {'null': '(False)'}), '(null=False)\n', (280, 292), False, 'from django.db import m...
kaka-lin/autonomous-driving-notes
Sensor Fusion and Tracking/Kalman Filters/Gaussian/gaussian.py
6c1b29752d6deb679637766b6cea5c6fe5b72319
import numpy as np import matplotlib.pyplot as plt def gaussian(x, mean, std): std2 = np.power(std, 2) return (1 / np.sqrt(2* np.pi * std2)) * np.exp(-.5 * (x - mean)**2 / std2) if __name__ == "__main__": gauss_1 = gaussian(10, 8, 2) # 0.12098536225957168 gauss_2 = gaussian(10, 10, 2) # 0.1994711402...
[((92, 108), 'numpy.power', 'np.power', (['std', '(2)'], {}), '(std, 2)\n', (100, 108), True, 'import numpy as np\n'), ((482, 499), 'numpy.sqrt', 'np.sqrt', (['variance'], {}), '(variance)\n', (489, 499), True, 'import numpy as np\n'), ((556, 579), 'numpy.arange', 'np.arange', (['(-5)', '(5)', '(0.001)'], {}), '(-5, 5,...
fazillatheef/lsbasi
part19/test_interpreter.py
07e1a14516156a21ebe2d82e0bae4bba5ad73dd6
import unittest class LexerTestCase(unittest.TestCase): def makeLexer(self, text): from spi import Lexer lexer = Lexer(text) return lexer def test_tokens(self): from spi import TokenType records = ( ('234', TokenType.INTEGER_CONST, 234), ('3.14'...
[((9013, 9028), 'unittest.main', 'unittest.main', ([], {}), '()\n', (9026, 9028), False, 'import unittest\n'), ((135, 146), 'spi.Lexer', 'Lexer', (['text'], {}), '(text)\n', (140, 146), False, 'from spi import Lexer, Parser, SemanticAnalyzer, Interpreter\n'), ((1535, 1546), 'spi.Lexer', 'Lexer', (['text'], {}), '(text)...
Ferlern/Arctic-Tundra
bot_components/configurator.py
407b8c38c31f6c930df662e87ced527b9fd26c61
import json from typing import TypedDict from .bot_emoji import AdditionalEmoji class Warn(TypedDict): text: str mute_time: int ban: bool class PersonalVoice(TypedDict): categoty: int price: int slot_price: int bitrate_price: int class System(TypedDict): token: str initial_exte...
[((1303, 1343), 'json.dump', 'json.dump', (['to_dump', 'write_file'], {'indent': '(4)'}), '(to_dump, write_file, indent=4)\n', (1312, 1343), False, 'import json\n'), ((1454, 1475), 'json.load', 'json.load', (['write_file'], {}), '(write_file)\n', (1463, 1475), False, 'import json\n')]
ihash5/reinforcement-learning
recnn/utils/plot.py
c72e9db33c6ed6abd34e9f48012189369b7cd5d0
from scipy.spatial import distance from scipy import ndimage import matplotlib.pyplot as plt import torch from scipy import stats import numpy as np def pairwise_distances_fig(embs): embs = embs.detach().cpu().numpy() similarity_matrix_cos = distance.cdist(embs, embs, 'cosine') similarity_matrix_euc = dis...
[((252, 288), 'scipy.spatial.distance.cdist', 'distance.cdist', (['embs', 'embs', '"""cosine"""'], {}), "(embs, embs, 'cosine')\n", (266, 288), False, 'from scipy.spatial import distance\n'), ((317, 356), 'scipy.spatial.distance.cdist', 'distance.cdist', (['embs', 'embs', '"""euclidean"""'], {}), "(embs, embs, 'euclide...
pazzy-stack/twilio
tests/integration/insights/v1/call/test_metric.py
d3b9b9f1b17b9de89b2528e8d2ffd33edf9676e0
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class MetricTestCase(Integratio...
[((393, 410), 'twilio.http.response.Response', 'Response', (['(500)', '""""""'], {}), "(500, '')\n", (401, 410), False, 'from twilio.http.response import Response\n'), ((641, 747), 'tests.holodeck.Request', 'Request', (['"""get"""', '"""https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Metrics"""'...
essepuntato/comp-think
2017-2018/lecture-notes/python/02-algorithms_listing_8_contains_word.py
3dac317bda0eb7650adc4a92c1ccb8a4ce87a3a6
def contains_word(first_word, second_word, bibliographic_entry): contains_first_word = first_word in bibliographic_entry contains_second_word = second_word in bibliographic_entry if contains_first_word and contains_second_word: return 2 elif contains_first_word or contains_second_word: ...
[]
ivaivalous/ivodb
backend/user/scripter.py
e9b0969225fdb725d35a2ecfab21f87d1d9b2a00
#!/usr/bin/env python import responses from selenium import webdriver # This file contains/references the default JS # used to provide functions dealing with input/output SCRIPT_RUNNER = "runner.html" ENCODING = 'utf-8' PAGE_LOAD_TIMEOUT = 5 PAGE_LOAD_TIMEOUT_MS = PAGE_LOAD_TIMEOUT * 1000 capabilities = webdriver.D...
[((1038, 1092), 'selenium.webdriver.PhantomJS', 'webdriver.PhantomJS', ([], {'desired_capabilities': 'capabilities'}), '(desired_capabilities=capabilities)\n', (1057, 1092), False, 'from selenium import webdriver\n'), ((1637, 1668), 'responses.get_invalid_request', 'responses.get_invalid_request', ([], {}), '()\n', (16...
luhouxiang/byrobot
bwtougu/api/names.py
e110e7865965a344d2b61cb925c959cee1387758
#!/usr/bin/env python # -*- coding: utf-8 -*- VALID_HISTORY_FIELDS = [ 'datetime', 'open', 'close', 'high', 'low', 'total_turnover', 'volume', 'acc_net_value', 'discount_rate', 'unit_net_value', 'limit_up', 'limit_down', 'open_interest', 'basis_spread', 'settlement', 'prev_settlement' ] VALID_GET_PRICE_FI...
[]
dveni/causal-text-embeddings
src/PeerRead/data_cleaning/process_PeerRead_abstracts.py
82104f3fb6fd540cf98cb4ca0fd5b5d1fb5f757a
""" Simple pre-processing for PeerRead papers. Takes in JSON formatted data from ScienceParse and outputs a tfrecord Reference example: https://github.com/tensorlayer/tensorlayer/blob/9528da50dfcaf9f0f81fba9453e488a1e6c8ee8f/examples/data_process/tutorial_tfrecord3.py """ import argparse import glob import os import...
[((676, 692), 'random.Random', 'random.Random', (['(0)'], {}), '(0)\n', (689, 692), False, 'import random\n'), ((781, 817), 'PeerRead.ScienceParse.Paper.Paper.from_json', 'Paper.from_json', (['paper_json_filename'], {}), '(paper_json_filename)\n', (796, 817), False, 'from PeerRead.ScienceParse.Paper import Paper\n'), (...
An7ar35/python-app-skeleton-structure
app/packageB/__init__.py
9060411bd32840c6510ad8fe18dcdc097c07b511
__all__=['module1']
[]
ZakDoesGaming/OregonTrail
lib/shop.py
90cab35536ac5c6ba9e772ac5c29c914017c9c23
from pygame import Surface, font from copy import copy from random import randint, choice import string from lib.transactionButton import TransactionButton SHOP_PREFIX = ["archer", "baker", "fisher", "miller", "rancher", "robber"] SHOP_SUFFIX = ["cave", "creek", "desert", "farm", "field", "forest", "hill", "lake", "m...
[((1236, 1271), 'pygame.font.Font', 'font.Font', (['"""res/fonts/west.ttf"""', '(17)'], {}), "('res/fonts/west.ttf', 17)\n", (1245, 1271), False, 'from pygame import Surface, font\n'), ((1290, 1325), 'pygame.font.Font', 'font.Font', (['"""res/fonts/west.ttf"""', '(15)'], {}), "('res/fonts/west.ttf', 15)\n", (1299, 1325...
ajmal017/amp
core/dataflow/test/test_runners.py
8de7e3b88be87605ec3bad03c139ac64eb460e5c
import logging import numpy as np import core.dataflow as dtf import helpers.unit_test as hut _LOG = logging.getLogger(__name__) class TestRollingFitPredictDagRunner(hut.TestCase): def test1(self) -> None: """ Test the DagRunner using `ArmaReturnsBuilder` """ dag_builder = dtf....
[((104, 131), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (121, 131), False, 'import logging\n'), ((316, 340), 'core.dataflow.ArmaReturnsBuilder', 'dtf.ArmaReturnsBuilder', ([], {}), '()\n', (338, 340), True, 'import core.dataflow as dtf\n'), ((459, 631), 'core.dataflow.RollingFitPredi...
hmnk-1967/OCR-Python-Project-CS-BUIC
Main Project/Main_Program.py
28c72d9913a25655f6183a7b960e527a0432c8e1
import tkinter.messagebox from tkinter import * import tkinter as tk from tkinter import filedialog import numpy import pytesseract #Python wrapper for Google-owned OCR engine known by the name of Tesseract. import cv2 from PIL import Image, ImageTk import os root = tk.Tk() root.title("Object Character Recognizer") ro...
[((268, 275), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (273, 275), True, 'import tkinter as tk\n'), ((3726, 3783), 'tkinter.LabelFrame', 'tk.LabelFrame', (['root'], {'text': '"""Image:"""', 'width': '(768)', 'height': '(600)'}), "(root, text='Image:', width=768, height=600)\n", (3739, 3783), True, 'import tkinter as tk...
wainshine/tensorflow
third_party/nasm/workspace.bzl
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
"""loads the nasm library, used by TF.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): tf_http_archive( name = "nasm", urls = [ "https://storage.googleapis.com/mirror.tensorflow.org/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2", "http://p...
[]
wence-/libCEED
python/tests/test-1-vector.py
c785ad36304ed34c5edefb75cf1a0fe5445db17b
# Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at # the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights # reserved. See files LICENSE and NOTICE for details. # # This file is part of CEED, a collection of benchmarks, miniapps, software # libraries and APIs for efficient h...
[((1674, 1701), 'libceed.Ceed', 'libceed.Ceed', (['ceed_resource'], {}), '(ceed_resource)\n', (1686, 1701), False, 'import libceed\n'), ((2155, 2182), 'libceed.Ceed', 'libceed.Ceed', (['ceed_resource'], {}), '(ceed_resource)\n', (2167, 2182), False, 'import libceed\n'), ((2857, 2884), 'libceed.Ceed', 'libceed.Ceed', ([...
aperezpredictia/ESMValCore
esmvalcore/cmor/_fixes/cmip6/cesm2.py
d5bf3f459ff3a43e780d75d57b63b88b6cc8c4f2
"""Fixes for CESM2 model.""" from ..fix import Fix from ..shared import (add_scalar_depth_coord, add_scalar_height_coord, add_scalar_typeland_coord, add_scalar_typesea_coord) class Fgco2(Fix): """Fixes for fgco2.""" def fix_metadata(self, cubes): """Add depth (0m) coordinate. ...
[]
vitay/YouTubeFacesDB
examples/GenerateSubset.py
e7225e8d775ad64889fbee57a4452a25573a0360
from YouTubeFacesDB import generate_ytf_database ############################################################################### # Create the dataset ############################################################################### generate_ytf_database( directory= '../data',#'/scratch/vitay/Datasets/YouTubeFaces'...
[((231, 383), 'YouTubeFacesDB.generate_ytf_database', 'generate_ytf_database', ([], {'directory': '"""../data"""', 'filename': '"""ytfdb.h5"""', 'labels': '(10)', 'max_number': '(-1)', 'size': '(100, 100)', 'color': '(False)', 'bw_first': '(True)', 'cropped': '(True)'}), "(directory='../data', filename='ytfdb.h5', labe...
opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/billing/tests/test_price_current.py
cad9966389dc9b52b13d2301940c99cf4b243900
from freezegun import freeze_time from rest_framework import test from waldur_mastermind.billing.tests.utils import get_financial_report_url from waldur_mastermind.invoices import models as invoice_models from waldur_mastermind.invoices.tests import factories as invoice_factories from waldur_mastermind.invoices.tests ...
[((359, 384), 'freezegun.freeze_time', 'freeze_time', (['"""2017-01-10"""'], {}), "('2017-01-10')\n", (370, 384), False, 'from freezegun import freeze_time\n'), ((482, 515), 'waldur_mastermind.invoices.tests.fixtures.InvoiceFixture', 'invoice_fixtures.InvoiceFixture', ([], {}), '()\n', (513, 515), True, 'from waldur_ma...
ejfitzgerald/agents-aea
tests/test_cli/test_utils/test_utils.py
6411fcba8af2cdf55a3005939ae8129df92e8c3e
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
[((2790, 2875), 'unittest.mock.patch', 'mock.patch', (['"""aea.cli.utils.package_utils.os.path.join"""'], {'return_value': '"""some-path"""'}), "('aea.cli.utils.package_utils.os.path.join', return_value='some-path'\n )\n", (2800, 2875), False, 'from unittest import TestCase, mock\n'), ((3979, 4064), 'unittest.mock.p...
SanjarbekSaminjonov/musofirlar.backend
api/flat/urls.py
23b09e90cc4e3d153063ad1768b5ae1c18ff866d
from django.urls import path from . import views urlpatterns = [ path('', views.FlatListAPIView.as_view()), path('create/', views.FlatCreateAPIView.as_view()), path('<int:pk>/', views.FlatDetailAPIView.as_view()), path('<int:pk>/update/', views.FlatUpdateAPIView.as_view()), path('<int:pk>/delete/'...
[]
hsky77/hyssop
hyssop_aiohttp/component/__init__.py
4ab1e82f9e2592de56589c7426a037564bef49a6
# Copyright (C) 2020-Present the hyssop authors and contributors. # # This module is part of hyssop and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ''' File created: January 1st 2021 Modified By: hsky77 Last Updated: January 7th 2021 15:30:08 pm ''' from hyssop.project.com...
[]
tGhattas/IMP-seamless-cloning
run_clone.py
2c81e0bd9bc99955afe06ec4eea187a5a42761e3
import cv2 import getopt import sys from gui import MaskPainter, MaskMover from clone import seamless_cloning, shepards_seamless_cloning from utils import read_image, plt from os import path def usage(): print( "Usage: python run_clone.py [options] \n\n\ Options: \n\ \t-h\t Flag to specify...
[((1937, 1966), 'utils.read_image', 'read_image', (["args['source']", '(2)'], {}), "(args['source'], 2)\n", (1947, 1966), False, 'from utils import read_image, plt\n'), ((1980, 2009), 'utils.read_image', 'read_image', (["args['target']", '(2)'], {}), "(args['target'], 2)\n", (1990, 2009), False, 'from utils import read...
Punkweb/punkweb-boards
punkweb_boards/rest/serializers.py
8934d15fbff2a3ce9191fdb19d58d029eb55ef16
from rest_framework import serializers from punkweb_boards.conf.settings import SHOUTBOX_DISABLED_TAGS from punkweb_boards.models import ( BoardProfile, Category, Subcategory, Thread, Post, Conversation, Message, Report, Shout, ) class BoardProfileSerializer(serializers.ModelSerial...
[((344, 371), 'rest_framework.serializers.ReadOnlyField', 'serializers.ReadOnlyField', ([], {}), '()\n', (369, 371), False, 'from rest_framework import serializers\n'), ((388, 415), 'rest_framework.serializers.ReadOnlyField', 'serializers.ReadOnlyField', ([], {}), '()\n', (413, 415), False, 'from rest_framework import ...
ulise/hetida-designer
runtime/components/Statistic/moving_minimum_time.py
a6be8eb45abf950d5498e3ca756ea1d2e46b5c00
from hetdesrun.component.registration import register from hetdesrun.datatypes import DataType import pandas as pd import numpy as np # ***** DO NOT EDIT LINES BELOW ***** # These lines may be overwritten if input/output changes. @register( inputs={"data": DataType.Any, "t": DataType.String}, outputs={"movmin...
[((233, 333), 'hetdesrun.component.registration.register', 'register', ([], {'inputs': "{'data': DataType.Any, 't': DataType.String}", 'outputs': "{'movmin': DataType.Any}"}), "(inputs={'data': DataType.Any, 't': DataType.String}, outputs={\n 'movmin': DataType.Any})\n", (241, 333), False, 'from hetdesrun.component....
MikhailNakhatovich/rooms_painting
painter.py
51b92797c867d4bb1c8d42a58785c0f4dacd4075
import cv2 import ezdxf import numpy as np def draw_hatch(img, entity, color, mask): for poly_path in entity.paths.paths: # print(poly_path.path_type_flags) polygon = np.array([vertex[:-1] for vertex in poly_path.vertices]).astype(int) if poly_path.path_type_flags & 1 == 1: cv2...
[((1455, 1481), 'numpy.arange', 'np.arange', (['s', '(e + d / 2)', 'd'], {}), '(s, e + d / 2, d)\n', (1464, 1481), True, 'import numpy as np\n'), ((3039, 3062), 'ezdxf.readfile', 'ezdxf.readfile', (['in_path'], {}), '(in_path)\n', (3053, 3062), False, 'import ezdxf\n'), ((3306, 3324), 'numpy.zeros_like', 'np.zeros_like...
vascoalramos/misago-deployment
misago/misago/users/serializers/auth.py
20226072138403108046c0afad9d99eb4163cedc
from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import serializers from ...acl.useracl import serialize_user_acl from .user import UserSerializer User = get_user_model() __all__ = ["AuthenticatedUserSerializer", "AnonymousUserSerializer"] class AuthFlags: def ...
[((206, 222), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (220, 222), False, 'from django.contrib.auth import get_user_model\n'), ((547, 582), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', ([], {}), '()\n', (580, 582), False, 'from rest_framework ...
mohammadanarul/Ecommerce-Django-YT
shop/models.py
afecc8f41693925619b81986d979706c64175360
from ctypes.wintypes import CHAR from distutils.command.upload import upload from random import choice from telnetlib import STATUS from unicodedata import category from django.db import models from ckeditor.fields import RichTextField from taggit.managers import TaggableManager # Create your models here. from mptt.mo...
[((397, 441), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)', 'unique': '(True)'}), '(max_length=50, unique=True)\n', (413, 441), False, 'from django.db import models\n'), ((455, 555), 'mptt.models.TreeForeignKey', 'TreeForeignKey', (['"""self"""'], {'on_delete': 'models.CASCADE', 'null': ...
deeuu/supriya
supriya/patterns/NoteEvent.py
14fcb5316eccb4dafbe498932ceff56e1abb9d27
import uuid import supriya.commands import supriya.realtime from supriya.patterns.Event import Event class NoteEvent(Event): ### CLASS VARIABLES ### __slots__ = () ### INITIALIZER ### def __init__( self, add_action=None, delta=None, duration=None, is_stop=T...
[((1208, 1220), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (1218, 1220), False, 'import uuid\n'), ((3193, 3205), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (3203, 3205), False, 'import uuid\n')]
ApacheAA/LastSeen
emoji_utils.py
1fe675b3ee3072d56e9fe094d1d80e1f7d876215
# unicode digit emojis # digits from '0' to '9' zero_digit_code = zd = 48 # excluded digits excl_digits = [2, 4, 5, 7] # unicode digit keycap udkc = '\U0000fe0f\U000020e3' hours_0_9 = [chr(i) + udkc for i in range(zd, zd + 10) if i - zd not in excl_digits] # number '10' emoji hours_0_9.append('\U0001f51f') # ...
[]
Sniper970119/ExampleForTransformers
TFBertForMaskedLM/main.py
3348525957c38b2a45898d4f4652879933503b25
# -*- coding:utf-8 -*- """ ┏┛ ┻━━━━━┛ ┻┓ ┃       ┃ ┃   ━   ┃ ┃ ┳┛  ┗┳ ┃ ┃       ┃ ┃   ┻   ┃ ┃       ┃ ┗━┓   ┏━━━┛ ┃   ┃ 神兽保佑 ┃   ┃ 代码无BUG! ┃   ┗━━━━━━━━━┓ ┃CREATE BY SNIPER┣┓ ┃     ┏┛ ┗━┓ ┓ ┏━━━┳ ┓ ┏━┛ ...
[((421, 472), 'tensorflow.config.experimental.list_physical_devices', 'tf.config.experimental.list_physical_devices', (['"""GPU"""'], {}), "('GPU')\n", (465, 472), True, 'import tensorflow as tf\n'), ((602, 650), 'transformers.BertTokenizer.from_pretrained', 'BertTokenizer.from_pretrained', (['"""bert-base-cased"""'], ...
gcastellan0s/mirariapp
mirari/TCS/migrations/0042_auto_20190726_0145.py
24a9db06d10f96c894d817ef7ccfeec2a25788b7
# Generated by Django 2.0.5 on 2019-07-26 06:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('TCS', '0041_auto_20190726_0030'), ] operations = [ migrations.AlterModelOptions( name='modelo', options={'default_permission...
[((223, 645), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""modelo"""', 'options': "{'default_permissions': [], 'ordering': ['-id'], 'permissions': [(\n 'Can_View__Modelo', 'Ve modelos'), ('Can_Create__Modelo',\n 'Crea modelos'), ('Can_Update__Modelo', 'Modifica model...
belltailjp/kornia
kornia/geometry/calibration/undistort.py
cfa3b6823d55e276893847f1c3f06ddf108c606a
import torch from kornia.geometry.linalg import transform_points from kornia.geometry.transform import remap from kornia.utils import create_meshgrid from .distort import distort_points, tilt_projection # Based on https://github.com/opencv/opencv/blob/master/modules/calib3d/src/undistort.dispatch.cpp#L384 def undis...
[((3764, 3787), 'torch.stack', 'torch.stack', (['[x, y]', '(-1)'], {}), '([x, y], -1)\n', (3775, 3787), False, 'import torch\n'), ((5543, 5604), 'kornia.utils.create_meshgrid', 'create_meshgrid', (['rows', 'cols', '(False)', 'image.device', 'image.dtype'], {}), '(rows, cols, False, image.device, image.dtype)\n', (5558,...
o-Ian/Practice-Python
Tests/Aula_7a.py
1e4b2d0788e70006096a53a7cf038db3148ba4b7
n1 = int(input('Digite um valor: ')) n2 = int(input('Digite outro valor: ')) print('A soma é: {}!' .format(n1+n2)) print('A subtração entre {} e {} é {}!' .format(n1, n2, n1-n2)) print('A multiplicação desses valores é {}!' .format(n1 * n2)) print('A divisão entre {} e {} é {:.3}' .format(n1, n2, n1/n2)) print('A divis...
[]
shuvro-zz/manubot
manubot/cite/tests/test_citekey_api.py
9023b7fbfa0b235c14a4d702516bc0cd6d3101ed
"""Tests API-level functions in manubot.cite. Both functions are found in citekey.py""" import pytest from manubot.cite import citekey_to_csl_item, standardize_citekey @pytest.mark.parametrize( "citekey,expected", [ ("doi:10.5061/DRYAD.q447c/1", "doi:10.5061/dryad.q447c/1"), ("doi:10.5061/dr...
[((173, 854), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""citekey,expected"""', "[('doi:10.5061/DRYAD.q447c/1', 'doi:10.5061/dryad.q447c/1'), (\n 'doi:10.5061/dryad.q447c/1', 'doi:10.5061/dryad.q447c/1'), (\n 'doi:10/b6vnmd', 'doi:10.1016/s0933-3657(96)00367-3'), ('doi:10/B6VNMD',\n 'doi:10.101...
hmaarrfk/vispy
vispy/io/datasets.py
7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from os import path as op from ..util import load_data_file # This is the package data dir, not the dir for config, etc. DATA_DIR = op.join...
[((321, 341), 'os.path.dirname', 'op.dirname', (['__file__'], {}), '(__file__)\n', (331, 341), True, 'from os import path as op\n'), ((1080, 1124), 'numpy.zeros', 'np.zeros', (['(value.shape + (4,))'], {'dtype': 'np.ubyte'}), '(value.shape + (4,), dtype=np.ubyte)\n', (1088, 1124), True, 'import numpy as np\n'), ((1178,...
jehung/universal_portfolio
universal_portfolio/knapsack.py
de731a6166ff057c8d6f3f73f80f9aca151805fa
# -*- coding: utf-8 -*- from __future__ import print_function import numpy as np np.random.seed(1335) # for reproducibility np.set_printoptions(precision=5, suppress=True, linewidth=150) import os import pandas as pd import backtest as twp from matplotlib import pyplot as plt from sklearn import metrics, preprocessin...
[((82, 102), 'numpy.random.seed', 'np.random.seed', (['(1335)'], {}), '(1335)\n', (96, 102), True, 'import numpy as np\n'), ((126, 188), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(5)', 'suppress': '(True)', 'linewidth': '(150)'}), '(precision=5, suppress=True, linewidth=150)\n', (145, 188), T...
bask0/q10hybrid
experiments/experiment_01.py
9b18af9dd382c65dd667139f97e7da0241091a2c
import pytorch_lightning as pl import optuna import xarray as xr from pytorch_lightning.callbacks.early_stopping import EarlyStopping from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint import os import shutil from argparse import ArgumentParser from datetime import datetime from project.fluxda...
[((5383, 5419), 'pytorch_lightning.Trainer.add_argparse_args', 'pl.Trainer.add_argparse_args', (['parser'], {}), '(parser)\n', (5411, 5419), True, 'import pytorch_lightning as pl\n'), ((5433, 5473), 'models.hybrid.Q10Model.add_model_specific_args', 'Q10Model.add_model_specific_args', (['parser'], {}), '(parser)\n', (54...
warifp/InstagramPostAndDelete
main.py
d22577325eccf42e629cef076ab43f7788587bc4
#! @@Author : WAHYU ARIF PURNOMO #! @@Create : 18 Januari 2019 #! @@Modify : 19 Januari 2019 #! Gambar dari reddit. #! Gunakan VPN karena DNS situs reddit sudah di blokir dari negara Indonesia. import os import json import requests import progressbar from PIL import Image from lxml import html from time import sleep f...
[((663, 681), 'os.system', 'os.system', (['"""pause"""'], {}), "('pause')\n", (672, 681), False, 'import os\n'), ((484, 504), 'InstagramAPI.InstagramAPI.login', 'InstagramAPI.login', ([], {}), '()\n', (502, 504), False, 'from InstagramAPI import InstagramAPI\n'), ((2490, 2509), 'os.remove', 'os.remove', (['bad_file'], ...
maximilionus/pyspectator-x
pyspectator/collection.py
1265f1f39e7ca0534f9e6ffcd7087f2ebced3397
from collections import MutableMapping, Container from datetime import datetime, timedelta from pyvalid import accepts class LimitedTimeTable(MutableMapping, Container): def __init__(self, time_span): self.__storage = dict() self.__time_span = None self.time_span = time_span @propert...
[((407, 433), 'pyvalid.accepts', 'accepts', (['object', 'timedelta'], {}), '(object, timedelta)\n', (414, 433), False, 'from pyvalid import accepts\n'), ((1711, 1744), 'pyvalid.accepts', 'accepts', (['object', 'datetime', 'object'], {}), '(object, datetime, object)\n', (1718, 1744), False, 'from pyvalid import accepts\...
AndySamoil/Elite_Code
keyboardrow.py
7dc3b7b1b8688c932474f8a10fd2637fd2918bdd
def findWords(self, words: List[str]) -> List[str]: ''' sets and iterate through sets ''' every = [set("qwertyuiop"), set("asdfghjkl"), set("zxcvbnm")] ans = [] for word in words: l = len(word) for sett in every: ...
[]
xli1110/LC
DFS_Backtracking/31. Next Permutation.py
3c18b8809c5a21a62903060eef659654e0595036
class Solution: def __init__(self): self.res = [] self.path = [] def arr_to_num(self, arr): s = "" for x in arr: s += str(x) return int(s) def find_position(self, nums): for i in range(len(self.res)): if self.res[i] == nums: ...
[]
konradotto/TS
plugin/DataExport/extend.py
bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e
#!/usr/bin/python # Copyright (C) 2015 Ion Torrent Systems, Inc. All Rights Reserved import subprocess import re pluginName = 'DataExport' pluginDir = "" networkFS = ["nfs", "cifs"] localFS = ["ext4", "ext3", "xfs", "ntfs", "exfat", "vboxsf"] supportedFS = ",".join(localFS + networkFS) def test(bucket): return...
[((359, 430), 'subprocess.Popen', 'subprocess.Popen', (['exe'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.STDOUT'}), '(exe, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n', (375, 430), False, 'import subprocess\n'), ((519, 590), 'subprocess.Popen', 'subprocess.Popen', (['exe'], {'stdout': 'subprocess.PIP...
PaulAustin/sb7-pgz
boids/biods_object.py
fca3e50132b9d1894fb348b2082e83ce7b937b19
# Ported from JavaSript version to Python and Pygame Zero # Designed to work well with mu-editor environment. # # The original Javascript version wasdonw by Ben Eater # at https://github.com/beneater/boids (MIT License) # No endorsement implied. # # Complex numbers are are used as vectors to integrate x and y positions...
[((1349, 1373), 'random.randint', 'random.randint', (['(0)', 'WIDTH'], {}), '(0, WIDTH)\n', (1363, 1373), False, 'import random\n'), ((1389, 1414), 'random.randint', 'random.randint', (['(0)', 'HEIGHT'], {}), '(0, HEIGHT)\n', (1403, 1414), False, 'import random\n'), ((1458, 1497), 'random.randint', 'random.randint', ([...
UpOut/UpOutDF
upoutdf/types/recurring/yearly.py
5d2f87884565d98b77e25c6a26af7dbea266be76
# coding: utf-8 import pytz from dateutil.relativedelta import relativedelta from .base import BaseRecurring from upoutdf.occurences import OccurenceBlock, OccurenceGroup from upoutdf.constants import YEARLY_TYPE class YearlyType(BaseRecurring): year_day = None required_attributes = [ 'every', ...
[((478, 510), 'dateutil.relativedelta.relativedelta', 'relativedelta', ([], {'years': '(+self.every)'}), '(years=+self.every)\n', (491, 510), False, 'from dateutil.relativedelta import relativedelta\n'), ((3441, 3621), 'upoutdf.occurences.OccurenceBlock', 'OccurenceBlock', ([], {'starting_date': 'occurence_start', 'end...
dbinetti/captable
project/urls.py
29769b2b99a3185fda241b3087ccbe621f8c97a2
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView urlpatterns = patterns( '', url(r'^$', TemplateView.as_view(template_name='home.html'), ...
[((86, 106), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (104, 106), False, 'from django.contrib import admin\n'), ((599, 624), 'django.contrib.staticfiles.urls.staticfiles_urlpatterns', 'staticfiles_urlpatterns', ([], {}), '()\n', (622, 624), False, 'from django.contrib.staticfiles.url...
marjanhs/procon20
common/evaluators/bert_emotion_evaluator.py
c49ad38a77e58fd84ff0409cc9f5081c6de0bf0b
import warnings import numpy as np import torch import torch.nn.functional as F from sklearn import metrics from torch.utils.data import DataLoader, SequentialSampler, TensorDataset from tqdm import tqdm from datasets.bert_processors.abstract_processor import convert_examples_to_features_with_emotion, \ ...
[((539, 572), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (562, 572), False, 'import warnings\n'), ((785, 858), 'utils.tokenization.BertTokenizer.from_pretrained', 'BertTokenizer.from_pretrained', (['args.model'], {'is_lowercase': 'args.is_lowercase'}), '(args.model, is...
andrearosasco/DistilledReplay
model/mlp1.py
2a4efa88d22b9afc7016f07549114688f346dbe8
import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self, config): super(Model, self).__init__() self.drop = nn.Dropout(config['dropout']) self.fc1 = nn.Linear(784, 2000) self.fc2 = nn.Linear(2000, 2000) self.fc3 = nn.Linea...
[((177, 206), 'torch.nn.Dropout', 'nn.Dropout', (["config['dropout']"], {}), "(config['dropout'])\n", (187, 206), True, 'import torch.nn as nn\n'), ((229, 249), 'torch.nn.Linear', 'nn.Linear', (['(784)', '(2000)'], {}), '(784, 2000)\n', (238, 249), True, 'import torch.nn as nn\n'), ((270, 291), 'torch.nn.Linear', 'nn.L...
aslafy-z/netbox
netbox/ipam/managers.py
a5512dd4c46c005df8752fc330c1382ac22b31ea
from django.db import models from ipam.lookups import Host, Inet class IPAddressManager(models.Manager): def get_queryset(self): """ By default, PostgreSQL will order INETs with shorter (larger) prefix lengths ahead of those with longer (smaller) masks. This makes no sense when ordering ...
[((727, 742), 'ipam.lookups.Host', 'Host', (['"""address"""'], {}), "('address')\n", (731, 742), False, 'from ipam.lookups import Host, Inet\n')]
VArdulov/learning-kis
train.py
2637f08d5e8027a22feff17064be45ea51f738e5
#!/usr/bin/env python # coding: utf-8 """ Learning Koopman Invariant Subspace (c) Naoya Takeishi, 2017. takeishi@ailab.t.u-tokyo.ac.jp """ import numpy as np np.random.seed(1234567890) from argparse import ArgumentParser from os import path import time from lkis import TimeSeriesBatchMaker, KoopmanInvariantSubspa...
[((162, 188), 'numpy.random.seed', 'np.random.seed', (['(1234567890)'], {}), '(1234567890)\n', (176, 188), True, 'import numpy as np\n'), ((516, 527), 'time.time', 'time.time', ([], {}), '()\n', (525, 527), False, 'import time\n'), ((537, 627), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""Learn...
KenWoo/Algorithm
Algorithms/Easy/1200. Minimum Absolute Difference/answer.py
4012a2f0a099a502df1e5df2e39faa75fe6463e8
from typing import List class Solution: def minimumAbsDifference(self, arr: List[int]) -> List[List[int]]: arr.sort() res = [] min_diff = arr[1] - arr[0] res.append([arr[0], arr[1]]) for i in range(1, len(arr)-1): diff = arr[i+1]-arr[i] if diff < min...
[]
VijayStroup/Physics_Problem_Solver_Basic
resources/physequations.py
fc6944475ed8bcfe91bbd207734c3f9aee31e0fe
import math def close(expected, actual, maxerror): '''checks to see if the actual number is within expected +- maxerror.''' low = expected - maxerror high = expected + maxerror if actual >= low and actual <= high: return True else: return False def grav_potential_energy(mass, height, gravity=9.81): '''calcu...
[((859, 878), 'math.radians', 'math.radians', (['angle'], {}), '(angle)\n', (871, 878), False, 'import math\n'), ((886, 904), 'math.cos', 'math.cos', (['anglerad'], {}), '(anglerad)\n', (894, 904), False, 'import math\n')]
andycon/PyMVPA
mvpa2/tests/test_erdataset.py
67f7ee68012e3a1128168c583d6c83303b7a2c27
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
[((1272, 1327), 'mvpa2.datasets.dataset_wizard', 'dataset_wizard', (['samples'], {'targets': 'targets', 'chunks': 'chunks'}), '(samples, targets=targets, chunks=chunks)\n', (1286, 1327), False, 'from mvpa2.datasets import dataset_wizard\n'), ((1384, 1439), 'mvpa2.datasets.eventrelated.find_events', 'find_events', ([], ...
aksr-aashish/FIREXUSERBOT
userbot/plugins/delfp.py
dff0b7bf028cb27779626ce523402346cc990402
from telethon.tl.functions.photos import DeletePhotosRequest, GetUserPhotosRequest from telethon.tl.types import InputPhoto from userbot.cmdhelp import CmdHelp from userbot.utils import admin_cmd, edit_or_reply, sudo_cmd CmdHelp("delfp").add_command("delpfp", None, "delete ur currnt profile picture").add() @borg.on...
[((321, 354), 'userbot.utils.admin_cmd', 'admin_cmd', ([], {'pattern': '"""delpfp ?(.*)"""'}), "(pattern='delpfp ?(.*)')\n", (330, 354), False, 'from userbot.utils import admin_cmd, edit_or_reply, sudo_cmd\n'), ((365, 414), 'userbot.utils.sudo_cmd', 'sudo_cmd', ([], {'pattern': '"""delpfp ?(.*)"""', 'allow_sudo': '(Tru...
pplonski/automlbenchmark
amlb/benchmarks/file.py
f49ddfa2583643173296ed8ab45a8c14c62a6987
import logging import os from typing import List, Tuple, Optional from amlb.utils import config_load, Namespace log = logging.getLogger(__name__) def _find_local_benchmark_definition(name: str, benchmark_definition_dirs: List[str]) -> str: # 'name' should be either a full path to the benchmark, # or a filen...
[((120, 147), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (137, 147), False, 'import logging\n'), ((379, 399), 'os.path.exists', 'os.path.exists', (['name'], {}), '(name)\n', (393, 399), False, 'import os\n'), ((1156, 1183), 'amlb.utils.config_load', 'config_load', (['benchmark_file'],...
eyesoft/pybuspro
pybuspro/devices/control.py
9a178117be2db40ef1399cc60afdc18e251682bc
from ..core.telegram import Telegram from ..helpers.enums import OperateCode class _Control: def __init__(self, buspro): self._buspro = buspro self.subnet_id = None self.device_id = None @staticmethod def build_telegram_from_control(control): if control is None: ...
[]
eunchong/infra
appengine/chrome_infra_console_loadtest/main.py
ce3728559112bfb3e8b32137eada517aec6d22f9
# Copyright 2015 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. import logging import endpoints import random import webapp2 from apiclient import discovery from google.appengine.ext import ndb from oauth2client.client i...
[((2190, 2241), 'components.auth.endpoints_api', 'auth.endpoints_api', ([], {'name': '"""consoleapp"""', 'version': '"""v1"""'}), "(name='consoleapp', version='v1')\n", (2208, 2241), False, 'from components import auth\n'), ((2670, 2713), 'components.auth.endpoints_api', 'auth.endpoints_api', ([], {'name': '"""ui"""', ...
usnistgov/dioptra
src/mitre/securingai/restapi/task_plugin/controller.py
08a08e96c27787915bafc75a483431333e2c70ca
# This Software (Dioptra) is being made available as a public service by the # National Institute of Standards and Technology (NIST), an Agency of the United # States Department of Commerce. This software was developed in part by employees of # NIST and in part by NIST contractors. Copyright in portions of this softwar...
[((1802, 1831), 'structlog.stdlib.get_logger', 'structlog.stdlib.get_logger', ([], {}), '()\n', (1829, 1831), False, 'import structlog\n'), ((1850, 1920), 'flask_restx.Namespace', 'Namespace', (['"""TaskPlugin"""'], {'description': '"""Task plugin registry operations"""'}), "('TaskPlugin', description='Task plugin regi...
mjmaenpaa/dulwich
dulwich/tests/test_lru_cache.py
d13a0375f4cc3099ff1c6edacda97f317c28f67a
# Copyright (C) 2006, 2008 Canonical Ltd # # Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU # General Public License as public by the Free Software Foundation; version 2.0 # or (at your option) any later version. You can redistribute it and/or # modify it under the terms of either of these t...
[((1169, 1201), 'dulwich.lru_cache.LRUCache', 'lru_cache.LRUCache', ([], {'max_cache': '(10)'}), '(max_cache=10)\n', (1187, 1201), False, 'from dulwich import lru_cache\n'), ((1268, 1301), 'dulwich.lru_cache.LRUCache', 'lru_cache.LRUCache', ([], {'max_cache': '(256)'}), '(max_cache=256)\n', (1286, 1301), False, 'from d...
pedrotari7/advent_of_code
py/2016/5B.py
98d5bc8d903435624a019a5702f5421d7b4ef8c8
import md5 (i,count) = (0,0) password = ['']*8 while 1: key = 'reyedfim' + str(i) md = md5.new(key).hexdigest() if md[:5] == '00000': index = int(md[5],16) if index < len(password) and password[index]=='': password[index] = md[6] count += 1 if count ...
[]
lsica-scopely/mgear4
release/scripts/mgear/shifter_epic_components/EPIC_foot_01/__init__.py
28ed5d66370a9516da05d93d447bfc15f4c0c9f4
import pymel.core as pm import ast from pymel.core import datatypes from mgear.shifter import component from mgear.core import node, applyop, vector from mgear.core import attribute, transform, primitive class Component(component.Main): """Shifter component Class""" # ======================================...
[((556, 619), 'ast.literal_eval', 'ast.literal_eval', (["self.settings['jointNamesDescription_custom']"], {}), "(self.settings['jointNamesDescription_custom'])\n", (572, 619), False, 'import ast\n'), ((697, 725), 'pymel.core.upAxis', 'pm.upAxis', ([], {'q': '(True)', 'axis': '(True)'}), '(q=True, axis=True)\n', (706, 7...
Engerrs/ckan.org
streams/blog/migrations/0012_auto_20200928_1212.py
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
# Generated by Django 3.1.1 on 2020-09-28 12:12 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0011_blogpostpage_featured'), ] operations = [ migrations.RemoveField( model_name='blogpostpage', ...
[((251, 313), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""blogpostpage"""', 'name': '"""date"""'}), "(model_name='blogpostpage', name='date')\n", (273, 313), False, 'from django.db import migrations, models\n'), ((464, 527), 'django.db.models.DateTimeField', 'models.DateTimeFie...
rafaelpezzuto/opac
opac/webapp/main/views.py
9b54202350e262a27cb9cb756a892185b288df24
# coding: utf-8 import logging import requests import mimetypes from io import BytesIO from urllib.parse import urlparse from datetime import datetime, timedelta from collections import OrderedDict from flask_babelex import gettext as _ from flask import ( render_template, abort, current_app, request, ...
[((1059, 1086), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1076, 1086), False, 'import logging\n'), ((1108, 1158), 'flask_babelex.gettext', '_', (['"""O periódico está indisponível por motivo de: """'], {}), "('O periódico está indisponível por motivo de: ')\n", (1109, 1158), True, '...
CodeXfull/Pandas
create_read_write_1/Writing/to_csv.py
08b0adc28eedba47f6eb8303ba6a36a37ababb92
""" Converter um DataFrame para CSV """ import pandas as pd dataset = pd.DataFrame({'Frutas': ["Abacaxi", "Mamão"], "Nomes": ["Éverton", "Márcia"]}, index=["Linha 1", "Linha 2"]) dataset.to_csv("dataset.csv")
[((71, 184), 'pandas.DataFrame', 'pd.DataFrame', (["{'Frutas': ['Abacaxi', 'Mamão'], 'Nomes': ['Éverton', 'Márcia']}"], {'index': "['Linha 1', 'Linha 2']"}), "({'Frutas': ['Abacaxi', 'Mamão'], 'Nomes': ['Éverton', 'Márcia'\n ]}, index=['Linha 1', 'Linha 2'])\n", (83, 184), True, 'import pandas as pd\n')]
13rilliant/Python-CMS
venv/Lib/site-packages/pygsheets/client.py
56c4f3f1cbdd81020aa690ab92d0e26d042458c1
# -*- coding: utf-8 -*-. import re import warnings import os import logging from pygsheets.drive import DriveAPIWrapper from pygsheets.sheet import SheetAPIWrapper from pygsheets.spreadsheet import Spreadsheet from pygsheets.exceptions import SpreadsheetNotFound, NoValidUrlKeyFound from pygsheets.custom_types import ...
[((468, 494), 're.compile', 're.compile', (['"""key=([^&#]+)"""'], {}), "('key=([^&#]+)')\n", (478, 494), False, 'import re\n'), ((513, 559), 're.compile', 're.compile', (['"""/spreadsheets/d/([a-zA-Z0-9-_]+)"""'], {}), "('/spreadsheets/d/([a-zA-Z0-9-_]+)')\n", (523, 559), False, 'import re\n'), ((579, 643), 're.compil...
NatalyAristova/Training_python
model/group_contact.py
e95a2b9e25238285d705a880fd94d73f173c3a31
from sys import maxsize class Group_contact: def __init__(self,firstname=None, middlename=None, lastname=None, nickname=None, title=None, company=None, address=None, home=None, mobile=None, work=None, fax=None, email=None, email2=None, email3=None, byear=None, address2=None, pho...
[]
membranepotential/mendeley-python-sdk
test/manual/documents/test_iter_documents.py
0336f0164f4d409309e813cbd0140011b5b2ff8f
from itertools import islice from test import get_user_session, cassette from test.resources.documents import delete_all_documents, create_document def test_should_iterate_through_documents(): session = get_user_session() delete_all_documents() with cassette('fixtures/resources/documents/iter_documents/...
[((210, 228), 'test.get_user_session', 'get_user_session', ([], {}), '()\n', (226, 228), False, 'from test import get_user_session, cassette\n'), ((233, 255), 'test.resources.documents.delete_all_documents', 'delete_all_documents', ([], {}), '()\n', (253, 255), False, 'from test.resources.documents import delete_all_do...
cbsudux/minimal-hand
demo.py
893c252e7e818a9a96b279023ea8a78a88fb0a4d
import argparse import cv2 import keyboard import numpy as np import open3d as o3d import os import pygame from transforms3d.axangles import axangle2mat import config from hand_mesh import HandMesh from kinematics import mpii_to_mano from utils import OneEuroFilter, imresize from wrappers import ModelPipeline from ut...
[((513, 551), 'os.makedirs', 'os.makedirs', (['img_folder'], {'exist_ok': '(True)'}), '(img_folder, exist_ok=True)\n', (524, 551), False, 'import os\n'), ((2995, 3034), 'os.makedirs', 'os.makedirs', (['output_path'], {'exist_ok': '(True)'}), '(output_path, exist_ok=True)\n', (3006, 3034), False, 'import os\n'), ((3273,...
incuna/incuna-groups
test_project/settings.py
148c181faf66fe73792cb2c5bbf5500ba61aa22d
import os import dj_database_url BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUG = True ALLOWED_HOSTS = [] ROOT_URLCONF = 'groups.tests.urls' STATIC_URL = '/static/' SECRET_KEY = 'krc34ji^-fd-=+r6e%p!0u0k9h$9!q*_#l=6)74h#o(jrxsx4p' PASSWORD_HASHERS = ('django.contrib.auth.hashers.MD5Pa...
[((366, 427), 'dj_database_url.config', 'dj_database_url.config', ([], {'default': '"""postgres://localhost/groups"""'}), "(default='postgres://localhost/groups')\n", (388, 427), False, 'import dj_database_url\n'), ((79, 104), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (94, 104), False, '...
cclauss/akismet
tests/test_akismet.py
7b65bc163d6947a3013d01bf9accf1bc6c0781ca
import datetime import os import sys import unittest from unittest import mock import akismet class AkismetTests(unittest.TestCase): api_key = os.getenv("TEST_AKISMET_API_KEY") blog_url = os.getenv("TEST_AKISMET_BLOG_URL") api_key_env_var = "PYTHON_AKISMET_API_KEY" blog_url_env_var = "PYTHON_AKISMET...
[((150, 183), 'os.getenv', 'os.getenv', (['"""TEST_AKISMET_API_KEY"""'], {}), "('TEST_AKISMET_API_KEY')\n", (159, 183), False, 'import os\n'), ((199, 233), 'os.getenv', 'os.getenv', (['"""TEST_AKISMET_BLOG_URL"""'], {}), "('TEST_AKISMET_BLOG_URL')\n", (208, 233), False, 'import os\n'), ((372, 429), 'akismet.Akismet', '...
gaurvigoyal/lifting_events_to_3d_hpe
experimenting/dataset/datamodule.py
66d27eb7534f81a95d9f68e17cc534ef2a2c9b1c
import pytorch_lightning as pl from torch.utils.data import DataLoader, Dataset from .core import BaseCore from .factory import BaseDataFactory class DataModule(pl.LightningDataModule): def __init__( self, dataset_factory: BaseDataFactory, core: BaseCore, aug_train_config, ...
[((2414, 2520), 'torch.utils.data.DataLoader', 'DataLoader', (['dataset'], {'batch_size': 'batch_size', 'shuffle': 'shuffle', 'num_workers': 'num_workers', 'pin_memory': '(True)'}), '(dataset, batch_size=batch_size, shuffle=shuffle, num_workers=\n num_workers, pin_memory=True)\n', (2424, 2520), False, 'from torch.ut...
giulianoiorio/PeTar
sevn-interface/SEVN/resources/SEVN_walkthrough/running_folder/analysis_3_pandas.py
f6a849552b3d8e47c5e08fe90fed05bf38bc407d
import pandas as pd import matplotlib.pyplot as plt import numpy as np #Load file dt=pd.read_csv("sevn_output/output_0.csv") #Give a look to the columns print(dt.columns) #Consider only the final states dt=dt.drop_duplicates(["ID","name"], keep='last') #Load evolved file dte=pd.read_csv("sevn_output/evolved_0.dat",se...
[((86, 125), 'pandas.read_csv', 'pd.read_csv', (['"""sevn_output/output_0.csv"""'], {}), "('sevn_output/output_0.csv')\n", (97, 125), True, 'import pandas as pd\n'), ((278, 330), 'pandas.read_csv', 'pd.read_csv', (['"""sevn_output/evolved_0.dat"""'], {'sep': '"""\\\\s+"""'}), "('sevn_output/evolved_0.dat', sep='\\\\s+'...
VladimirLazor/Lohika
apps/tg_bot/apps.py
a36407feeb2e3ade4f8c689030f343d88ff47a92
from django.apps import AppConfig class TgBotConfig(AppConfig): name = 'apps.tg_bot'
[]
rikeshtailor/Office365-REST-Python-Client
office365/sharepoint/portal/group_site_manager.py
ca7bfa1b22212137bb4e984c0457632163e89a43
from office365.runtime.client_object import ClientObject from office365.runtime.client_result import ClientResult from office365.runtime.http.http_method import HttpMethod from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.resource_path import ResourcePath from of...
[((997, 1070), 'office365.sharepoint.portal.group_creation_params.GroupCreationInformation', 'GroupCreationInformation', (['display_name', 'alias', 'is_public', 'optional_params'], {}), '(display_name, alias, is_public, optional_params)\n', (1021, 1070), False, 'from office365.sharepoint.portal.group_creation_params im...
smok-serwis/cython
tests/errors/e_tuple_args_T692.py
e551a3a348888bd89d4aad809916709a634af1fb
# ticket: 692 # mode: error def func((a, b)): return a + b _ERRORS = u""" 4:9: Missing argument name 5:11: undeclared name not builtin: a 5:15: undeclared name not builtin: b """
[]
Ladvien/esp32_upython_env
ble.py
8b0feab940efd3feff16220473e1b5b27d679a56
import bluetooth import time bt = bluetooth.BLE() # singleton bt.active(True) # activate BT stack UART_UUID = bluetooth.UUID('6E400001-B5A3-F393-E0A9-E50E24DCCA9E') UART_TX = (bluetooth.UUID('6E400003-B5A3-F393-E0A9-E50E24DCCA9E'), bluetooth.FLAG_READ | bluetooth.FLAG_NOTIFY,) UAR...
[((34, 49), 'bluetooth.BLE', 'bluetooth.BLE', ([], {}), '()\n', (47, 49), False, 'import bluetooth\n'), ((149, 203), 'bluetooth.UUID', 'bluetooth.UUID', (['"""6E400001-B5A3-F393-E0A9-E50E24DCCA9E"""'], {}), "('6E400001-B5A3-F393-E0A9-E50E24DCCA9E')\n", (163, 203), False, 'import bluetooth\n'), ((215, 269), 'bluetooth.U...
luxbe/sledo
examples/custom-generator/customer.py
26aa2b59b11ea115afc25bb407602578cb342170
from random import randint from sledo.generate.field_generators.base import FieldGenerator values = ("Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "Denmark", "Estonia", "Finland", "France", "G...
[((933, 950), 'random.randint', 'randint', (['(0)', 'count'], {}), '(0, count)\n', (940, 950), False, 'from random import randint\n')]
crawftv/CRAwTO
status-uncertain/baseline_model.py
8c6fdb93ed963cbddfe967b041e8beb578d1e94d
#!/usr/bin/env python3 from sklearn.metrics import r2_score import numpy as np class BaselineModel(object): def get_params(self): return None def predict(self, X): return np.ones_like(X.index.values) * self._y_pred def score(self, X, y): y_true = y y_pred = np.ones_like(y...
[((357, 381), 'sklearn.metrics.r2_score', 'r2_score', (['y_true', 'y_pred'], {}), '(y_true, y_pred)\n', (365, 381), False, 'from sklearn.metrics import r2_score\n'), ((198, 226), 'numpy.ones_like', 'np.ones_like', (['X.index.values'], {}), '(X.index.values)\n', (210, 226), True, 'import numpy as np\n'), ((306, 326), 'n...
ecalder6/MT-HW2
aligner/grow_diag_final.py
1356aeb374a6e4d0b0ae819684bf314039948c56
import optparse import sys def make_set(data, s, e_vocab, f_vocab, aligned, reverse): for pair in data.split(): cur = pair.split('-') if reverse: e_vocab.add(int(cur[1])) f_vocab.add(int(cur[0])) aligned.add(int(cur[0])) s.add((int(cur[1]), int(cur[0]...
[((2468, 2491), 'optparse.OptionParser', 'optparse.OptionParser', ([], {}), '()\n', (2489, 2491), False, 'import optparse\n'), ((1285, 1307), 'sys.stdout.write', 'sys.stdout.write', (['"""\n"""'], {}), "('\\n')\n", (1301, 1307), False, 'import sys\n'), ((1242, 1277), 'sys.stdout.write', 'sys.stdout.write', (["('%i-%i '...
Transcranial-Solutions/t-bears
tests/test_tbears_db.py
4712b8bb425814c444ee75f3220a31df934982aa
# -*- coding: utf-8 -*- # Copyright 2017-2018 ICON Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[((771, 815), 'os.path.join', 'os.path.join', (['DIRECTORY_PATH', '"""./.tbears_db"""'], {}), "(DIRECTORY_PATH, './.tbears_db')\n", (783, 815), False, 'import os\n'), ((733, 758), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (748, 758), False, 'import os\n'), ((1080, 1102), 'shutil.rmtree',...
pierky/exabgp
src/exabgp/bgp/message/update/attribute/bgpls/link/mplsmask.py
34be537ae5906c0830b31da1152ae63108ccf911
# encoding: utf-8 """ mplsmask.py Created by Evelio Vila on 2016-12-01. Copyright (c) 2014-2017 Exa Networks. All rights reserved. """ from exabgp.bgp.message.notification import Notify from exabgp.bgp.message.update.attribute.bgpls.linkstate import LinkState from exabgp.bgp.message.update.attribute.bgpls.linkstate im...
[((1458, 1478), 'exabgp.bgp.message.update.attribute.bgpls.linkstate.LinkState.register', 'LinkState.register', ([], {}), '()\n', (1476, 1478), False, 'from exabgp.bgp.message.update.attribute.bgpls.linkstate import LinkState\n')]
hsorby/scaffoldmaker
tests/test_cecum.py
5e3b4531665dbc465b53acc1662f8d9bbb9dc1e1
import unittest from opencmiss.utils.zinc.finiteelement import evaluateFieldNodesetRange from opencmiss.utils.zinc.general import ChangeManager from opencmiss.zinc.context import Context from opencmiss.zinc.element import Element from opencmiss.zinc.field import Field from opencmiss.zinc.result import RESULT_OK from s...
[((4961, 4976), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4974, 4976), False, 'import unittest\n'), ((681, 722), 'scaffoldmaker.meshtypes.meshtype_3d_cecum1.MeshType_3d_cecum1.getParameterSetNames', 'MeshType_3d_cecum1.getParameterSetNames', ([], {}), '()\n', (720, 722), False, 'from scaffoldmaker.meshtypes....
jm66/pyvmomi-community-samples
samples/destroy_vm.py
5ca4a50b767500e07b9bce9fba70240bfa963a4e
#!/usr/bin/env python # Copyright 2015 Michael Rice <michael@michaelrice.org> # # 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 # # ...
[((3610, 3642), 'tools.tasks.wait_for_tasks', 'tasks.wait_for_tasks', (['SI', '[TASK]'], {}), '(SI, [TASK])\n', (3630, 3642), False, 'from tools import tasks\n'), ((909, 931), 'tools.cli.build_arg_parser', 'cli.build_arg_parser', ([], {}), '()\n', (929, 931), False, 'from tools import cli\n'), ((1647, 1679), 'tools.cli...
1000monkeys/MastermindRedux
helpers/Screen.py
6b07a341ecbf2ea325949a49c84218cc3632cd33
import sys class Screen: def __init__(self) -> None: pass def handle_events(self, events): for event in events: if event.type == self.pygame.QUIT: sys.exit() def draw(self, screen): pass
[((201, 211), 'sys.exit', 'sys.exit', ([], {}), '()\n', (209, 211), False, 'import sys\n')]
chris-han/ailab
VirtualStage/BackgroundMatting/fixed_threshold.py
b77d90f9089fa8003095843aa5de718fe73965a7
import os def fixed_split(videos, thresholds, mask_suffix, overlap=0, background_path="/"): # crop target background video frames backgrounds = [os.path.join(background_path, f[:-4]) for f in os.listdir(background_path) if f.endswith(".mp4")] print(f"Splitting {len(backgrounds)} target background videos...
[((157, 194), 'os.path.join', 'os.path.join', (['background_path', 'f[:-4]'], {}), '(background_path, f[:-4])\n', (169, 194), False, 'import os\n'), ((1089, 1103), 'os.system', 'os.system', (['cmd'], {}), '(cmd)\n', (1098, 1103), False, 'import os\n'), ((2253, 2267), 'os.system', 'os.system', (['cmd'], {}), '(cmd)\n', ...
veredsil/hn2016_falwa
hn2016_falwa/utilities.py
53035ac838860dd8a8d85619f16cc9785dee8655
import numpy as np from math import pi,exp def static_stability(height,area,theta,s_et=None,n_et=None): """ The function "static_stability" computes the vertical gradient (z-derivative) of hemispheric-averaged potential temperature, i.e. d\tilde{theta}/dz in the def- inition of QGPV in eq.(3) of Huang ...
[((2300, 2324), 'numpy.zeros', 'np.zeros', (['theta.shape[0]'], {}), '(theta.shape[0])\n', (2308, 2324), True, 'import numpy as np\n'), ((2338, 2362), 'numpy.zeros', 'np.zeros', (['theta.shape[0]'], {}), '(theta.shape[0])\n', (2346, 2362), True, 'import numpy as np\n'), ((2621, 2652), 'numpy.sum', 'np.sum', (['area_zon...
JennyLawrance/azure-cli
src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_params.py
cb9ca4b694110806b31803a95f9f315b2fde6410
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[((1348, 1410), 'azure.cli.core.commands.parameters.get_resource_name_completion_list', 'get_resource_name_completion_list', (['"""Microsoft.Devices/IotHubs"""'], {}), "('Microsoft.Devices/IotHubs')\n", (1381, 1410), False, 'from azure.cli.core.commands.parameters import get_location_type, file_type, get_resource_name_...
nhsconnect/prm-practice-migration-dashboard
metrics-calculator/tests/integration/test_s3.py
40c8760f409834d05bde4fb015aa5f8765acaa82
import boto3 import gzip from moto import mock_s3 import pytest import os from chalicelib.s3 import read_object_s3, write_object_s3, objects_exist from tests.builders.file import build_gzip_csv @pytest.fixture(scope='function') def aws_credentials(): """Mocked AWS Credentials for moto.""" os.environ['AWS_ACC...
[((198, 230), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (212, 230), False, 'import pytest\n'), ((548, 580), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (562, 580), False, 'import pytest\n'), ((875, 1019), 'tests.buil...
kaldap/image-analogies
image_analogy/losses/patch_matcher.py
0867aedfae7dfc0d27c42805a3d07f7b9eb7eaa2
import numpy as np import scipy.interpolate import scipy.ndimage from sklearn.feature_extraction.image import extract_patches_2d, reconstruct_from_patches_2d def _calc_patch_grid_dims(shape, patch_size, patch_stride): x_w, x_h, x_c = shape num_rows = 1 + (x_h - patch_size) // patch_stride num_cols = 1 + (...
[((527, 574), 'sklearn.feature_extraction.image.extract_patches_2d', 'extract_patches_2d', (['x', '(patch_size, patch_size)'], {}), '(x, (patch_size, patch_size))\n', (545, 574), False, 'from sklearn.feature_extraction.image import extract_patches_2d, reconstruct_from_patches_2d\n'), ((1228, 1303), 'numpy.reshape', 'np...
desafinadude/muni-portal-backend
muni_portal/core/migrations/0030_remove_servicerequest_mobile_reference.py
9ffc447194b8f29619585cd919f67d62062457a3
# Generated by Django 2.2.10 on 2021-02-24 09:42 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0029_auto_20210224_0936'), ] operations = [ migrations.RemoveField( model_name='servicerequest', name='mobile_refer...
[((225, 301), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""servicerequest"""', 'name': '"""mobile_reference"""'}), "(model_name='servicerequest', name='mobile_reference')\n", (247, 301), False, 'from django.db import migrations\n')]
noahshpak/ray
rllib/agents/ppo/tests/test_appo.py
edd783bc327760a4892ab89222ee551e42df15b9
import unittest import ray import ray.rllib.agents.ppo as ppo from ray.rllib.utils.test_utils import check_compute_single_action, \ framework_iterator class TestAPPO(unittest.TestCase): @classmethod def setUpClass(cls): ray.init() @classmethod def tearDownClass(cls): ray.shutdown...
[((243, 253), 'ray.init', 'ray.init', ([], {}), '()\n', (251, 253), False, 'import ray\n'), ((308, 322), 'ray.shutdown', 'ray.shutdown', ([], {}), '()\n', (320, 322), False, 'import ray\n'), ((455, 485), 'ray.rllib.agents.ppo.appo.DEFAULT_CONFIG.copy', 'ppo.appo.DEFAULT_CONFIG.copy', ([], {}), '()\n', (483, 485), True,...