text stringlengths 3 1.05M |
|---|
# -*- coding: utf-8 -*-
import base64
import cgi
import copy
import csv
import datetime
import decimal
import os
import shutil
import sys
import types
from collections import OrderedDict
from ._compat import (
PY2, StringIO, BytesIO, pjoin, exists, hashlib_md5, basestring, iteritems,
xrange, implements_iterato... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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, overload
from .. import... |
#!/usr/bin/env python3
# -*- utf-8 -*-
"""
An implementation of Hungarian algorithm for solving the assigment problem.
An instance of the assigment problem consists of a number of workers along
with a number of jobs and a cost matrix which gives the cost of assigning the
ith worker to the jth job at position(i, j). The... |
import{openBlock as n,createBlock as t}from"vue";var e={props:{shape:{type:String,default:"rectangle"},size:{type:String,default:null},width:{type:String,default:"100%"},height:{type:String,default:"1rem"},borderRadius:{type:String,default:null},animation:{type:String,default:"wave"}},computed:{containerClass(){return[... |
/*jslint browser: true, eqeqeq: true, bitwise: true, newcap: true, immed: true, regexp: false */
/**
LazyLoad makes it easy and painless to lazily load one or more external
JavaScript or CSS files on demand either during or after the rendering of a web
page.
Supported browsers include Firefox 2+, IE6+, Safari 3+ (inc... |
from twitter_api.api import TwitterAPI
from twitter_api.utils import Utils
class Friends(TwitterAPI):
"""API 'friends/'
フォロー関係のデータを取り扱うエンドポイント.
* GET friends/ids 対象ユーザーがフォローしているユーザーを、IDの一覧で取得する。
* GET friends/list 対象ユーザーがフォローしているユーザーを、オブジェクトの一覧で取得する。
"""
def __init__(self, consumer_key: str, ... |
import numpy as np
from Computer.NN_Trainer.NormalizationMethod import NormalizationMethod
from sklearn.model_selection import train_test_split
from random import random, shuffle
def normalize_zero_to_one(xList):
return np.divide(xList, 255)
def normalize_negOne_to_one(xList):
return np.subtract(np.divide(xLi... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Money.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf ... |
const expect = require('chai').expect;
const InspireTree = require('../../' + (process.env.DIST ? 'dist' : 'build') + '/inspire-tree');
describe('TreeNodes.prototype.context', function() {
let tree;
before(function() {
// Create tree
tree = new InspireTree({
data: [{
... |
const axios = require('axios');
const TestRailCache = require('./testrail-cache');
class TestRailApi {
constructor(options) {
this.options = options;
this.base = `${this.options.host}/index.php?/api/v2`;
this.runId;
this.planId = this.options.planId
}
async createPlan(name, description, mileston... |
"""
Ported to pytorch thanks to [tstandley](https://github.com/tstandley/Xception-PyTorch)
@author: tstandley
Adapted by cadene
Creates an Xception Model as defined in:
Francois Chollet
Xception: Deep Learning with Depthwise Separable Convolutions
https://arxiv.org/pdf/1610.02357.pdf
This weights ported from the Ke... |
function Util(){}if(Util.hasClass=function(e,t){return e.classList.contains(t)},Util.addClass=function(e,t){var n=t.split(" ");e.classList.add(n[0]),1<n.length&&Util.addClass(e,n.slice(1).join(" "))},Util.removeClass=function(e,t){var n=t.split(" ");e.classList.remove(n[0]),1<n.length&&Util.removeClass(e,n.slice(1).joi... |
angular.module('adminApp').directive('defaultDatatable', function ($compile) {
return {
restrict: 'E',
scope: {
id: '=',
ctrl: '='
},
template: '<div></div>',
link: function ($scope, element, attrs) {
let temp = `<table id="` + $scope.id + ... |
# copyright (c) 2021 PaddlePaddle 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 appli... |
import unittest
from yearfrac import act_afb
class Test_ActAfb(unittest.TestCase):
def test1(self):
x = act_afb(2018, 12, 15, 2019, 3, 1)
self.assertEquals(round(x, 15), 0.208219178082192)
self.assertEquals(round(x, 8), 0.20821918)
def test2(self):
x = act_afb(2018, 12, 31, 2... |
from setuptools import setup, find_packages
import django_nvd3
import os
import re
def read(*parts):
return open(os.path.join(os.path.dirname(__file__), *parts)).read()
def parse_requirements(file_name):
requirements = []
for line in open(file_name, 'r').read().split('\n'):
if re.match(r'(\s*#)|... |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftMASGUIONleftASTERISCOBARRAPORCENTAJEleftPOTENCIArightUMENOSUMASABS ACOS ACOSD ACOSH ADD ALL ALTER AMPERSON AND ANY AS ASIN ASIND ASINH ASTERISCO ATAN ATAND ... |
'use strict';
import {
driver,
BASE_URL,
} from './helper';
describe('test/datahub-render.test.js', () => {
describe('home page render testing', () => {
before(() => {
return driver
.initWindow({
width: 1000,
height: 800,
deviceScaleFactor: 2,
userAgent:... |
# 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 ... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.17/esri/copyright.txt for details.
//>>built
define("esri/nls/jsapi_it-it",{"esri/nls/jsapi":{io:{proxyNotSet:"esri.config.defaults.io.proxyUrl non impostato. Se si effettua una richiesta a un server abilitato... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'settings.ui'
#
# Created by: PyQt5 UI code generator 5.7
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_SettingsWindow(object):
def setupUi(self, SettingsWindow):
Se... |
import React from 'react';
import {InteractionManager, View} from 'react-native';
import PropTypes from 'prop-types';
import _ from 'underscore';
import ExpensiMark from 'expensify-common/lib/ExpensiMark';
import reportActionPropTypes from './reportActionPropTypes';
import styles from '../../../styles/styles';
import C... |
import logging
import os
import tempfile
import shutil
from . import pyjson
logger = logging.getLogger(__name__)
class BaseStateCommitter(object):
def load(self):
""" Load and return the state """
raise NotImplementedError
def commit(self, state):
""" Commit the state """
r... |
import util from '@/util'
export const loadReport = ({commit}, payload) => {
commit('UPDATE_FLOW_DATA', payload.flowData)
commit('UPDATE_SITE_DATA', payload.siteData)
commit('UPDATE_REPORT_ID', payload.reportId)
commit('UPDATE_SITE', payload.site)
}
export const quickSaveToTmpFile = ({getters}) => {
util.sa... |
/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* screen.c: code for displaying on the scree... |
"""
Instalando e Utilizando Módulos Externos
Utilizamos o gestor de pacotes Python Pip - Python Installer Package
Podemos ver todos os pacotes externos oficiais em: https://pypi.org
colorama -> É utilizado para permitir impressão de textos coloridos no terminal.
Instalar um módulo:
pip install nome_do_modulo
#In... |
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
},
//事件处理函数
bindViewTap: function () {
wx.request({
url: 'https://www.xxxxx.com/test',
})
wx.downloadFile({
url: 'https://www.... |
# 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 __future__ import print_function
import os
path = os.path.join(os.path.dirname(__file__), "UnicodeData.txt")
f = open(path, "r")
text = f.read()
f.close()
result = []
openValue = None
for line in text.splitlines():
line = line.split(";")
value, name, category = line[:3]
if category in ("Ps", "Pi"):... |
from data.indicator.GT1.preprocess import config
|
const getInvoiceLinesOfPaymentRequest = require('./get-invoice-lines-of-payment-request')
module.exports = {
getInvoiceLinesOfPaymentRequest
}
|
#!/usr/bin/env python
#
# Run the test suite against all the Python versions we can find.
#
import sys
import os
from os.path import dirname, abspath, join
import re
TOP = dirname(dirname(abspath(__file__)))
sys.path.insert(0, join(TOP, "tools"))
import which
def _python_ver_from_python(python):
assert ' ' not... |
#! /usr/bin/env python3
import string
import random
import os
import os.path as path
import sys
MIN_NAME_LEN = 1
MAX_NAME_LEN = 8
MIN_CHILD_DIRS = 0
MAX_CHILD_DIRS = 3
MIN_CHILD_FILES = 0
MAX_CHILD_FILES = 5
MIN_DEPTH = 0
MAX_DEPTH = 3
FILE_SIZES = [0, 1, 2, 3, 1024, 512*1024, 2*1024*1024, 8*1024*1024]
def random_fi... |
# Generated by Django 3.1.4 on 2021-12-27 02:41
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('reddit_api', '0002_auto_20211227_0241'),
]
operations = [
migrations.AlterModelTable(
name='redditposts',
table='redditposts... |
/**
******************************************************************************
* @file stm324xg_eval_sdio_sd.h
* @author MCD Application Team
* @version V1.0.0
* @date 30-September-2011
* @brief This file contains all the functions prototypes for the SD Card
* stm324xg_eval_s... |
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/CorePDF.framework/CorePDF
*/
#import <CorePDF/CPGraphicRegion.h>
#import <CorePDF/CorePDF-Structs.h>
@interface CPShapeRegion : CPGraphicRegion {
}
- (BOOL)isShapeRegion; // 0xbac9
- (void)accept:(id)accept; // 0xb... |
import re
import sys
import math
import collections
def tokeniser(_str, stopwords=["and", "for", "if", "the", "then", "be", "is", "are", "will", "in", "it", "to", "that"]):
"""
Given an input string and list of stopwords, returns a dictionary of frequency occurrences for terms in the given input string.
F... |
#include <TargetConditionals.h>
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0... |
from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:9332")
else:
access = Ser... |
import unittest
from main import decode
class TestSum(unittest.TestCase):
def test(self):
self.assertEqual(decode([20, 12, 18, 30, 21], 1939), "scout")
self.assertEqual(decode([14, 10, 22, 29, 6, 27, 19, 18, 6, 12, 8], 1939), "masterpiece")
if __name__ == '__main__':
unittest.main()
|
module.exports = function toReadable(number) {
const units = ['', 'one ', 'two ', 'three ', 'four ', 'five ', 'six ', 'seven ', 'eight ', 'nine ', 'ten ', 'eleven ', 'twelve ', 'thirteen ', 'fourteen ', 'fifteen ', 'sixteen ', 'seventeen ', 'eighteen ', 'nineteen ']
const tens = ['', '', 'twenty', 'thirty', 'forty'... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Version, NgModule, InjectionToken, Optional, Inject, isDevMode, inject, LOCALE_ID, Injectable, Directive, Ele... |
/**
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var d3 = require('d3');
var isNumeric = require('fast-isnumeric');
var hasHover = require('has-hover');
var P... |
function equalNumber([arg1, arg2, arg3]) {
let firstNumber = Number(arg1);
let seconNumber = Number(arg2);
let thirdNumber = Number(arg3);
if (firstNumber == seconNumber && firstNumber == thirdNumber) {
console.log("yes");
} else {
console.log("no");
}
}
equalNumber(["3.2", "3.22... |
import unittest
from os import path
from parsers.miseq.parser import Parser
from parsers.exceptions import DirectoryError, ValidationError, SampleSheetError
import model
path_to_module = path.abspath(path.dirname(__file__))
if len(path_to_module) == 0:
path_to_module = '.'
class TestFindRuns(unittest.TestCase):... |
# -*- coding: utf-8 -*-
# Copyright 2019 New Vector 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 la... |
#pragma once
#include "VaisseauLogique.h"
#include <vector>
#include <iostream>
#include "Bonus.h"
#include "Weapon.h"
#include "BonusScatter.h"
#include "BonusShield.h"
#include "BonusLaserBeam.h"
#include "BonusMissile.h"
#include "Bombe.h"
#include "BombeElectro.h"
#include "Shield.h"
#include "list.h"
#include "Pi... |
const Music = require('../../modules/music.js');
let { searchYoutube } = require('../../modules/youtube.js');
let dispatcher, videoUrl, youtube;
module.exports = {
name: 'playtop',
description: 'Request the bot to play a song as the next song in the voice channel.',
usage: '<song name or youtube video link>\n'... |
// Cannot implicitly shard accessed collections because of extra shard key index in sharded
// collection.
// @tags: [assumes_no_implicit_index_creation]
t = db.text_blogwild;
t.drop();
t.save({_id: 1, title: "my blog post", text: "this is a new blog i am writing. yay eliot"});
t.save({_id: 2, title: "my 2nd post", t... |
import sqlite3
from datetime import datetime
class DbApi:
conn = None
@staticmethod
def connect(db_path):
DbApi.conn = sqlite3.connect(db_path)
@staticmethod
def get_cursor():
return DbApi.conn.cursor()
@staticmethod
def close():
DbApi.conn.close... |
/**
* DO NOT EDIT THIS FILE as it will be overwritten by the Pbj compiler.
* @link https://github.com/gdbots/pbjc-php
*
* Returns an array of curies using mixin "gdbots:pbjx:mixin:command:v1"
* @link http://acme-schemas.gdbots.io/json-schema/gdbots/pbjx/mixin/command/1-0-3.json#
*/
export default [
'acme:forms... |
/**
* Kendo UI v2020.2.617 (http://www.telerik.com/kendo-ui)
* Copyright 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.... |
'use strict';
var currCSSKey = 0;
var allowedCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
/**
* Get an unique CSS key for the className in a file. It supports up
* to 140608 classNames.
*
* @return {string}
*/
function generateUniqueCSSClassName() {
var allowedCharactersLength = allowed... |
"""
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... |
/**
* \file rbtree_test.c
* Tests for red-black tree.
**/
#include "syscx.h"
#include "alphatab.h"
#include "associa.h"
#include "lgtable.h"
#include "rbtree.h"
typedef struct TNode TNode;
struct TNode
{
RBTNode rbt;
const char* key;
uint val;
};
void
lose_TNode (BSTNode* x)
{
TNode* a = CastUp( TNode... |
'use strict';
import Search from '../Search';
const LIMIT_START_DEF_VALUE = 1;
const LIMIT_SIZE_DEF_VALUE = 1000;
/**
* This is a abstract class. It is a base to make all kind of search request to OpenGate North API.
*/
export default class SearchBuilder {
/**
* @param {!InternalOpenGateAPI} p... |
def large_sum():
nums = [37107287533902102798797998220837590246510135740250,
46376937677490009712648124896970078050417018260538,
74324986199524741059474233309513058123726617309629,
91942213363574161572522430563301811072406154908250,
23067588207539346171171980310421047... |
# Copyright 2016 The TensorFlow 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... |
import sys
import numpy as np
from triarray import TriMatrix
from .utils import set_doc
two_sample_stats_doc = """
Test Statistics for the Two-Sample Problem
This is a collection of functions that provide test statistics to be used
into the permutation scheme for performing two-sample testing. These test
statistics c... |
const resolveFrom = require('resolve-from')
const {
default: graphBrainzSchema,
createSchema
} = require('graphbrainz/lib/schema')
const { schemaToJSON, diffSchema } = require('../../src/index')
/**
* Generate a "diff" schema in order to test `diffSchema`.
*/
async function generateDiff() {
// Get the instance... |
import moment from 'moment';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Button from 'react-bootstrap/lib/Button';
import injectT from '../../i18n/injectT';
import { hasProducts } from '../../utils/resourceUtils';
import { getUnitRoleFromResource, getIsUnitStaff } from '../../.... |
from django.conf import settings
from django.test import SimpleTestCase, override_settings
from django.utils.six.moves.urllib.parse import urljoin
from ..utils import setup
@override_settings(INSTALLED_APPS=[], MEDIA_URL='/media/', STATIC_URL='/static/')
class StaticTagTests(SimpleTestCase):
libraries = {'static... |
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
gulp.task('serve', function(){
browserSync.init({
server: {
baseDir: './'
}
});
});
gulp.task('script', function(){
gulp.src('app/js/*.js')... |
'use strict';
const userNameInput = document.getElementById("user-name");
const assessmentButton = document.getElementById("assessment");
const resultDivided = document.getElementById("result-area");
const tweetDivided = document.getElementById("tweet-area");
/**
* 指定した要素の子どもを全て削除する
* @param {HTMLElement} el... |
from libqtile.command import lazy
# from libqtile.command_client import InteractiveCommandClient
class Functions:
##### MOVE WINDOW IN GROUPS #####
@staticmethod
def window_to_prev_group():
@lazy.function
def __inner(qtile):
i = qtile.groups.index(qtile.current_group)
... |
from yolo_evm.memory import Memory, InvalidMemoryAccess, InvalidMemoryValue
import pytest
@pytest.fixture
def memory() -> Memory:
return Memory()
def test_invalid_offset(memory):
with pytest.raises(InvalidMemoryAccess) as excinfo:
memory.store(-1, 1)
assert excinfo.value.args[0]['offset'] == -1
... |
//------------------------------------------------------------------------------
// GB_block: apply all pending computations if blocking mode enabled
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved.
// http:... |
import json
import threading
import time
import os
import stat
from decimal import Decimal
from typing import Union, Optional
from numbers import Real
from copy import deepcopy
from . import util
from .util import (user_dir, make_dir,
NoDynamicFeeEstimates, format_fee_satoshis, quantize_feerate)
fr... |
"""
Django settings for pvfree project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
import os
from pvfree import get_secret
import dj_database_url
# Build pat... |
#from .base import *
from .production import *
#try:
# from .local import*
#except:
# pass
|
// -----------------------------------------------------------------------------------
// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Generated by WOW... |
# GENERATED BY KOMAND SDK - DO NOT EDIT
from .action import StartInstance
|
import React from 'react';
import NightOut from '../assets/Project1.png';
import DeedDone from '../assets/DeedDone.png';
import EmployeeDirectory from '../assets/EmployeeDirectory.png';
import BudgetTracker from '../assets/BudgetTracker.png';
import PasswordGenerator from '../assets/PasswordGenerator.png';
import '../s... |
/* global angular, console */
import 'ionic-sdk/release/js/ionic.bundle';
angular.module('app.modals.submit-password', [])
.controller('SubmitPasswordCtrl', function ($scope, Wallet) {
'use strict';
$scope.form = {};
$scope.model = {};
let signer = $scope.data.signer;
if (signer === Wallet.current.id) {
$sco... |
AUTHOR = 'Adrian Sampson'
# General configuration
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']
exclude_patterns = ['_build']
source_suffix = '.rst'
master_doc = 'index'
project = 'beets'
copyright = '2016, Adrian Sampson'
version = '1.6'
release = '1.6.1'
pygments_style = 'sphinx'
# External links ... |
// Copyright (c) 2013 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_
#define THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_
#i... |
$(document).ready(function(){function u(e,t,n){var r="-webkit-transform",i="translate3d(0,0,0)",s=e.css(r),o=!s||!s.match(/^\s*none\s*$/i);e.css(r,o?i:s+" "+i);try{return t.apply(this,n)}finally{e.css(r,s)}}function f(e,t,n,r){var i=!1,s,o,u=$.speed(t,n,r),a=this;if(!e)return!1;for(var f in e)s=e[f],f==="height"?s==="h... |
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
setup(
name='PatchMatch',
license='Creative Commons Attribution-Noncommercial-Share Alike license',
packages=find_packages(),
ext_modules=cythonize([
Extension(
"patchmatch.pm",
["p... |
var old_summary = null;
/**
* get the raw markdown summary and display it in a textedit area instead of
* the rendered HTML
* param: optional text to append to the textedit area
*/
function make_summary_editable(text) {
var $summary = $("#summary");
if (typeof text !== "string") {
text = '';
}... |
import main as m
if __name__ == '__main__':
completed = 0
methodsNotWorking = []
if m.karacaEncrypt("compsciclub") == "b4lc2cspm3caca":
completed += 1
else:
methodsNotWorking.append("karacaEncrypt")
if m.convertToHex("compsciclub") == "63 6f 6d 70 73 63 69 63 6c 75 62":
co... |
from django.contrib import admin
from .models import Article
# Register your models here.
# admin.site.register(Article)
@admin.register(Article)
class ArticleModel(admin.ModelAdmin):
list_filter = ('title', 'description')
list_display = ('title', 'description')
|
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
import type {SchemaType} from '../../CodegenSchema';
// File path -> contents
type... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Fivo and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class MasterProduk(Document):
pass
|
# --------------
# Code starts here
class_1 = ['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio']
class_2 = ['Hilary Mason','Carla Gentry','Corinna Cortes']
new_class = class_1 + class_2
new_class.append('Peter Warden')
print(new_class)
new_class.remove('Carla Gentry')
print(new_class)
# Code ends... |
import dedent from 'ts-dedent';
export default {
title: 'Atoms/Custom Scrollbar',
parameters: {
design: {
type: 'iframe',
url:
'https://projects.invisionapp.com/share/3C11ABUSUADV#/454587111_WYSIWYG_Large_Tablet',
},
docs: {
description: {
component: dedent(`
... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... |
import vcr
# Set to True to enable 'once' mock recording
MOCK_RECORDING_ENABLED = False
vcr = vcr.VCR(
cassette_library_dir='tests/mock/',
record_mode='once' if MOCK_RECORDING_ENABLED else 'none',
match_on=['uri'],
)
|
class NNL:
def __init__(self, parentLayer=None, childLayer=None, linearOutput=False, useMomentum=False, momentumFactor=0.9) -> None:
self.parentLayer = parentLayer #NNL
self.childLayer = childLayer #NNL
self.linearOutput = linearOutput #bool
sel... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2014 Grupo de Sistemas Inteligentes (GSI) DIT, UPM
#
# 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.apac... |
import * as actionTypes from './actionTypes'
import * as Api from '../api/backendApi'
export const loadCommentsSuccess = (comments) => {
return {
type: actionTypes.LOAD_COMMENTS_SUCCESS,
comments
}
}
export const loadComments = (postId) => {
return (dispatch) => {
return Api.getCommentsByPostId(postId).t... |
export default class DragAndDropHandler {
match(dragState, context) { // eslint-disable-line
return false
}
drop(dragState, context) { // eslint-disable-line
// nothing
}
get _isDragAndDropHandler () {
return true
}
}
|
db= [{'_id' : '[O][O]',
'stoich' : 'O2',
'charge' : 0,
'mult' : 3,
'HeatForm': {0:0,'sigma':0.0},
'g09' : {
'b3lyp' : {'6-311+g(d,p)':{'energy': -150.26605, 'sigma':0}},
'm062x' : {'6-311+g(d,p)':{'energy': -150.308589, 'sigma':0}},
'ccsd' : {'cc-pvtz':{'energy': -150.1110736, 'sigma'... |
'use strict';
var
browserSync = require('browser-sync'),
gulp = require('gulp');
gulp.task('browserSync', function() {
browserSync({
files: ['views/**'],
proxy: 'localhost:8080',
notify: false
});
}); |
var PersistentFilter = require('broccoli-persistent-filter'),
RSVP = require('rsvp'),
path = require('path'),
fs = require('fs'),
fsExtra = require('fs-extra'),
Builder = require('systemjs-builder'),
symlinkOrCopySync = require('symlink-or-copy').sync;
var isWin = process.platform.match(/^win/)... |
from django.db import models
class CompanyIndustries(models.Model):
name = models.CharField(max_length=50, verbose_name="行业名称")
add_time = models.DateTimeField(verbose_name="新增时间")
update_time = models.DateTimeField(auto_now=True, verbose_name="更新时间")
is_effective = models.BooleanField(default=True, v... |
from flask import Blueprint
public = Blueprint('public', __name__)
from . import public_endpoints
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/localization/en/MathML.js
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0... |
/*!
* Copyright 2015 Drifty Co.
* http://drifty.com/
*
* Ionic, v1.2.4
* A powerful HTML5 mobile app framework.
* http://ionicframework.com/
*
* By @maxlynch, @benjsperry, @adamdbradley <3
*
* Licensed under the MIT license. Please see LICENSE for more information.
*
*/
(function() {
// Create global ioni... |
goog.provide('ee.MapLayerOverlay');
goog.require('ee.AbstractOverlay');
goog.require('ee.MapTileManager');
goog.require('ee.TileEvent');
goog.require('goog.array');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('goog.iter');... |
#!/usr/bin/env python
import pytest
"""
Test 171. Excel Sheet Column Number
"""
@pytest.fixture(scope="session")
def init_variables_171():
from src.leetcode_171_excel_sheet_column_number import Solution
solution = Solution()
def _init_variables_171():
return solution
yield _init_variables... |