text stringlengths 3 1.05M |
|---|
"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/create... |
define(
//begin v1.x content
{
"dateFormatItem-yM": "G yyyy-MM",
"dateFormatItem-yQ": "G yyyy Q",
"dayPeriods-format-wide-pm": "em",
"dateFormatItem-MMMEd": "E d MMM",
"dateFormatItem-hms": "h:mm:ss a",
"dateFormatItem-yQQQ": "G y QQQ",
"dateFormatItem-MMdd": "dd/MM",
"days-standAlone-wide": [
"söndag",
"må... |
["^ ","~:resource-id",["~:shadow.build.npm/resource","node_modules/mathjs/lib/cjs/entry/dependenciesAny/dependenciesColumn.generated.js"],"~:js","shadow$provide[673]=function(c,b,y,a){Object.defineProperty(a,\"__esModule\",{value:!0});a.columnDependencies=void 0;c=b(668);y=b(622);var q=b(672),f=b(602);b=b(593);a.column... |
import when from "../ThirdParty/when.js";
import AttributeCompression from "./AttributeCompression.js";
import BoundingSphere from "./BoundingSphere.js";
import Cartesian3 from "./Cartesian3.js";
import Credit from "./Credit.js";
import defaultValue from "./defaultValue.js";
import defined from "./defined.js";
i... |
#!/usr/bin/env python
#encoding:utf-8
#
# Copyright (c) 2015 Ministerio de Fomento
# Instituto de Ciencias de la Construcción Eduardo Torroja (IETcc-CSIC)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Softw... |
"""Checkers."""
from pylint_django.checkers.django_installed import DjangoInstalledChecker
from pylint_django.checkers.models import ModelChecker
def register_checkers(linter):
"""Register checkers."""
linter.register_checker(ModelChecker(linter))
linter.register_checker(DjangoInstalledChecker(linter)) |
// @flow
import * as React from 'react';
type Props = {
children: React.Node,
// Show a placeholder until children are rendered
placeholder?: React.Node,
// Fires when content is rendered, but only if onIdle was used
onRender?: () => void,
// Don't render component if Server Side Rendering is used
ski... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{126:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return l})),n.d(t,"toc",(function(){return c})),n.d(t,"default",(function(){return d}));var i=n(3),a=n(8),r=(n(0),n(571)),o={id:"production",title:"P... |
/*global describe, it, assert */
'use strict';
var assert = require('assert'),
platformCheck = require('../lib/platformcheck.js').platformCheck;
describe('Test 1', function () {
it('test 1', function () {
var answer = platformCheck.status();
console.log('answer is', answer);
assert.eq... |
import {DropdownParams} from "./DropdownParams";
export class Dropdowns {
static selectize(selector) {
if($(selector).is('select')) {
Dropdowns.initSelectizeHandler($(selector));
}
$(selector).find('select:not(.selectize-template)').each(function () {
Dropdowns.in... |
var data = require(__dirname+'/../data/');
/** {@link module:Api} **/
/**
* @requires Data
* @member Api
* @function deactivateUser
* @description If for any reason an admin of the Gateway wishes
* to prevent a particular user from depositing and withdrawing
* from the Gateway, call deactivateUser to affect such a p... |
import { a as _toConsumableArray, L as LocalizationContext, c as _slicedToArray } from './LocalizationContext-0c2bf896.js';
import React__default, { useContext, useRef, useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { ac as LabelTypography, ab as LabelColors, ag as changeColorToClassName... |
import Typography from "typography";
const typography = new Typography({
baseFontSize: "16px",
scaleRatio: 2,
googleFonts: [
{
name: "Montserrat",
styles: ["300", "400", "700"]
}
]
});
export default typography; |
from unittest import TestCase
from queue import Queue
from threading import Event, Thread
from time import time, sleep
from home_automation_framework.iot_gateway.device_manager import DeviceManager
from home_automation_framework.framework.observer_message import ObserverMessage
from tests.helper_functions import emtpy... |
import React from "react";
import {
Row,
Col,
Table,
Progress,
Button,
UncontrolledButtonDropdown,
DropdownMenu,
DropdownToggle,
DropdownItem,
Input,
Label,
Badge,
} from "reactstrap";
import { Sparklines, SparklinesBars } from "react-sparklines";
import Widget from "../../../components/Widget/... |
import os
def traverse_dir(current_dir, deep=0):
"""
current_dir: 绝对路径: "./" 或当前路径: 'D:/picture'
"""
dir_list = os.listdir(current_dir)
# traverse folder first.
path_list, file_list = [], []
for dir in dir_list:
path = os.path.join(current_dir, dir)
if os.path.isdir(path):... |
import base64
import hashlib
import hmac
import os
class ScramException(Exception):
pass
class ScramSession():
@classmethod
def generate_nonce(cls):
"""
Return a long enough random blurb
:return: bytes
"""
return os.urandom(64)
@classmethod
def get_storage_string(cls, password, salt, iterations... |
var wns = require('../lib/wns');
exports.createWnsContext = function (client_secret, client_id) {
var result = {};
var accessTokenContainer = {};
// transform the sendTile*, sendToast*, and sendBadge methods exposed by wns module as follows:
// - success and error callbacks are separate and specified... |
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For complete reference see:
// http://docs.ckeditor.com/#!/... |
# Copyright (c) 2017 StackHPC 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 wr... |
from logging.config import fileConfig
from alembic import context
from sqlalchemy import engine_from_config, pool
from app.core.config import settings
from app.db.tables import Base
# User defined options
config = context.config
config.set_main_option("sqlalchemy.url", settings.uri)
target_metadata = Base.metadata
f... |
/**
*
* Tests for GreenArrowDown
*
* @see https://github.com/react-boilerplate/react-boilerplate/tree/master/docs/testing
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { shallow } from 'enzyme';
import { render } from '@testing-library/react';
// import 'jest-dom/extend-expect'; /... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import sessionStatus from 'ringcentral-integration/modules/Webphone/sessionStatus';
import callDirections from 'ringcentral-integration/enums/callDirections';
import {
isInbound,
isRinging,
} from 'rin... |
/*
* Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope tha... |
# 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... |
/*Reduce
O objetivo reduce é reduzir um vetor a um valor ou objeto. Por exemplo, somar todos os elementos de um vetor é reduzir ele a um valor. O reduce é um pouco mais complexos que o map e o filter por que deve ser passado um parâmetro a mais.
const vetor = [1,2,3,4,5,6];
const soma = vetor.reduce((estado,item)=> e... |
import React from 'react'
import styled from 'styled-components'
import { Box, GU, Markdown } from '@1hive/1hive-ui'
const EXAMPLE = `
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Italicized text is the *cat’s meow*. We can even __emphasize__ the text and ~~reconsider what we... |
const multer = require('multer')
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, './public/images')
},
filename: (req, file, cb) => {
cb(null, `${Date.now().toString()}-${file.originalname}`)
}
})
const fileFilter = (req, file, cb) => {
const isA... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# p... |
'use strict';
const path = require('path');
const fs = require('fs');
const PluginError = require('gulp-util').PluginError;
const through = require('through2');
const merge = require('deepmerge');
const plist = require('plist');
const bplistParser = require('bplist-parser');
const bplistCreator = require('bplist-creat... |
import axios from "axios";
export const TOKEN_KEY = "@ecommerce:user";
export const getToken = () => localStorage.getItem(TOKEN_KEY);
const api = axios.create({
baseURL: "https://localhost:5001/api/ecommerce/",
headers: {
"Content-type": "application/json"
}
});
api.interceptors.request.use(async config =... |
// alert('heeeey');
const header = document.getElementById('navbar');
window.onscroll = function () {
let top = window.scrollY;
console.log(top);
if (top > 1) {
header.classList.add('active');
}
else {
(header.classList.remove('active'));
}
};
|
from __future__ import print_function
from __future__ import absolute_import
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# ----------------------------------------------------... |
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vuedraggable"]=e():t["vuedraggable"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return... |
/**
* 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.
*
* @flow
*/
import type {Lane, Lanes} from './ReactFiberLane.old';
import type {Fiber} from './ReactInternalTypes';
import type {W... |
import React, { Component } from 'react';
import {Message,Form,Grid,Checkbox} from 'semantic-ui-react'
import 'whatwg-fetch'
//import {withRouter,Redirect, Link,HashRouter, Switch, Route} from 'react-router-dom'
import {urlPrefix} from '../../utils.js'
import ConfigurableForm from "./ConfigurableForm.js";
import HostsP... |
!function(){"use strict";function n(){return(new Date).getTime()}function c(n,e){var i=n.cookie.match(new RegExp("(?:^|; )"+encodeURIComponent(e).replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return i?decodeURIComponent(i[1]):""}function l(n,e,i,o){var r=o.days_until_expiration,t=void 0===r?1:r,a=o.path,d... |
'use strict';
import getScrollParent from '../../dom/getScrollParent';
import getCaretAtTextNodePosition from '../../dom/getCaretAtTextNodePosition';
import getContentRect from '../../dom/getContentRect';
import intersects from '../../shape/rect/intersects';
const ScrollWait = 1500;
export default class AttentionMan... |
/* global process */
import * as R from 'ramda';
import { tweekManagementClient } from '../utils/tweekClients';
import * as TypesService from './types-service';
export const KEYS_IDENTITY = 'keys.';
let contextSchema = {};
export async function refreshSchema() {
contextSchema = await tweekManagementClient.getAllSc... |
/**
* Pimcore
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.pimcore.org/license
*
* @copyright Copyright (c) 2009-2014 pimcore GmbH (http://www.pimcore... |
/* eslint-disable */
'use strict';
class MyAdapter {
/**
*
* Creates an instance of MyAdapter for an oidc-provider model.
*
* @constructor
* @param {string} name Name of the oidc-provider model. One of "Session", "AccessToken",
* "AuthorizationCode", "RefreshToken", "ClientCredentials", "Client", ... |
import React from 'react';
const Info = () => (
<div className="content">
<h3 className="title">Create your signature</h3>
<ol>
<li>Enter your details.</li>
<li>Click the "Copy Signature" button</li>
<li>Open outlook</li>
<li>
<a
style={{ fontWeight: 'bold', textDeco... |
'use strict';
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writabl... |
import os
import csv
import gzip
import logging
from common.base_parser import BaseParser
from common.constants import *
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s',
handlers=[logging.StreamHandler()])
STRING_TAX_IDS = ['9606', '511145', '160488', '559292', '4932']
c... |
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
* Licensed under MPL 2.0 (see LICENSE.txt)
*
* See README.md for usage and integration instructions.
*/
"use strict";
/*jslint bitwise: false, white: false */
/*global window, console, document, navigator, ActiveXObject */
// Globals defined here
var... |
!function(){function e(e,n){return(n||"")+" (SystemJS https://git.io/JvFET#"+e+")"}function n(e,n){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return n.slice(0,n.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[... |
import {Card, Elevation} from '@blueprintjs/core';
import styled from 'styled-components';
const StyledCard = styled(Card).attrs((props) => ({elevation: props.elevation, interactive: props.interactive}))``;
StyledCard.defaultProps = {
elevation: Elevation.THREE,
interactive: true
};
export default StyledCard;
|
/* global __dirname, require, module*/
const path = require("path");
const { TsConfigPathsPlugin } = require("awesome-typescript-loader");
const libraryName = require("./package.json").name;
const outputFile = "index" + ".js";
const config = {
mode: "production",
entry: __dirname + "/index.ts",
devtool: "sourc... |
import os
import glob
import random
from PIL import Image
import numpy as np
import trimesh
from lib.data.core import Field
from lib.common import random_crop_occ
class IndexField(Field):
''' Basic index field.'''
# def load(self, model_path, idx, category):
def load(self, model_path, idx, start_idx=0, d... |
const getItemBox = () => {
const itemBox = document.createElement('div');
itemBox.className = 'item-box';
return itemBox;
};
export default getItemBox; |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@carbon/icon-helpers'), require('prop-types'), require('react')) :
typeof define === 'function' && define.amd ? define(['@carbon/icon-helpers', 'prop-types', 'react'], factory) :
(global.... |
export default class ModeManager {
constructor(engine, renderer) {
this.engine = engine;
this.renderer = renderer;
this.modeStack = [];
engine.signals.external.render.post.add(() => this.processEvent('render'));
}
push(mode) {
// 'Exit' previous mode
if (this.modeStack.length > 0) {
... |
class Solution:
def isPalindrome(self, x):
"""
:type x: int
:rtype: bool
"""
s = str(x)
s2 = x[::-1]
return s == s2 |
// @remove-on-eject-begin
/**
* 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 ... |
# exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... |
# Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
""" Exhaustive test for TF convolutions """
try:
import tensorflow as tf
except ImportError:
print("WARNING: Tensorflow not found, skipping test")
exit(0)
from tensorflow.python.ops import gen_nn_ops
import numpy as np
import dace... |
#!/usr/bin/env python
# coding: utf-8
# DO NOT EDIT
# Autogenerated from the notebook robust_models_0.ipynb.
# Edit the notebook and then sync the output with this file.
#
# flake8: noqa
# DO NOT EDIT
# # Robust Linear Models
import matplotlib.pyplot as plt
import numpy as np
import statsmodels.api as sm
# ## Estim... |
import mongoose from "mongoose"
import {
GraphQLObjectType, GraphQLNonNull, GraphQLID,
GraphQLList, GraphQLString, GraphQLFloat
} from "graphql"
import Report, {Status} from "./Report"
const ObjectId = mongoose.Schema.Types.ObjectId
const reportBatchSchema = mongoose.Schema({
testRun: {
type: Obj... |
import coreUtils from "@opentripplanner/core-utils";
import PropTypes from "prop-types";
import React from "react";
import * as Styled from "../styled";
import ViewStopButton from "./view-stop-button";
export default function TransitLegSubheader({
languageConfig,
leg,
onStopClick
}) {
const { from } = leg;
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { functor } from '../utils';
class BarAnnotation extends Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick(e) {
const { onClick } = this.props;
if (onCl... |
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const HtmlWebpackTagsPlugin = require('html-webpack-tags-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode : 'development',
entry: {
... |
// Ensure `application` and `frame` modules are loaded
// before overriding `global.__onLiveSyncCore`
import { run, on, launchEvent } from '@nativescript/core/application'
import '@nativescript/core/ui/frame'
import { warn } from 'core/util/index'
import { patch } from './patch'
import { mountComponent } from 'core/in... |
/* @generated */
// prettier-ignore
if (Intl.ListFormat && typeof Intl.ListFormat.__addLocaleData === 'function') {
Intl.ListFormat.__addLocaleData({"data":{"ru":{"conjunction":{"long":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0} и {1}","pair":"{0} и {1}"},"short":{"start":"{0}, {1}","middle":"{0}, {1}","end":... |
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var r,a,l=t[0],i=t[1],s=t[2],b=0,p=[];b<l.length;b++)a=l[b],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&p.push(n[a][0]),n[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);f... |
// The following line loads the standalone build of Vue instead of the runtime-only build,
// so you don't have to do: import Vue from 'vue/dist/vue'
// This is done with the browser options. For the config, see package.json
import Vue from 'vue';
import Raven from 'raven-js';
import RavenVue from 'raven-js/plugins/vue... |
/**
* Handles form validation
*/
import validate from 'validate';
const formValidation = {
init: () => {
validate.init({
selector: '[data-validate]',
fieldClass: 'is-invalid',
errorClass: 'error-message',
});
},
};
formValidation.init();
export default formValidation;
|
# 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 coalib.bearlib.languages.Language import Language
@Language
class CPP:
aliases = 'C++', 'C Plus Plus', 'CPlusPlus', 'CXX'
extensions = '.c', '.cpp', '.h', '.hpp'
comment_delimiter = '//'
multiline_comment_delimiters = {'/*': '*/'}
string_delimiters = {'"': '"'}
multiline_string_delimiter... |
import './edit-device.html';
import './edit-device.js';
|
var classVc_1_1uint__m =
[
[ "uint_m", "classVc_1_1uint__m.html#a92e7e914d8149cdb527ae31575418cad", null ],
[ "uint_m", "classVc_1_1uint__m.html#a2a10546d607f98ef22def0dfff6a35c7", null ],
[ "uint_m", "classVc_1_1uint__m.html#a82942d101038a669c2cd01c19421a2d3", null ],
[ "uint_m", "classVc_1_1uint__m.ht... |
// Reduce = Reduz um array em somente um elemento.
//Somando valores.
const valores = [5, 6, 8, 20, 15, 64, 93, 52, 85, 5];
const soma = valores.reduce(function (acumulador, valor) {
acumulador += valor;
return acumulador;
},0);
console.log(soma); |
# Filename: utils.py
# Here we found a serie of utilitaries functions which can be used
# to select cluster members, identify substructures or estimate
# some interesting physical properties of galaxy clusters
from scipy import stats
import numpy as np
import math
from kneebow.rotor import Rotor
from astropy.... |
from django.contrib.auth.models import User
from django.test import TestCase
from django.utils.http import http_date
from django.utils.timezone import now
from datetime import datetime, timedelta
import requests_mock
from reader.models import (
Feed,
FeedLog,
MAX_ERRORS,
Entry,
feed_datetime,
... |
# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
# 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, co... |
/*!
=========================================================
* Vue Argon Design System - v1.1.0
=========================================================
* Product Page: https://www.creative-tim.com/product/argon-design-system
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https:/... |
/* jshint undef: true, unused: true, sub:true, node:true, esversion:8 */
"use strict";
const child_process = require('child_process');
const fs = require('fs');
const bunyan = require('bunyan');
const log = bunyan.createLogger({name: 'plugins-git'});
module.exports = function(info){
let ret = {};
ret.actions =... |
define({
"default": {
"name": "Predefinito",
"description": "Predefinito"
}
}); |
"use strict";
/*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __futu... |
"""
DeepLabCut2.0 Toolbox (deeplabcut.org)
© A. & M. Mathis Labs
https://github.com/AlexEMG/DeepLabCut
Please see AUTHORS for contributors.
https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
import os, pickle, yaml
import pandas as pd
from pathlib impo... |
/**
* calendarDemoApp - 0.9.0
*/
var calendarDemoApp = angular.module('calendarDemoApp', ['ui.calendar', 'ui.bootstrap']);
calendarDemoApp.controller('CalendarCtrl',
function($scope, $compile, $timeout, uiCalendarConfig, $modal) {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();... |
/*jslint white: true vars: true browser: true todo: true */
/*jshint camelcase:true, plusplus:true, forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, unused:true, curly:true, browser:true, devel:true, maxerr:100, white:false, onevar:false */
/*global jQuery:true $:true */
(funct... |
// ___Why not add the mime-types package?
// It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews).
// ___Where to take new extensions from?
// https://github.com/jshttp/mime-db/blob/master/db.json
export default {
md: 'text/markdown',
markdown: 'text/markdown',
mp4... |
#!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... |
# coding: utf-8
"""
Cisco Intersight OpenAPI specification.
The Cisco Intersight OpenAPI specification.
OpenAPI spec version: 1.0.9-1461
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class WorkflowWaitWorkf... |
import React, { Component } from 'react'
import axios from 'axios'
import RestoreModal from '../common/RestoreModal'
import DeleteModal from '../common/DeleteModal'
import ActionsMenu from '../common/ActionsMenu'
import EditSubscription from './edit/EditSubscription'
import { Input, ListGroupItem } from 'reactstrap'
im... |
from heapq import merge
import itertools
'''
NEEDS more understanding !!
'''
class Solution(object):
def nthSuperUglyNumber(self, n, primes):
uglies = [1]
merged = merge(*map(lambda p: (u * p for u in uglies), primes))
uniqed = (u for u, _ in itertools.groupby(merged))
map(ugli... |
import { createAsyncThunk } from "@reduxjs/toolkit";
const getPosts = createAsyncThunk(
"posts/getPosts",
async (rocketName) => {
let url = "https://api.spacexdata.com/v3/launches/?";
if (rocketName) {
url += `rocket_name=${rocketName.replace(" ", "+")}`;
}
return fetch(url)
.then(async... |
from django.utils.translation import ugettext_lazy as _
from horizon import tabs
class ZoeAppTab(tabs.TableTab):
name = _("Zoe App")
slug = "zoe_app_plots"
template_name = "horizon/sdscontroller/zoemonitoring/_app_plots.html"
class ZoeStatusTab(tabs.TableTab):
name = _("Zoe Status")
slug = "zoe... |
# -*- coding: utf-8 -*-
"""Tests for identifiers.org URL generation."""
import logging
import unittest
import requests
from bioregistry import get_identifiers_org_iri
logger = logging.getLogger(__name__)
#: These resources don't seem to exist anymore
BLACKLIST = {
"abs",
"aftol.taxonomy",
"agricola",
... |
from b import C
def main():
c = C()
print c |
# RTVIK SRIRAM BHARADWAJ
# bharadwr[AT]purdue[DOT]edu
nameDay = dict()
nameDay["Albert Einstein"] = "4/14/1879"
nameDay["Ada Lovelace"] = "12/10/1815"
nameDay["Benjamin Franklin"] = "01/17/1706"
print("Welcome to the birthday dictionary. We know the birthdays of:")
for name in nameDay.keys():
print(name)
print("Who’s... |
"""Remote debugging support for Falcon apps."""
import base64
import json
from abc import ABCMeta, abstractmethod
from logging import getLogger
import epdb
try:
from cryptography import fernet
except ImportError: # pragma: no cover
pass
try:
import jwt
except ImportError: # pragma: no cover
pass
... |
import SimpleHTTPServer
import SocketServer
class myHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
print self.path
self.send_response(200, "Hello world!")
PORT = 8000
handler = SocketServer.TCPServer(("", PORT), myHandler)
print "serving at port,", PORT
handler.serve_forever... |
import path from 'path';
import ironicTheme from './themes/ironic';
const plugins = [
['umi-plugin-react', {
antd: true,
dva: {
hmr: true,
},
targets: {
ie: 11,
},
locale: {
enable: true, // default false
default: 'zh-CN', // default zh-CN
baseNavigator: true, //... |
/***************************************************************************
* (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.
*
* You may choose any license of the current release or any future release
* of editarea to use, modify and/or redistribute this file.
*
* This language specification fil... |
import os
from pathlib import Path
import click
from ted_sws.core.adapters.cmd_runner import CmdRunner as BaseCmdRunner, DEFAULT_MAPPINGS_PATH
from ted_sws.data_manager.adapters.mapping_suite_repository import TRANSFORM_PACKAGE_NAME, MAPPINGS_PACKAGE_NAME
from ted_sws.mapping_suite_processor.entrypoints.cli import CO... |
import React from 'react';
import NavBar from './navBar';
import SwipeableTabView from './swipableTabView';
export default class LobstersApp extends React.Component {
render() {
return (
<div>
<NavBar title={ this.props.title } color={ this.props.color } />
<SwipeableTabView tabs={ this.p... |
angular.module('module_networkMonitor')
.controller('module_networkMonitorGraphTrafficController', function ($scope, NetworkMonitor) {
$scope.data = null;
$scope.uploadSpeedData = null;
$scope.downloadSpeedData = null;
$scope.uploadConsoData = null;
$scope.downloadConsoData = null;
$scope.... |
import pg_engine as pge
import pygame as pg
class TwoScreenRenderer:
SCALE = 2
def __init__(self):
self.gm = pge.GameManager()
screen = pge.Screen.screen()
self.top_camera = pge.Camera(screen, viewport=pg.rect.Rect(0, 0, 256 * TwoScreenRenderer.SCALE,
... |