code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
from copy import copy from typing import List class BoboTransition: """A :code:`bobocep` state transition. :param state_names: The names of states to which a transition can be made, defaults to an empty list. :type state_names: List[str], optional :param strict: Whether stric...
[ "copy.copy" ]
[((1320, 1342), 'copy.copy', 'copy', (['self.state_names'], {}), '(self.state_names)\n', (1324, 1342), False, 'from copy import copy\n')]
'''Trains two recurrent neural networks based upon a story and a question. The resulting merged vector is then queried to answer a range of bAbI tasks. The results are comparable to those for an LSTM model provided in Weston et al.: "Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks" http://arxiv...
[ "numpy.random.seed", "re.split", "keras.preprocessing.sequence.pad_sequences", "keras.layers.Input", "keras.layers.add", "keras.layers.Dropout", "functools.reduce", "keras.models.Model", "keras.utils.data_utils.get_file", "keras.layers.Dense", "numpy.array", "keras.layers.Embedding", "tarfil...
[((767, 787), 'numpy.random.seed', 'np.random.seed', (['(1337)'], {}), '(1337)\n', (781, 787), True, 'import numpy as np\n'), ((4024, 4042), 'tarfile.open', 'tarfile.open', (['path'], {}), '(path)\n', (4036, 4042), False, 'import tarfile\n'), ((5335, 5385), 'keras.layers.Input', 'layers.Input', ([], {'shape': '(story_m...
import datetime from django.shortcuts import render, get_object_or_404 from rest_framework import views, status # Create your views here. from rest_framework.response import Response from .models import LogObject, LogInstance, LogEvolution, ErrorLogObject, UserInteraction from .serializers import ErrorLogSerializer, ...
[ "django.shortcuts.get_object_or_404", "rest_framework.response.Response", "datetime.datetime.now" ]
[((461, 497), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['self.model'], {'id': 'id'}), '(self.model, id=id)\n', (478, 497), False, 'from django.shortcuts import render, get_object_or_404\n'), ((557, 602), 'rest_framework.response.Response', 'Response', (['ser.data'], {'status': 'status.HTTP_200_OK'}),...
import new from selenium.webdriver.support.select import Select from pages.datasenderpage.data_sender_locator import SMARTPHONE_NAV from pages.page import Page from pages.smartphoneinstructionpage.smart_phone_instruction_page import SmartPhoneInstructionPage from pages.submissionlogpage.submission_log_page import Submi...
[ "selenium.webdriver.support.select.Select", "pages.warningdialog.warning_dialog.WarningDialog", "pages.submissionlogpage.submission_log_page.SubmissionLogPage", "pages.smartphoneinstructionpage.smart_phone_instruction_page.SmartPhoneInstructionPage", "pages.page.Page.__init__" ]
[((635, 662), 'pages.page.Page.__init__', 'Page.__init__', (['self', 'driver'], {}), '(self, driver)\n', (648, 662), False, 'from pages.page import Page\n'), ((2680, 2706), 'pages.warningdialog.warning_dialog.WarningDialog', 'WarningDialog', (['self.driver'], {}), '(self.driver)\n', (2693, 2706), False, 'from pages.war...
import unittest import os.path import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from .param import * class ParamTestCase(unittest.TestCase): def test_int_param(self): p = IntParam(30,1,100) for i in range(20): self.assertIsInstance(p.value, int) p = p.mutat...
[ "unittest.main" ]
[((587, 643), 'unittest.main', 'unittest.main', ([], {'module': '"""pbt"""', 'defaultTest': '"""ParamTestCase"""'}), "(module='pbt', defaultTest='ParamTestCase')\n", (600, 643), False, 'import unittest\n')]
# -*- coding: utf-8 -*- """ Microsoft-Windows-AxInstallService GUID : dab3b18c-3c0f-43e8-80b1-e44bc0dad901 """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid fro...
[ "construct.Struct", "etl.parsers.etw.core.guid" ]
[((519, 546), 'construct.Struct', 'Struct', (["('Message' / WString)"], {}), "('Message' / WString)\n", (525, 546), False, 'from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct\n'), ((711, 738), 'construct.Struct', 'Struct', (["('Message' / WString)...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.decomposition import PCA import csv # RUN: visualize(path1 = "170401_activity_data_UABC_L2_building_2_LOS\Input\input_fall_170310_1136_01.csv") def moving_average(data, window_size): window= np.ones(int(window_size))/float(window...
[ "matplotlib.pyplot.title", "pandas.read_csv", "numpy.empty", "matplotlib.pyplot.figure", "numpy.convolve", "matplotlib.pyplot.specgram", "numpy.empty_like", "numpy.linalg.eig", "matplotlib.pyplot.colorbar", "numpy.cov", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "matplotlib.pyplot.y...
[((338, 371), 'numpy.convolve', 'np.convolve', (['data', 'window', '"""same"""'], {}), "(data, window, 'same')\n", (349, 371), True, 'import numpy as np\n'), ((470, 507), 'numpy.empty', 'np.empty', (['[0, window_size, 90]', 'float'], {}), '([0, window_size, 90], float)\n', (478, 507), True, 'import numpy as np\n'), ((5...
# Generated by Django 3.1.3 on 2021-01-16 16:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hackathon', '0026_hackproject_technologies_used'), ] operations = [ migrations.AddField( model_name='hackproject', n...
[ "django.db.models.URLField" ]
[((363, 504), 'django.db.models.URLField', 'models.URLField', ([], {'blank': '(True)', 'default': '""""""', 'help_text': '"""URL for an image displayed on the team\'s page next to the project information."""'}), '(blank=True, default=\'\', help_text=\n "URL for an image displayed on the team\'s page next to the proj...
from setuptools import setup, find_packages setup( name="rweb_datatable", version="0.1.17", author="<NAME>", author_email="<EMAIL>", url="https://github.com/stevemccartney/rweb_datatable", packages=find_packages(), license="Apache-2.0", description="Server-side datatables rendered to H...
[ "setuptools.find_packages" ]
[((224, 239), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (237, 239), False, 'from setuptools import setup, find_packages\n')]
from __future__ import annotations import isubank import isulogger BANK_ENDPOINT = "bank_endpoint" BANK_APPID = "bank_appid" LOG_ENDPOINT = "log_endpoint" LOG_APPID = "log_appid" def set_setting(db, k: str, v: str): cur = db.cursor() cur.execute( "INSERT INTO setting (name, val) VALUES (%s, %s) ON ...
[ "isubank.IsuBank", "isulogger.IsuLogger" ]
[((657, 689), 'isubank.IsuBank', 'isubank.IsuBank', (['endpoint', 'appid'], {}), '(endpoint, appid)\n', (672, 689), False, 'import isubank\n'), ((807, 843), 'isulogger.IsuLogger', 'isulogger.IsuLogger', (['endpoint', 'appid'], {}), '(endpoint, appid)\n', (826, 843), False, 'import isulogger\n')]
from django.views.generic import DetailView, FormView from django.utils.translation import ugettext_lazy as _ from django.http.response import HttpResponseRedirect from django.urls import reverse from dal import autocomplete from core import generic_views from comments.views import CommentViewGeneric from . import mo...
[ "django.urls.reverse", "django.utils.translation.ugettext_lazy" ]
[((569, 582), 'django.utils.translation.ugettext_lazy', '_', (['"""Add news"""'], {}), "('Add news')\n", (570, 582), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((1475, 1484), 'django.utils.translation.ugettext_lazy', '_', (['"""news"""'], {}), "('news')\n", (1476, 1484), True, 'from django.util...
"""gsumathss URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
[ "gonderiler.views.anasayfa.as_view", "gonderiler.views.User_Profile.as_view", "gonderiler.views.kayit.as_view", "gonderiler.views.cikis.as_view", "gonderiler.views.Change_Your_Password.as_view", "django.urls.path", "gonderiler.views.see_announcements.as_view", "gonderiler.views.MYFLOW.as_view", "gon...
[((2081, 2142), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (2087, 2142), False, 'from django.conf.urls.static import static\n'), ((2010, 2073), 'django.conf.urls.static.static', 'static', ([...
''' Author: <NAME> Project: Jisho grabber Description: GUI for searching and adding fields to a list of fields that will be used to create Anki notes. ''' import wx import wx.lib.scrolledpanel from word_grabber import WordSearch import genanki from utils import kana, kanj...
[ "wx.StaticLine", "wx.Choice", "wx.BoxSizer", "genanki.Package", "word_grabber.WordSearch", "utils.kana", "wx.StaticText", "wx.Button", "wx.TextCtrl", "wx.App", "utils.kanji", "wx.Font" ]
[((450, 464), 'word_grabber.WordSearch', 'WordSearch', (['""""""'], {}), "('')\n", (460, 464), False, 'from word_grabber import WordSearch\n'), ((9881, 9889), 'wx.App', 'wx.App', ([], {}), '()\n', (9887, 9889), False, 'import wx\n'), ((713, 737), 'wx.BoxSizer', 'wx.BoxSizer', (['wx.VERTICAL'], {}), '(wx.VERTICAL)\n', (...
# ***************************************************************** # Copyright 2015 MIT Lincoln Laboratory # Project: SPAR # Authors: SY # Description: IBM TA2 gate superclass test # # Modifications: # Date Name Modification # ---- ---- ----...
[ "ibm_gate.IBMGate", "ibm_circuit.IBMCircuit", "ibm_wire.IBMInputWire" ]
[((767, 783), 'ibm_circuit.IBMCircuit', 'ic.IBMCircuit', (['L'], {}), '(L)\n', (780, 783), True, 'import ibm_circuit as ic\n'), ((797, 827), 'ibm_wire.IBMInputWire', 'iw.IBMInputWire', (['"""w1"""', 'circuit'], {}), "('w1', circuit)\n", (812, 827), True, 'import ibm_wire as iw\n'), ((841, 871), 'ibm_wire.IBMInputWire',...
""" Set of tests for thalamus mass models. """ import unittest import numpy as np import xarray as xr from jitcdde import jitcdde_input from neurolib.models.multimodel.builder.model_input import ZeroInput from neurolib.models.multimodel.builder.thalamus import ( TCR_DEFAULT_PARAMS, TRN_DEFAULT_PARAMS, Tha...
[ "unittest.main", "numpy.corrcoef", "numpy.greater", "numpy.isnan", "neurolib.models.multimodel.builder.thalamus.ThalamocorticalMass", "neurolib.models.multimodel.builder.thalamus.ThalamicReticularMass", "numpy.arange", "neurolib.models.multimodel.builder.thalamus.ThalamicNode", "neurolib.models.thal...
[((6019, 6034), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6032, 6034), False, 'import unittest\n'), ((1255, 1287), 'numpy.arange', 'np.arange', (['dt', '(duration + dt)', 'dt'], {}), '(dt, duration + dt, dt)\n', (1264, 1287), True, 'import numpy as np\n'), ((1443, 1464), 'neurolib.models.multimodel.builder.t...
import numpy as np import matplotlib.pyplot as plt x_number = np.array([0,1,2,3,4]) x_label = ['10','50','100','200','500'] abp = [0.009019, 0.009019 , 0.009019, 0.009019, 0.009019] gbn = [0.019, 0.019, 0.019, 0.019, 0.019] sr = [0.019381, 0.019381, 0.019381, 0.019381, 0.019381] plt.xticks...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.array", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel" ]
[((66, 91), 'numpy.array', 'np.array', (['[0, 1, 2, 3, 4]'], {}), '([0, 1, 2, 3, 4])\n', (74, 91), True, 'import numpy as np\n'), ((310, 339), 'matplotlib.pyplot.xticks', 'plt.xticks', (['x_number', 'x_label'], {}), '(x_number, x_label)\n', (320, 339), True, 'import matplotlib.pyplot as plt\n'), ((340, 375), 'matplotli...
from django.contrib import admin from .models import JobPost, Employee, Employer, User admin.site.register(JobPost) admin.site.register(Employee) admin.site.register(Employer) admin.site.register(User)
[ "django.contrib.admin.site.register" ]
[((88, 116), 'django.contrib.admin.site.register', 'admin.site.register', (['JobPost'], {}), '(JobPost)\n', (107, 116), False, 'from django.contrib import admin\n'), ((117, 146), 'django.contrib.admin.site.register', 'admin.site.register', (['Employee'], {}), '(Employee)\n', (136, 146), False, 'from django.contrib impo...
''' How to run: $ source ~/Documents/tensorflow/bin/activate $ cd Documents/DeskBot-Zero/neural-net/tensorflow $ python neural-net.py Resources: Tutorial NN based off: https://www.tensorflow.org/tutorials/layers Understanding NNs: http://cv-tricks.com/tensorflow-tutorial/training-convolutional-neural-network-f...
[ "tensorflow.nn.softmax", "tensorflow.metrics.accuracy", "tensorflow.losses.sparse_softmax_cross_entropy", "tensorflow.argmax", "tensorflow.reshape", "tensorflow.layers.dense", "tensorflow.train.LoggingTensorHook", "tensorflow.logging.set_verbosity", "tensorflow.layers.dropout", "tensorflow.train.G...
[((421, 462), 'tensorflow.logging.set_verbosity', 'tf.logging.set_verbosity', (['tf.logging.INFO'], {}), '(tf.logging.INFO)\n', (445, 462), True, 'import tensorflow as tf\n'), ((591, 608), 'datasets.create', 'datasets.create', ([], {}), '()\n', (606, 608), False, 'import datasets\n'), ((713, 803), 'tensorflow.estimator...
import numpy import clarity.IO as io def writePoints(filename, points, **args): numpy.save(filename, points) return filename def readPoints(filename, **args): points = numpy.load(filename) return io.pointsToRange(points, **args)
[ "numpy.load", "numpy.save", "clarity.IO.pointsToRange" ]
[((86, 114), 'numpy.save', 'numpy.save', (['filename', 'points'], {}), '(filename, points)\n', (96, 114), False, 'import numpy\n'), ((184, 204), 'numpy.load', 'numpy.load', (['filename'], {}), '(filename)\n', (194, 204), False, 'import numpy\n'), ((216, 248), 'clarity.IO.pointsToRange', 'io.pointsToRange', (['points'],...
import cherrypy import sys class Server: @cherrypy.expose @cherrypy.tools.json_in() @cherrypy.tools.json_out() def move(self): # Deal with CORS cherrypy.response.headers['Access-Control-Allow-Origin'] = '*' cherrypy.response.headers['Access-Control-Allow-Methods'] = 'GET, POST, ...
[ "cherrypy.tools.json_in", "cherrypy.tools.json_out", "cherrypy.config.update" ]
[((68, 92), 'cherrypy.tools.json_in', 'cherrypy.tools.json_in', ([], {}), '()\n', (90, 92), False, 'import cherrypy\n'), ((98, 123), 'cherrypy.tools.json_out', 'cherrypy.tools.json_out', ([], {}), '()\n', (121, 123), False, 'import cherrypy\n'), ((1009, 1098), 'cherrypy.config.update', 'cherrypy.config.update', (["{'se...
from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from unittest.mock import patch from books.models import Book, BookCopy, Library from waitlist.models import WaitlistItem class WaitlistViewSetTest(TestCase): def setUp(self): self.user = User.o...
[ "unittest.mock.patch.object", "django.utils.timezone.now", "books.models.Library.objects.create", "django.contrib.auth.models.User.objects.create_user", "books.models.Book.objects.create" ]
[((314, 358), 'django.contrib.auth.models.User.objects.create_user', 'User.objects.create_user', ([], {'username': '"""claudia"""'}), "(username='claudia')\n", (338, 358), False, 'from django.contrib.auth.models import User\n'), ((501, 557), 'books.models.Library.objects.create', 'Library.objects.create', ([], {'name':...
from pygments import highlight from pygments.formatters import HtmlFormatter from pygments.lexers import PythonLexer print(HtmlFormatter(style="material").get_style_defs('.codehilite'))
[ "pygments.formatters.HtmlFormatter" ]
[((124, 155), 'pygments.formatters.HtmlFormatter', 'HtmlFormatter', ([], {'style': '"""material"""'}), "(style='material')\n", (137, 155), False, 'from pygments.formatters import HtmlFormatter\n')]
""" Compare forecasts over time using confidence sequences """ import logging from typing import Union, Tuple import numpy as np import pandas as pd from comparecast.scoring import ScoringRule, get_scoring_rule from comparecast.confseq import confseq_h, confseq_eb, confseq_asymptotic from comparecast.evalues import e...
[ "comparecast.scoring.get_scoring_rule", "comparecast.evalues.evalue_expm", "pandas.read_csv", "comparecast.confseq.confseq_eb", "logging.info", "comparecast.confseq.confseq_asymptotic", "comparecast.confseq.confseq_h" ]
[((2058, 2088), 'comparecast.scoring.get_scoring_rule', 'get_scoring_rule', (['scoring_rule'], {}), '(scoring_rule)\n', (2074, 2088), False, 'from comparecast.scoring import ScoringRule, get_scoring_rule\n'), ((1920, 1937), 'pandas.read_csv', 'pd.read_csv', (['data'], {}), '(data)\n', (1931, 1937), True, 'import pandas...
#!/usr/bin/env python import random import sys import moveit_commander import rospy import tf from geometry_msgs.msg import Pose, Point, Quaternion from math import pi orient = [ Quaternion(*tf.transformations.quaternion_from_euler(pi, -pi/2, -pi/2)), Quaternion(*tf.transformations.quaternion_from_euler(pi...
[ "random.uniform", "moveit_commander.MoveGroupCommander", "rospy.is_shutdown", "moveit_commander.roscpp_shutdown", "rospy.init_node", "geometry_msgs.msg.Point", "tf.transformations.quaternion_from_euler", "moveit_commander.roscpp_initialize" ]
[((435, 479), 'moveit_commander.roscpp_initialize', 'moveit_commander.roscpp_initialize', (['sys.argv'], {}), '(sys.argv)\n', (469, 479), False, 'import moveit_commander\n'), ((480, 526), 'rospy.init_node', 'rospy.init_node', (['"""r2_wave_arm"""'], {'anonymous': '(True)'}), "('r2_wave_arm', anonymous=True)\n", (495, 5...
from conans import ConanFile, tools from conans.errors import ConanInvalidConfiguration import os class SMLConan(ConanFile): name = "sml" homepage = "https://github.com/boost-ext/sml" description = "SML: C++14 State Machine Library" topics = ("state-machine", "metaprogramming", "design-patterns", "sml...
[ "conans.tools.get", "conans.tools.Version", "conans.tools.patch", "conans.errors.ConanInvalidConfiguration", "conans.tools.check_min_cppstd", "os.path.join" ]
[((782, 892), 'conans.tools.get', 'tools.get', ([], {'strip_root': '(True)', 'destination': 'self._source_subfolder'}), "(**self.conan_data['sources'][self.version], strip_root=True,\n destination=self._source_subfolder)\n", (791, 892), False, 'from conans import ConanFile, tools\n'), ((986, 1020), 'conans.tools.che...
import colorsys import math import matplotlib.pyplot as plt from geo import geodata from infographics import Figure, plotx MAX_LEGEND_ITEMS = 7 def _default_func_get_color_value(row): return row.population / row.area def _default_func_value_to_color(density): log_density = math.log10(density) h = (1 ...
[ "infographics.plotx.get_bounds", "infographics.plotx.get_color_patch", "colorsys.hsv_to_rgb", "matplotlib.pyplot.axes", "matplotlib.pyplot.legend", "math.log10", "geo.geodata.get_region_geodata", "infographics.plotx.draw_text" ]
[((289, 308), 'math.log10', 'math.log10', (['density'], {}), '(density)\n', (299, 308), False, 'import math\n'), ((365, 397), 'colorsys.hsv_to_rgb', 'colorsys.hsv_to_rgb', (['h', '(0.8)', '(0.8)'], {}), '(h, 0.8, 0.8)\n', (384, 397), False, 'import colorsys\n'), ((597, 650), 'infographics.plotx.draw_text', 'plotx.draw_...
from django.utils.crypto import get_random_string def generate_version_string(): return get_random_string(8)
[ "django.utils.crypto.get_random_string" ]
[((94, 114), 'django.utils.crypto.get_random_string', 'get_random_string', (['(8)'], {}), '(8)\n', (111, 114), False, 'from django.utils.crypto import get_random_string\n')]
# 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 # distributed under t...
[ "sqlalchemy.MetaData", "sqlalchemy.Index", "sqlalchemy.text", "sqlalchemy.Table", "migrate.changeset.constraint.UniqueConstraint" ]
[((1116, 1148), 'sqlalchemy.MetaData', 'sa.MetaData', ([], {'bind': 'migrate_engine'}), '(bind=migrate_engine)\n', (1127, 1148), True, 'import sqlalchemy as sa\n'), ((1164, 1205), 'sqlalchemy.Table', 'sa.Table', (['"""resource"""', 'meta'], {'autoload': '(True)'}), "('resource', meta, autoload=True)\n", (1172, 1205), T...
import copy import logging import datetime from pprint import pprint as pp from path import Path from ped_parser import FamilyParser from scout.exceptions import (PedigreeError, ConfigError) from scout.constants import (PHENOTYPE_MAP, SEX_MAP, REV_SEX_MAP, REV_PHENOTYPE_MAP) from scout....
[ "scout.parse.peddy.parse_peddy_ped", "copy.deepcopy", "scout.constants.REV_PHENOTYPE_MAP.keys", "scout.exceptions.ConfigError", "ped_parser.FamilyParser", "scout.constants.REV_SEX_MAP.keys", "scout.exceptions.PedigreeError", "scout.parse.peddy.parse_peddy_ped_check", "path.Path", "scout.parse.pedd...
[((441, 468), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (458, 468), False, 'import logging\n'), ((13277, 13326), 'ped_parser.FamilyParser', 'FamilyParser', (['ped_stream'], {'family_type': 'family_type'}), '(ped_stream, family_type=family_type)\n', (13289, 13326), False, 'from ped_pa...
import textwrap from pathlib import Path from anki.lang import _ from aqt import mw from aqt.utils import showInfo from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtGui import QImage from PyQt5.QtSvg import QGraphicsSvgItem from PyQt5.QtWidgets import * from ._vendor.brain_dump.graphviz import THEMES,...
[ "textwrap.dedent", "PyQt5.QtSvg.QGraphicsSvgItem", "aqt.utils.showInfo", "pathlib.Path", "aqt.mw.app.activeWindow", "aqt.mw.mindmap_dialog.show" ]
[((5951, 5975), 'aqt.mw.mindmap_dialog.show', 'mw.mindmap_dialog.show', ([], {}), '()\n', (5973, 5975), False, 'from aqt import mw\n'), ((3993, 4019), 'PyQt5.QtSvg.QGraphicsSvgItem', 'QGraphicsSvgItem', (['svg_path'], {}), '(svg_path)\n', (4009, 4019), False, 'from PyQt5.QtSvg import QGraphicsSvgItem\n'), ((5924, 5945)...
""" Test the AArch64 SVE registers dynamic resize with multiple threads. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class RegisterCommandsTestCase(TestBase): def check_sve_registers(self, vg_test_value): z_reg_size = ...
[ "lldbsuite.test.lldbutil.run_break_set_by_file_and_line" ]
[((2289, 2367), 'lldbsuite.test.lldbutil.run_break_set_by_file_and_line', 'lldbutil.run_break_set_by_file_and_line', (['self', '"""main.c"""', 'main_thread_stop_line'], {}), "(self, 'main.c', main_thread_stop_line)\n", (2328, 2367), False, 'from lldbsuite.test import lldbutil\n'), ((2466, 2538), 'lldbsuite.test.lldbuti...
import inspect from moviepy.editor import VideoFileClip import numpy as np import os from PIL import Image, ImageDraw from pprint import pprint import sys # add parent directory to sys path to import relative modules currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os...
[ "PIL.Image.new", "matplotlib.pyplot.show", "moviepy.editor.VideoFileClip", "os.path.dirname", "sys.path.insert", "inspect.currentframe", "PIL.ImageDraw.Draw", "matplotlib.pyplot.subplots" ]
[((318, 345), 'os.path.dirname', 'os.path.dirname', (['currentdir'], {}), '(currentdir)\n', (333, 345), False, 'import os\n'), ((358, 384), 'os.path.dirname', 'os.path.dirname', (['parentdir'], {}), '(parentdir)\n', (373, 384), False, 'import os\n'), ((385, 414), 'sys.path.insert', 'sys.path.insert', (['(0)', 'parentdi...
# Internal from importlib.metadata import version # Project from .expires import Expires as expires from .loopable import Loopable from .all_tasks import all_tasks from .safe_gather import safe_gather from .current_task import current_task from .attempt_await import attempt_await from .wait_with_care import ALL_COMPLE...
[ "traceback.format_exc", "importlib.metadata.version" ]
[((619, 636), 'importlib.metadata.version', 'version', (['__name__'], {}), '(__name__)\n', (626, 636), False, 'from importlib.metadata import version\n'), ((785, 807), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (805, 807), False, 'import traceback\n')]
#!/usr/bin/env python # # License: BSD # https://raw.githubusercontent.com/stonier/py_trees/devel/LICENSE # ############################################################################## # Imports ############################################################################## import py_trees import py_trees.console ...
[ "py_trees.visitors.DebugVisitor", "py_trees.behaviours.Failure", "py_trees.behaviours.Success", "py_trees.tests.tick_tree", "py_trees.trees.BehaviourTree", "py_trees.display.print_ascii_tree", "py_trees.tests.print_summary", "py_trees.console.banner", "py_trees.meta.inverter", "py_trees.composites...
[((570, 605), 'py_trees.logging.Logger', 'py_trees.logging.Logger', (['"""Nosetest"""'], {}), "('Nosetest')\n", (593, 605), False, 'import py_trees\n'), ((811, 837), 'py_trees.console.banner', 'console.banner', (['"""Selector"""'], {}), "('Selector')\n", (825, 837), True, 'import py_trees.console as console\n'), ((852,...
import os import re from dotenv import load_dotenv load_dotenv() id_pattern = re.compile(r'^.\d+$') token = os.environ.get("TOKEN") app_id = int(os.environ.get("APP_ID")) app_hash = os.environ.get("API_HASH") allowed = [int(user) if id_pattern.search(user) else user for user in os.environ.get('AUTH_USERS', '').split...
[ "dotenv.load_dotenv", "os.environ.get", "re.compile" ]
[((51, 64), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (62, 64), False, 'from dotenv import load_dotenv\n'), ((79, 100), 're.compile', 're.compile', (['"""^.\\\\d+$"""'], {}), "('^.\\\\d+$')\n", (89, 100), False, 'import re\n'), ((111, 134), 'os.environ.get', 'os.environ.get', (['"""TOKEN"""'], {}), "('TOKE...
from .base import Video, Play import time def video_menu(): from .menu import main vid_choice = str(input(""" =================================== YOUTUBE VIDEO DOWNLOAD Select Quality 1. Highest 2. Lowest 3. Back Select Your Choice:""")) if vid_choice ...
[ "time.sleep" ]
[((510, 523), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (520, 523), False, 'import time\n'), ((591, 604), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (601, 604), False, 'import time\n'), ((666, 679), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (676, 679), False, 'import time\n'), ((762, 775), ...
#!/usr/bin/python import sys from stepper import * import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) #Setup servo servo_pin = 12 GPIO.setup(12, GPIO.OUT) servo = GPIO.PWM(servo_pin, 50) pulse = 5 servo.start(pulse) #Setup linear motors #lin_pins = [18, 13] #GPIO.setup(lin_pins[0], GPIO.OUT) #GPIO.setup(lin_...
[ "RPi.GPIO.setup", "RPi.GPIO.setmode", "RPi.GPIO.PWM", "time.sleep" ]
[((88, 110), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BCM'], {}), '(GPIO.BCM)\n', (100, 110), True, 'import RPi.GPIO as GPIO\n'), ((139, 163), 'RPi.GPIO.setup', 'GPIO.setup', (['(12)', 'GPIO.OUT'], {}), '(12, GPIO.OUT)\n', (149, 163), True, 'import RPi.GPIO as GPIO\n'), ((172, 195), 'RPi.GPIO.PWM', 'GPIO.PWM', (['se...
import lyricwikia from spotdl.lyrics.lyric_base import LyricBase from spotdl.lyrics.exceptions import LyricsNotFoundError class LyricWikia(LyricBase): def from_query(self, query, linesep="\n", timeout=None): raise NotImplementedError def from_artist_and_track(self, artist, track, linesep="\n", timeo...
[ "spotdl.lyrics.exceptions.LyricsNotFoundError", "lyricwikia.get_lyrics" ]
[((453, 507), 'lyricwikia.get_lyrics', 'lyricwikia.get_lyrics', (['artist', 'track', 'linesep', 'timeout'], {}), '(artist, track, linesep, timeout)\n', (474, 507), False, 'import lyricwikia\n'), ((573, 603), 'spotdl.lyrics.exceptions.LyricsNotFoundError', 'LyricsNotFoundError', (['e.args[0]'], {}), '(e.args[0])\n', (59...
#!/usr/local/bin/python3 def lista1(): lista = [] for i in range(100_000): lista += [i] return lista def lista2(): return range(0, 100_000) if __name__ == '__main__': # Tool for measuring execution time of small code snippets. import timeit # Checagem de tempo de execução da prime...
[ "timeit.Timer" ]
[((349, 404), 'timeit.Timer', 'timeit.Timer', (['"""lista1()"""', '"""from __main__ import lista1"""'], {}), "('lista1()', 'from __main__ import lista1')\n", (361, 404), False, 'import timeit\n'), ((573, 628), 'timeit.Timer', 'timeit.Timer', (['"""lista2()"""', '"""from __main__ import lista2"""'], {}), "('lista2()', '...
import FWCore.ParameterSet.Config as cms from RecoJets.JetProducers.ECFAdder_cfi import ECFAdder ecf = ECFAdder.clone( src = cms.InputTag("ak8CHSJets"), ecftype = cms.string("ECF") ) ecfCbeta1 = ECFAdder.clone( src = cms.InputTag("ak8CHSJets"), ecftype...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.double", "FWCore.ParameterSet.Config.InputTag", "FWCore.ParameterSet.Config.vuint32" ]
[((140, 166), 'FWCore.ParameterSet.Config.InputTag', 'cms.InputTag', (['"""ak8CHSJets"""'], {}), "('ak8CHSJets')\n", (152, 166), True, 'import FWCore.ParameterSet.Config as cms\n'), ((191, 208), 'FWCore.ParameterSet.Config.string', 'cms.string', (['"""ECF"""'], {}), "('ECF')\n", (201, 208), True, 'import FWCore.Paramet...
from datetime import timedelta from django.utils import timezone from logging import getLogger from django.db.models.query_utils import Q from django.core.mail import send_mail from django.contrib.auth.models import AbstractUser from django.contrib.auth import get_user_model from django.conf import settings from utils...
[ "django.core.mail.send_mail", "django.db.models.query_utils.Q", "django.utils.timezone.now", "django.contrib.auth.get_user_model", "datetime.timedelta", "logging.getLogger" ]
[((473, 492), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (482, 492), False, 'from logging import getLogger\n'), ((1562, 1661), 'django.core.mail.send_mail', 'send_mail', (['self.message.subject', 'self.message.message', 'settings.EMAIL_HOST_USER', '(user.email,)'], {}), '(self.message.subject...
"""Threaded Asset Loader for MC.""" import logging import threading import traceback from queue import PriorityQueue, Queue, Empty import sys from mpf.core.assets import BaseAssetManager class ThreadedAssetManager(BaseAssetManager): """AssetManager which uses the Threading module.""" def __init__(self, ma...
[ "threading.Thread.__init__", "traceback.format_exception", "sys.exc_info", "queue.PriorityQueue", "queue.Queue", "logging.getLogger" ]
[((447, 462), 'queue.PriorityQueue', 'PriorityQueue', ([], {}), '()\n', (460, 462), False, 'from queue import PriorityQueue, Queue, Empty\n'), ((526, 533), 'queue.Queue', 'Queue', ([], {}), '()\n', (531, 533), False, 'from queue import PriorityQueue, Queue, Empty\n'), ((3569, 3600), 'threading.Thread.__init__', 'thread...
import numpy as np import npl.sk_gaussian_mixture as skgm import pandas as pd import time import copy from joblib import Parallel, delayed from tqdm import tqdm from scipy.stats import dirichlet from scipy.stats import norm from scipy.stats import lognorm from sklearn.mixture import GaussianMixture from sklearn.mixture...
[ "numpy.random.randn", "scipy.stats.norm.logpdf", "numpy.transpose", "numpy.zeros", "sklearn.mixture.GaussianMixture", "numpy.ones", "numpy.shape", "joblib.Parallel", "numpy.array", "numpy.int", "sklearn.mixture.gaussian_mixture._compute_precision_cholesky", "joblib.delayed", "scipy.stats.log...
[((1298, 1340), 'sklearn.mixture.GaussianMixture', 'GaussianMixture', (['K'], {'covariance_type': '"""diag"""'}), "(K, covariance_type='diag')\n", (1313, 1340), False, 'from sklearn.mixture import GaussianMixture\n'), ((1426, 1437), 'numpy.zeros', 'np.zeros', (['N'], {}), '(N)\n', (1434, 1437), True, 'import numpy as n...
""" Demo shell """ from cmd import Cmd import numpy as np from txtai.embeddings import Embeddings class Shell(Cmd): """ Query shell. """ def __init__(self): super(Shell, self).__init__() self.intro = "query shell" self.prompt = "(search) " self.embeddings = None ...
[ "txtai.embeddings.Embeddings" ]
[((479, 580), 'txtai.embeddings.Embeddings', 'Embeddings', (["{'method': 'transformers', 'path':\n 'sentence-transformers/bert-base-nli-mean-tokens'}"], {}), "({'method': 'transformers', 'path':\n 'sentence-transformers/bert-base-nli-mean-tokens'})\n", (489, 580), False, 'from txtai.embeddings import Embeddings\n...
import re import numpy as np from lxml.etree import SubElement from oem import patterns, CURRENT_VERSION from oem.tools import parse_epoch, require, format_float, format_epoch from oem.base import ConstraintSpecification, Constraint from oem.compare import StateCompare COV_XML_ENTRY_MAP = { "CX_X": (0, 0), ...
[ "oem.compare.StateCompare", "oem.tools.parse_epoch", "numpy.zeros", "numpy.hstack", "oem.tools.require", "oem.base.ConstraintSpecification", "numpy.array", "oem.tools.format_epoch", "lxml.etree.SubElement", "re.findall", "oem.tools.format_float" ]
[((1957, 2025), 'oem.base.ConstraintSpecification', 'ConstraintSpecification', (['ConstrainStateType', 'ConstrainStateDimension'], {}), '(ConstrainStateType, ConstrainStateDimension)\n', (1980, 2025), False, 'from oem.base import ConstraintSpecification, Constraint\n'), ((901, 994), 'oem.tools.require', 'require', (['(...
#!/usr/bin/env python3 import pytest from vyper.cli.vyper_json import ( get_input_dict_settings, ) from vyper.exceptions import ( JSONError, ) def test_unknown_evm(): with pytest.raises(JSONError): get_input_dict_settings({'settings': {'evmVersion': "foo"}}) @pytest.mark.parametrize('evm_versi...
[ "pytest.mark.parametrize", "pytest.raises", "vyper.cli.vyper_json.get_input_dict_settings" ]
[((286, 381), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""evm_version"""', "['homestead', 'tangerineWhistle', 'spuriousDragon']"], {}), "('evm_version', ['homestead', 'tangerineWhistle',\n 'spuriousDragon'])\n", (309, 381), False, 'import pytest\n'), ((524, 613), 'pytest.mark.parametrize', 'pytest.ma...
# Copyright 2018 Intel Corporation. import os import subprocess import unittest class AnalysisTest(unittest.TestCase): def testRunNotebook(self): cwd = os.path.abspath('../com_intel_plaidml/tools/analysis') env = os.environ.copy() env['PLAIDML_EVENTLOG_FILENAME'] = os.path.join(cwd, 'te...
[ "unittest.main", "os.path.abspath", "os.environ.copy", "os.path.join", "os.getenv", "subprocess.check_call" ]
[((1166, 1181), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1179, 1181), False, 'import unittest\n'), ((168, 222), 'os.path.abspath', 'os.path.abspath', (['"""../com_intel_plaidml/tools/analysis"""'], {}), "('../com_intel_plaidml/tools/analysis')\n", (183, 222), False, 'import os\n'), ((238, 255), 'os.environ....
# *********************************************** # * Program used for the Class of Numerical Methods in Transport Phenomena # * Numerical Analysis - <NAME> - 10th edition - Page 53 # * Algorithm 2.1 - Method of Bisection # * # * \param1 Start of the range to be studied # * \param2 End of the interval to be studi...
[ "math.fabs" ]
[((1271, 1297), 'math.fabs', 'math.fabs', (['(_c - c_previous)'], {}), '(_c - c_previous)\n', (1280, 1297), False, 'import math\n')]
from django.contrib import admin from .models import (UserProfile, UserProfileAdmin, LoginAttempt, LoginAttemptAdmin, PasswordRequest, PasswordRequestAdmin, EmailVerification, EmailVerificationAdmin, Feedback, FeedbackAdmin) admin.site.register(UserProfile, UserProfileAdmin) ...
[ "django.contrib.admin.site.register" ]
[((269, 319), 'django.contrib.admin.site.register', 'admin.site.register', (['UserProfile', 'UserProfileAdmin'], {}), '(UserProfile, UserProfileAdmin)\n', (288, 319), False, 'from django.contrib import admin\n'), ((320, 372), 'django.contrib.admin.site.register', 'admin.site.register', (['LoginAttempt', 'LoginAttemptAd...
"""thanks dankmemer for some of the commands :)""" from enum import Enum from random import randint, choice, shuffle import discord from discord.ext import commands import box import json import string import typing import asyncio import os from io import BytesIO class RPS(Enum): rock = "\N{MOYAI}" paper = "...
[ "box.Box", "discord.ext.commands.command", "random.randint", "discord.Embed", "discord.File", "asyncio.sleep", "random.shuffle", "discord.Color.lighter_grey", "random.choice", "discord.ext.commands.guild_only", "discord.ext.commands.is_owner", "os.getenv" ]
[((836, 873), 'discord.ext.commands.command', 'commands.command', ([], {'aliases': "['inspiro']"}), "(aliases=['inspiro'])\n", (852, 873), False, 'from discord.ext import commands\n'), ((1879, 1897), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (1895, 1897), False, 'from discord.ext import comm...
from researcher.dashboard import past_experiment_from_hash from researcher.dashboard import * import unittest import numpy as np import researcher as rs from tests.tools import TEST_DATA_PATH class TestDashboard(unittest.TestCase): def setUp(self): self.e = past_experiment_from_hash(TEST_DATA_PATH, "sada...
[ "researcher.dashboard.past_experiment_from_hash" ]
[((273, 329), 'researcher.dashboard.past_experiment_from_hash', 'past_experiment_from_hash', (['TEST_DATA_PATH', '"""sadasd32823"""'], {}), "(TEST_DATA_PATH, 'sadasd32823')\n", (298, 329), False, 'from researcher.dashboard import past_experiment_from_hash\n'), ((348, 406), 'researcher.dashboard.past_experiment_from_has...
import requests import json import sys import traceback from requests_oauthlib import OAuth1 STREAM_FILTER_STATUSES = 'https://stream.twitter.com/1.1/statuses/filter.json' class TwitterApi: def __init__(self, consumer_key, consumer_secret, access_token, access_secret): self.auth = OAuth1(consumer_key, consumer_sec...
[ "traceback.print_exc", "json.loads", "requests_oauthlib.OAuth1", "requests.get", "sys.exc_info" ]
[((287, 353), 'requests_oauthlib.OAuth1', 'OAuth1', (['consumer_key', 'consumer_secret', 'access_token', 'access_secret'], {}), '(consumer_key, consumer_secret, access_token, access_secret)\n', (293, 353), False, 'from requests_oauthlib import OAuth1\n'), ((530, 591), 'requests.get', 'requests.get', (['url'], {'auth': ...
import collections import logging import random from typing import Any, Dict, Optional import numpy as np from ray.rllib.policy.rnn_sequencing import timeslice_along_seq_lens_with_overlap from ray.rllib.policy.sample_batch import ( DEFAULT_POLICY_ID, MultiAgentBatch, SampleBatch, ) from ray.rllib.utils.an...
[ "ray.rllib.utils.replay_buffers.multi_agent_prioritized_replay_buffer.MultiAgentPrioritizedReplayBuffer.get_state", "ray.rllib.utils.replay_buffers.multi_agent_replay_buffer.merge_dicts_with_warning", "ray.util.debug.log_once", "numpy.ceil", "random.uniform", "ray.rllib.utils.replay_buffers.multi_agent_pr...
[((854, 881), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (871, 881), False, 'import logging\n'), ((6593, 6636), 'ray.rllib.utils.annotations.override', 'override', (['MultiAgentPrioritizedReplayBuffer'], {}), '(MultiAgentPrioritizedReplayBuffer)\n', (6601, 6636), False, 'from ray.rlli...
import cocotb @cocotb.test() async def test(top): print("test") await cocotb.triggers.Timer(10, "ms")
[ "cocotb.test", "cocotb.triggers.Timer" ]
[((17, 30), 'cocotb.test', 'cocotb.test', ([], {}), '()\n', (28, 30), False, 'import cocotb\n'), ((80, 111), 'cocotb.triggers.Timer', 'cocotb.triggers.Timer', (['(10)', '"""ms"""'], {}), "(10, 'ms')\n", (101, 111), False, 'import cocotb\n')]
import curses import contextlib import typing as t import logging import textwrap import time import subprocess import sys import traceback import socket import threading import platform import base64 import datetime import os import json import decimal import string from dataclasses import dataclass from pathlib impor...
[ "curses.wrapper", "curses.endwin", "pathlib.Path", "curses.textpad.Textbox", "traceback.print_exc", "curses.initscr", "curses.start_color", "threading.Lock", "threading.Event", "datetime.datetime.now", "curses.init_pair", "subprocess.Popen", "curses.noecho", "textwrap.indent", "os.system...
[((408, 431), 'logging.getLogger', 'logging.getLogger', (['"""ui"""'], {}), "('ui')\n", (425, 431), False, 'import logging\n'), ((4195, 4237), 'collections.namedtuple', 'namedtuple', (['"""MenuItem"""', '"""idx,title,action"""'], {}), "('MenuItem', 'idx,title,action')\n", (4205, 4237), False, 'from collections import n...
#!/usr/bin/env python3 import argparse import requests import sys from urllib import parse as urlparse import random from termcolor import cprint import jndiobfuscator # Disable SSL warnings try: import requests.packages.urllib3 requests.packages.urllib3.disable_warnings() except Exception: pass cprint(...
[ "requests.packages.urllib3.disable_warnings", "argparse.ArgumentParser", "jndiobfuscator.obfuscateStringRandom", "argparse.ArgumentError", "requests.request", "termcolor.cprint", "urllib.parse.urlparse" ]
[((313, 377), 'termcolor.cprint', 'cprint', (['"""[+] CVE-2021-44228 - Apache Log4j RCE Scanner"""', '"""green"""'], {}), "('[+] CVE-2021-44228 - Apache Log4j RCE Scanner', 'green')\n", (319, 377), False, 'from termcolor import cprint\n'), ((378, 432), 'termcolor.cprint', 'cprint', (['"""[+] Scanner provided by ReliaQu...
from yacs.config import CfgNode as CN _C = CN() # -------------------------------------------------------------------------------- # Copyright # -------------------------------------------------------------------------------- _C.copyright = CN() _C.copyright.author = "<NAME>" # -------------------------------------...
[ "yacs.config.CfgNode" ]
[((44, 48), 'yacs.config.CfgNode', 'CN', ([], {}), '()\n', (46, 48), True, 'from yacs.config import CfgNode as CN\n'), ((244, 248), 'yacs.config.CfgNode', 'CN', ([], {}), '()\n', (246, 248), True, 'from yacs.config import CfgNode as CN\n'), ((473, 477), 'yacs.config.CfgNode', 'CN', ([], {}), '()\n', (475, 477), True, '...
import re import sys from typing import Tuple import click import pandas as pd from sqlalchemy.orm import joinedload from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.sql import text import fire.cli from fire.api.model import Punkt from . import ( ARKDEF_REVISION, niv, normaliser_lokationskoor...
[ "re.match", "sqlalchemy.sql.text", "click.argument", "sys.exit" ]
[((425, 473), 'click.argument', 'click.argument', (['"""projektnavn"""'], {'nargs': '(1)', 'type': 'str'}), "('projektnavn', nargs=1, type=str)\n", (439, 473), False, 'import click\n'), ((490, 542), 'click.argument', 'click.argument', (['"""kriterier"""'], {'nargs': '(-1)', 'required': '(True)'}), "('kriterier', nargs=...
import os import shutil from google.colab import drive __all__ = [ "setup" ] def setup( drive_json_path = "/kaggle/credentials/kaggle.json", mount_path_google_drive = "/content/drive" ): # mount google drive to "/content/drive/MyDrive/" drive.mount(mount_path_google_drive) # create the directory "/root/...
[ "google.colab.drive.mount", "os.chmod", "os.makedirs", "shutil.copy" ]
[((248, 284), 'google.colab.drive.mount', 'drive.mount', (['mount_path_google_drive'], {}), '(mount_path_google_drive)\n', (259, 284), False, 'from google.colab import drive\n'), ((375, 424), 'os.makedirs', 'os.makedirs', (['dest_path_kaggle_json'], {'exist_ok': '(True)'}), '(dest_path_kaggle_json, exist_ok=True)\n', (...
from pylps.core import * from pylps.lps_data_structures import LPSConstant initialise(max_time=5) create_actions('say(_)', 'say_single(_)') create_events('respond(_)') create_facts('ask(_)') create_variables('X', 'Y', 'Rest') ask(['a', ['b1', 'b2'], 'c', 'd', 'e']) ask(['a', 'b2', 'c', 'd']) reactive_rule(ask(X)).t...
[ "pylps.lps_data_structures.LPSConstant" ]
[((382, 398), 'pylps.lps_data_structures.LPSConstant', 'LPSConstant', (['"""a"""'], {}), "('a')\n", (393, 398), False, 'from pylps.lps_data_structures import LPSConstant\n'), ((407, 423), 'pylps.lps_data_structures.LPSConstant', 'LPSConstant', (['"""c"""'], {}), "('c')\n", (418, 423), False, 'from pylps.lps_data_struct...
#!/usr/bin/env python # encoding: utf-8 """ @author: william @contact: <EMAIL> @site: http://www.xiaolewei.com @file: config.py @time: 26/01/2018 23:53 """ import toml import os APP_PATH = os.path.split(os.path.split(os.path.realpath(__file__))[0])[0] __config = toml.load(os.path.join(APP_PATH, 'config.toml')) d...
[ "os.path.realpath", "os.path.join" ]
[((278, 315), 'os.path.join', 'os.path.join', (['APP_PATH', '"""config.toml"""'], {}), "(APP_PATH, 'config.toml')\n", (290, 315), False, 'import os\n'), ((221, 247), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (237, 247), False, 'import os\n')]
import time import matplotlib.pyplot as pyplot from numpy.core.umath import sqrt from config import REPORT_FILE_FOLDER_NAME, dx_TAKEN import equation import trivia __author__ = 'Dima' def agile(variants_to_consider): for parameter_set in variants_to_consider: equation.solve(parameter_set['E'], parameter_...
[ "matplotlib.pyplot.axhline", "matplotlib.pyplot.axvline", "equation.get_result", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylim", "trivia.draft_a_momentum_plot", "matplotlib.pyplot.close", "equation.K_residue", "matplotlib.pyplot.yticks", "equation.f_bracket", "equation.K", "matplotlib.pypl...
[((1528, 1543), 'matplotlib.pyplot.figure', 'pyplot.figure', ([], {}), '()\n', (1541, 1543), True, 'import matplotlib.pyplot as pyplot\n'), ((1585, 1615), 'trivia.draft_a_momentum_plot', 'trivia.draft_a_momentum_plot', ([], {}), '()\n', (1613, 1615), False, 'import trivia\n'), ((1620, 1641), 'matplotlib.pyplot.ylabel',...
# coding: utf-8 """ Copyright 2016 SmartBear Software 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...
[ "six.iteritems" ]
[((10897, 10926), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (10906, 10926), False, 'from six import iteritems\n')]
#! /usr/bin/env python import os import os.path as osp import json import numpy as np import click import svgwrite from svgwrite import cm, mm import cairosvg def add_rect(dwg, x, y, w, h, color): print(x, y, w, h, color) rec = dwg.rect(insert=(x * cm, y * cm), size=(w * cm, h * cm), fill=color, stroke=col...
[ "json.load", "os.makedirs", "numpy.asarray", "click.option", "svgwrite.Drawing", "click.command", "os.path.join" ]
[((1085, 1100), 'click.command', 'click.command', ([], {}), '()\n', (1098, 1100), False, 'import click\n'), ((1102, 1152), 'click.option', 'click.option', (['"""--out"""', '"""save_dir"""'], {'default': '"""./out"""'}), "('--out', 'save_dir', default='./out')\n", (1114, 1152), False, 'import click\n'), ((1154, 1189), '...
# -*- coding: iso-8859-1 -*- """ MoinMoin - email notification plugin from event system This code sends email notifications about page changes. TODO: refactor it to handle separate events for page changes, creations, etc @copyright: 2007 by <NAME> <<EMAIL>> @license: GNU GPL, see COPYING for detai...
[ "MoinMoin.action.AttachFile.getAttachUrl", "MoinMoin.events.notification.user_created_message", "MoinMoin.events.notification.filter_subscriber_list", "MoinMoin.Page.Page", "MoinMoin.events.notification.page_change_message", "MoinMoin.support.python_compatibility.set", "MoinMoin.mail.sendmail.sendmail",...
[((1334, 1484), 'MoinMoin.events.notification.page_change_message', 'notification.page_change_message', (['change_type', 'request', 'page', 'email_lang'], {'comment': 'comment', 'revisions': 'revisions', 'trivial': 'trivial', 'old_name': 'old_name'}), '(change_type, request, page, email_lang,\n comment=comment, revi...
#! /usr/bin/env python3 # Copyright <NAME>. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. import os import io import sys import csv import json import random from datetime import datetime as dt from collections import defaultdict data_dir = sys.argv[1] if len(sys.argv) > 1 els...
[ "datetime.datetime.strftime", "json.dump", "random.randint", "csv.DictReader", "os.path.exists", "collections.defaultdict", "io.open", "os.path.join", "sys.exit" ]
[((373, 416), 'os.path.join', 'os.path.join', (['data_dir', '"""train"""', '"""news.tsv"""'], {}), "(data_dir, 'train', 'news.tsv')\n", (385, 416), False, 'import os\n'), ((442, 490), 'os.path.join', 'os.path.join', (['data_dir', '"""train"""', '"""behaviors.tsv"""'], {}), "(data_dir, 'train', 'behaviors.tsv')\n", (454...
import celery import csv from celery import current_task from celery.utils.log import get_task_logger from django.conf import settings from django.core.files.storage import default_storage as storage from pyxform.xls2json import SurveyReader from openrosa.xform_reader import XFormReader from api.serializers import ...
[ "django.core.files.storage.default_storage.open", "pyxform.xls2json.SurveyReader", "api.serializers.CSVSerializer", "celery.task", "repos.models.Repository.objects.get", "django.core.files.storage.default_storage.delete", "celery.utils.log.get_task_logger", "openrosa.xform_reader.XFormReader", "djan...
[((380, 405), 'celery.utils.log.get_task_logger', 'get_task_logger', (['__name__'], {}), '(__name__)\n', (395, 405), False, 'from celery.utils.log import get_task_logger\n'), ((411, 466), 'celery.task', 'celery.task', ([], {'default_retry_delay': '(5 * 60)', 'max_retries': '(10)'}), '(default_retry_delay=5 * 60, max_re...
# This code is part of Qiskit. # # (C) Copyright IBM 2022. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ "qiskit_nature.results.utils.protein_shape_decoder.ProteinShapeDecoder", "ddt.data" ]
[((779, 1151), 'ddt.data', 'data', (["('101100011', [False, False, False, False, False, False, False], True, (7, \n 0), [1, 0, 3, 2, 0, 3], [None, None, None, None, None, None, None])", "('0011011', [False, False, True, True, False], True, (3, 4), [1, 0, 3, 2],\n [None, None, 3, 0, None])", "('10110110', [False, ...
# coding: utf-8 """ Files Upload and manage files. # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from hubspot.files.fil...
[ "hubspot.files.files.exceptions.ApiTypeError", "hubspot.files.files.exceptions.ApiValueError", "six.iteritems", "re.search", "hubspot.files.files.api_client.ApiClient" ]
[((3529, 3570), 'six.iteritems', 'six.iteritems', (["local_var_params['kwargs']"], {}), "(local_var_params['kwargs'])\n", (3542, 3570), False, 'import six\n'), ((8556, 8597), 'six.iteritems', 'six.iteritems', (["local_var_params['kwargs']"], {}), "(local_var_params['kwargs'])\n", (8569, 8597), False, 'import six\n'), (...
from settings import Settings from vertex import Vertex from edge import Edge class DNA: """ DNA class contains the graph-like structure representation of the neural network ans implements all the necessary operations that can be performed on a DNA """ def __init__(self, input_shape, output_shap...
[ "edge.Edge", "vertex.Vertex" ]
[((5378, 5441), 'vertex.Vertex', 'Vertex', (['Settings.GLOBAL_VERTEX_ID'], {'mutable': '[False, True, False]'}), '(Settings.GLOBAL_VERTEX_ID, mutable=[False, True, False])\n', (5384, 5441), False, 'from vertex import Vertex\n'), ((5622, 5714), 'vertex.Vertex', 'Vertex', (['Settings.GLOBAL_VERTEX_ID'], {'mutable': '[Tru...
#!/usr/bin/python # encoding: utf-8 """ @author: Ian @contact:<EMAIL> @file: abnormal_detection_gaussian.py @time: 2019/3/6 11:03 主要功能: 探索样本的分布、缺失值、取值范围等, 如果有缺失值,进行填补 """ import numpy as np import pandas as pd import os import matplotlib.pyplot as plt class DataExplore: def __init__(self, baseDir='/home/ian/da...
[ "pandas.DataFrame", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "matplotlib.pyplot.hist", "matplotlib.pyplot.figure", "os.path.join", "os.listdir" ]
[((1053, 1067), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1065, 1067), True, 'import pandas as pd\n'), ((1492, 1504), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1502, 1504), True, 'import matplotlib.pyplot as plt\n'), ((1513, 1529), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(221)'], ...
import cv2 import scipy from scipy import stats import numpy as np from collections import defaultdict import requests import os from django.conf import settings import random import re class Util: @staticmethod def preprocess(url): r = requests.get(url, allow_redirects=True) filename = str(ra...
[ "cv2.Canny", "numpy.abs", "random.randint", "cv2.erode", "numpy.sum", "cv2.cvtColor", "scipy.stats.normaltest", "numpy.ones", "numpy.argmin", "collections.defaultdict", "cv2.bilateralFilter", "numpy.array", "numpy.arange", "requests.get", "cv2.drawContours", "os.path.join", "cv2.find...
[((255, 294), 'requests.get', 'requests.get', (['url'], {'allow_redirects': '(True)'}), '(url, allow_redirects=True)\n', (267, 294), False, 'import requests\n'), ((1256, 1271), 'numpy.array', 'np.array', (['[128]'], {}), '([128])\n', (1264, 1271), True, 'import numpy as np\n'), ((2312, 2337), 'numpy.ones', 'np.ones', (...
import pytest @pytest.mark.physical_camera def test_image_context_manager(physical_camera_frame_2d): import zivid with physical_camera_frame_2d.image() as image: assert image is not None assert isinstance(image, zivid.Image) @pytest.mark.physical_camera def test_image(physical_camera_frame_...
[ "zivid.Settings2D", "pytest.raises" ]
[((1483, 1501), 'zivid.Settings2D', 'zivid.Settings2D', ([], {}), '()\n', (1499, 1501), False, 'import zivid\n'), ((1268, 1295), 'pytest.raises', 'pytest.raises', (['RuntimeError'], {}), '(RuntimeError)\n', (1281, 1295), False, 'import pytest\n'), ((1598, 1625), 'pytest.raises', 'pytest.raises', (['RuntimeError'], {}),...
from molsysmt._private.exceptions import * from molsysmt._private.digestion import * from molsysmt._private.lists_and_tuples import is_list_or_tuple def merge(molecular_systems, selections='all', structure_indices='all', syntaxis='MolSysMT', to_form=None, check=True): """merge(items=None, selection='all',...
[ "molsysmt._private.lists_and_tuples.is_list_or_tuple" ]
[((1941, 1969), 'molsysmt._private.lists_and_tuples.is_list_or_tuple', 'is_list_or_tuple', (['selections'], {}), '(selections)\n', (1957, 1969), False, 'from molsysmt._private.lists_and_tuples import is_list_or_tuple\n'), ((2192, 2227), 'molsysmt._private.lists_and_tuples.is_list_or_tuple', 'is_list_or_tuple', (['struc...
# Copyright 2021 Research Institute of Systems Planning, 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 applica...
[ "caret_analyze.Lttng" ]
[((1021, 1042), 'caret_analyze.Lttng', 'Lttng', (['args.trace_dir'], {}), '(args.trace_dir)\n', (1026, 1042), False, 'from caret_analyze import Lttng\n')]
# # A collection of useful functions when dealing with emulators # from __future__ import absolute_import, division from __future__ import print_function, unicode_literals import numpy as np from GPy import kern def fix_parameters(bounds): """ Returns lists consisting of (parameter index, value) tuples. ...
[ "numpy.meshgrid", "numpy.zeros", "numpy.apply_along_axis", "numpy.random.normal", "numpy.linspace" ]
[((1725, 1761), 'numpy.linspace', 'np.linspace', (['p1_low', 'p1_high', 'splits'], {}), '(p1_low, p1_high, splits)\n', (1736, 1761), True, 'import numpy as np\n'), ((1777, 1813), 'numpy.linspace', 'np.linspace', (['p2_low', 'p2_high', 'splits'], {}), '(p2_low, p2_high, splits)\n', (1788, 1813), True, 'import numpy as n...
from flask import Flask, render_template, jsonify, make_response, request, send_from_directory from app.util import gzipped import os from clarifai.rest import ClarifaiApp, Image as ClImage, ApiError app = Flask(__name__) app.config.from_object('config') clari = ClarifaiApp(api_key='YOUR-API-KEY') # API k...
[ "clarifai.rest.Image", "clarifai.rest.ClarifaiApp", "flask.Flask", "flask.jsonify", "flask.render_template", "os.path.join" ]
[((208, 223), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (213, 223), False, 'from flask import Flask, render_template, jsonify, make_response, request, send_from_directory\n'), ((265, 300), 'clarifai.rest.ClarifaiApp', 'ClarifaiApp', ([], {'api_key': '"""YOUR-API-KEY"""'}), "(api_key='YOUR-API-KEY')\n"...
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import os import six import warnings def _check_uri(sourceUri): if not os.path.exists(sourceUri): msg = "Unable to read specified path, be sure to the output HTML can read the path: {0}" warnings.warn(msg.format(source...
[ "os.linesep.join", "os.path.exists" ]
[((1452, 1476), 'os.linesep.join', 'os.linesep.join', (['results'], {}), '(results)\n', (1467, 1476), False, 'import os\n'), ((157, 182), 'os.path.exists', 'os.path.exists', (['sourceUri'], {}), '(sourceUri)\n', (171, 182), False, 'import os\n')]
import hmac import json import uuid as u import threading try: from hashlib import sha256 digestmod = sha256 except ImportError: import Crypto.Hash.SHA256 as digestmod sha256 = digestmod.new import six from .enums import PNStatusCategory, PNOperationType, PNPushType from .models.consumer.common imp...
[ "uuid.uuid4", "six.moves.urllib.parse.quote", "json.dumps", "threading.Lock", "six.moves.urllib.parse.urlunsplit" ]
[((1034, 1077), 'six.moves.urllib.parse.quote', 'six.moves.urllib.parse.quote', (['data'], {'safe': '""""""'}), "(data, safe='')\n", (1062, 1077), False, 'import six\n'), ((1807, 1876), 'six.moves.urllib.parse.urlunsplit', 'six.moves.urllib.parse.urlunsplit', (["(scheme, origin, path, params, '')"], {}), "((scheme, ori...
# Copyright (c) 2012 <NAME> # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) # ======================================================================= # along with Eppy. I...
[ "sys.path.append", "eppy.modeleditor.IDF.setiddname", "argparse.ArgumentParser", "eppy.modeleditor.IDF", "itertools.zip_longest", "bs4.BeautifulSoup", "bs4.Tag" ]
[((823, 865), 'sys.path.append', 'sys.path.append', (['pathnameto_eplusscripting'], {}), '(pathnameto_eplusscripting)\n', (838, 865), False, 'import sys\n'), ((4452, 4472), 'bs4.Tag', 'Tag', (['soup'], {'name': '"""tr"""'}), "(soup, name='tr')\n", (4455, 4472), False, 'from bs4 import BeautifulSoup, Tag\n'), ((4674, 46...
import logging import os import socket import sys import threading import time import traceback from concurrent import futures from threading import Thread import grpc from sdk.softfire.grpc import messages_pb2_grpc, messages_pb2 from sdk.softfire.grpc.messages_pb2 import Empty from sdk.softfire.utils import get_conf...
[ "sdk.softfire.grpc.messages_pb2.ListResourceResponse", "logging.error", "traceback.print_exc", "logging.debug", "sdk.softfire.grpc.messages_pb2.Empty", "logging.warning", "sdk.softfire.utils.get_config", "socket.socket", "sdk.softfire.grpc.messages_pb2_grpc.RegistrationServiceStub", "time.sleep", ...
[((736, 783), 'logging.info', 'logging.info', (["('Start listening on %s' % binding)"], {}), "('Start listening on %s' % binding)\n", (748, 783), False, 'import logging\n'), ((1329, 1342), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1339, 1342), False, 'import time\n'), ((1562, 1612), 'sdk.softfire.grpc.messag...
from setuptools import find_packages, setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name="iproc", version="0.1.0", author="<NAME>", author_email="<EMAIL>", description="Simple image processing scripts", long_description=long_description, ...
[ "setuptools.find_packages" ]
[((567, 593), 'setuptools.find_packages', 'find_packages', ([], {'where': '"""src"""'}), "(where='src')\n", (580, 593), False, 'from setuptools import find_packages, setup\n')]
# -*- coding: utf-8 -*- # Copyright 2015 <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 appli...
[ "wsme.types.wsattr", "cloudkitty.api.v1.types.UuidType" ]
[((1003, 1045), 'wsme.types.wsattr', 'wtypes.wsattr', (['wtypes.text'], {'mandatory': '(True)'}), '(wtypes.text, mandatory=True)\n', (1016, 1045), True, 'from wsme import types as wtypes\n'), ((924, 943), 'cloudkitty.api.v1.types.UuidType', 'ck_types.UuidType', ([], {}), '()\n', (941, 943), True, 'from cloudkitty.api.v...
from tkinter import * from tkinter import messagebox import math class Calc: def __init__(self, master): """Constructor method""" self.container = master self.container.title('Simple calculator') self.container.geometry() self.button_font = ('Verda...
[ "tkinter.messagebox.showerror" ]
[((3803, 3866), 'tkinter.messagebox.showerror', 'messagebox.showerror', (['"""Error!"""', '"""You did not enter the number!"""'], {}), "('Error!', 'You did not enter the number!')\n", (3823, 3866), False, 'from tkinter import messagebox\n')]
""" statTests.py -- Handles testing for prpper case by case rounding. -- Functions take in a list of values -- Uses a sample standard deviation -- For more information see : https://github.com/andreasfoulk/FS3 Copyright (c) 2018 <NAME>, <NAME>, <NAME>, <N...
[ "unittest.main", "fs3Stats.FS3CharacterStatistics", "fs3Stats.FS3NumericalStatistics", "fs3Stats.removeEmptyCells" ]
[((14227, 14242), 'unittest.main', 'unittest.main', ([], {}), '()\n', (14240, 14242), False, 'import unittest\n'), ((1062, 1086), 'fs3Stats.FS3NumericalStatistics', 'FS3NumericalStatistics', ([], {}), '()\n', (1084, 1086), False, 'from fs3Stats import FS3CharacterStatistics, FS3NumericalStatistics\n'), ((1272, 1300), '...
import argparse import torch import json import random from pprint import pprint #from utils.misc import mkdirs import time # always uses cuda if avaliable class Parser(argparse.ArgumentParser): def __init__(self): super(Parser, self).__init__(description='FCN with SVGD') # model s...
[ "torch.cuda.is_available" ]
[((2675, 2700), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (2698, 2700), False, 'import torch\n')]
import os import requests from dotenv import load_dotenv from src.test.apiTests.userTests.userBuilder import UserBuilder load_dotenv() userBuilder = UserBuilder() remoteUrl = f"{os.getenv('API_BASE_URL')}/users" validUser = userBuilder.getValidUser() validuserId = userBuilder.getValidUserIdForBasicOpera...
[ "requests.patch", "dotenv.load_dotenv", "requests.delete", "requests.get", "requests.post", "os.getenv", "src.test.apiTests.userTests.userBuilder.UserBuilder" ]
[((131, 144), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (142, 144), False, 'from dotenv import load_dotenv\n'), ((160, 173), 'src.test.apiTests.userTests.userBuilder.UserBuilder', 'UserBuilder', ([], {}), '()\n', (171, 173), False, 'from src.test.apiTests.userTests.userBuilder import UserBuilder\n'), ((479...
# -*- mode: python; coding: utf-8 -* # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 3-clause BSD License import os import copy import shutil import numpy as np import pytest import yaml from packaging import version # packaging is installed with setuptools from astropy import units from ast...
[ "pyuvsim.BeamList", "pyradiosky.SkyModel.from_gleam_catalog", "os.remove", "numpy.load", "astropy.coordinates.Longitude", "pyuvsim.simsetup.parse_frequency_params", "numpy.allclose", "yaml.dump", "numpy.ones", "numpy.isclose", "pyradiosky.SkyModel", "numpy.arange", "yaml.safe_load", "pyuvs...
[((701, 750), 'os.path.join', 'os.path.join', (['SIM_DATA_PATH', '"""HERA_NicCST.uvbeam"""'], {}), "(SIM_DATA_PATH, 'HERA_NicCST.uvbeam')\n", (713, 750), False, 'import os\n'), ((936, 998), 'os.path.join', 'os.path.join', (['SIM_DATA_PATH', '"""5km_triangle_1time_1chan.uvfits"""'], {}), "(SIM_DATA_PATH, '5km_triangle_1...
""" Helpful geometry functions. All functions assume degrees are in Radians unless specified otherwise. """ import math from math import pi from typing import Tuple class Point2D: __slots__ = ( 'x', 'y' ) def __init__(self, x: float = 0.0, y: float = 0.0): self.x = x sel...
[ "math.atan2" ]
[((1938, 1956), 'math.atan2', 'math.atan2', (['dy', 'dx'], {}), '(dy, dx)\n', (1948, 1956), False, 'import math\n')]
import zipfile, os, pathlib def to_zip(path_to_zip: str, objects: list): with zipfile.ZipFile(path_to_zip, 'w') as ZipArchive: for object in objects: if os.path.isdir(object): folder = os.path.abspath(object) for foldername, subfolders, filenames in os...
[ "os.path.abspath", "zipfile.ZipFile", "os.path.basename", "os.path.isdir", "os.walk", "os.path.isfile", "pathlib.Path", "os.path.relpath", "os.path.join" ]
[((90, 123), 'zipfile.ZipFile', 'zipfile.ZipFile', (['path_to_zip', '"""w"""'], {}), "(path_to_zip, 'w')\n", (105, 123), False, 'import zipfile, os, pathlib\n'), ((1249, 1292), 'os.path.join', 'os.path.join', (['where_to_extract', 'output_name'], {}), '(where_to_extract, output_name)\n', (1261, 1292), False, 'import zi...
# Copyright (c) 2008 <NAME> # See LICENSE for details. _zlib = True try: import zlib except ImportError: _zlib = False _hashlib = True try: import hashlib except ImportError: _hashlib = False import md5 as hashlib from binascii import crc32 "Compliant crc32 hashing function. (Most commonly use...
[ "md5.md5" ]
[((1136, 1152), 'md5.md5', 'hashlib.md5', (['key'], {}), '(key)\n', (1147, 1152), True, 'import md5 as hashlib\n')]
# Copyright 2021 solo-learn development 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, publ...
[ "setuptools.find_packages" ]
[((1586, 1661), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['bash_files', 'docs', 'downstream', 'tests', 'zoo']"}), "(exclude=['bash_files', 'docs', 'downstream', 'tests', 'zoo'])\n", (1599, 1661), False, 'from setuptools import find_packages, setup\n')]
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl def plot_2d_points_with_assignment(points, assignment): unique, counts = np.unique(assignment, return_counts=True) k = unique.shape[0] cmap = plt.cm.get_cmap('hsv', k) cmaplist = [cmap(i) for i in range(cmap.N)] k = 0 ...
[ "numpy.arctan2", "matplotlib.pyplot.scatter", "numpy.linalg.eigh", "numpy.linalg.norm", "matplotlib.patches.Ellipse", "matplotlib.pyplot.cm.get_cmap", "numpy.unique", "numpy.sqrt" ]
[((154, 195), 'numpy.unique', 'np.unique', (['assignment'], {'return_counts': '(True)'}), '(assignment, return_counts=True)\n', (163, 195), True, 'import numpy as np\n'), ((232, 257), 'matplotlib.pyplot.cm.get_cmap', 'plt.cm.get_cmap', (['"""hsv"""', 'k'], {}), "('hsv', k)\n", (247, 257), True, 'import matplotlib.pyplo...
from __future__ import annotations import os from argparse import ( ArgumentDefaultsHelpFormatter, ArgumentParser, ArgumentTypeError, Namespace, ) from pathlib import Path from typing import Sequence from pyproject_fmt.formatter.config import DEFAULT_INDENT, Config class PyProjectFmtNamespace(Namesp...
[ "os.access", "pathlib.Path", "argparse.ArgumentParser", "argparse.ArgumentTypeError" ]
[((1288, 1349), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'formatter_class': 'ArgumentDefaultsHelpFormatter'}), '(formatter_class=ArgumentDefaultsHelpFormatter)\n', (1302, 1349), False, 'from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, ArgumentTypeError, Namespace\n'), ((879, 920), 'argparse...
# Copyright (c) 2018 Mycroft AI, Inc. # # This file is part of Mycroft Skills Manager # (see https://github.com/MatthewScholefield/mycroft-light). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional inf...
[ "pytest.raises", "os.path.abspath", "os.path.join", "msm.__main__.main" ]
[((1805, 1826), 'msm.__main__.main', 'main', (['params', 'printer'], {}), '(params, printer)\n', (1809, 1826), False, 'from msm.__main__ import main\n'), ((1139, 1156), 'os.path.abspath', 'abspath', (['__file__'], {}), '(__file__)\n', (1146, 1156), False, 'from os.path import dirname, abspath, join, exists\n'), ((1309,...
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2017 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- from skimage.draw import polygon import numpy a...
[ "numpy.array", "numpy.zeros" ]
[((642, 673), 'numpy.zeros', 'np.zeros', (['(h, w)'], {'dtype': 'np.bool'}), '((h, w), dtype=np.bool)\n', (650, 673), True, 'import numpy as np\n'), ((1134, 1174), 'numpy.zeros', 'np.zeros', (["(R['size'][0] * R['size'][1],)"], {}), "((R['size'][0] * R['size'][1],))\n", (1142, 1174), True, 'import numpy as np\n'), ((73...
from typing import Iterable, Optional import threading from soniox.capture_device import ( AbstractCaptureDevice, MicrophoneCaptureDevice, NUM_CHANNELS, SAMPLE_RATE, ) from soniox.speech_service import ( Client, TranscribeStreamConfig, Result, SpeechContext, ) def transcribe_capture( ...
[ "threading.Event", "soniox.capture_device.MicrophoneCaptureDevice", "soniox.speech_service.TranscribeStreamConfig" ]
[((780, 804), 'soniox.speech_service.TranscribeStreamConfig', 'TranscribeStreamConfig', ([], {}), '()\n', (802, 804), False, 'from soniox.speech_service import Client, TranscribeStreamConfig, Result, SpeechContext\n'), ((2227, 2251), 'soniox.speech_service.TranscribeStreamConfig', 'TranscribeStreamConfig', ([], {}), '(...
""" GTSAM Copyright 2010-2021, Georgia Tech Research Corporation, Atlanta, Georgia 30332-0415 All Rights Reserved See LICENSE for the license information Unit tests for DecisionTreeFactors. Author: <NAME> """ # pylint: disable=no-name-in-module, invalid-name import unittest from gtsam import DecisionTreeFactor, De...
[ "unittest.main", "gtsam.DecisionTreeFactor" ]
[((1321, 1336), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1334, 1336), False, 'import unittest\n'), ((570, 613), 'gtsam.DecisionTreeFactor', 'DecisionTreeFactor', (['[A, B]', '"""1 2 3 4 5 6"""'], {}), "([A, B], '1 2 3 4 5 6')\n", (588, 613), False, 'from gtsam import DecisionTreeFactor, DecisionTreeFact...
from typing import List from django.shortcuts import render, redirect from django.http import Http404, HttpResponse from django.contrib.auth import authenticate, login, logout from django.views.generic.list import ListView from django.views.generic.edit import CreateView, DeleteView, UpdateView from .models import Coun...
[ "django.http.HttpResponse", "django.shortcuts.redirect", "django.contrib.auth.logout", "django.contrib.auth.authenticate", "django.shortcuts.render", "django.contrib.auth.login" ]
[((618, 684), 'django.shortcuts.render', 'render', (['request', '"""tour.html"""', "{'tour': tour, 'comments': comments}"], {}), "(request, 'tour.html', {'tour': tour, 'comments': comments})\n", (624, 684), False, 'from django.shortcuts import render, redirect\n'), ((1242, 1327), 'django.shortcuts.render', 'render', ([...
import os chessboard_dir = './chessboard_images/' stickyplates_dir = './stickyplate_images/' undistortedplates_dir = './undistorted_images' paths = [f"{chessboard_dir}/output_allbnw", f"{chessboard_dir}/output_success", f"{chessboard_dir}/result_params", undistortedplates_dir, stick...
[ "os.system" ]
[((458, 488), 'os.system', 'os.system', (['f"""rm -rf {p}/*.jpg"""'], {}), "(f'rm -rf {p}/*.jpg')\n", (467, 488), False, 'import os\n'), ((507, 533), 'os.system', 'os.system', (['f"""rm -rf {p}/*"""'], {}), "(f'rm -rf {p}/*')\n", (516, 533), False, 'import os\n')]