content
stringlengths
5
1.05M
import spotipy import spotipy.util as util from pprint import pprint while True: username = input("Type the Spotify user ID to use: ") token = util.prompt_for_user_token(username, show_dialog=True) sp = spotipy.Spotify(token) pprint(sp.me())
import json import os import shutil import subprocess sourceDirectory = '/Volumes/encrypted/babybrains/converted' targetDirectory = '/Volumes/encrypted/babybrains/converted-renamed' patientMap = {} studyMap = {} seriesMap = {} def rename(subdirectory): lsProcess = subprocess.Popen(['ls', os.path.join(subdirector...
""" * Created by Synerty Pty Ltd * * This software is open source, the MIT license applies. * * Website : http://www.synerty.com * Support : support@synerty.com """ import pem import logging import platform from typing import Optional from twisted.internet import reactor from twisted.internet.ssl import Default...
import re from pathlib import Path from typing import TYPE_CHECKING, Optional, Tuple, Union if TYPE_CHECKING: from .base import BaseRepoAnalyzer from .git import LocalBranch Pathish = Union[str, Path] class UnsupportedURLError(ValueError): def __init__(self, url): self.url = url def __str__...
from flask import current_app, _app_ctx_stack from werkzeug.contrib.profiler import ProfilerMiddleware try: from flask_sqlalchemy import get_debug_queries flask_sqlalchemy_available = True except ImportError: flask_sqlalchemy_available = False PROFILER_DEFAULT_ENABLED = False PROFILER_DEFAULT_RESTRICTION...
from django.shortcuts import render # Create your views here. def show(request): template = 'customerservice/cs_form.html' context = {} return render(request, template, context) def pricing(request): template = 'customerservice/pricing_form.html' context = {} return render(request, template, context) de...
# -*- coding: utf-8 -*- import scrapy import re from ofertascrawler.items import Oferta URL_CASAS_BAHIA = re.compile(r'casasbahia') URL_MAGAZINE_LUIZA = re.compile(r'magazineluiza') URL_MERCADO_LIVRE_PROD = re.compile(r'produto\.mercadolivre') URL_MERCADO_LIVRE = re.compile(r'mercadolivre') class OfertasSpider(scra...
import datetime from django_featurette.models import Feature def get_enabled_features_for_user(user): """ Returns a list of features enabled for the current authenticated user. If the user can't access any feature or is anonymous, returns an empty list. """ enabled_features = [] if user.is_aut...
from abc import abstractmethod from abc import ABC from sa_pathfinding.environments.generics.state import State class Heuristic(ABC): __slots__ = '_name' def __init__(self): self._name = 'Uninitialized' def __str__(self): return f'Heuristic, type: {self._name}' @property def n...
from pathlib import Path import pandas as pd file_dir = Path(__file__).parent with open(file_dir / "solutions.csv", "r") as fp: solutions = pd.read_csv(fp, header=0, index_col=0)
#!/usr/bin/env python3 # Copyright 2016 The Fontbakery Authors # Copyright 2017 The Google Font Tools 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/lice...
# Microsoft Installer Library # (C) 2003 Martin v. Loewis import win32com.client.gencache import win32com.client import pythoncom, pywintypes from win32com.client import constants import re, string, os, sets, glob, subprocess, sys, _winreg, struct, _msi try: basestring except NameError: basestring = (str, uni...
from random import shuffle n = int(input('Quantidade de Alunos: ')) nome = [] for x in range(n): n = (input('Digite o nome do Aluno nº {}: '.format(x+1))) nome.append(n) shuffle(nome) print(nome)
""" Make vertical profile plots. """ import galene as ga xlim_var = { 'temp': [0, 25], 'psal': ([0, 15], [0, 35]), } data_id_list = [ 'ices-ctd', 'run001', 'run002', ] var_list = ['temp', 'psal'] for var in var_list: dataset_list = [] for data_id in data_id_list: d = ga.read_dat...
# manager.py # author: andrew young # email: ayoung@thewulf.org from django.db.models import Manager from elasticsearch.helpers import bulk as elasticbulk from elasticmodels.utils import serializers from elasticmodels.utils.aliasing import AliasedIndex from elasticmodels.utils.elasticobject import ElasticObject from...
# ####erwin_model_graph.py # # erwin文件反向工程,生成元数据存入表。 from config.config import cfg as config from schema import metadata_eng_reverse as mdr from mdata import metadata_initialize as mdi from privilege import user_mngt as ur import win32com.client logger = config.logger # 所有外键关系 all_rel_ref_list = [] # 所有Key信息 all_key_l...
from unittest import TestCase try: from functools import partialmethod except ImportError: # Partial method for Python 2.7 - https://gist.github.com/carymrobbins/8940382 from functools import partial # noinspection PyPep8Naming class partialmethod(partial): def __get__(self, instance, owner...
import judicious judicious.register("http://127.0.0.1:5000") # judicious.register("https://imprudent.herokuapp.com") decision = judicious.intertemporal_choice(SS=1, LL=2, delay="1 day") print(decision)
#!/usr/bin/env python3 import sys import re import json from os import path from lxml import etree class AudioFileProcessor: def __init__(self, inst): tree = etree.parse(inst.preset) pt = tree.xpath('/lmms-project/instrumenttracksettings')[0] pt.tag = 'track' pt.attrib['name'] = i...
import torch.nn as nn import math from .derive_blocks import derive_blocks from .operations import Conv1_1 class ImageNetModel(nn.Module): def __init__(self, net_config): super(ImageNetModel, self).__init__() self.blocks, parsed_net_config = derive_blocks(net_config) self.blocks.append(Con...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # For license information, please see license.txt import frappe from frappe import _ from frappe.model.document import Document from frappe.model import no_value_fields from frappe.translate import set_default_language from frappe.utils import cint, ...
# Generates names from different languages using a transformer. # The data loading part of this code was copied and adapted from # https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html # The transformer code was based on: # http://peterbloem.nl/blog/transformers # %% from __future__ import uni...
"""I/O utilities for SSSOM.""" import logging from pathlib import Path from typing import Optional, TextIO, Union from .context import ( get_default_metadata, set_default_license, set_default_mapping_set_id, ) from .parsers import get_parsing_function, read_sssom_table, split_dataframe from .typehints imp...
from django.apps import AppConfig class PappuConfig(AppConfig): name = 'pappu'
import sqlite3 db = "tweet-data.db" conn = sqlite3.connect(db) c = conn.cursor() #use this try block when new table added in db #added all previous table name to add new table try: c.execute("drop table lang_data") c.execute("drop table trend_data") c.execute("drop table twt_data") c.execute("drop tab...
"""Define Jinja2 filters used in the templates compilation.""" from pyrobuf import parse_proto from schematics.types import StringType, IntType, ModelType from protobuf_schematics.types import BytesType, EnumType class FieldConverter(object): PROTOBUF_FIELD_TO_SCHEMATICS_FIELD = { 'string': StringType, ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import json import pytz import urllib.request sys.path.insert(0, '/opt/python-verisure/') import verisure import pickle from datetime import datetime from tzlocal import get_localzone debug = False if debug: print("Start testing temp hum dev") try: execfile("/e...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------------------------------------------------------------------------------------ # COPERNICUS STUDY PROJECT # # SUMMER SEMESTER 2017 # # CREATED BY TEAM B - Cristhian Eduardo Murcia Galeano, Diego Armando Morales C...
#!/bin/python # Python module to generate regional plot for Regional Mitigation paper # All on one plot # ./MITIGATION_Paper_Regions_plot.py N All 0:6:11:12:16 4 7 2 # Split into several plots # ./MITIGATION_Paper_Regions_plot_CH4_emissions.py N RCP19 26:1:23:25:2:22:17:10:11:21:20:3 0:6:11:12:16 4 3 2 # ./MITIGATIO...
# 650. 2 Keys Keyboard # Runtime: 52 ms, faster than 61.81% of Python3 online submissions for 2 Keys Keyboard. # Memory Usage: 14.2 MB, less than 59.32% of Python3 online submissions for 2 Keys Keyboard. class Solution: # Prime Factorization def minSteps(self, n: int) -> int: ans = 0 d = 2 ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
from logging import ( StreamHandler ) from pystashlog.connection import ( Connection, INVALID_MESSAGE_TYPE_ERROR, ) from pystashlog.secure_connection import SecureConnection from pystashlog.exceptions import ( StashError, ConnectionError, TimeoutError, ) from pystashlog.logger import logge...
# -*- coding: utf-8 -*- import unittest from openprocurement.auctions.core.tests.base import snitch from openprocurement.auctions.geb.tests.base import ( BaseWebTest, ) from openprocurement.auctions.geb.tests.blanks.draft import ( phase_commit, check_generated_rectification_period, check_generated_tend...
num=1 for i in range (1,5): for j in range (1,i+1): print(num,end="") num+=1 print()
import numpy as np import pandas as pd from tiro_fhir import ValueSet @pd.api.extensions.register_series_accessor("code") class CodeOperations: def __init__(self, pandas_obj): self._obj: pd.Series = pandas_obj def isin(self, vs: ValueSet): return self._obj.apply(lambda c: c in vs).astype("boo...
#! /usr/bin/env python """ RASPA file format and default parameters. """ GENERIC_PSEUDO_ATOMS_HEADER = [ ['# of pseudo atoms'], ['29'], ['#type ', 'print ', 'as ', 'chem ', 'oxidation ', 'mass ', 'charge ', 'polarization ', 'B-factor radii ', 'connectivity ', 'anisotropic ', 'anisotropic-type ', 'tinker-typ...
''' The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640...
"""Change ID type to BigInteger Revision ID: 1fb4a98e3a4d Revises: cd9f3f359db1 Create Date: 2022-02-08 14:33:53.746979 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '1fb4a98e3a4d' down_revision = 'cd9f3f359db1' branch_labels = None depends_on = None def up...
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. class DuplicateManagerConfigException(Exception): """An exception indicating that a duplicate configuration was detected in any of the RAI managers. :param exception_message: A message describing the error. :type exception_messag...
from seabreeze.pyseabreeze.features._base import SeaBreezeFeature # Definition # ========== # # TODO: This feature needs to be implemented for pyseabreeze # class SeaBreezeI2CMasterFeature(SeaBreezeFeature): identifier = 'i2c_master' def get_number_of_buses(self): raise NotImplementedError("implemen...
import csv if __name__ == "__main__": # load data (same as part #1) data = [] with open("input1.txt", "r") as csvfile: reader = csv.reader(csvfile) for row in reader: if len(row) != 0: data.append(row[0].split()) # go through data (list of lists of conditions / ...
l = [1, 4, 5, 6, 7, 8] print(l)
import re s = input("Do you agree?\n") if re.search("^y(es)?$", s, re.IGNORECASE): print("Agreed") elif re.search("^n(o)?$", s): print("Not agreed")
#Project by Maame Yaa Osei, Maame Efua Boham & Nana Ama Parker #Music Player #Importing libraries import pygame from mutagen.id3 import ID3 from mutagen.mp3 import MP3 import os from tkinter.filedialog import * from tkinter import * from HashTable import * #Creating window in Tkinter, setting its size an...
import copy import os from importlib import import_module from importlib.util import find_spec as importlib_find def import_string(dotted_path): """ 解析 xx.xx这种路径并导入相应模块 Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import f...
import logging import os from itertools import chain from markdown import Markdown from more_itertools import chunked from pelican import signals, Readers, PagesGenerator from pelican.contents import Page from pelican.readers import BaseReader from pelican.themes.webosbrew import pagination_data from repogen import f...
import sys def load_data(path): with open(path, "r") as f: return [int(i) for i in f.read().strip().split("\t")] def redistribute(memory_banks): blocks, n_banks = max(memory_banks), len(memory_banks) start = memory_banks.index(blocks) memory_banks[start] = 0 for i in range(start + 1, sta...
from sys import stdin # Kadane Algorithm n = int(stdin.readline()) li = [int(c) for c in stdin.readline().split()] msf = li[0] meh = li[0] for i in range(1, n): meh = max(li[i], meh + li[i]) msf = max(meh, msf) print(msf)
from typing import Optional, Protocol import requests from montag.util.decorators import debug class HttpResponse(Protocol): status_code: int def json(self) -> dict: ... @property def text(self) -> str: ... class HttpAdapter: @debug def get( self, url: str...
# -*- coding: utf-8 -*- # !/usr/bin/env python # base import from gevent import monkey monkey.patch_all() import time import math import os import sys sys.path.append("Src/") import logging from flask import Flask from gevent.pywsgi import WSGIServer from Config import ConfigManager ACCESS_LOG_PATH = "logs/app_acc...
import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SASTest.settings') django.setup() from main.models import MarginClass, CI050, CC050 import xml.etree.cElementTree as ET import datetime import random ACCOUNTS = ["SchmidFinancials", "MayerTraders", "MuellerEnterprise"] CLEARING_MEMBER = ["Schm...
#!/usr/bin/env python """ isodate.py Functions for manipulating a subset of ISO8601 date, as specified by <http://www.w3.org/TR/NOTE-datetime> Exposes: - parse(s) s being a conforming (regular or unicode) string. Raises ValueError for invalid strings. Returns a float (representing seconds from the epoc...
# Generated by Django 3.0.10 on 2021-01-13 11:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('agony', '0003_qanda_recommended'), ] operations = [ migrations.AddField( model_name='qanda', name='salutation', ...
import os import io from dataclasses import dataclass from typing import Any, Dict, List, Tuple, Union from .read import AppBlockReader from ... import structs @dataclass(frozen=True) class _FSTEntry: name: str deleted: bool secondary_index: int @dataclass(frozen=True) class FSTDirectory(_FSTEntry): ...
import dataclasses import typing import marshmallow from .typing_json import Converter def dataclass_json(obj=None, *, converter=Converter()): def inner(obj): schema = {} annotations = typing.get_type_hints(obj) for field in dataclasses.fields(obj): metadata = {"metadata": fi...
#!/usr/bin/env python3 import copy from sys import argv file_r, file_w = argv[1:] file_opened = open(file_r, 'r') file_write = open(file_w, 'w') portnames = ['bgp', 'biff', 'bootpc', 'bootps', 'chargen', 'cmd', 'daytime', 'discard', 'dnsix', 'domain', 'drip', 'echo', 'exec', 'finger', 'ftp', 'ftp-data', 'gopher', 'host...
first_name = input() second_name = input() delimiter = input() print(f"{first_name}{delimiter}{second_name}")
from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.http import HttpResponse, JsonResponse from django.shortcuts import render, redirect from django.urls import reverse from .models import * from .my_util import get_select_money DEFALUT_SO...
class Square: def __init__(self, id, x, y, data): self.id = id self.x = x self.y = y self.data = data
# #!/usr/bin/python # -*- coding: utf-8 -*- """ Модуль журналирования Флаг SHOW_ON_DISPLAY управляет отображением на экране """ # pylint: disable=line-too-long import os import sys from xml.etree.ElementInclude import include # флаг: True - отображать на экране SHOW_ON_DISPLAY = True def get_script_path(): r...
#!/usr/bin/env python3 import sys SEP = '\t' class Mapper(object): def __init__(self, infile=sys.stdin, separator=SEP): self.infile = infile self.sep = separator def emit(self, key, value): sys.stdout.write(f"{key}{self.sep}{value}\n") def map(self): cont_line = 1 ...
""" PyDetex https://github.com/ppizarror/PyDetex PIPELINES Defines the pipelines which apply parsers. """ __all__ = [ 'simple', 'strict', 'PipelineType' ] import pydetex.parsers as par from pydetex.utils import ProgressBar from typing import Callable PipelineType = Callable def simple( s: str,...
#!/usr/bin/env python3 import sys from collections import Counter if __name__ == '__main__': X = int(input()) x = input().split() count_x = Counter(x) N = int(input()) shoe_size = [] for _ in range(N): i = input().split() shoe_size.append(i) res = 0 for s in shoe_size:...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# -*- coding: utf-8 -*- # # This file is part of django-powerdns-manager. # # django-powerdns-manager is a web based PowerDNS administration panel. # # Development Web Site: # - http://www.codetrax.org/projects/django-powerdns-manager # Public Source Code Repository: # - https://source.codetrax.org/hgroot/dja...
load("//bazel/utils:match.bzl", "matchany", "to_glob") load("//bazel/utils:labels.bzl", "labelrelative") def _message(ctx, ofile): """Commodity function to format a message with the file paths.""" return ctx.attr.progress.format(basename = ofile.basename, path = ofile.short_path) def _run(ctx, ifile, ipath, o...
dataset_type ='sample' problem_type = 'image_classification' dataset_dir = '/lwll' api_url = 'https://api-dev.lollllz.com/' problem_task = 'problem_test_image_classification' team_secret = 'a5aed2a8-db80-4b22-bf72-11f2d0765572' gov_team_secret = 'mock-secret' data_paths = ('predefined/scads.spring2021.sqlite3', ...
from __future__ import division import warnings import torch import torch.nn as nn from mmdet.core import RotBox2Polys, polygonToRotRectangle_batch from mmdet.core import (bbox_mapping, merge_aug_proposals, merge_aug_bboxes, merge_aug_masks, multiclass_nms, multiclass_nms_rbbox) from mmdet.core ...
from sklearn.cluster import KMeans, DBSCAN, AgglomerativeClustering import pickle # Save Model In artifacts def save_model(model, path): pickle.dump(model, path) # Clustering Class for custom training class ClusteringModels: @staticmethod def kmeans_clustering(X, fit_model=False, **kwargs): mode...
from django.db.models import Count from otcore.relation.models import RelationType, RelatedBasket from otcore.relation.processing import single_hit_containment, reverse_containment from otcore.hit.models import Hit, Basket from otcore.topic.models import Tokengroup from otcore.settings import otcore_settings def wri...
#!/usr/bin/python3 from colored import fg, attr from distutils.util import strtobool def run(age): print(age)
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Tests Spack's ability to substitute a different version into a URL.""" import os import pytest import spack.url @p...
"""Module for Testing the InVEST cli framework.""" import sys import os import shutil import tempfile import unittest import unittest.mock import contextlib import json import importlib import uuid try: from StringIO import StringIO except ImportError: from io import StringIO @contextlib....
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.keras.backend import _preprocess_padding, _preprocess_conv2d_input, shape, image_data_format from tensorflow.python.ops import array_ops from dynastes.core import nn as dnn def depthwi...
# Python Script, API Version = V17 import os,time ######## User guide ########## # run the script inside a project # it search each component for bodies, # if any bodies, it group together and save # to a file with the file name as component name ######## User Input ########## # please provide the path to save the mo...
# coding: utf-8 # In[1]: import folium import os os.chdir('h:/') import pandas as pd # In[2]: #this table comes from wikipedia # https://en.wikipedia.org/wiki/List_of_countries_by_oil_production #but i have changed the names of some countries #try to keep names consistent with geojson file df=pd.read_csv('oil p...
import numpy as np import nimfa V = np.random.rand(40, 100) pmf = nimfa.Pmf(V, seed="random_vcol", rank=10, max_iter=12, rel_error=1e-5) pmf_fit = pmf()
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: syft_proto/frameworks/torch/tensors/interpreters/v1/precision.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
""" Handles basic functionality shared by a number of other modules Classes: :py:class:`Base` Handles basic __init__ and listener patterns shared among several classes Decorators: :py:func:`listener` A class decorator adding a listener without disrupting :py:meth:`~Base._add_listeners` :py:...
import sys, time, string, random, os data = "memory-20120525.log" for i in range(1,10): os.system("date >> %s" %data ) os.system("prstat -s size 1 1 >> %s" %data ) time.sleep(1)
#!/usr/bin/env python # -*- coding: utf-8 -*- """ python3 -m tests.test_adb_device """ import os import threading import time import unittest from pathlib import Path from pythonadb import ADBClient, ADBDevice, KeyCodes, Intent from . import get_logger from .test_const import DEVICE_IP, DESKTOP_FOLDER log = get_log...
import json def _serializer(obj): """ Render particular types in an appropriate way for logging. Allow the json module to handle the rest as usual. """ # Datetime-like objects if isinstance(obj, bytes): return obj.decode('utf-8') if hasattr(obj, 'isoformat'): return obj.is...
# Generated by Django 3.2.9 on 2021-12-28 22:20 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('main', '0014_auto_20211229_0145'), ] operations = [ migrations.AlterField( model_name='response...
from .models import LocatorModel
DJANGO_PASSWORD='rBQxfCcdd$DS=R-+4|&X!B4%xSCTGb%d|+R*w+&#E&|-B|dCz4gVfA%/|%%VAB|r'
# Without Reduce product = 1 numbers = [1, 2, 3, 4] for num in numbers: product = product * num # With Reduce from functools import reduce product = reduce((lambda x, y: x * y), [1, 2, 3, 4])
from __future__ import absolute_import, unicode_literals import logging import sys from virtualenv.util.six import ensure_str LEVELS = { 0: logging.CRITICAL, 1: logging.ERROR, 2: logging.WARNING, 3: logging.INFO, 4: logging.DEBUG, 5: logging.NOTSET, } MAX_LEVEL = max(LEVELS.keys()) LOGGER = ...
vt=[i//9 for i in range(0,81)] ht=[(i%9)+9 for i in range(0,81)] st=[i//27*3+(i%9)//3+18 for i in range(0,81)] print("uint8_t _div_9_table[81]={"+",".join([str(e) for e in vt])+"};// i/9") print("uint8_t _mod_9_plus_9_table[81]={"+",".join([str(e) for e in ht])+"};// (i%9)+9") print("uint8_t _div_27_times_3_plus_mod...
#!/bin/env python # encoding:utf-8 # # # __Author__ = "CORDEA" __date__ = "2014-08-28" import sys arg = sys.argv[1] infile = open("clinvar", "r") idList = [r.split("\t")[2] for r in infile.readlines()] infile.close() infile = open(arg, "r") lines = infile.readlines() infile.close() outFile = open("dataset/clinv...
import numpy as np from mootils import paramtools # Control center: a bunch of useful switches steps_per_block = 1000 total_blocks = 10 save_to = "generic" # "new folder", "generic" or path to an existing folder start_from = "cubic" # cubic, conf, custom add_spherical_confinement = True add_lamina_attraction = False ...
import os import pathlib import frida process_pid = frida.spawn("dumpme01") session = frida.attach(process_pid) script = session.create_script(""" 'use strict'; rpc.exports = { memoryRanges: function (permission_mask) { return Process.enumerateRangesSync(permission_mask); }, extractMemory: funct...
from models.nvp_network import NonVolumePreservingNetwork from distributions.generative_distribution import GenerativeDistribution from tensorflow.keras.layers import Input class RealNVP(GenerativeDistribution): def __init__(self, output_size, config, name_scope...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models import math TIPO_CHOICES = ( (0, 'Carro'), (1, 'Moto'), (2, u'Caminhão'), (3,'Outro') ) def distance(origin, destination): """ input: - origin (tuple) - destinat...
version https://git-lfs.github.com/spec/v1 oid sha256:4ade5c42b41b9d13f22c16bc5e586c609790504eb8759bfa78bd268ca13f5928 size 5350
n = int(input()) if n == 0: print('YONSEI') else: print('Leading the Way to the Future')
""" Unit tests for the cert_get_data module """ import os import unittest from pytrustplatform.cert_get_data import cert_get_skid, cert_get_common_name, create_cert_fingerprint from pytrustplatform.tests.data import dummy_cert TEST_CERT_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'dummy_cer...
from django.forms import Field, ValidationError from django.utils.translation import ugettext_lazy as _ from attributes.widgets import AttributesFormFieldWidget from attributes.forms import AttributesForm class AttributesFormField(Field): widget = AttributesFormFieldWidget form = None def init_form(se...
from collections import defaultdict import ida_hexrays import ida_lines import ida_pro import json import re UNDEF_ADDR = 0xFFFFFFFFFFFFFFFF hexrays_vars = re.compile("^(v|a)[0-9]+$") def get_expr_name(expr): name = expr.print1(None) name = ida_lines.tag_remove(name) name = ida_pro.str2user(name) ret...
# auth: christian bitter # name: sm.py # desc: simple deterministic Finite State Automaton/ Machine definition import uuid class State(object): def __init__(self, name: str, description: str = None): super(State, self).__init__() self._id = uuid.uuid1() self._name = name self._de...
from .function_metadata import FunctionMetadata