code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import os import tkinter as tk from .textpad import TextPad from ..tab_view import AbstractTabView class TabbedTextpad(AbstractTabView): NEW_TAB_BASENAME = "new%d" def __init__(self, parent, *args, **kwargs): super().__init__(parent, *args, **kwargs) self.set_options() self.ad...
[ "tkinter.Tk", "tkinter.Frame", "os.path.split" ]
[((2799, 2806), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (2804, 2806), True, 'import tkinter as tk\n'), ((1946, 1976), 'tkinter.Frame', 'tk.Frame', (['self'], {}), '(self, **frame_kwargs)\n', (1954, 1976), True, 'import tkinter as tk\n'), ((1533, 1552), 'os.path.split', 'os.path.split', (['path'], {}), '(path)\n', (154...
from utils.data_set.classes_correlation_between_data_sets import ClassesCorrelationBetweenDataSets from utils.data_set.initial_data_set import InitialDataSet from graphics.input.class_identifiers_input_f import ClassIdentifiersInputF from graphics.widgets.qna_f import QnAF from tkinter import filedialog from tkinter ...
[ "tkinter.IntVar", "tkinter.filedialog.askdirectory", "tkinter.Frame.__init__", "graphics.widgets.qna_f.QnAF", "tkinter.messagebox.askyesno", "graphics.input.class_identifiers_input_f.ClassIdentifiersInputF", "utils.data_set.initial_data_set.InitialDataSet", "utils.data_set.classes_correlation_between_...
[((1437, 1552), 'tkinter.Frame.__init__', 'tk.Frame.__init__', (['self', 'parent'], {'padx': 'const.IDSP_FRAME_PADX', 'pady': 'const.IDSP_FRAME_PADY', 'relief': '"""sunken"""', 'bd': '(5)'}), "(self, parent, padx=const.IDSP_FRAME_PADX, pady=const.\n IDSP_FRAME_PADY, relief='sunken', bd=5)\n", (1454, 1552), True, 'im...
from .npd_wraper import npd from datetime import datetime import pandas as pd class field(npd): def get_field_production_monthly(self): ''' get monthly production ''' url_dataset=self.npd_path+"field/production-monthly-by-field" df = self._get_dataframe_data(url_dataset) ...
[ "pandas.to_datetime" ]
[((442, 465), 'pandas.to_datetime', 'pd.to_datetime', (['df.Date'], {}), '(df.Date)\n', (456, 465), True, 'import pandas as pd\n')]
import unittest from strblackout import blackout class TestBlackout(unittest.TestCase): def test_blackout_default(self): self.assertEqual(blackout("123456789"), "123456789") def test_blackout_left(self): self.assertEqual(blackout("123456789", left=5), "*****6789") def test_blackout_right...
[ "unittest.main", "strblackout.blackout" ]
[((668, 683), 'unittest.main', 'unittest.main', ([], {}), '()\n', (681, 683), False, 'import unittest\n'), ((152, 173), 'strblackout.blackout', 'blackout', (['"""123456789"""'], {}), "('123456789')\n", (160, 173), False, 'from strblackout import blackout\n'), ((248, 277), 'strblackout.blackout', 'blackout', (['"""12345...
# -*- coding: utf-8 -*- import unittest import os import pickle import pandas as pd import numpy as np from td_query import ROOT_PATH from td_query.data_manipulate import data_manipulate_instance as instance from teradata import UdaExec class TestDataManipulate(unittest.TestCase): @classmethod def setUpClass...
[ "pandas.DataFrame.from_records", "td_query.data_manipulate.data_manipulate_instance.translate_hyperloop_rules_to_sql", "td_query.data_manipulate.data_manipulate_instance.generate_hl_job_json", "td_query.data_manipulate.data_manipulate_instance.create_table_from_src_table_schema", "td_query.data_manipulate.d...
[((445, 460), 'td_query.data_manipulate.data_manipulate_instance.init', 'instance.init', ([], {}), '()\n', (458, 460), True, 'from td_query.data_manipulate import data_manipulate_instance as instance\n'), ((811, 834), 'td_query.data_manipulate.data_manipulate_instance.query_sample', 'instance.query_sample', ([], {}), '...
import csv adex_info = {} # map from ticker to line of adex info url_to_ticker = {} # dict from url to ticker HEADER = "Url,Date,PageviewsPerMillion,PageviewsPerUser,Rank,ReachPerMillion,gvkey,datadate,fyear,tic,conm,curcd,revt,sale,xad,exch\n" # populate adex info with open("data/ad-ex/batch2.csv", ...
[ "csv.DictReader" ]
[((423, 444), 'csv.DictReader', 'csv.DictReader', (['adex1'], {}), '(adex1)\n', (437, 444), False, 'import csv\n'), ((704, 757), 'csv.DictReader', 'csv.DictReader', (['csvFile'], {'fieldnames': "('url', 'ticker')"}), "(csvFile, fieldnames=('url', 'ticker'))\n", (718, 757), False, 'import csv\n'), ((1067, 1094), 'csv.Di...
# Copyright (c) 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ "zaqar.bootstrap.Bootstrap", "oslo_serialization.jsonutils.loads" ]
[((1543, 1573), 'zaqar.bootstrap.Bootstrap', 'bootstrap.Bootstrap', (['self.conf'], {}), '(self.conf)\n', (1562, 1573), False, 'from zaqar import bootstrap\n'), ((2569, 2593), 'oslo_serialization.jsonutils.loads', 'jsonutils.loads', (['body[0]'], {}), '(body[0])\n', (2584, 2593), False, 'from oslo_serialization import ...
import math import sys import argparse parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=("""This loan calculator can compute the following. \ \n----------------------------------------------- - Your loans annuity monthly payment amount. - Your number of mo...
[ "math.floor", "math.ceil", "argparse.ArgumentParser", "math.log" ]
[((49, 404), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.RawDescriptionHelpFormatter', 'description': '"""This loan calculator can compute the following. \n-----------------------------------------------\n - Your loans annuity monthly payment amount.\n - Your number of mon...
import pandas as pd from ppandas import PDataFrame df1 = pd.read_csv("testing/populational1.csv") df1 = df1.drop(columns=["Gender"]) pd1 = PDataFrame.from_populational_data(["Age"],df1,600) pd1.visualise(show_tables=True)
[ "ppandas.PDataFrame.from_populational_data", "pandas.read_csv" ]
[((59, 99), 'pandas.read_csv', 'pd.read_csv', (['"""testing/populational1.csv"""'], {}), "('testing/populational1.csv')\n", (70, 99), True, 'import pandas as pd\n'), ((141, 193), 'ppandas.PDataFrame.from_populational_data', 'PDataFrame.from_populational_data', (["['Age']", 'df1', '(600)'], {}), "(['Age'], df1, 600)\n",...
import ctypes from pypen.drawing.color import Color from pypen.utils.math import TAU from pypen.settings import default_settings import cairo from pyglet import gl, image class PyPen(): def __init__(self, user_sketch): self.user_sketch = user_sketch self.surface_data = None self.surface =...
[ "cairo.Context", "cairo.ImageSurface.create_for_data", "pypen.drawing.color.Color.from_user_input", "pyglet.image.Texture.create_for_size" ]
[((1563, 1622), 'pypen.drawing.color.Color.from_user_input', 'Color.from_user_input', (['self.user_sketch.settings.fill_color'], {}), '(self.user_sketch.settings.fill_color)\n', (1584, 1622), False, 'from pypen.drawing.color import Color\n'), ((2032, 2093), 'pypen.drawing.color.Color.from_user_input', 'Color.from_user_...
# coding: utf-8 """ MIT License """ ''' <NAME> & <NAME> <NAME> & <NAME> --- Description: Function designed to evaluate all parameters provided to the gp and identify the best parameters. Saves all fitness of individuals by logging them into csv files which will then be evaluated on plots.py...
[ "utils.load_data", "numpy.column_stack", "os.getcwd", "numpy.zeros", "numpy.random.seed", "pandas.DataFrame" ]
[((777, 866), 'utils.load_data', 'utils.load_data', ([], {'filename': '"""data_trimmed.csv"""', 'clean': '(False)', 'normalize': '(True)', 'resample': '(2)'}), "(filename='data_trimmed.csv', clean=False, normalize=True,\n resample=2)\n", (792, 866), False, 'import utils\n'), ((1019, 1042), 'numpy.column_stack', 'np....
""" Example script on how to use the esp32serial library. For the documentation. open a python and type: >>> import esp32serial >>> help(esp32serial.ESP32Serial) """ # import the library import esp32serial # create a connection esp32 = esp32serial.ESP32Serial("/dev/ttyACM0") # get an observable or parameter, conver...
[ "esp32serial.ESP32Serial" ]
[((239, 278), 'esp32serial.ESP32Serial', 'esp32serial.ESP32Serial', (['"""/dev/ttyACM0"""'], {}), "('/dev/ttyACM0')\n", (262, 278), False, 'import esp32serial\n')]
import unittest import tempfile from flask import Flask from flask_csp.csp import csp_default, create_csp_header, csp_header class CspTestFunctions(unittest.TestCase): """ test base functions """ def setUp(self): tmp = tempfile.mkstemp() self.dh = csp_default() self.dh.default_file = tmp[1] def test_create_c...
[ "flask_csp.csp.csp_header", "flask.Flask", "flask_csp.csp.csp_default", "flask_csp.csp.create_csp_header", "unittest.main", "tempfile.mkstemp" ]
[((3071, 3086), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3084, 3086), False, 'import unittest\n'), ((224, 242), 'tempfile.mkstemp', 'tempfile.mkstemp', ([], {}), '()\n', (240, 242), False, 'import tempfile\n'), ((255, 268), 'flask_csp.csp.csp_default', 'csp_default', ([], {}), '()\n', (266, 268), False, 'fr...
# Generated by Django 3.1.6 on 2021-02-11 11:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0003_auto_20210210_2324'), ] operations = [ migrations.AddField( model_name='setting', name='site_address', ...
[ "django.db.models.DateTimeField", "django.db.models.EmailField", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((338, 417), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(255)', 'null': '(True)', 'verbose_name': '"""Address"""'}), "(blank=True, max_length=255, null=True, verbose_name='Address')\n", (354, 417), False, 'from django.db import migrations, models\n'), ((546, 577), 'django...
import torch import torch.nn.functional as F import numpy as np from utils import * from core.config import config from train.BaseTrainer import BaseTrainer class PartNetTrainer(BaseTrainer): def __init__(self): super(PartNetTrainer, self).__init__() def build_opt_and_lr(self, model): if ...
[ "torch.optim.Adam", "torch.optim.SGD", "core.config.config.get", "torch.optim.lr_scheduler.MultiStepLR", "torch.nn.functional.normalize", "torch.no_grad", "torch.cat" ]
[((320, 339), 'core.config.config.get', 'config.get', (['"""debug"""'], {}), "('debug')\n", (330, 339), False, 'from core.config import config\n'), ((438, 463), 'core.config.config.get', 'config.get', (['"""optm_config"""'], {}), "('optm_config')\n", (448, 463), False, 'from core.config import config\n'), ((639, 667), ...
from unittest.mock import patch from django.core.management import call_command from django.core.management.base import CommandError from orchestra.tests.helpers import OrchestraTestCase class MigrateCertificationsTestCase(OrchestraTestCase): patch_path = ('orchestra.management.commands.' 'mig...
[ "unittest.mock.patch", "django.core.management.call_command" ]
[((371, 388), 'unittest.mock.patch', 'patch', (['patch_path'], {}), '(patch_path)\n', (376, 388), False, 'from unittest.mock import patch\n'), ((623, 780), 'django.core.management.call_command', 'call_command', (['"""migrate_certifications"""', '"""test_source_workflow_slug"""', '"""ntest_destination_workflow_slug"""']...
""" Most recently tested against PySAM 2.1.4 """ from pathlib import Path import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import PySAM.Singleowner as Singleowner import time import multiprocessing from itertools import product import PySAM.Pvsamv1 as Pvsamv1 solar_resourc...
[ "PySAM.Pvsamv1.default", "PySAM.Singleowner.default", "numpy.reshape", "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "pathlib.Path", "matplotlib.pyplot.xlabel", "itertools.product", "numpy.array", "matplotlib.pyplot.figure", "mpl_toolkits.mplot3d.Axes3D", "matplotlib.pyplot.contour", ...
[((1671, 1687), 'numpy.arange', 'np.arange', (['(1)', '(10)'], {}), '(1, 10)\n', (1680, 1687), True, 'import numpy as np\n'), ((1696, 1712), 'numpy.arange', 'np.arange', (['(1)', '(10)'], {}), '(1, 10)\n', (1705, 1712), True, 'import numpy as np\n'), ((1723, 1742), 'time.process_time', 'time.process_time', ([], {}), '(...
# Copyright 2013 New Dream Network, LLC (DreamHost) # Copyright 2015 Rackspace # # 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 ...
[ "neutron.common.rpc.get_client", "oslo_messaging.Target" ]
[((963, 1012), 'oslo_messaging.Target', 'oslo_messaging.Target', ([], {'topic': 'topic', 'version': '"""1.0"""'}), "(topic=topic, version='1.0')\n", (984, 1012), False, 'import oslo_messaging\n'), ((1035, 1059), 'neutron.common.rpc.get_client', 'n_rpc.get_client', (['target'], {}), '(target)\n', (1051, 1059), True, 'fr...
''' Main Driver program for PiCa, a Raspberry pi based car --- Get it? "Driver" Responsible for starting video feed in thread, handling web socket communication and moving the car Program by <NAME>, started on the fifteenth of December 2017 ''' #Start with imports from Car2 import Car import socket import subprocess ...
[ "subprocess.Popen", "Car2.Car", "socket.socket" ]
[((1116, 1143), 'Car2.Car', 'Car', (['pin1', 'pin2', 'pin3', 'pin4'], {}), '(pin1, pin2, pin3, pin4)\n', (1119, 1143), False, 'from Car2 import Car\n'), ((1176, 1191), 'socket.socket', 'socket.socket', ([], {}), '()\n', (1189, 1191), False, 'import socket\n'), ((762, 799), 'subprocess.Popen', 'subprocess.Popen', (['com...
from req import WebRequestHandler from req import Service import tornado class WebProductHandler(WebRequestHandler): @tornado.gen.coroutine def get(self, action=None, product_id=None): print(action) if action == None: err, data = yield from Service.Product.get_product({'id': self.id...
[ "req.Service.Product.get_product_by_id", "req.Service.Product.get_product" ]
[((278, 322), 'req.Service.Product.get_product', 'Service.Product.get_product', (["{'id': self.id}"], {}), "({'id': self.id})\n", (305, 322), False, 'from req import Service\n'), ((515, 559), 'req.Service.Product.get_product', 'Service.Product.get_product', (["{'id': self.id}"], {}), "({'id': self.id})\n", (542, 559), ...
# # MIT License # # Copyright (c) 2022 GT4SD team # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge,...
[ "pytorch_lightning.Trainer.add_argparse_args", "configparser.ConfigParser", "argparse.ArgumentParser", "argparse.Namespace" ]
[((1777, 1802), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1800, 1802), False, 'import argparse\n'), ((2121, 2148), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (2146, 2148), False, 'import configparser\n'), ((3988, 4021), 'pytorch_lightning.Trainer.add_argpa...
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2021 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
[ "argparse.ArgumentParser", "TermTk.TTkGridLayout", "TermTk.TTkColor.fg", "TermTk.TTkLog.use_default_file_logging", "os.path.join", "TermTk.TTkColor.bg", "TermTk.TTk", "TermTk.TTkFrame", "TermTk.TTkWindow" ]
[((1178, 1212), 'os.path.join', 'os.path.join', (['sys.path[0]', '"""../.."""'], {}), "(sys.path[0], '../..')\n", (1190, 1212), False, 'import sys, os, argparse\n'), ((1280, 1319), 'TermTk.TTkFrame', 'ttk.TTkFrame', ([], {'parent': 'root', 'border': '(False)'}), '(parent=root, border=False)\n', (1292, 1319), True, 'imp...
# Parse Newick-formatted file into tree of { 'kids': [], 'label': '', 'length': '' } import logging from utils import die def skipSpaces(treeString, offset): while (offset != len(treeString) and treeString[offset].isspace()): offset += 1 return offset def parseQuoted(treeString, offset): """Read ...
[ "utils.die", "logging.info", "logging.debug" ]
[((686, 749), 'utils.die', 'die', (['(\'Missing end-\' + quoteChar + " after \'" + treeString + "\'")'], {}), '(\'Missing end-\' + quoteChar + " after \'" + treeString + "\'")\n', (689, 749), False, 'from utils import die\n'), ((2911, 3004), 'utils.die', 'die', (['("parseBranch called on treeString that doesn\'t begin ...
digits = '0123456789' chars = 'abcdefghijklmn' + \ 'opqrstuvwxyz' up = chars.upper() special = '_!$%&?ù' all = digits+chars+up+special from random import choice password = ''.join ( choice(all) for i in range(10) ) f = open('ascii.txt', 'r') file_contents = f.read() print("\x1b[1;32m ...
[ "random.choice" ]
[((204, 215), 'random.choice', 'choice', (['all'], {}), '(all)\n', (210, 215), False, 'from random import choice\n')]
from app import db from app import login from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from datetime import datetime from hashlib import md5 @login.user_loader def load_user(id): return User.query.get(int(id)) project_contributors = db.Table('project_c...
[ "app.db.String", "werkzeug.security.generate_password_hash", "app.db.Column", "app.db.ForeignKey", "app.db.relationship", "werkzeug.security.check_password_hash" ]
[((983, 1022), 'app.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (992, 1022), False, 'from app import db\n'), ((1428, 1446), 'app.db.Column', 'db.Column', (['db.Text'], {}), '(db.Text)\n', (1437, 1446), False, 'from app import db\n'), ((1615, 1675), 'app.db.r...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contact', '0001_initial'), ('product', '0001_initial'), ] operations = [ migrations.CreateModel( name='P...
[ "django.db.models.DateTimeField", "django.db.models.AutoField", "django.db.models.TextField", "django.db.models.ForeignKey" ]
[((377, 470), 'django.db.models.AutoField', 'models.AutoField', ([], {'verbose_name': '"""ID"""', 'serialize': '(False)', 'auto_created': '(True)', 'primary_key': '(True)'}), "(verbose_name='ID', serialize=False, auto_created=True,\n primary_key=True)\n", (393, 470), False, 'from django.db import models, migrations\...
import sys import time import traceback import subprocess pods = [{ "name": pod, "num_errors": 0, "last_tmp_tar_size": 0, "last_.redirector-data_tar_size": 0 } for pod in sys.argv[1:]] while True: time.sleep(10) for pod in pods: if pod["num_errors"] >= 20: continue ...
[ "traceback.print_exc", "time.sleep" ]
[((219, 233), 'time.sleep', 'time.sleep', (['(10)'], {}), '(10)\n', (229, 233), False, 'import time\n'), ((1348, 1369), 'traceback.print_exc', 'traceback.print_exc', ([], {}), '()\n', (1367, 1369), False, 'import traceback\n')]
''' @Author: <NAME> <EMAIL> ''' import sys from abc import * class Config: __metaclass__ = ABCMeta def __init__(self): #Number of Url Data Fetching Threads Allowed self.MaxWorkerThreads = 8 #Timeout(Seconds) for trying to get the next url from the frontier. se...
[ "lxml.html.document_fromstring", "nltk.clean_html", "sys.exit" ]
[((4731, 4756), 'nltk.clean_html', 'nltk.clean_html', (['htmlData'], {}), '(htmlData)\n', (4746, 4756), False, 'import nltk\n'), ((5450, 5483), 'lxml.html.document_fromstring', 'html.document_fromstring', (['rawData'], {}), '(rawData)\n', (5474, 5483), False, 'from lxml import html, etree\n'), ((2992, 3003), 'sys.exit'...
from viroconcom.fitting import Fit from viroconcom.contours import IFormContour import numpy as np prng = np.random.RandomState(42) # Draw 1000 observations from a Weibull distribution with # shape=1.5 and scale=3, which represents significant # wave height. sample_0 = prng.weibull(1.5, 1000) * 3 # Let the second sa...
[ "numpy.exp", "viroconcom.fitting.Fit", "viroconcom.contours.IFormContour", "numpy.random.RandomState" ]
[((107, 132), 'numpy.random.RandomState', 'np.random.RandomState', (['(42)'], {}), '(42)\n', (128, 132), True, 'import numpy as np\n'), ((1458, 1525), 'viroconcom.fitting.Fit', 'Fit', (['(sample_0, sample_1)', '(dist_description_0, dist_description_1)'], {}), '((sample_0, sample_1), (dist_description_0, dist_descriptio...
from django.contrib import admin from .models import Product, ContainerType, RateSlab class RateSlabInline(admin.TabularInline): model = RateSlab extra = 3 class ContainerTypeAdmin(admin.ModelAdmin): inlines = [RateSlabInline] # Register your models here. admin.site.register(Product) admin.site.regis...
[ "django.contrib.admin.site.register" ]
[((275, 303), 'django.contrib.admin.site.register', 'admin.site.register', (['Product'], {}), '(Product)\n', (294, 303), False, 'from django.contrib import admin\n'), ((304, 358), 'django.contrib.admin.site.register', 'admin.site.register', (['ContainerType', 'ContainerTypeAdmin'], {}), '(ContainerType, ContainerTypeAd...
import numpy as np from numpy.testing import assert_array_equal from seai_deap import dim def test_calculate_building_volume() -> None: expected_output = np.array(4) output = dim.calculate_building_volume( ground_floor_area=np.array(1), first_floor_area=np.array(1), second_floor_are...
[ "numpy.array", "numpy.testing.assert_array_equal" ]
[((162, 173), 'numpy.array', 'np.array', (['(4)'], {}), '(4)\n', (170, 173), True, 'import numpy as np\n'), ((546, 589), 'numpy.testing.assert_array_equal', 'assert_array_equal', (['output', 'expected_output'], {}), '(output, expected_output)\n', (564, 589), False, 'from numpy.testing import assert_array_equal\n'), ((6...
from collections import namedtuple import graphene import datetime import json from .new_models import Agent, Community, Collection def _json_object_hook(d): return namedtuple('X', d.keys())(*d.values()) def json2obj(data): return json.loads(data, object_hook=_json_object_hook) class AgentSchema(graphen...
[ "graphene.String", "json.loads", "graphene.List", "graphene.Field", "graphene.DateTime", "graphene.Schema", "graphene.Boolean" ]
[((3648, 3718), 'graphene.Schema', 'graphene.Schema', ([], {'query': 'Query', 'mutation': 'Mutations', 'auto_camelcase': '(False)'}), '(query=Query, mutation=Mutations, auto_camelcase=False)\n', (3663, 3718), False, 'import graphene\n'), ((245, 292), 'json.loads', 'json.loads', (['data'], {'object_hook': '_json_object_...
from pathlib import Path from util.plot_utils import plot_logs, plot_precision_recall def main(): logs_path = Path('output/21_09_2021_with_corss_en_loss') logs_paths_list = [logs_path] plot_logs(logs_paths_list) if __name__ == '__main__': main()
[ "util.plot_utils.plot_logs", "pathlib.Path" ]
[((117, 161), 'pathlib.Path', 'Path', (['"""output/21_09_2021_with_corss_en_loss"""'], {}), "('output/21_09_2021_with_corss_en_loss')\n", (121, 161), False, 'from pathlib import Path\n'), ((200, 226), 'util.plot_utils.plot_logs', 'plot_logs', (['logs_paths_list'], {}), '(logs_paths_list)\n', (209, 226), False, 'from ut...
import argparse from multiprocessing import Queue, Process from logging import getLogger def main(): parser = argparse.ArgumentParser( description="QkouBot is an application for KIT students. This automatically collect and " "redistribute information and cancellation of lectures. QkouB...
[ "logging.getLogger", "qkoubot.StreamReceiverProcess", "os.path.exists", "configparser.ConfigParser", "argparse.ArgumentParser", "qkoubot.stream_process", "multiprocessing.Process", "log_modules.configure_queue_logger", "qkoubot.TweetProcess", "qkoubot.today_cancel_tweet", "time.sleep", "qkoubo...
[((116, 345), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""QkouBot is an application for KIT students. This automatically collect and redistribute information and cancellation of lectures. QkouBot detect update of information and tweet it."""'}), "(description=\n 'QkouBot is an appl...
#!/usr/bin/python3 """ AUTHOR: <NAME> - <EMAIL> """ # Imports import json import maxminddb import redis import re import random import io from const import META, PORTMAP from argparse import ArgumentParser, RawDescriptionHelpFormatter from sys import exit from time import localtime, sleep, strftime from os import ge...
[ "time.localtime", "maxminddb.open_database", "random.randrange", "json.dumps", "io.open", "time.sleep", "redis.StrictRedis", "sys.exit", "re.findall" ]
[((848, 859), 'time.localtime', 'localtime', ([], {}), '()\n', (857, 859), False, 'from time import localtime, sleep, strftime\n'), ((1517, 1566), 'redis.StrictRedis', 'redis.StrictRedis', ([], {'host': 'redis_ip', 'port': '(6379)', 'db': '(0)'}), '(host=redis_ip, port=6379, db=0)\n', (1534, 1566), False, 'import redis...
import numpy as np import skimage as ski import os from matplotlib import pyplot as plt from skimage.feature import blob_dog, blob_log, blob_doh from skimage.color import rgb2gray from math import sqrt log_defaults = { 'min_s': 1, 'max_s': 30, 'num_s': 10, 'thresh':0.1, 'overlap': 0.5, 'log_sca...
[ "skimage.feature.blob_log", "skimage.color.rgb2gray", "matplotlib.pyplot.Circle", "math.sqrt", "os.path.join", "os.path.basename", "matplotlib.pyplot.tight_layout", "skimage.img_as_ubyte", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((561, 825), 'skimage.feature.blob_log', 'blob_log', (['image'], {'min_sigma': "log_params['min_s']", 'max_sigma': "log_params['max_s']", 'num_sigma': "log_params['num_s']", 'threshold': "log_params['thresh']", 'overlap': "log_params['overlap']", 'log_scale': "log_params['log_scale']", 'exclude_border': "log_params['e...
# Copyright 2020 BULL SAS All rights reserved # from collections import Counter from logflow.logsparser.Pattern import Pattern from loguru import logger from typing import Dict, List class Cardinality: """A cardinality is a length of line. The length is defined as the number of words. Args: counter_g...
[ "logflow.logsparser.Pattern.Pattern", "collections.Counter" ]
[((2261, 2336), 'logflow.logsparser.Pattern.Pattern', 'Pattern', (['self.cardinality', 'best_subset_words_value', 'best_subset_words_index'], {}), '(self.cardinality, best_subset_words_value, best_subset_words_index)\n', (2268, 2336), False, 'from logflow.logsparser.Pattern import Pattern\n'), ((1864, 1890), 'collectio...
from django.db import models from django.contrib.auth.models import User from cloudinary.models import CloudinaryField from django.dispatch import receiver from django.db.models.signals import post_save class Project(models.Model): '''Model class for Projects tha user posts''' user = models.ForeignKey(User, on...
[ "django.db.models.OneToOneField", "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.IntegerField", "cloudinary.models.CloudinaryField", "django.db.models.CharField" ]
[((294, 367), 'django.db.models.ForeignKey', 'models.ForeignKey', (['User'], {'on_delete': 'models.CASCADE', 'related_name': '"""project"""'}), "(User, on_delete=models.CASCADE, related_name='project')\n", (311, 367), False, 'from django.db import models\n'), ((380, 411), 'django.db.models.CharField', 'models.CharField...
from gui.gui import Main Main()
[ "gui.gui.Main" ]
[((26, 32), 'gui.gui.Main', 'Main', ([], {}), '()\n', (30, 32), False, 'from gui.gui import Main\n')]
import pdb import numpy import geometry.conversions import geometry.helpers import geometry.quaternion import geodesy.conversions import environments.earth import spherical_geometry.vector import spherical_geometry.great_circle_arc def line_distance(point_1, point_2, ignore_alt=True): """Compute the straight l...
[ "numpy.array", "numpy.zeros", "numpy.cross", "numpy.linalg.norm" ]
[((810, 831), 'numpy.linalg.norm', 'numpy.linalg.norm', (['dX'], {}), '(dX)\n', (827, 831), False, 'import numpy\n'), ((760, 797), 'numpy.array', 'numpy.array', (['[1.0, 1.0, 0.0]'], {'ndmin': '(2)'}), '([1.0, 1.0, 0.0], ndmin=2)\n', (771, 797), False, 'import numpy\n'), ((2757, 2783), 'numpy.zeros', 'numpy.zeros', (['...
import doctest import unittest from zope.site.folder import Folder from zope.site.testing import siteSetUp, siteTearDown, checker from zope.site.tests.test_site import TestSiteManagerContainer def setUp(test=None): siteSetUp() def tearDown(test=None): siteTearDown() class FolderTest(TestSiteManagerCont...
[ "doctest.DocTestSuite", "doctest.DocFileSuite", "zope.site.testing.siteSetUp", "zope.site.folder.Folder", "unittest.defaultTestLoader.loadTestsFromName", "zope.site.testing.siteTearDown" ]
[((224, 235), 'zope.site.testing.siteSetUp', 'siteSetUp', ([], {}), '()\n', (233, 235), False, 'from zope.site.testing import siteSetUp, siteTearDown, checker\n'), ((267, 281), 'zope.site.testing.siteTearDown', 'siteTearDown', ([], {}), '()\n', (279, 281), False, 'from zope.site.testing import siteSetUp, siteTearDown, ...
import requests import os scrape_key = os.environ['SCRAPE_KEY'] payload = {'key': scrape_key} headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'} response = requests.put('https://apw.locrian24.now.sh/api/scrape', headers = headers, json = payload) print(response)
[ "requests.put" ]
[((181, 271), 'requests.put', 'requests.put', (['"""https://apw.locrian24.now.sh/api/scrape"""'], {'headers': 'headers', 'json': 'payload'}), "('https://apw.locrian24.now.sh/api/scrape', headers=headers,\n json=payload)\n", (193, 271), False, 'import requests\n')]
# Author: <NAME> # Datetime: 2021/9/14 # Copyright belongs to the author. # Please indicate the source for reprinting. import sys import webbrowser import time from typing import List import tkinter from tkinter import ttk from tkinter.scrolledtext import ScrolledText from qgui.manager import BLACK, FONT from qgui....
[ "PIL.Image.open", "tkinter.ttk.Frame", "tkinter.ttk.Label", "webbrowser.open_new", "qgui.os_tools.StdOutWrapper", "qgui.third_party.collapsing_frame.CollapsingFrame", "qgui.base_tools.ArgInfo", "tkinter.scrolledtext.ScrolledText", "tkinter.ttk.Notebook", "time.localtime", "qgui.os_tools.DataCach...
[((888, 897), 'qgui.base_tools.ArgInfo', 'ArgInfo', ([], {}), '()\n', (895, 897), False, 'from qgui.base_tools import ArgInfo\n'), ((962, 1009), 'tkinter.ttk.Frame', 'ttk.Frame', (['master'], {'style': "(self.style + '.TFrame')"}), "(master, style=self.style + '.TFrame')\n", (971, 1009), False, 'from tkinter import ttk...
import infer_organism import subprocess as sp print(infer_organism.infer( file_1="./first_mate.fastq", min_match=2,factor=1, transcript_fasta="transcripts.fasta.zip" )) print(infer_organism.infer( file_1="./SRR13496438.fastq.gz", min_match=2,factor=1, transcript_fasta="transcripts.fasta.zip" )) ''' print(...
[ "infer_organism.infer" ]
[((56, 174), 'infer_organism.infer', 'infer_organism.infer', ([], {'file_1': '"""./first_mate.fastq"""', 'min_match': '(2)', 'factor': '(1)', 'transcript_fasta': '"""transcripts.fasta.zip"""'}), "(file_1='./first_mate.fastq', min_match=2, factor=1,\n transcript_fasta='transcripts.fasta.zip')\n", (76, 174), False, 'i...
# Copyright 2017 Neosapience, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ "tensorflow.reset_default_graph", "tensorflow.layers.flatten", "darkon.Gradcam.candidate_featuremap_op_names", "darkon.Gradcam", "tensorflow.reduce_sum", "tensorflow.placeholder", "tensorflow.Session", "numpy.any", "tensorflow.reduce_max", "tensorflow.global_variables_initializer", "tensorflow.l...
[((799, 856), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '(1, 2, 2, 3)', '"""x_placeholder"""'], {}), "(tf.float32, (1, 2, 2, 3), 'x_placeholder')\n", (813, 856), True, 'import tensorflow as tf\n'), ((865, 925), 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {'name': '"""y_placeholder"""', ...
import os import pwd import sys import argparse import subprocess try: # Location of run_with_reloader in the latest version of Werkzeug from werkzeug._reloader import run_with_reloader except ImportError: # Old location of run_with_reloader from werkzeug.serving import run_with_reloader def get_comm...
[ "argparse.ArgumentParser", "os.getuid", "os.path.join", "sys.stderr.write", "subprocess.call", "sys.exit", "os.walk" ]
[((403, 502), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Automatically re-run Python commands when files change."""'}), "(description=\n 'Automatically re-run Python commands when files change.')\n", (426, 502), False, 'import argparse\n'), ((1368, 1380), 'os.walk', 'os.walk', (['...
import torch from collections import namedtuple from itertools import product device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') def get_num_correct(preds, labels): """ calculates the number of correct predictions. Args: preds: the predictions tensor with shape (batch_size, ...
[ "torch.mean", "torch.tensor", "torch.cuda.is_available", "torch.cat" ]
[((1123, 1139), 'torch.tensor', 'torch.tensor', (['[]'], {}), '([])\n', (1135, 1139), False, 'import torch\n'), ((113, 138), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (136, 138), False, 'import torch\n'), ((1252, 1288), 'torch.cat', 'torch.cat', (['(all_preds, preds)'], {'dim': '(0)'}), '(...
import asyncio import logging logger = logging.getLogger(__name__) class TaskManager(object): """ Manage all running tasks and refresh gauge values. """ def __init__(self, refresh_period=30, refresh_enable=True, loop=None): self._loop = loop or asyncio.get_event_loop() self.tasks = [...
[ "logging.getLogger", "asyncio.sleep", "asyncio.Lock", "asyncio.ensure_future", "asyncio.gather", "asyncio.get_event_loop" ]
[((40, 67), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (57, 67), False, 'import logging\n'), ((507, 521), 'asyncio.Lock', 'asyncio.Lock', ([], {}), '()\n', (519, 521), False, 'import asyncio\n'), ((766, 810), 'asyncio.ensure_future', 'asyncio.ensure_future', (['coro'], {'loop': 'self....
import numpy as np import sys def micrograph2np(width,shift): r = int(width/shift-1) #I = np.load("../DATA_SETS/004773_ProtRelionRefine3D/kino.micrograph.numpy.npy") I = np.load("../DATA_SETS/004773_ProtRelionRefine3D/full_micrograph.stack_0001.numpy.npy") I = (I-I.mean())/I.std() N = int(I.shape[0]/sh...
[ "numpy.array", "numpy.load", "numpy.save" ]
[((180, 276), 'numpy.load', 'np.load', (['"""../DATA_SETS/004773_ProtRelionRefine3D/full_micrograph.stack_0001.numpy.npy"""'], {}), "(\n '../DATA_SETS/004773_ProtRelionRefine3D/full_micrograph.stack_0001.numpy.npy'\n )\n", (187, 276), True, 'import numpy as np\n'), ((541, 552), 'numpy.array', 'np.array', (['S'], ...
# python3 import re report = open("финансы 31.10.2017 по 20.11.2017", 'r') lines = report.readlines() foundHeader = False cardName = "" operationDateTime = "" for line in lines: if not foundHeader: if line.find('Фінансові трансакції за рахунком') != -1: foundHeader = True else: if line.find('Блокування по к...
[ "re.search" ]
[((441, 498), 're.search', 're.search', (['"""\\\\d\\\\d\\\\.\\\\d\\\\d\\\\.\\\\d\\\\d \\\\d\\\\d:\\\\d\\\\d"""', 'line'], {}), "('\\\\d\\\\d\\\\.\\\\d\\\\d\\\\.\\\\d\\\\d \\\\d\\\\d:\\\\d\\\\d', line)\n", (450, 498), False, 'import re\n'), ((552, 655), 're.search', 're.search', (['"""(\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d) +...
import os import warnings import torch.backends.cudnn as cudnn warnings.filterwarnings("ignore") from torch.utils.data import DataLoader from decaps import CapsuleNet from torch.optim import Adam import numpy as np from config import options import torch import torch.nn.functional as F from utils.eval_utils import bina...
[ "torch.nn.CrossEntropyLoss", "utils.loss_utils.ReconstructionLoss", "numpy.array", "torch.nn.functional.upsample_bilinear", "utils.loss_utils.MarginLoss", "os.path.exists", "dataset.chexpert_dataset.CheXpertDataSet.cuda", "config.options.load_model_path.split", "dataset.chexpert_dataset.CheXpertData...
[((63, 96), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (86, 96), False, 'import warnings\n'), ((650, 665), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (663, 665), False, 'import torch\n'), ((722, 733), 'numpy.zeros', 'np.zeros', (['(4)'], {}), '(4)\n', (730, 73...
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup(name='personal_assistant', version='0.0.1', author='<NAME>, <NAME>, <NAME>', author_email='<EMAIL>, <EMAIL>, <EMAIL>', d...
[ "setuptools.find_packages" ]
[((1098, 1124), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (1122, 1124), False, 'import setuptools\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Take a list of genome positions and return the dinucleotides around it. For each position, will generate a list of + strand dinucleotides and - strand dinucleotides. Created: 2017-07-27 12:02 Last modified: 2017-10-18 00:17 """ from __future__ import print_fun...
[ "fyrd.submit", "gzip.open", "os.path.join", "pandas.DataFrame.from_dict", "os.path.isfile", "bz2.BZ2File", "os.path.isdir", "bz2.open", "Bio.SeqIO.parse", "datetime.timedelta", "pandas.concat", "fyrd.wait" ]
[((1884, 1910), 'os.path.isdir', 'os.path.isdir', (['genome_file'], {}), '(genome_file)\n', (1897, 1910), False, 'import os\n'), ((4644, 4658), 'pandas.concat', 'pd.concat', (['dfs'], {}), '(dfs)\n', (4653, 4658), True, 'import pandas as pd\n'), ((6878, 6893), 'fyrd.wait', 'fyrd.wait', (['outs'], {}), '(outs)\n', (6887...
# -*- coding: utf-8 -*- from gevent import monkey, sleep, spawn monkey.patch_all() import logging.config from datetime import datetime from gevent.event import Event from restkit import ResourceError from retrying import retry from reports.brokers.databridge.base_worker import BaseWorker from reports.brokers.databr...
[ "gevent.event.Event", "gevent.sleep", "gevent.monkey.patch_all", "reports.brokers.databridge.utils.journal_context", "reports.brokers.databridge.utils.generate_req_id", "datetime.datetime.now", "reports.brokers.databridge.utils.more_tenders", "retrying.retry", "gevent.spawn" ]
[((65, 83), 'gevent.monkey.patch_all', 'monkey.patch_all', ([], {}), '()\n', (81, 83), False, 'from gevent import monkey, sleep, spawn\n'), ((1316, 1388), 'retrying.retry', 'retry', ([], {'stop_max_attempt_number': '(5)', 'wait_exponential_multiplier': 'retry_mult'}), '(stop_max_attempt_number=5, wait_exponential_multi...
"""Using flask to expose the main entry point as it makes it easier to expose an input thread. Individual threads will boot manually or attached through manual setup """ from multiprocessing import Process, Queue import flask from flask import Flask from core.run import run_core, thread_run from log import lo...
[ "core.run.thread_run", "log.log", "flask.Flask" ]
[((331, 346), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (336, 346), False, 'from flask import Flask\n'), ((661, 688), 'core.run.thread_run', 'thread_run', (['proc_q', 'options'], {}), '(proc_q, options)\n', (671, 688), False, 'from core.run import run_core, thread_run\n'), ((844, 888), 'log.log', 'log...
import sys from skimage import color, data import matplotlib.pyplot as plt from hogpylib.hog import HistogramOfGradients def main(args=None): from skimage.feature import hog PIXELS_PER_CELL = (8, 8) CELLS_PER_BLOCK = (2, 2) NUMBER_OF_BINS = ORIENTATIONS = 9 # NUMBER_OF_BINS VISUALISE = True ...
[ "hogpylib.hog.HistogramOfGradients", "skimage.data.astronaut", "matplotlib.pyplot.get_cmap", "skimage.feature.hog", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((455, 595), 'hogpylib.hog.HistogramOfGradients', 'HistogramOfGradients', ([], {'pixels_per_cell': 'PIXELS_PER_CELL', 'cells_per_block': 'CELLS_PER_BLOCK', 'num_of_bins': 'NUMBER_OF_BINS', 'visualise': 'VISUALISE'}), '(pixels_per_cell=PIXELS_PER_CELL, cells_per_block=\n CELLS_PER_BLOCK, num_of_bins=NUMBER_OF_BINS, ...
from trajminer import TrajectoryData from trajminer.preprocessing import TrajectorySegmenter data = TrajectoryData(attributes=['poi', 'hour', 'rating'], data=[[['Bakery', 8, 8.6], ['Work', 9, 8.9], ['Restaurant', 12, 7.7], ['Bank', 12, 5.6], ...
[ "trajminer.TrajectoryData" ]
[((102, 397), 'trajminer.TrajectoryData', 'TrajectoryData', ([], {'attributes': "['poi', 'hour', 'rating']", 'data': "[[['Bakery', 8, 8.6], ['Work', 9, 8.9], ['Restaurant', 12, 7.7], ['Bank', \n 12, 5.6], ['Work', 13, 8.9], ['Home', 19, 0]], [['Home', 8, 0], ['Mall',\n 10, 9.3], ['Home', 19, 0], ['Pub', 21, 9.5]]...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo, URL, Optional from models.profile import User class LoginForm(FlaskForm): username = StringField() password =...
[ "wtforms.validators.Email", "wtforms.validators.DataRequired", "wtforms.PasswordField", "wtforms.BooleanField", "wtforms.SubmitField", "wtforms.StringField", "wtforms.validators.EqualTo", "wtforms.validators.Length", "wtforms.validators.Regexp", "wtforms.ValidationError" ]
[((292, 305), 'wtforms.StringField', 'StringField', ([], {}), '()\n', (303, 305), False, 'from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError\n'), ((321, 336), 'wtforms.PasswordField', 'PasswordField', ([], {}), '()\n', (334, 336), False, 'from wtforms import StringField, Password...
# -*- coding: utf-8 -*- import obs import os,sys,time,datetime import logging class _ListAll(object): def __init__(self, marker=''): self.marker = marker self.is_Truncated = True self.entity = [] def _listresult(self): raise NotImplemented def __iter__(self): re...
[ "logging.getLogger" ]
[((968, 998), 'logging.getLogger', 'logging.getLogger', (['"""pyftpdlib"""'], {}), "('pyftpdlib')\n", (985, 998), False, 'import logging\n')]
#!/usr/bin/env python # coding: utf-8 """ Classification Using Hidden Markov Model ======================================== This is a demonstration using the implemented Hidden Markov model to classify multiple targets. We will attempt to classify 3 targets in an undefined region. Our sensor will be all-seeing, and p...
[ "numpy.array", "stonesoup.hypothesiser.categorical.CategoricalHypothesiser", "datetime.timedelta", "numpy.vstack", "stonesoup.initiator.categorical.SimpleCategoricalInitiator", "stonesoup.tracker.simple.MultiTargetTracker", "stonesoup.types.state.CategoricalState", "stonesoup.predictor.categorical.HMM...
[((2407, 2421), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (2419, 2421), False, 'from datetime import datetime, timedelta\n'), ((4603, 4653), 'numpy.array', 'np.array', (['[[0.99, 0.01], [0.5, 0.5], [0.01, 0.99]]'], {}), '([[0.99, 0.01], [0.5, 0.5], [0.01, 0.99]])\n', (4611, 4653), True, 'import numpy a...
from resources import analyze_str, calculate, CommandHandler, History from os import system, path, chdir if __name__ == '__main__': # * Lately thought of system for auto-updating pycalc :) print("Checking for possible updates...") chdir(f"{path.dirname(path.dirname(__file__))}") system("git pull") ...
[ "resources.calculate", "resources.History", "resources.CommandHandler", "os.path.dirname", "os.system" ]
[((297, 315), 'os.system', 'system', (['"""git pull"""'], {}), "('git pull')\n", (303, 315), False, 'from os import system, path, chdir\n'), ((489, 498), 'resources.History', 'History', ([], {}), '()\n', (496, 498), False, 'from resources import analyze_str, calculate, CommandHandler, History\n'), ((529, 562), 'resourc...
# Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "tensorflow.compat.v1.io.gfile.GFile", "json.loads", "tqdm.tqdm", "tensorflow.compat.v1.io.gfile.exists" ]
[((2085, 2107), 'tensorflow.compat.v1.io.gfile.GFile', 'gfile.GFile', (['data_file'], {}), '(data_file)\n', (2096, 2107), False, 'from tensorflow.compat.v1.io import gfile\n'), ((2119, 2139), 'tensorflow.compat.v1.io.gfile.GFile', 'gfile.GFile', (['kb_file'], {}), '(kb_file)\n', (2130, 2139), False, 'from tensorflow.co...
import datetime from .celery import celery from backend.news import hot_topics from backend.cache import sadd from backend.utils import time_now_formatted @celery.task(bind=True) def store_hot_topics(a): sadd(time_now_formatted('PESTO_SYSTEM_HOT_TOPICS'), hot_topics())
[ "backend.news.hot_topics", "backend.utils.time_now_formatted" ]
[((215, 260), 'backend.utils.time_now_formatted', 'time_now_formatted', (['"""PESTO_SYSTEM_HOT_TOPICS"""'], {}), "('PESTO_SYSTEM_HOT_TOPICS')\n", (233, 260), False, 'from backend.utils import time_now_formatted\n'), ((262, 274), 'backend.news.hot_topics', 'hot_topics', ([], {}), '()\n', (272, 274), False, 'from backend...
# Generated by Django 3.1.1 on 2020-09-07 19:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('actions', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='slackpost', name='time_stamp', ), ...
[ "django.db.migrations.RemoveField" ]
[((216, 281), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""slackpost"""', 'name': '"""time_stamp"""'}), "(model_name='slackpost', name='time_stamp')\n", (238, 281), False, 'from django.db import migrations\n'), ((326, 385), 'django.db.migrations.RemoveField', 'migrations.RemoveF...
import os import sys import zipfile import django sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings") django.setup() from museum_site.models import * # noqa: E402 from museum_site.constants import * # noqa: E402 def main(...
[ "os.environ.setdefault", "django.setup", "os.path.basename", "os.path.abspath", "os.system" ]
[((129, 195), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""museum.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'museum.settings')\n", (150, 195), False, 'import os\n'), ((196, 210), 'django.setup', 'django.setup', ([], {}), '()\n', (208, 210), False, 'import django\n'), ((6...
# pynadjust module for classes used across adj, apu and xyz files import geodepy.convert as gc class Station(object): def __init__(self, name=None, description=None, con=None, lat=None, lon=None, ohgt=None, ehgt=None, sd_e=None, sd_n=None, sd_u=None, hpu=None, vpu=None, smaj=None, smin=None, brg...
[ "geodepy.convert.geo2grid", "geodepy.convert.llh2xyz" ]
[((847, 888), 'geodepy.convert.llh2xyz', 'gc.llh2xyz', (['self.lat', 'self.lon', 'self.ehgt'], {}), '(self.lat, self.lon, self.ehgt)\n', (857, 888), True, 'import geodepy.convert as gc\n'), ((925, 956), 'geodepy.convert.geo2grid', 'gc.geo2grid', (['self.lat', 'self.lon'], {}), '(self.lat, self.lon)\n', (936, 956), True...
import urllib.request from bs4 import BeautifulSoup from assets import data from assets import functions from models.BaffleBoard import BaffleBoard page = functions.scrape_url(data.WEB_LINK) tableHead = page.find('span', {"id": "Yo-kai_Watch_3"}) table = tableHead.find_parent().find_next_sibling() tableRows = table.f...
[ "assets.functions.add_object_json_to_file", "assets.functions.scrape_url" ]
[((157, 192), 'assets.functions.scrape_url', 'functions.scrape_url', (['data.WEB_LINK'], {}), '(data.WEB_LINK)\n', (177, 192), False, 'from assets import functions\n'), ((1660, 1719), 'assets.functions.add_object_json_to_file', 'functions.add_object_json_to_file', (['baffleBoard', '"""test.json"""'], {}), "(baffleBoard...
#! /usr/bin/env python # This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) <NAME> <<EMAIL>> # Copyright (C) <NAME> <<EMAIL>> # This program is published under a GPLv2 license # scapy.contrib.description = GMLAN Utilities # scapy.contrib.status = loads import t...
[ "scapy.error.warning", "scapy.contrib.automotive.gm.gmlan.GMLAN_PM", "scapy.error.log_loading.info", "time.sleep", "scapy.contrib.automotive.gm.gmlan.GMLAN", "scapy.contrib.automotive.gm.gmlan.GMLAN_TD", "scapy.contrib.automotive.gm.gmlan.GMLAN_SA", "scapy.contrib.automotive.gm.gmlan.GMLAN_RMBA", "s...
[((852, 1025), 'scapy.error.log_loading.info', 'log_loading.info', (['""""conf.contribs[\'GMLAN\'][\'treat-response-pending-as-answer\']" set to True). This is required by the GMLAN-Utils module to operate correctly."""'], {}), '(\n \'"conf.contribs[\\\'GMLAN\\\'][\\\'treat-response-pending-as-answer\\\']" set to Tr...
""" Create a 3D mask from labelled objects """ import os import xarray as xr def create_mask_from_objects(objects): return objects != 0 if __name__ == "__main__": import argparse argparser = argparse.ArgumentParser(description=__doc__) argparser.add_argument("object_file", type=str) args = a...
[ "os.path.exists", "xarray.open_dataarray", "argparse.ArgumentParser" ]
[((209, 253), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (232, 253), False, 'import argparse\n'), ((697, 746), 'xarray.open_dataarray', 'xr.open_dataarray', (['fn_objects'], {'decode_times': '(False)'}), '(fn_objects, decode_times=False)\n', (714, ...
from app.article import Articles from flask import render_template,request,redirect,url_for from . import main from ..request import get_article,get_news from app.request import search_article # Views @main.route('/') def index(): ''' View root page function that returns the index page and its data ''' ...
[ "flask.render_template", "flask.request.args.get", "app.request.search_article", "flask.url_for" ]
[((392, 425), 'flask.request.args.get', 'request.args.get', (['"""article_query"""'], {}), "('article_query')\n", (408, 425), False, 'from flask import render_template, request, redirect, url_for\n'), ((906, 939), 'flask.request.args.get', 'request.args.get', (['"""article_query"""'], {}), "('article_query')\n", (922, ...
import sqlite3 import time class sqliteConnector: def __init__(self, dbpath): self.__dbpath = dbpath self.__connection = sqlite3.connect(self.__dbpath) # initialize 'connection' (actually, open file) self.__cursor = self.__connection.cursor() def add_user(self, username, usermail, us...
[ "time.ctime", "sqlite3.connect" ]
[((143, 173), 'sqlite3.connect', 'sqlite3.connect', (['self.__dbpath'], {}), '(self.__dbpath)\n', (158, 173), False, 'import sqlite3\n'), ((484, 496), 'time.ctime', 'time.ctime', ([], {}), '()\n', (494, 496), False, 'import time\n'), ((2732, 2744), 'time.ctime', 'time.ctime', ([], {}), '()\n', (2742, 2744), False, 'imp...
#!/usr/bin/env python3 import base64 import os import sys import datetime import dotenv import requests from flask import Flask, render_template, session, redirect, url_for, request, flash sys.path.append(os.path.abspath('src')) from utils import utc_to_local from client import Client import runner os.chdir(os.pat...
[ "flask.render_template", "flask.request.args.get", "requests.post", "flask.flash", "flask.session.get", "flask.Flask", "datetime.datetime.utcnow", "os.urandom", "flask.request.form.getlist", "utils.utc_to_local", "dotenv.load_dotenv", "flask.url_for", "client.Client", "os.path.abspath", ...
[((392, 425), 'dotenv.load_dotenv', 'dotenv.load_dotenv', (['"""secrets.env"""'], {}), "('secrets.env')\n", (410, 425), False, 'import dotenv\n'), ((433, 448), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (438, 448), False, 'from flask import Flask, render_template, session, redirect, url_for, request, f...
from flask import Flask, jsonify, request from blockchain.chain import BlockChain from argparse import ArgumentParser app = Flask(__name__) blockchain = BlockChain() @app.route('/chain', methods=['GET']) def get_chain(): result = { 'id': blockchain.chain_id, 'chain': [blk.to_json() for blk in ...
[ "argparse.ArgumentParser", "flask.Flask", "flask.request.get_json", "blockchain.chain.BlockChain", "flask.jsonify" ]
[((127, 142), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (132, 142), False, 'from flask import Flask, jsonify, request\n'), ((157, 169), 'blockchain.chain.BlockChain', 'BlockChain', ([], {}), '()\n', (167, 169), False, 'from blockchain.chain import BlockChain\n'), ((399, 414), 'flask.jsonify', 'jsonify...
#! *-* coding: utf-8 *-* #!/usr/bin/env python """ A simple scraper for recording the power supply of velodyne LiDAR, by getting the `diag.json` files. @author <NAME> @file rc_velo_vol.py """ import argparse import math import time import requests import json import logging import os from volt_temp import Volt_temp ...
[ "logging.getLogger", "volt_temp.Volt_temp", "os.path.exists", "argparse.ArgumentParser", "os.makedirs", "logging.Formatter", "os.path.join", "requests.get", "os.getcwd", "time.sleep", "logging.FileHandler", "time.time" ]
[((1230, 1299), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Velodyne LiDAR voltage logger."""'}), "(description='Velodyne LiDAR voltage logger.')\n", (1253, 1299), False, 'import argparse\n'), ((1793, 1812), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (1810, 1812), Fal...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from torchvision.models import resnet50, resnet101, resnext101_32x8d import torch import torch.nn as nn import random import numpy as np clas...
[ "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Dropout", "torch.nn.Sequential", "torch.nn.Conv2d", "torch.no_grad" ]
[((901, 924), 'torch.nn.Sequential', 'nn.Sequential', (['*modules'], {}), '(*modules)\n', (914, 924), True, 'import torch.nn as nn\n'), ((1118, 1185), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_dim', 'embed_size'], {'kernel_size': '(1)', 'padding': '(0)', 'bias': '(False)'}), '(in_dim, embed_size, kernel_size=1, padding=0, ...
from setuptools import setup setup(name='rl_dobot', version='0.1', )
[ "setuptools.setup" ]
[((29, 66), 'setuptools.setup', 'setup', ([], {'name': '"""rl_dobot"""', 'version': '"""0.1"""'}), "(name='rl_dobot', version='0.1')\n", (34, 66), False, 'from setuptools import setup\n')]
from django import template import logging from django.conf import settings from django.template.defaultfilters import stringfilter from django_cradmin import css_icon_map register = template.Library() log = logging.getLogger(__name__) @register.simple_tag @stringfilter def cradmin_icon(iconkey): """ Retu...
[ "logging.getLogger", "django.template.Library" ]
[((187, 205), 'django.template.Library', 'template.Library', ([], {}), '()\n', (203, 205), False, 'from django import template\n'), ((212, 239), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (229, 239), False, 'import logging\n')]
from os.path import join, exists import datatable as dt from rs_datasets.data_loader import download_dataset from rs_datasets.generic_dataset import Dataset, safe class YooChoose(Dataset): def __init__(self, path: str = None): """ :param path: folder which is used to download dataset to ...
[ "os.path.exists", "os.path.join" ]
[((465, 500), 'os.path.join', 'join', (['self.data_folder', '"""yoochoose"""'], {}), "(self.data_folder, 'yoochoose')\n", (469, 500), False, 'from os.path import join, exists\n'), ((516, 530), 'os.path.exists', 'exists', (['folder'], {}), '(folder)\n', (522, 530), False, 'from os.path import join, exists\n'), ((1289, 1...
from ..cards import Card, Deck from scipy.stats import bernoulli from random import randint, shuffle class Pile(object) : def __init__(self): self.cards = [] self.owner = None def __getitem__(self, index): if index < len(self.cards) : return self.cards[-1 - index] ...
[ "scipy.stats.bernoulli.rvs", "random.shuffle", "random.randint" ]
[((3337, 3366), 'random.randint', 'randint', (['(0)', '(self.nPlayers - 1)'], {}), '(0, self.nPlayers - 1)\n', (3344, 3366), False, 'from random import randint, shuffle\n'), ((2066, 2103), 'random.randint', 'randint', (['self.speed[0]', 'self.speed[1]'], {}), '(self.speed[0], self.speed[1])\n', (2073, 2103), False, 'fr...
from dagster import pipeline, ModeDefinition from .resources import query_vm_resources from .utilization import ( query_cpu_utilization, normalize_cpu_utilization, query_mem_utilization, normalize_mem_utilization, query_disk_utilization, normalize_disk_utilization, default_azure_monitor_context ) from ....
[ "dagster.ModeDefinition" ]
[((578, 656), 'dagster.ModeDefinition', 'ModeDefinition', ([], {'resource_defs': "{'azure_monitor': default_azure_monitor_context}"}), "(resource_defs={'azure_monitor': default_azure_monitor_context})\n", (592, 656), False, 'from dagster import pipeline, ModeDefinition\n')]
""" Read in and validate associations. """ ### IMPORTS import csv import re ### CONSTANTS & DEFINES FIRST_CAP_RE = re.compile ('(.)([A-Z][a-z]+)') OTHER_CAP_RE = re.compile ('([a-z0-9])([A-Z])') UNDERSCORE_RE = re.compile ('_+') DATA_FLD_NAMES = ( 'snp_id', 'snp_locn_chr', 'snp_locn_posn', 'snp_base_w...
[ "csv.DictReader", "re.compile" ]
[((120, 150), 're.compile', 're.compile', (['"""(.)([A-Z][a-z]+)"""'], {}), "('(.)([A-Z][a-z]+)')\n", (130, 150), False, 'import re\n'), ((167, 198), 're.compile', 're.compile', (['"""([a-z0-9])([A-Z])"""'], {}), "('([a-z0-9])([A-Z])')\n", (177, 198), False, 'import re\n'), ((216, 232), 're.compile', 're.compile', (['"...
#!/usr/local/bin/python from __future__ import print_function import sys import time import serial import pylt pusb = dict() ver = "Prologix GPIB-USB Controller version 6.95" hwset = ( "addr", "auto", "eoi", "eos", "eot_enable", "eot_char", "read_tmo_ms" ) def def_set(setting): setting["auto"] = 0...
[ "pylt.pylt.__init__", "serial.Serial", "time.time" ]
[((680, 730), 'serial.Serial', 'serial.Serial', (["('/dev/' + name)", '(115200)'], {'timeout': '(0.5)'}), "('/dev/' + name, 115200, timeout=0.5)\n", (693, 730), False, 'import serial\n'), ((2825, 2849), 'pylt.pylt.__init__', 'pylt.pylt.__init__', (['self'], {}), '(self)\n', (2843, 2849), False, 'import pylt\n'), ((918,...
import time import sys import zmq import pickle from plico.utils.decorator import cacheResult, override, returnsNone from plico.utils.logger import Logger from plico.utils.barrier import Barrier, FunctionPredicate, BarrierTimeout from plico.utils.constants import Constants from plico.rpc.abstract_remote_procedure_call ...
[ "plico.utils.logger.Logger.of", "plico.utils.barrier.FunctionPredicate.create", "pickle.dumps", "zmq.Poller", "time.time", "pickle.loads", "plico.utils.barrier.Barrier", "zmq.Context" ]
[((640, 653), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (651, 653), False, 'import zmq\n'), ((677, 696), 'plico.utils.logger.Logger.of', 'Logger.of', (['"""ZmqRPC"""'], {}), "('ZmqRPC')\n", (686, 696), False, 'from plico.utils.logger import Logger\n'), ((840, 895), 'pickle.dumps', 'pickle.dumps', (['pickableObjec...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from typing import ( Any, Mapping, MutableMapping, MutableSequence, Sequence, Text, ) import click import pathlib from numbers import Integral, Real from frozendict import FrozenOrderedDict def load(f) -> MutableMapping: p = pathlib.PureP...
[ "yaml.dump", "jprops.store_properties", "json.dumps", "click.File", "yaml.load", "ruamel.yaml.YAML", "pathlib.PurePath", "yaml.indent", "click.Path", "frozendict.FrozenOrderedDict", "json.load", "click.command", "jprops.load_properties" ]
[((4765, 4780), 'click.command', 'click.command', ([], {}), '()\n', (4778, 4780), False, 'import click\n'), ((307, 331), 'pathlib.PurePath', 'pathlib.PurePath', (['f.name'], {}), '(f.name)\n', (323, 331), False, 'import pathlib\n'), ((862, 884), 'yaml.load', 'yaml.load', (['f'], {}), '(f, **kwargs)\n', (871, 884), Fals...
from cs229_project_scenario import ObstacleAvoidanceScenario import numpy as np import gym import time from matplotlib import pyplot as plt if __name__ == "__main__": oas = ObstacleAvoidanceScenario() #oas = gym.make() dt = 0.1 u = (0., 0.) total_reward = 0. plot_reward = [] fo...
[ "cs229_project_scenario.ObstacleAvoidanceScenario", "matplotlib.pyplot.plot", "matplotlib.pyplot.savefig", "time.sleep" ]
[((185, 212), 'cs229_project_scenario.ObstacleAvoidanceScenario', 'ObstacleAvoidanceScenario', ([], {}), '()\n', (210, 212), False, 'from cs229_project_scenario import ObstacleAvoidanceScenario\n'), ((1131, 1152), 'matplotlib.pyplot.plot', 'plt.plot', (['plot_reward'], {}), '(plot_reward)\n', (1139, 1152), True, 'from ...
""" Implement Fuzzy set relations like - Max-Min and Max-Product """ import sys from textwrap import dedent from typing import List from .fuzzy_sets import max_min, max_product def get_output(x: List[List[float]]) -> str: res = "\n ".join(str(i) for i in x) return f"[{res}]" def main(): choices = ["Max...
[ "textwrap.dedent", "sys.exit" ]
[((1230, 1241), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1238, 1241), False, 'import sys\n'), ((387, 503), 'textwrap.dedent', 'dedent', (['"""\n 1. Max-Min\n 2. Max-Product\n Enter operation: """'], {}), '(\n """\n 1. Max-Min\n 2. Max...
#!/usr/bin/env python3 import numpy as np import os import sys import argparse import glob import time import onnx import onnxruntime import cv2 import caffe from cvi_toolkit.model import OnnxModel from cvi_toolkit.utils.yolov3_util import preprocess, postprocess_v2, postprocess_v3, postprocess_v4_tiny, draw def chec...
[ "cv2.imwrite", "cvi_toolkit.utils.yolov3_util.draw", "numpy.savez", "os.path.exists", "onnx.save", "argparse.ArgumentParser", "onnxruntime.InferenceSession", "os.path.isfile", "cvi_toolkit.utils.yolov3_util.preprocess", "numpy.append", "numpy.array", "onnx.helper.ValueInfoProto", "onnx.load"...
[((669, 727), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Eval YOLO networks."""'}), "(description='Eval YOLO networks.')\n", (692, 727), False, 'import argparse\n'), ((2620, 2647), 'cv2.imread', 'cv2.imread', (['args.input_file'], {}), '(args.input_file)\n', (2630, 2647), False, 'imp...
import pickle import time import numpy as np from macrel import graphs from macrel import vast11data as vast INTERVAL_SEC = 900.0 N = len(vast.NODES) SERVICES = { 1: "Mux", 17: "Quote", 21: "FTP", 22: "SSH", 23: "Telnet", 25: "SMTP", 53: "DNS", 80: "HTTP", 88: "Kerberos", ...
[ "macrel.vast11data.FWEventParser", "numpy.asarray", "macrel.vast11data.NODE_BY_IP.get", "time.gmtime", "macrel.graphs.ConnectionTally" ]
[((575, 600), 'macrel.graphs.ConnectionTally', 'graphs.ConnectionTally', (['N'], {}), '(N)\n', (597, 600), False, 'from macrel import graphs\n'), ((1344, 1364), 'macrel.vast11data.FWEventParser', 'vast.FWEventParser', ([], {}), '()\n', (1362, 1364), True, 'from macrel import vast11data as vast\n'), ((1466, 1489), 'time...
# Copyright (c) 2017-2021, <NAME> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
[ "unittest.defaultTestLoader.loadTestsFromTestCase", "hypothesis.strategies.binary", "hypothesis.strategies.sampled_from", "unittest.TestSuite", "hypothesis.strategies.text", "hypothesis.strategies.none", "hypothesis.strategies.integers", "hypothesis.settings", "unittest.TextTestRunner" ]
[((1162, 1170), 'hypothesis.strategies.binary', 'binary', ([], {}), '()\n', (1168, 1170), False, 'from hypothesis.strategies import binary, integers, none, one_of, sampled_from, text\n'), ((1344, 1352), 'hypothesis.strategies.binary', 'binary', ([], {}), '()\n', (1350, 1352), False, 'from hypothesis.strategies import b...
# -*- coding: utf-8 -*- import scrapy import json import time from filtering.items import FilteringItem class AliTechSpider(scrapy.Spider): name = 'ali_tech' alias = '阿里技术' group = '技术' def start_requests(self): headers = { 'User-Agent':'Mozilla/5.0 (Linux; Android 5.0; SM-G900P...
[ "filtering.items.FilteringItem", "time.strptime", "scrapy.Request" ]
[((693, 708), 'filtering.items.FilteringItem', 'FilteringItem', ([], {}), '()\n', (706, 708), False, 'from filtering.items import FilteringItem\n'), ((518, 579), 'scrapy.Request', 'scrapy.Request', ([], {'url': 'url', 'headers': 'headers', 'callback': 'self.parse'}), '(url=url, headers=headers, callback=self.parse)\n',...
import types import threading import time __all__ = 'suspend', 'suspending', 'start', 'Continuation', _CONT_REQUEST = object() @types.coroutine def suspend(fn, *args): """Suspend the currently running coroutine and invoke FN with the continuation.""" cont = yield _CONT_REQUEST fn(cont, *args) cont_re...
[ "threading.current_thread", "time.sleep" ]
[((1901, 1927), 'threading.current_thread', 'threading.current_thread', ([], {}), '()\n', (1925, 1927), False, 'import threading\n'), ((3119, 3145), 'threading.current_thread', 'threading.current_thread', ([], {}), '()\n', (3143, 3145), False, 'import threading\n'), ((2147, 2165), 'time.sleep', 'time.sleep', (['(0.0001...
import sys from pathlib import Path import os import torch from torch.optim import Adam import torch.nn as nn import torch.nn.functional as F import numpy as np from networks.critic import Critic from networks.actor import NoisyActor, CategoricalActor, GaussianActor base_dir = Path(__file__).resolve().parent.parent....
[ "torch.nn.init.constant_", "torch.nn.utils.clip_grad_norm_", "numpy.log", "torch.min", "numpy.array", "torch.sum", "networks.actor.NoisyActor", "os.path.exists", "networks.actor.CategoricalActor", "pathlib.Path", "torch.nn.init.xavier_uniform_", "torch.mean", "networks.actor.GaussianActor", ...
[((569, 616), 'torch.nn.init.xavier_uniform_', 'torch.nn.init.xavier_uniform_', (['m.weight'], {'gain': '(1)'}), '(m.weight, gain=1)\n', (598, 616), False, 'import torch\n'), ((625, 659), 'torch.nn.init.constant_', 'torch.nn.init.constant_', (['m.bias', '(0)'], {}), '(m.bias, 0)\n', (648, 659), False, 'import torch\n')...
import subprocess import importlib import os import inspect import logging import pydub import pydub.playback from src import utils from src.handlers import get_festival_tts, get_greeting event_logger = logging.getLogger("eventLogger") class AlarmBuilder: def __init__(self, config): self.config = con...
[ "logging.getLogger", "inspect.getmembers", "importlib.import_module", "pydub.playback.play", "subprocess.Popen", "pydub.AudioSegment.from_mp3", "src.handlers.get_greeting.Greeting", "os.path.join", "src.handlers.get_festival_tts.FestivalTTSManager" ]
[((207, 239), 'logging.getLogger', 'logging.getLogger', (['"""eventLogger"""'], {}), "('eventLogger')\n", (224, 239), False, 'import logging\n'), ((3068, 3119), 'src.handlers.get_greeting.Greeting', 'get_greeting.Greeting', (['section', 'alarm_time_override'], {}), '(section, alarm_time_override)\n', (3089, 3119), Fals...
# Copyright 2016, 2019 <NAME>. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "factory.fuzzy.FuzzyChoice", "factory.fuzzy.FuzzyInteger" ]
[((919, 970), 'factory.fuzzy.FuzzyChoice', 'FuzzyChoice', ([], {'choices': '[1001, 2002, 3003, 4747, 9999]'}), '(choices=[1001, 2002, 3003, 4747, 9999])\n', (930, 970), False, 'from factory.fuzzy import FuzzyChoice, FuzzyInteger\n'), ((985, 1030), 'factory.fuzzy.FuzzyChoice', 'FuzzyChoice', ([], {'choices': '[1000, 200...
# Information: https://clover.coex.tech/en/simple_offboard.html#navigateglobal import rospy from clover import srv from std_srvs.srv import Trigger import math rospy.init_node('flight') get_telemetry = rospy.ServiceProxy('get_telemetry', srv.GetTelemetry) navigate = rospy.ServiceProxy('navigate', srv.Navigate) navig...
[ "rospy.is_shutdown", "rospy.init_node", "rospy.ServiceProxy", "math.sqrt", "rospy.sleep", "math.isnan" ]
[((162, 187), 'rospy.init_node', 'rospy.init_node', (['"""flight"""'], {}), "('flight')\n", (177, 187), False, 'import rospy\n'), ((205, 258), 'rospy.ServiceProxy', 'rospy.ServiceProxy', (['"""get_telemetry"""', 'srv.GetTelemetry'], {}), "('get_telemetry', srv.GetTelemetry)\n", (223, 258), False, 'import rospy\n'), ((2...
"""starts a sync remote server """ import os import getpass import pathlib import logging import click from . import cli import paramiko import paramiko.sftp_client import syncro.support as support import syncro.cli as cli logger = logging.getLogger(__name__) def add_arguments(parser): parser.add_argument("h...
[ "logging.getLogger", "click.argument", "paramiko.sftp_client.SFTPClient.from_transport", "syncro.support.shell", "pathlib.Path", "click.option", "paramiko.client.SSHClient", "getpass.getuser", "click.command", "syncro.support.remote", "syncro.cli.standard" ]
[((237, 264), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (254, 264), False, 'import logging\n'), ((1014, 1029), 'click.command', 'click.command', ([], {}), '()\n', (1027, 1029), False, 'import click\n'), ((1031, 1053), 'click.argument', 'click.argument', (['"""host"""'], {}), "('host'...
from django.urls import path from . import views as user_views urlpatterns = [ path('staff_admin/register/', user_views.register, name='register'), path('profile/', user_views.profile, name='profile'), path( 'update_meal_categories/', user_views.edit_meal_cats, name='edit_meal_cats'), p...
[ "django.urls.path" ]
[((84, 151), 'django.urls.path', 'path', (['"""staff_admin/register/"""', 'user_views.register'], {'name': '"""register"""'}), "('staff_admin/register/', user_views.register, name='register')\n", (88, 151), False, 'from django.urls import path\n'), ((157, 209), 'django.urls.path', 'path', (['"""profile/"""', 'user_view...
"""The module for running tgcf in past mode. - past mode can only operate with a user account. - past mode deals with all existing messages. """ import asyncio import logging import time from telethon import TelegramClient from telethon.errors.rpcerrorlist import FloodWaitError from telethon.tl.custom.message import...
[ "tgcf.config.from_to.items", "tgcf.plugins.apply_plugins", "tgcf.config.write_config", "tgcf.storage.stored.get", "tgcf.storage.DummyEvent", "logging.info", "time.sleep", "logging.exception", "tgcf.utils.send_message", "asyncio.sleep", "tgcf.storage.EventUid", "tgcf.config.load_from_to", "te...
[((693, 734), 'telethon.TelegramClient', 'TelegramClient', (['SESSION', 'API_ID', 'API_HASH'], {}), '(SESSION, API_ID, API_HASH)\n', (707, 734), False, 'from telethon import TelegramClient\n'), ((777, 828), 'tgcf.config.load_from_to', 'config.load_from_to', (['client', 'config.CONFIG.forwards'], {}), '(client, config.C...
# Copyright 2018 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
[ "numpy.mean", "matplotlib.pylab.xlim", "matplotlib.pylab.savefig", "numpy.sqrt", "matplotlib.pylab.errorbar", "sys.exit", "matplotlib.pylab.figure", "matplotlib.pylab.axhline", "matplotlib.pylab.ylim", "matplotlib.pylab.legend", "IPython.embed", "matplotlib.pylab.xlabel", "matplotlib.pylab.s...
[((930, 973), 'numpy.loadtxt', 'np.loadtxt', (['"""results/callibration_mmds.csv"""'], {}), "('results/callibration_mmds.csv')\n", (940, 973), True, 'import numpy as np\n'), ((998, 1024), 'numpy.mean', 'np.mean', (['callibration_mmds'], {}), '(callibration_mmds)\n', (1005, 1024), True, 'import numpy as np\n'), ((1250, ...
from config import config import os print('env DBURL:', os.environ.get('DB_URL')) print('config:', config.db_url)
[ "os.environ.get" ]
[((57, 81), 'os.environ.get', 'os.environ.get', (['"""DB_URL"""'], {}), "('DB_URL')\n", (71, 81), False, 'import os\n')]