text
stringlengths
3
1.05M
# ======================================================================== # # Imports # # ======================================================================== import os import sys import argparse import pickle from stable_baselines.common.vec_env import DummyVecEnv from stable_baselines import PPO2 sys.path.inser...
var transparent=!0,transparentDemo=!0,fixedTop=!1,navbar_initialized=!1,backgroundOrange=!1,sidebar_mini_active=!1,toggle_initialized=!1,$html=$("html"),$body=$("body"),$navbar_minimize_fixed=$(".navbar-minimize-fixed"),$collapse=$(".collapse"),$navbar=$(".navbar"),$tagsinput=$(".tagsinput"),$selectpicker=$(".selectpic...
// DATABASE const mongoose = require('mongoose') const connection = mongoose.connection const Promise = require('bluebird') const autoIncrement = require('mongoose-auto-increment') autoIncrement.initialize(connection) mongoose.Promise = Promise module.exports = (config) => { const db_connection_url = ...
// A suite of tests to run on two browsers at once. var env = require('./environment.js'); exports.config = { seleniumAddress: env.seleniumAddress, framework: 'jasmine2', // Spec patterns are relative to this directory. specs: [ 'basic/lib_spec.js' ], multiCapabilities: [{ 'browserName': 'chrome...
import os from andes.shared import np def dump_data(text, header, rowname, data, file, width=14, precision=5): out = '' os.makedirs(os.path.abspath(os.path.dirname(file)), exist_ok=True) with open(file, 'w') as fid: for Text, Header, Rowname, Data in zip(text, header, rowname, data): ...
import DataSearch from './DataSearch' export default { path: 'dataSearch', component: DataSearch }
from mpfmc.tests.MpfIntegrationTestCase import MpfIntegrationTestCase from mpfmc.tests.MpfSlideTestCase import MpfSlideTestCase class TestService(MpfIntegrationTestCase, MpfSlideTestCase): def get_config_file(self): return 'config.yaml' def get_machine_path(self): return 'integration/machine...
import argparse from time import time import torch from torchvision import datasets, transforms import utility import model_helper import os def get_input_args(): parser = argparse.ArgumentParser() parser.add_argument('data_dir', type=str, help='Set directory to training images') ...
/** * @license * Copyright 2020 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
#include "../atrshmlog_internal.h" /*******************************************************************/ /** * \file atrshmlogimpl_init_shm_log.c */ /** * \n Main code: * * \brief helper: we initialize one buffer * * \param i_shm * The adress of the shared memory buffer. * * \param i_index_buffer * The...
import React, { Component } from "react"; import styles from "./styles/ReloadIconButton.module.css"; class ReloadIconButton extends Component { constructor(props) { super(props); this.state = {}; } componentDidMount() {} componentWillReceiveProps(nextProps) {} click = () => { if (typeof this....
from unittest import skip import numpy as np from VariableUnittest import VariableUnitTest from gwlfe.AFOS.GrazingAnimals.Losses import GRLBN class TestGRLBN(VariableUnitTest): @skip("not ready") def test_GRLBN(self): z = self.z np.testing.assert_array_almost_equal( GRLBN.GRLBN_2...
import React, { useEffect, useState } from 'react'; import { getPetTypes } from '../../api/petfinder'; import Logo from '../../assets/logo.svg'; import Search from '../search'; import { NavLink } from 'react-router-dom'; const Navigation = () => { const [petTypes, setPetTypes] = useState([]); useEffect(() => { ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _mjmlValidator = require("mjml-validator"); var _mjmlCore = require("mjml-core"); (0, _mjmlValidator.registerDependencies)({ 'mj-body': ['cm-repeater'], 'mj-column': ['cm-repeater'], 'cm-repeater': ['m...
Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var hub_1 = require("@sentry/hub"); var types_1 = require("@sentry/types"); var utils_1 = require("@sentry/utils"); var errors_1 = require("./errors"); var idletransaction_1 = require("./idletransaction"); var transaction_1 =...
/** * Forces an update on a list of numerical fields, also making sure that * any undefined fields are set to 0. * @param {string[]} attrs * @param {function} cb */ function forceUpdate(attrs, cb) { parseAttrs(attrs, values => { let tempValues = {}; _.each(attrs, attr => { tempValues[attr] = -9999;...
const path = require('path'); const fs = require('fs').promises; const writePackages = outputDir => { return ({config, bundles, packages}) => { return Promise.all( packages.map(({packageName, src}) => { const outputPath = path .resolve(outputDir, packageName + '.js'); return fs.wr...
import json import time import numpy as np import argparse from pathlib import Path from itertools import product from pprint import PrettyPrinter from grl.generalized_experiment import GeneralizedExperiment # from grl.agents import SarsaTCAgent from grl.agents import SarsaLambdaTCAgent from grl.envs.mountaincar impor...
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const createStore = () => new Vuex.Store({ state: { menuIsActive: false, menuInitial: true, blogPosts: [], allPages: [], navheight: 60, blogTitle: '', siteInfo: [], connect: [], allTags: [], gr...
# Copyright 2020 BDL Benchmarks Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
//VSCode Run support===================================================================================== //为便于在JS IDE如VSCode,webStorm里脱离APP环境执行JS,以快速验证JS代码正确性 //如果不在App环境,Native接口重定向到JS同名函数打印调用 //jsFlutterRequire 转调Node运行环境中的require //只有js_framework_lib中的文件,才能用这个头 let jsFlutterRequire = typeof mxRequire != "undefined"...
def somemethod(self): print("Executed somemethod")
import requests ############## # list items # ############## all_items = [] all_items.append( { "item_id": 0, "seller_id": 0, "min_price": 5.0 } ) all_items.append( { "item_id": 1, "seller_id": 1, "min_price": 10.0 } ) all_items.append( { "i...
import requests import pygal from pygal.style import LightColorizedStyle as LCS, LightenStyle as LS url = 'https://api.github.com/search/repositories?q=language:python&sort=stars' r = requests.get(url) print("Status code:", r.status_code) response_dict = r.json() print("Total repositories", response_dict['total_cou...
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
# Generated by Django 2.0 on 2017-12-22 12:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portfolio', '0005_make_fields_optional'), ] operations = [ migrations.AlterField( model_name='transaction', name='exch...
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyrigh...
"""Get Terrapos position Dataset by reading Terrapos position output file Example: from where import apriori dset = apriori.get('terrapos_position') # File key 'terrapos_output_position' has to be defined in configuration file # files.conf. # Rename the dataset and write it to ...
import torch import torch.nn as nn import torch.nn.functional as F from loss.dice_loss import DiceLoss from loss.cross_entropy import CrossentropyLoss, TopKLoss class BCEPlusDice(nn.Module): """Dice loss, need one hot encode input Args: weight: An array of shape [num_classes,] ignore_index: c...
// Note that the console log output does not appear in Julia REPL when // this is called using spawn. For debugging, use "run". These functions // are run in a shell outside the web page. var page = require('webpage').create(), system = require('system'), t, address; if (system.args.length === 1) { console.log('...
/*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Rick Macklem at The University of Guelph. * * Redistribution and use in source and binary forms, with or without * modification, are permitted p...
#import libraries import datetime as dt from collections import defaultdict ## Grouping and sorting ## def group_by_cluster(data, clusters, no_clusters): ''' returns a nested list of data, sorted by cluster ''' ret = [[] for i in range(no_clusters)] for i in range(len(clusters)): index = int(clust...
from __future__ import print_function from .SutterMP285 import *
# Pseudo-Palindromic Paths in a Binary Tree ''' Given a binary tree where node values are digits from 1 to 9. A path in the binary tree is said to be pseudo-palindromic if at least one permutation of the node values in the path is a palindrome. Return the number of pseudo-palindromic paths going from the root node to...
'use strict' const nodemailer = require('nodemailer') const transporter = nodemailer.createTransport({ service: 'qq', secureConnection: true, // use SSL port: 465, // port auth: { user: 'fearcleari@qq.com', pass: 'ueinsbfrtitgbghi' } }) module.exports = mailOptions => { mailOptions = mailOptions ...
/////////////////////////////////////////////////////////////////////// // YLog.h // // Copyright 11/13/2005 Edgar Glowacki. // // Maintained by: Edgar // // NOTES: // This is defined in yaget.Options vc++ property sheet // #define YAGET_LOG_ENABLED 1 // Initialize log system, should be called as one ...
var classoperations__research_1_1IndexPairSwapActiveOperator = [ [ "IndexPairSwapActiveOperator", "classoperations__research_1_1IndexPairSwapActiveOperator.html#a871622f2ed4fb5b000554d53c4b864a8", null ], [ "~IndexPairSwapActiveOperator", "classoperations__research_1_1IndexPairSwapActiveOperator.html#a2041fde20...
"""The classic Tiger problem. This is a POMDP problem; Namely, it specifies both the POMDP (i.e. state, action, observation space) and the T/O/R for the agent as well as the environment. The description of the tiger problem is as follows: (Quote from `POMDP: Introduction to Partially Observable Markov Decision Proces...
from typing import List, Union, Dict from codelets.adl.flex_param import FlexParam from codelets.adl.operation import Operation, Loop, Transfer, Compute, Configure, OperandTemplate, Datatype from types import LambdaType from pytools import memoize_method from collections import defaultdict from copy import deepcopy ...
/* * This header is generated by classdump-dyld 1.0 * on Sunday, September 27, 2020 at 11:40:20 AM Mountain Standard Time * Operating System: Version 14.0 (Build 18A373) * Image Source: /System/Library/Frameworks/CoreMotion.framework/CoreMotion * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Li...
// Regular expression that matches all symbols in the `Ogham` script as per Unicode v9.0.0: /[\u1680-\u169C]/;
import { currentStoreView } from '@vue-storefront/store/lib/multistore' /** * Converts date to format provided as an argument or defined in config file (if argument not provided) * @param {String} date * @param {String} format */ export function date (date, format) { const storeView = currentStoreView() return...
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Auth class Copyright (c) 2010-2018 OneLogin, Inc. MIT License Main class of OneLogin's Python Toolkit. Initializes the SP SAML instance """ import xmlsec from defusedxml.lxml import tostring from onelogin.saml2 import compat from onelogin.saml2.settings import OneLogin_...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #import <t...
/******************************************************************************** * Ledger Node JS API * (c) 2017-2018 Ledger * * 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 * ...
#!bin/python # Helpful script for converting fixed point signed numbers to decimal def letter2num(x): if (x == "F" or x == "f"): return 15 elif (x == "E" or x == "e"): return 14 elif (x == "D" or x == "d"): return 13 elif (x == "C" or x == "c"): return 12 elif (x == "B" or x == "b"): return 11 elif (x...
/* Mince Slicer MIT License Copyright (c) 2021 Juan Jose Luna Espinosa 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, copy, ...
from django.apps import AppConfig class UploadConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'apps.upload'
import React from "react"; export default function FooterAdmin() { return ( <> <footer className="block py-4"> <div className="container mx-auto px-4"> <hr className="mb-4 border-b-1 border-gray-300" /> <div className="flex flex-wrap items-center md:justify-between justify-cente...
'use strict'; module.exports = function (config) { config.set({ files: [ 'node_modules/angular/angular.js', 'node_modules/angular-mocks/angular-mocks.js', 'node_modules/linkheader-parser/dist/linkheader-parser-browser.js', 'node_modules/mediatype-parser/dist/mediatype-parser-browser.js',...
#include "vntlib.h" KEY uint16 count = 1000 constructor Fallback4() {} MUTABLE uint16 test1(uint16 amount){ for(uint8 i = 0; i< amount; i++) { count += i; } return count; } _(){ uint16 res = test1(count); PrintInt16T("res", res); }
/* BitmapText - An actor that holds a Font and draws text to the screen. */ #ifndef BITMAPTEXT_H #define BITMAPTEXT_H #include "Sprite.h" class Font; class BitmapText : public Actor { public: BitmapText(); virtual ~BitmapText(); bool LoadFromFont( CString sFontName ); bool LoadFromTextureAndChars( CString sTe...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
import React, {Component} from 'react'; import {Row, Col} from 'react-bootstrap'; import '../css/homepage.css'; import ImgCon from "../util/imgCon"; import HomepageData from '../content/homepageData'; class HomePage extends Component { render() { return( <> <Row id="welcome...
(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){"use strict";var t={},n=Math.max,r=Math.min;t.c={};t.c.d=e(document);t.c.t=function(e){return e.originalEvent.touches.length-1};t.o=function(){var n=this;this.o=null;this.$=null;this.i=null;this.g=null;this.v=nul...
import React from 'react'; import Layout from './components/Layout/Layout'; import Container from './components/Container/Container'; import Profile from './components/profile/Profile'; import Statistics from './components/statistics/Statistics'; import FriendList from './components/friendList/FriendList'; import Trans...
/* $Xorg: SetTxtProp.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any...
const CustomError = require("../extensions/custom-error"); module.exports = function transform(array) { arr = array.slice(0); for (let i = 0; i<arr.length; i++){ if (arr[i]==undefined){ //do nothing } else if (arr[i] == '--double-next'){ arr[i]=arr[i+1]; } else if (arr[i] == '--dou...
const authController = require('../controllers/auth') module.exports = async function (req, res, next) { const token = req.cookies.auth_token || req.headers.authorization; const user = await authController.verifyToken(token) if(user) req.user = user next(); }
/* eslint-disable */ !function(name,path,ctx){ var latest,prev=name!=='Keen'&&window.Keen?window.Keen:false;ctx[name]=ctx[name]||{ready:function(fn){var h=document.getElementsByTagName('head')[0],s=document.createElement('script'),w=window,loaded;s.onload=s.onreadystatechange=function(){if((s.readyState&&!(/^c|loade/...
# 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...
"""bootstrap.__main__: executed when bootstrap directory is called as script.""" import sys from .pyplan_ide import main if __name__ == "__main__": sys.exit(main())
/** * * Props: * refreshable : true, // 是否下拉, 默认true * pagination : true, // 是否分页, 默认true * autoLoadMore : true, * displayStatus : { * 'wait':'点击加载更多', * 'loading':'加载中...', * 'error':'加载失败,点击重新加载', * 'done':'已经没有更多了' * }, * controlProps : {} // 下拉控制属性 * dataSource : ListView.DataSource * ...
load("201224b0d1c296b45befd2285e95dd42.js"); function foo() { var x = 0; for (var i = arguments.length - 1; i >= 0; i--) x += arguments[i]; return x; } function bar() { var x = 0; for (var i = 0; i < arguments.length; i++) x += arguments[i]; return x; } function baz(a,b,c,d,e) { var x = 0; fo...
const { series } = require('gulp'); const { exec } = require('child_process'); const path = require('path'); /** Configuration Constants */ const BUILD_VERSION = 'v1'; const SERVICE_NAME = 'service-customer'; const CONTAINER_REGISTRY = '730880032795.dkr.ecr.eu-west-1.amazonaws.com'; const DOCKER_FILE_PATH = path.join(...
!function(e){var t,n,o,i,c,d,l='<svg><symbol id="icon-chenggong" viewBox="0 0 1024 1024"><path d="M512.01 1010.33c-274.852 0-498.488-223.56-498.488-498.325 0-274.77 223.642-498.335 498.488-498.335 274.842 0 498.468 223.565 498.468 498.335 0 274.765-223.626 498.325-498.468 498.325z m289.06-690.304c-13.931-13.82-45.947-2...
""" Pytorch Optimizer and Scheduler Related Task """ import math import logging import torch from torch import optim from config import cfg def get_optimizer(args, net): """ Decide Optimizer (Adam or SGD) """ if args.backbone_lr > 0.0: base_params = [] resnet_params = [] resnet...
import { storage, database } from "../../firebase/firebaseConfig"; import { getPostsAsArrays, memoize,checkIfDuplicate,removeDuplicate } from "../../firebase/helpers"; export function SHOW_NEWEST() { return (dispatch) => { dispatch({ type: "FETCHING", payload: null }); database().ref("posts").limitToLast(9).once...
// // Created by valery on 17/09/2019. // #ifndef SCRIPT_LINUX_RECORDER_H #include "pty_master_open.h" #include "ptyFork.h" #include "tty_raw.h" #include "sys/time.h" typedef struct header { struct timeval tv; int len; } Header; #define SCRIPT_LINUX_RECORDER_H #endif //SCRIPT_LINUX_RECORDER_H
"use strict"; var webpack = require('webpack'); var path = require('path'); var loaders = require('./webpack.loaders'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var HOST = process.env.HOST || "127.0.0.1"; var PORT = process.env.PORT || "8888"; // global css loaders.push({ test: /\.css$/, exclude: /[\...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = isElectron; var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); function isElectron(mockUserAgent) { ...
const devPath = 'src'; const devAssets = `${devPath}/assets`; const distPath = 'dist'; const distAssets = `${distPath}/assets`; const config = { path: { dev: { app: devPath, assets: `${devAssets}`, css: `${devAssets}/css`, js: `${devAssets}/js`, img: `${devAssets}/img`, ...
from os import environ get = environ.get SECRET_KEY = get('SECRET_KEY', 'abcdefghijklmnop') PLENARIO_SENTRY_URL = get('PLENARIO_SENTRY_URL', None) DATA_DIR = '/tmp' # Travis CI relies on the default values to build correctly, # just keep in mind that if you push changes to the default # values, you need to make ...
import React from 'react'; import { Container, Title, List, Item, Picture, Name } from './styles/Profiles'; export default function Profiles({ children, ...restProps }) { return <Container {...restProps}>{children}</Container>; } Profiles.Title = function ProfilesTitle({ children, ...restProps }) { return <Ti...
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2015, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
#!/usr/bin/env python # encoding: utf-8 """Usage: convert.py serial_speakers <input_path> <serie_uri> <annotation_path> <annotated_path> [--map] """ from pyannote.core import Annotation, Segment, Timeline import pyannote.database from Plumcot import Plumcot import json from termcolor import colored import numpy as n...
# Copyright (c) 2020, 2021 The Linux Foundation # # SPDX-License-Identifier: Apache-2.0 import hashlib import os import re from west import log from zspdx.licenses import LICENSES from zspdx.util import getHashes # ScannerConfig contains settings used to configure how the SPDX # Document scanning should occur. clas...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import random from typing import Callable, ClassVar, Any from PyQt5.QtCore import QPoint, Qt, QTimer from PyQt5.QtGui import QPainter, QColor, QPolygon, QPainterPath, QPolygonF, QPaintEvent, QMouseEvent from PyQt5.QtWidgets import QWidget, QGridLayout from src.rightClick...
from ast import Mod from enum import Enum import random import uuid import networkx as nx import matplotlib.pyplot as plt from mesa import Agent, Model from mesa.time import RandomActivation from mesa.datacollection import DataCollector from mesa.space import NetworkGrid def perceived_proposal_value(model): """Re...
""" OpenAPI definition No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v0 Contact: support@gooddata.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sy...
/* * Copyright (c) 2019, The OpenThread Authors. * All rights reserved. * * 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 must retain the above copyright * notice, this ...
"""All helper for interaction with telegram.""" import time import logging from datetime import datetime from telegram.error import TimedOut, NetworkError from raven import breadcrumbs from stickerfinder.sentry import sentry from stickerfinder.config import config def call_tg_func(tg_object: object, function_name: s...
""" Django settings for demo project. Generated by 'django-admin startproject' using Django 2.2.1. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # Bu...
var searchData= [ ['resources',['Resources',['../../../../../doc/html/group__resources.html',1,'']]] ];
import cv2 as cv import argparse import sys import numpy as np import os.path # Initialize the parameters confThreshold = 0.5 #Confidence threshold nmsThreshold = 0.4 #Non-maximum suppression threshold inpWidth = 416 #Width of network's input image inpHeight = 416 #Height of network's input image parse...
class Car { constructor(manufacture, color) { this.manufacture = manufacture; this.color = color; this.enginesActive = false; } }
#pragma once #include "types.h" #include "result.h" #include <exception> #include <functional> #include <vector> namespace npp { /// Declare classes for deps class IDynamicLoader; /// Initialize a dynamic library with this type typedef std::function< void(const char *) > DynamicInitLib; typedef std::funct...
$(document).ready(function () { /////////////////////////////////////////// // Create plot, draw points and add zoom // /////////////////////////////////////////// var n = 15; // number of points var max = 100; // maximum of x and y // Radius of floating circle (cursor), also used in stroke-...
// validate message headers and some fields const tlds = require('haraka-tld'); exports.register = function () { const plugin = this; plugin.load_headers_ini(); try { plugin.addrparser = require('address-rfc2822'); } catch (e) { plugin.logerror("unable to load address-rfc2822, try...
import os import pygame from pygame.locals import * from pygame.compat import geterror from globals import DELTAX, DELTAY main_dir = os.path.split(os.path.abspath(__file__))[0] data_dir = os.path.join(main_dir, 'data') def load_image(name, colorkey=None): fullname = os.path.join(data_dir, name) try: ...
# 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 ...
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
# Generated by Django 2.0.12 on 2020-05-03 17:29 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] op...
import { shallow } from 'enzyme'; import React from 'react'; import { plain as Schedule, mapDispatchToProps, mapStateToProps } from './Schedule'; import { setActivityEndDate, setActivityStartDate } from '../../actions/editActivity'; describe('the Schedule (milestones) component', () => { const props = { ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import argparse from difflib import SequenceMatcher def main(): args = parse_user_args() for i, line in enumerate(args.input): if args.debug and ((i + 1) % 100000 == 0): print >> sys.stderr, "[{}]".format(i + 1) ...
# capturar excepciona y manejar errores en codigo # susceptible a fallos/errores """ try: nombre = input("Cual es tu nombre ?: ") if len(nombre) > 1: nombre_usuario = "El nombre es: " + nombre print(nombre_usuario) except: print("Ha ocurrido un error, ingresa el nombre correct...
(function (global) { "use strict"; const GOVUK = global.GOVUK; function Summary (module) { this.module = module; this.$el = module.$formGroup.find('.selection-summary'); this.fieldLabel = module.fieldLabel; this.total = module.total; this.addContent(); this.update(module.getSelection());...
/** * @fileoverview configs:unsafe for the plugin * @author 唯然<weiran.zsd@outlook.com> */ "use strict"; const packageMetadata = require("../../package"); const PLUGIN_NAME = packageMetadata.name.replace(/^eslint-plugin-/u, ""); const allRules = require("../rules"); const unsafe = { plugins: [PLUGIN_...
# Copyright 2013 Huawei Technologies Co.,LTD. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
function cmsNotify(e,t){$(".cms-notification").css("display","block"),$(".cms-notification").attr("class","cms-notification"),$(".cms-notification").addClass(t),$(".cms-notify-comment").html(e),$(".cms-notification").animate({right:"20px"}),$(".cms-notify-closer").click(function(){$(".cms-notification").animate({right:...