code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Version 1.0 by <NAME> # License The MIT License (MIT) # Copyright 2019 <NAME> # Work in progress import digitalocean import os # USER CONFIG # Digital Ocean API Token my_token = open('api_key.txt', 'r').readline().rstrip('\n') # Region region = "nyc3" # Image dist = "centos-7-x64" # Droplet Size size = "s-1vcpu...
[ "digitalocean.Droplet", "digitalocean.Manager", "os.system" ]
[((445, 481), 'digitalocean.Manager', 'digitalocean.Manager', ([], {'token': 'my_token'}), '(token=my_token)\n', (465, 481), False, 'import digitalocean\n'), ((839, 967), 'digitalocean.Droplet', 'digitalocean.Droplet', ([], {'token': 'my_token', 'name': 'server_name', 'region': 'region', 'image': 'dist', 'size': 'size'...
import pandas as pd from datacode.psm.typing import DfDict, StrList, StrOrNone, StrListOrNone import pyexlatex.table as lt from datacode.psm.predict import explain_probability_of_treatment from datacode.psm.summarize.latex import matching_latex_table_from_df_dict from datacode.psm.summarize.predictions import summarize...
[ "datacode.psm.summarize.predictions.summarize_predictions", "datacode.psm.summarize.stats.matching_summary_stats", "datacode.psm.summarize.latex.matching_latex_table_from_df_dict", "datacode.psm.predict.explain_probability_of_treatment", "datacode.psm.names.get_prob_treated_varname" ]
[((1624, 1775), 'datacode.psm.summarize.latex.matching_latex_table_from_df_dict', 'matching_latex_table_from_df_dict', (['summary_df_dict', 'entity_var', 'time_var'], {'below_text': 'below_text', 'caption': 'caption', 'min_matching_pct': 'min_matching_pct'}), '(summary_df_dict, entity_var, time_var,\n below_text=bel...
# Generated by Django 3.1.7 on 2021-02-23 12:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bugtracker_app', '0004_auto_20210222_2058'), ] operations = [ migrations.AlterField( model_name='customusermodel', n...
[ "django.db.models.CharField" ]
[((350, 481), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'choices': "[('Admin', 'Admin'), ('Dev', 'Dev'), ('Boss Man', 'Boss Man')]", 'max_length': '(60)', 'null': '(True)'}), "(blank=True, choices=[('Admin', 'Admin'), ('Dev', 'Dev'), (\n 'Boss Man', 'Boss Man')], max_length=60, null=...
#!/usr/bin/env python import glob import cv2 import numpy as np import torch import architecture as arch import argparse import warnings import time import sys try: import tqdm except ImportError: pass from pathlib import Path from chunks import DataChunks model_docs = { "RRDB_ESRGAN_x4.pth": "Official p...
[ "tqdm.tqdm", "argparse.ArgumentParser", "warnings.simplefilter", "chunks.DataChunks", "sys.modules.keys", "torch.load", "architecture.RRDB_Net", "numpy.transpose", "torch.set_num_interop_threads", "torch.set_num_threads", "torch.cuda.is_available", "pathlib.Path", "warnings.catch_warnings", ...
[((6290, 6391), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Upscale images with ESRGAN"""', 'formatter_class': 'SmartFormatter'}), "(description='Upscale images with ESRGAN',\n formatter_class=SmartFormatter)\n", (6313, 6391), False, 'import argparse\n'), ((8599, 8621), 'time.perf_...
from typing import Iterable, Sequence from django.db import IntegrityError from django.db.models import QuerySet from treeckle.common.constants import ( ID, CREATED_AT, UPDATED_AT, USER, EVENT_ID, STATUS, ) from treeckle.common.parsers import parse_datetime_to_ms_timestamp from organizations.m...
[ "users.logic.user_to_json", "events.models.EventSignUp.objects.filter", "events.models.EventSignUp.objects.get_or_create", "treeckle.common.parsers.parse_datetime_to_ms_timestamp", "users.logic.get_users" ]
[((974, 1017), 'events.models.EventSignUp.objects.filter', 'EventSignUp.objects.filter', (['*args'], {}), '(*args, **kwargs)\n', (1000, 1017), False, 'from events.models import Event, EventSignUp, SignUpStatus, SignUpAction\n'), ((1145, 1217), 'events.models.EventSignUp.objects.get_or_create', 'EventSignUp.objects.get_...
# Copyright 2017 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. """API for generating OAuth2 access tokens from service account keys predeployed to Chrome Ops bots via Puppet. """ import contextlib import os import subpr...
[ "os.remove", "subprocess.check_call", "os.close", "tempfile.mkstemp" ]
[((566, 612), 'tempfile.mkstemp', 'tempfile.mkstemp', ([], {'suffix': '""".json"""', 'prefix': '"""tok"""'}), "(suffix='.json', prefix='tok')\n", (582, 612), False, 'import tempfile\n'), ((749, 787), 'subprocess.check_call', 'subprocess.check_call', (['args'], {'stdout': 'fd'}), '(args, stdout=fd)\n', (770, 787), False...
import re import time import praw from prawcore.exceptions import PrawcoreException from database import TaskerNetDatabase from utils import TASKERNET_RE, PRAW_SITE_NAME, MONITORED_SUBREDDITS reddit = praw.Reddit(PRAW_SITE_NAME) subreddit = reddit.subreddit(MONITORED_SUBREDDITS) db = TaskerNetDatabase() running = ...
[ "time.sleep", "praw.Reddit", "database.TaskerNetDatabase", "utils.TASKERNET_RE.findall" ]
[((204, 231), 'praw.Reddit', 'praw.Reddit', (['PRAW_SITE_NAME'], {}), '(PRAW_SITE_NAME)\n', (215, 231), False, 'import praw\n'), ((289, 308), 'database.TaskerNetDatabase', 'TaskerNetDatabase', ([], {}), '()\n', (306, 308), False, 'from database import TaskerNetDatabase\n'), ((480, 543), 'utils.TASKERNET_RE.findall', 'T...
import matplotlib.pyplot as plt import numpy as np import math # tip geometry dia = 0.057 # m r = dia/2 offset = 3 * dia pen_rate_labels = ['1 m/min','2 m/min','3 m/min','4 m/min','5 m/min'] pen_rates = [1/60 , 2/60 , 3/60 , 4/60 , 5/60] # m/seks rpm = 25 * (2*math.pi) / 60 # rad/secs X = [] Y = [] Z = [] k=0 for ...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "numpy.sin", "numpy.array", "numpy.linspace", "numpy.cos" ]
[((769, 781), 'numpy.array', 'np.array', (['xs'], {}), '(xs)\n', (777, 781), True, 'import numpy as np\n'), ((787, 799), 'numpy.array', 'np.array', (['ys'], {}), '(ys)\n', (795, 799), True, 'import numpy as np\n'), ((805, 817), 'numpy.array', 'np.array', (['zs'], {}), '(zs)\n', (813, 817), True, 'import numpy as np\n')...
import os import pickle LOG_DIR = "logs" class Logger: def __init__(self, *metrics_): self.metrics = dict() for metric in metrics_: self.metrics[metric] = [] if not os.path.exists(LOG_DIR): os.mkdir(LOG_DIR) def log(self, val, metric): self.metrics[metric].append(val) pickle.dump(...
[ "os.mkdir", "os.path.exists", "os.path.join" ]
[((187, 210), 'os.path.exists', 'os.path.exists', (['LOG_DIR'], {}), '(LOG_DIR)\n', (201, 210), False, 'import os\n'), ((218, 235), 'os.mkdir', 'os.mkdir', (['LOG_DIR'], {}), '(LOG_DIR)\n', (226, 235), False, 'import os\n'), ((347, 385), 'os.path.join', 'os.path.join', (['LOG_DIR', 'f"""{metric}.pkl"""'], {}), "(LOG_DI...
from __future__ import unicode_literals from django.contrib.auth.models import User #https://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance.1.html from django.contrib.auth.models import UserManager from django.db import models from django.template.defaultfilters import default clas...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.Manager", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.DateTimeField", "django.contrib.auth.models.UserManager" ]
[((358, 413), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)', 'blank': '(True)', 'null': '(True)'}), '(max_length=255, blank=True, null=True)\n', (374, 413), False, 'from django.db import models\n'), ((430, 485), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)...
#coding=utf-8 #Python 3.4 ##从豆瓣网页中得到用户的所有读书短评 ##网页地址类型:http://book.douban.com/people/1000001/collect?sort=time&start=0&filter=all&mode=grid&tags_sort=count ## http://book.douban.com/people/1000001/collect?sort=time&start=15&filter=all&mode=grid&tags_sort=count from bs4 import BeautifulSoup import time impo...
[ "bs4.BeautifulSoup", "time.sleep", "os.system", "markdown.markdown" ]
[((7533, 7551), 'os.system', 'os.system', (['"""pause"""'], {}), "('pause')\n", (7542, 7551), False, 'import os\n'), ((3246, 3280), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (3259, 3280), False, 'from bs4 import BeautifulSoup\n'), ((4713, 4747), 'bs4.Beautiful...
import functools import sys def optionalarg(decorator): ''' Transforms a decorator `decorator(func, args)` into a decorator that can be executed both with @decorator and @decorator(args) ''' @functools.wraps(decorator) def __decorator(*args, **kwargs): if len(args) == 1 and callable(ar...
[ "functools.wraps" ]
[((214, 240), 'functools.wraps', 'functools.wraps', (['decorator'], {}), '(decorator)\n', (229, 240), False, 'import functools\n')]
import torch import torch.nn as nn import numpy as np print('loading model and train data...') # load model from file net = torch.load('models/torch_rnn.model') # load data from file train_loader = torch.load('data/processed/torch_rnn_train.loader') valid_loader = torch.load('data/processed/torch_rnn_validate.loader'...
[ "torch.nn.BCELoss", "torch.load", "torch.save", "numpy.mean", "torch.cuda.is_available" ]
[((125, 161), 'torch.load', 'torch.load', (['"""models/torch_rnn.model"""'], {}), "('models/torch_rnn.model')\n", (135, 161), False, 'import torch\n'), ((200, 251), 'torch.load', 'torch.load', (['"""data/processed/torch_rnn_train.loader"""'], {}), "('data/processed/torch_rnn_train.loader')\n", (210, 251), False, 'impor...
import numpy as np class RBFMMD2(object): def __init__(self, sigma_list, num_bit, is_binary): self.sigma_list = sigma_list self.num_bit = num_bit self.is_binary = is_binary self.basis = np.arange(2**num_bit,dtype='int32') self.K = mix_rbf_kernel(self.basis, self.basis, self....
[ "numpy.log", "numpy.arange", "numpy.exp" ]
[((223, 261), 'numpy.arange', 'np.arange', (['(2 ** num_bit)'], {'dtype': '"""int32"""'}), "(2 ** num_bit, dtype='int32')\n", (232, 261), True, 'import numpy as np\n'), ((1270, 1290), 'numpy.exp', 'np.exp', (['(-gamma * dx2)'], {}), '(-gamma * dx2)\n', (1276, 1290), True, 'import numpy as np\n'), ((955, 964), 'numpy.lo...
#!/usr/bin/env python #coding=utf-8 """ Description : Calculate the difference between two georeferenced rasters. Author : <NAME> """ #Python libraries import argparse, os import numpy as np import gdal #Personal libraries import georaster as geor ## Dictionary to convert between resampling algo names and GDAL cod...
[ "georaster.SingleBandRaster", "argparse.ArgumentParser" ]
[((1342, 1385), 'georaster.SingleBandRaster', 'geor.SingleBandRaster', (['im1'], {'load_data': '(False)'}), '(im1, load_data=False)\n', (1363, 1385), True, 'import georaster as geor\n'), ((1519, 1562), 'georaster.SingleBandRaster', 'geor.SingleBandRaster', (['im2'], {'load_data': '(False)'}), '(im2, load_data=False)\n'...
import imp import pygame from settings import * class UI: def __init__(self): self.display_surface = pygame.display.get_surface() self.font = pygame.font.Font(UI_FONT,UI_FONT_SIZE) self.health_bar_rect = pygame.Rect(10,10,HEALTH_BAR_WIDTH,BAR_HEIGHT) self.energy_bar_rect = pygame.R...
[ "pygame.draw.rect", "pygame.Rect", "pygame.display.get_surface", "pygame.font.Font", "pygame.image.load" ]
[((114, 142), 'pygame.display.get_surface', 'pygame.display.get_surface', ([], {}), '()\n', (140, 142), False, 'import pygame\n'), ((163, 202), 'pygame.font.Font', 'pygame.font.Font', (['UI_FONT', 'UI_FONT_SIZE'], {}), '(UI_FONT, UI_FONT_SIZE)\n', (179, 202), False, 'import pygame\n'), ((234, 283), 'pygame.Rect', 'pyga...
import pygame from pygame.sprite import Sprite class Bullet(Sprite): """Bullet kontrolli klass""" def __init__(self, game_setting, screen, ship): """Looge laeva asukohas kuulide objekt""" super().__init__() self.screen = screen # Loovad kuulid self.rect = pygame.Rect(0...
[ "pygame.draw.rect", "pygame.Rect" ]
[((307, 379), 'pygame.Rect', 'pygame.Rect', (['(0)', '(0)', 'game_setting.bullet_width', 'game_setting.bullet_height'], {}), '(0, 0, game_setting.bullet_width, game_setting.bullet_height)\n', (318, 379), False, 'import pygame\n'), ((866, 918), 'pygame.draw.rect', 'pygame.draw.rect', (['self.screen', 'self.color', 'self...
import sys import yaml from pathlib import Path from optparse import OptionParser from . import Loader from .pretty import pretty_print_yaml def parse_cmd_line(): parser = OptionParser() parser.add_option( "-e", "--environ-vars", dest="env_vars", help="import values from enviro...
[ "pathlib.Path", "sys.stdout.isatty", "optparse.OptionParser", "yaml.safe_dump" ]
[((178, 192), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (190, 192), False, 'from optparse import OptionParser\n'), ((758, 771), 'pathlib.Path', 'Path', (['args[0]'], {}), '(args[0])\n', (762, 771), False, 'from pathlib import Path\n'), ((996, 1023), 'yaml.safe_dump', 'yaml.safe_dump', (['result_item'],...
import argparse import config import train import os import util import inference parser = argparse.ArgumentParser() parser.add_argument("input_dir", help="path to training fields / See ... for Houdini based data generator") parser.add_argument("-od", "--output_dir", default='', help="path to training fields / See .....
[ "argparse.ArgumentParser", "os.path.isdir", "util.create_dirs", "train.train_integrator", "train.train_network", "inference.restore_ae" ]
[((93, 118), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (116, 118), False, 'import argparse\n'), ((3437, 3468), 'os.path.isdir', 'os.path.isdir', (['config.data_path'], {}), '(config.data_path)\n', (3450, 3468), False, 'import os\n'), ((4301, 4330), 'os.path.isdir', 'os.path.isdir', (['args...
import sys import argparse import pandas as pd parser = argparse.ArgumentParser() parser.add_argument("input_file", help = "File containing list of map files to average (one per line)") parser.add_argument("output_file") args = parser.parse_args() fptr = open(args.input_file) firstfile = fptr.readline()[:-1] df = pd....
[ "pandas.read_csv", "argparse.ArgumentParser" ]
[((57, 82), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (80, 82), False, 'import argparse\n'), ((317, 355), 'pandas.read_csv', 'pd.read_csv', (['firstfile'], {'index_col': 'None'}), '(firstfile, index_col=None)\n', (328, 355), True, 'import pandas as pd\n'), ((391, 429), 'pandas.read_csv', '...
import os import subprocess import sys from config import TOOLS_DIR VERSION = 'aad2120' SUPPORTED_PLATFORMS = { 'cygwin': 'windows', 'darwin': 'mac', 'linux2': 'linux', 'win32': 'windows', } def is_platform_supported(platform): return platform in SUPPORTED_PLATFORMS def get_binary_path(): platform = ...
[ "subprocess.call", "os.path.join" ]
[((449, 517), 'os.path.join', 'os.path.join', (['TOOLS_DIR', '"""sccache"""', 'VERSION', 'platform_dir', '"""sccache"""'], {}), "(TOOLS_DIR, 'sccache', VERSION, platform_dir, 'sccache')\n", (461, 517), False, 'import os\n'), ((786, 812), 'subprocess.call', 'subprocess.call', (['call_args'], {}), '(call_args)\n', (801, ...
from __future__ import annotations import atexit from ctypes import pointer, c_int, c_void_p, c_char_p, c_bool, c_uint, CDLL from functools import partial from typing import ( Callable, Any, Optional, Tuple, TYPE_CHECKING, cast, Union, Type, TypeVar, ) from .error_handling import r...
[ "functools.partial", "atexit.register", "ctypes.c_char_p", "ctypes.c_int", "typing.cast", "ctypes.pointer", "ctypes.c_void_p", "typing.TypeVar" ]
[((523, 535), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (530, 535), False, 'from typing import Callable, Any, Optional, Tuple, TYPE_CHECKING, cast, Union, Type, TypeVar\n'), ((2493, 2519), 'functools.partial', 'partial', (['api_func', 'context'], {}), '(api_func, context)\n', (2500, 2519), False, 'from...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 11 21:57:41 2020 @author: inderpreet calculate statistics for MWHS point estimates, the results are given in latex format results from scattering index and beuhler et al """ import netCDF4 import os import matplotlib.pyplot as plt import numpy as ...
[ "numpy.abs", "numpy.sum", "numpy.histogram", "numpy.mean", "numpy.arange", "os.path.join", "read_qrnn.read_qrnn", "netCDF4.Dataset", "numpy.std", "numpy.isfinite", "matplotlib.pyplot.rcParams.update", "matplotlib.pyplot.subplots", "mwhs.mwhsData", "numpy.argwhere", "numpy.squeeze", "nu...
[((377, 415), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 26}"], {}), "({'font.size': 26})\n", (396, 415), True, 'import matplotlib.pyplot as plt\n'), ((1027, 1042), 'numpy.mean', 'np.mean', (['(y - y0)'], {}), '(y - y0)\n', (1034, 1042), True, 'import numpy as np\n'), ((1070, 1084), 'n...
from __future__ import print_function from django.shortcuts import render from .models import CreateRecord from tqdm import tqdm import os import codecs import traceback def IndexView(request): output('s3log/') return render(request, 'analyzer/index.html') def input(filepath): try: with codecs.o...
[ "django.shortcuts.render", "codecs.open", "os.listdir", "traceback.print_exc" ]
[((228, 266), 'django.shortcuts.render', 'render', (['request', '"""analyzer/index.html"""'], {}), "(request, 'analyzer/index.html')\n", (234, 266), False, 'from django.shortcuts import render\n'), ((1340, 1359), 'os.listdir', 'os.listdir', (['dirpath'], {}), '(dirpath)\n', (1350, 1359), False, 'import os\n'), ((312, 3...
from parameterized import parameterized from nose.tools import assert_equal, assert_true import os import sys dir_path = os.path.dirname(os.path.abspath(__file__)) module_path = os.path.join(dir_path, "../src") if module_path not in sys.path: sys.path.append(module_path) os.chdir(dir_path) class TestSPTokenizer...
[ "sys.path.append", "os.path.abspath", "distance.levenshtein.Levenshtein", "os.path.join", "os.chdir" ]
[((179, 211), 'os.path.join', 'os.path.join', (['dir_path', '"""../src"""'], {}), "(dir_path, '../src')\n", (191, 211), False, 'import os\n'), ((278, 296), 'os.chdir', 'os.chdir', (['dir_path'], {}), '(dir_path)\n', (286, 296), False, 'import os\n'), ((138, 163), 'os.path.abspath', 'os.path.abspath', (['__file__'], {})...
import enum import logging from pathlib import Path from pathlib import PurePath from typing import List from goodsplit.interface import Event from goodsplit.reactor import Reactor from goodsplit.sources.inotify import INotifyEventSource from goodsplit.sources.inotify import OpenFileEvent from goodsplit.sources.inotif...
[ "enum.auto", "goodsplit.time_base.MonotonicFloatSeconds", "logging.getLogger", "goodsplit.sources.inotify.INotifyEventSource" ]
[((405, 440), 'logging.getLogger', 'logging.getLogger', (['"""system_shock_2"""'], {}), "('system_shock_2')\n", (422, 440), False, 'import logging\n'), ((688, 699), 'enum.auto', 'enum.auto', ([], {}), '()\n', (697, 699), False, 'import enum\n'), ((733, 744), 'enum.auto', 'enum.auto', ([], {}), '()\n', (742, 744), False...
# -*- coding: utf-8 -*- import copy from datetime import datetime from fiqs.i18n import _ class Field(object): def __init__(self, type, key=None, verbose_name=None, storage_field=None, unit=None, choices=None, data=None, parent=None, model=None): verbose_name = verbose_name or key ...
[ "datetime.datetime.utcfromtimestamp", "copy.deepcopy", "fiqs.i18n._" ]
[((4641, 4676), 'datetime.datetime.utcfromtimestamp', 'datetime.utcfromtimestamp', (['(v / 1000)'], {}), '(v / 1000)\n', (4666, 4676), False, 'from datetime import datetime\n'), ((7139, 7164), 'copy.deepcopy', 'copy.deepcopy', (['field.data'], {}), '(field.data)\n', (7152, 7164), False, 'import copy\n'), ((7609, 7634),...
from geometry_msgs.msg import Pose, Point from gazebo_msgs.srv import SpawnModel from std_msgs.msg import Bool from erdos.op import Op from erdos.data_stream import DataStream from erdos.timestamp import Timestamp from erdos.message import Message import rospkg import rospy class InsertTableOperator(Op): """ ...
[ "rospkg.RosPack", "rospy.ServiceProxy", "geometry_msgs.msg.Point", "erdos.timestamp.Timestamp", "rospy.wait_for_service", "erdos.data_stream.DataStream" ]
[((1733, 1782), 'rospy.wait_for_service', 'rospy.wait_for_service', (['"""/gazebo/spawn_sdf_model"""'], {}), "('/gazebo/spawn_sdf_model')\n", (1755, 1782), False, 'import rospy\n'), ((1803, 1860), 'rospy.ServiceProxy', 'rospy.ServiceProxy', (['"""/gazebo/spawn_sdf_model"""', 'SpawnModel'], {}), "('/gazebo/spawn_sdf_mod...
from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.contrib.auth.models import User from django.test import TestCase from quotes.models import Board, Quote class TestQuotes(TestCase): def setUp(self): self.board = Board.objects.create(slug = 'board', name ...
[ "quotes.models.Quote.objects.create", "django.contrib.auth.models.User.objects.create_user", "quotes.models.Board.objects.create" ]
[((278, 326), 'quotes.models.Board.objects.create', 'Board.objects.create', ([], {'slug': '"""board"""', 'name': '"""BOARD"""'}), "(slug='board', name='BOARD')\n", (298, 326), False, 'from quotes.models import Board, Quote\n'), ((357, 419), 'django.contrib.auth.models.User.objects.create_user', 'User.objects.create_use...
import unittest import json import os import sys import sqlite3 sys.path.append("../../src") from database import Database class TestDatabase(unittest.TestCase): @classmethod def setUpClass(cls): json_raw = open(os.path.dirname(os.path.realpath(__file__)) + "/config.json") cls._config = json....
[ "sys.path.append", "unittest.main", "os.remove", "os.path.realpath", "database.Database" ]
[((65, 93), 'sys.path.append', 'sys.path.append', (['"""../../src"""'], {}), "('../../src')\n", (80, 93), False, 'import sys\n'), ((2492, 2507), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2505, 2507), False, 'import unittest\n'), ((408, 441), 'database.Database', 'Database', (["cls._config['database']"], {}),...
#!/usr/bin/python from Solution import Solution obj = Solution() A = 500 B = [1, 2, 5] out = obj.change(A, B) print(out)
[ "Solution.Solution" ]
[((55, 65), 'Solution.Solution', 'Solution', ([], {}), '()\n', (63, 65), False, 'from Solution import Solution\n')]
import encoding def test_is_a_valid_number(): suite = range(1, 26) assert encoding.is_valid(suite, number=26) assert not encoding.is_valid(suite, number=50) suite = range(2, 27) assert encoding.is_valid(suite, number=49) suite = list(range(3, 27)) + [49] assert not encoding.is_valid(suite,...
[ "encoding.find_first_non_valid_in_file", "encoding.find_contiguous_numbers_adds_up_to_invalid_number", "encoding.is_valid" ]
[((84, 119), 'encoding.is_valid', 'encoding.is_valid', (['suite'], {'number': '(26)'}), '(suite, number=26)\n', (101, 119), False, 'import encoding\n'), ((207, 242), 'encoding.is_valid', 'encoding.is_valid', (['suite'], {'number': '(49)'}), '(suite, number=49)\n', (224, 242), False, 'import encoding\n'), ((135, 170), '...
import threading from cmg import widgets from cmg.color import Color from cmg.event import Event from study_tool.card import Card from study_tool.card_set import CardSet from study_tool.config import Config from study_tool.gui.generic_table_widget import GenericTableWidget from study_tool.gui.card_set_browser_widget im...
[ "cmg.widgets.Button", "threading.Thread", "cmg.widgets.Label", "cmg.event.Event", "study_tool.gui.generic_table_widget.GenericTableWidget", "cmg.widgets.HBoxLayout", "cmg.widgets.AbstractScrollArea", "study_tool.config.Config.app.push_gui_state", "cmg.widgets.VBoxLayout", "cmg.widgets.TextEdit" ]
[((845, 856), 'cmg.event.Event', 'Event', (['Card'], {}), '(Card)\n', (850, 856), False, 'from cmg.event import Event\n'), ((911, 929), 'cmg.widgets.TextEdit', 'widgets.TextEdit', ([], {}), '()\n', (927, 929), False, 'from cmg import widgets\n'), ((961, 987), 'cmg.widgets.Label', 'widgets.Label', (['"""<russian>"""'], ...
from sklearn.datasets import load_iris iris = load_iris() from sklearn.cluster import DBSCAN dbscan = DBSCAN(eps=0.2, metric='euclidean', min_samples=5) import numpy # DBSCAN(eps=0.5, metric='euclidean', min_samples=5,random_state=111) iris = load_iris() print (iris.feature_names) X, y = load_iris(return_X_y=True...
[ "sklearn.metrics.silhouette_score", "sklearn.datasets.load_iris", "numpy.delete", "sklearn.cluster.DBSCAN" ]
[((46, 57), 'sklearn.datasets.load_iris', 'load_iris', ([], {}), '()\n', (55, 57), False, 'from sklearn.datasets import load_iris\n'), ((103, 153), 'sklearn.cluster.DBSCAN', 'DBSCAN', ([], {'eps': '(0.2)', 'metric': '"""euclidean"""', 'min_samples': '(5)'}), "(eps=0.2, metric='euclidean', min_samples=5)\n", (109, 153),...
""" aionanomsg socket library. This is probably what you're looking for. """ import asyncio from . import _nanomsg, symbols class NNSocket(_nanomsg.NNSocket): """ Public interface for nanomsg operations. """ def __init__(self, nn_type, domain=_nanomsg.AF_SP, loop=None): if loop is None: ...
[ "asyncio.get_event_loop", "asyncio.Future" ]
[((334, 358), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (356, 358), False, 'import asyncio\n'), ((656, 687), 'asyncio.Future', 'asyncio.Future', ([], {'loop': 'self._loop'}), '(loop=self._loop)\n', (670, 687), False, 'import asyncio\n')]
""" Script to evaluate the activation functions for the selected network + grid. """ import sys import os sys.path.insert(0, os.getcwd()) import numpy as np import sys import os import subprocess import itertools import imageio import json import torch import io import shutil import matplotlib.pyp...
[ "pyrenderer.GPUTimer", "io.StringIO", "os.path.abspath", "json.dump", "os.makedirs", "json.load", "volnet.inference.LoadedModel", "os.getcwd", "subprocess.run", "numpy.std", "os.path.exists", "losses.lossbuilder.LossBuilder", "volnet.inference.LoadedModel.convert_image", "numpy.mean", "t...
[((134, 145), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (143, 145), False, 'import os\n'), ((3188, 3225), 'os.path.join', 'os.path.join', (['BASE_PATH', '"""stats.json"""'], {}), "(BASE_PATH, 'stats.json')\n", (3200, 3225), False, 'import os\n'), ((3234, 3265), 'os.path.exists', 'os.path.exists', (['statistics_file']...
"""Module for controlling Qmotion blinds through a Qsync controller.""" __version__ = "0.1.0" import socket from socket import timeout import logging from .position import Position from .const import DEFAULT_TIMEOUT from .const import TCP_PORT from .const import BROADCAST_ADDRESS from .const import UDP_PORT from .ex...
[ "socket.socket", "logging.debug" ]
[((11075, 11164), 'logging.debug', 'logging.debug', (['"""Qsync: Group name [%s], channel [%d], code [%s]"""', 'name', 'channel', 'code'], {}), "('Qsync: Group name [%s], channel [%d], code [%s]', name,\n channel, code)\n", (11088, 11164), False, 'import logging\n'), ((11538, 11583), 'logging.debug', 'logging.debug'...
from bs4 import BeautifulSoup from .get_html import get_html from src.sqlite_writer import sql_writer from urllib.parse import urlparse, parse_qs async def process_index_page(session, url): html = await get_html(session, url) soup = BeautifulSoup(html, 'html.parser') items = soup.find_all('td', height='20') t...
[ "bs4.BeautifulSoup" ]
[((239, 273), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (252, 273), False, 'from bs4 import BeautifulSoup\n')]
# Copyright 2014 Mirantis, 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 ...
[ "os.path.basename", "fuelweb_test.logger.debug", "proboscis.test", "traceback.format_exc", "fuelweb_test.helpers.os_actions.OpenStackActions" ]
[((1205, 1244), 'proboscis.test', 'test', ([], {'enabled': '(False)', 'groups': "['plugins']"}), "(enabled=False, groups=['plugins'])\n", (1209, 1244), False, 'from proboscis import test\n'), ((3197, 3294), 'proboscis.test', 'test', ([], {'depends_on': '[SetupEnvironment.prepare_slaves_3]', 'groups': "['deploy_neutron_...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # -*- coding: utf-8 -*- from google_translate import GoogleTranslate google = GoogleTranslate() google.read_file("/Users/litaofan/github_code/AudioRecorder/app/src/main/res/values/strings.xml") google.start('ja')
[ "google_translate.GoogleTranslate" ]
[((127, 144), 'google_translate.GoogleTranslate', 'GoogleTranslate', ([], {}), '()\n', (142, 144), False, 'from google_translate import GoogleTranslate\n')]
import requests from bs4 import BeautifulSoup def scrap(): url="http://esp.uem.es/digitalAED/laboratorios.php?lab=C306" mainurl="http://esp.uem.es/digitalAED/" page = requests.get(url) soup = BeautifulSoup(page.content, 'html.parser') labs = soup.find_all('option') print(labs) con...
[ "bs4.BeautifulSoup", "requests.get" ]
[((186, 203), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (198, 203), False, 'import requests\n'), ((216, 258), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page.content', '"""html.parser"""'], {}), "(page.content, 'html.parser')\n", (229, 258), False, 'from bs4 import BeautifulSoup\n'), ((675, 709), 'request...
#!/usr/bin/env python from __future__ import print_function import sys import time import threading import Queue import redis def usage(): sys.stdout = sys.stderr print('Usage: spam_redis.py [channel||list] name count host [port 5151]') sys.exit(2) if len(sys.argv) < 5: usage() sys.exit() redis_...
[ "redis.Redis", "threading.Thread.__init__", "Queue.Queue", "time.time", "threading.Lock", "time.sleep", "sys.stdout.flush", "sys.exc_info", "sys.exit" ]
[((251, 262), 'sys.exit', 'sys.exit', (['(2)'], {}), '(2)\n', (259, 262), False, 'import sys\n'), ((302, 312), 'sys.exit', 'sys.exit', ([], {}), '()\n', (310, 312), False, 'import sys\n'), ((543, 574), 'threading.Thread.__init__', 'threading.Thread.__init__', (['self'], {}), '(self)\n', (568, 574), False, 'import threa...
import pytest from loguru import logger from tiktokpy import TikTokPy from tiktokpy.models.feed import FeedItem @pytest.mark.asyncio() async def test_user_feed(bot: TikTokPy): feed = await bot.user_feed(username="@mileycyrus") logger.info(feed) assert len(feed) == 50 assert isinstance(feed[0], FeedI...
[ "loguru.logger.info", "pytest.mark.asyncio" ]
[((116, 137), 'pytest.mark.asyncio', 'pytest.mark.asyncio', ([], {}), '()\n', (135, 137), False, 'import pytest\n'), ((238, 255), 'loguru.logger.info', 'logger.info', (['feed'], {}), '(feed)\n', (249, 255), False, 'from loguru import logger\n')]
from django.contrib import admin from django.urls import path, include from rest_framework import routers from .views import * router = routers.DefaultRouter() router.register('tv', TVViewSet) urlpatterns = [ path('', include(router.urls)), path('me/', UserDetailView.as_view()), path('ocena/', OcenaView.a...
[ "rest_framework.routers.DefaultRouter", "django.urls.include" ]
[((137, 160), 'rest_framework.routers.DefaultRouter', 'routers.DefaultRouter', ([], {}), '()\n', (158, 160), False, 'from rest_framework import routers\n'), ((224, 244), 'django.urls.include', 'include', (['router.urls'], {}), '(router.urls)\n', (231, 244), False, 'from django.urls import path, include\n')]
#! /usr/bin/env python3 """ Script to download public logs """ import os import glob import argparse import json import datetime import sys import time import requests from plot_app.config_tables import * def get_arguments(): """Get parsed CLI arguments""" parser = argparse.ArgumentParser( descript...
[ "os.path.abspath", "argparse.ArgumentParser", "json.loads", "os.path.basename", "os.getcwd", "json.dumps", "datetime.datetime.strptime", "requests.get", "requests.post" ]
[((279, 462), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Python script for downloading public logs from the PX4/flight_review database."""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description=\n 'Python script for downloading public logs from the PX4/flig...
#!/usr/bin/env python from __future__ import division from vector_illustration_processing_simplified import pi_point, pi_line, pi_arithmetic import math import rospy import tf2_ros from sensor_msgs.msg import LaserScan from geometry_msgs.msg import TransformStamped from tf.transformations import euler_from_quaternion...
[ "rospy.Time.now", "vector_illustration_processing_simplified.pi_point.Point", "rospy.Time", "math.sin", "vector_illustration_processing_simplified.pi_line.Line", "math.cos", "tf.transformations.euler_from_quaternion", "sensor_msgs.msg.LaserScan" ]
[((1628, 1648), 'vector_illustration_processing_simplified.pi_point.Point', 'pi_point.Point', (['x', 'y'], {}), '(x, y)\n', (1642, 1648), False, 'from vector_illustration_processing_simplified import pi_point, pi_line, pi_arithmetic\n'), ((2653, 2673), 'vector_illustration_processing_simplified.pi_point.Point', 'pi_poi...
# Generated by Django 3.0.5 on 2020-05-04 11:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("timer", "0005_timestamp_project"), ] operations = [ migrations.DeleteModel( name="TimerState", ), ]
[ "django.db.migrations.DeleteModel" ]
[((224, 265), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""TimerState"""'}), "(name='TimerState')\n", (246, 265), False, 'from django.db import migrations\n')]
from typing import List, Optional from river import synth from river.drift import ADWIN from river.tree import HoeffdingTreeClassifier from streamselect.adaptive_learning import BaseAdaptiveLearner from streamselect.adaptive_learning.reidentification_schedulers import ( DriftDetectionCheck, DriftInfo, Dri...
[ "river.drift.ADWIN", "streamselect.concept_representations.ErrorRateRepresentation", "streamselect.adaptive_learning.reidentification_schedulers.PeriodicCheck", "river.synth.STAGGER", "river.tree.HoeffdingTreeClassifier", "streamselect.adaptive_learning.reidentification_schedulers.DriftDetectionCheck", ...
[((4735, 4829), 'streamselect.concept_representations.ErrorRateRepresentation', 'ErrorRateRepresentation', (['al_classifier.representation_window_size', 'baseline_state.state_id'], {}), '(al_classifier.representation_window_size,\n baseline_state.state_id)\n', (4758, 4829), False, 'from streamselect.concept_represen...
import pickle import time import networkx import torch import torch.nn as nn device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") """ Experimental : simple deep learning model to infer protein present in a tissue from a vector of expression. """ class PPGCN(nn.Module): def __init__(self, acc...
[ "torch.nn.ReLU", "networkx.read_gpickle", "time.time", "torch.nn.ModuleDict", "torch.cuda.is_available", "pdb.set_trace", "torch.nn.Linear", "torch.as_tensor", "torch.no_grad", "torch.nn.Sigmoid" ]
[((113, 138), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (136, 138), False, 'import torch\n'), ((411, 478), 'networkx.read_gpickle', 'networkx.read_gpickle', (['"""../data/pp_interactions_undirected.gpickle"""'], {}), "('../data/pp_interactions_undirected.gpickle')\n", (432, 478), False, 'i...
import urllib2 class Request: @staticmethod def update(): base = 'https://iitbbs.herokuapp.com/' news = urllib2.urlopen(base + 'news').read() notices = urllib2.urlopen(base + 'notices').read() events = urllib2.urlopen(base + 'events').read() nNews = open('json/new/news.json', 'w') nNews.write(news) ...
[ "urllib2.urlopen" ]
[((113, 143), 'urllib2.urlopen', 'urllib2.urlopen', (["(base + 'news')"], {}), "(base + 'news')\n", (128, 143), False, 'import urllib2\n'), ((163, 196), 'urllib2.urlopen', 'urllib2.urlopen', (["(base + 'notices')"], {}), "(base + 'notices')\n", (178, 196), False, 'import urllib2\n'), ((215, 247), 'urllib2.urlopen', 'ur...
from bitstring import BitArray import collections import functools import itertools import json import math import time class Tree: def __init__(self, left=None, right=None): self.left = left self.right = right def construct_frequency_tree(freqs): nodes = freqs while len(nodes) > 1: key1, val1 = nod...
[ "json.load", "math.ceil", "bitstring.BitArray", "collections.defaultdict", "time.monotonic", "itertools.product" ]
[((851, 879), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (874, 879), False, 'import collections\n'), ((8537, 8553), 'time.monotonic', 'time.monotonic', ([], {}), '()\n', (8551, 8553), False, 'import time\n'), ((4665, 4678), 'json.load', 'json.load', (['fp'], {}), '(fp)\n', (4674, 46...
from py_hcl.firrtl_ir.expr.prim_ops import Add from py_hcl.firrtl_ir.shortcuts import uw, sw, u, w, s from py_hcl.firrtl_ir.type import UIntType, SIntType from tests.test_firrtl_ir.utils import serialize_equal from .helper import OpCase, basis_tester, \ encounter_error_tester, type_wrong_cases_2_args_gen, max_width...
[ "py_hcl.firrtl_ir.shortcuts.uw", "py_hcl.firrtl_ir.shortcuts.w", "py_hcl.firrtl_ir.shortcuts.sw" ]
[((1215, 1220), 'py_hcl.firrtl_ir.shortcuts.uw', 'uw', (['(1)'], {}), '(1)\n', (1217, 1220), False, 'from py_hcl.firrtl_ir.shortcuts import uw, sw, u, w, s\n'), ((1269, 1274), 'py_hcl.firrtl_ir.shortcuts.sw', 'sw', (['(1)'], {}), '(1)\n', (1271, 1274), False, 'from py_hcl.firrtl_ir.shortcuts import uw, sw, u, w, s\n'),...
from pathlib import Path from typing import TypeVar, Generic from pydantic import BaseModel, Field from flexlate.config import AppliedTemplateWithSource from flexlate.template.base import Template from flexlate.template_data import TemplateData T = TypeVar("T", bound=Template) class Renderable(BaseModel, Generic[T...
[ "typing.TypeVar", "pathlib.Path", "pydantic.Field" ]
[((252, 280), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {'bound': 'Template'}), "('T', bound=Template)\n", (259, 280), False, 'from typing import TypeVar, Generic\n'), ((365, 392), 'pydantic.Field', 'Field', ([], {'default_factory': 'dict'}), '(default_factory=dict)\n', (370, 392), False, 'from pydantic import BaseMod...
from django.contrib import admin from history.family_history.models import FamilyHistory class FamilyHistoryAdmin(admin.ModelAdmin): pass admin.site.register(FamilyHistory, FamilyHistoryAdmin)
[ "django.contrib.admin.site.register" ]
[((145, 199), 'django.contrib.admin.site.register', 'admin.site.register', (['FamilyHistory', 'FamilyHistoryAdmin'], {}), '(FamilyHistory, FamilyHistoryAdmin)\n', (164, 199), False, 'from django.contrib import admin\n')]
# Generated by Selenium IDE import pytest import time import json import os from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.wait import W...
[ "selenium.webdriver.chrome.options.Options", "selenium.webdriver.Chrome", "selenium.webdriver.common.action_chains.ActionChains" ]
[((543, 552), 'selenium.webdriver.chrome.options.Options', 'Options', ([], {}), '()\n', (550, 552), False, 'from selenium.webdriver.chrome.options import Options\n'), ((612, 645), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'options': 'options'}), '(options=options)\n', (628, 645), False, 'from selenium impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ライブラリのインポート import cv2 import numpy as np # 画像を読み込み image = cv2.imread("original.jpg") # バウンディングボックスを描画 # cv2.rectangle(元画像, ボックスの左上の位置, ボックスの右下の位置, 色情報, 線の太さ) # 位置(x, y)は画像左上の原点(0, 0)から指定する edited_image = cv2.rectangle(image, (100, 150), (200, 300), (0, 0, 255), 2) ...
[ "cv2.waitKey", "cv2.destroyAllWindows", "cv2.imread", "cv2.rectangle", "cv2.imshow" ]
[((111, 137), 'cv2.imread', 'cv2.imread', (['"""original.jpg"""'], {}), "('original.jpg')\n", (121, 137), False, 'import cv2\n'), ((258, 318), 'cv2.rectangle', 'cv2.rectangle', (['image', '(100, 150)', '(200, 300)', '(0, 0, 255)', '(2)'], {}), '(image, (100, 150), (200, 300), (0, 0, 255), 2)\n', (271, 318), False, 'imp...
""" Module with functions to generate PQR input (PQR) Author: <NAME> Email: <EMAIL> """ import os kcalToKj = 4.184 def writePQR(molecule, pqrFile): """Generate PQR file Parameters ---------- molecule : molecule class Molecule class pqrFile : str PQR file name """ sig...
[ "os.path.join" ]
[((1136, 1175), 'os.path.join', 'os.path.join', (['workdir', "(molname + '.pqr')"], {}), "(workdir, molname + '.pqr')\n", (1148, 1175), False, 'import os\n')]
#!/usr/bin/python # # BSD-3 Clause. # Copyright (C) 2017 <NAME>. # # Simple Cross Platform Installer Script import sys import os import requests from shutil import rmtree # Packages to install QArchive = { "username" : "antony-jr", "repo" : "QArchive", "mkdir" : { "QArchive/s...
[ "os.mkdir", "os.remove", "os.path.exists", "os.path.isfile", "requests.get", "shutil.rmtree", "sys.exit" ]
[((882, 912), 'os.path.isfile', 'os.path.isfile', (["config['repo']"], {}), "(config['repo'])\n", (896, 912), False, 'import os\n'), ((1778, 1789), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (1786, 1789), False, 'import sys\n'), ((970, 995), 'os.remove', 'os.remove', (["config['repo']"], {}), "(config['repo'])\n",...
from django.contrib import admin from .models import Car admin.site.register(Car)
[ "django.contrib.admin.site.register" ]
[((59, 83), 'django.contrib.admin.site.register', 'admin.site.register', (['Car'], {}), '(Car)\n', (78, 83), False, 'from django.contrib import admin\n')]
import numpy as np import pickle from IPython import embed class RunningMeanStd(object): # https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm def __init__(self, shape=()): self.mean = np.zeros(shape, np.float32) self.var = np.ones(shape, np.float32) sel...
[ "pickle.dump", "numpy.square", "numpy.zeros", "numpy.ones", "numpy.isnan", "numpy.mean", "pickle.load", "numpy.var", "numpy.sqrt" ]
[((235, 262), 'numpy.zeros', 'np.zeros', (['shape', 'np.float32'], {}), '(shape, np.float32)\n', (243, 262), True, 'import numpy as np\n'), ((282, 308), 'numpy.ones', 'np.ones', (['shape', 'np.float32'], {}), '(shape, np.float32)\n', (289, 308), True, 'import numpy as np\n'), ((609, 628), 'numpy.mean', 'np.mean', (['x_...
import pytest from eth_abi.abi import ( decode, ) from eth_abi.exceptions import ( InsufficientDataBytes, ) from eth_abi.grammar import ( parse, ) from ..common.unit import ( CORRECT_DYNAMIC_ENCODINGS, CORRECT_STATIC_ENCODINGS, CORRECT_TUPLE_ENCODINGS, words, ) @pytest.mark.parametrize( ...
[ "pytest.skip", "eth_abi.abi.decode", "pytest.raises", "pytest.mark.parametrize", "eth_abi.grammar.parse" ]
[((295, 383), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""type_str,expected,abi_encoding,_"""', 'CORRECT_TUPLE_ENCODINGS'], {}), "('type_str,expected,abi_encoding,_',\n CORRECT_TUPLE_ENCODINGS)\n", (318, 383), False, 'import pytest\n'), ((750, 839), 'pytest.mark.parametrize', 'pytest.mark.parametrize...
#!/usr/bin/env python2.7 # vim: fileencoding=utf-8 from distutils.core import setup from docushare.__init__ import \ __author__, __copyright__, __license__, __version__, __email__ setup( name="docushare", version=__version__, author=__author__, author_email=__email__, url="http://launchp...
[ "distutils.core.setup" ]
[((192, 599), 'distutils.core.setup', 'setup', ([], {'name': '"""docushare"""', 'version': '__version__', 'author': '__author__', 'author_email': '__email__', 'url': '"""http://launchpad.net/docushare"""', 'description': '"""A DocuShare Client Library."""', 'long_description': '"""`docushare\' is a client library for D...
''' Schema of extracellular information. ''' import re import os import sys from datetime import datetime import numpy as np import scipy.io as sio import datajoint as dj import tqdm from . import reference, utilities, acquisition, analysis schema = dj.schema(dj.config['custom']['database.prefix'] + 'extracellular')...
[ "datajoint.schema" ]
[((253, 320), 'datajoint.schema', 'dj.schema', (["(dj.config['custom']['database.prefix'] + 'extracellular')"], {}), "(dj.config['custom']['database.prefix'] + 'extracellular')\n", (262, 320), True, 'import datajoint as dj\n')]
# -*- coding: UTF-8 -*- import tkinter as tk from tkinter import ttk import tkinter.messagebox from gui_class_login import UC_Login from gui_class_show import UC_Show root = tk.Tk() form_login = UC_Login(root) root.mainloop() root.destroy() root = tk.Tk() form_show = UC_Show(root) root.mainloop()
[ "gui_class_show.UC_Show", "tkinter.Tk", "gui_class_login.UC_Login" ]
[((177, 184), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (182, 184), True, 'import tkinter as tk\n'), ((198, 212), 'gui_class_login.UC_Login', 'UC_Login', (['root'], {}), '(root)\n', (206, 212), False, 'from gui_class_login import UC_Login\n'), ((252, 259), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (257, 259), True, 'impo...
"""Get temperature and humidity from a DHT22 sensor""" # If we're not running on a Raspberry, use a GPIO stub so we can still get # some coding done import os if os.uname()[1] == 'raspberrypi': from Adafruit_DHT import read_retry, DHT22 # pylint: disable=import-error else: from lib.Adafruit_DHT_stub import re...
[ "lib.Adafruit_DHT_stub.read_retry", "os.uname" ]
[((163, 173), 'os.uname', 'os.uname', ([], {}), '()\n', (171, 173), False, 'import os\n'), ((864, 897), 'lib.Adafruit_DHT_stub.read_retry', 'read_retry', (['self.sensor', 'self.pin'], {}), '(self.sensor, self.pin)\n', (874, 897), False, 'from lib.Adafruit_DHT_stub import read_retry, DHT22\n')]
import boto3, botocore from os import environ import logging import jsonschema class AwsRdsProvisionError(Exception): pass class AwsRdsManager: log = logging.getLogger(__name__) db_schema = dict( type="object", properties=dict( database=dict(type="string"), passwo...
[ "jsonschema.validate", "logging.getLogger", "boto3.client" ]
[((162, 189), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (179, 189), False, 'import logging\n'), ((1388, 1434), 'jsonschema.validate', 'jsonschema.validate', (['config', 'cls.config_schema'], {}), '(config, cls.config_schema)\n', (1407, 1434), False, 'import jsonschema\n'), ((1510, 15...
import functools import inspect import wrapt from experimental_config import ENABLED_EXPERIMENTS EXPERIMENTS_IGNORED = False class DisabledExperiment(Exception): pass class MismatchingArguments(TypeError): pass def volatile(experiment, safe=False, refactor=False): if not ENABLED_EXPERIMENTS: ra...
[ "inspect.getargspec" ]
[((555, 582), 'inspect.getargspec', 'inspect.getargspec', (['subject'], {}), '(subject)\n', (573, 582), False, 'import inspect\n'), ((630, 660), 'inspect.getargspec', 'inspect.getargspec', (['experiment'], {}), '(experiment)\n', (648, 660), False, 'import inspect\n')]
from typing import Optional from uuid import uuid4 from aiogram import types, Bot from aiogram.dispatcher import FSMContext from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import sessionmaker from bot.menu.keyboards import menu_keyboard from bot.menu.states import States from bot.user.models import User...
[ "bot.user.services.invite.create_invite", "uuid.uuid4", "aiogram.Bot.get_current" ]
[((842, 849), 'uuid.uuid4', 'uuid4', ([], {}), '()\n', (847, 849), False, 'from uuid import uuid4\n'), ((877, 894), 'aiogram.Bot.get_current', 'Bot.get_current', ([], {}), '()\n', (892, 894), False, 'from aiogram import types, Bot\n'), ((1082, 1142), 'bot.user.services.invite.create_invite', 'create_invite', (['async_s...
# # Story Time App # Exposes functions that connect to and query the storytime DB # from typing import List from sqlalchemy.orm.exc import NoResultFound from werkzeug.datastructures import FileStorage from storytime import file_storage_service from storytime.story_time_db_init import Category, Story, UploadFile, Use...
[ "storytime.story_time_db_init.db_session.execute", "storytime.story_time_db_init.Story.categories.any", "storytime.story_time_db_init.Category.label.asc", "storytime.story_time_db_init.db_session.rollback", "storytime.story_time_db_init.Story.date_last_modified.desc", "storytime.story_time_db_init.db_sess...
[((635, 655), 'storytime.story_time_db_init.db_session.add', 'db_session.add', (['user'], {}), '(user)\n', (649, 655), False, 'from storytime.story_time_db_init import Category, Story, UploadFile, User, db_engine, db_session\n'), ((660, 679), 'storytime.story_time_db_init.db_session.commit', 'db_session.commit', ([], {...
## The PSICT-UIF top-level interface class ## In the course of normal scripting, this should be the only object ## the the user directly interfaces with in the external script. import os import sys import importlib.util from pathlib import Path import logging from datetime import datetime from PSICT_UIF._include36....
[ "PSICT_UIF._include36.PulseSeqManager.PulseSeqManager", "logging.FileHandler", "os.makedirs", "os.getcwd", "PSICT_UIF._include36.LabberExporter.LabberExporter", "logging.StreamHandler", "logging.addLevelName", "os.path.exists", "datetime.datetime.now", "logging.Formatter", "os.path.normpath", ...
[((3074, 3085), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (3083, 3085), False, 'import os\n'), ((3247, 3295), 'PSICT_UIF._include36.FileManager.FileManager', 'FileManager', ([], {'parent_logger_name': 'self.logger.name'}), '(parent_logger_name=self.logger.name)\n', (3258, 3295), False, 'from PSICT_UIF._include36.File...
#! /usr/bin/python3 # -*- coding: utf-8 -*- import time import sys import serial import codecs PORT_SERIE = "/dev/ttyAMA0" # Initialisation du port série ser = serial.Serial( port = PORT_SERIE, baudrate = 9600, parity = serial.PARITY_NONE, stopbits = serial.STOPBITS_ONE, bytesize = serial.EIGHTBI...
[ "serial.Serial", "sys.exit" ]
[((163, 307), 'serial.Serial', 'serial.Serial', ([], {'port': 'PORT_SERIE', 'baudrate': '(9600)', 'parity': 'serial.PARITY_NONE', 'stopbits': 'serial.STOPBITS_ONE', 'bytesize': 'serial.EIGHTBITS', 'timeout': '(3)'}), '(port=PORT_SERIE, baudrate=9600, parity=serial.PARITY_NONE,\n stopbits=serial.STOPBITS_ONE, bytesiz...
"""Module to setup celery client. .. moduleauthor:: <NAME> <<EMAIL>> .. note:: If CELERY_CONFIG_MODULE is set in environment, load celery config from the filename declared in CELERY_CONFIG_MODULE. """ import os from celery import Celery celery = Celery(__name__) if 'CELERY_CONFIG_MODULE' in os.en...
[ "celery.Celery" ]
[((269, 285), 'celery.Celery', 'Celery', (['__name__'], {}), '(__name__)\n', (275, 285), False, 'from celery import Celery\n')]
#!/usr/bin/python from tkinter import Tk, Frame, Label, BOTH import time class MirrorV(Frame): def __init__(self, parent): Frame.__init__(self, parent, background="white") self.parent = parent self.initUI() def initUI(self): self.parent.title("MirrorV") self.makeFulls...
[ "time.strftime", "tkinter.Label", "tkinter.Tk", "tkinter.Frame.__init__" ]
[((1113, 1117), 'tkinter.Tk', 'Tk', ([], {}), '()\n', (1115, 1117), False, 'from tkinter import Tk, Frame, Label, BOTH\n'), ((138, 186), 'tkinter.Frame.__init__', 'Frame.__init__', (['self', 'parent'], {'background': '"""white"""'}), "(self, parent, background='white')\n", (152, 186), False, 'from tkinter import Tk, Fr...
from dataiku.customrecipe import get_recipe_config import logging from utils import get_input_output, text_extraction_parameters from tesseractocr.extract_text import text_extraction import pandas as pd from constants import Constants logger = logging.getLogger(__name__) input_folder, output_dataset = get_input_outpu...
[ "pandas.DataFrame", "dataiku.customrecipe.get_recipe_config", "tesseractocr.extract_text.text_extraction", "utils.get_input_output", "logging.getLogger" ]
[((245, 272), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (262, 272), False, 'import logging\n'), ((305, 342), 'utils.get_input_output', 'get_input_output', (['"""folder"""', '"""dataset"""'], {}), "('folder', 'dataset')\n", (321, 342), False, 'from utils import get_input_output, text_...
import os import click import pandas as pd from datetime import datetime from .transcoding.names.worldometers import col, val worldometer_covid_url = ( "https://web.archive.org/web/{}/" "https://www.worldometers.info/coronavirus/{}" ) figures = dict( age_sex_demographics="coronavirus-age-sex-demographics", c...
[ "os.makedirs", "click.argument", "os.path.join", "click.option", "datetime.datetime.now" ]
[((1513, 1537), 'click.argument', 'click.argument', (['"""figure"""'], {}), "('figure')\n", (1527, 1537), False, 'import click\n'), ((1610, 1733), 'click.option', 'click.option', (['"""--out-dir"""'], {'default': '"""./data/interim/worldometers/"""', 'help': '"""if not specified, defaults to \'<figure>.csv\'"""'}), '(\...
import gym import custom_gym_env def test_reset_and_step(): env = gym.make('MountainCarContinuous-v1') env.reset() action = [0.5] next_state, reward, done, info = env.step(action) pass
[ "gym.make" ]
[((71, 107), 'gym.make', 'gym.make', (['"""MountainCarContinuous-v1"""'], {}), "('MountainCarContinuous-v1')\n", (79, 107), False, 'import gym\n')]
# -*- coding: utf-8 -*- import pandas as pd import os from common import globals as glob from common import utils #from matplotlib import style #style.use("ggplot") from pandas.tools.plotting import scatter_matrix from . import clustering from . import assoc_rule_mining from . import regression from . import classifica...
[ "common.globals.log.info", "pandas.tools.plotting.scatter_matrix", "pandas.read_csv", "matplotlib.pyplot.clf", "matplotlib.pyplot.close", "scipy.stats.ttest_ind", "matplotlib.pyplot.figure", "common.utils.calc_dqs", "common.utils.calc_r", "os.path.join", "matplotlib.pyplot.savefig" ]
[((2983, 3035), 'common.globals.log.info', 'glob.log.info', (['"""bins for ST.INT.ARVL.Categorical ->"""'], {}), "('bins for ST.INT.ARVL.Categorical ->')\n", (2996, 3035), True, 'from common import globals as glob\n'), ((3040, 3059), 'common.globals.log.info', 'glob.log.info', (['bins'], {}), '(bins)\n', (3053, 3059), ...
import os import pyAesCrypt bufferSize = 64 * 1024 key_file = open("keyfile.txt", "r") key = key_file.readline()[1:-2] key_file.close() dir_file = open("dirfile.txt", "r") dir_name = dir_file.readline()[1:-2] dir_file.close() if(key == "abrakadabra"): os.remove("keyfile.txt") os.remove("dirfile...
[ "os.remove", "os.makedirs" ]
[((272, 296), 'os.remove', 'os.remove', (['"""keyfile.txt"""'], {}), "('keyfile.txt')\n", (281, 296), False, 'import os\n'), ((302, 326), 'os.remove', 'os.remove', (['"""dirfile.txt"""'], {}), "('dirfile.txt')\n", (311, 326), False, 'import os\n'), ((332, 353), 'os.makedirs', 'os.makedirs', (['dir_name'], {}), '(dir_na...
import os from .base_atari_env import BaseAtariEnv, base_env_wrapper_fn, parallel_wrapper_fn def raw_env(**kwargs): mode = 33 num_players = 4 return BaseAtariEnv( game="pong", num_players=num_players, mode_num=mode, env_name=os.path.basename(__file__)[:-3], **kwarg...
[ "os.path.basename" ]
[((272, 298), 'os.path.basename', 'os.path.basename', (['__file__'], {}), '(__file__)\n', (288, 298), False, 'import os\n')]
# codigo ganbiarra import os from turtle import onclick os.environ['KIVY_GL_BACKEND'] = 'angle_sdl2' # codigo ganbiarra from kivy.app import App from kivy.uix.label import Label from kivy.uix.screenmanager import ScreenManager, Screen from kivy.clock import Clock class Screen1(Screen): def my_callback(dt): ...
[ "kivy.clock.Clock.schedule_once" ]
[((416, 451), 'kivy.clock.Clock.schedule_once', 'Clock.schedule_once', (['my_callback', '(1)'], {}), '(my_callback, 1)\n', (435, 451), False, 'from kivy.clock import Clock\n'), ((548, 583), 'kivy.clock.Clock.schedule_once', 'Clock.schedule_once', (['my_callback', '(1)'], {}), '(my_callback, 1)\n', (567, 583), False, 'f...
def create_service(name, **kwargs): if name == 'Regulation': from services.reg_service.reg_service import RegService return RegService() elif name == 'ArtificialInertia': from services.artificial_inertia_service.artificial_inertia_service import ArtificialInertiaService return ...
[ "services.peak_managment_service.peak_management_service.PeakManagementService", "services.energy_market_service.energy_market_service.EnergyMarketService", "services.reg_service.reg_service.RegService", "datetime.timedelta", "services.artificial_inertia_service.artificial_inertia_service.ArtificialInertiaS...
[((145, 157), 'services.reg_service.reg_service.RegService', 'RegService', ([], {}), '()\n', (155, 157), False, 'from services.reg_service.reg_service import RegService\n'), ((320, 346), 'services.artificial_inertia_service.artificial_inertia_service.ArtificialInertiaService', 'ArtificialInertiaService', ([], {}), '()\...
#!/usr/bin/env python import rospy import math import numpy as np import scipy from scipy import interpolate from scipy.interpolate import CubicHermiteSpline from nav_msgs.msg import Path from hybrid_astar.srv import * from std_msgs.msg import * import pylab as pl import numpy as np import matplotlib.pyplot as plt imp...
[ "rosbag.Bag", "rospy.Publisher", "rospy.init_node" ]
[((421, 462), 'rospy.init_node', 'rospy.init_node', (['"""replay"""'], {'anonymous': '(True)'}), "('replay', anonymous=True)\n", (436, 462), False, 'import rospy\n'), ((469, 527), 'rospy.Publisher', 'rospy.Publisher', (['"""/sPath"""', 'Path'], {'queue_size': '(10)', 'latch': '(True)'}), "('/sPath', Path, queue_size=10...
import os from pathlib import Path from utils.installer import Installer from utils.chalk import print_header from utils.system import install_pkg, run_command from utils.utils import remove, file_exists, move, link_file, link_files import utils.platform as platform SCRIPT_DIR = Path(__file__).parent class Main(Ins...
[ "pathlib.Path.home", "utils.chalk.print_header", "pathlib.Path", "utils.system.install_pkg", "utils.utils.file_exists", "utils.utils.move", "utils.system.run_command" ]
[((282, 296), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (286, 296), False, 'from pathlib import Path\n'), ((409, 439), 'utils.chalk.print_header', 'print_header', (['"""Setting up VNC"""'], {}), "('Setting up VNC')\n", (421, 439), False, 'from utils.chalk import print_header\n'), ((449, 485), 'utils.s...
from setuptools import setup, find_packages setup(name='m_gym', version='0.0.1', install_requires=['gym','numpy','pathlib', 'uuid'] )
[ "setuptools.setup" ]
[((46, 140), 'setuptools.setup', 'setup', ([], {'name': '"""m_gym"""', 'version': '"""0.0.1"""', 'install_requires': "['gym', 'numpy', 'pathlib', 'uuid']"}), "(name='m_gym', version='0.0.1', install_requires=['gym', 'numpy',\n 'pathlib', 'uuid'])\n", (51, 140), False, 'from setuptools import setup, find_packages\n')...
#!/usr/bin/python import os import os.path with open("../file_walker.cmake", 'w') as file_walker: file_walker.write("set(SOURCES\n") for root, sub_dirs, files in os.walk("../src"): for file in files: if file.endswith(".cpp"): file_walker.write(" " + root[3:] + "/" + file...
[ "os.walk" ]
[((172, 189), 'os.walk', 'os.walk', (['"""../src"""'], {}), "('../src')\n", (179, 189), False, 'import os\n'), ((430, 451), 'os.walk', 'os.walk', (['"""../include"""'], {}), "('../include')\n", (437, 451), False, 'import os\n')]
#!/usr/bin/env python3 import argparse import logging import sys from ..reporting.report_result import report_artifact_stats_result from ..util.constants import LOG, PERFORMANCE_STORAGE_SERVICE_API from .base_artifact_stats_collector import BaseArtifactStatsCollector from .collectors import * # Import necessary for _...
[ "argparse.ArgumentParser", "sys.exit", "logging.shutdown" ]
[((1817, 1842), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1840, 1842), False, 'import argparse\n'), ((3375, 3393), 'logging.shutdown', 'logging.shutdown', ([], {}), '()\n', (3391, 3393), False, 'import logging\n'), ((3398, 3417), 'sys.exit', 'sys.exit', (['exit_code'], {}), '(exit_code)\n...
import pygame from setup import Setup class Textures: """Загружает из файлов и хранит изображения.""" def __init__(self): self.setup = Setup() # Клетка self.cell = pygame.image.load('png/cell.png') # Выделенная клетка self.cell_select = pygame.image.load('png/cell_se...
[ "pygame.image.load", "setup.Setup" ]
[((154, 161), 'setup.Setup', 'Setup', ([], {}), '()\n', (159, 161), False, 'from setup import Setup\n'), ((200, 233), 'pygame.image.load', 'pygame.image.load', (['"""png/cell.png"""'], {}), "('png/cell.png')\n", (217, 233), False, 'import pygame\n'), ((290, 330), 'pygame.image.load', 'pygame.image.load', (['"""png/cell...
"""Contains the test suite for the context utils.""" import unittest from typing import Dict, Any from pyengy.error import PyEngyError from pyengy.util.context_utils import Context def get_test_data() -> Dict[str, Any]: """ Auxiliary method to return test data args. :return: Test data. """ retu...
[ "unittest.main", "pyengy.util.context_utils.Context" ]
[((6455, 6470), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6468, 6470), False, 'import unittest\n'), ((834, 847), 'pyengy.util.context_utils.Context', 'Context', (['data'], {}), '(data)\n', (841, 847), False, 'from pyengy.util.context_utils import Context\n'), ((1176, 1189), 'pyengy.util.context_utils.Context...
#!/usr/bin/env python3 import requests, os url = "http://localhost/upload/" user = os.getenv('USER') image_directory = '/home/{}/supplier-data/images/'.format(user) files = os.listdir(image_directory) for image_name in files: if not image_name.startswith('.') and 'jpeg' in image_name: image_path = os.pat...
[ "os.listdir", "requests.post", "os.path.join", "os.getenv" ]
[((85, 102), 'os.getenv', 'os.getenv', (['"""USER"""'], {}), "('USER')\n", (94, 102), False, 'import requests, os\n'), ((175, 202), 'os.listdir', 'os.listdir', (['image_directory'], {}), '(image_directory)\n', (185, 202), False, 'import requests, os\n'), ((314, 355), 'os.path.join', 'os.path.join', (['image_directory',...
import requests from bs4 import BeautifulSoup import stanza import re import csv from tqdm import tqdm from OSGridConverter import grid2latlong from nuts import NutsFinder import pandas as pd # import json # import plotly.express as px # from geojson_rewind import rewind stanza.download("en") # download English mode...
[ "pandas.DataFrame", "tqdm.tqdm", "pandas.DataFrame.from_dict", "nuts.NutsFinder", "csv.DictReader", "re.match", "stanza.Pipeline", "OSGridConverter.grid2latlong", "stanza.download", "bs4.BeautifulSoup" ]
[((274, 295), 'stanza.download', 'stanza.download', (['"""en"""'], {}), "('en')\n", (289, 295), False, 'import stanza\n'), ((328, 349), 'stanza.Pipeline', 'stanza.Pipeline', (['"""en"""'], {}), "('en')\n", (343, 349), False, 'import stanza\n'), ((2986, 3013), 'pandas.DataFrame.from_dict', 'pd.DataFrame.from_dict', (['o...
from workflow.WF_9_send_fastas.WF_9_helpers import WorkflowObj9 import time def run_script_9(day): print("\n================================\nCompile Qualifying FASTAs\n================================\n\n") # import relevant data from json file data_obj = WorkflowObj9() data_obj.get_json() # g...
[ "workflow.WF_9_send_fastas.WF_9_helpers.WorkflowObj9", "time.sleep" ]
[((273, 287), 'workflow.WF_9_send_fastas.WF_9_helpers.WorkflowObj9', 'WorkflowObj9', ([], {}), '()\n', (285, 287), False, 'from workflow.WF_9_send_fastas.WF_9_helpers import WorkflowObj9\n'), ((543, 556), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (553, 556), False, 'import time\n')]
from swagger.tests.common import SwaggerSpecsTestCase import json class SchemaTest(SwaggerSpecsTestCase): def _swagger_bodies(self): for file_path in self.get_swagger_file_paths(lambda x: 'example' not in x.lower()): with open(file_path, 'r', encoding='utf-8') as f: body = jso...
[ "swagger.model.schema.swagger.Swagger", "json.load", "swagger.model.schema.external_documentation.ExternalDocumentation", "swagger.model.schema.schema.Schema", "swagger.model.schema.tag.Tag", "swagger.model.schema.header.Header", "swagger.model.schema.security_scheme.SecuritySchemeField", "swagger.mod...
[((317, 329), 'json.load', 'json.load', (['f'], {}), '(f)\n', (326, 329), False, 'import json\n'), ((620, 633), 'swagger.model.schema.swagger.Swagger', 'Swagger', (['body'], {}), '(body)\n', (627, 633), False, 'from swagger.model.schema.swagger import Swagger\n'), ((1121, 1131), 'swagger.model.schema.info.Info', 'Info'...
import sys import os from contextlib import closing from minerva.metadata.db import MetadataConnection from minerva.metadata.json import save def main(uri, path): try: os.makedirs(path) except OSError: pass with closing(MetadataConnection(uri)) as conn: for ds in conn.load_all():...
[ "minerva.metadata.db.MetadataConnection", "os.path.join", "os.makedirs" ]
[((183, 200), 'os.makedirs', 'os.makedirs', (['path'], {}), '(path)\n', (194, 200), False, 'import os\n'), ((252, 275), 'minerva.metadata.db.MetadataConnection', 'MetadataConnection', (['uri'], {}), '(uri)\n', (270, 275), False, 'from minerva.metadata.db import MetadataConnection\n'), ((342, 382), 'os.path.join', 'os.p...
#!/usr/bin/env python3 from itertools import tee, groupby from typing import NamedTuple, Optional, Sequence, Iterator, List from pathlib import Path import json from datetime import datetime from .exporthelpers import dal_helper from .exporthelpers.dal_helper import PathIsh, Res, the, Json Url = str # TODO unstead...
[ "datetime.datetime.strptime", "pathlib.Path" ]
[((3366, 3430), 'datetime.datetime.strptime', 'datetime.strptime', (['(dts[:-3] + dts[-2:])', '"""%Y-%m-%dT%H:%M:%S.%f%z"""'], {}), "(dts[:-3] + dts[-2:], '%Y-%m-%dT%H:%M:%S.%f%z')\n", (3383, 3430), False, 'from datetime import datetime\n'), ((1235, 1242), 'pathlib.Path', 'Path', (['s'], {}), '(s)\n', (1239, 1242), Fal...
from google.cloud import bigquery with open('country.sql', 'r') as myfile: sql = myfile.read() # Construct a BigQuery client object. client = bigquery.Client() query_job = client.query(sql) # Make an API request. print("Country update job: {}".format(query_job.job_id))
[ "google.cloud.bigquery.Client" ]
[((149, 166), 'google.cloud.bigquery.Client', 'bigquery.Client', ([], {}), '()\n', (164, 166), False, 'from google.cloud import bigquery\n')]
OntCversion = '2.0.0' from ontology.libont import split from ontology.builtins import print def VaasAssert(expr): if not expr: raise Exception("AssertError") def Main(): s = "@abcd@efg@hijklmn@op@q@rst@uvwxy@z@" res = split(s, '@') for i in res: print(i) VaasAssert(len(res) == 8) ...
[ "ontology.libont.split", "ontology.builtins.print" ]
[((240, 253), 'ontology.libont.split', 'split', (['s', '"""@"""'], {}), "(s, '@')\n", (245, 253), False, 'from ontology.libont import split\n'), ((630, 643), 'ontology.libont.split', 'split', (['s', '"""@"""'], {}), "(s, '@')\n", (635, 643), False, 'from ontology.libont import split\n'), ((280, 288), 'ontology.builtins...
''' This module contains class WeightFrame that is used as a tab in parameters frame to edit and display weights. ''' from tkinter.ttk import Button, Frame, LabelFrame from tkinter import N, W, S, E from pyDEA.core.utils.dea_utils import create_bounds from pyDEA.core.gui_modules.text_for_weights_gui import TextFor...
[ "pyDEA.core.utils.dea_utils.create_bounds", "pyDEA.core.gui_modules.scrollable_frame_gui.VerticalScrolledFrame", "tkinter.ttk.Button", "pyDEA.core.gui_modules.text_for_weights_gui.TextForWeights", "tkinter.ttk.LabelFrame" ]
[((2652, 2740), 'tkinter.ttk.Button', 'Button', (['self'], {'text': '"""Validate weight restrictions"""', 'command': 'self.on_validate_weights'}), "(self, text='Validate weight restrictions', command=self.\n on_validate_weights)\n", (2658, 2740), False, 'from tkinter.ttk import Button, Frame, LabelFrame\n'), ((2855,...
# imports - module imports from pipupgrade.exception import ( PipupgradeError ) # imports - test imports import pytest def test_pipupgrade_error(): with pytest.raises(PipupgradeError): raise PipupgradeError
[ "pytest.raises" ]
[((165, 195), 'pytest.raises', 'pytest.raises', (['PipupgradeError'], {}), '(PipupgradeError)\n', (178, 195), False, 'import pytest\n')]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url( r'^orders/(?P<slug>\w{8})/', views.OrderDetailView.as_view(), name='order_detail' ), url(r'^error/$', views.error, name='error') ]
[ "django.conf.urls.url" ]
[((247, 289), 'django.conf.urls.url', 'url', (['"""^error/$"""', 'views.error'], {'name': '"""error"""'}), "('^error/$', views.error, name='error')\n", (250, 289), False, 'from django.conf.urls import url\n')]
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import abc import collections import errno import logging import os import os.path import signal import subprocess import tempfile import threading import time subprocess_lock = threading.RLock() def run_cmd(c...
[ "tempfile.NamedTemporaryFile", "subprocess.Popen", "os.stat", "threading.RLock", "collections.deque", "os.path.exists", "time.sleep", "tempfile.TemporaryFile", "logging.critical", "logging.getLogger" ]
[((288, 305), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (303, 305), False, 'import threading\n'), ((508, 532), 'tempfile.TemporaryFile', 'tempfile.TemporaryFile', ([], {}), '()\n', (530, 532), False, 'import tempfile\n'), ((1208, 1249), 'tempfile.NamedTemporaryFile', 'tempfile.NamedTemporaryFile', ([], {'...