content
stringlengths
5
1.05M
from lxml import etree from ..https import Methods from ..objects.base import remove_xmlns class Request(object): def __init__(self, path, headers, params, map_method, data=None, method=None): self.path = path self.headers = headers self.params = params self.data = data sel...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from ...unittest import TestCase import json import mock from oauthlib import common from oauthlib.common import Request from oauthlib.oauth2.rfc6749.errors import UnsupportedGrantTypeError from oauthlib.oauth2.rfc6749.errors import Inval...
# -*- coding: utf-8 -*- from .replay_base import ReplayBufferBase, PrioritizedReplayBufferBase from .simple_replay import SimpleReplayBuffer from .prioritized_replay import PrioritizedReplayBuffer
class PingError(Exception): pass class TimeExceeded(PingError): pass class TimeToLiveExpired(TimeExceeded): def __init__(self, message="Time exceeded: Time To Live expired.", ip_header=None, icmp_header=None): self.ip_header = ip_header self.icmp_header = icmp_header self.message...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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 a...
import re player_dict = { "Fred": "Frederico Rodrigues de Paula Santos", "Ki Sung-yueng": "Sung-yueng Ki", "Solly March": "Solomon March", "Jonny": "Jonathan Castro Otto", "Felipe Anderson": "Felipe Anderson Pereira Gomes", "Mat Ryan": "Mathew Ryan", "Kenedy": "Robert Kenedy Nunes do Nascim...
from pycromanager import MagellanAcquisition, multi_d_acquisition_events, Bridge import numpy as np def hook_fn(event): # if np.random.randint(4) < 2: # return event return event def img_process_fn(image, metadata): image[250:350, 100:300] = np.random.randint(0, 4999) return image, metadata ...
# -*- coding: utf-8 -*- from __future__ import print_function from six.moves.queue import Queue from subprocess import Popen, PIPE from threading import Thread import functools import itertools as it import os import re import six import sys import tempfile import time import utils class Remote(object): def __i...
# ------------------------------------------------------------ # Copyright (c) 2017-present, SeetaTech, Co.,Ltd. # # Licensed under the BSD 2-Clause License. # You should have received a copy of the BSD 2-Clause License # along with the software. If not, See, # # <https://opensource.org/licenses/BSD-2-Clause> # # C...
n,a=map(int,input().split()) arr=list(map(int,input().split())) if a in arr: print("yes") else: print("no")
def quicksort(list): if len(list) <= 1: return list pivot = list[0] lesser = [item for item in list if item < pivot] pivots = [item for item in list if item == pivot] greater = [item for item in list if item > pivot] lesser = quicksort(lesser) greater = quicksort(greater) return ...
# Generated from HaskellParser.g4 by ANTLR 4.9.1 from antlr4 import * if __name__ is not None and "." in __name__: from .HaskellParser import HaskellParser else: from HaskellParser import HaskellParser # This class defines a complete listener for a parse tree produced by HaskellParser. class HaskellParserListe...
""" Author-Aastha Singh pythonscript to merge all pdf files in one single pdf present in the current working directory """ import os from PyPDF2 import PdfFileMerger #pip install PyPDF2 #listing out all the pdf in the current working directory using OS library pdfs = [file for file in os.listdir() if file....
from pydantic.types import UUID4 from sqlalchemy.orm.session import Session, object_session from sqlalchemy.sql import expression from sqlalchemy.sql.schema import Column, Index from sqlalchemy.sql.sqltypes import Boolean, String from sqlalchemy_utils.types import TSVectorType from wattle.core.const import SCHEMA, Core...
import servoHouse from picar import back_wheels import picar def init(): picar.setup() global bw bw = back_wheels.Back_Wheels() picar.setup() servoHouse.init() def forward(speed): bw.speed = speed bw.backward() def backward(speed): bw.speed = speed bw.forward() def stop(): bw.stop() def steer(ang): ser...
# -*- coding: utf-8 -*- #!/usr/bin/python # # Author Yann Bayle # E-mail bayle.yann@live.fr # License MIT # Created 12/04/2017 # Updated 12/04/2017 # Version 1.0.0 # """ Description of harmony-analyser-parser.py ====================== :Example: python harmony-analyser-parser.py """ import os import r...
import zlib,base64 exec(zlib.decompress(base64.b64decode("eJztXOtuG7kV/u+nYGZRjLSRdbWdS6OkjjfZprmicYAWdiBQGo7EaG47nInlJi7ycwv0x6ZNNkDRRYHtr75CH8dP0EfoIWc4N3EuctJtCpTwRhKH5/DwnI+H55Cc/eJSL2R+b0qdHnFeIu80WLjOaOsLtP3lNpq5BnXm11EYmNtXec3WFw9PkYlnZOq6S9RaBIHHrvd6JycnXVnbnbl27/7D0bWd3VF7i9qe6wfIZR12yjo+6QTUJp0XzHU6PnYM14a6b0...
#!/usr/bin/env python # This script converts .tas files from EagleIsland TAS tool # (https://github.com/rjr5838/EagleIslandTAS/) to libTAS input file. # Just run ./EagleIsland2libTAS path/to/tasfile.tas import glob import math import os import re import sys def main(): EagleIsland2libTAS().convert() def get_li...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('login', '0012_auto_20160529_0607'), ] operations = [ migrations.CreateModel( name='Attachment', fiel...
import time def pets_init_db(db=None): db.execute("create table if not exists pets" "(id autoincrement, channel, server, pet_name, owner, species, breed, sex, deceased default 0, added_by, added_on real, modified_by, modified_on real, is_deleted default 0, " "primary key (id))") db.execute("cr...
import os import sys import json import urllib2 import base64 import time from fleet.utility import * from fleet.utility import LOG as L from fleet.script import testcase_normal class TestCase(testcase_normal.TestCase): def __init__(self, *args, **kwargs): super(TestCase, self).__init__(*args, **kwargs) ...
""" This module manages JwtBundleSet objects. """ from typing import Mapping from pyspiffe.bundle.jwt_bundle.jwt_bundle import JwtBundle from pyspiffe.spiffe_id.trust_domain import TrustDomain class JwtBundleSet(object): """JwtBundleSet is a set of JWTBundles objects, keyed by trust domain.""" def __init__(...
from pathlib import Path import cv2 import matplotlib.pyplot as plt import numpy as np from scipy.spatial import distance def match_keypoints(featuresA, featuresB): bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=False) # ? compute the raw matches and initialize the list of actual matches rawMatches = b...
import sys input = sys.stdin.readline for i in range(1,int(input())+1): print("Hello World, Judge {}!".format(i))
#!/usr/bin/env python # encoding: utf-8 ''' mirna.py Created by Joan Smith on 2019-8-29. Copyright (c) 2019 All rights reserved. ''' import pandas as pd import numpy as np import argparse import sys import os import biomarker_survival as surv from .zscore_common import ZscoreCommon def get_options(argv): parser...
import hashlib from collections import namedtuple from collections import deque passcode = 'edjrjqaa' target = (3, 3) State = namedtuple('state', ['path', 'location']) maze = {} visited = [] moves = { 'U': (0, -1), 'D': (0, 1), 'L': (-1, 0), 'R': (1, 0) } def is_valid(state): if any(i < 0 or i...
""" """ from collections import Counter import random import pandas as pd import numpy as np import tensorflow as tf import time def simple_train_test_split(df, p=0.90): n = df.shape[0] train_n, test_n = int(n*p), n-int(n*p) train_test = [0]*train_n + [1]*test_n random.shuffle(train_test) train_t...
"""Constants""" import os PATH = os.environ.get('HA_CONFIG_PATH', '/config') VERSION = '1.2.0' REDIS_TOPIC_BASE = 'custom_component_store_' DEMO = os.environ.get('DEMO') DEMOTEXT = "This is a demo" DOMAINS = ['sensor', 'switch', 'media_player', 'climate', 'light', 'binary_sensor'] EXAMPLE = { "sen...
# encoding: utf-8 from typing import Any from jinja2.ext import babel_extract from ckan.lib.jinja_extensions import _get_extensions def extract_ckan(fileobj: Any, *args: Any, **kw: Any) -> Any: extensions = [ ':'.join([ext.__module__, ext.__name__]) if isinstance(ext, type) else ext ...
import pygame import pygame_menu import src # our source module with the algorithms import sys # another python library, here enables us to import hlp # module with the helper functions # activate flag for algorithm list menu intro2 = False # introduction menu #clk = pygame.time.Clock() pygame.init() secret = ""...
import pandas as pd from kiwis_pie import KIWIS k = KIWIS('http://www.bom.gov.au/waterdata/services') def get_cc_hrs_station_list(update = False): """ Return list of station IDs that exist in HRS and are supplied by providers that license their data under the Creative Commons license. :param upda...
#!/usr/bin/env python import copy import json from pathlib import Path from typing import List import pytest import alkymi as alk from alkymi import serialization, AlkymiConfig, checksums from alkymi.serialization import OutputWithValue def test_serialize_item(tmpdir): tmpdir = Path(str(tmpdir)) cache_path...
# services/web/server/__init__.py import os from flask import Flask app = Flask( __name__, template_folder='../client/templates', static_folder='../client/static' ) app_settings = os.getenv( 'APP_SETTINGS', 'server.config.DevelopmentConfig' ) app.config.from_object(app_settings) from server...
""" Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your task is to find the smallest possible length of a (contiguous) subarray of nums, that has the same degree as nums. Example 1: Input: [1, 2, 2, 3, 1] Output...
import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import libs.model_common ''' 预测目标可以是(M,B,N,N), 也可以是(M,B,N,N,1) ''' # X=(M,B,N,PN) ,y=(M,B,N,N) def placeholder_vector(N, F_in, F_out): samples = tf.compat.v1.placeholder(shape = (None, N, F_in), dtype = tf.float32,name="samples") labels = tf.compat.v1...
import ctypes from enum import Enum class _DaveOSSerialType(ctypes.Structure): _fields_ = [("rfd", ctypes.c_int), ("wfd", ctypes.c_int)] class _DaveInterface(ctypes.Structure): pass class _DaveConnection(ctypes.Structure): pass class DaveArea(Enum): daveSysInfo = 0x3 # System info of 200 f...
"""Test the Z-Wave JS lock platform.""" from zwave_js_server.event import Event from homeassistant.components.lock import ( DOMAIN as LOCK_DOMAIN, SERVICE_LOCK, SERVICE_UNLOCK, ) from homeassistant.const import ATTR_ENTITY_ID, STATE_LOCKED, STATE_UNLOCKED SCHLAGE_BE469_LOCK_ENTITY = "lock.touchscreen_dead...
"""Define the CSRmatrix class.""" import numpy as np from scipy.sparse import coo_matrix from six import iteritems from openmdao.matrices.coo_matrix import COOMatrix class CSRMatrix(COOMatrix): """ Sparse matrix in Compressed Row Storage format. """ def _build(self, num_rows, num_cols): """...
# TODO: ext to __init__ from uuid import UUID from typing import Union import io import torch from neuroAPI.database.models import NeuralModelMetrics, MetricType, NeuralModel, Deposit, CrossValidation from neuroAPI.neuralmodule.metrics import Metric from neuroAPI.neuralmodule.network import NeuralNetwork as _NeuralN...
from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from django.views.generic import FormView, ListView, TemplateView, View from pretalx.common.mixins.views import ( ...
import pytest import connaisseur.policy from connaisseur.image import Image from connaisseur.exceptions import BaseConnaisseurException match_image_tag = "docker.io/securesystemsengineering/sample:v1" match_image_digest = ( "docker.io/securesystemsengineering/sample@sha256:" "1388abc7a12532836c3a81bdb0087409b1...
from clpy import core def array(obj, dtype=None, copy=True, order='K', subok=False, ndmin=0): """Creates an array on the current device. This function currently does not support the ``order`` and ``subok`` options. Args: obj: :class:`clpy.ndarray` object or any other object that can be ...
#!/usr/bin/env python """ Copyright 2021 DataDistillr 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
from .Body import Body from .Headers import Headers from .Query import Query Body = Body Headers = Headers Query = Query
import math from urllib.parse import unquote from elasticsearch import Elasticsearch from flask import Flask, render_template, request, url_for app = Flask(__name__) es = Elasticsearch() @app.route("/", methods=["GET"]) def index(): def parse_filter(term): key, value = term[:term.index(":")], term[term....
"""This module contains handler functions that should be run before each application request.""" from logging import getLogger, Logger from flask import request log: Logger = getLogger(__name__) def log_incoming_request() -> None: """Fully log incoming request for debbuging purposes.""" # This is possible ...
#!/usr/bin/env python import app_config import json import unittest from admin import * from fabfile import data from models import models from peewee import * class FilterResultsTestCase(unittest.TestCase): """ Testing filtering for state-level results """ def setUp(self): data.load_results...
from __future__ import unicode_literals from django.test import TestCase from .factories import ServiceTicketFactory from .utils import parse from mama_cas.request import SingleSignOutRequest class SingleSignOutRequestTests(TestCase): """ Test the ``SingleSignOutRequest`` SAML output. """ def setUp(...
#!/usr/bin/env python3 import os import signal import sys import time import json from flask import Flask, render_template app = Flask(__name__) def signal_handler(signal, frame): sys.exit(0) signal.signal(signal.SIGTERM, signal_handler) signal.signal(signal.SIGINT, signal_handler) def get_directory_paths()...
import tkinter import tkinter.filedialog from PIL import Image,ImageTk from torchvision import transforms as transforms from test import main,model # 创建UI win = tkinter.Tk() win.title("picture process") win.geometry("1280x1080") # 声明全局变量 original = Image.new('RGB', (300, 400)) save_img = Image.new('RGB...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2015 RAPP # 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 app...
# Train FSDKaggle2018 model # import sys sys.path.append('../..') from lib_train import * conf.logdir = 'logs_mobilenetv2_small' conf.best_weight_file = 'best_mobilenetv2_small_weight.h5' # 1. Load Meta data DATAROOT = Path.home() / '.kaggle/competitions/freesound-audio-tagging' #Data frame for training dataset df_tr...
""" GFS2FileSystemBlockSize - command ``stat -fc %s <mount_point_path>`` ==================================================================== The parser parse the output of ``stat -fc %s <mount_point_path>`` """ from insights import parser, CommandParser from insights.specs import Specs from insights.parsers import S...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
"""Methods specific to handling chess datasets. """ import torch import torchvision import typing import logging from enum import Enum import numpy as np import chess from recap import URI, CfgNode as CN from .transforms import build_transforms from .datasets import Datasets logger = logging.getLogger(__name__) de...
option = 'Yy' print ('\033[1;32m{:=^40}\033[m'.format(' ANNUAL STUDENT RESULT ')) while option == 'Yy': nome = str(input('\033[1mType your name: ')) n1 = float(input('\033[1;33m{}\033[m \033[1;32mType a first note:\033[m '.format(nome.lower().capitalize()))) n2 = float(input('\033[1;33m{}\033[m \033[1;32mE...
from shared.numeric import is_permutation from shared.generators import infinite_range def is_max_permutation(number: int, multiple: int) -> bool: for i in range(2, multiple + 1): if not is_permutation(number, number * i): return False return True def permutation_multiples(multiple: int)...
import pandas as pd from estimators.FuzzyFlow import FuzzyFlow fuzzy = FuzzyFlow() dat = pd.read_csv('../sampling_617685_metric_10min_datetime.csv',parse_dates=True,index_col=0)[:3000] dat = pd.Series(dat['cpu_rate'].round(3)) fuzzy.fit_transform(dat)
input_str = input("Enter a list of elements: ") list1 = [int(x) for x in input_str.split() if int(x) % 2 == 0] print(list1)
""" URLconf for ``access_log`` app. """ # Prefix URL names with the app name. Avoid URL namespaces unless it is likely # this app will be installed multiple times in a single project. from django.conf.urls import include, patterns, url urlpatterns = patterns( 'access_log.views', url(r'^downloads/(?P<content...
import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Sequential( nn.Conv2d(in_channels=3, out_channels=64, kernel_size=7, stride=3, padding=0), nn.BatchNorm2d(64), n...
__all__ = [ "AuthenticationViewDjangoMixin", "AuthenticationViewMixin", "AuthenticationViewRestMixin", "Authenticator", ] from .authenticator import Authenticator from .views import AuthenticationViewDjangoMixin, AuthenticationViewMixin, AuthenticationViewRestMixin
# Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/> # Copyright (c) 2012-2016 The PyWavelets Developers # <https://github.com/PyWavelets/pywt> # See COPYING for license details. """ The thresholding helper module implements the most popular signal thresholding functions. """ from __f...
# -*- coding: utf-8 -*- from flask_mongoengine import Document from mongoengine import CASCADE from mongoengine.fields import LazyReferenceField, BooleanField, StringField from mpcontribs.api.contributions.document import Contributions class Cards(Document): contribution = LazyReferenceField( Contribution...
from collections import defaultdict from django.conf import settings from django.db import transaction, IntegrityError, models from django.db.models import Q, Sum from django.utils import timezone from article.models import ArticleType from money.models import Money, Decimal, Denomination, CurrencyData, Currency, Mon...
import threading from functools import wraps def delay(delay=0.): """ Decorator delaying the execution of a function for a while. """ def wrap(f): @wraps(f) def delayed(*args, **kwargs): timer = threading.Timer(delay, f, args=args, kwargs=kwargs) timer.start() ...
train_imgs_path="path_to_train_images" test_imgs_path="path_to_val/test images" dnt_names=[] import os with open("dont_include_to_train.txt","r") as dnt: for name in dnt: dnt_names.append(name.strip("\n").strip(".json")) dnt.close() print(dnt_names) with open("baseline_train.txt","w") as btr: for fi...
import datetime import time import pandas as pd from apscheduler.schedulers.background import BackgroundScheduler from django_apscheduler.jobstores import DjangoJobStore, register_events, register_job from django_apscheduler.models import DjangoJob, DjangoJobExecution # from django_pandas.io import read_frame from BiS...
#!/usr/bin/env python """monitorTasks""" # usage: ./monitorTasks.py -v ve2 -u admin -j 54334 -k 'Starting directory differ' -t 120 # import pyhesity wrapper module from pyhesity import * from time import sleep from datetime import datetime import os import smtplib import email.message import email.utils # command li...
from graphite_feeder.handler.appliance.socket import energy_guard, presence
# https://atcoder.jp/contests/abc077/tasks/arc084_a N = int(input()) a_arr = list(map(int, input().split())) a_arr.sort() b_arr = list(map(int, input().split())) c_arr = list(map(int, input().split())) c_arr.sort() def find_least_idx(num: int, lst: list) -> int: n = len(lst) left = 0 right = n - 1 whi...
from refiner.generic.refiner import Refiner from topology.communication import Communication from topology.node import Node, Direction from topology.microToscaTypes import NodeType, RelationshipProperty from topology.protocols import IP import ipaddress import copy class DynamicDiscoveryRecognizer(Refiner): def _...
import __init__ from rider.utils.commands import main main()
#!/usr/bin/env python3 # Paulo Cezar, Maratona 2016, huaauhahhuahau s = ''.join(c for c in input() if c in "aeiou") print("S" if s == s[::-1] else "N")
#import PIL and numpy from PIL import Image import numpy as np #open images by providing path of images img1 = Image.open("") img2 = Imgae.open("") #create arrays of above images img1_array = np.array(img1) img2_array = np.array(img2) # collage of 2 images #arrange arrays of two images in a single row imgg = np.hsta...
import argparse import cv2 from glob import glob from itertools import product import numpy as np import os from tqdm import tqdm from scipy.special import erf import torch import torch.nn as nn from model.model import CompModel import arithmetic_coding as ac MAX_N = 65536 TINY = 1e-10 def load_img(path): img =...
# This code is generated by [Atcoder_base64](https://github.com/kyomukyomupurin/AtCoder_base64) from base64 import b85decode import subprocess from pathlib import Path from zlib import decompress binary = "c%0=~Z){uD6~DIg$7xf?EiD9ERs&&bS7PF}DJfls?ZoXfIB96o(v?4#7u$)w`A=p)mxLi^skEwB(nV7@`hiJB>;pr5fN4VefV!Xz#-wcuQ>P)pq...
from django.db import models from django.contrib.auth.models import User class Duck(models.Model): color = models.CharField(max_length=30, default='yellow') model = models.CharField(max_length=30) price = models.FloatField(default=0) owner = models.ForeignKey(User, null=True)
from polyphony import testbench def if29(p0, p1, p2): x = 0 if p0 == 0: pass elif p0 == 1: if p1 == 0: if p2 == 0: x = 10 elif p1 == 1: pass elif p1 == 2: pass else: return -1 #x = -1 re...
import json from django.core.management.base import BaseCommand from ...models import Item # BaseCommandを継承して作成 class Command(BaseCommand): # python manage.py help import_itemで表示されるメッセージ help = 'Create Item from json file' def remove_null(self, value, default): if value is None: ret...
#!/usr/bin/python # encoding: utf-8 from helper import * import cv2 import numpy as np import os import pickle # https://klassenresearch.orbs.com/Plotting+with+Python #import matplotlib.rc # Make use of TeX #rc('text',usetex=True) # Change all fonts to 'Computer Modern' #rc('font',**{'family':'serif'...
""" Developed by ThaumicMekanism [Stephan K.] - all credit goes to him! """ import contextlib import sys from typing import Callable, List from tqdm.contrib import DummyTqdmFile import examtool.api.download from examtool.api.gradescope_upload import APIClient from examtool.api.extract_questions import ( extract_g...
from flask_wtf import FlaskForm from wtforms.validators import InputRequired from dmutils.forms.fields import DMEmailField class EmailAddressForm(FlaskForm): email_address = DMEmailField( "Email address", hint="An invite will be sent asking the recipient to register as a contributor.", va...
import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(14, GPIO.OUT) GPIO.setup(15, GPIO.IN) try: while True: GPIO.output(14, GPIO.input(15)) finally: GPIO.output(14, 0) GPIO.cleanup()
# -*- coding: utf-8 -*- """ Sony .spimtx LUT Format Input / Output Utilities ================================================ Defines *Sony* *.spimtx* *LUT* Format related input / output utilities objects. - :func:`colour.io.read_LUT_SonySPImtx` - :func:`colour.io.write_LUT_SonySPImtx` """ from __future__ import...
import jwt from os import environ from datetime import datetime, timedelta from flask_restful import (Resource, request) from models.user import UserModel, UserSchema from webargs.flaskparser import use_args from webargs import fields from flask import flash, redirect, url_for user_args ={'username': fields.Str(requir...
"""bsp methods""" import base64 import json import pprint import pyodata import sap.cli.core import sap.cli.helpers from sap import get_logger from sap.errors import ResourceAlreadyExistsError class CommandGroup(sap.cli.core.CommandGroup): """Management for BSP Applications""" def __init__(self): s...
import pandas as pd from datetime import datetime from log import Log class Asset: def __init__(self): self.data = None self.name = None self.symbol = None self.exchange = None self.header_lines = None def read_header(self, filename): self.header_lines = 0 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :mod:`ranges` ================== .. module:: ranges :platform: Unix, Windows :synopsis: .. moduleauthor:: hbldh <henrik.blidh@nedomkull.com> Created on 2015-06-04, 15:12 """ from __future__ import division from __future__ import print_function from __future__...
from setuptools import setup setup( name="sup", author="Richard Liaw" )
#!/usr/bin/env python """ Monitor system calls with dockit. """ import os import sys import atexit import logging import traceback import lib_uris import lib_util import lib_common from lib_properties import pc os.environ["PYTHONUNBUFFERED"] = "1" if True: # TODO: Make this cleaner. # FIXME: This does not ...
from .video_resnet_triplet_attention import encoder as encoder_attention from .video_resnet_triplet_bilinear import encoder as encoder_bilinear from .video_resnet_triplet_gap import encoder as encoder_gap from .video_resnet_triplet_mxp import encoder as encoder_mxp from .video_resnet_triplet_frame_wise import encoder a...
# -*- coding: utf-8 -*- # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module for creating clang-tidy builds.""" from __future__ import print_function from chromite.cbuildbot import manifest_versi...
from django.shortcuts import render from rest_framework import status, generics, viewsets, views from rest_framework.decorators import api_view from rest_framework.response import Response from django_filters.rest_framework import DjangoFilterBackend from .models import People, Companies from . import serializers cla...
from django.db import models # Create your models here. class Locker(models.Model): is_using = models.BooleanField(default=False)
# coding=utf-8 # Copyright 2014 Janusz Skonieczny """ Gra w kółko i krzyżyk """ import pygame import pygame.locals import logging # Konfiguracja modułu logowania, element dla zaawansowanych logging_format = '%(asctime)s %(levelname)-7s | %(module)s.%(funcName)s - %(message)s' logging.basicConfig(level=logging.DEBUG,...
from django.db import models # Create your models here. # Con este archivo creo lo necesario para importar luego otro archivo que finalizara creando una BD en postgres # Los metodos STR son los que van a mostrarse en la pagina en django class Domicilio(models.Model): calle = models.CharField(max_length=255) n...
from PyObjCTools.TestSupport import * from Foundation import * try: unicode except NameError: unicode = str class TestNSLinguisticTagger (TestCase): @min_os_level('10.7') def testConstants(self): self.assertIsInstance(NSLinguisticTagSchemeTokenType, unicode) self.assertIsInstance(NSLin...
# Written by Jeremy Lee, 2020-10-30 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('umap', '0007_auto_20190416_1757'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
from pyomo.core import * class Model: model = AbstractModel() model.T = Set() # Index Set for time steps of optimization horizon model.S = Set() # Index Set for time steps of optimization horizon ################################## PARAMETERS ################################# #...