code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import matplotlib.pyplot as plt import numpy as np cnames = [ '#F0F8FF', '#FAEBD7', '#00FFFF', '#7FFFD4', '#F0FFFF', '#F5F5DC', '#FFE4C4', '#000000', '#FFEBCD', '#0000FF', '#8A2BE2', '#A52A2A', '#DEB887', '#...
[ "matplotlib.pyplot.bar", "numpy.arange", "matplotlib.pyplot.show" ]
[((5007, 5020), 'numpy.arange', 'np.arange', (['(12)'], {}), '(12)\n', (5016, 5020), True, 'import numpy as np\n'), ((6430, 6440), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (6438, 6440), True, 'import matplotlib.pyplot as plt\n'), ((6249, 6278), 'matplotlib.pyplot.bar', 'plt.bar', (['X', 'curOwl'], {'colo...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.train.BytesList", "pickle.dump", "tensorflow.train.Int64List", "tensorflow.image.encode_jpeg", "tensorflow.Session", "tensorflow.image.decode_png", "tensorflow.placeholder", "pickle.load", "tensorflow.train.FloatList", "tensorflow.image.decode_jpeg", "os.path.join" ]
[((1042, 1086), 'pickle.dump', 'pickle.dump', (['obj', 'f', 'pickle.HIGHEST_PROTOCOL'], {}), '(obj, f, pickle.HIGHEST_PROTOCOL)\n', (1053, 1086), False, 'import pickle\n'), ((1199, 1213), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (1210, 1213), False, 'import pickle\n'), ((2934, 2946), 'tensorflow.Session', 't...
"""Graphical User Interface (GUI) utility module. This module contains various tools and utilities used to instantiate annotators and GUI elements. """ import logging import thelper.utils logger = logging.getLogger(__name__) def create_key_listener(callback): """Returns a key press listener based on pynput.key...
[ "logging.getLogger" ]
[((200, 227), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (217, 227), False, 'import logging\n')]
from model.adacos import AdaCos from model.blocks import NetBlock from tensorflow.keras.layers import Input, Reshape, Conv2D, Activation, Flatten, Dropout, add from tensorflow.keras.models import Model import tensorflow.keras.backend as K class Net: def __init__(self, config): self.model_name = config...
[ "tensorflow.keras.layers.Reshape", "tensorflow.keras.layers.Dropout", "model.adacos.AdaCos", "tensorflow.keras.layers.add", "model.blocks.NetBlock", "tensorflow.keras.models.Model", "tensorflow.keras.backend.int_shape", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Flatten" ]
[((650, 666), 'model.blocks.NetBlock', 'NetBlock', (['config'], {}), '(config)\n', (658, 666), False, 'from model.blocks import NetBlock\n'), ((892, 916), 'tensorflow.keras.layers.Input', 'Input', ([], {'shape': 'input_shape'}), '(shape=input_shape)\n', (897, 916), False, 'from tensorflow.keras.layers import Input, Res...
"""A wrapper for the colorama module.""" """ Copyright 2019 - 2020 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required b...
[ "colorama.init" ]
[((2665, 2715), 'colorama.init', 'init', ([], {'autoreset': '(True)', 'convert': 'convert', 'strip': 'strip'}), '(autoreset=True, convert=convert, strip=strip)\n', (2669, 2715), False, 'from colorama import init, Fore, Back, Style\n'), ((8690, 8741), 'colorama.init', 'init', ([], {'autoreset': '(False)', 'convert': 'co...
import os from typing import Dict from typing import Optional from typing import Union import pandas as pd from cata import constants from cata.plotters import base_plotter class UnifiedPlotter(base_plotter.BasePlotter): """Class for plotting generalisation errors, overlaps etc. For case when logging is don...
[ "pandas.read_csv", "os.path.join" ]
[((1418, 1465), 'pandas.read_csv', 'pd.read_csv', (['self._ode_logger_path'], {'index_col': '(0)'}), '(self._ode_logger_path, index_col=0)\n', (1429, 1465), True, 'import pandas as pd\n'), ((1551, 1589), 'pandas.read_csv', 'pd.read_csv', (['self._network_logger_path'], {}), '(self._network_logger_path)\n', (1562, 1589)...
import os from typing import Any import requests import yaml if os.path.exists("gh_token.py"): from gh_token import GH_TOKEN else: GH_TOKEN = os.environ["GH_TOKEN"] headers = {"Authorization": f"token {GH_TOKEN}"} def query_gh_gpl_api(query: str) -> dict: """Query the GitHub GraphQL API. Args: ...
[ "requests.post", "yaml.dump", "os.path.exists" ]
[((67, 96), 'os.path.exists', 'os.path.exists', (['"""gh_token.py"""'], {}), "('gh_token.py')\n", (81, 96), False, 'import os\n'), ((1114, 1128), 'yaml.dump', 'yaml.dump', (['dic'], {}), '(dic)\n', (1123, 1128), False, 'import yaml\n'), ((3120, 3140), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (313...
# ------------------------------------------------------------------------------------------------ # def ImportEssentialityData(fileName): # Not yet ready for prime time # Import a defined format essentiality data file # Assumes that data is in the format: locus tag, gene name, essentiality from .utils import ParseC...
[ "xml.etree.ElementTree.parse", "numpy.std", "scipy.intersect1d", "numpy.mean", "numpy.array", "numpy.arange", "numpy.exp", "numpy.random.choice", "pdb.set_trace", "scipy.unique", "re.compile" ]
[((3844, 3886), 'xml.etree.ElementTree.parse', 'ET.parse', (['transposonCoordToFeatureDictFile'], {}), '(transposonCoordToFeatureDictFile)\n', (3852, 3886), True, 'import xml.etree.ElementTree as ET\n'), ((4733, 4757), 'scipy.unique', 'unique', (['hittableFeatures'], {}), '(hittableFeatures)\n', (4739, 4757), False, 'f...
import pytest from onegram.exceptions import NotSupportedError from onegram import follow, unfollow from onegram import like, unlike from onegram import comment, uncomment from onegram import save, unsave def test_follow(logged, user, cassette): if logged: response = follow(user) assert response...
[ "onegram.unsave", "onegram.save", "onegram.unfollow", "onegram.uncomment", "onegram.like", "onegram.unlike", "pytest.raises", "onegram.follow", "onegram.comment" ]
[((284, 296), 'onegram.follow', 'follow', (['user'], {}), '(user)\n', (290, 296), False, 'from onegram import follow, unfollow\n'), ((463, 477), 'onegram.unfollow', 'unfollow', (['user'], {}), '(user)\n', (471, 477), False, 'from onegram import follow, unfollow\n'), ((776, 786), 'onegram.like', 'like', (['post'], {}), ...
import logging import math import os import time import boto3 from pyspark.sql import SparkSession def get_asg_inservice_instance_count(asg_name: str, region_name: str) -> int: client = boto3.client('autoscaling', region_name=region_name) asg = client.describe_auto_scaling_groups(AutoScalingGroupNames=[asg_n...
[ "logging.basicConfig", "boto3.client", "logging.warning", "math.ceil", "time.sleep", "pyspark.sql.SparkSession.builder.master", "logging.info" ]
[((193, 245), 'boto3.client', 'boto3.client', (['"""autoscaling"""'], {'region_name': 'region_name'}), "('autoscaling', region_name=region_name)\n", (205, 245), False, 'import boto3\n'), ((635, 687), 'boto3.client', 'boto3.client', (['"""autoscaling"""'], {'region_name': 'region_name'}), "('autoscaling', region_name=re...
from django import forms from .models import User from news.models import Category from django.utils.translation import gettext, gettext_lazy as _ from django.contrib.auth import authenticate, forms as auth_forms from django.db.models import Q class LoginForm(forms.Form): username = forms.CharField( label...
[ "django.forms.CheckboxSelectMultiple", "django.utils.translation.gettext_lazy", "django.forms.PasswordInput", "django.db.models.Q", "django.forms.ValidationError", "django.forms.ModelMultipleChoiceField", "django.contrib.auth.authenticate", "django.forms.CharField", "news.models.Category.objects.exc...
[((1525, 1588), 'django.forms.CharField', 'forms.CharField', ([], {'label': '"""<PASSWORD>"""', 'widget': 'forms.PasswordInput'}), "(label='<PASSWORD>', widget=forms.PasswordInput)\n", (1540, 1588), False, 'from django import forms\n'), ((4640, 4685), 'django.forms.ModelMultipleChoiceField', 'forms.ModelMultipleChoiceF...
from kivy.properties import ( NumericProperty, ReferenceListProperty, BooleanProperty) from kivy.vector import Vector from parabox.base_object import BaseObject class Movable(BaseObject): """Mixins for movable classes""" velocity_x = NumericProperty(0) velocity_y = NumericProperty(0) velocity = R...
[ "kivy.properties.NumericProperty", "kivy.properties.BooleanProperty", "kivy.properties.ReferenceListProperty", "kivy.vector.Vector" ]
[((249, 267), 'kivy.properties.NumericProperty', 'NumericProperty', (['(0)'], {}), '(0)\n', (264, 267), False, 'from kivy.properties import NumericProperty, ReferenceListProperty, BooleanProperty\n'), ((285, 303), 'kivy.properties.NumericProperty', 'NumericProperty', (['(0)'], {}), '(0)\n', (300, 303), False, 'from kiv...
from functools import lru_cache from pydantic import BaseSettings class Settings(BaseSettings): """Settings model.""" secret_key: str = "" mongo_url: str = "" testing: bool = False @lru_cache(typed=False) def get_settings() -> Settings: """Initialize settings.""" return Settings()
[ "functools.lru_cache" ]
[((204, 226), 'functools.lru_cache', 'lru_cache', ([], {'typed': '(False)'}), '(typed=False)\n', (213, 226), False, 'from functools import lru_cache\n')]
from __future__ import print_function import minpy.numpy as mp import numpy as np import minpy.dispatch.policy as policy from minpy.core import convert_args, return_numpy, grad_and_loss, grad, minpy_to_numpy as mn, numpy_to_minpy as nm import time # mp.set_policy(policy.OnlyNumPyPolicy()) def test_autograd(): @c...
[ "numpy.abs", "minpy.numpy.sum", "numpy.random.randn", "minpy.numpy.max", "time.time", "minpy.core.numpy_to_minpy", "numpy.array", "minpy.core.grad", "minpy.numpy.min" ]
[((1681, 1702), 'numpy.random.randn', 'np.random.randn', (['N', 'D'], {}), '(N, D)\n', (1696, 1702), True, 'import numpy as np\n'), ((1711, 1732), 'numpy.random.randn', 'np.random.randn', (['N', 'H'], {}), '(N, H)\n', (1726, 1732), True, 'import numpy as np\n'), ((1742, 1763), 'numpy.random.randn', 'np.random.randn', (...
from point import Point __author__ = 'pzqa' l1 = list(map(lambda i: Point(i, i*i), range(-5, 6))) l2 = list(filter(lambda el: el.x % 2 == 0, l1)) print(l1) print(l2)
[ "point.Point" ]
[((70, 85), 'point.Point', 'Point', (['i', '(i * i)'], {}), '(i, i * i)\n', (75, 85), False, 'from point import Point\n')]
from abc import ABC, abstractmethod import os import spacy_udpipe from .utils import load_pickled_file from .settings import PATH_TO_RUS_UDPIPE_MODEL import spacy def processTag(tag_representation): res = {} if len(tag_representation.split('|')) > 0: for one_subtag in tag_representation.split('|'): ...
[ "os.path.join", "spacy_udpipe.load_from_path" ]
[((991, 1060), 'spacy_udpipe.load_from_path', 'spacy_udpipe.load_from_path', (['"""ru-syntagrus"""', 'PATH_TO_RUS_UDPIPE_MODEL'], {}), "('ru-syntagrus', PATH_TO_RUS_UDPIPE_MODEL)\n", (1018, 1060), False, 'import spacy_udpipe\n'), ((883, 937), 'os.path.join', 'os.path.join', (['"""ProcessedData"""', '"""Андреев_Ангелоче...
import numpy as np from krikos.nn.layer import BatchNorm, BatchNorm2d, Dropout class Network(object): def __init__(self): super(Network, self).__init__() self.diff = (BatchNorm, BatchNorm2d, Dropout) def train(self, input, target): raise NotImplementedError def eval(self, input)...
[ "numpy.argmax" ]
[((1717, 1741), 'numpy.argmax', 'np.argmax', (['input'], {'axis': '(1)'}), '(input, axis=1)\n', (1726, 1741), True, 'import numpy as np\n'), ((1463, 1487), 'numpy.argmax', 'np.argmax', (['input'], {'axis': '(1)'}), '(input, axis=1)\n', (1472, 1487), True, 'import numpy as np\n')]
import getpass from pymongo import MongoClient def main(): hostname = input("MongoDB Hostname (Default: localhost): ") if not hostname: hostname = "localhost" port = input("MongoDB Port (Default: 27017): ") if not port: port = "27017" username = input("MongoDB Username: ") p...
[ "pymongo.MongoClient", "getpass.getpass" ]
[((330, 367), 'getpass.getpass', 'getpass.getpass', (['"""MongoDB Password: """'], {}), "('MongoDB Password: ')\n", (345, 367), False, 'import getpass\n'), ((498, 514), 'pymongo.MongoClient', 'MongoClient', (['url'], {}), '(url)\n', (509, 514), False, 'from pymongo import MongoClient\n')]
import logging import json import time from random import random, randint import asyncio import aiohttp import aiosqlite import aiofiles import regex from aiohttp.client_exceptions import ClientConnectorError from piggy import utils # Logging logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) ch...
[ "piggy.utils.to_json", "piggy.utils.interval_in_seconds", "json.dumps", "piggy.utils.translate_custom_media_type_to_ig", "logging.Formatter", "aiohttp.ClientSession", "piggy.utils.to_csv", "logging.FileHandler", "piggy.utils.translate_ig_media_type_to_custom", "aiosqlite.connect", "asyncio.sleep...
[((258, 285), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (275, 285), False, 'import logging\n'), ((323, 346), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (344, 346), False, 'import logging\n'), ((352, 386), 'logging.FileHandler', 'logging.FileHandler', (['"""./...
import os import random import tempfile import webbrowser import time import uuid import socket import shutil import subprocess import pathlib from bs4 import BeautifulSoup from yaplee.errors import UnknownTemplateValue from yaplee.js.converter import JSFunc class Server: def __init__(self, meta) -> None: ...
[ "os.mkdir", "random.randint", "os.path.isdir", "tempfile.gettempdir", "socket.socket", "time.sleep", "yaplee.js.converter.JSFunc", "uuid.uuid1", "pathlib.Path", "bs4.BeautifulSoup", "os.path.join", "yaplee.errors.UnknownTemplateValue", "shutil.copy" ]
[((693, 742), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (706, 742), False, 'import socket\n'), ((1022, 1043), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n', (1041, 1043), False, 'import tempfile\n'), ((1076, 1095), 'os.pa...
# import module and read xyz file from ase.io import read, write file=read('last3.xyz', index=":") # create list of tags tags = [] for structure in file: if structure.info['config_type'] not in tags: tags.append(structure.info['config_type']) # extract unique tags and energy sigma dict={} for i in tags: ...
[ "ase.io.read" ]
[((72, 100), 'ase.io.read', 'read', (['"""last3.xyz"""'], {'index': '""":"""'}), "('last3.xyz', index=':')\n", (76, 100), False, 'from ase.io import read, write\n')]
import cv2 import numpy as np from matplotlib import pyplot as plt l: list = [] img = None img_cp = None def draw_circle(event, x, y, flags, param): global l global img global img_cp if event == cv2.EVENT_LBUTTONDOWN: cv2.circle(img_cp, (x, y), 5, (255, 0, 0), -1) l.append([x, y]) ...
[ "cv2.resize", "cv2.warpPerspective", "cv2.circle", "cv2.waitKey", "cv2.destroyAllWindows", "numpy.float32", "cv2.getPerspectiveTransform", "cv2.imread", "cv2.setMouseCallback", "cv2.imshow", "cv2.namedWindow" ]
[((787, 809), 'cv2.imread', 'cv2.imread', (['"""road.jpg"""'], {}), "('road.jpg')\n", (797, 809), False, 'import cv2\n'), ((820, 855), 'cv2.resize', 'cv2.resize', (['img'], {'dsize': '(1000, 1000)'}), '(img, dsize=(1000, 1000))\n', (830, 855), False, 'import cv2\n'), ((866, 940), 'cv2.resize', 'cv2.resize', (['img', '(...
from __future__ import unicode_literals from .error import error from io import open import arrow import os import oyaml as yaml import pandas as pd import re import sys # Load dataset file specifications spec_file_name = 'dataset_file_def.yaml' spec_file_path = os.path.join(os.path.dirname(__file__), spec_file_name) ...
[ "arrow.get", "os.path.basename", "os.path.dirname", "pandas.read_excel", "oyaml.load", "io.open", "pandas.isna", "pandas.to_numeric", "re.compile" ]
[((277, 302), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (292, 302), False, 'import os\n'), ((325, 363), 'io.open', 'open', (['spec_file_path'], {'encoding': '"""utf-8"""'}), "(spec_file_path, encoding='utf-8')\n", (329, 363), False, 'from io import open\n'), ((382, 395), 'oyaml.load', 'y...
import torch.nn as nn import torch.nn.functional as F import torch SCORE_THRESH = 0.3 STRIDE_SCALE = 8 IOU_THRESH = 0.6 class Integral(nn.Module): """A fixed layer for calculating integral result from distribution. This layer calculates the target location by :math: `sum{P(y_i) * y_i}`, P(y_i) denotes th...
[ "torch.stack", "torch.cat", "torch.max", "torch.linspace", "torch.min", "torch.tensor" ]
[((1497, 1524), 'torch.max', 'torch.max', (['Box1[0]', 'Box2[0]'], {}), '(Box1[0], Box2[0])\n', (1506, 1524), False, 'import torch\n'), ((1540, 1567), 'torch.max', 'torch.max', (['Box1[1]', 'Box2[1]'], {}), '(Box1[1], Box2[1])\n', (1549, 1567), False, 'import torch\n'), ((1583, 1610), 'torch.min', 'torch.min', (['Box1[...
import sys,os arr = [] files = os.listdir(sys.path[0] + '/stickersraw') st = "{{$a := index .CmdArgs 0 }} \n" st += "{{$b := cslice " names = [] for fileName in files: names.append(fileName.split('.')[0]) names = sorted(names) n = "" for name in names: n += "\"" + name + "\" " st += n st += """ }} {{if or ...
[ "os.listdir" ]
[((31, 71), 'os.listdir', 'os.listdir', (["(sys.path[0] + '/stickersraw')"], {}), "(sys.path[0] + '/stickersraw')\n", (41, 71), False, 'import sys, os\n')]
import cv2 import sys import matplotlib.pyplot as plt def blur_display(infile, nogui=False): # The first argument is the image image = cv2.imread(infile) #conver to grayscale gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) #blur it blurred_image = cv2.GaussianBlur(image, (7,7), 0) ...
[ "cv2.GaussianBlur", "cv2.cvtColor", "cv2.imwrite", "cv2.waitKey", "cv2.imread", "matplotlib.pyplot.savefig" ]
[((145, 163), 'cv2.imread', 'cv2.imread', (['infile'], {}), '(infile)\n', (155, 163), False, 'import cv2\n'), ((207, 246), 'cv2.cvtColor', 'cv2.cvtColor', (['image', 'cv2.COLOR_BGR2GRAY'], {}), '(image, cv2.COLOR_BGR2GRAY)\n', (219, 246), False, 'import cv2\n'), ((281, 315), 'cv2.GaussianBlur', 'cv2.GaussianBlur', (['i...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.patches import FancyBboxPatch from matplotlib.colors import LinearSegmentedColormap from mpl_toolkits.basemap import Basemap import numpy as np # Suppress matplotlib warnings np.warnings.filterwarnings('ignore') import ...
[ "matplotlib.colors.LinearSegmentedColormap", "matplotlib.pyplot.subplot2grid", "matplotlib.pyplot.figure", "numpy.rot90", "numpy.arange", "os.path.isfile", "matplotlib.pyplot.gca", "os.path.join", "numpy.round", "numpy.nanmean", "netCDF4.Dataset", "numpy.meshgrid", "ship_mapper.degrees_to_me...
[((19, 40), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (33, 40), False, 'import matplotlib\n'), ((273, 309), 'numpy.warnings.filterwarnings', 'np.warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (299, 309), True, 'import numpy as np\n'), ((1869, 1893), 'xarray.open_dataset', ...
# Generated by Django 3.0 on 2019-12-15 02:01 import core.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migr...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.migrations.RemoveField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateField", "django.db.models.UUIDField" ]
[((1758, 1811), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""user"""', 'name': '"""bio"""'}), "(model_name='user', name='bio')\n", (1780, 1811), False, 'from django.db import migrations, models\n'), ((1856, 1916), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([]...
import numpy as np import cv2 cascade = cv2.CascadeClassifier('cascade.xml') img = cv2.imread('orange.jpg') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) oranges = cascade.detectMultiScale(gray, 1.05, 15, 0, (150,150)) for (x,y,w,h) in oranges: cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2) imgs = cv2.resize(img,...
[ "cv2.cvtColor", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.rectangle", "cv2.imread", "cv2.CascadeClassifier", "cv2.imshow", "cv2.resize" ]
[((42, 78), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""cascade.xml"""'], {}), "('cascade.xml')\n", (63, 78), False, 'import cv2\n'), ((86, 110), 'cv2.imread', 'cv2.imread', (['"""orange.jpg"""'], {}), "('orange.jpg')\n", (96, 110), False, 'import cv2\n'), ((118, 155), 'cv2.cvtColor', 'cv2.cvtColor', (['img...
from helper import greeting greeting("What's Up", "Jake")
[ "helper.greeting" ]
[((29, 58), 'helper.greeting', 'greeting', (['"""What\'s Up"""', '"""Jake"""'], {}), '("What\'s Up", \'Jake\')\n', (37, 58), False, 'from helper import greeting\n')]
# Applied Database # Final Project # Section 4.4 - Python program answers # Author : Somu #mySQL modules import import mysql.connector from mysql.connector import Error from mysql.connector import errorcode import pandas as pd #Mongo modules import import pymongo from pymongo import MongoClient #Pandas pr...
[ "pandas.DataFrame", "tabulate.tabulate", "pymongo.MongoClient", "pandas.read_sql_query" ]
[((935, 949), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (947, 949), True, 'import pandas as pd\n'), ((1051, 1100), 'pymongo.MongoClient', 'pymongo.MongoClient', ([], {'host': '"""localhost"""', 'port': '(27017)'}), "(host='localhost', port=27017)\n", (1070, 1100), False, 'import pymongo\n'), ((2185, 2221), ...
# Generated by Django 3.0.4 on 2020-04-01 13:24 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('reading', '0007_auto_20200331_2133'), ] operations = [ migrations.RenameModel( old_name='ReadingListMetadata', new_name='Rea...
[ "django.db.migrations.RenameModel" ]
[((227, 314), 'django.db.migrations.RenameModel', 'migrations.RenameModel', ([], {'old_name': '"""ReadingListMetadata"""', 'new_name': '"""ReadingMetadata"""'}), "(old_name='ReadingListMetadata', new_name=\n 'ReadingMetadata')\n", (249, 314), False, 'from django.db import migrations\n')]
"""This module provides the main functionality of cfbackup """ from __future__ import print_function import sys import argparse import json import CloudFlare # https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records class CF_DNS_Records(object): """ commands for zones manipulation """ def ...
[ "CloudFlare.CloudFlare", "argparse.ArgumentParser", "sys.exit", "json.dumps" ]
[((5047, 5138), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""cfbackup"""', 'description': '"""Simple Cloudflare backup tool."""'}), "(prog='cfbackup', description=\n 'Simple Cloudflare backup tool.')\n", (5070, 5138), False, 'import argparse\n'), ((2361, 2384), 'CloudFlare.CloudFlare', 'Cl...
import os from setuptools import setup VERSION = "1.0.4" NAMESPACE = "newstore" NAME = "{}.json_encoder".format(NAMESPACE) def local_text_file(file_name): path = os.path.join(os.path.dirname(__file__), file_name) with open(path, "rt") as fp: file_data = fp.read() return file_data setup( na...
[ "os.path.dirname" ]
[((183, 208), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (198, 208), False, 'import os\n')]
from generallibrary import getBaseClassNames, SigInfo, dict_insert, wrapper_transfer def set_parent_hook(self, parent, _draw=True): """ :param generalgui.MethodGrouper self: :param generalgui.MethodGrouper parent: """ if _draw: for part in self.get_children(depth=-1, include_self=True, gen=Tru...
[ "generallibrary.getBaseClassNames", "generallibrary.wrapper_transfer", "generallibrary.SigInfo" ]
[((1667, 1699), 'generallibrary.wrapper_transfer', 'wrapper_transfer', (['func', '_wrapper'], {}), '(func, _wrapper)\n', (1683, 1699), False, 'from generallibrary import getBaseClassNames, SigInfo, dict_insert, wrapper_transfer\n'), ((977, 1007), 'generallibrary.SigInfo', 'SigInfo', (['func', '*args'], {}), '(func, *ar...
import time def check_repository(document): rows = document.findAll("tr", attrs=testing.expect.with_class("repository")) testing.expect.check(1, len(rows)) def check_cell(row, class_name, expected_string, inline_element_type=None): cells = row.findAll("td", attrs=testing.expect.with_class(class_na...
[ "time.sleep", "time.time" ]
[((2613, 2624), 'time.time', 'time.time', ([], {}), '()\n', (2622, 2624), False, 'import time\n'), ((2679, 2690), 'time.time', 'time.time', ([], {}), '()\n', (2688, 2690), False, 'import time\n'), ((2931, 2946), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (2941, 2946), False, 'import time\n')]
#!/usr/bin/env python3 """ Generate GSE64913 """ __author__ = "<NAME>" __version__ = "0.1.0" __license__ = "MIT" import logging import GEOparse import argparse import pandas as pd from funcs import utils from os.path import join import numpy as np #def append_postfix(filename,postfix): # return "{0}_{2}.{1}".for...
[ "argparse.ArgumentParser", "logging.FileHandler", "funcs.utils.create_dir_if_not_exist", "pandas.isnull", "logging.info", "os.path.join" ]
[((590, 608), 'logging.info', 'logging.info', (['args'], {}), '(args)\n', (602, 608), False, 'import logging\n'), ((614, 662), 'funcs.utils.create_dir_if_not_exist', 'utils.create_dir_if_not_exist', (['args.out_expr_dir'], {}), '(args.out_expr_dir)\n', (643, 662), False, 'from funcs import utils\n'), ((1671, 1692), 'lo...
# # Code by <NAME> and under the MIT license # from mineturtle import * import lsystem t = Turtle() t.pendelay(0) t.turtle(None) t.penblock(block.BRICK_BLOCK) # ensure angles are always integral multiples of 90 degrees t.gridalign() rules = {'X':'X+YF+', 'Y':'-FX-Y'} def go(): # draw a wall segment...
[ "lsystem.lsystem" ]
[((781, 825), 'lsystem.lsystem', 'lsystem.lsystem', (['"""FX"""', 'rules', 'dictionary', '(14)'], {}), "('FX', rules, dictionary, 14)\n", (796, 825), False, 'import lsystem\n')]
import pytest from fastapi.testclient import TestClient @pytest.mark.integration @pytest.mark.usefixtures("test_db_session") class TestSignupEndpoint: def test_signup_returns_200(self, client: TestClient): response = client.post( "/users/signup", json={ "email": "<E...
[ "pytest.mark.usefixtures" ]
[((84, 126), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""test_db_session"""'], {}), "('test_db_session')\n", (107, 126), False, 'import pytest\n')]
""" Oracle Query Module """ import json from clamfig import Serializable from web3 import Web3 from telliot_core.dtypes.value_type import ValueType class OracleQuery(Serializable): """Oracle Query An OracleQuery specifies how to pose a question to the Tellor Oracle and how to format/interpret the res...
[ "json.dumps", "web3.Web3.keccak" ]
[((1324, 1364), 'json.dumps', 'json.dumps', (['state'], {'separators': "(',', ':')"}), "(state, separators=(',', ':'))\n", (1334, 1364), False, 'import json\n'), ((2201, 2229), 'web3.Web3.keccak', 'Web3.keccak', (['self.query_data'], {}), '(self.query_data)\n', (2212, 2229), False, 'from web3 import Web3\n')]
"""Compute Cloud setup with SaltStack and Apache Libcloud""" __version__ = '0.1.0-git' if __name__ == '__main__': from cardice.commandline import main main()
[ "cardice.commandline.main" ]
[((163, 169), 'cardice.commandline.main', 'main', ([], {}), '()\n', (167, 169), False, 'from cardice.commandline import main\n')]
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import * from urllib.error import URLError MASTER_BRANCH = 'h...
[ "future.standard_library.install_aliases" ]
[((209, 243), 'future.standard_library.install_aliases', 'standard_library.install_aliases', ([], {}), '()\n', (241, 243), False, 'from future import standard_library\n')]
""" """ from enum import Enum import logging from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove) from telegram.ext import ConversationHandler from telegramcalendarkeyboard import telegramcalendar from telegramcalendarkeyboard import telegramoptions from texts import texts as TEXTS from texts import keyb...
[ "telegramcalendarkeyboard.telegramcalendar.create_calendar", "logging.basicConfig", "telegram.ReplyKeyboardRemove", "telegramcalendarkeyboard.telegramoptions.create_options_keyboard", "telegram.ReplyKeyboardMarkup", "telegramcalendarkeyboard.telegramoptions.process_option_selection", "telegramcalendarke...
[((341, 454), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""', 'level': 'logging.DEBUG'}), "(format=\n '%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG\n )\n", (360, 454), False, 'import logging\n'), ((475, 502),...
import torch import logging from quadboost import QuadBoostMHCR from quadboost.label_encoder import LabelEncoder, OneHotEncoder, AllPairsEncoder from quadboost.weak_learner import * from quadboost.callbacks import * from quadboost.datasets import MNISTDataset from quadboost.utils import parse, timed from quadboost.dat...
[ "quadboost.label_encoder.LabelEncoder.load_encodings", "quadboost.label_encoder.AllPairsEncoder", "logging.basicConfig", "quadboost.datasets.MNISTDataset.load", "quadboost.QuadBoostMHCR.load", "torch.manual_seed", "quadboost.QuadBoostMHCR", "logging.info", "quadboost.data_preprocessing.data_augmenta...
[((933, 968), 'quadboost.datasets.MNISTDataset.load', 'MNISTDataset.load', (["(dataset + '.pkl')"], {}), "(dataset + '.pkl')\n", (950, 968), False, 'from quadboost.datasets import MNISTDataset\n'), ((1598, 1677), 'logging.info', 'logging.info', (['f"""Loaded dataset: {dataset} (center: {center}, reduce: {reduce})"""'],...
from concurrent import futures import grpc import relationExtractService_pb2 import relationExtractService_pb2_grpc import tools class relationExtractService(relationExtractService_pb2_grpc.relationExtractServiceServicer): def ExtractTriple(self,request,context): sentence = request.sentence triples ...
[ "concurrent.futures.ThreadPoolExecutor", "relationExtractService_pb2.relationExtractResponse", "tools.extract_items" ]
[((322, 351), 'tools.extract_items', 'tools.extract_items', (['sentence'], {}), '(sentence)\n', (341, 351), False, 'import tools\n'), ((371, 423), 'relationExtractService_pb2.relationExtractResponse', 'relationExtractService_pb2.relationExtractResponse', ([], {}), '()\n', (421, 423), False, 'import relationExtractServi...
import itertools from collections import OrderedDict import numpy as np import cv2 import torch import torch.nn as nn from torch.nn import Sequential as Seq, Linear, ReLU import torch.nn.functional as F from torch_geometric.data import Data, Batch from . import base_networks from . import graph_construction as gc fr...
[ "torch.ones", "numpy.ones", "torch.cat", "cv2.connectedComponents", "torch.from_numpy" ]
[((1587, 1642), 'torch.cat', 'torch.cat', (['[encodings[key] for key in encodings]'], {'dim': '(1)'}), '([encodings[key] for key in encodings], dim=1)\n', (1596, 1642), False, 'import torch\n'), ((3169, 3217), 'cv2.connectedComponents', 'cv2.connectedComponents', (['fg_mask'], {'connectivity': '(8)'}), '(fg_mask, conne...
from resources import get_subreddits, update_subreddits """ subreddits: { '<subreddit name>': { 'phrases': [ '<phrases>' ], 'flairs': [ '<flairs>' ], 'include': <boolean>, 'unflaired': <boolean> }, ... } """ subreddits = get_subreddit...
[ "resources.get_subreddits", "resources.update_subreddits" ]
[((307, 323), 'resources.get_subreddits', 'get_subreddits', ([], {}), '()\n', (321, 323), False, 'from resources import get_subreddits, update_subreddits\n'), ((516, 545), 'resources.update_subreddits', 'update_subreddits', (['subreddits'], {}), '(subreddits)\n', (533, 545), False, 'from resources import get_subreddits...
# -*- coding: utf-8 -*- """Console script to generate goals for real_robots""" import click import numpy as np from real_robots.envs import Goal import gym import math basePosition = None slow = False render = False def pairwise_distances(a): b = a.reshape(a.shape[0], 1, a.shape[1]) return np.sqrt(np.einsu...
[ "matplotlib.pyplot.show", "numpy.random.seed", "numpy.random.rand", "click.option", "numpy.einsum", "numpy.zeros", "click.command", "numpy.linalg.norm", "numpy.array", "numpy.random.permutation", "numpy.vstack", "real_robots.envs.Goal", "numpy.unique" ]
[((13119, 13134), 'click.command', 'click.command', ([], {}), '()\n', (13132, 13134), False, 'import click\n'), ((13136, 13229), 'click.option', 'click.option', (['"""--seed"""'], {'type': 'int', 'help': '"""Generate goals using this SEED for numpy.random"""'}), "('--seed', type=int, help=\n 'Generate goals using th...
import os import argparse from svgrasterize import * import numpy as np np.set_printoptions(formatter={'float': lambda x: "{0:0.3f}".format(x)}) parser = argparse.ArgumentParser() parser.add_argument("svg", help="input SVG file") parser.add_argument("output", help="output PNG file") parser.add_argument("-bg", type=svg_...
[ "os.path.exists", "argparse.ArgumentParser" ]
[((154, 179), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (177, 179), False, 'import argparse\n'), ((915, 939), 'os.path.exists', 'os.path.exists', (['opts.svg'], {}), '(opts.svg)\n', (929, 939), False, 'import os\n')]
import unittest import ramda as R """ https://github.com/ramda/ramda/blob/master/test/head.js """ class TestHead(unittest.TestCase): def test_returns_the_first_element_of_an_ordered_collection(self): self.assertEqual(1, R.head([1, 2, 3])) self.assertEqual(2, R.head([2, 3])) self.assertEqual(3, R.head(...
[ "unittest.main", "ramda.head" ]
[((656, 671), 'unittest.main', 'unittest.main', ([], {}), '()\n', (669, 671), False, 'import unittest\n'), ((230, 247), 'ramda.head', 'R.head', (['[1, 2, 3]'], {}), '([1, 2, 3])\n', (236, 247), True, 'import ramda as R\n'), ((273, 287), 'ramda.head', 'R.head', (['[2, 3]'], {}), '([2, 3])\n', (279, 287), True, 'import r...
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.contrib.sitemaps.views import sitemap from django.urls import include, path from django.views.generic import TemplateView from markdownx.views import MarkdownifyView from exhaust.posts.sitemaps impo...
[ "django.urls.path", "markdownx.views.MarkdownifyView.as_view", "django.views.generic.TemplateView.as_view", "django.urls.include", "django.conf.urls.static.static" ]
[((1262, 1325), 'django.conf.urls.static.static', 'static', (['settings.STATIC_URL'], {'document_root': 'settings.STATIC_ROOT'}), '(settings.STATIC_URL, document_root=settings.STATIC_ROOT)\n', (1268, 1325), False, 'from django.conf.urls.static import static\n'), ((1192, 1253), 'django.conf.urls.static.static', 'static'...
import logging import pymongo from quakestats.datasource.mongo2 import ( DataStoreMongo, ) from quakestats.system import ( conf, ) logger = logging.getLogger(__name__) class SystemContext: def __init__(self): self.config = conf.cnf self.ds: DataStoreMongo = None self.ds_client: ...
[ "pymongo.MongoClient", "quakestats.system.conf.get_conf_val", "pymongo.uri_parser.parse_uri", "logging.getLogger" ]
[((151, 178), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (168, 178), False, 'import logging\n'), ((412, 442), 'quakestats.system.conf.get_conf_val', 'conf.get_conf_val', (['"""MONGO_URI"""'], {}), "('MONGO_URI')\n", (429, 442), False, 'from quakestats.system import conf\n'), ((468, 49...
import smtplib from email.message import EmailMessage from credent import secret tb_headers=["id","przedmiot","wykladowca","forma_zaliczenia","rodz_zajec","ocena1","data1","ocena2","data2"] def sendEmail(subject,eml_from,eml_to,message): msg = EmailMessage() msg.set_content(message) msg['Subject'] ...
[ "email.message.EmailMessage", "smtplib.SMTP" ]
[((256, 270), 'email.message.EmailMessage', 'EmailMessage', ([], {}), '()\n', (268, 270), False, 'from email.message import EmailMessage\n'), ((482, 536), 'smtplib.SMTP', 'smtplib.SMTP', (["secret['smtp_host']", "secret['smtp_port']"], {}), "(secret['smtp_host'], secret['smtp_port'])\n", (494, 536), False, 'import smtp...
import tqdm import pickle import logging import functools from typing import List, Mapping, Optional from multiprocessing import Pool from indra.statements import Statement from indra_world.sources import eidos, hume, sofia logger = logging.getLogger(__name__) def _reader_wrapper(fname, reader, dart_ids=None, **kwar...
[ "functools.partial", "pickle.dump", "indra_world.sources.eidos.process_json_file", "indra_world.sources.hume.process_jsonld_file", "indra_world.sources.sofia.process_json_file", "multiprocessing.Pool", "logging.getLogger" ]
[((234, 261), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (251, 261), False, 'import logging\n'), ((2135, 2146), 'multiprocessing.Pool', 'Pool', (['nproc'], {}), '(nproc)\n', (2139, 2146), False, 'from multiprocessing import Pool\n'), ((2185, 2319), 'functools.partial', 'functools.part...
# standard modules import os import shutil import argparse # aliased standard modules import pandas as pd # modules of sanity checker import lib.paths as paths import lib.utils as utils import lib.logger_config as logger_config # standalone imports from lib.logger_config import log from lib.test_config import get_co...
[ "pandas.DataFrame", "lib.logger_config.log.info", "argparse.ArgumentParser", "lib.logger_config.init_logger", "pandas.read_csv", "lib.logger_config.log.banner", "shutil.copy", "lib.logger_config.log.debug", "lib.utils.shell_cmd", "os.path.isfile", "lib.utils.abs_path", "os.path.join", "os.ch...
[((2015, 2089), 'lib.logger_config.log.banner', 'log.banner', (['"""Please give the following informations about your experiment"""'], {}), "('Please give the following informations about your experiment')\n", (2025, 2089), False, 'from lib.logger_config import log\n'), ((4120, 4173), 'os.path.join', 'os.path.join', ([...
from urllib.parse import urljoin import requests from crosswalk_client.exceptions import BadResponse from crosswalk_client.objects.domain import DomainObject from crosswalk_client.validators.domain import validate_required_domain_arg class UpdateDomain(object): @validate_required_domain_arg def update_domai...
[ "urllib.parse.urljoin" ]
[((398, 449), 'urllib.parse.urljoin', 'urljoin', (['self.service_address', 'f"""domains/{domain}/"""'], {}), "(self.service_address, f'domains/{domain}/')\n", (405, 449), False, 'from urllib.parse import urljoin\n')]
# Create your views here. from mozdns.views import MozdnsDeleteView from mozdns.views import MozdnsCreateView from mozdns.views import MozdnsDetailView from mozdns.views import MozdnsUpdateView from mozdns.views import MozdnsListView from mozdns.sshfp.models import SSHFP from mozdns.sshfp.forms import SSHFPForm class...
[ "mozdns.sshfp.models.SSHFP.objects.all" ]
[((400, 419), 'mozdns.sshfp.models.SSHFP.objects.all', 'SSHFP.objects.all', ([], {}), '()\n', (417, 419), False, 'from mozdns.sshfp.models import SSHFP\n')]
# A minimal setup.py file to make a Python project installable. import setuptools import yaml with open("README.md", "r") as fh: long_description = fh.read() with open("environment.yml", "r") as fh: env = yaml.safe_load(fh) requirements = [a.split('=', 1)[0].strip() for a in env['dependencies'] ] setuptools...
[ "yaml.safe_load", "setuptools.find_packages" ]
[((216, 234), 'yaml.safe_load', 'yaml.safe_load', (['fh'], {}), '(fh)\n', (230, 234), False, 'import yaml\n'), ((638, 664), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (662, 664), False, 'import setuptools\n')]
import os import sys import ctypes this_dir = os.path.dirname(__file__) parent_dir = os.path.dirname(this_dir) sys.path.insert(0, parent_dir) from pcc.evaluater.c_evaluator import CEvaluator import unittest class TestMainReturnPtr(unittest.TestCase): def test_simple(self): pcc = CEvaluator() re...
[ "unittest.main", "pcc.evaluater.c_evaluator.CEvaluator", "os.path.dirname", "sys.path.insert" ]
[((47, 72), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (62, 72), False, 'import os\n'), ((86, 111), 'os.path.dirname', 'os.path.dirname', (['this_dir'], {}), '(this_dir)\n', (101, 111), False, 'import os\n'), ((112, 142), 'sys.path.insert', 'sys.path.insert', (['(0)', 'parent_dir'], {}), ...
from pathlib import Path from markdown import markdown from gilbert import Site from gilbert.content import Page from gilbert.types import LoaderResult from gilbert.utils import oneshot class MarkdownPage(Page): """ Page type that renders its content as Markdown. Extensions can be configured in ``confi...
[ "gilbert.Site.register_loader", "markdown.markdown" ]
[((880, 915), 'gilbert.Site.register_loader', 'Site.register_loader', (['"""md"""', 'load_md'], {}), "('md', load_md)\n", (900, 915), False, 'from gilbert import Site\n'), ((678, 739), 'markdown.markdown', 'markdown', (['self.data'], {'output_format': '"""html5"""', 'extensions': 'extras'}), "(self.data, output_format=...
import os import sys EXGDBFILE = os.path.abspath(os.path.expanduser(__file__)) sys.path.insert(0, os.path.dirname(EXGDBFILE) + "/lib/") import utils from enert import * def clearscreen(): """ Customized clearscreen from https://github.com/longld/peda """ print("\x1b[2J\x1b[H") utils.clearscreen = cl...
[ "os.path.dirname", "os.path.expanduser" ]
[((50, 78), 'os.path.expanduser', 'os.path.expanduser', (['__file__'], {}), '(__file__)\n', (68, 78), False, 'import os\n'), ((99, 125), 'os.path.dirname', 'os.path.dirname', (['EXGDBFILE'], {}), '(EXGDBFILE)\n', (114, 125), False, 'import os\n')]
import httplib2 import urllib import json import re import sys class Transport: """ Abstract representation of a transport class. Defines the supported API methods """ endpoint = "platform.clickatell.com" def __init__(self): """ Construct a new transportation instance. ...
[ "httplib2.Http", "json.loads", "urllib.parse.urlencode", "json.dumps", "urllib.urlencode" ]
[((915, 943), 'json.loads', 'json.loads', (["response['body']"], {}), "(response['body'])\n", (925, 943), False, 'import json\n'), ((1524, 1539), 'httplib2.Http', 'httplib2.Http', ([], {}), '()\n', (1537, 1539), False, 'import httplib2\n'), ((1555, 1577), 'urllib.urlencode', 'urllib.urlencode', (['data'], {}), '(data)\...
import os import yaml class YamlConfig: def __init__(self, file_path: str = "./settings/config.yml"): self.file_path = file_path def exists(self) -> bool: return os.path.exists(self.file_path) def load(self) -> dict: """ :return: Return yaml data as dictionary fo...
[ "yaml.load", "yaml.dump", "os.path.exists" ]
[((194, 224), 'os.path.exists', 'os.path.exists', (['self.file_path'], {}), '(self.file_path)\n', (208, 224), False, 'import os\n'), ((420, 457), 'yaml.load', 'yaml.load', (['yf'], {'Loader': 'yaml.FullLoader'}), '(yf, Loader=yaml.FullLoader)\n', (429, 457), False, 'import yaml\n'), ((701, 746), 'yaml.dump', 'yaml.dump...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ******************************************************************************* Google Earth Engine Setninel-1 Lake Area o Purpose: Estimate surface are of lake from Sentinel-1 SAR date, using Google Earth Engine cloud computing platform o Inputs: * ROI...
[ "ee.Filter.listContains", "ee.Image.pixelArea", "ee.Image.constant", "ee.Dictionary", "ee.Date", "ee.Reducer.max", "ee.List.sequence", "ee.Reducer.mean", "ee.DateRange", "ee.Reducer.sum", "ee.Initialize", "ee.Filter.gt", "ee.Filter.lt", "ee.Reducer.stdDev", "ee.Number", "ee.ImageCollec...
[((884, 899), 'ee.Initialize', 'ee.Initialize', ([], {}), '()\n', (897, 899), False, 'import ee\n'), ((1030, 1051), 'ee.Date', 'ee.Date', (['"""2017-01-01"""'], {}), "('2017-01-01')\n", (1037, 1051), False, 'import ee\n'), ((1068, 1089), 'ee.Date', 'ee.Date', (['"""2020-01-01"""'], {}), "('2020-01-01')\n", (1075, 1089)...
__source__ = 'https://leetcode.com/problems/kth-largest-element-in-a-stream/' # Time: O() # Space: O() # # Description: Leetcode # 703. Kth Largest Element in a Stream # # Design a class to find the kth largest element in a stream. # Note that it is the kth largest element in the sorted order, not the kth distinct ele...
[ "unittest.main" ]
[((1148, 1163), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1161, 1163), False, 'import unittest\n')]
from django.db import models from django.utils import timezone # Create your models here. class Beverage(models.Model): """( description)""" created_by = models.ForeignKey('auth.User', on_delete=models.SET_NULL, null=True) name = models.CharField(max_length=100) key = models.CharField(max_length=100) ...
[ "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.CharField", "django.db.models.DateTimeField" ]
[((163, 231), 'django.db.models.ForeignKey', 'models.ForeignKey', (['"""auth.User"""'], {'on_delete': 'models.SET_NULL', 'null': '(True)'}), "('auth.User', on_delete=models.SET_NULL, null=True)\n", (180, 231), False, 'from django.db import models\n'), ((243, 275), 'django.db.models.CharField', 'models.CharField', ([], ...
#!/usr/bin/env python import sys import django from django.conf import settings from django.test.runner import DiscoverRunner as TestRunner SETTINGS = { 'DATABASES': { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'dev.db', }, # 'default': { ...
[ "django.conf.settings.configure", "django.test.runner.DiscoverRunner", "django.setup", "sys.exit" ]
[((1556, 1570), 'django.setup', 'django.setup', ([], {}), '()\n', (1568, 1570), False, 'import django\n'), ((1608, 1631), 'django.test.runner.DiscoverRunner', 'TestRunner', ([], {'verbosity': '(1)'}), '(verbosity=1)\n', (1618, 1631), True, 'from django.test.runner import DiscoverRunner as TestRunner\n'), ((1495, 1525),...
import RPi.GPIO as GPIO from .light_errors import LedError class Led: """ This is a class used to control LED's directly connected to the GPIO via a pin given. See the documentation for an example of how to wire the LED. """ def __init__(self, pin): """ This initates the LED on the ...
[ "RPi.GPIO.setup", "RPi.GPIO.setmode", "RPi.GPIO.output", "RPi.GPIO.PWM" ]
[((519, 543), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BOARD'], {}), '(GPIO.BOARD)\n', (531, 543), True, 'import RPi.GPIO as GPIO\n'), ((556, 586), 'RPi.GPIO.setup', 'GPIO.setup', (['self.pin', 'GPIO.OUT'], {}), '(self.pin, GPIO.OUT)\n', (566, 586), True, 'import RPi.GPIO as GPIO\n'), ((599, 630), 'RPi.GPIO.output',...
import os import pickle import re import requests import tkinter from tkinter import ttk from Hero import Hero from SearchListbox import SearchListbox from Team import Team class Window(ttk.Frame): def __init__(self, root=None): super().__init__(root) self.root = root self.root.title("team...
[ "tkinter.ttk.Label", "tkinter.StringVar", "pickle.dump", "tkinter.ttk.Scrollbar", "tkinter.ttk.Radiobutton", "tkinter.ttk.Frame", "Team.Team", "os.path.isfile", "pickle.load", "Hero.Hero", "SearchListbox.SearchListbox", "tkinter.ttk.Button", "requests.get", "re.search", "tkinter.ttk.Labe...
[((575, 605), 'tkinter.ttk.Frame', 'ttk.Frame', (['self'], {'borderwidth': '(0)'}), '(self, borderwidth=0)\n', (584, 605), False, 'from tkinter import ttk\n'), ((630, 669), 'SearchListbox.SearchListbox', 'SearchListbox', (['self.hero_frm'], {'height': '(20)'}), '(self.hero_frm, height=20)\n', (643, 669), False, 'from S...
from __future__ import division from __future__ import print_function from __future__ import absolute_import if __name__ == '__main__': import os import argparse from PIL import Image import torch import torchvision.transforms as transforms from torch.autograd import Variable from beamse...
[ "argparse.ArgumentParser", "torchvision.transforms.Scale", "PIL.Image.open", "beamsearch.SemanticBeamSearch", "PIL.Image.fromarray", "torchvision.transforms.CenterCrop", "torchvision.transforms.Normalize", "os.path.join", "os.listdir", "torchvision.transforms.ToTensor" ]
[((366, 422), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""generate sketches"""'}), "(description='generate sketches')\n", (389, 422), False, 'import argparse\n'), ((1879, 1906), 'PIL.Image.open', 'Image.open', (['args.image_path'], {}), '(args.image_path)\n', (1889, 1906), False, 'fro...
import argparse import csv import haploqa.mongods as mds SAMPLE_BATCH_SIZE = 20 def import_samples(platform, geno_matrix_csv, x_matrix_csv, y_matrix_csv, sample_tags, db): platform_chrs, snp_count_per_chr, snp_chr_indexes = mds.within_chr_snp_indices(platform, db) curr_sample_start_index = 0 while Tru...
[ "haploqa.mongods.post_proc_sample", "csv.reader", "haploqa.mongods.within_chr_snp_indices", "argparse.ArgumentParser", "haploqa.mongods.gen_unique_id", "haploqa.mongods.init_db" ]
[((233, 273), 'haploqa.mongods.within_chr_snp_indices', 'mds.within_chr_snp_indices', (['platform', 'db'], {}), '(platform, db)\n', (259, 273), True, 'import haploqa.mongods as mds\n'), ((4380, 4470), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""import the final report with probe inten...
# This program reads in a Google Hangouts JSON file and produces a wordcount # Author: <NAME> import json # JSON to handle Google's format import re # regular expressions # CHANGE THIS. For linux/mac, use '/home/user/restofpath/' basepath = 'C:\\Users\\Pinaky\\Desktop\\cesmd\\gmail_hangout\\' # I...
[ "json.load", "re.sub" ]
[((860, 879), 'json.load', 'json.load', (['jsonFile'], {}), '(jsonFile)\n', (869, 879), False, 'import json\n'), ((1937, 1970), 're.sub', 're.sub', (['u"""[^A-Za-z]+"""', 'u""" """', 'line'], {}), "(u'[^A-Za-z]+', u' ', line)\n", (1943, 1970), False, 'import re\n')]
"""Learn command""" import botutils import discord import traceback import json from discord.ext import commands from botc import check_if_is_player, check_if_is_night, check_if_dm, RoleCannotUseCommand, \ check_if_player_really_dead, check_if_can_learn, PlayerParser, AbilityForbidden, \ NotAPlayer, BOTCUtils,...
[ "json.load", "discord.ext.commands.command", "botc.BOTCUtils.get_player_from_id", "discord.ext.commands.check", "botc.check_if_is_player", "traceback.format_exc", "botc.PlayerParser" ]
[((445, 465), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (454, 465), False, 'import json\n'), ((576, 596), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (585, 596), False, 'import json\n'), ((1162, 1383), 'discord.ext.commands.command', 'commands.command', ([], {'pass_context': '(...
from random import randrange from film import film_embed from api import api_call import os async def random_embed(): __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) f = open(os.path.join(__location__, "films.txt"), "r", encoding="utf8", errors="ignore") film = random...
[ "os.getcwd", "os.path.dirname", "film.film_embed", "random.randrange", "os.path.join" ]
[((222, 261), 'os.path.join', 'os.path.join', (['__location__', '"""films.txt"""'], {}), "(__location__, 'films.txt')\n", (234, 261), False, 'import os\n'), ((360, 376), 'film.film_embed', 'film_embed', (['film'], {}), '(film)\n', (370, 376), False, 'from film import film_embed\n'), ((168, 179), 'os.getcwd', 'os.getcwd...
from time import sleep from kubernetes import client, config from kubernetes.client.rest import ApiException from kubetools.constants import MANAGED_BY_ANNOTATION_KEY from kubetools.exceptions import KubeBuildError from kubetools.settings import get_settings def get_object_labels_dict(obj): return obj.metadata....
[ "kubernetes.config.new_client_from_config", "kubetools.settings.get_settings", "kubernetes.client.CoreV1Api", "time.sleep", "kubernetes.client.AppsV1Api", "kubetools.exceptions.KubeBuildError", "kubernetes.client.BatchV1Api" ]
[((719, 761), 'kubernetes.config.new_client_from_config', 'config.new_client_from_config', ([], {'context': 'env'}), '(context=env)\n', (748, 761), False, 'from kubernetes import client, config\n'), ((841, 880), 'kubernetes.client.CoreV1Api', 'client.CoreV1Api', ([], {'api_client': 'api_client'}), '(api_client=api_clie...
import requests import json import jwt import cryptography #ploads = {'Authorization': 'Bearer '} #r = requests.get('https://api.music.apple.com/v1/me/library/playlists') #print(r.headers) #print(r.text) #print(r.json()) import applemusicpy secret_key = '' key_id = '74G4697BU4' team_id = 'QTM38LJQ3P' am = applemusic...
[ "applemusicpy.AppleMusic" ]
[((310, 362), 'applemusicpy.AppleMusic', 'applemusicpy.AppleMusic', (['secret_key', 'key_id', 'team_id'], {}), '(secret_key, key_id, team_id)\n', (333, 362), False, 'import applemusicpy\n')]
import numpy as np class Sersic: def b(self,n): return 1.9992*n - 0.3271 + 4*(405*n)**-1 def kappa(self,x, y, n_sersic, r_eff, k_eff, q, center_x=0, center_y=0): bn = self.b(n_sersic) r = (x**2+y**2*q**-2)**0.5 return k_eff*np.exp(-bn*((r*r_eff**-1)**(n_sersic**-1)-1))
[ "numpy.exp" ]
[((270, 325), 'numpy.exp', 'np.exp', (['(-bn * ((r * r_eff ** -1) ** n_sersic ** -1 - 1))'], {}), '(-bn * ((r * r_eff ** -1) ** n_sersic ** -1 - 1))\n', (276, 325), True, 'import numpy as np\n')]
import os, re, collections from attrdict import AttrDict from app_settings import file_search from app_settings import FileFactory __all__ = ["Config"] class Config(object): def __init__(self, files=None, dir=None, default=None, filter=None, **kwargs): self._validate(files, dir, default) self._cr...
[ "os.path.isdir", "app_settings.FileFactory.create", "attrdict.AttrDict", "re.sub", "app_settings.file_search" ]
[((1870, 1904), 're.sub', 're.sub', (['"""[^A-Za-z]"""', '"""_"""', 'filename'], {}), "('[^A-Za-z]', '_', filename)\n", (1876, 1904), False, 'import os, re, collections\n'), ((941, 981), 'app_settings.FileFactory.create', 'FileFactory.create', (['f', 'default'], {}), '(f, default, **kwargs)\n', (959, 981), False, 'from...
# # Copyright (c) 2022 Airbyte, Inc., all rights reserved. # import pytest from requests.auth import HTTPBasicAuth @pytest.fixture(name="config") def config_fixture(): return {"domain": "test.freshdesk.com", "api_key": "secret_api_key", "requests_per_minute": 50, "start_date": "2002-02-10T22:21:44Z"} @pytest.f...
[ "requests.auth.HTTPBasicAuth", "pytest.fixture" ]
[((119, 148), 'pytest.fixture', 'pytest.fixture', ([], {'name': '"""config"""'}), "(name='config')\n", (133, 148), False, 'import pytest\n'), ((312, 348), 'pytest.fixture', 'pytest.fixture', ([], {'name': '"""authenticator"""'}), "(name='authenticator')\n", (326, 348), False, 'import pytest\n'), ((395, 459), 'requests....
import pandas as pd import pdb import requests import numpy as np import os, sys import xarray as xr from datetime import datetime, timedelta import logging from scipy.interpolate import PchipInterpolator import argparse from collections import OrderedDict, defaultdict class PchipOceanSlices(object): def __init__...
[ "pandas.DataFrame", "scipy.interpolate.PchipInterpolator", "logging.debug", "argparse.ArgumentParser", "logging.basicConfig", "logging.warning", "numpy.floor", "xarray.open_dataset", "numpy.isnan", "collections.defaultdict", "pandas.to_datetime", "pdb.set_trace", "requests.get", "datetime....
[((12241, 12337), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'argparse.RawTextHelpFormatter'}), '(description=__doc__, formatter_class=argparse.\n RawTextHelpFormatter)\n', (12264, 12337), False, 'import argparse\n'), ((13171, 13260), 'logging.basicConfig...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2011 OpenStack LLC. # # 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...
[ "logging.getLogger" ]
[((726, 753), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (743, 753), False, 'import logging\n')]
# # OtterTune - target_objective.py # # Copyright (c) 2017-18, Carnegie Mellon University Database Group # import logging from website.models import DBMSCatalog, MetricCatalog from website.types import DBMSType from ..base.target_objective import (BaseTargetObjective, BaseThroughput, LESS_IS_BETTER, ...
[ "website.models.DBMSCatalog.objects.get", "website.models.MetricCatalog.objects.filter", "logging.getLogger" ]
[((363, 390), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (380, 390), False, 'import logging\n'), ((1887, 1958), 'website.models.DBMSCatalog.objects.get', 'DBMSCatalog.objects.get', ([], {'type': 'DBMSType.ORACLE', 'version': '"""172.16.31.10.0"""'}), "(type=DBMSType.ORACLE, version='1...
import itertools import pandas as pd import numpy as np # all permutations are already reverse-deleted # all sequences are represented in binary nucleotides = {'A':0,'C':1,'G':2,'T':3} numtonuc = {0:'A',1:'C',2:'G',3:'T'} complement = {0:3,3:0,1:2,2:1} def window(fseq, window_size): for i in range(len(fseq) - wi...
[ "pandas.DataFrame" ]
[((3541, 3562), 'pandas.DataFrame', 'pd.DataFrame', (['olig_df'], {}), '(olig_df)\n', (3553, 3562), True, 'import pandas as pd\n')]
from idact.detail.jupyter_app.format_deployments_info import \ format_deployments_info def test_format_deployments_info(): formatted = format_deployments_info(cluster_name='cluster1') assert formatted == ( "\nTo access the allocation and notebook deployments from cluster," " you can use th...
[ "idact.detail.jupyter_app.format_deployments_info.format_deployments_info" ]
[((145, 193), 'idact.detail.jupyter_app.format_deployments_info.format_deployments_info', 'format_deployments_info', ([], {'cluster_name': '"""cluster1"""'}), "(cluster_name='cluster1')\n", (168, 193), False, 'from idact.detail.jupyter_app.format_deployments_info import format_deployments_info\n')]
# Red color e-paper import sys import os import lib_2inch7_ec_paper import time from PIL import Image,ImageDraw,ImageFont from pms_a003 import Sensor air_mon = Sensor() air_mon.connect_hat(port="/dev/ttyS0", baudrate=9600) while True: try: e_paper = lib_2inch7_ec_paper.Ec_Paper() e_paper.ini...
[ "PIL.Image.new", "lib_2inch7_ec_paper.Ec_Paper", "time.sleep", "PIL.ImageFont.truetype", "PIL.ImageDraw.Draw", "pms_a003.Sensor" ]
[((163, 171), 'pms_a003.Sensor', 'Sensor', ([], {}), '()\n', (169, 171), False, 'from pms_a003 import Sensor\n'), ((270, 300), 'lib_2inch7_ec_paper.Ec_Paper', 'lib_2inch7_ec_paper.Ec_Paper', ([], {}), '()\n', (298, 300), False, 'import lib_2inch7_ec_paper\n'), ((386, 438), 'PIL.Image.new', 'Image.new', (['"""1"""', '(e...
import itertools class Subject: __id_generator = itertools.count(0, 1) @staticmethod def get_all_subjects(): return ['Eng1', 'Eng2', 'Eng3', 'Eng4', 'Alg1', 'Alg2', 'Geo', 'PreC', 'Phys', 'Chem', 'SciE', 'Bio', 'Civ1', 'Civ2', 'Civ3', 'Civ4'] def __init__(self, name: str): ...
[ "itertools.count" ]
[((55, 76), 'itertools.count', 'itertools.count', (['(0)', '(1)'], {}), '(0, 1)\n', (70, 76), False, 'import itertools\n')]
#!/usr/bin/python3 # More information, as well as the (non)licence can be found at: https://github.com/Katorone/Astrox-Imperium # This script exports 2 files to a csv: # - MOD/items/items_database.txt -> itemdb.csv # - MOD/items/specs_database.txt -> docdb.csv # It will also do some sanity checking, which should be...
[ "os.path.join" ]
[((5372, 5398), 'os.path.join', 'os.path.join', (['source', 'file'], {}), '(source, file)\n', (5384, 5398), False, 'import os\n'), ((10245, 10271), 'os.path.join', 'os.path.join', (['source', 'file'], {}), '(source, file)\n', (10257, 10271), False, 'import os\n')]
from setuptools import setup, find_packages import versioneer setup( name="metagraph-stellargraph", version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="Stellargraph plugins for Metagraph", author="<NAME>.", packages=find_packages( include=["metagraph_stell...
[ "versioneer.get_version", "setuptools.find_packages", "versioneer.get_cmdclass" ]
[((117, 141), 'versioneer.get_version', 'versioneer.get_version', ([], {}), '()\n', (139, 141), False, 'import versioneer\n'), ((156, 181), 'versioneer.get_cmdclass', 'versioneer.get_cmdclass', ([], {}), '()\n', (179, 181), False, 'import versioneer\n'), ((272, 349), 'setuptools.find_packages', 'find_packages', ([], {'...
#!/usr/bin/env python3 # Copyright 2021 <NAME> """Extension to math.isclose and cmath.isclose.""" import cmath import logging import math import numbers LOG = logging.getLogger("isclose") try: import version as _version if not _version.version.is_backwards_compatible_with("1.0.0"): raise ImportErro...
[ "version.Version", "version.version.is_backwards_compatible_with", "logging.getLogger", "doctest.testmod" ]
[((162, 190), 'logging.getLogger', 'logging.getLogger', (['"""isclose"""'], {}), "('isclose')\n", (179, 190), False, 'import logging\n'), ((474, 499), 'version.Version', '_version.Version', (['"""1.1.0"""'], {}), "('1.1.0')\n", (490, 499), True, 'import version as _version\n'), ((4193, 4210), 'doctest.testmod', 'doctes...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. and Contributors # Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0) # See accompanying Copyright.txt and LICENSE files for details ##########...
[ "danesfield_server.algorithms.common.createGirderClient", "girder_worker.docker.transforms.BindMountVolume", "girder_worker.docker.transforms.VolumePath", "tempfile.mkstemp", "girder.models.folder.Folder", "os.getgid", "danesfield_server.algorithms.common.addJobInfo", "danesfield_server.algorithms.com...
[((1672, 1711), 'danesfield_server.algorithms.common.createGirderClient', 'createGirderClient', (['jobInfo.requestInfo'], {}), '(jobInfo.requestInfo)\n', (1690, 1711), False, 'from danesfield_server.algorithms.common import addJobInfo, createDockerRunArguments, createGirderClient\n'), ((2559, 2577), 'tempfile.mkdtemp',...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin # This is the generated API from xosapi import * from core.views.legacyapi import LegacyXMLRPC from core.views.services import ServiceGridView #from core.views.analytics import Ana...
[ "django.contrib.admin.autodiscover", "django.conf.urls.include", "core.views.services.ServiceGridView.as_view", "django.conf.urls.url", "core.dashboard.sites.SitePlus", "django.http.HttpResponseRedirect" ]
[((538, 548), 'core.dashboard.sites.SitePlus', 'SitePlus', ([], {}), '()\n', (546, 548), False, 'from core.dashboard.sites import SitePlus\n'), ((549, 569), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (567, 569), False, 'from django.contrib import admin\n'), ((778, 810), 'django.http.Ht...
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : retrieve_1hop.py @Author : yyhaker @Contact : <EMAIL> @Time : 2020/04/07 16:33:58 ''' """ 检索知识图谱:对于某个token,分别检索出三部分: 1. sub-graph (1) 检索出头或者尾部包含该词的三元组,构建子图G 2. sub-graph triples 3. core_entity """ import sys sys.path.append(".") import r...
[ "sys.path.append", "tqdm.tqdm", "pickle.dump", "os.getpid", "argparse.ArgumentParser", "logging.basicConfig", "os.makedirs", "os.path.exists", "random.choice", "pickle.load", "nltk.corpus.stopwords.words", "multiprocessing.Pool", "os.path.join", "logging.getLogger" ]
[((290, 310), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (305, 310), False, 'import sys\n'), ((502, 645), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(levelname)s - %(name)s - %(message)s"""', 'datefmt': '"""%m/%d/%Y %H:%M:%S"""', 'level': 'logging.INFO'})...
from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ from django.conf import settings from models import BootstrapButtonPlugin class BootstrapButtonPlugin(CMSPluginBase): model = BootstrapButtonPlugin name = _("Button") text_e...
[ "cms.plugin_pool.plugin_pool.register_plugin", "django.utils.translation.ugettext" ]
[((1070, 1120), 'cms.plugin_pool.plugin_pool.register_plugin', 'plugin_pool.register_plugin', (['BootstrapButtonPlugin'], {}), '(BootstrapButtonPlugin)\n', (1097, 1120), False, 'from cms.plugin_pool import plugin_pool\n'), ((298, 309), 'django.utils.translation.ugettext', '_', (['"""Button"""'], {}), "('Button')\n", (2...
from django.db import models # Create your models here. class Category(models.Model): """ Description: Model Description """ name = models.CharField(max_length=50) class Meta: pass class Skill(models.Model): """ Description: Model Description """ name = models.CharField(ma...
[ "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((149, 180), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)'}), '(max_length=50)\n', (165, 180), False, 'from django.db import models\n'), ((301, 332), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)'}), '(max_length=50)\n', (317, 332), False, 'from django.db im...
from os.path import dirname, abspath, join DIR_PATH = dirname(abspath(__file__)) OTC_TOOLKIT_PATH = abspath(join(DIR_PATH, '..')) PATH_TO_RECORDINGS = "data" STATIONS = ['ecdf', 'citylab'] BOARDS = ['nano', 'tx2', 'xavier'] COUNTER_LINE_COORDS = {'ecdf': # {'ecdf-lindner': {"point1": {"x": 718,...
[ "os.path.abspath", "os.path.join" ]
[((63, 80), 'os.path.abspath', 'abspath', (['__file__'], {}), '(__file__)\n', (70, 80), False, 'from os.path import dirname, abspath, join\n'), ((109, 129), 'os.path.join', 'join', (['DIR_PATH', '""".."""'], {}), "(DIR_PATH, '..')\n", (113, 129), False, 'from os.path import dirname, abspath, join\n')]
import os import textwrap import argparse import pandas as pd from pathlib import Path from utils.action import Action, Actions from utils.markdown import ( update_markdown_document, SUMMARY_ID, MarkdownData, MarkdownDocument, ) from utils.files import FileClient README = Path( os.path.realpath(os....
[ "textwrap.dedent", "os.path.abspath", "pandas.read_csv", "pathlib.Path", "utils.action.Actions.read_from_files", "utils.markdown.update_markdown_document", "utils.files.FileClient", "utils.action.Actions.read_from_df" ]
[((1946, 1962), 'pandas.read_csv', 'pd.read_csv', (['CSV'], {}), '(CSV)\n', (1957, 1962), True, 'import pandas as pd\n'), ((1977, 2001), 'utils.action.Actions.read_from_df', 'Actions.read_from_df', (['df'], {}), '(df)\n', (1997, 2001), False, 'from utils.action import Action, Actions\n'), ((2111, 2123), 'utils.files.Fi...
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.widgets import Slider import cv2 as cv FILE_NAME = 'res/mountain-and-lake.jpg' # https://matplotlib.org/3.3.1/gallery/widgets/slider_demo.html # https://sodocumentation.net/matplotlib/topic/6983/animations-and-...
[ "matplotlib.pyplot.show", "cv2.cvtColor", "cv2.calcHist", "matplotlib.pyplot.axes", "matplotlib.widgets.Slider", "numpy.clip", "cv2.split", "cv2.samples.findFile", "cv2.merge", "matplotlib.pyplot.subplots" ]
[((569, 585), 'cv2.split', 'cv.split', (['imghsv'], {}), '(imghsv)\n', (577, 585), True, 'import cv2 as cv\n'), ((607, 625), 'numpy.clip', 'np.clip', (['s', '(0)', '(255)'], {}), '(s, 0, 255)\n', (614, 625), True, 'import numpy as np\n'), ((634, 653), 'cv2.merge', 'cv.merge', (['[h, s, v]'], {}), '([h, s, v])\n', (642,...
# Generated by Django 2.0.5 on 2019-03-10 19:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('SV', '0005_auto_20190305_0116'), ] operations = [ migrations.RemoveField( model_name='cut', name='user', ), ...
[ "django.db.migrations.RemoveField", "django.db.models.IntegerField", "django.db.models.CharField", "django.db.models.FloatField" ]
[((230, 283), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""cut"""', 'name': '"""user"""'}), "(model_name='cut', name='user')\n", (252, 283), False, 'from django.db import migrations, models\n'), ((426, 456), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default'...
from twisted.web.resource import Resource from genshi.template import TemplateLoader import os import cStringIO, gzip class TemplateResource(Resource): isLeaf = True def __init__(self, path = None): self.path = path loader = TemplateLoader( search_path=[ os.path.join(os.path.dirname(__file__), '...
[ "cStringIO.StringIO", "os.path.dirname", "gzip.GzipFile" ]
[((814, 834), 'cStringIO.StringIO', 'cStringIO.StringIO', ([], {}), '()\n', (832, 834), False, 'import cStringIO, gzip\n'), ((855, 889), 'gzip.GzipFile', 'gzip.GzipFile', (['None', '"""wb"""', '(9)', 'zbuf'], {}), "(None, 'wb', 9, zbuf)\n", (868, 889), False, 'import cStringIO, gzip\n'), ((292, 317), 'os.path.dirname',...
import numpy as np from platformx.plat_tensorflow.tools.processor.np_utils import shape_utils, \ anchor_generator_builder, box_list_ops, box_list, box_coder_builder, post_processing_builder, \ visualization_utils as vis_util from platformx.plat_tensorflow.tools.processor.np_utils import standard_fields as f...
[ "numpy.ones", "scipy.misc.imsave", "os.path.join", "numpy.zeros_like", "platformx.plat_tensorflow.tools.processor.np_utils.label_map_util.create_category_index", "platformx.plat_tensorflow.tools.processor.np_utils.label_map_util.load_labelmap", "numpy.reshape", "platformx.plat_tensorflow.tools.process...
[((452, 473), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (466, 473), False, 'import matplotlib\n'), ((3544, 3618), 'numpy.array', 'np.array', (['[input_shape[1], input_shape[2], input_shape[3]]'], {'dtype': 'np.int32'}), '([input_shape[1], input_shape[2], input_shape[3]], dtype=np.int32)\n', ...