text
stringlengths
1
927k
rows = [] with open("C:\\Privat\\advent_of_code20\\puzzle14\\input1.txt") as f: for line in f: rows.append(line.strip()) #print(rows) memory = {} currentMask = "" for line in rows: split = line.split(' = ') if 'mask' in split[0]: currentMask = split[1].strip() else: # value in...
#! /usr/bin/env python # coding=utf-8 #================================================================ # Copyright (C) 2020 * Ltd. All rights reserved. # # Editor : VIM # File name : detect_image.py # Author : YunYang1994 # Created date: 2020-03-19 14:05:53 # Description : # #==================...
# # 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 # ...
import time import random import numpy as np from pathlib import Path from PIL import Image, ImageDraw, ImageFont, ImageFilter import torch from torch.utils.data import Dataset from src import config def draw_grapheme(grapheme, font_path, size=(137, 236)): height, width = size image = Image.new('RGB', (widt...
#algoritmo utilizado para ordenação de uma lista. #a cada execução ele percorre toda lista e coloca o menor na posição (n-1) def encontraMenor(lista): #armazena o valor do indice 0 a variavel menorValor = lista[0] #considera que index zero tem o menor valor menorIndex = 0 #percorre lista do indice...
import numpy as np import pandas as pd from PIL import Image from tqdm import tqdm import os # convert string to integer def atoi(s): n = 0 for i in s: n = n*10 + ord(i) - ord("0") return n # making folders outer_names = ['test','train'] inner_names = ['angry', 'disgusted', 'fearful', 'happy', 's...
import argparse from datetime import datetime from deepreg.predict import predict name = "grouped_mr_heart" # parser is used to simplify testing, by default it is not used # please run the script with --no-test flag to ensure non-testing mode # for instance: # python script.py --no-test parser = argparse.ArgumentPar...
#coding=utf-8 import json from core.helper.crypt import pwd_crypt from core.helper.globalvar import global_const import sys class options_config: class ErrorTypeNotSupport(BaseException): def __init__(self): pass def __str__(self): return "This type didn't support" def...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.paginator import Paginator from django.core.urlresolvers import reverse, reverse_lazy from d...
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import dataclasses from enum import unique import click import datasets from datasets import features from datasets.arrow_dataset import Dataset from datasets.dataset_dict import DatasetDict from src.ner_model.chunker.abstract_model import Chunker from src.utils.utils import remove_BIE import dataclasses from seqeval.m...
"""HelloWorld Middleware.""" from masonite.request import Request class HelloWorldMiddleware: """HelloWorld Middleware.""" def __init__(self, request: Request): """Inject Any Dependencies From The Service Container. Arguments: Request {masonite.request.Request} -- The Masonite r...
import pandas as pd from sklearn import datasets # load iris data set iris = datasets.load_iris() print(iris) species = [iris.target_names[x] for x in iris.target] iris = pd.DataFrame(iris['data'], columns = ['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width']) iris['Species'] = species iris.head() iri...
import main from common import Task, STOP, GNN_TYPE from attrdict import AttrDict from experiment import Experiment import torch override_params = { 2: {'batch_size': 64, 'eval_every': 1000}, 3: {'batch_size': 64}, 4: {'batch_size': 1024}, 5: {'batch_size': 1024}, 6: {'batch_size': 1024}, 7: {'...
import os import json from redis import Redis from normality import stringify class Cache(object): def get(self, key): return None def has(self, key): return self.get(key) is not None def store(self, key, value): pass class RedisCache(Cache): EXPIRE = 84600 * 90 URL = o...
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
r''' Utility functions for test_fb_cases.py ''' from os import mkdir, remove from os.path import dirname from shutil import rmtree import logging import pandas as pd import numpy as np import setigen as stg from turbo_seti.find_doppler.find_doppler import FindDoppler from fb_cases_def import HERE, DEBUGGING, RTOL_DIFF...
# Generated by Django 2.2.24 on 2021-07-31 08:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] op...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from tests.util import pick_ray from pyrosetta import Pose from pyrosetta.rosetta.core.import_pose import pose_from_pdbstring name = "GLN" contents = """ ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N ATOM 2 CA ALA A 1 1.458 0.000 0.000 1.00 0.00 C ATOM ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse from itertools import zip_longest def replace_oovs(source_in, target_in, vocabulary, source_out, targ...
""" 2.4 – Letras maiúsculas e minúsculas em nomes: Armazene o nome de uma pessoa em uma variável e então apresente o nome dessa pessoa em letras minúsculas, em letras maiúsculas e somente com a primeira letra maiúscula. """ nome = "José" # Minúsculas print(nome.lower()) # Maiúsculas print(nome.upper()) # Somente a ...
from http import HTTPStatus from typing import List from apifairy import body, other_responses, response from flask import Blueprint, jsonify from flask import request from src.config import DefaultConfig from src.dtos.user import UserDto from src.requests.user import CreateUserRequestSchema, CreateUserRequest, Creat...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
""" Copyright (C) 2010-2022 Alibaba Group Holding Limited. This file is modified from https://github.com/tjiiv-cprg/MonoRUn """ import math import numpy as np import torch from pytorch3d.structures.meshes import Meshes from epropnp_det.ops.iou3d.iou3d_utils import nms_gpu def gen_unit_noc(num_pts, device=None): ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
# -*- coding: future_fstrings -*- # This is the version string assigned to the entire egg post # setup.py install # Ownership and Copyright Information. from __future__ import absolute_import __author__ = "Parag Baxi <parag.baxi@gmail.com>" __copyright__ = "Copyright 2011-2013, Parag Baxi" __license__ = "BSD-new" fro...
""" Exceptions for SED-ML :Author: Jonathan Karr <karr@mssm.edu> :Date: 2021-01-12 :Copyright: 2021, Center for Reproducible Biomedical Modeling :License: MIT """ from ..exceptions import BioSimulatorsException __all__ = [ 'SedmlExecutionError', 'UnsupportedModelLanguageError', ] class SedmlExecutionError(...
import sqlite3 import tempfile import hgdb import os import pytest def get_conn_cursor(db_name): conn = sqlite3.connect(db_name) c = conn.cursor() return conn, c def test_store_instance(): with tempfile.TemporaryDirectory() as temp: db_name = os.path.join(temp, "debug.db") db = hgdb....
from pyrogram import filters, Client import logging import os from pyrogram.types import ( ChatPermissions, InlineKeyboardButton, InlineKeyboardMarkup ) logging.basicConfig(level=logging.INFO) API_ID = int(os.environ.get("API_ID", 6)) API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e") ...
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
# Copyright 2014 IBM Corp. # # 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, s...
import sly_globals as g def get_mask_from_clicks(image_np, clicks_list): g.CONTROLLER.set_image(image_np) for click in clicks_list: g.CONTROLLER.add_click(click.coords[1], click.coords[0], click.is_positive) try: res_mask = g.CONTROLLER.result_mask except Exception(f"Couldn't process i...
def maxSubArraySum(a,size): max_so_far =a[0] curr_max = a[0] for i in range(1,size): curr_max = max(a[i], curr_max + a[i]) max_so_far = max(max_so_far,curr_max) return max_so_far a = [-2, -3, 4, -1, -2, 1, 5, -3] print("Maximum contiguous sum is" , m...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_total_digits_2_xsd.nistschema_sv_iv_atomic_integer_total_digits_2 import NistschemaSvIvAtomicIntegerTotalDigits2 __all__ = [ "NistschemaSvIvAtomicIntegerTotalDigits2", ]
#!/usr/bin/python # The MIT License (MIT) # # Copyright (c) 2017 Massimiliano Patacchiola # # 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 ...
from sdv import SDV, load_demo def test_sdv(): metadata, tables = load_demo(metadata=True) sdv = SDV() sdv.fit(metadata, tables) # Sample all sampled = sdv.sample_all() assert set(sampled.keys()) == {'users', 'sessions', 'transactions'} assert len(sampled['users']) == 10 # Sample w...
from django.contrib import admin from .models import StudentDetail, UniversityDetail, CourseDetail, CourseName, ApplicationDetail admin.site.register(StudentDetail) admin.site.register(UniversityDetail) admin.site.register(CourseDetail) admin.site.register(CourseName) admin.site.register(ApplicationDetail) # Registe...
import typing import datetime from typing import Mapping, Any, Optional, Iterable, List from .model_abc import JsonAPIModel from .snowflake import Snowflake from .user import User from .enums import PermissionFlags from .permissions import Role from serpcord.utils.model import _init_model_from_mapping_json_data if ty...
# ---------------------------------------------------------------------- # autozones_path # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Third-party m...
""" ResNet on CIFAR10 """ import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init from .quant import ClippedReLU, int_conv2d, int_linear from .mpdr_score import get_mpdr_score import math class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA,...
import json from config import db from models import UserModel def table_record_to_json(record): modelClass = type(record) columns = [record for record in filter(lambda item: not item.startswith('_'),modelClass.__dict__)] json_value = {column_name: str(getattr(record, column_name))for column_name in colu...
import numpy as np def confusion_matrix(y_true, y_hat, threshold=.5): def _to_class(y): return np.array([1 if i >= threshold else 0 for i in y]) n_classes = len(np.unique(y_true)) cm = np.zeros((n_classes, n_classes)) y_hat = _to_class(y_hat) for a, p in zip(y_true, y_hat): ...
import speech_recognition as sr def rec(): r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: text = r.recognize_google(audio) return(text) except: return("Sorry, couldn't recognize your voice. Please try again.")
from abc import ABC, abstractmethod from pathlib import Path import torch from torch import Tensor from torch.utils.data import Dataset, DataLoader class BaseDataModule(ABC): def __init__( self, data_path: Path, batch_size: int, num_workers: int, ): ...
# Copyright 2021 The NetKet Authors - All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
print(tuple(range(201,400,2)))
# Unless explicitly stated otherwise all files in this repository are licensed # under the Apache License Version 2.0. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2018 Datadog, Inc. from .server import Server from .reporter import Reporter __all__ = [ "Server", ...
# Generated by Django 2.2 on 2021-07-03 12:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gallery', '0005_remove_image_image'), ] operations = [ migrations.AddField( model_name='image', name='image', ...
import io import jax import requests import PIL from PIL import ImageOps import numpy as np import jax.numpy as jnp from dall_e_jax import get_encoder, get_decoder, map_pixels, unmap_pixels target_image_size = 256 def download_image(url): resp = requests.get(url) resp.raise_for_status() return PIL.Ima...
############################################## # This code is based on samples from pytorch # ############################################## # Writer: Kimin Lee from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import d...
# coding: utf-8 """ ThingsBoard REST API For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. # noqa: E501 OpenAPI spec version: 2.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-...
# 导入包 import random import math import numpy as np import time from tqdm import tqdm from tqdm import trange # 1 通用函数定义 ## 定义装饰器,监控运行时间 def timmer(func): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time() print('Func {},run tim...
from intake.source.base import DataSource, Schema import rasterio import xarray as xr import warnings # from . import __version__ class quest_gdal_base(DataSource): """Reads an HDF5 table Parameters ---------- path: str File to load. tablename: str Name of table to load. metad...
from django.core.management.base import BaseCommand from django.utils import timezone from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import Q from mooringlicensing.components.approvals.models import ( Approval, WaitingListAllocation, AnnualAdmi...
from InterventionsMIP import project_path, instances_path import multiprocessing as mp from threshold_policy import threshold_policy_search from interventions import Intervension from epi_params import EpiSetup, ParamDistribution from utils import parse_arguments from reporting.plotting import plot_stoch_simulations f...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
""" sentry.models.dsymfile ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import shutil import hashlib import six import tempfile from requests.exceptions import Reque...
#!/usr/bin/env python3 from copy import deepcopy import cartopy.crs as ccrs import datetime as dt import logging from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import matplotlib matplotlib.use('AGG') import matplotlib.axes as maxes import matplotlib.cm as cm import matplotl...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RestaurantReview.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: rai...
import json import random import math import os from crawling._twitter import twitter_crawling class Response(object): def __init__(self, token): self.name = "" self.token = token self.greetingList = ['Hello {}, welcome to the Equifax Hackathon channel! Have fun :). You can type help for mo...
from fabric.state import output from .development import * # # Fabric configuration # output['debug'] = False # see full command list def help(): ''' Fabfile documentation ''' local('python -c "import fabfile; help(fabfile)"')
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
import numpy as np import random import loggers as lg from game import Game, GameState from model import Residual_CNN from agent import Agent, User import config def playMatchesBetweenVersions(env, run_version, player1version, player2version, EPISODES, logger, turns_until_tau0, goes_first = 0): if player1...
import numpy as np import scipy.integrate as integrate import scipy.interpolate as interpolate def calculate_parameters(axis, dose, cax=False): """ A function to calculate the relevant descriptive parameters of dose profiles. """ interpolated_axis = np.linspace(axis[0], axis[-1], len(axis) * 100...
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author: Jialiang Shi from sonarqube.utils.rest_client import RestClient from sonarqube.utils.config import ( API_USER_GROUPS_SEARCH_ENDPOINT, API_USER_GROUPS_CREATE_ENDPOINT, API_USER_GROUPS_DELETE_ENDPOINT, API_USER_GROUPS_UPDATE_ENDPOINT, API_USER_GR...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest from telethon.tl.types import ChatBannedRi...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test merkleblock fetch/validation # from test_framework.test_framework import DCUTestFramework from ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models class SponsorManager(models.Manager): def active(self): return self.get_query_set().filter(active=True).order_by("level")
n = int(input()) for y in range(0, n): if(y == n-1): print('Ho!') else: print('Ho', end=' ')
def read_from_file(filename): txt = open(filename) string_of_names = txt.read() return string_of_names def string_of_names_to_array(string_of_names): return string_of_names.replace('"','').split(",") def get_alpha_value(string): sum = 0 for char in string: sum += (ord(char) - 64) return sum def mai...
''' Quadcopter class for Nengo adaptive controller Copyright (C) 2021 Xuan Choo, Simon D. Levy MIT License ''' import nengo import gym import numpy as np from adaptive import run class Copter: def __init__(self, seed=None): self.env = gym.make('gym_copter:Hover1D-v0') self.reset(seed) d...
#!/usr/bin/env python """ Runs BFAST on single-end or paired-end data. TODO: more documentation TODO: - auto-detect gzip or bz2 - split options (?) - queue lengths (?) - assumes reference always has been indexed - main and secondary indexes - scoring matrix file ? - read group file ? usage...
import re import json import random from .splitters import split_into_sentences from .chain import Chain, BEGIN, END from unidecode import unidecode DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_TRIES = 10 class ParamError(Exception): pass class Text(object): reject_pat = re.compile...
"""Attach signals to this app's models.""" # -*- coding: utf-8 -*- import json import logging import channels.layers from asgiref.sync import async_to_sync from django.db.models.signals import post_save from django.dispatch import receiver from .models import Job, Log logger = logging.getLogger(__name__) # pylint...
# -*- coding: utf-8 -*- """wheel tests """ from distutils.sysconfig import get_config_var from distutils.util import get_platform import contextlib import glob import inspect import os import shutil import subprocess import sys import zipfile import pytest from pkg_resources import Distribution, PathMetadata, PY_MA...
linux_only_targets="linuxapp helloworld helloworld_nocli linkkitapp alinkapp networkapp tls uDataapp hdlcapp.hdlcserver wifihalapp coapapp nano linkkit_gateway blink linkkit_sched meshapp acapp netmgrapp mqttapp wifimonitor vflashdemo athostapp"
#!/usr/src/env python # -*- coding: utf-8 -*- # TextRank 博客 http://xiaosheng.me/2017/04/08/article49/ # 从PageRank转变而来,可以用来做关键字的提取。TextRank的计算公式其实跟PageRank可以认为是一样的 # 只不过就是要考虑权重的因素(算PageRank的时候就是均摊权值) # 在TextRank构建的图中,节点是句子,权值就是两个句子的相似程度 # 提取关键字的时候,单词作为图的节点,把权值都设成1,此时其实退化成PageRank # 把文本拆分成单词,将这一些单词设定一个简单的滑动窗口,每个窗口内的任意两...
# Copyright (C) 2007 - 2009 Khronos Group # Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the...
import os import shutil import tempfile import unittest # disable for stestr otherwise output is much too verbose from hotsos.core.log import log, logging, setup_logging from hotsos.core.config import setup_config # Must be set prior to other imports TESTS_DIR = os.environ["TESTS_DIR"] DEFAULT_FAKE_ROOT = 'fake_data...
# Copyright 2017 The dm_control 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 agreed to i...
from flask import render_template, redirect, url_for, current_app, flash, Response, abort, request from flask_login import current_user from app import db from app.admin import bp from app.elastic import Elastic from app.admin.forms import * from app.models import User, ScopeItem, ConfigItem, NatlasServices, AgentConfi...
''' @Author: Jeffery Sheng (Zhenfei Sheng) @Time: 2020/5/21 18:34 @File: ICDAR15CropSave.py ''' import os import cv2 from glob import glob from tqdm import tqdm class icdar2015CropSave: def __init__(self, img_dir :str, gt_dir :str, save_data_dir :str, train_val_split_ratio: float or None=0.1...
from crdt import CRDT class DistributedCounter(CRDT): def add(self, number): return self + number def remove(self, number): return self - number def inc(self): """ Increase the counters value by one """ return self + 1 def dec(self): """ ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
# -*- coding: utf-8 -*- import datetime import json import logging import subprocess from email.mime.text import MIMEText from smtplib import SMTP from smtplib import SMTPException from socket import error from jira.client import JIRA from jira.exceptions import JIRAError from staticconf.loader import yaml_loader from...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
from nintendo.common.http import HTTPClient, HTTPRequest from nintendo.common import xml, ssl, util import pkg_resources import collections import hashlib import struct import base64 import urllib.parse import logging logger = logging.getLogger(__name__) CERT = pkg_resources.resource_filename("nintendo", "files/cer...
from django.contrib.auth import views as auth_views from django.urls import path from . import views app_name = 'accounts' urlpatterns = [ path('signup/', views.signup, name='signup'), path('login/', views.signin, name='login'), path('logout/', views.signout, name='logout'), path('profile/', views.vi...
#!/usr/bin/env python import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from geometry_msgs.msg import Twist from sensor_msgs.msg import Image class LineFollower(object): def __init__(self): self.bridge_object = CvBridge() self.cmd_vel_pub = rospy.Publisher('/cmd_vel', Twi...
from rest_framework.routers import DefaultRouter from . import views from django.urls import path, re_path app_name = 'core' urlpatterns = [ path("search/", views.SearchSubscriptionsView.as_view()), path("general-notification/",views.Notification.as_view()), path("personal-notification/",views.PersonalNotificatio...
#!/usr/bin/env python3 """ Item is a terrible name. I whole-heartedly acknowledge this and apologise for any future maintainer. In this context item represents an element under 'workflow' in workflow.yaml, 'tool' in tool.yaml and so on. An item itself does not contain much information. Just a name, a path (this wil...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
# Generated by Django 2.2.1 on 2019-05-15 08:29 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='UploadImage', fields=[ ('id', models.AutoFi...
#!C:\Users\ingov\PycharmProjects\CoronavirusWebScraper\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.8' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # HOOMD-blue documentation build configuration file, created by # sphinx-quickstart on Sun Mar 13 13:14:54 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...