text
stringlengths
3
1.05M
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os import time try: import frida except ImportError: sys.exit('install frida\nsudo pip3 install frida') def sbyte2ubyte(byte): return (byte % 256) def print_result(message): print ("[!] Received: [%s]" %(message)) def on_message(message, data): ...
/** * Coin Slider - Unique jQuery Image Slider * @version: 1.0 - (2010/04/04) * @requires jQuery v1.2.2 or later * @author Ivan Lazarevic * Examples and documentation at: http://workshop.rs/projects/coin-slider/ * Licensed under MIT licence: * http://www.opensource.org/licenses/mit-license.php **/ (function($...
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import...
# -*- coding: utf-8 -*- r""" p-adic L-functions of elliptic curves To an elliptic curve `E` over the rational numbers and a prime `p`, one can associate a `p`-adic L-function; at least if `E` does not have additive reduction at `p`. This function is defined by interpolation of L-values of `E` at twists. Through the ma...
import React from 'react'; import { shallow, mount } from 'enzyme'; import NumberGenerator from '.'; const numbers = ['0980507445', '0157012758', '0638520348', '0840913822', '0980507445', '0157012758', '0638520348', '0840913822', '0980507445', '0157012758', '0638520348', '0840913822', '0980507445', '0157012758'...
/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */ var XLSX={};(function make_xlsx(XLSX){XLSX.version="0.8.16";var current_codepage=1200,current_cptable;if(typeof module!=="undefined"&&typeof require!=="undefined"){if(typeof cptable==="undefined")cptable=require("./dist/cpexcel");current_cptable=cptable[current_...
from Restaurant import app if __name__ == '__main__': app.debug = True app.run(host='0.0.0.0', port=5000)
/* * Copyright (c) 2016 PrivatBank IT <acsk@privatbank.ua>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include "AuthenticatedSafe.h" #include "asn_internal.h" #include "ContentInfo.h" #undef FILE_MARKER #define FILE_MARKER "pkix/struct/AuthenticatedSafe.c" s...
/** * \file * * \brief Header file for SAMD21G15L * * Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries. * * \asf_license_start * * \page License * * Subject to your compliance with these terms, you may use Microchip * software and any derivatives exclusively with Microchip products. *...
from copy import deepcopy from typing import List import networkx from metrics_layer.core.model.base import MetricsLayerBase from metrics_layer.core.model.definitions import Definitions from metrics_layer.core.sql.query_errors import ParseError class MetricsLayerDesign: """ """ def __init__(self, no_group_...
class Resource: endpoint = None def __init__(self, client=None): self.client = client def _get(self, path, data, **kwargs): return self.client.get(path, data, **kwargs) def _patch(self, path, data, **kwargs): return self.client.patch(path, data, **kwargs) def _post(self, ...
# Generated by Django 2.2.4 on 2019-08-22 04:24 import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('knowledgequest', '0002_auto_20181231_0403'), ] operations = [ migrati...
""" Praatio example for deleting the vowels from the textgrids and audio files """ import os from os.path import join import copy from praatio import textgrid from praatio import praatio_scripts from praatio import audio from praatio.utilities import utils def isVowel(label): return any([vowel in label.lower() ...
# Generated by Django 3.2.4 on 2021-06-22 09:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0002_auto_20210618_1545'), ] operations = [ migrations.AlterModelOptions( name='activity', options={'ordering': ['st...
"use strict"; var Interpreter_1 = require("../servicecode/Interpreter"); var Sandbox_1 = require("../servicecode/Sandbox"); var Helper_1 = require("../helpers/Helper"); var InitSelfTest_1 = require("../servicecode/InitSelfTest"); var Statistics_1 = require("../statistics/Statistics"); var SERVICE_CODE = { "init": [...
from .inference import inference_model, init_model from .test import multi_gpu_test, single_gpu_test, single_gpu_test_stash from .train import train_model __all__ = [ 'init_model', 'inference_model', 'multi_gpu_test', 'single_gpu_test', 'train_model', 'single_gpu_test_stash' ]
from .models import Link def ctx_dict(request): ctx = {} links = Link.objects.all() for link in links: ctx[link.key] = link.url return ctx
""" Django settings for estore project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os fro...
module.exports = { mysql: { database: 'bookshelf_test', user: 'root', encoding: 'utf8' }, postgres: { database: 'bookshelf_test', user: 'postgres' }, sqlite3: { filename: ':memory:' }, oracledb: { user : "travis", password : "travis", connectString : "...
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
"""DatetimeIndex analog for cftime.datetime objects""" # The pandas.Index subclass defined here was copied and adapted for # use with cftime.datetime objects based on the source code defining # pandas.DatetimeIndex. # For reference, here is a copy of the pandas copyright notice: # (c) 2011-2012, Lambda Foundry, Inc. ...
import logging import os from .Plugin import Plugin from localpdb.utils.config import Config from localpdb.utils.os import create_directory from localpdb.utils.network import download_url logger = logging.getLogger(__name__) # Plugin specific imports import gzip import shutil from localpdb.utils.os import multiproces...
const baseConfig = require('cdk-build-tools/config/jest.config'); module.exports = { ...baseConfig, coverageThreshold: { global: { branches: 80, statements: 60, }, }, };
from __future__ import absolute_import, division, print_function, unicode_literals from six import python_2_unicode_compatible from canvasapi.canvas_object import CanvasObject from canvasapi.paginated_list import PaginatedList from canvasapi.util import combine_kwargs, obj_or_id @python_2_unicode_compatible class B...
#ifndef BERT_APPLICATION_H #define BERT_APPLICATION_H #include <signal.h> #include <atomic> #include <memory> #include "EventLoop.h" #include "Typedefs.h" #include "Poller.h" #include "ananas/util/Timer.h" ///@brief Namespace ananas namespace ananas { namespace internal { class EventLoopGroup; } /// @file Applica...
from yq.__init__ import cli if __name__ == "__main__": cli()
# -*- coding: utf-8 -*- """ ------------------------------------------------- File: aes_encrypt.py Description: AES加密解密实现 Author: Create Date: 2020/07/30 ------------------------------------------------- Modify: 2020/07/30: --------------------------------------...
#!/usr/local/bin/python """ Filename: __init__.py Author: mrityunjaykumar Date: 02/02/19 author_email: mrkumar@cs.stonybrook.edu """
# coding=utf-8 """ The parser library to support all input file processing and parsing """ import hashlib import re def idat(file_map): """if the idat option has been set (PNG_IDAT), we find the png header, and then find the IDAT chunk. Grab bytes from the idat chunk onwards. parameter: file_map ...
// Seeds file that remove all users and create 2 new users // To execute this seed, run from the root of the project // $ node bin/seeds.js const mongoose = require("mongoose"); const bcrypt = require("bcrypt"); const User = require("../models/User"); const bcryptSalt = 10; mongoose .connect('mongodb://localhost/...
import AnimatedProp from direct.actor import Actor from direct.interval.IntervalGlobal import * class HQPeriscopeAnimatedProp(AnimatedProp.AnimatedProp): def __init__(self, node): AnimatedProp.AnimatedProp.__init__(self, node) parent = node.getParent() self.periscope = Actor.Actor(node, co...
// Copyright 2017 The Dawn 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 t...
from sklearn.base import BaseEstimator, TransformerMixin import pandas as pd import numpy as np class DateComponents(BaseEstimator, TransformerMixin): # suffix to name features suffix_ = { 'is_leap_year': 'leap', 'year': 'year', 'is_quarter_end': 'eoq', 'quarter': 'quarter', ...
# Copyright (c) 2008-2011 Tim Newsham, Andrey Mirtchovski # Copyright (c) 2011-2012 Peter V. Saveliev # # 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 # withou...
/* Copyright (c) 2001 Matej Pfajfar. * Copyright (c) 2001-2004, Roger Dingledine. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /** * \file connection_or.c * \brief Functions to handle OR connections, TL...
touimport numpy as np import torch from torch import nn from DataHelper import LandscapeImages, img_shape from torchvision.utils import save_image import pro_gan_pytorch.PRO_GAN as pg def train_model(device_to_run): #Data dataset = LandscapeImages() #Hyperparameters depth = 7 batch_sizes = [5, 5,...
import { useDispatch } from 'react-redux' import { apiRequest, formSubmitStart, formSubmitSuccess, formSubmitError, forwardTo } from 'Utilities' import { AuthActions } from 'reducers/AuthReducer' const useAuth = (data) => { const dispatch = useDispatch() const login = async (payload) => { try { ...
var keditor; KindEditor.ready(function (K) { keditor = K.create('#content', { themeType : 'simple', width : '100%', resizeType: 0, minHeight: 50,//设置编辑器的最小高度 minWidth: 500,//设置编辑器的最小宽度 allowPreviewEmoticons: !1, allowImageUpload: !1, }); }); layui...
# 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/. # # Copyright (c) 2014-2019, Lars Asplund lars.anders.asplund@gmail.com """ Test the database related classes """ impor...
from __future__ import unicode_literals import sys import unittest from django.conf import settings from django.contrib.admindocs import utils, views from django.contrib.admindocs.views import get_return_data_type, simplify_regex from django.contrib.sites.models import Site from django.db import models from django.db...
include('./iojs') include('./iojs')
import argparse import sys from TrainingInterfaces.TrainingPipelines.FastSpeech2_LJSpeech import run as fast_LJSpeech from TrainingInterfaces.TrainingPipelines.FastSpeech2_LibriTTS import run as fast_LibriTTS from TrainingInterfaces.TrainingPipelines.FastSpeech2_Nancy import run as fast_Nancy from TrainingInterfaces.T...
# --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% import os #impor...
/* Copyright 2019 Adobe. All rights reserved. This file is licensed to you 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 agre...
export default { path: '/', children: [ require('./home').default, require('./notFound').default ] };
const fs = require('fs') const path = require('path') module.exports.scanDirSync = (root, cb) => { const files = fs.readdirSync(root) files.forEach(file => { const stats = fs.lstatSync(path.join(root, file)) if (stats.isDirectory()) { cb(file) } }) } module.exports.fileExistsSync = (root, file...
import React from 'react'; import expect from 'expect'; import { shallow } from 'enzyme'; import Home from '../../../components/home'; describe('Provider and Home', () => { const home = shallow(<Home />); it('renders <Provider/> correctly', () => { expect(home).toMatchSnapshot(); }); });
// @flow // Norwegian import type { Translation } from 'pickadate/types' const translation: Translation = { firstDayOfWeek: 1, template: 'DD. MMM. YYYY', templateHookWords: { MMM: [ 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'ok...
/** * sends the response with the message */ module.exports = (res, status, message) => { if(message) { res.status(status).send(message); } else { res.sendStatus(status); } }
from sqlalchemy import Column, Integer, String, Boolean from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine Base = declarative_base() class Knowledge(Base): # Create a table with 4 columns # The first column will be the p...
/** @type {import('semantic-release').GlobalConfig} */ /* eslint-disable no-template-curly-in-string */ module.exports = { branches: ['main', 'next', { name: 'beta', prerelease: true }], plugins: [ [ '@semantic-release/commit-analyzer', { preset: 'angular', releaseRules: [ ...
/* var addthis_config = { ui_use_css: false }; var addthis_share = { templates: { twitter: 'twitter:check out {{url}} (from {{title}})-{{html}} ', } }*/ var $ = require('common:widget/ui/jquery/jquery.js'); var UT = require('common:widget/ui/ut/ut.js'...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include <stdio.h> #include <string.h> #include "mpi.h" #define X 64 #define Y 8 #define Z 512 double array[X][Y][Z]; int main(int argc, char *argv[]) { ...
from flask import Flask import flask_login # Define the WSGI application object app = Flask(__name__) app.config.from_object('config') # ########################################################################## # ## Strava from stravalib.client import Client strava_client = Client() authorize_url = strava_client.au...
'use strict'; module.exports = { type: 'object', properties: { description: { type: 'string' }, place: { type: 'string' }, recipient: { type: 'object', properties: { name: { type: 'string...
module.exports = { publicPath: process.env.NODE_ENV === 'production' ? 'birthday-input' : '/', devServer: { open: process.platform === 'darwin', host: '0.0.0.0', port: 3006, https: false, hotOnly: false, }, pluginOptions: { webpackBundleAnalyzer: { openAnalyzer: false }...
module.exports = { 'serverURL' : 'http://127.0.0.1:3000/api', 'TOGGLE_LOGGED_IN': 'isLoggedIn/TOGGLE_LOGGED_IN', 'CLEAR_TOKEN' : 'token/CLEAR_TOKEN', 'SET_TOKEN' : 'token/SET_TOKEN', 'SET_USER_NAME' : 'name/SET_USER_NAME', 'SET_USER_EMAIL': 'email/SET_USER_EMAIL', 'SET_USER_NICKNAME' : 'nick...
#include "bfclean.h" static inline uint8_t to_instr(char c) { switch (c) { case '+': return (uint8_t)((1u << 2) | BF_ADD); case '-': return (uint8_t)((-1u << 2) | BF_ADD); case '>': return (uint8_t)((1u << 2) | BF_PTR); case '<': return (uint8_t)((-1u << 2) | BF_PTR); case '[': return (...
/*! * Socket.IO v3.0.0-rc2 * (c) 2014-2020 Guillermo Rauch * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.io=e():t.io=e()}("undefined"!=typeof self?self:"unde...
#!/usr/bin/env python2 import glob import os import platform import subprocess import sys import traceback from distutils.command.install import INSTALL_SCHEMES from distutils.sysconfig import get_python_inc from distutils.util import convert_path from setuptools import find_packages from setuptools import setup # Ge...
import cv2 import numpy as np import depthai as dai import time ''' Basic demo of gen2 pipeline builder functionality where output of jpeg encoded images are sent out SPI rather than the typical XLink out interface. Make sure you have something to handle the SPI protocol on the other end! See the included ESP32 examp...
// Copyright 2020 The Pigweed 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
from coreapp.asm_diff_wrapper import AsmDifferWrapper from coreapp.m2c_wrapper import M2CWrapper from coreapp.compiler_wrapper import CompilerWrapper from coreapp.serializers import CompilerConfigurationSerializer, ScratchSerializer from django.http import HttpResponse from django.shortcuts import get_object_or_404 fro...
// switch-case-tests //////////////////////////////////////////////////// // switch-test 1: case with break; //////////////////////////////////////////////////// var a1=5; var b1=6; var r1=0; switch(a1+5){ case 6: r1 = 2; break; case b1+4: r1 = 42; break; case 7: r1 = 2; break; } //////...
module.exports={A:{A:{"1":"C A B","2":"H G F SB"},B:{"1":"D q W I"},C:{"1":"0 1 2 q W I L M N O P Q R S T U V s X Y Z a b c d e f J h i j k l m n o p u v w t y r g","2":"3 QB E K H G F C A B D OB NB"},D:{"1":"0 1 2 6 9 U V s X Y Z a b c d e f J h i j k l m n o p u v w t y r g CB RB AB","2":"E K H G F C A B D q W I L M ...
""" A rather slow but physically realistic photon path tracing algorithm. """ import traceback import collections import traceback import numpy as np from typing import Optional, Tuple, Sequence from dataclasses import dataclass, replace from pvtrace.scene.scene import Scene from pvtrace.scene.node import Node from pvt...
_base_ = ['./xnet_model_PointPillar_SECOND_ResNet_Fusion_kitti-3d-car.py'] model = dict( fusion_layer=dict( type='XNetFusion', img_channels=256, pts_channels=256, out_channels=256) )
export default function() { return [ {title: 'Javascript: The Good Parts', pages: 101}, {title: 'Harry Potter', pages: 85}, {title: 'The Dark Tower', pages: 323}, {title: 'Eloquent Ruby', pages: 1} ] }
#!/usr/bin/env python3 # Copyright 2021 Alexis Lopez Zubieta # # 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, cop...
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may ...
import React from "react"; // eslint-disable-line import chai from "chai";// eslint-disable-line import {mount} from "enzyme";// eslint-disable-line import TestUtils from "../TestUtils"; import ScatterChart from "charts/ScatterChart";// eslint-disable-line const dataA = [ {x: 1, y: 3, z: 6}, {x: 2, y: 5, z: 9...
module.exports = { path: 'components', getComponent(nextState, cb) { require.ensure([], (require) => { cb(null, require('./components/Components')); }); } };
import _ from 'lodash'; import React from 'react'; import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines'; function average(data){ return _.round(_.sum(data)/data.length); } export default (props) => { return( <div> <Sparklines height={120} width={180} data={props.data}>...
// AFNetworking.h // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) // // 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 witho...
export { default as Attributes } from "./attributes"; export { default as AddComboTab } from "./add-combo-tab"; export { default as CharacterPortrait } from "./character-portrait"; export { default as ComboListCard } from "./combo-list-card"; export { default as ComboInterface } from "./combo-interface"; export { defau...
# Copyright 2015-2018 Capital One Services, 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 ...
from .proc import *
# # Base submodel class # import pybamm class BaseSubModel(pybamm.BaseModel): """ The base class for all submodels. All submodels inherit from this class and must only provide public methods which overwrite those in this base class. Any methods added to a submodel that do not overwrite those in this b...
import pytest import os import glob from fireworks.core.rocket_launcher import rapidfire from abipy.electrons.gsr import GsrFile from abiflows.fireworks.workflows.abinit_workflows import InputFWWorkflow, ScfFWWorkflow from abiflows.fireworks.tasks.abinit_tasks import ScfFWTask, OUTDIR_NAME, INDIR_NAME, TMPDIR_NAME fro...
""" WSGI config for myDailyFresh project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
#!/usr/bin/env python import traceback from dateutil.parser import parse as time_parser import requests import argparse import datetime import logging from logging import config import os import re import schedule import time logger = logging.getLogger(__name__) # def get_queue_list_in_pages(base_url, page_size=10...
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ proc.h ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Forrest Yu, 2005 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/...
"""The Zadnego Ale component.""" from __future__ import annotations import logging from typing import Final from aiohttp import ClientSession from aiohttp.client_exceptions import ClientConnectorError import async_timeout from zadnegoale import Allergens, ApiError, ZadnegoAle from homeassistant.config_entries import...
import time from base import BaseClient import logging_helper #from pprint import pprint LEADS_API_VERSION = '1' def list_to_dict_with_python_case_keys(list_): d = {} for item in list_: d[item] = item if item.lower() != item: python_variant = item[0].lower() + ''.join([c if c.lo...
import Vue from 'vue' import Vuex from 'vuex' import VueRouter from 'vue-router' import { createLocalVue } from 'packages/test-utils/src' import Component from '~resources/components/component.vue' import ComponentWithVuex from '~resources/components/component-with-vuex.vue' import ComponentWithRouter from '~resources/...
import json import re from collections import defaultdict, namedtuple from typing import Dict, List, Optional from debug_utils import LOG_NOTE from mod_async import CallbackCancelled, async_task, auto_run, delay from mod_async_server import Server from mod_moe_server.fetcher import MoeFetcher from mod_moe_server.moe i...
from django.conf import settings from django.conf.urls import url, include from django.conf.urls.i18n import i18n_patterns from django.views.generic import TemplateView, RedirectView from django.utils.module_loading import import_string import os import zerver.forms from zproject import dev_urls from zproject.legacy_ur...
const fs = require('fs') const path = require('path') const webpack = require('webpack') const MemoryFileSystem = require('memory-fs') const isProd = process.env.ELEVENTY_ENV === 'production' const mfs = new MemoryFileSystem() // main entry point name const ENTRY_FILE_NAME = 'main.js' module.exports = class { //...
import React, { Component } from 'react'; import Func from '../../Classes/Func'; import { Link, Redirect } from 'react-router-dom'; import SocialLink from './SocialLink'; class SocialLinks extends Component { constructor(props){ super(props); this.state = { links : null, newLink : n...
# Aula 19 - 04-12-2019 # Lista com for e metodos # Como comer um gigante.... é com um pedaço de cada vez. # Na hora de fazer este exercicio, atentar para # Com o arquivo de cadastro.txt onde possui os seguintes dados: codigo cliente, nome, idade, sexo, e-mail e telefone # 1 - Crie um metodo que gere e retorne uma list...
import atexit import functools import math import timeit from weakref import WeakSet from contextvars import ContextVar from inspect import iscoroutinefunction from multiprocessing import Lock from time import perf_counter try: from time import thread_time except ImportError: # thread_time is not available in ...
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // clang-format off import {assertEquals, assertNotEquals} from '../chai_assert.js'; import {FakeChromeEvent} from '../fake_chrome_event.m.js'; // clang-f...
from marshmallow import fields from app import ma from models import Role class RoleSchema(ma.SQLAlchemyAutoSchema): created_at = fields.Function(lambda obj: obj.created_at.strftime("%Y-%m-%d %H:%M")) updated_at = fields.Function(lambda obj: obj.updated_at.strftime("%Y-%m-%d %H:%M")) class Meta: ...
#!/usr/bin/env python from sqlalchemy_inventory_definition import session, OperatingSystem ubuntu_710 = OperatingSystem(name='Linux', description='2.6.22-14 kernel') session.save(ubuntu_710) session.commit()
#!/usr/bin/env python # # Public Domain 2014-present MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a com...
/* * SPDX-License-Identifier: ISC * SPDX-URL: https://spdx.org/licenses/ISC.html * * Copyright (C) 2012-2015 William Pitcock <nenolod@dereferenced.org> * Copyright (C) 2015-2018 Aaron M. D. Jones <aaronmdjones@gmail.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with...
"""All constants related to the ZHA component.""" DEVICE_CLASS = {} SINGLE_CLUSTER_DEVICE_CLASS = {} COMPONENT_CLUSTERS = {} def populate_data(): """Populate data using constants from bellows. These cannot be module level, as importing bellows must be done in a in a function. """ from zigpy impo...
import unittest from katas.beta.caesar_cipher_encryption_variation import caesar_encode class CaesarEncodeTestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual( caesar_encode('conquer et impera', 130), 'conquer fu korgtc' ) def test_equal_2(self): self.ass...
import numpy as np from ray.rllib.utils.typing import ModelConfigDict from ray.rllib.models import ModelCatalog from CustomModels.customNetwork import CustomNetwork from CustomModels.sensorNetwork import SensorNetwork from gym import spaces from ray.tune.registry import register_env from airgym.envs.drone_env import Ai...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayEbppProdmodeSignQueryModel(object): def __init__(self): self._logon_id = None self._prod_code = None @property def logon_id(self): return self._logon_id ...