text
stringlengths
3
1.05M
// /* // * stylie.treeview // * https://github.com/typesettin/stylie.treeview // * // * Copyright (c) 2015 Yaw Joseph Etse. All rights reserved. // */ // 'use strict'; // var extend = require('util-extend'), // CodeMirror = require('codemirror'), // StylieModals = require('stylie.modals'), // editorModals, // ...
define([ 'ash', 'game/GameGlobals', 'game/GlobalSignals', 'game/constants/UIConstants', 'game/constants/PositionConstants', 'game/nodes/PlayerLocationNode', 'game/vos/TabCountsVO', 'utils/StringUtils', ], function (Ash, GameGlobals, GlobalSignals, UIConstants, PositionConstants, PlayerLocationNode, TabCountsVO,...
/** * 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. */ // RUN: LC_ALL=en_US.UTF-8 %hermes -non-strict -O -target=HBC %s | %FileCheck --match-full-lines %s print('RegExp'); // CHECK-LAB...
'use strict'; const Joi = require('@hapi/joi'); const postLogin = require('./post-login'); const postProfile = require('./post-profile'); const resetPassword = require('./post-reset-password'); const postUser = require('./post-users'); const accountConfirmation = require('./get-confirm-account'); module.exports = { ...
#!/usr/bin/env python3.6 import unittest import coverage from flask_script import Manager from flask_migrate import Migrate, MigrateCommand COV = coverage.coverage( branch=True, include='app/*', omit=[ 'app/tests/*', 'app/server/config.py', 'app/server/*/__init__.py' ] ) COV.s...
/*! * Copyright 2014 Apereo Foundation (AF) Licensed under the * Educational Community 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://opensource.org/licenses/ECL-2.0 * * Unless required by applicab...
# pylint: disable = redefined-outer-name import getpass import os from pwd import getpwnam from typing import Generator import docker import py import pytest from requests.exceptions import ReadTimeout from . import utils from .utils import python class ExecutionEnvironment: def __init__(self, request, work_di...
from json.decoder import JSONDecodeError, JSONDecoder from redbot.core import commands, config from redbot.core import Config from redbot.core import checks import asyncio from collections import defaultdict import discord import json import os, os.path from redbot.core.utils.chat_formatting import box, error, info, pa...
/*===================================================================*/ /* */ /* pNesX.h : NES Emulator for PSX */ /* */ /* 1999/11/03 Racoon New prep...
#!/usr/bin/env node const program = require('commander'); const colors = require('colors'); const cmd = require('node-cmd'); const sudo = require('sudo-prompt'); let make_gray = (txt) => { return colors.gray(txt); //display the help text in red on the console } let runner = (dir, c) => { if (!dir._args) { ...
import os import numpy as np ws = os.path.abspath(os.path.dirname(__file__)) cellsize = 90 def test_import_prms_builder(): from gsflow.builder import PrmsBuilder def test_build_prms_parameters(): from gsflow.builder import GenerateFishnet, FlowAccumulation, PrmsBuilder from gsflow.prms imp...
import pytest, requests from kubernetes.client.rest import ApiException from suite.resources_utils import wait_before_test, replace_configmap_from_yaml from suite.custom_resources_utils import ( read_crd, delete_virtual_server, create_virtual_server_from_yaml, patch_virtual_server_from_yaml, create_...
import ROOT as rt import matplotlib.pyplot as plt from sklearn.metrics import roc_auc_score, roc_curve import numpy as np import argparse import os import random fs=25 parser=argparse.ArgumentParser() parser.add_argument("--var",type=str,default="eta",help='') parser.add_argument("--savename",type=str,default="savemae"...
/* * This header is generated by classdump-dyld 1.0 * on Sunday, June 7, 2020 at 11:42:05 AM Mountain Standard Time * Operating System: Version 13.4.5 (Build 17L562) * Image Source: /System/Library/Accounts/Notification/CoreRoutineAccountNotificationPlugin.bundle/CoreRoutineAccountNotificationPlugin * classdump-dyld is...
import subprocess import time import sys import os class ChangesApplier: def __init__(self, sleep_hrs, path, conf_path): self.sleep_hrs = sleep_hrs self.path = path self.conf_path = conf_path def daemonize(self): try: pid = os.fork() if pid > 0: ...
import torch.optim from . import FairseqOptimizer, register_optimizer import math import sys sys.path.append('..') sys.path.append('..') sys.path.append('..') from optims import nosadam @register_optimizer('nosadam') class FairseqNosAdam(FairseqOptimizer): def __init__(self, args, params): super().__i...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.12/esri/copyright.txt for details. //>>built define("esri/tasks/LegendLayer",["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(a,b,c,d){a=a(null,{declaredClass:"esri.tasks.LegendLayer",l...
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
# 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 agreed to...
from __future__ import unicode_literals import re from .common import InfoExtractor class BloombergIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bloomberg\.com/(?:[^/]+/)*(?P<id>[^/?#]+)' _TESTS = [{ 'url': 'http://www.bloomberg.com/news/videos/b/aaeae121-5949-481e-a1ce-4562db6f5df2', ...
import argparse import asyncio import multiprocessing import os import signal import threading import time from typing import TYPE_CHECKING, Dict, Optional, Union from jina import __docker_host__, __windows__ from jina.helper import random_name, slugify from jina.importer import ImportExtensions from jina.logging.logg...
// // Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu> // Creation Date: Sat Feb 14 21:47:39 PST 2015 // Last Modified: Sat Apr 21 10:52:19 PDT 2018 Removed using namespace std; // Filename: midifile/include/MidiEvent.h // Website: http://midifile.sapp.org // Syntax: C++11 // vim: ...
# coding=utf-8 # Copyright (c) 2021 Josh Levy-Kramer <josh@levykramer.co.uk>. # This file is based on code by the authors denoted below and has been modified from its original version. # # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); ...
# # 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...
#  Copyright 2019 LINE Corporation # #  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 agreed to...
/* * Encode (Dir.type, Dir.dev, Dir.Qid.path) into Qid.path. * We do this by making an educated guess on how the input * bits are going to be laid out in the common case which * allows a direct encoding scheme to be used for most * files; otherwise we must resort to storing a full map * entry into a table. * *...
# Copyright 2020 Graphcore Ltd. from pathlib import Path import pytest # NOTE: The import below is dependent on 'pytest.ini' in the root of # the repository from examples_tests.test_util import SubProcessChecker working_path = Path(__file__).parent.parent.joinpath("start_here") class TestStartHere(SubProcessChecker...
/*! * froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2019 Froala Labs */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('froala-editor')) : typeof define === 'function...
#!/usr/bin/python # -*- coding: utf-8 -*- """ emcee tools module. The objective of this module is to provide a toolbox for the exploitation and visualisation of emcee results. """ from logging import getLogger, INFO from matplotlib.pyplot import subplots, figure, Subplot, Axes # , figure, plot, show import numpy as ...
""" Variables 1. Ask their name 2. Ask their upper bound 3. Guess! 4. Answer! """ name = raw_input("What's your name?") upper_bound = input("What's the biggest number you want to guess?") import random answer = random.randint(0,upper_bound) guess = input("What's your guess?") print answer if guess > answer: print...
/* * * File: main.h * * Copyright (C) 2009-2013 Darran Kartaschew * * This file is part of the gMTP package. * * gMTP is free software; you can redistribute it and/or modify * it under the terms of the BSD License as included within the * file 'COPYING' located in the root directory * */ #ifnd...
/* * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. * Copyright 2010, The Android Open Source Project * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code mu...
/* * Kendo UI v2015.2.624 (http://www.telerik.com/kendo-ui) * Copyright 2015 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial licen...
#! /usr/bin/env python # -*- coding: UTF-8 -*- import os import sys sys.path.insert(0, '%s/..' % os.path.dirname(__file__)) from movies.data_import import import_data directory = "./data" if len(sys.argv) == 3: directory = sys.argv[1] fmt = sys.argv[2] else: print "Usage:\n\t%s [<directory> <format>]\n...
$(document).ready(function () { var pokemonDetailImageSelector = ".pokemon__item--large .pokemon__item-img"; //Apply shake animation on hover of the large Pokémon images $(pokemonDetailImageSelector).mouseover(function () { $(pokemonDetailImageSelector).effect("shake"); }); });
from django.db import models class Category(models.Model): title = models.CharField(max_length=200) def __str__(self): return f"{self.title}" # Create your models here. class Posts(models.Model): title = models.CharField(max_length=200) date = models.DateField() category = models.Fore...
#! /usr/bin/env python """Genetic Programming in Python, with a scikit-learn inspired API""" from setuptools import setup, find_packages import gplearn DESCRIPTION = __doc__ VERSION = gplearn.__version__ setup(name='gplearn', version=VERSION, description=DESCRIPTION, long_description=open("README....
const wd = require('wd'); const chai = require('chai'); const logging = require('./logging'); const capsConfig = require('./caps'); const serverConfig = require('./server'); const testDefinitions = require('../e2e-specs'); global.should = chai.should(); let driver; let allPassed = true; describe('Advanced HTTP e2e t...
#!/usr/bin/env python3 from pwncat.db import Fact from pwncat.platform.linux import Linux from pwncat.modules.enumerate import EnumerateModule class ASLRStateData(Fact): def __init__(self, source, state): super().__init__(source=source, types=["system.aslr"]) self.state: int = state """ ...
from par import * import matplotlib.pyplot as plt for dset in ['W','Wp','C']: D = read2Ddataset(nrad, N2, lambda i,j: fn(i,j) + dset + '.txt') plt.figure(figsize = (16,11)) plt.suptitle('$\\log M_{{\\rm BH}} = {logM:.1f}$, $\\dot m = {mdot:.4f}$, $\\alpha_B = {alpha:.4f}$, $\\nu = {nu:.1f}$, $R = [{rin:.1...
# -*- coding: utf-8 -*- """API stuff.""" class API(object): def __init__(self, app): self.application = app
from typing import Union, List from pathlib import Path from tifffile import imread import zarr import dask.array as da import numpy as np from tiler import Tiler # use zarr==2.10.3 def tifffile_to_dask(im_fp: Union[str,Path]) -> Union[da.array, List[da.Array]]: imdata = zarr.open(imread(im_fp, aszarr=True)) ...
# Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.lang['hi']={"editor":"रिच टेक्स्ट एडिटर","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"मदद के लिये ALT 0 दबाए","browseServer":"सर्वर ब्राउज़ करें","url...
// Generated by CoffeeScript 1.6.3 (function() { jQuery(function() { var error_func, update_status; error_func = function(response, a, b) { if (response.status === 403) { if (response.responseJSON.data.message === "User must be a volunteer") { $('#content').prepend('<div class="alert a...
/* * This file is part of the MicroPython project, http://micropython.org/ * * Development of the code in this file was sponsored by Microbric Pty Ltd * * The MIT License (MIT) * * Copyright (c) 2014 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this so...
import { echoLog } from '../log' import { httpRequest } from '../httpRequest' import { unique, throwError, delay } from '../tool' async function verifyDiscordAuth () { try { const logStatus = echoLog({ type: 'text', text: 'verifyDiscordAuth' }) const { result, statusText, status, data } = await httpRequest({...
# 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...
from datetime import datetime, timedelta from airflow import DAG from airflow.contrib.operators import kubernetes_pod_operator from airflow.contrib.operators.slack_webhook_operator import \ SlackWebhookOperator from airflow.hooks.base_hook import BaseHook AIRFLOW__KUBE_CONFIG = "/usr/local/airflow/.kube/config" #...
__all__ = [ "Adapter", "AlbumentationsAdapterComponent", "AlbumentationsImgComponent", "AlbumentationsSizeComponent", "AlbumentationsInstancesLabelsComponent", "AlbumentationsBBoxesComponent", "AlbumentationsMasksComponent", "AlbumentationsKeypointsComponent", "AlbumentationsIsCrowds...
const express = require('express'); const morgan = require('morgan'); const routes = require('./routes/index'); const error = require('./middlewares/error') const cors = require('cors'); const path = require('path'); const fileUpload = require('express-fileupload') const app = express(); // app.get('*', (req, res) => ...
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ ...
import re """ Taken from https://gist.github.com/gilsondev/7c1d2d753ddb522e7bc22511cfb08676 and modified for better output of tables. """ # fmt: off # control words which specify a "destination". destinations = frozenset(( 'aftncn','aftnsep','aftnsepc','annotation','atnauthor','atndate','atnicn','atnid', 'atn...
# Dictionaries used in setup. # The commands necessary to get your mac address: # Start a command line with iPython # from uuid import getnode # getnode() <- this is the number you need # In order to double-check with hex mac-address of ipconfig \all, run this: # mac_address = ("".join(c + "-" if i % 2 else c fo...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/eks/EKS_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/eks/model/AutoScalingGroup.h> #include <ut...
from .constants import FINDING_OKTA_APP_CRED, FINDING_OKTA_DOMAIN ERROR_MESSAGE_ORG_URL_WRONG_TYPE = ("Your Okta URL should be type of str.") ERROR_MESSAGE_ORG_URL_MISSING = ( "Your Okta URL is missing. You can copy " "your domain from the Okta Developer " "Console. Follow these instructions to" f" fi...
#!/usr/bin/env python3 # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIE...
#ifndef HONEYUNITS_H #define HONEYUNITS_H #include <QString> #include <QAbstractListModel> /** Honey unit definitions. Encapsulates parsing and formatting and serves as list model for drop-down selection boxes. */ class HoneyUnits: public QAbstractListModel { Q_OBJECT public: explicit HoneyUnits(QObject *...
"""Simplified AWS client. This module abstracts the botocore session and clients to provide a simpler interface. This interface only contains the API calls needed to work with AWS services used by chalice. The interface provided can range from a direct 1-1 mapping of a method to a method on a botocore client all the...
from pygfa.graph_element.parser import line, field_validator as fv SERIALIZATION_ERROR_MESSAGGE = "Couldn't serialize object identified by: " def _format_exception(identifier, exception): return SERIALIZATION_ERROR_MESSAGGE + identifier \ + "\n\t" + repr(exception) def _remove_common_edge_fields(edge_dict)...
/* Landed by HTML5 UP html5up.net | @ajlkn Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) */ var btn = $('#button'); $(window).scroll(function() { if ($(window).scrollTop() > 300) { btn.addClass('show'); } else { btn.removeClass('show'); } }); btn.on('click', fun...
import cv2 def save_plate(): img = cv2.imread("car.jpg") #load HAAR cascade plate_classifier = cv2.CascadeClassifier("indian_plate.xml") gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) plate = plate_classifier.detectMultiScale(gray, 1.3, 7) for (x,y,w,h) in plate: n_plate = img[y:y+h, x:x+...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests that ensure the boot time to init process is within spec.""" import os import re import time from framework import decorators import host_tools.logging as log_tools # The maximum acceptable boot ...
/* * This header is generated by classdump-dyld 1.0 * on Sunday, September 27, 2020 at 11:52:11 AM Mountain Standard Time * Operating System: Version 14.0 (Build 18A373) * Image Source: /System/Library/PrivateFrameworks/AirTrafficDevice.framework/AirTrafficDevice * classdump-dyld is licensed under GPLv3, Copyright © 20...
import * as React from "react" import Svg, { Path } from "react-native-svg" export const NetworkIcon = (props) => { return ( <Svg width={21} height={21} viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} > <Path d="M14.367 9.065c-....
# -*- coding: utf-8 -*- # coding: utf-8 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import (print_function, division, unicode_literals, absolute_import) from builtins import zip, next, range, str from ....pip...
import os import time import keras import numpy import tensorflow def load_shakespeare_tokenizer(): shakespeare_url = "https://homl.info/shakespeare" # shortcut URL filepath = keras.utils.get_file("shakespeare.txt", shakespeare_url) with open(filepath) as f: shakespeare_text = f.read() t...
# -*- coding: utf-8 -*- import click import logging import cv2 import os import shutil import json import numpy as np from pathlib import Path from sklearn.model_selection import StratifiedShuffleSplit from process_image import generate_subsections from dotenv import find_dotenv, load_dotenv from itertools import chain...
class Instruction(object): ALL = {} @classmethod def make_instruction(cls, name, base, mode_a, mode_b): assert name not in cls.ALL cls.ALL[name] = type(name, (base,), dict(mode_a=mode_a, mode_b=mode_b)) def __init__(self, a, b, c): self.a = a self.b = b self.c =...
# -*- coding: utf-8 -*- # # This file is part of EUDAT B2Share. # Copyright (C) 2016 University of Tuebingen, CERN. # # B2Share is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License...
// // VungleSDKCreativeTracking.h // Vungle iOS SDK // // Copyright (c) 2013-Present Vungle Inc. All rights reserved. // @protocol VungleSDKCreativeTracking @optional /** * If implemented, this will get called when the SDK has an ad ready to be displayed. * The parameters will indicate that an ad associated with...
#!/usr/bin/env python # # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
"""Example using mypackage""" from mypackage.subpackage1.module1 import sum, subtract, multiply_matrix from mypackage.module2 import testClass import numpy as np value1 = 2 value2 = 1 matrix1 = np.asarray([[0.1, 2, 400], [10, 81.5, 15], [0, 0, 1]], dtype=np.float16) matrix2 = np.asarray([[1, 1, 1...
import interval from './interval'; import invert from './invert'; const chord = (tonic, intervals, inversion = 0) => invert([tonic].concat(intervals.map(interval(tonic))), inversion); export default chord;
from actors import Creature, Wizard, Dragon import random def main(): print_header() game_loop() def print_header(): print('---------------------------------') print(' WIZARD GAME') print('---------------------------------') print() def game_loop(): creatures = [ Creatu...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta import numpy as np import pandas as pd from pandas import (Series, DataFrame, date_range, Timestamp, DatetimeIndex, NaT) from pandas.compat import lrange, range from pandas.util.testing impor...
from io import BytesIO from typing import Dict from providers.airlaunch.opcua.transfers.opcua_transfer_base import OPCUATransferBaseOperator from airflow.providers.postgres.hooks.postgres import PostgresHook import pandas as pd class OPCUAToPostgresOperator(OPCUATransferBaseOperator): template_fields = ('opcua_n...
""" Copyright 2021 Dynatrace 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, software ...
const Proto = require('uberproto'); module.exports = logger => { return app => { if (typeof logger === 'function') { app.use(logger); } else if (typeof logger !== 'undefined') { app.set('logger', logger); } Proto.mixin({ _logger: logger, log() { if (this._logger...
from copy import deepcopy from dataclasses import dataclass, field from itertools import chain from typing import ( List, Dict, Any, Optional, TypeVar, Union, Mapping, ) from typing_extensions import Protocol, runtime_checkable import hashlib import os from dbt.clients.system import resolve_path_from_base from db...
"""Test svm on pitch2dv0""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import os import pandas as pd import scipy.io as spio import matplotlib.pyplot as plt import time from sklearn.metrics import confusion_m...
import flask from . import BaseFlaskTestCase from ...utils import assert_span_http_status_code class FlaskErrorhandlerTestCase(BaseFlaskTestCase): def test_default_404_handler(self): """ When making a 404 request And no user defined error handler is defined We create t...
// Academia para treino de JS
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Sep 24 09:13:14 2020 @author: sudhir """ # ============================================================================= # Import libary # ============================================================================= import os import gc import pandas a...
/* Thread and interpreter state structures and their interfaces */ #include "Python.h" #define GET_TSTATE() \ ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) #define SET_TSTATE(value) \ _Py_atomic_store_relaxed(&_PyThreadState_Current, (uintptr_t)(value)) #define GET_INTERP_STATE() \ (...
/***************************************************************************** Copyright (c) 2014, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source cod...
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.add("smiley",{requires:"dialog",lang:"af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,i...
/** @jsx jsx */ import { useContext, memo } from "react" import PropTypes from "prop-types" import { MDXProvider } from "@mdx-js/react" import { ThemeProvider, jsx } from "theme-ui" import { Box } from "@theme-ui/components" import { SkinContext } from "../../context" import { checkAndParse } from "../../utils/checkA...
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "update_attrs") _PYPI_FILE_BUILD = """\ package(default_visibility = ["//visibility:public"]) filegroup( name = "file", srcs = ["{}"], ) """ def _pypi_file_impl(ctx): """Implementation of the pypi_file rule.""" index_url = ctx.attr.index if no...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/crafted/booster/shared_fast_charge_fuel_cell_mk1.iff" result.a...
import userScreening from 'components/userScreening/index.vue' import detailedFrame from 'components/detailedFrame/index.vue' import { formatDate } from '@/utils/data.js' import { commonRequest } from '@/api/api-strategy.js' import paging from 'components/paging/index.vue' export default { components: { userScree...
from lumicks.pylake.detail.alignment import align_fd_simple import numpy as np class FdEnsemble: """An ensemble of FD curves exported from Bluelake. This class provides a way to handle an ensemble of FD and perform procedures such as curve alignment on them. Attributes ---------- fd_curves : Dic...
import { userJoinCampus,getUserDetail } from '@/services/api'; import { setNewAuthority } from '@/utils/authority'; import { reloadAuthorized } from '@/utils/Authorized'; import { routerRedux } from 'dva/router'; import { getPageQuery } from '@/utils/utils'; export default { namespace: 'binding', state: { ...
/** * Project: "PA IGTI - Controle de Manutenção API com Node.js & MongoDb" * * file: src/controllers/client.controllers.js * Description: Responsável pelo CRUD da classe: 'Client' * Data: 01/06/2021 */ const Clients = require('../models/client.model'); const messageHelper = require('../models/messages.model'); ...
const validateCredentials = (req, res, next) => { const { username, password } = req.body; if (!username || !password) { res.status(400).json({ errMessage: 'missing username or password field' }); } else if (typeof username !== 'string' || typeof password !== 'string') { res.status(400).json({ errMessage: 'field...
// Test utility to test index.js const tdAsserter = require("../index").tdAssertions const fs = require("fs") const simpleTD = { "id": "urn:simple", "@context": "https://www.w3.org/2019/wot/td/v1", "title": "MyLampThing", "description": "Valid TD copied from the specs first example", "securityDefinitions": { "b...
import Boom from 'boom'; import response from '../middlewares/response'; import Calendar from '../models/calendar'; import User from '../models/user'; const controller = { getAll : { auth: 'token', handler : function(request, reply){ Calendar.find({ privacy: false}, function (err, calendars) { if...
import math import bpy import mathutils def clear(): bpy.ops.wm.open_mainfile(filepath='./tests/data/clean.blend') def setup(image_size): context = bpy.context context.scene.render.resolution_x = image_size context.scene.render.resolution_y = image_size context.scene.render.resolution_percentag...