code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import BeautifulSoup from HTMLParser import HTMLParseError from django.conf import settings import re DJANGOFEEDS_REMOVE_TRACKERS = getattr(settings, "DJANGOFEEDS_REMOVE_TRACKERS", True) # The obvious tracker images DJANGOFEEDS_TRACKER_SERVICES = getattr(settings, "DJANGOFEEDS_TRACKER_SERVICES", [ 'http:/...
[ "BeautifulSoup.BeautifulSoup" ]
[((2418, 2451), 'BeautifulSoup.BeautifulSoup', 'BeautifulSoup.BeautifulSoup', (['html'], {}), '(html)\n', (2445, 2451), False, 'import BeautifulSoup\n')]
import uuid import json from commander.commands.Command import Command from commander.data_classes.Filter import Filter class AddFilterCommand(Command): """ Add a filter for the camera command. """ def __init__(self): Command.__init__(self) def execute(self, **kwargs): """ ...
[ "commander.data_classes.Filter.Filter", "uuid.uuid1", "commander.commands.Command.Command.__init__", "json.dumps" ]
[((245, 267), 'commander.commands.Command.Command.__init__', 'Command.__init__', (['self'], {}), '(self)\n', (261, 267), False, 'from commander.commands.Command import Command\n'), ((1413, 1421), 'commander.data_classes.Filter.Filter', 'Filter', ([], {}), '()\n', (1419, 1421), False, 'from commander.data_classes.Filter...
# <NAME> and <NAME> import unittest import games_api import json class APITester(unittest.TestCase): def setUp(self): self.games_api = games_api.GamesApi() #change depending on how we code it, will it be a class? def tearDown(self): pass def test_games_endpoint(self): url = '/ga...
[ "unittest.main", "games_api.GamesApi" ]
[((3561, 3576), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3574, 3576), False, 'import unittest\n'), ((150, 170), 'games_api.GamesApi', 'games_api.GamesApi', ([], {}), '()\n', (168, 170), False, 'import games_api\n')]
# # Copyright 2018 the original author or authors. # # 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...
[ "twisted.internet.defer.failure.Failure", "twisted.internet.reactor.callLater" ]
[((3187, 3257), 'twisted.internet.reactor.callLater', 'reactor.callLater', (['(0)', 'self.perform_vlan_tagging'], {'add_tag': 'self._add_tag'}), '(0, self.perform_vlan_tagging, add_tag=self._add_tag)\n', (3204, 3257), False, 'from twisted.internet import reactor\n'), ((13956, 13974), 'twisted.internet.defer.failure.Fai...
import sys import os # Leave the path changes here!!! sys.path.append(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) import networkx as nx import matplotlib.pyplot as plt from src.accelerated_graph_features.test_python_converter import crea...
[ "src.accelerated_graph_features.test_python_converter.create_graph", "matplotlib.pyplot.show", "os.path.dirname", "matplotlib.pyplot.axis", "networkx.spring_layout", "networkx.draw", "networkx.draw_networkx_labels" ]
[((369, 384), 'src.accelerated_graph_features.test_python_converter.create_graph', 'create_graph', (['i'], {}), '(i)\n', (381, 384), False, 'from src.accelerated_graph_features.test_python_converter import create_graph\n'), ((396, 415), 'networkx.spring_layout', 'nx.spring_layout', (['G'], {}), '(G)\n', (412, 415), Tru...
from flask_testing import LiveServerTestCase import cornflow_client as cf import json from cornflow.app import create_app from cornflow.commands import AccessInitialization from cornflow.shared.utils import db from cornflow.tests.const import PREFIX from cornflow.models import UserModel, UserRoleModel from cornflow.s...
[ "cornflow.commands.AccessInitialization", "cornflow.shared.utils.db.drop_all", "cornflow.models.UserRoleModel", "cornflow.app.create_app", "cornflow.shared.utils.db.create_all", "cornflow.shared.utils.db.session.remove", "cornflow_client.CornFlow", "cornflow.shared.utils.db.session.commit" ]
[((507, 528), 'cornflow.app.create_app', 'create_app', (['"""testing"""'], {}), "('testing')\n", (517, 528), False, 'from cornflow.app import create_app\n'), ((605, 628), 'cornflow_client.CornFlow', 'cf.CornFlow', ([], {'url': 'server'}), '(url=server)\n', (616, 628), True, 'import cornflow_client as cf\n'), ((1432, 14...
from google.appengine.ext import ndb class User(ndb.Model): name = ndb.StringProperty() @classmethod def get_or_create(cls, name): if not name: return None user = ndb.Key('User', name).get() if not user: user = User(name=name, id=name) user.pu...
[ "google.appengine.ext.ndb.StringProperty", "google.appengine.ext.ndb.Key" ]
[((74, 94), 'google.appengine.ext.ndb.StringProperty', 'ndb.StringProperty', ([], {}), '()\n', (92, 94), False, 'from google.appengine.ext import ndb\n'), ((208, 229), 'google.appengine.ext.ndb.Key', 'ndb.Key', (['"""User"""', 'name'], {}), "('User', name)\n", (215, 229), False, 'from google.appengine.ext import ndb\n'...
from collections import deque import logging import gevent from .base import PoolSink from ..asynchronous import AsyncResult from ..constants import (Int, ChannelState, SinkProperties, SinkRole) from ..sink import ( ClientMessageSink, SinkProvider, FailingMessageSink ) from ..dispatch import ServiceClosedError ...
[ "collections.deque", "gevent.spawn", "logging.getLogger" ]
[((1315, 1361), 'logging.getLogger', 'logging.getLogger', (['"""scales.pool.WatermarkPool"""'], {}), "('scales.pool.WatermarkPool')\n", (1332, 1361), False, 'import logging\n'), ((1903, 1910), 'collections.deque', 'deque', ([], {}), '()\n', (1908, 1910), False, 'from collections import deque\n'), ((1931, 1938), 'collec...
from som.primitives.primitives import Primitives from som.vm.globals import nilObject, falseObject, trueObject from som.vmobjects.primitive import AstPrimitive as Primitive from som.vm.universe import std_print, std_println from rpython.rlib import rgc, jit import time def _load(ivkbl, rcvr, args): argument =...
[ "som.vm.universe.std_println", "rpython.rlib.rgc.collect", "som.vmobjects.primitive.AstPrimitive", "time.time" ]
[((1175, 1188), 'som.vm.universe.std_println', 'std_println', ([], {}), '()\n', (1186, 1188), False, 'from som.vm.universe import std_print, std_println\n'), ((1599, 1612), 'rpython.rlib.rgc.collect', 'rgc.collect', ([], {}), '()\n', (1610, 1612), False, 'from rpython.rlib import rgc, jit\n'), ((1255, 1266), 'time.time...
#! /usr/bin/env python import os,sys import cv2, re import numpy as np try: from pyutil import PyLogger except ImportError: from .. import PyLogger __author__ = "<NAME>" __credits__ = ["<NAME>"] __version__ = "0.0.1" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" SRC_TYPE_NAME = ["WebCam","Video","IPCam"] OUTPUT_V...
[ "cv2.VideoWriter_fourcc", "cv2.waitKey", "cv2.imshow", "cv2.VideoCapture", "numpy.amax", "numpy.where", "numpy.array", "re.search", "cv2.destroyAllWindows", "os.path.join", "pyutil.PyLogger" ]
[((566, 596), 'pyutil.PyLogger', 'PyLogger', ([], {'log': 'log', 'debug': 'debug'}), '(log=log, debug=debug)\n', (574, 596), False, 'from pyutil import PyLogger\n'), ((987, 1023), 'cv2.VideoWriter_fourcc', 'cv2.VideoWriter_fourcc', (['*SAVE_FORMAT'], {}), '(*SAVE_FORMAT)\n', (1009, 1023), False, 'import cv2, re\n'), ((...
import unittest from django.test import Client from django.urls import reverse from rest_framework import status client = Client() class VerifyTestCases(unittest.TestCase): def setUp(self): self.valid_payload = { 'third_party_company_name': 'UD Saragih Tbk' } self.valid_payl...
[ "django.urls.reverse", "django.test.Client" ]
[((124, 132), 'django.test.Client', 'Client', ([], {}), '()\n', (130, 132), False, 'from django.test import Client\n'), ((657, 682), 'django.urls.reverse', 'reverse', (['"""verify_company"""'], {}), "('verify_company')\n", (664, 682), False, 'from django.urls import reverse\n'), ((937, 962), 'django.urls.reverse', 'rev...
""" Functions to fix off file headers """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from multiprocessing import Pool from ocnn.utils.file_utils import find_files def clean_off_file(file_name): """ Fixes header of OFF file Args: file_na...
[ "ocnn.utils.file_utils.find_files", "multiprocessing.Pool" ]
[((1000, 1006), 'multiprocessing.Pool', 'Pool', ([], {}), '()\n', (1004, 1006), False, 'from multiprocessing import Pool\n'), ((1023, 1065), 'ocnn.utils.file_utils.find_files', 'find_files', (['input_folder', '"""*.[Oo][Ff][Ff]"""'], {}), "(input_folder, '*.[Oo][Ff][Ff]')\n", (1033, 1065), False, 'from ocnn.utils.file_...
from kivy.app import App from kivy.lang import Builder from kivy.properties import StringProperty, ObjectProperty from kivy.uix.floatlayout import FloatLayout from kivy.uix.anchorlayout import AnchorLayout Builder.load_string(""" <Boxes>: AnchorLayout: anchor_x: 'center' anchor_y: 'top' siz...
[ "kivy.properties.StringProperty", "kivy.lang.Builder.load_string" ]
[((207, 2761), 'kivy.lang.Builder.load_string', 'Builder.load_string', (['"""\n<Boxes>:\n AnchorLayout:\n anchor_x: \'center\'\n anchor_y: \'top\'\n size_hint: 1, .9\n BoxLayout: \n orientation: \'vertical\'\n padding: 10\n\n BoxLayout:\n pa...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function, division import subprocess from scipy.stats import chi2 TESTFILE_TEMPLATE = """#include <iostream> #include "Chi2PLookup.h" int main() {{ Chi2PLookup Chi2PLookupTable; double x = {0}; int df = {1}; double outvalu...
[ "subprocess.call", "scipy.stats.chi2.cdf" ]
[((1206, 1242), 'subprocess.call', 'subprocess.call', (['command'], {'shell': '(True)'}), '(command, shell=True)\n', (1221, 1242), False, 'import subprocess\n'), ((1261, 1284), 'scipy.stats.chi2.cdf', 'chi2.cdf', (['testvalue', 'df'], {}), '(testvalue, df)\n', (1269, 1284), False, 'from scipy.stats import chi2\n')]
import datetime def julian_to_datetime(input_string: str): """ :param: input_string String to be converted :rtype: datetime object """ if len(input_string) == 5: date = datetime.datetime.strptime(input_string, '%y%j') elif len(input_string) == 7: date = datetime.datetime.st...
[ "datetime.datetime.strptime" ]
[((201, 249), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['input_string', '"""%y%j"""'], {}), "(input_string, '%y%j')\n", (227, 249), False, 'import datetime\n'), ((300, 348), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['input_string', '"""%Y%j"""'], {}), "(input_string, '%Y%j')\n", ...
import string import tkinter from search_option import SearchOption class GUI: def __init__(self) -> None: self.window = None self.entries_known_character = [] self.entry_contain_characters = None self.entry_remove_characters = None self.check_remove_duplicate = None ...
[ "tkinter.StringVar", "tkinter.Checkbutton", "tkinter.Entry", "tkinter.Listbox", "tkinter.BooleanVar", "search_option.SearchOption", "tkinter.Frame", "tkinter.Label", "tkinter.Tk" ]
[((566, 578), 'tkinter.Tk', 'tkinter.Tk', ([], {}), '()\n', (576, 578), False, 'import tkinter\n'), ((691, 728), 'tkinter.Frame', 'tkinter.Frame', (['self.window'], {'width': '(200)'}), '(self.window, width=200)\n', (704, 728), False, 'import tkinter\n'), ((1203, 1251), 'tkinter.Label', 'tkinter.Label', (['self.frame_o...
import tkinter TIMER = 0 FONT = "Times New Roman" def count_up(): global TIMER TIMER += 1 label["text"] = TIMER root.after(1000, count_up) # 1초 후, count_up함수를 재실행 if __name__ == "__main__": root = tkinter.Tk() label = tkinter.Label(font=(FONT, 80)) label.pack() root.after(1000, c...
[ "tkinter.Label", "tkinter.Tk" ]
[((223, 235), 'tkinter.Tk', 'tkinter.Tk', ([], {}), '()\n', (233, 235), False, 'import tkinter\n'), ((249, 279), 'tkinter.Label', 'tkinter.Label', ([], {'font': '(FONT, 80)'}), '(font=(FONT, 80))\n', (262, 279), False, 'import tkinter\n')]
"""Example of count data sampled from negative-binomial distribution """ import numpy as np from matplotlib import pyplot as plt from scipy import stats from sklearn.model_selection import train_test_split from xgboost_distribution import XGBDistribution def generate_count_data(n_samples=10_000): X = np.random.u...
[ "numpy.random.uniform", "numpy.meshgrid", "numpy.random.seed", "matplotlib.pyplot.show", "xgboost_distribution.XGBDistribution", "numpy.random.negative_binomial", "sklearn.model_selection.train_test_split", "numpy.linspace", "numpy.cos", "matplotlib.pyplot.subplots" ]
[((309, 344), 'numpy.random.uniform', 'np.random.uniform', (['(-2)', '(0)', 'n_samples'], {}), '(-2, 0, n_samples)\n', (326, 344), True, 'import numpy as np\n'), ((421, 474), 'numpy.random.negative_binomial', 'np.random.negative_binomial', ([], {'n': 'n', 'p': 'p', 'size': 'n_samples'}), '(n=n, p=p, size=n_samples)\n',...
# This file is automatically generated by EBNFParser. from Ruikowa.ObjectRegex.Tokenizer import unique_literal_cache_pool, regex_matcher, char_matcher, str_matcher, Tokenizer from Ruikowa.ObjectRegex.Node import AstParser, Ref, SeqParser, LiteralValueParser, LiteralNameParser, Undef namespace = globals() recur_searcher...
[ "Ruikowa.ObjectRegex.Tokenizer.Tokenizer.from_raw_strings", "Ruikowa.ObjectRegex.Node.LiteralNameParser", "Ruikowa.ObjectRegex.Tokenizer.char_matcher", "Ruikowa.ObjectRegex.Tokenizer.str_matcher", "Ruikowa.ObjectRegex.Node.SeqParser" ]
[((1037, 1065), 'Ruikowa.ObjectRegex.Node.LiteralNameParser', 'LiteralNameParser', (['"""keyword"""'], {}), "('keyword')\n", (1054, 1065), False, 'from Ruikowa.ObjectRegex.Node import AstParser, Ref, SeqParser, LiteralValueParser, LiteralNameParser, Undef\n'), ((974, 1026), 'Ruikowa.ObjectRegex.Tokenizer.Tokenizer.from...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. def test(mod, path, entity = None): import re # ignore anyhting but Firefox if mod not in ("netwerk", "dom", "tool...
[ "re.match" ]
[((1285, 1337), 're.match', 're.match', (['"""browser\\\\.search\\\\.order\\\\.[1-9]"""', 'entity'], {}), "('browser\\\\.search\\\\.order\\\\.[1-9]', entity)\n", (1293, 1337), False, 'import re\n'), ((1353, 1414), 're.match', 're.match', (['"""browser\\\\.contentHandlers\\\\.types\\\\.[0-5]"""', 'entity'], {}), "('brow...
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from django.contrib.auth.views import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', TemplateView.as_view(template_na...
[ "django.contrib.admin.autodiscover", "django.views.generic.TemplateView.as_view", "django.conf.urls.include", "django.conf.urls.url" ]
[((224, 244), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (242, 244), False, 'from django.contrib import admin\n'), ((382, 457), 'django.conf.urls.url', 'url', (['"""^api-token-auth/"""', '"""rest_framework.authtoken.views.obtain_auth_token"""'], {}), "('^api-token-auth/', 'rest_framewo...
import os import numpy as np import tensorflow as tf from utils.recorder import RecorderTf2 as Recorder class Base(tf.keras.Model): def __init__(self, a_dim_or_list, action_type, base_dir): super().__init__() physical_devices = tf.config.experimental.list_physical_devices('GPU') if len(p...
[ "os.path.join", "tensorflow.summary.scalar", "os.makedirs", "utils.recorder.RecorderTf2", "tensorflow.config.experimental.set_memory_growth", "os.path.exists", "tensorflow.summary.experimental.set_step", "tensorflow.Variable", "numpy.array", "tensorflow.train.latest_checkpoint", "tensorflow.kera...
[((252, 303), 'tensorflow.config.experimental.list_physical_devices', 'tf.config.experimental.list_physical_devices', (['"""GPU"""'], {}), "('GPU')\n", (296, 303), True, 'import tensorflow as tf\n'), ((514, 552), 'tensorflow.keras.backend.set_floatx', 'tf.keras.backend.set_floatx', (['"""float64"""'], {}), "('float64')...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import sys import heapq def readerLine(fn): with open(fn, 'rb') as file: while True: yield next(file).decode('utf-8').rstrip('\r\n') def show_top(k, scores, lst): h = [] for i, s ...
[ "heapq.heappush", "six.moves.range", "heapq.heappop" ]
[((346, 372), 'heapq.heappush', 'heapq.heappush', (['h', '(s, -i)'], {}), '(h, (s, -i))\n', (360, 372), False, 'import heapq\n'), ((439, 455), 'heapq.heappop', 'heapq.heappop', (['h'], {}), '(h)\n', (452, 455), False, 'import heapq\n'), ((398, 414), 'heapq.heappop', 'heapq.heappop', (['h'], {}), '(h)\n', (411, 414), Fa...
#!/usr/bin/env python3 from marshmallow import fields from marshmallow_sqlalchemy import SQLAlchemyAutoSchema from model import Reporter class ReporterSchema(SQLAlchemyAutoSchema): name = fields.String(required=True) key = fields.String(required=True) class Meta: dump_only = ['id', 'created', 'i...
[ "marshmallow.fields.String" ]
[((195, 223), 'marshmallow.fields.String', 'fields.String', ([], {'required': '(True)'}), '(required=True)\n', (208, 223), False, 'from marshmallow import fields\n'), ((234, 262), 'marshmallow.fields.String', 'fields.String', ([], {'required': '(True)'}), '(required=True)\n', (247, 262), False, 'from marshmallow import...
from unittest import main, TestCase from modules.bmp280 import BMP280 bmp = BMP280() bmp.start() class TestModuleBMP280(TestCase): def test_read_temperatura(self): medida_temperatura = bmp.read('Temperatura') assert (medida_temperatura >= 0) or (medida_temperatura <= 100) def test_read_press...
[ "modules.bmp280.BMP280" ]
[((78, 86), 'modules.bmp280.BMP280', 'BMP280', ([], {}), '()\n', (84, 86), False, 'from modules.bmp280 import BMP280\n')]
import base64 import jwt import hashlib import time from datetime import timedelta from datetime import datetime DEFAULT_TASK_TYPE = "CMEF" class TaskType: @staticmethod def value_of(task_type: str) -> int: return { "UNKNOWN": 1, "INTERNAL": 2, "CM": 3, ...
[ "datetime.datetime.now", "jwt.encode", "datetime.timedelta", "time.time" ]
[((1257, 1268), 'time.time', 'time.time', ([], {}), '()\n', (1266, 1268), False, 'import time\n'), ((1687, 1701), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1699, 1701), False, 'from datetime import datetime\n'), ((1767, 1800), 'datetime.timedelta', 'timedelta', ([], {'days': 'num_days', 'hours': '(5)'...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_core.rq_database.ipynb (unless otherwise specified). __all__ = ['get_release', 'get_user_release_rating', 'update_user_release_rating', 'delete_user_release_rating', 'get_community_release_rating', 'get_master_release', 'get_releases_related_to_master_relea...
[ "requests.put", "requests.delete", "requests.get" ]
[((1272, 1321), 'requests.get', 'requests.get', (['url'], {'headers': 'headers', 'params': 'params'}), '(url, headers=headers, params=params)\n', (1284, 1321), False, 'import requests\n'), ((2067, 2116), 'requests.get', 'requests.get', (['url'], {'headers': 'headers', 'params': 'params'}), '(url, headers=headers, param...
# -*- coding:utf-8 -*- # -------------------------------------------------------- # Copyright (C), 2016-2021, lizhe, All rights reserved # -------------------------------------------------------- # @Name: standard_excel_reader.py # @Author: lizhe # @Created: 2021/7/3 - 22:14 # --------------------------...
[ "automotive.logger.logger.logger.info", "automotive.logger.logger.logger.debug", "xlwings.App", "os.system", "automotive.application.common.enums.ModifyTypeEnum.read_excel_from_name", "automotive.application.common.constants.Testcase" ]
[((734, 766), 'os.system', 'os.system', (['"""pip install xlwings"""'], {}), "('pip install xlwings')\n", (743, 766), False, 'import os\n'), ((1233, 1270), 'xlwings.App', 'xw.App', ([], {'visible': '(False)', 'add_book': '(False)'}), '(visible=False, add_book=False)\n', (1239, 1270), True, 'import xlwings as xw\n'), ((...
import os import HFSSdrawpy.libraries.example_elements as elt from HFSSdrawpy import Body, Modeler from HFSSdrawpy.parameters import GAP, TRACK # import HFSSdrawpy.libraries.base_elements as base pm = Modeler("hfss") relative = pm.set_variable("1mm") main = Body(pm, "main") chip = Body(pm, "chip", rel_coor=[["1mm...
[ "os.getcwd", "HFSSdrawpy.libraries.example_elements.create_port", "HFSSdrawpy.Body", "HFSSdrawpy.Modeler", "HFSSdrawpy.libraries.example_elements.draw_connector" ]
[((204, 219), 'HFSSdrawpy.Modeler', 'Modeler', (['"""hfss"""'], {}), "('hfss')\n", (211, 219), False, 'from HFSSdrawpy import Body, Modeler\n'), ((263, 279), 'HFSSdrawpy.Body', 'Body', (['pm', '"""main"""'], {}), "(pm, 'main')\n", (267, 279), False, 'from HFSSdrawpy import Body, Modeler\n'), ((288, 381), 'HFSSdrawpy.Bo...
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-12-19 15:27 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('metadata', '0003_metadataconfig'), ] op...
[ "django.db.models.DateTimeField" ]
[((1033, 1072), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (1053, 1072), False, 'from django.db import migrations, models\n')]
# This example client takes a PDB file, sends it to the REST service, which # creates HSSP data. The HSSP data is then output to the console. # api by https://github.com/cmbi/xssp-api/blob/master/xssp_api/frontend/api/endpoints.py import json import requests import time REST_URL = "https://www3.cmbi.umcn.nl/xssp/" ...
[ "requests.post", "json.loads", "requests.get", "time.sleep" ]
[((1261, 1299), 'requests.post', 'requests.post', (['url_create'], {'data': 'pdb_id'}), '(url_create, data=pdb_id)\n', (1274, 1299), False, 'import requests\n'), ((1975, 1993), 'json.loads', 'json.loads', (['r.text'], {}), '(r.text)\n', (1985, 1993), False, 'import json\n'), ((2518, 2542), 'requests.get', 'requests.get...
import os import torch from copy import deepcopy from src.agents.agents import * from src.utils.setup import process_config from src.utils.utils import load_json def run(config_path, gpu_device=-1): config = process_config(config_path) if gpu_device >= 0: config.gpu_device = [gpu_device] AgentClas...
[ "os.path.join", "argparse.ArgumentParser", "src.utils.setup.process_config" ]
[((214, 241), 'src.utils.setup.process_config', 'process_config', (['config_path'], {}), '(config_path)\n', (228, 241), False, 'from src.utils.setup import process_config\n'), ((982, 1007), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1005, 1007), False, 'import argparse\n'), ((523, 575), 'o...
import os import pygame from game_defines import DIRECTIONS ASSET_BASE = os.path.join(os.path.dirname(__file__), "assets") class Actor(object): @staticmethod def asset(name): return os.path.join(ASSET_BASE, name) def __init__(self, name, image_path, actor_type, startx, starty): self...
[ "os.path.dirname", "os.path.join" ]
[((93, 118), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (108, 118), False, 'import os\n'), ((206, 236), 'os.path.join', 'os.path.join', (['ASSET_BASE', 'name'], {}), '(ASSET_BASE, name)\n', (218, 236), False, 'import os\n')]
""" Various simple (basic) functions in the "utilities". The MIT License (MIT) Originally created at 8/31/20, for Python 3.x Copyright (c) 2021 <NAME> (<EMAIL>) & Stanford Geometric Computing Lab """ import torch import multiprocessing as mp import dask.dataframe as dd from torch import nn from sklearn.model_selectio...
[ "torch.nn.LogSoftmax", "dask.dataframe.from_pandas", "sklearn.model_selection.train_test_split", "multiprocessing.cpu_count" ]
[((687, 731), 'dask.dataframe.from_pandas', 'dd.from_pandas', (['df'], {'npartitions': 'n_partitions'}), '(df, npartitions=n_partitions)\n', (701, 731), True, 'import dask.dataframe as dd\n'), ((1046, 1066), 'torch.nn.LogSoftmax', 'nn.LogSoftmax', ([], {'dim': '(1)'}), '(dim=1)\n', (1059, 1066), False, 'from torch impo...
from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from functools import partial from time import sleep from variaveis import * from controler_palavras import buscar_palavra from aprende import adicionar_resposta import os def iniciar(browser, botao_entrada, nome=''): ...
[ "functools.partial", "controler_palavras.buscar_palavra", "aprende.adicionar_resposta", "os.system", "time.sleep", "selenium.webdriver.support.ui.WebDriverWait" ]
[((375, 401), 'selenium.webdriver.support.ui.WebDriverWait', 'WebDriverWait', (['browser', '(25)'], {}), '(browser, 25)\n', (388, 401), False, 'from selenium.webdriver.support.ui import WebDriverWait\n'), ((2765, 2813), 'os.system', 'os.system', (["('cls' if os.name == 'nt' else 'clear')"], {}), "('cls' if os.name == '...
# Copyright 2019 the ProGraML authors. # # Contact <NAME> <<EMAIL>>. # # 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 a...
[ "numpy.arange", "labm8.py.app.DEFINE_string", "numpy.argmax" ]
[((928, 1167), 'labm8.py.app.DEFINE_string', 'app.DEFINE_string', (['"""batch_scores_averaging_method"""', '"""weighted"""', '"""Selects the averaging method to use when computing recall/precision/F1 scores. See <https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html>"""'], {}), "('batch_scores...
import collections import os import numpy as np import tensorflow as tf from pysc2.lib import actions from tensorflow.contrib import layers from tensorflow.contrib.layers.python.layers.optimizers import OPTIMIZER_SUMMARIES from actorcritic.policy import FullyConvPolicy from common.preprocess import ObsProcesser, FEATUR...
[ "tensorflow.reduce_sum", "tensorflow.clip_by_value", "tensorflow.trainable_variables", "tensorflow.get_collection", "tensorflow.global_variables", "tensorflow.assign", "common.util.ravel_index_pairs", "tensorflow.variable_scope", "tensorflow.minimum", "tensorflow.placeholder", "tensorflow.summar...
[((1528, 1605), 'collections.namedtuple', 'collections.namedtuple', (['"""SelectedLogProbs"""', "['action_id', 'spatial', 'total']"], {}), "('SelectedLogProbs', ['action_id', 'spatial', 'total'])\n", (1550, 1605), False, 'import collections\n'), ((3882, 3922), 'os.makedirs', 'os.makedirs', (['summary_path'], {'exist_ok...
#!/usr/bin/env python """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLD...
[ "django.db.models.signals.post_save.disconnect", "django.contrib.auth.get_user_model", "django.contrib.contenttypes.models.ContentType.objects.get_for_model", "django.conf.settings.AUTH_USER_MODEL.rpartition", "django.db.models.signals.post_save.connect" ]
[((4473, 4524), 'django.db.models.signals.post_save.connect', 'post_save.connect', (['add_view_permission', 'ContentType'], {}), '(add_view_permission, ContentType)\n', (4490, 4524), False, 'from django.db.models.signals import post_save\n'), ((3116, 3156), 'django.conf.settings.AUTH_USER_MODEL.rpartition', 'settings.A...
from django.db import models from django.contrib.auth.models import User from article.models import Article class Comment(models.Model): owner = models.ForeignKey(User, verbose_name="作者") article = models.ForeignKey(Article, verbose_name="文章ID") content = models.CharField("评论内容", max_length=1000) to_...
[ "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.CharField", "django.db.models.DateTimeField" ]
[((152, 194), 'django.db.models.ForeignKey', 'models.ForeignKey', (['User'], {'verbose_name': '"""作者"""'}), "(User, verbose_name='作者')\n", (169, 194), False, 'from django.db import models\n'), ((209, 256), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Article'], {'verbose_name': '"""文章ID"""'}), "(Article, verb...
import re import base64 from urllib.parse import urljoin _pattern = re.compile(r"dynamicurl\|(?P<path>.+?)\|wzwsquestion\|(?P<question>.+?)\|wzwsfactor\|(?P<factor>\d+)") def decrypt_wzws(text: str) -> str: # noinspection PyBroadException try: return _decrypt_by_python(text) except Exception: ...
[ "urllib.parse.urljoin", "re.compile" ]
[((71, 188), 're.compile', 're.compile', (['"""dynamicurl\\\\|(?P<path>.+?)\\\\|wzwsquestion\\\\|(?P<question>.+?)\\\\|wzwsfactor\\\\|(?P<factor>\\\\d+)"""'], {}), "(\n 'dynamicurl\\\\|(?P<path>.+?)\\\\|wzwsquestion\\\\|(?P<question>.+?)\\\\|wzwsfactor\\\\|(?P<factor>\\\\d+)'\n )\n", (81, 188), False, 'import re\...
import csv import random import sys def populate_test_csv(): f = open('test.csv', 'w') with f: input_fields = ['time_step', 'PlantOnSched', 'HeatingSetpointSchedule'] temp_change = [1, -1] plant_on_sched_last = 52 heating_setpoint_schedule_last = 20 writer = csv.DictW...
[ "random.randint", "csv.DictWriter" ]
[((311, 353), 'csv.DictWriter', 'csv.DictWriter', (['f'], {'fieldnames': 'input_fields'}), '(f, fieldnames=input_fields)\n', (325, 353), False, 'import csv\n'), ((1219, 1261), 'csv.DictWriter', 'csv.DictWriter', (['f'], {'fieldnames': 'input_fields'}), '(f, fieldnames=input_fields)\n', (1233, 1261), False, 'import csv\...
#!/usr/bin/env python # coding:utf-8 from __future__ import print_function #import sys import re import glob import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt all_files = glob.glob('../*/dat_L*_tau_inf') list_L = [] list_N = [] list_mx = [] list_mz0mz1 = [] list_ene = [] for ...
[ "matplotlib.pyplot.plot", "matplotlib.pyplot.gca", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.use", "numpy.array", "glob.glob", "matplotlib.pyplot.xlabel", "re.sub", "numpy.fromstring" ]
[((147, 168), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (161, 168), False, 'import matplotlib\n'), ((214, 246), 'glob.glob', 'glob.glob', (['"""../*/dat_L*_tau_inf"""'], {}), "('../*/dat_L*_tau_inf')\n", (223, 246), False, 'import glob\n'), ((2106, 2118), 'matplotlib.pyplot.figure', 'plt.fig...
#libs import pygame import datetime #modules from modules.gui import UserInterface from modules.sprites import Sprites from modules.supplies import Supplies from modules.workers import Workers from modules.demand import Demand from modules.gamelogic import Actions pygame.init() window = pygame.display.se...
[ "pygame.quit", "pygame.event.get", "pygame.display.set_mode", "modules.workers.Workers", "modules.sprites.Sprites", "pygame.init", "pygame.mouse.get_pos", "pygame.sprite.Group", "pygame.display.update", "modules.gamelogic.Actions", "modules.gui.UserInterface", "pygame.font.Font", "modules.de...
[((279, 292), 'pygame.init', 'pygame.init', ([], {}), '()\n', (290, 292), False, 'import pygame\n'), ((303, 339), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(1280, 720)'], {}), '((1280, 720))\n', (326, 339), False, 'import pygame\n'), ((368, 412), 'pygame.font.Font', 'pygame.font.Font', (['"""./font/kenny...
#!/usr/bin/env python # encoding: utf-8 import argparse import prody import os import shutil import subprocess import numpy from os.path import join GMX_PATH = '/usr/local/gromacs/bin/' mdp_string = ''' define = -DPOSRES integrator = {integrator} nsteps = 1000 emtol = 1 nstlist = 1 coulombtype = Cut-off vdwtype =...
[ "os.mkdir", "subprocess.Popen", "argparse.ArgumentParser", "prody.PDBEnsemble", "os.path.join", "os.path.isdir", "prody.AtomGroup", "numpy.argmin", "prody.parsePDB", "shutil.rmtree", "prody.writePDB", "os.chdir", "subprocess.check_call" ]
[((534, 625), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Generate trajectory with gaussian flucutations."""'}), "(description=\n 'Generate trajectory with gaussian flucutations.')\n", (557, 625), False, 'import argparse\n'), ((7413, 7467), 'prody.writePDB', 'prody.writePDB', (['ou...
import argparse import glob import os import xml.etree.ElementTree as ET from xml.dom import minidom class Merger: def __init__(self): self._filelist = [] pass def prettify(self, elem): xmlstr = ET.tostring(elem, 'utf-8').replace('\n', '') while "> " in xmlstr: xmlst...
[ "xml.etree.ElementTree.parse", "os.remove", "argparse.ArgumentParser", "xml.dom.minidom.parseString", "xml.etree.ElementTree.Element", "xml.etree.ElementTree.tostring", "os.path.join" ]
[((1346, 1400), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Gamelist merger"""'}), "(description='Gamelist merger')\n", (1369, 1400), False, 'import argparse\n'), ((444, 471), 'xml.dom.minidom.parseString', 'minidom.parseString', (['xmlstr'], {}), '(xmlstr)\n', (463, 471), False, 'fro...
"""Commandline script for docconvert.""" import argparse import logging import os import subprocess import sys from six.moves import input from . import configuration from . import core from . import parser from . import writer _LOGGER = logging.getLogger(__name__) def setup_logger(verbose=False): """Setup b...
[ "sys.stdout.write", "subprocess.Popen", "argparse.ArgumentParser", "logging.basicConfig", "six.moves.input", "os.path.dirname", "os.path.exists", "os.path.isfile", "os.path.expanduser", "logging.getLogger" ]
[((243, 270), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (260, 270), False, 'import logging\n'), ((632, 683), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': 'log_format', 'level': 'level'}), '(format=log_format, level=level)\n', (651, 683), False, 'import logging\n'), (...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ This module defines filters for Cell instances """ from __future__ import print_function import copy import numpy as np from tunacell.filters.main import FilterGeneral, bounded, included, FilterAND from tunacell.base.datatools import multiplicative_increments from tu...
[ "tunacell.filters.main.included", "copy.deepcopy", "numpy.abs", "numpy.amin", "tunacell.base.datatools.multiplicative_increments", "tunacell.filters.main.bounded", "tunacell.base.observable.Observable", "numpy.amax", "numpy.array" ]
[((6363, 6391), 'tunacell.base.observable.Observable', 'Observable', ([], {'name': '"""undefined"""'}), "(name='undefined')\n", (6373, 6391), False, 'from tunacell.base.observable import Observable\n'), ((4970, 5062), 'tunacell.filters.main.included', 'included', (["cell.data['time']"], {'lower_bound': 'self.lower_boun...
import json import logging from aiohttp import web log = logging.getLogger(__name__) class AuthorizeView(web.View): async def get(self): log.info('Requested URL: %s', self.request.path_qs) log.info('Requested Remote: %s', self.request.remote) if self.request.can_read_body: d...
[ "aiohttp.web.Response", "json.loads", "logging.getLogger", "json.dumps" ]
[((60, 87), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (77, 87), False, 'import logging\n'), ((497, 525), 'aiohttp.web.Response', 'web.Response', ([], {'text': '"""Welcome"""'}), "(text='Welcome')\n", (509, 525), False, 'from aiohttp import web\n'), ((931, 959), 'aiohttp.web.Response'...
import torch import torch.distributed as dist from common import distributed_test import pytest @distributed_test(world_size=3) def test_init(): assert dist.is_initialized() assert dist.get_world_size() == 3 assert dist.get_rank() < 3 # Demonstration of pytest's parameterization @pytest.mark.parametri...
[ "torch.distributed.is_initialized", "torch.distributed.all_reduce", "torch.ones", "torch.distributed.get_rank", "common.distributed_test", "torch.distributed.get_world_size", "pytest.mark.parametrize", "torch.all" ]
[((101, 131), 'common.distributed_test', 'distributed_test', ([], {'world_size': '(3)'}), '(world_size=3)\n', (117, 131), False, 'from common import distributed_test\n'), ((299, 358), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""number,color"""', "[(1138, 'purple')]"], {}), "('number,color', [(1138, 'pur...
# -*- coding: utf-8 -*- ############################################# ## (C)opyright by <NAME> ## ## All rights reserved ## ############################################# __version__ = "$Revision: 176 $" __author__ = "$Author: kgrodzicki $" __date__ = "$Date: 2011-01-15 10:11:47 +0100 (Fr...
[ "os.remove" ]
[((746, 768), 'os.remove', 'os.remove', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (755, 768), False, 'import sys, os\n')]
import yaml def read_creds(conf_path): with open(conf_path, 'r') as cf: config = yaml.load(cf, Loader=yaml.FullLoader) return config
[ "yaml.load" ]
[((94, 131), 'yaml.load', 'yaml.load', (['cf'], {'Loader': 'yaml.FullLoader'}), '(cf, Loader=yaml.FullLoader)\n', (103, 131), False, 'import yaml\n')]
from setuptools import setup, find_packages setup(name='fate', version='1.0', packages=find_packages())
[ "setuptools.find_packages" ]
[((88, 103), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (101, 103), False, 'from setuptools import setup, find_packages\n')]
import logging from core.authentication import VKAuthentication from core.models import Boec, UserApply from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers, status, viewsets from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated fr...
[ "core.models.UserApply.objects.get", "rest_framework.response.Response", "rest_framework.decorators.action", "core.models.Boec.objects.create", "django.utils.translation.ugettext_lazy", "logging.getLogger" ]
[((457, 484), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (474, 484), False, 'import logging\n'), ((651, 688), 'rest_framework.decorators.action', 'action', ([], {'methods': "['get']", 'detail': '(False)'}), "(methods=['get'], detail=False)\n", (657, 688), False, 'from rest_framework.d...
import errno import pytest from tempfile import TemporaryDirectory from unittest.mock import patch import docker import escapism from repo2docker.app import Repo2Docker from repo2docker.__main__ import make_r2d from repo2docker.utils import chdir def test_find_image(): images = [{"RepoTags": ["some-org/some-rep...
[ "unittest.mock.patch.object", "tempfile.TemporaryDirectory", "repo2docker.__main__.make_r2d", "unittest.mock.patch", "pytest.raises", "repo2docker.utils.chdir", "docker.errors.DockerException", "escapism.escape", "repo2docker.app.Repo2Docker" ]
[((1560, 1573), 'repo2docker.app.Repo2Docker', 'Repo2Docker', ([], {}), '()\n', (1571, 1573), False, 'from repo2docker.app import Repo2Docker\n'), ((1815, 1829), 'repo2docker.__main__.make_r2d', 'make_r2d', (['argv'], {}), '(argv)\n', (1823, 1829), False, 'from repo2docker.__main__ import make_r2d\n'), ((2001, 2014), '...
from nose.tools import istest, assert_equal from mammoth.html_generation import HtmlGenerator, satisfy_html_path from mammoth import html_paths @istest def generates_empty_string_when_newly_created(): generator = HtmlGenerator() assert_equal("", generator.html_string()) @istest def html_escapes_text(): ...
[ "mammoth.html_generation.satisfy_html_path", "mammoth.html_paths.element", "mammoth.html_generation.HtmlGenerator" ]
[((220, 235), 'mammoth.html_generation.HtmlGenerator', 'HtmlGenerator', ([], {}), '()\n', (233, 235), False, 'from mammoth.html_generation import HtmlGenerator, satisfy_html_path\n'), ((333, 348), 'mammoth.html_generation.HtmlGenerator', 'HtmlGenerator', ([], {}), '()\n', (346, 348), False, 'from mammoth.html_generatio...
# -*- coding: utf-8 -*- import json import logging from django.test.client import Client from networkapi.test.test_case import NetworkApiTestCase log = logging.getLogger(__name__) class PoolTestV3Case(NetworkApiTestCase): maxDiff = None def setUp(self): self.client = Client() def tearDown(se...
[ "django.test.client.Client", "logging.getLogger", "json.dumps" ]
[((155, 182), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (172, 182), False, 'import logging\n'), ((291, 299), 'django.test.client.Client', 'Client', ([], {}), '()\n', (297, 299), False, 'from django.test.client import Client\n'), ((1607, 1648), 'json.dumps', 'json.dumps', (['response....
#!/usr/bin/env python3 ''' designed for cronjobs where /build and /sources are mount on the system. They need to be mounted under the same parent directory. e.g. /mnt/seadev/build for /build /mnt/seadev/sources for /sources ''' import psycopg2 import argparse import re import os import sys import inspect import t...
[ "dynamic_parser.wrapper", "argparse.ArgumentParser", "os.path.join", "traceback.print_tb", "os.path.isdir", "os.fsdecode", "os.path.exists", "static_parser.wrapper", "traceback.print_exception", "dependency_resolver.resolve_deps", "os.path.splitext", "sys.exc_info", "inspect.currentframe", ...
[((4566, 4589), 'os.path.isdir', 'os.path.isdir', (['mnt_path'], {}), '(mnt_path)\n', (4579, 4589), False, 'import os\n'), ((8326, 8351), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (8349, 8351), False, 'import argparse\n'), ((1206, 1239), 're.search', 're.search', (['bn_regex', 'buildnum_ra...
import os import select import signal from datetime import datetime from io import TextIOWrapper from pty import openpty from pwd import getpwnam, struct_passwd from subprocess import Popen from termios import ONLCR, tcgetattr, TCSANOW, tcsetattr from threading import Thread from time import sleep from typing import An...
[ "pty.openpty", "select.poll", "os.environ.copy", "termios.tcsetattr", "os.close", "os.path.join", "threading.Thread.__init__", "os.getgid", "os.setuid", "pwd.getpwnam", "datetime.datetime.now", "os.read", "os.chmod", "threading.Thread.join", "os.stat", "time.sleep", "os.listdir", "...
[((3066, 3080), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (3078, 3080), False, 'from datetime import datetime\n'), ((1156, 1176), 'os.chmod', 'os.chmod', (['path', 'mode'], {}), '(path, mode)\n', (1164, 1176), False, 'import os\n'), ((1239, 1255), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n',...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
[ "nicos.core.params.intrange", "nicos.core.params.listof", "nicos.core.params.Param" ]
[((2118, 2208), 'nicos.core.params.Param', 'Param', (['"""Filetype specific subdirectory name"""'], {'type': 'subdir', 'mandatory': '(False)', 'default': '""""""'}), "('Filetype specific subdirectory name', type=subdir, mandatory=False,\n default='')\n", (2123, 2208), False, 'from nicos.core.params import Param, int...
# -*- coding: utf-8 -*- # Copyright © 2021 by <NAME>. All rights reserved # # 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 u...
[ "pandera.io.from_yaml", "ndj_pipeline.utils.clean_column_names", "pandas.read_csv", "logging.info", "pathlib.Path" ]
[((2246, 2273), 'pathlib.Path', 'Path', (['"""data"""', '"""titanic.csv"""'], {}), "('data', 'titanic.csv')\n", (2250, 2273), False, 'from pathlib import Path\n'), ((2278, 2325), 'logging.info', 'logging.info', (['f"""Loading data from {input_path}"""'], {}), "(f'Loading data from {input_path}')\n", (2290, 2325), False...
from ast import ( Module, Suite, FunctionDef, AsyncFunctionDef, Assign, AnnAssign, For, AsyncFor, With, AsyncWith, Num, Str, Bytes, NameConstant, ExtSlice, arguments, arg, ) from quiche.pal.pal_block import ( PALIdentifier, PALLeaf, PALPri...
[ "quiche.pal.pal_block.SliceBlock", "quiche.pal.pal_block.ArgBlock", "quiche.pal.pal_block.WithItemBlock", "quiche.pal.pal_block.ExprBlock", "quiche.pal.pal_block.StmtBlock", "quiche.pal.pal_block.PALIdentifier" ]
[((879, 899), 'quiche.pal.pal_block.StmtBlock', 'StmtBlock', (['node.body'], {}), '(node.body)\n', (888, 899), False, 'from quiche.pal.pal_block import PALIdentifier, PALLeaf, PALPrimitive, StmtBlock, ExprBlock, SliceBlock, ArgBlock, WithItemBlock\n'), ((1079, 1099), 'quiche.pal.pal_block.StmtBlock', 'StmtBlock', (['no...
#Form classes can be declared here and imported into the routes view #More to come soon from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import DataRequired class TestForm(FlaskForm): username = StringField('Username', validators=[Dat...
[ "wtforms.BooleanField", "wtforms.SubmitField", "wtforms.validators.DataRequired" ]
[((422, 449), 'wtforms.BooleanField', 'BooleanField', (['"""Remember Me"""'], {}), "('Remember Me')\n", (434, 449), False, 'from wtforms import StringField, PasswordField, BooleanField, SubmitField\n'), ((463, 485), 'wtforms.SubmitField', 'SubmitField', (['"""Sign In"""'], {}), "('Sign In')\n", (474, 485), False, 'from...
""" MIT License Copyright (c) 2022 <NAME> (https://github.com/vadniks) 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, m...
[ "threading.Thread", "json.loads", "time.sleep", "requests.get", "requests.post" ]
[((2931, 2950), 'threading.Thread', 'Thread', ([], {'target': 'wait'}), '(target=wait)\n', (2937, 2950), False, 'from threading import Thread\n'), ((3528, 3548), 'json.loads', 'json.loads', (['rsp.text'], {}), '(rsp.text)\n', (3538, 3548), False, 'import json\n'), ((4503, 4523), 'json.loads', 'json.loads', (['rsp.text'...
from pyspark.sql import SparkSession class SparkSessionBuilder: @staticmethod def build(): spark = SparkSession \ .builder \ .config("spark.jars.packages", "org.apache.hadoop:hadoop-aws:2.7.0,") \ .master("local[*]") \ .getOrCreate() re...
[ "pyspark.sql.SparkSession.builder.config" ]
[((118, 211), 'pyspark.sql.SparkSession.builder.config', 'SparkSession.builder.config', (['"""spark.jars.packages"""', '"""org.apache.hadoop:hadoop-aws:2.7.0,"""'], {}), "('spark.jars.packages',\n 'org.apache.hadoop:hadoop-aws:2.7.0,')\n", (145, 211), False, 'from pyspark.sql import SparkSession\n')]
import hydra from omegaconf import DictConfig @hydra.main(config_path="conf", config_name="config.yaml") def main(cfg: DictConfig) -> None: print(cfg) if __name__ == "__main__": main()
[ "hydra.main" ]
[((48, 105), 'hydra.main', 'hydra.main', ([], {'config_path': '"""conf"""', 'config_name': '"""config.yaml"""'}), "(config_path='conf', config_name='config.yaml')\n", (58, 105), False, 'import hydra\n')]
# -*- coding: utf-8 -*- """ Created on Sat Oct 10 22:57:42 2020 @author: ninjaac """ """ Given a string, find the first non-repeating character in it and return its index. If it doesn't exist, return -1. Examples: s = "leetcode" return 0. s = "loveleetcode" return 2. """ from collections import C...
[ "collections.Counter" ]
[((489, 499), 'collections.Counter', 'Counter', (['s'], {}), '(s)\n', (496, 499), False, 'from collections import Counter\n')]
#!/usr/bin/python # # Gpprefdecrypt - Decrypt the password of local users added via Windows 2008 Group Policy Preferences. # # This tool decrypts the cpassword attribute value embedded in the Groups.xml file stored in the domain controller's Sysvol share. # # Updated by <NAME> # Edited to run with Python 3.x...
[ "sys.exit", "codecs.getdecoder", "base64.b64decode" ]
[((841, 871), 'codecs.getdecoder', 'codecs.getdecoder', (['"""hex_codec"""'], {}), "('hex_codec')\n", (858, 871), False, 'import sys, codecs\n'), ((1064, 1084), 'base64.b64decode', 'b64decode', (['cpassword'], {}), '(cpassword)\n', (1073, 1084), False, 'from base64 import b64decode\n'), ((1483, 1494), 'sys.exit', 'sys....
from glob import glob import os, sys, re USAGE = """Usage: mk_symbols_file [PATTERN]... Make resources/symbols.txt, using the files matching given PATTERN(s). Each PATTERN must contain exactly one "*" wildcard, for the location in the path of the symbol. Earlier patterns have precedence over later ones. Exampl...
[ "glob.glob" ]
[((1077, 1084), 'glob.glob', 'glob', (['p'], {}), '(p)\n', (1081, 1084), False, 'from glob import glob\n')]
# Generated by Django 3.0.4 on 2020-05-30 01:00 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('owners', '0002_ownersmodel'), ] operations = [ migrations.DeleteModel( name='OwnersModel', ), ]
[ "django.db.migrations.DeleteModel" ]
[((219, 261), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""OwnersModel"""'}), "(name='OwnersModel')\n", (241, 261), False, 'from django.db import migrations\n')]
# -*- coding: utf-8 -*- """ Created on Mon Mar 16 18:04:26 2020 @author: hp """ import pandas as pd import numpy as np ratings= pd.read_csv('ratings.csv') movies= pd.read_csv(r'movies.csv' ) ts = ratings['timestamp'] ts = pd.to_datetime(ts, unit = 's').dt.hour movies['hours'] = ts merged = ratin...
[ "pandas.DataFrame", "numpy.stack", "pandas.read_csv", "numpy.min", "numpy.max", "pandas.to_datetime" ]
[((141, 167), 'pandas.read_csv', 'pd.read_csv', (['"""ratings.csv"""'], {}), "('ratings.csv')\n", (152, 167), True, 'import pandas as pd\n'), ((177, 202), 'pandas.read_csv', 'pd.read_csv', (['"""movies.csv"""'], {}), "('movies.csv')\n", (188, 202), True, 'import pandas as pd\n'), ((1461, 1489), 'pandas.read_csv', 'pd.r...
# A neural network which approximates linear function y = 2x + 3. # The network has 1 layer with 1 node, which has 1 input (and a bias). # As there is no activation effectively this node is a linear function. # After +/- 10.000 iterations W should be close to 2 and B should be close to 3. import matplotlib.pyplot as p...
[ "matplotlib.pyplot.title", "numpy.set_printoptions", "numpy.random.seed", "matplotlib.pyplot.show", "numpy.sum", "numpy.average", "numpy.array", "numpy.random.normal", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((343, 420), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'formatter': "{'float': '{: 0.3f}'.format}", 'linewidth': 'np.inf'}), "(formatter={'float': '{: 0.3f}'.format}, linewidth=np.inf)\n", (362, 420), True, 'import numpy as np\n'), ((421, 438), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n'...
# Licensed to SkyAPM org under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. SkyAPM org licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except in co...
[ "os.walk", "os.path.join", "sys.exit" ]
[((1981, 1991), 'os.walk', 'os.walk', (['d'], {}), '(d)\n', (1988, 1991), False, 'import os\n'), ((2796, 2807), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (2804, 2807), False, 'import sys\n'), ((2329, 2357), 'os.path.join', 'os.path.join', (['root', 'filename'], {}), '(root, filename)\n', (2341, 2357), False, 'imp...
# # The MIT License # # Copyright 2020 Vector Informatik, GmbH. # # 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, ...
[ "threading.Thread", "os.remove", "subprocess.Popen", "argparse.ArgumentParser", "os.path.basename", "vector.apps.DataAPI.vcproject_api.VCProjectApi", "time.sleep", "threading.Lock", "os.path.isfile", "io.open", "glob.glob", "sys.exit" ]
[((1737, 1743), 'threading.Lock', 'Lock', ([], {}), '()\n', (1741, 1743), False, 'from threading import Thread, Lock, Semaphore\n'), ((1762, 1787), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1785, 1787), False, 'import sys, os, subprocess, argparse, glob, shutil\n'), ((4015, 4047), 'vector...
__author__ = "Robin 'r0w' Weiland" __date__ = "2019-05-07" __version__ = "0.0.0" from configparser import ConfigParser from io import StringIO, TextIOWrapper from warnings import warn class Section: _config = None _name = str() def __getattribute__(self, item): return super(Section, self).__getattribute...
[ "warnings.warn", "pathlib.Path" ]
[((2878, 2953), 'warnings.warn', 'warn', (['f"""failed loading {section}:{option}; returned fallback; {e.__name__}"""'], {}), "(f'failed loading {section}:{option}; returned fallback; {e.__name__}')\n", (2882, 2953), False, 'from warnings import warn\n'), ((3426, 3524), 'pathlib.Path', 'Path', (['"""C:\\\\Users\\\\robi...
import asyncio import discord import sys from discord.ext import commands from utils import checks from mods.cog import Cog class Commands(Cog): def __init__(self, bot): super().__init__(bot) self.cursor = bot.mysql.cursor self.escape = bot.escape @commands.group(pass_context=True, aliases=['setprefix', 'chan...
[ "utils.checks.is_owner", "utils.checks.admin_or_perm", "asyncio.sleep", "discord.ext.commands.group" ]
[((259, 376), 'discord.ext.commands.group', 'commands.group', ([], {'pass_context': '(True)', 'aliases': "['setprefix', 'changeprefix']", 'invoke_without_command': '(True)', 'no_pm': '(True)'}), "(pass_context=True, aliases=['setprefix', 'changeprefix'],\n invoke_without_command=True, no_pm=True)\n", (273, 376), Fal...
import requests import re import os import itertools from bs4 import BeautifulSoup as beSo from clint.textui import colored def check_structure(name, basedir): # Check if the question folder exists for the name passed. status = True if not os.path.exists(os.path.join(basedir, f'{name}')) or not \ os.pat...
[ "clint.textui.colored.red", "os.getcwd", "re.findall", "requests.get", "bs4.BeautifulSoup", "os.path.join" ]
[((845, 918), 'requests.get', 'requests.get', (['f"""https://codeforces.com/contest/{contest_number}/problems"""'], {}), "(f'https://codeforces.com/contest/{contest_number}/problems')\n", (857, 918), False, 'import requests\n'), ((930, 968), 'bs4.BeautifulSoup', 'beSo', (['load_page.content', '"""html.parser"""'], {}),...
# -*- coding: utf-8 -*- import requests import json from requests.status_codes import codes from .exceptions import ( UserAlreadyExists, NotFound, UserNotFound, GroupNotFound, GroupMissingID, UserMissingID, GroupUpdatedSimultaneous, UserAlreadyMember, UserUpdatedSimultaneous, De...
[ "requests.Session", "json.loads", "json.dumps" ]
[((1101, 1119), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1117, 1119), False, 'import requests\n'), ((6040, 6068), 'json.loads', 'json.loads', (['response.content'], {}), '(response.content)\n', (6050, 6068), False, 'import json\n'), ((7382, 7410), 'json.loads', 'json.loads', (['response.content'], {})...
import os import sys import argparse sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../')) from vedacls.runner import InferenceRunner from vedacls.utils import Config def parse_args(): parser = argparse.ArgumentParser(description='Demo') parser.add_argument('config', type=str, help='config file ...
[ "os.path.dirname", "vedacls.utils.Config.fromfile", "argparse.ArgumentParser", "vedacls.runner.InferenceRunner" ]
[((214, 257), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Demo"""'}), "(description='Demo')\n", (237, 257), False, 'import argparse\n'), ((742, 770), 'vedacls.utils.Config.fromfile', 'Config.fromfile', (['args.config'], {}), '(args.config)\n', (757, 770), False, 'from vedacls.utils im...
import pytest from odis.entities import * from django.db import models class Sut(): class States(models.TextChoices): FIRST = ('one', 'the first state') SECOND = ('two', 'the second state') THIRD = ('three', 'the third state') SHORTER = ('s', 'two part tuple') ANY = ('any'...
[ "pytest.raises" ]
[((1367, 1402), 'pytest.raises', 'pytest.raises', (['StateTransitionError'], {}), '(StateTransitionError)\n', (1380, 1402), False, 'import pytest\n'), ((1726, 1761), 'pytest.raises', 'pytest.raises', (['UndefinedActionError'], {}), '(UndefinedActionError)\n', (1739, 1761), False, 'import pytest\n')]
#""" #This file is part of Happypanda. #Happypanda is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation, either version 2 of the License, or #any later version. #Happypanda is distributed in the hope that it will be u...
[ "PIL.ImageChops.difference", "os.mkdir", "sys.platform.startswith", "os.remove", "send2trash.send2trash", "os.path.isfile", "shutil.rmtree", "app_constants.NOTIF_BAR.add_text", "os.path.join", "subprocess.check_call", "PIL.Image.merge", "os.path.abspath", "hashlib.sha1", "os.path.exists", ...
[((1094, 1121), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1111, 1121), False, 'import logging\n'), ((8077, 8099), 'os.path.split', 'os.path.split', (['db_path'], {}), '(db_path)\n', (8090, 8099), False, 'import os\n'), ((8117, 8150), 'os.path.join', 'os.path.join', (['base_path', '"...
#!/usr/bin/env python import sys import socket import logging import json class EventListener(): def __init__(self): self.logger = logging.getLogger('Event Listener') self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) def write_stdout(self, s): # only eventlistener proto...
[ "sys.stdout.write", "logging.basicConfig", "socket.socket", "json.dumps", "sys.stdout.flush", "sys.exit", "sys.stderr.write", "sys.stderr.flush", "sys.stdin.readline", "logging.getLogger" ]
[((2360, 2455), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""/tmp/eventlistener.log"""', 'format': 'format', 'level': 'logging.DEBUG'}), "(filename='/tmp/eventlistener.log', format=format, level\n =logging.DEBUG)\n", (2379, 2455), False, 'import logging\n'), ((146, 181), 'logging.getLogger', '...
import tensorflow as tf from model2 import model flags = tf.compat.v1.app.flags FLAGS = flags.FLAGS flags.DEFINE_string('model', '', 'Model to restore') model.load_weights(FLAGS.model, by_name=True, skip_mismatch=True) model.save('converted.h5')
[ "model2.model.load_weights", "model2.model.save" ]
[((156, 221), 'model2.model.load_weights', 'model.load_weights', (['FLAGS.model'], {'by_name': '(True)', 'skip_mismatch': '(True)'}), '(FLAGS.model, by_name=True, skip_mismatch=True)\n', (174, 221), False, 'from model2 import model\n'), ((223, 249), 'model2.model.save', 'model.save', (['"""converted.h5"""'], {}), "('co...
import numpy as np import matplotlib.pyplot as plt import numpy as np import matplotlib.pyplot as plt from numpy import log10 as lg from numpy import pi as pi from scipy.interpolate import interp1d as sp_interp1d from scipy.integrate import odeint from scipy.integrate import ode import warnings import timeit import sci...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.axes", "numpy.genfromtxt", "matplotlib.pyplot.rc", "matplotlib.pyplot.tick_params", "matplotlib.ticker.MultipleLocator", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots_adjust" ]
[((1228, 1255), 'matplotlib.pyplot.rc', 'plt.rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (1234, 1255), True, 'import matplotlib.pyplot as plt\n'), ((1310, 1367), 'matplotlib.pyplot.tick_params', 'plt.tick_params', ([], {'axis': '"""both"""', 'which': '"""minor"""', 'labelsize': '(18)'}), "(a...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for split miniImageNET 100 experiment. """ from __future__ import print_function import argparse import o...
[ "numpy.random.seed", "argparse.ArgumentParser", "utils.utils.average_acc_stats_across_runs", "tensorflow.reset_default_graph", "numpy.ones", "utils.utils.average_fgt_stats_across_runs", "tensorflow.ConfigProto", "numpy.arange", "utils.vis_utils.snapshot_experiment_meta_data", "utils.data_utils.con...
[((3393, 3425), 'os.path.join', 'os.path.join', (['logdir', 'model_name'], {}), '(logdir, model_name)\n', (3405, 3425), False, 'import os\n'), ((4050, 4135), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Script for split miniImagenet experiment."""'}), "(description='Script for split mi...
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from tilec.fg import dBnudT,get_mix """ compute various conversion factors for LFI bandpasses """ TCMB = 2.726 # Kelvin TCMB_uK = 2.726e6 # micro-Kelvin hplanck = 6.626068e-34 # MKS kboltz = 1.3806503e-23 # MKS clight = 2997924...
[ "numpy.trapz", "tilec.fg.dBnudT", "numpy.array", "numpy.exp", "numpy.loadtxt", "tilec.fg.get_mix" ]
[((506, 534), 'numpy.array', 'np.array', (['[30.0, 44.0, 70.0]'], {}), '([30.0, 44.0, 70.0])\n', (514, 534), True, 'import numpy as np\n'), ((714, 738), 'numpy.loadtxt', 'np.loadtxt', (['LFI_files[i]'], {}), '(LFI_files[i])\n', (724, 738), True, 'import numpy as np\n'), ((888, 924), 'numpy.trapz', 'np.trapz', (['LFI_lo...
# main app file from typing import Optional from fastapi import FastAPI, UploadFile, File, Request from fastapi.responses import HTMLResponse import json, os from pydantic import BaseModel from fastapi.templating import Jinja2Templates from mangum import Mangum # Create app, just like in Flask app = FastAPI() templat...
[ "os.mkdir", "random.randint", "mangum.Mangum", "os.path.exists", "fastapi.templating.Jinja2Templates", "fastapi.File", "os.listdir", "fastapi.FastAPI" ]
[((303, 312), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (310, 312), False, 'from fastapi import FastAPI, UploadFile, File, Request\n'), ((325, 363), 'fastapi.templating.Jinja2Templates', 'Jinja2Templates', ([], {'directory': '"""templates"""'}), "(directory='templates')\n", (340, 363), False, 'from fastapi.templa...
import os import pathlib path_to_folder = pathlib.Path('.', 'folder_to_scan') def scan_folder_select_star(folder_to_scan=path_to_folder): with os.scandir(folder_to_scan) as dir_iterator: for file in dir_iterator: print(file.name) def main(): scan_folder_select_star() if __name__ == '...
[ "pathlib.Path", "os.listdir", "os.scandir" ]
[((43, 78), 'pathlib.Path', 'pathlib.Path', (['"""."""', '"""folder_to_scan"""'], {}), "('.', 'folder_to_scan')\n", (55, 78), False, 'import pathlib\n'), ((357, 383), 'os.listdir', 'os.listdir', (['path_to_folder'], {}), '(path_to_folder)\n', (367, 383), False, 'import os\n'), ((150, 176), 'os.scandir', 'os.scandir', (...
# pylint: disable=no-name-in-module, f0401 from flask import request from flask.ext.login import login_required, current_user from app import app from app.database import session from app.util import serve_response, serve_error from app.modules.event_manager.models import Event from app.modules.project_manager.models i...
[ "app.app.route", "app.modules.submission_manager.runner.Runner", "os.mkdir", "app.database.session.query", "time.time", "app.modules.event_manager.models.Event.log", "app.util.serve_response", "app.util.serve_error", "os.path.join" ]
[((665, 712), 'app.app.route', 'app.route', (['"""/api/submissions"""'], {'methods': "['POST']"}), "('/api/submissions', methods=['POST'])\n", (674, 712), False, 'from app import app\n'), ((1881, 1910), 'app.app.route', 'app.route', (['"""/api/submissions"""'], {}), "('/api/submissions')\n", (1890, 1910), False, 'from ...
from django import forms from django.contrib.auth.models import User from django.contrib.postgres.forms import SimpleArrayField from projects.models import Buy, Project, IAA, AgencyOffice from projects.widgets import DurationMultiWidget from form_utils.forms import BetterModelForm from form_utils.widgets import AutoRes...
[ "django.forms.CharField", "django.contrib.auth.models.User.objects.filter", "projects.widgets.DurationMultiWidget" ]
[((956, 973), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (971, 973), False, 'from django import forms\n'), ((1319, 1336), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (1334, 1336), False, 'from django import forms\n'), ((1788, 1831), 'django.contrib.auth.models.User.objects.filter'...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 9 14:34:04 2019 @author: weiruchen """ from VorDiff.reverse_operator import ReverseOperator as rop from VorDiff.reverse_autodiff import ReverseAutoDiff as rad def create_reverse_vector(array): x, y = rad.reverse_vector(array) return x, y...
[ "VorDiff.reverse_autodiff.ReverseAutoDiff.reverse_vector", "VorDiff.reverse_autodiff.ReverseAutoDiff.partial_vector", "VorDiff.reverse_autodiff.ReverseAutoDiff.partial_scalar", "VorDiff.reverse_operator.ReverseOperator.sin", "VorDiff.reverse_operator.ReverseOperator.cos" ]
[((612, 622), 'VorDiff.reverse_operator.ReverseOperator.sin', 'rop.sin', (['x'], {}), '(x)\n', (619, 622), True, 'from VorDiff.reverse_operator import ReverseOperator as rop\n'), ((279, 304), 'VorDiff.reverse_autodiff.ReverseAutoDiff.reverse_vector', 'rad.reverse_vector', (['array'], {}), '(array)\n', (297, 304), True,...
import pytest from idact.core.auth import AuthMethod from idact.detail.allocation.allocation_parameters import AllocationParameters from idact.detail.config.client.client_cluster_config import ClusterConfigImpl from idact.detail.nodes.node_impl import NodeImpl from idact.detail.nodes.nodes_impl import NodesImpl from i...
[ "idact.detail.nodes.nodes_impl.NodesImpl.deserialize", "idact.detail.config.client.client_cluster_config.ClusterConfigImpl", "pytest.raises", "idact.detail.allocation.allocation_parameters.AllocationParameters", "idact.detail.nodes.node_impl.NodeImpl" ]
[((418, 503), 'idact.detail.config.client.client_cluster_config.ClusterConfigImpl', 'ClusterConfigImpl', ([], {'host': '"""localhost1"""', 'port': '(1)', 'user': '"""user-1"""', 'auth': 'AuthMethod.ASK'}), "(host='localhost1', port=1, user='user-1', auth=AuthMethod.ASK\n )\n", (435, 503), False, 'from idact.detail.c...
""" A minimal Django app, just one file. See: http://olifante.blogs.com/covil/2010/04/minimal-django.html """ import os from django.conf.urls.defaults import patterns from django.core.mail import send_mail from django.http import HttpResponse filepath, extension = os.path.splitext(__file__) ROOT_URLCONF = os.path.b...
[ "django.http.HttpResponse", "os.path.basename", "django.core.mail.send_mail", "os.path.splitext", "django.conf.urls.defaults.patterns" ]
[((269, 295), 'os.path.splitext', 'os.path.splitext', (['__file__'], {}), '(__file__)\n', (285, 295), False, 'import os\n'), ((311, 337), 'os.path.basename', 'os.path.basename', (['filepath'], {}), '(filepath)\n', (327, 337), False, 'import os\n'), ((578, 609), 'django.conf.urls.defaults.patterns', 'patterns', (['"""""...
from kivy.app import App from kivy.lang import Builder from kivy.factory import Factory from kivy.clock import Clock from kivy.properties import ( NumericProperty, StringProperty, BooleanProperty, ) import asynckivy as ak import kivy_garden.draggable class Magnet(Factory.Widget): ''' Inspired by http...
[ "kivy.clock.Clock.create_trigger", "kivy.lang.Builder.load_string", "asynckivy.animate", "kivy.properties.BooleanProperty", "kivy.properties.StringProperty", "kivy.properties.NumericProperty", "asynckivy.sleep_forever" ]
[((383, 404), 'kivy.properties.BooleanProperty', 'BooleanProperty', (['(True)'], {}), '(True)\n', (398, 404), False, 'from kivy.properties import NumericProperty, StringProperty, BooleanProperty\n'), ((425, 443), 'kivy.properties.NumericProperty', 'NumericProperty', (['(1)'], {}), '(1)\n', (440, 443), False, 'from kivy...
from tensorwatch.stream import Stream s1 = Stream(stream_name='s1', console_debug=True) s2 = Stream(stream_name='s2', console_debug=True) s3 = Stream(stream_name='s3', console_debug=True) s1.subscribe(s2) s2.subscribe(s3) s3.write('S3 wrote this') s2.write('S2 wrote this') s1.write('S1 wrote this')
[ "tensorwatch.stream.Stream" ]
[((45, 89), 'tensorwatch.stream.Stream', 'Stream', ([], {'stream_name': '"""s1"""', 'console_debug': '(True)'}), "(stream_name='s1', console_debug=True)\n", (51, 89), False, 'from tensorwatch.stream import Stream\n'), ((95, 139), 'tensorwatch.stream.Stream', 'Stream', ([], {'stream_name': '"""s2"""', 'console_debug': '...
import os import argparse from detect.eval.src.config import prepare_cfg, prepare_weight from detect.eval.src.dataset import prepare_dataset from detect.eval.src.detector import Detector def parse_arg(): parser = argparse.ArgumentParser(description='YOLO v3 evaluation') parser.add_argument('--bs', type=int, ...
[ "detect.eval.src.config.prepare_cfg", "detect.eval.src.config.prepare_weight", "argparse.ArgumentParser", "detect.eval.src.dataset.prepare_dataset" ]
[((220, 277), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""YOLO v3 evaluation"""'}), "(description='YOLO v3 evaluation')\n", (243, 277), False, 'import argparse\n'), ((1025, 1098), 'detect.eval.src.dataset.prepare_dataset', 'prepare_dataset', ([], {'name': 'args.name', 'reso': 'args.re...
''' An Elman Network is implemented, taking the output of the last time step of the time series as prediction, and also to compute the training loss. This is done because this output is thought of as the most informed one. ''' import torch from torch import nn from sklearn.preprocessing import MaxAbsScaler from sklea...
[ "sys.stdout.write", "torch.argmax", "sklearn.metrics.accuracy_score", "random.shuffle", "sklearn.preprocessing.MaxAbsScaler", "torch.nn.Softmax", "sys.stdout.flush", "torch.device", "os.path.join", "sklearn.metrics.precision_recall_fscore_support", "importlib.util.module_from_spec", "os.path.e...
[((572, 646), 'importlib.util.spec_from_file_location', 'importlib.util.spec_from_file_location', (['chosen_experiment', 'experiment_path'], {}), '(chosen_experiment, experiment_path)\n', (610, 646), False, 'import importlib\n'), ((656, 693), 'importlib.util.module_from_spec', 'importlib.util.module_from_spec', (['spec...
from gamehelper import card2str import sqlite3 # Database column information PLAYER_ROUND_ID_COLUMN = 0 PLAYER_USER_ID_COLUMN = 1 PLAYER_TABLE_ID_COLUMN = 2 PLAYER_INITIAL_STACK_COLUMN = 3 PLAYER_STACK_COLUMN = 4 PLAYER_MY_TURN_COLUMN = 5 PLAYER_HAND1_COLUMN = 6 PLAYER_HAND2_COLUM...
[ "sqlite3.connect", "gamehelper.card2str" ]
[((1371, 1408), 'gamehelper.card2str', 'card2str', (['player[PLAYER_HAND1_COLUMN]'], {}), '(player[PLAYER_HAND1_COLUMN])\n', (1379, 1408), False, 'from gamehelper import card2str\n'), ((1425, 1462), 'gamehelper.card2str', 'card2str', (['player[PLAYER_HAND2_COLUMN]'], {}), '(player[PLAYER_HAND2_COLUMN])\n', (1433, 1462)...
import numpy as np import pymc3 as pm import theano import theano.tensor as tt # for reproducibility here's some version info for modules used in this notebook import platform import IPython import matplotlib import matplotlib.pyplot as plt import emcee import corner import os from autograd import grad from files.myI...
[ "pymc3.sample", "matplotlib.pyplot.title", "platform.python_version", "numpy.random.seed", "arviz.plot_joint", "arviz.from_pymc3", "matplotlib.pyplot.figure", "numpy.mean", "pymc3.Uniform", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.axvline", "theano.tensor.as_tensor_variable", "ar...
[((1211, 1222), 'time.time', 'time.time', ([], {}), '()\n', (1220, 1222), False, 'import time\n'), ((21085, 21096), 'time.time', 'time.time', ([], {}), '()\n', (21094, 21096), False, 'import time\n'), ((21351, 21377), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(8, 2)'}), '(figsize=(8, 2))\n', (21361, 2...
from sklearn.ensemble import AdaBoostClassifier from sklearn.pipeline import Pipeline from sklearn.preprocessing import Normalizer from homework_1.scikitlearn_pipeline.preprocessors import ConnectFeatures pipeline = Pipeline( steps=[ ("connect", ConnectFeatures(all=True)), ("norm", Normalizer()), ...
[ "sklearn.preprocessing.Normalizer", "sklearn.ensemble.AdaBoostClassifier", "homework_1.scikitlearn_pipeline.preprocessors.ConnectFeatures" ]
[((260, 285), 'homework_1.scikitlearn_pipeline.preprocessors.ConnectFeatures', 'ConnectFeatures', ([], {'all': '(True)'}), '(all=True)\n', (275, 285), False, 'from homework_1.scikitlearn_pipeline.preprocessors import ConnectFeatures\n'), ((305, 317), 'sklearn.preprocessing.Normalizer', 'Normalizer', ([], {}), '()\n', (...
#!/usr/bin/env python """Bootstrap process for system policy""" __author__ = '<NAME>, <NAME>' from pyon.public import log from ion.core.bootstrap_process import BootstrapPlugin from ion.process.bootstrap.load_system_policy import LoadSystemPolicy class BootstrapPolicy(BootstrapPlugin): """ Bootstrap plugin...
[ "ion.process.bootstrap.load_system_policy.LoadSystemPolicy.op_load_system_policies" ]
[((480, 529), 'ion.process.bootstrap.load_system_policy.LoadSystemPolicy.op_load_system_policies', 'LoadSystemPolicy.op_load_system_policies', (['process'], {}), '(process)\n', (520, 529), False, 'from ion.process.bootstrap.load_system_policy import LoadSystemPolicy\n')]