text stringlengths 3 1.05M |
|---|
import os
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand, upgrade
from app import create_app
from app.models import db
app = create_app(os.getenv("DEPLOYMENT_ENV") or "default")
manager = Manager(app)
manager.add_command('db', MigrateCommand)
migrate = Migrate(app, db)
@manager.... |
/* DEPRECATED
*/
function IServiceHub() {}
IServiceHub.Interface("IServiceHub","IRequestInterface");
/**
GetService - gets the root interface of the svcname service.
@svcname - the name of the service you want to obtain. The name is arbitrary and depends on the IServiceHub implementation. The individual servi... |
// @flow
import React from 'react';
import { Alert, NativeModules, ScrollView, Switch, Text, TextInput } from 'react-native';
import { translate } from '../../../base/i18n';
import { JitsiModal } from '../../../base/modal';
import { connect } from '../../../base/redux';
import { SETTINGS_VIEW_ID } from '../../consta... |
# Copyright (C) 2017 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
def enumerate_signatures(dirpath, submodule, g, attributes):
"""In the new Cuckoo package, Signatures are no longer accessed
under the modules modul... |
from typing import Set, Tuple
from pysaurus.core import functions
class PixelGroup:
__slots__ = "color", "image_width", "identifier", "members"
def __init__(
self,
color: Tuple[float, float, float],
image_width: int,
identifier: int,
members: Set[int],
):
... |
// INFORMATION
// modified from this source code : https://github.com/timdream/hmm
// - fixed some indices
// - extended to cover multi-variate gaussian observations
// TO DO
// - add method to generate smart starting point for Baum-Welch based on observations vector
// - add method to randomize starting point for Ba... |
import React from "react";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { fetchStreams } from "../../actions";
class StreamList extends React.Component {
componentDidMount() {
this.props.fetchStreams();
}
renderAdmin(stream) {
if (stream.userId === this.props.currentUs... |
module.exports = function () {
setTimeout(function () {
document.getElementById('menu').classList.toggle('-left-32');
document.getElementById('menu').classList.toggle('left-0');
document.getElementById('main').classList.toggle('ml-32');
}, 0);
}
|
import React, { PureComponent, Fragment } from 'react';
import ReactDOM from 'react-dom';
import { Icon, Tabs, Badge, Spin } from 'antd';
import classNames from 'classnames';
import HeaderDropdown from '../HeaderDropdown';
import List from './NoticeList';
import styles from './index.less';
import { connect } from 'net'... |
module.exports = class Bus {
constructor (feed, stream) {
this._feed = feed
this._stream = stream
this._listeners = []
this._remote = null
stream.on('data', this._handleMessage.bind(this))
}
static noop () {}
emit (eventName, payload, callback = Bus.noop) {
var message = { method: eve... |
/*
* /MathJax/fonts/HTML-CSS/TeX/png/SansSerif/Regular/BasicLatin.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the Lice... |
import React, { Component } from 'react';
import { graphql } from 'gatsby';
import Img from 'gatsby-image';
import { Link } from 'gatsby';
import moment from 'moment';
import Layout from '../components/layout';
import SEO from '../components/seo';
export default class Blogs extends Component {
render() {
const ... |
#!/usr/bin/env node
const fs = require('fs-extra');
const path = require('path');
const { pascalCase } = require('pascal-case');
const PATH = path.resolve('node_modules/tabler-icons/icons');
const jsxOutDir = './jsx';
const componentTemplate = (name, svg) =>
`
export default {
name: '${name}',
props: {
... |
const { Users } = require('../model/Users');
module.exports = async (req, res, next) => {
try {
// // 更新 session,若验证不通过则删除登陆状态
// if (req.session.userInfo) {
// // 取出哈希密码和邮箱
// const { password: hashPassword, email } = req.session.userInfo;
// // 密码验证
... |
/*
Copyright (c) 2018-2020 Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
// @flow
// BASEUI-GENERATED-FLAG-COMPONENT
// DO NOT EDIT THIS FILE DIRECTLY
import * as React from 'react';
export default function FlagTR(pr... |
/**
* Uni-Form jQuery Plugin with Validation
*
* Provides form actions for use with the Uni-Form markup style
* This version adds additional support for client side validation
*
* Author: Ilija Studen for the purposes of Uni-Form
*
* Modified by Aris Karageorgos to use the parents function
*
* Modified by Ton... |
const path = require('path');
module.exports = {
extends: ['airbnb-base', 'prettier'],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
settings: {
'import/resolver': {
webpack: {
config: path.resolve(__dirname, '.webpack/webpack.config.js'),
},
... |
/**
* (c) Copyright Reserved EVRYTHNG Limited 2018.
* All rights reserved. Use of this material is subject to license.
*/
const { execSync } = require('child_process');
const fs = require('fs');
const http = require('../modules/http');
const logger = require('../modules/logger');
const util = require('../modules/ut... |
import React from "react";
import styles from "../stylesheets/header_footer.module.scss";
export default function Footer() {
return (
<div className={styles.footer}>
<p>Copyright ©{new Date().getFullYear()}. All rights reserved</p>
</div>
);
}
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[287],{354:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return s})),n.d(t,"toc",(function(){return c})),n.d(t,"default",(function(){return u}));var r=n(3),a=n(8),o=(n(0),n(549)),i={id:"index",slug:"/",tit... |
/**
* @private
*/
Ext.define('Ext.device.sqlite.Sencha', {
/**
* Returns a {@link Ext.device.sqlite.Database} instance.
* If the database with specified name does not exist, it will be created.
* If the creationCallback is provided,
* the database is created with the empty string as its versio... |
import { createContext } from 'react';
var _createContext = createContext({}),
Consumer = _createContext.Consumer,
Provider = _createContext.Provider;
export { Consumer, Provider }; |
/* Search - Tooltips */
Mailpile.Search.Tooltips.MessageTags = function() {
$('.pile-message-tag').qtip({
content: {
title: false,
text: function(event, api) {
var tooltip_data = _.findWhere(Mailpile.instance.tags, { tid: $(this).data('tid').toString() });
tooltip_data['... |
/*
Copyright (c) 2013 Samsung Electronics 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 in w... |
import {commandExists, execFile, hasLine} from '../util.js';
export async function isAvailable() {
if (!await commandExists('gsettings')) {
return false;
}
try {
const {stdout} = await execFile('gsettings', ['list-schemas']);
return hasLine(stdout, 'org.cinnamon.desktop.background');
} catch {
return fals... |
/**
* @author deepak.jain
* created on 122.06.2017
*/
(function () {
'use strict';
angular.module('BlurAdmin.pages.organization.employees')
.controller('employeeEntitlementDetail', employeeEntitlementDetail);
/** @ngInject */
/** @ngInject */
function employeeEntitlementDetail($scope, $... |
import Vue from 'vue'
import App from './App.vue'
import store from './store';
Vue.config.productionTip = false
new Vue({
store,
render: h => h(App),
}).$mount('#app')
|
"use strict";
const arp = require('node-arp');
const dns_txt = require('dns-txt')();
const uniqid = require('uniqid');
module.exports = (cb, _mdns) => {
let mdns;
let Hosts = {};
let Services = {};
let getMacClear = true;
let id_local = 0;
let sendNode = function (Value) {
};
function ha... |
/**
* @license
* Copyright (c) 2016 The {life-parser} Project Authors. All rights reserved.
* This code may only be used under the MIT style license found at http://100dayproject.github.io/LICENSE.txt
* The complete set of authors may be found at http://100dayproject.github.io/AUTHORS.txt
* The complete set of con... |
"""
Read NEMO timeprofiles and extract time series at observation depths.
"""
import galene as ga
import iris
var_list = ['temp', 'psal']
obs_id = 'cmems-nrt'
dataset_id = 'run001'
for var in var_list:
dataset = ga.read_dataset(dataset_id, 'timeprofile', var)
obs_dataset = ga.read_dataset(obs_id, 'timeseries'... |
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
from typing import Tuple
import numpy as np
from jina.executors.indexers import BaseVectorIndexer
class MilvusIndexer(BaseVectorIndexer):
"""Milvus powered vector indexer
For more information about Mil... |
"use strict";
import socket from "../socket";
import eventbus from "../eventbus";
export function generateChannelContextMenu($root, channel, network) {
const typeMap = {
lobby: "network",
channel: "chan",
query: "query",
special: "chan",
};
const closeMap = {
lobby: "Remove",
channel: "Leave",
query... |
/**
* Create table `table_name`.
*
* @param {object} knex
* @returns {Promise}
*/
export function up(knex) {
return knex.schema.table('User', function(table){
table.string('major');
table.foreign('major').references('Major.id');
})
}
/**
* Drop `table_name`.
*
* @param {object} knex
* @returns... |
window.peopleAlsoBoughtJSON = [{"asin":"1039403484","authors":"G.S. D'Moore","cover":"51DPKYq931L","length":"13 hrs and 45 mins","narrators":"Jay Alder","subHeading":"Courts and Cabals, Book 2","title":"Courts and Cabals 2"},{"asin":"B09MG9FJK1","authors":"Bruce Sentar","cover":"51YtcN5pjZL","length":"13 hrs","narrator... |
import c from 'chalk'
import path, {join} from 'path'
import {printCommands} from '@live/cli-core/src/livefile'
import indent from 'indent-string'
import getRunContext from '@live/cli/src/modules/run-context'
//import {renderHelp} from '@live/cli-shared'
// Must use /es5 because we may not want to run @babel/register.... |
'use strict';
const helpers = require('./helpers.js');
const youtube = async (videourl, options) => {
// youtube oembed, returns a json
const url = `https://www.youtube.com/oembed?url=${videourl}&format=json`;
// gettign the data
let { title, thumbnail_url, html, width, height } = await helpers.getData(url);... |
import React, { Component, PropTypes } from 'react';
import { Button, Alert } from 'antd'; // 引入antd的组件
import styles from './Example.less'; // 引入样式表
class Example extends Component {
// 声明传入的property的类型和是否必须
static propTypes = {
company: PropTypes.string.isRequired,
employees: PropTypes.number.isRequire... |
export default function firstPS(traveltimes) {
let pArrival = traveltimes.traveltime.arrivals.reduce( (acc, cur) => {
if (cur.phase.startsWith('P') || cur.phase.startsWith('p')) {
if ( ! acc) {
return cur;
} else if (cur.time < acc.time) {
return cur;
} el... |
/*
Name: Tables / Editable - Examples
Written by: Okler Themes - (http://www.okler.net)
Theme Version: 2.0.0
*/
(function($) {
'use strict';
var EditableTable = {
options: {
addButton: '#addToTable',
table: '#datatable-editable',
dialog: {
wrapper: '#dialog',
... |
from sqlalchemy import Column, Integer, String, ForeignKey, UniqueConstraint
from sqlalchemy.orm import relationship
from .. import db
__all__ = ['Statistic', 'State', 'Timer', 'Sequence']
class TrackableBase(object):
"""
Base class for trackables. Each row represents a trackable for a particular user and... |
import BackToProductButton from '@/components/products/BackToProductButton'
import ProductInfo from '@/components/products/ProductInfo'
import ProductForm from '@/components/products/ProductForm'
import logo from "../../images/default.jpeg";
import {useEffect} from "react";
function ProductDetails({ productData }) {
... |
"use strict";
/*
* Create a `get` function that takes a key and return the corresponding value
* in the sourceObject
*
* @notions Functions, Data-Structures, Get
*/
// Provided code:
const sourceObject = {
num: 42,
bool: true,
str: "some text",
log: console.log,
};
// Your code:
const get = () => {};
//... |
export class PhoneDetailController {
/**
* @param {!angular.route} $routeParams
* @param {!phonecatApp.core.phone}Phone
* @ngInject
*/
constructor($routeParams, Phone) {
let self = this;
self.phone = Phone.get({phoneId: $routeParams.phoneId}, function (phone) {
se... |
const fs = require('fs-extra')
const Airtable = require('airtable')
module.exports = () => {
const base = new Airtable({ apiKey: process.env.AIRTABLE_API_KEY }).base(
'appxc6svD4uHYj3FF'
)
const getAnnotations = () => {
const annotations = []
return new Promise((resolve, reject) => {
base('API ... |
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Exporting module
*
* (c) 2010-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global Highcharts, HighchartsAdapter, document, window, Math, setTimeout */
(function (Highcharts) { // encapsulate
// create shortcuts
var Chart... |
var Blaver = require("../lib");
var blaver = new Blaver({ locale: "cz", localeFallback: "en" });
blaver.locales["cz"] = require("../lib/locales/cz");
blaver.locales["en"] = require("../lib/locales/en");
module["exports"] = blaver;
|
/**
* @file
* A JavaScript file for the VTA Map.
*/
(function ($, Drupal, drupalSettings) {
var table_selector = '.schedule-table-wrapper[data-schedule-table-id="' + drupalSettings.active_table + '"]';
var trip_info_selector = '.trip-information-wrapper[data-schedule-table-id="' + drupalSettings.active_table +... |
"""Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _context
from tensorflow.python.eager import ... |
require('./bootstrap');
window.Vue = require('vue');
import ElementUI from 'element-ui';
import locale from 'element-ui/lib/locale/lang/en'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
Vue.use(ElementUI, {locale})
Vue.use(VueRouter)
Vue.use(Vuex)
Date.prototype.addDays = function(days) {
this.setD... |
def make_bank(balance):
"""Returns a bank function with a starting balance. Supports
withdrawals and deposits.
>>> bank = make_bank(100)
>>> bank('withdraw', 40) # 100 - 40
60
>>> bank('hello', 500) # Invalid message passed in
'Invalid message'
>>> bank('deposit', 20) # 60 +... |
//@desc Adding pagination , filter ect... for query
const customResults = (model, populate) => async (req, res, next) => {
let query;
// Copy req.query
const reqQuery = { ...req.query };
// Field to exclude
const removeField = ["select", "sort", "page", "limit"];
// Loop over removeFields and delete them ... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvg... |
import axios from 'axios'
import { getToken } from './auth'
export const BASE_URL = 'http://13.211.62.206:8088'
const headers = { 'content-type': 'application/json' }
const INSTANCE = axios.create({
baseURL: BASE_URL,
timeout: 10000,
headers,
})
INSTANCE.interceptors.request.use(
config => {
const token ... |
class DoubleParameterValue(ParameterValue,IDisposable):
"""
A class that holds a Double value of a parameter element.
DoubleParameterValue(value: float)
DoubleParameterValue()
"""
def Dispose(self):
""" Dispose(self: ParameterValue,A_0: bool) """
pass
def ReleaseUnmanagedResources(self,*args):... |
'use strict';
const assert = require('assert');
function deepEqual(result, expected, message) {
try {
assert.deepEqual(result, expected, message);
} catch (e) {
console.log(`Expected:\n${JSON.stringify(expected, null, 2)}`);
console.log(`Result:\n${JSON.stringify(result, null, 2)}`);
... |
module.exports = {
env: { jest: true, es2020: true, node: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
plugins: [
"prettier",
"simple-import-sort",
"@typescript-eslint",
"fun... |
const axios = require("axios").default;
const ms = require("ms");
const steamAPI = require("steamapi");
module.exports = {
name: "csgo",
category: "statistics",
//cooldown: ms("1m"),
run: async (client, message, args) => {
if (!args.length)
return message.channel.send(
client.embed(
{ title: "Please e... |
"use strict";
var contextSystem = {
is : function(contextQuestion) {
// Default is to return false
return false;
},
get : function(contextInformation) {
// Default is to return null
... |
YUI.add("view-node-map",function(e,t){function i(){}var n=e.namespace("View._buildCfg"),r={};n.aggregates||(n.aggregates=[]),n.aggregates.push("getByNode"),i.getByNode=function(t){var n;return e.one(t).ancestor(function(t){return(n=r[e.stamp(t,!0)])||!1},!0),n||null},i._instances=r,i.prototype={initializer:function(){r... |
import React, { Component } from 'react';
import { StatusBar } from 'react-native';
import {
Container,
Logo,
SignInLink,
SignInLinkText,
Version,
} from './styles';
export default class SiteInfo extends Component {
static navigationOptions = {
header: null,
};
handleBackToLoginPress = () => {
... |
/**
* @class ShopDaoTests
*
* @author darryl.west@raincitysoftware.com
* @created 2017-04-01
*/
const should = require('chai').should();
const MockLogger = require('simple-node-logger').mocks.MockLogger;
const ShopDao = require('../src/ShopDao');
const ShopModel = require('../src/ShopModel');
describe('ShopDao', ... |
function showpass(funcx){
var pass = $("#pass");
pass.val("");
pass.data("funcx",funcx);
$(".password").css("display","flex").fadeIn("fast");
pass.focus();
}
$(document).on("keydown","#pass",function(e){
if (e.keyCode==13){
if ($(this).val()!="3437"){
$(".salah").slideDown("fast");
$(this).select();
} e... |
/*! Raven.js 3.18.1 (2dca364) | github.com/getsentry/raven-js */
!(function(a) {
if ('object' == typeof exports && 'undefined' != typeof module) module.exports = a();
else if ('function' == typeof define && define.amd) define([], a);
else {
var b;
(b =
'undefined' != typeof window
? window
... |
import { Box, Stack, Heading, Button, Icon, Flex, Set, Input } from 'bumbag';
import { useHistory, useRouteMatch } from 'react-router';
import { Link } from "react-router-dom";
import { Fragment } from "react";
export const Header = ({
title,
action,
actions,
search
}) => {
const history = useHi... |
import React from "react";
import { RepeatSVG, RepeatSVGDisabled } from "./Icons";
import ToggleTheme from "./ToggleTheme";
import ToggleBtn from "./ToggleBtn";
const SettingsBar = ({ bucle, toggleBucle }) => (
<div className="settings-bar">
<ToggleTheme />
<ToggleBtn
cClass="btn btn-theme"
Icon... |
import * as React from 'react';
import { create as createTestRenderer } from 'react-test-renderer';
import { MemoryRouter as Router, Routes, Route, useMatch } from 'react-router';
describe('useMatch', () => {
describe('when the path matches the current URL', () => {
it('returns the match', () => {
let matc... |
Object.defineProperty(exports,"__esModule",{value:true});var _jsxFileName="src/components/typography/Strong.js";var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}... |
"Test run, coverage 49%."
from idlelib import run
import unittest
from unittest import mock
from idlelib.idle_test.mock_idle import Func
from test.support import captured_output, captured_stderr
import io
import sys
class RunTest(unittest.TestCase):
def test_print_exception_unhashable(self):
... |
# -*- coding: utf-8 -*-
"""Class that wraps the Stanford POS tagger."""
from __future__ import absolute_import, division, print_function, unicode_literals
import nltk
import shelve
import random
class PosTagger(object):
"""Class that wraps the Stanford POS tagger.
This class uses a shelve cache to store gener... |
'use strict';
/**
* Copyright (c) 2016 Baidu.com, Inc. 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 requ... |
# -*- coding: utf-8 -*-
from copy import deepcopy
from functools import lru_cache, partial
from io import FileIO
from json import dumps, loads
from logging import debug, exception, info, warning
from re import findall
from time import sleep, time
from typing import Any, Dict, Generator, List, Optional, Sequence, Tuple
... |
import {List, Repeater, Text, Link, Menu, Icon} from 'cx/widgets';
import {KeySelection, History, Url, TreeAdapter} from 'cx/ui';
import {HtmlElement} from 'cx/widgets';
const onItemClick = (e, {store}) => {
e.preventDefault();
e.stopPropagation();
var record = store.get('$topic');
if (record.url)
... |
import React from 'react'
import { render, cleanup } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import Contact from '..';
afterEach(cleanup)
describe('Contact component renders', () => {
it('renders', () => {
render(<Contact />);
});
it('renders', () => {
... |
"""
OpenShiftHosts - file ``/root/.config/openshift/hosts``
========================================================
OpenShiftHosts file is /root/.config/openshift/hosts which
records nodes information. While installing openshift cluster
, this installation process would read this file, and install
relative rpms on ev... |
module.exports = function (posts, pipe, config, filters, callback) {
var postsBy = {}, postsByArr = [];
var type = pipe.type;
var prop = pipe.prop;
posts.forEach(function (post) {
if (!post[prop]) {
return;
}
if (typeof post[prop] === 'object') {
post[prop].forEach(function (term) {
... |
#!/usr/bin/env python3
class Terminal:
def __init__(self, owner, t_type):
self.owner_ = owner
self.t_type_ = t_type
self.node_ = None
def __str__(self):
return str(self.node_)
def __repr__(self):
ret = f'<{self.__class__.__name__}>'+str(self.node_)+"\n"
re... |
# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class RunTextModerationRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): T... |
const express = require('express');
const cluster = require('cluster');
const path = require('path');
const os = require('os');
const app = express();
const ValidateBody = require('./middleware/validateBody');
const ErrorHandler = require('./middleware/errorHandler');
const NotFound = require('./middleware/notFound');... |
from gears import personality,tags
#
# GearHead Grammar
#
# Please note that the master grammar dict operates in a different way
# from the pbge grammar dict. Instead of each item resolving to a list
# of options, each list resolves to a dict of PersonalityTrait: [options,...]
#
# Uppercase tokens should expand to a ... |
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Format/XML/VersionedOGC.js
*/
... |
module.exports = __NekoMaidAPI.url
|
from typing import Optional, Tuple
import numpy as np
from .least_squares import evalpoly, LeastSquares
from .operations import estimate_growth
from .timeseries import TimeSeries
class DailyCasesPredictor:
'''Predict the number of daily cases by modelling the growth factor.
The predictor using a simple lin... |
/*global defineSuite*/
defineSuite([
'Core/loadWithXhr',
'Core/loadImage'
], function(
loadWithXhr,
loadImage) {
'use strict';
describe('data URI loading', function() {
it('can load URI escaped text with default response type', function() {
ret... |
'use strict';
const categoryModel = (sequelize, DataTypes) => sequelize.define('categories', {
name: {
type: DataTypes.STRING
},
displayName: {
type: DataTypes.STRING
}
})
module.exports = categoryModel;
|
import json
import os
import re
import subprocess
import shutil
import tempfile
import uuid
from subprocess import check_call, call, CalledProcessError, check_output
# Stuff copied from cinder py charm, needs to go somewhere
# common.
from lib.misc_utils import (
ensure_block_device,
clean_storage,
is_pau... |
import { promises as fs } from 'fs'
import getViewRelativeToView from './get-view-relative-to-view.js'
import prettier from 'prettier'
import path from 'path'
function ensureFirstStoryIsOn(flow, key, stories) {
if (!stories.has(key)) return
let story = flow.get(key)
if (story.stories.size > 0) {
let index =... |
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// au... |
var landmark = require('../../'),
session = require('../../lib/session');
exports = module.exports = function(req, res) {
session.signout(req, res, function() {
if ('string' === typeof landmark.get('signout redirect')) {
return res.redirect(landmark.get('signout redirect'));
} else if ('function' === typeof... |
#!/usr/bin/env python3
import sys
import os
import pythreejs as THREE
import streamlit as st
from streamlit import cli as stcli
import streamlit.components.v1 as components
from ipywidgets import embed
from mesh_factory import MeshFactory
from shapes import *
VISUALIZATION_VIEW_WIDTH = 700
VISUALIZATION_VIEW_HEIGHT ... |
(function(t){function e(e){for(var r,o,i=e[0],l=e[1],c=e[2],p=0,f=[];p<i.length;p++)o=i[p],a[o]&&f.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(t[r]=l[r]);s&&s(e);while(f.length)f.shift()();return u.push.apply(u,c||[]),n()}function n(){for(var t,e=0;e<u.length;e++){for(var n=u[e],r=!0,i=1... |
// @flow
import React from 'react';
import CaseComponent from './CaseComponent';
import EmptyCaseComponent from './EmptyCaseComponent';
const computeIndex = (row, i) => (45 - (row * 5)) + i;
const isPair = (n: number): boolean => n % 2 === 0;
const isBlack = (row: number) => !isPair(row);
class CaseRowComponent exte... |
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { get } from '@ember/object';
import layout from './template'
export default Component.extend({
layout,
intl: service(),
model: null,
tagName: 'TR',
classNames: 'main-row',
bulkActions: true,
showNotifie... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (program) {
program.command('deploy').alias('d').description('Runs a full deploy of your theme\'s code to a Shopify store specified in config.yml. Existing files will be overwritten.').option('-e, --env <enviro... |
import asyncLoader from '@/utils/async-loader';
export default [
{
path: '/bindPhone',
name: 'bindPhone',
component: asyncLoader('login/login')
},
{
path: '/tempStopQr',
name: 'tempStopQr',
meta: { needLogin: false },
component: asyncLoader('pages/tempStopQr')
},
{
... |
from azure.mgmt.hdinsight import HDInsightManagementClient
from azure.common.credentials import ServicePrincipalCredentials
from sample_settings import *
from azure.mgmt.hdinsight.models import *
def main():
# Authentication
credentials = ServicePrincipalCredentials(
client_id=CLIENT_ID,
... |
import * as React from "react";
import Svg, { Path } from "react-native-svg";
function SvgCarLine(props) {
return (
<Svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<Path fill="none" d="M0 0h24v24H0z" />
<Path d="M19 20H5v1a1 1 0 01-1 1H3a1 1 0 01-1-1V11l2.48-5.788A2 2 0 016.32... |
class Solution:
def maxNumber(self, nums1, nums2, k):
def prep(nums, k):
drop = len(nums) - k
out = []
for num in nums:
while drop and out and out[-1] < num:
out.pop()
drop -= 1
out.append(num)
... |
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin("/Users/Julian/.mpv/vs-plugins/ffms2/libffms2.dylib")
clip = core.ffms2.Source(source='/Users/Julian/Documents/DLs/Test-Videos/test-pulldown.mkv')
display_fps = 60
container_fps = 24000/1001
# skip motion interpolation completely for content exceedin... |
"""Problem 1017 from URI Judge Online"""
# pylint: disable-msg=C0103
time = input()
avg_speed = input()
distance = time*avg_speed
fuel_spent = distance/12.0
print "{0:.3f}".format(fuel_spent)
|
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class LessOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsLessOptions(cls, buf, offset):
n = flatbuffers.enc... |