text stringlengths 3 1.05M |
|---|
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const { join } = require('path');
const { constants } = require('karma');
const isDocker = require('is-docker')();
module.exports = () => {
return {
customLaunchers: {
ChromeCust... |
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'sk', {
button: 'Vložte ukážku programového kódu',
codeContents: 'Obsah kódu',
emptySnippetErro... |
import React from 'react';
import { ActivityIndicator } from 'react-native';
import PropTypes from 'prop-types';
import { Container, Text } from './styles';
export default function Button({ children, loading, ...rest }) {
return (
<Container {...rest}>
{loading ? (
<ActivityIndicator siz... |
const fs = require('fs');
var clc = require("cli-color");
const api = require('firebase-tools/lib/api');
const requireAuth = require('firebase-tools/lib/requireAuth');
function log(logger, msg, shouldLog) {
if (shouldLog) logger(msg);
}
function buildRequest(suite) {
return {
auth: true,
origin: api.rulesOrigin... |
"""
mbed CMSIS-DAP debugger
Copyright (c) 2006-2018 ARM Limited
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 ... |
exports.seed = function(knex) {
return knex('stocks')
.then(function () {
return knex('stocks').insert([
{symbol : "SURF"},
{symbol : "EQC-D"},
{symbol : "CNXC"},
{symbol : "SXTC"},
{symbol : "FAAR"},
{symbol : "PDEX"},
{symbol : "HCAC="},
... |
module.exports={A:{A:{"2":"J E F G A B jB"},B:{"1":"N O P S T U V W X Y Z a b c Q H d","2":"C K L D M"},C:{"1":"9 AB BB CB DB EB FB GB HB IB dB JB eB KB LB R MB NB OB PB QB RB SB TB UB VB WB XB YB ZB P S T lB U V W X Y Z a b c Q H d","2":"0 1 2 3 4 5 6 7 8 kB cB I e J E F G A B C K L D M N O f g h i j k l m n o p q r s... |
import { LightningElement, track, createElement } from 'lwc';
import Properties from 'x/properties';
import SideEffect from 'x/sideEffect';
import NonObservable from 'x/nonObservable';
import SetTrackedValueToNull from 'x/setTrackedValueToNull';
it('rerenders the component when a track property is updated - literal',... |
import React from "react";
import { Col, Container, Button, Form, Row } from "reactstrap";
import { reduxForm } from "redux-form";
import { connect } from "react-redux";
import Mapping from "../../services/mapping";
import BackButton from "./components/BackButton";
import Field from "./components/field.js";
import Sect... |
/*
* jQuery gentleSelect plugin (version 0.1.4.1)
* http://shawnchin.github.com/jquery-cron
*
* Copyright (c) 2010-2013 Shawn Chin.
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Requires:
* - jQuery
*
* Usage:
* (JS)
*
* // initialise like this
* var c = $('#cron').cron({
* initial: ... |
/* global chrome */
import axios from "axios";
export default {
get(url, params, headers = {}) {
return new Promise((resolve, reject) =>
chrome.runtime.sendMessage({ type: "API", data: { url, method: "GET", params }, headers }, ({ result, error }) => {
if (error) return reject(e... |
# -*- coding: utf-8 -*-
"""Storage for themes.
"""
from typing import Dict, Optional, Iterator
from mss import constants
from mss.core.class_theme import Theme
def theme_sorter(theme: Theme) -> str:
"""Sort themes by directory."""
if theme.directory == constants.ALL_THEMES:
return ''
return them... |
/*import {max, min, sum} from "d3-array";
import {justify} from "./align.js";
import constant from "./constant.js";
*/
//<script type="module" src="align.js"></script>
//<script type="module" src="constant.js"></script>
constant = require('constant.js');
justify = require('align.js');
function ascendingSourceBreadth(... |
import SocketIO from 'socket.io';
const DEFAULT_ROOM = 'room-1';
// Constructor
class Office {
constructor(officeController, server) {
this.officeController = officeController;
this.server = server;
this.io = new SocketIO(server)
}
start() {
this.io.use((socket, next) => {
socket.user = J... |
/*!
* why-did-you-update v1.0.6
* MIT Licensed
*/
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WhyDidYouUpdate=t():n.WhyDidYouUpdate=t()}(window,function(){return function(n){var t={};function e... |
const path = require('path');
const dotenv = require('dotenv');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// const BundleAnalyzerPlugin = requir... |
Search.setIndex({envversion:42,terms:{alo:7,all:[4,16,3,5,7,8,11,17],code:[4,16,3,5,14,8,17],jason:[4,16,17,14],chain:7,bugreport:5,consum:[7,5],some_module_existing_only_in_virtualenv:15,steve:5,signific:4,deprecationwarn:5,abil:[17,5],cheeseshop:4,follow:[7,9,8,17,5],scp:10,privat:4,pedro:5,depend:[4,17,5],system:[15... |
const path = require("path")
const {
ReturnReason,
Order,
LineItem,
CustomShippingOption,
ShippingMethod,
} = require("@medusajs/medusa")
const setupServer = require("../../../helpers/setup-server")
const { useApi } = require("../../../helpers/use-api")
const { initDb, useDb } = require("../../../helpers/use... |
/*
*
* More info at [www.dropzonejs.com](http://www.dropzonejs.com)
*
* Copyright (c) 2012, Matias Meno
*
* 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, includi... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var errors = require("../../../errors");
var manipulation_1 = require("../../../manipulation");
var typescript_1 = require("../../../typescript");
var utils_1 = require("../../../utils");
var callBaseFill... |
var mongoose = require('mongoose');
var ImgComSchema = new mongoose.Schema({
zIndex: {type: Number, default: 1},
top: {type: String, default: '200px'},
left: {type: String, default: '100px'},
right: {type: String, default: '0px'},
bottom: {type: String, default: '0px'},
width: {type: String, d... |
import React from 'react';
import Dropdown from './Dropdown';
import Select from 'react-select';
import WebFont from 'webfontloader';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFont } from '@fortawesome/free-solid-svg-icons';
import FormatLineSpacingRoundedIcon from '@material-ui/icons... |
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { TeachingBubble as FTeachingBubble } from '@fluentui/react/lib/TeachingBubble';
import { DirectionalHint } from '@fluentui/react/lib/Callout';
class TeachingBubble extends React.Component {
constructor(props) {
super(props)... |
function Calculator() {
this.display = document.querySelector(".display");
this.init = () => {
this.captureClick();
this.captureEnter();
};
this.captureEnter = () => {
document.addEventListener("keyup", (event) => {
if (event.keyCode !== 13) return;
this.performsCalc();
});
};
... |
$(document).ready(() => {
$(".devour-form").on("submit", function(event) {
event.preventDefault();
let burger_id = $(this).children(".burger_id").val();
$.ajax({
method: "PUT",
url: "/burgers/" + burger_id
})
.then(data => {
location.reload();
});
});
$(".cle... |
webpackJsonp([17],{
/***/ 243:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_cacheDirectory_true_presets_env_modules_false_targets_browsers_... |
# 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... |
"""
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-2021 Pycord Development
Copyright (c) 2021-present Texus
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 restri... |
var __wxAppData = {};
var __wxRoute;
var __wxRouteBegin;
var __wxAppCode__ = {};
var global = {};
var __wxAppCurrentFile__;
var Component = Component || function() {};
var definePlugin = definePlugin || function() {};
var requirePlugin = requirePlugin || function() {};
var Behavior = Behavior || function() {};... |
dojo.provide("dojox.lang.oo.aop");
dojo.require("dojox.lang.oo.Decorator");
dojo.require("dojox.lang.oo.general");
(function(){
var oo = dojox.lang.oo, md = oo.makeDecorator, oog = oo.general, ooa = oo.aop,
isF = dojo.isFunction;
// five decorators implementing light-weight AOP weaving
/*=====
ooa.before = md... |
export const MATCH_TYPES = {
FINAL: 'FINAL',
SEMIFINALS: 'SEMIFINALS',
QUARTERFINALS: 'QUARTERFINALS'
}
|
window.peopleAlsoBoughtJSON = [{"asin":"179711705X","authors":"Walter Isaacson","cover":"51H0ZsQfsKL","length":"16 hrs and 4 mins","narrators":"Kathe Mazur, Walter Isaacson","subHeading":"Jennifer Doudna, Gene Editing, and the Future of the Human Race","title":"The Code Breaker"},{"asin":"B07F43574T","authors":"Michael... |
import React from 'react';
import { colors } from '../../../styles/theme';
const LargeLogo = ({
color1 = colors.electricViolet,
color2 = colors.denim,
overlapColor = colors.matisse,
textColor = colors.blueZodiac,
height = 36,
width = 120,
className
}) => (
<svg
xmlns="http://www.w3.org/2000/svg"
... |
let form = document.getElementById("form");
let textInput = document.getElementById("textInput");
let dateInput = document.getElementById("dateInput");
let textarea = document.getElementById("textarea");
let msg = document.getElementById("msg");
let tasks = document.getElementById("tasks");
let add = document.getElemen... |
"""394. Decode String"""
class Solution(object):
def decodeString(self, s):
"""
:type s: str
:rtype: str
"""
### Practice:
curstring = ''
curnum = 0
stack = []
for i in s:
if i == '[':
stack.append(curstring)
... |
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __assign = (this && this.__assign) || function () {
__assign = Object... |
import sys, os
sys.path.insert(0, os.getcwd())
from argo.core.ArgoLauncher import ArgoLauncher
from argo.core.TFDeepLearningModel import load_model, load_network
from argo.core.utils.argo_utils import load_class
from datasets.Dataset import Dataset
import argparse
import tensorflow as tf
from pprint import pprint
impor... |
/**
* Module dependencies.
*/
var page = require('page');
var SignupForm = require('./signup-form-view');
var EmailValidationForm = require('./email-validation-form-view');
var EmailValidationCompleteForm = require('./email-validation-complete-view');
var ResendValidationEmailForm = require('./resend-validation-emai... |
/******/ (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... |
# coding: utf-8
"""
Spinnaker API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import ... |
/*
* Copyright The Athenz 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 law or agreed t... |
/**
* 初始化部门详情对话框
*/
var DeptInfoDlg = {
deptInfoData : {},
zTreeInstance : null,
validateFields: {
simpleName: {
validators: {
notEmpty: {
message: '部门名称不能为空'
}
}
},
fullName: {
validators: {
... |
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import {Link} from 'react-router-dom'
import {Navbar} from './index'
import {fetchMoviesInCart, removeFromCart} from '../store/allMovies'
class Cart extends Component {
componentDidMount() {
this.props.f... |
export function getDamageLevel(hp, maxHp) {
const injuredLevel = maxHp / 2;
const badlyInjuredLevel = maxHp / 4;
if (hp === 0) {
return { level: 'injured', display: '0' };
}
if (hp < badlyInjuredLevel) {
return { level: 'injured', display: 'Badly injured' };
}
if (hp < injuredLevel) {
retur... |
/**
* @license
* Copyright 2020 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.u2.crunch',
name: 'CapabilityFeatureView',
extends: 'foam.u2.View',
implements: [
'foam.mlang.Expressions'
],
imports: [
'auth',
'crunchServic... |
/**
* Configuration object to be passed to MSAL instance on creation.
* For a full list of MSAL.js configuration parameters, visit:
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md
*/
const msalConfig = {
auth: {
clientId: "<AppID>",
... |
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 = Reflect.decorate(d... |
import React, { Component } from 'react';
import Button from '@hig/button';
import Tooltip, { Text } from "@hig/tooltip";
import ThemeRepeater from '../components/ThemeRepeater';
class TooltipPage extends Component {
constructor(props) {
super(props);
this.state = {
open: true
}
}
toggleOpe... |
/*global process */
/**
* @file Command line interface for JSforce
* @author Shinichi Tomita <shinichi.tomita@gmail.com>
*/
'use strict';
var http = require('http'),
url = require('url'),
openUrl = require('open'),
commander = require('commander'),
coprompt = require('co-prompt'),
Repl = requir... |
const { MongoClient } = require('mongodb')
const promiseRetry = require('promise-retry')
const querystring = require('querystring')
const adminTokens = require('@architect/shared/tokens-admin')
const clientTokens = require('@architect/shared/tokens-client')
exports.handler = async function getLenders(req) {
const ... |
module.exports={D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0.009346,"23":0,"24":0,"25":0,"26":0.004673,"27":0,"28":0,"29":0.126171,"30":0.004673,"31":0.004673,"32":0,"33":0.004673,"34":0.014019,"35":0.004673,"36":0,"37":0,"38":0.037384... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 <+YOU OR YOUR COMPANY+>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#... |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Badge extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
title: PropTypes.string,
outline: PropTypes.bool
};
render() {
... |
{"":{"domain":"ckan","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1)"},"An Error Occurred":[null,"Ocorreu um erro"],"Are you sure you want to perform this action?":[null,"Você tem certeza de que deseja executar essa ação?"],"Cancel":[null,"Cancelar"],"Confirm":[null,"Confirme"],"Edit":[null,"Editar"],"Failed ... |
import DeveloperError from "./DeveloperError.js";
/**
* Terrain data for a single tile. This type describes an
* interface and is not intended to be instantiated directly.
*
* @alias TerrainData
* @constructor
*
* @see HeightmapTerrainData
* @see QuantizedMeshTerrainData
* @see GoogleEarthEnterpriseTerrainDa... |
module.exports={A:{A:{"2":"K D G gB","164":"E A","260":"B"},B:{"1":"H I","260":"1 C d J M"},C:{"1":"0 2 3 5 6 7 8 9 b c e f g h i j k l m n o L q r s t u v w x y z GB AB CB DB","2":"dB EB F N K D G XB WB","516":"1 E A B C d J M H I O P Q R S T U V W X Y Z a"},D:{"1":"0 2 3 5 6 7 8 9 S T U V W X Y Z a b c e f g h i j k ... |
describe('User', () => {
it('Visits the Home Page', () => {
cy.visit('/');
cy.contains('The Stocks App');
});
it('Sets the API Key', () => {
const apiKey = Cypress.env('EXTERNAL_API_KEY')
cy.get('.api-key-input')
.type(apiKey)
.should('have.value',... |
(function () {
// Search Button
function addSearchButton(ele, text) {
const button = document.createElement('button');
button.appendChild(document.createTextNode('search'));
button.onclick = function () {
// copy to clipboard
const textarea = document.createElement('textarea');
textar... |
var annotated_dup =
[
[ "Envy", null, [
[ "engine", null, [
[ "description", "struct_envy_1_1engine_1_1description.html", "struct_envy_1_1engine_1_1description" ]
] ],
[ "graphics", null, [
[ "description", "struct_envy_1_1graphics_1_1description.html", null ]
] ],
[ "u... |
/**
* Archivo donde se especifican los estados que puede llegar a tomar una respuesta.
*/
exports.DONE = 200;
exports.CREATED = 201;
exports.REMOVED = 204;
exports.BAD_REQUEST = 400;
exports.NOT_FOUND = 404;
exports.ERROR = 500; |
// import models
const Product = require('./Product');
const Category = require('./Category');
const Tag = require('./Tag');
const ProductTag = require('./ProductTag');
Product.belongsTo(Category, { foreignKey: 'category_id' });
Category.hasMany(Product, { foreignKey: 'category_id'});
Product.belongsToMany(Tag, {
... |
import { isPresent, isBlank } from 'angular2/src/core/facade/lang';
import { BaseException } from 'angular2/src/core/facade/exceptions';
import { ObservableWrapper } from 'angular2/src/core/facade/async';
import { ListWrapper, StringMapWrapper } from 'angular2/src/core/facade/collection';
import { Injector, Key, Depend... |
# -*- coding: utf-8 -*-
#
# sample documentation build configuration file, created by
# sphinx-quickstart on Mon Apr 16 21:22:43 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Not that not all possible configuration values are present in this
# autogenerated file.
#
# All c... |
/*!
* ${copyright}
*/
/*
* IMPORTANT: This is a private module, its API must not be used and is subject to change.
* Code other than the OpenUI5 libraries must not introduce dependencies to this module.
*/
sap.ui.define(["sap/ui/performance/trace/FESR", "sap/base/Log"], function(FESR, Log) {
"use strict";
/**
... |
from django.urls import re_path
from .views import (
CompanyAdminView,
CompanyAnalyticsView,
CompanyAssociateView,
CompanyAssociationListView,
CompanyCreateView,
CompanyDeleteView,
CompanyDetailView,
CompanyDisassociateView,
CompanyListView,
CompanyUpdateView
)
app_name = 'pycompanies'
urlpatterns... |
export default {
state() {
return {
// load env constants from nuxt config
config: process.env.config,
root: process.env.root,
pathMap: process.env.pathMap,
tagMap: process.env.tagMap,
// other vars
/**
* ```
* [{ text: '', exact: true, to: '/' }]
* `... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var Icon = require('../Icon-1083255b.js');
var React = require... |
""" test pyvista.utilities """
import itertools
import os
import pathlib
import pickle
import shutil
import unittest.mock as mock
import warnings
import numpy as np
import pytest
import vtk
import pyvista
from pyvista import examples as ex
from pyvista.utilities import (
GPUInfo,
Observer,
cells,
chec... |
setTimeout(function start (){
$('.bar').each(function(i){
var $bar = $(this);
$(this).append('')
setTimeout(function(){
$bar.css('width', $bar.attr('data-percentage'));
}, i*100);
});
// $('.count').each(function () {
// $(this).prop('Counter',0).animate({
// ... |
var Utils = require("../../utils")
, DataTypes = require("../../data-types")
, util = require("util")
module.exports = (function() {
var QueryGenerator = {
dialect: 'mysql',
addSchema: function(opts) {
var tableName
var schema = (!!opts && !!opts.options && !!opts.options.sche... |
/*! @license Firebase v4.1.2
Build: rev-4a4cc92
Terms: https://firebase.google.com/terms/ */
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _app = require('./app');
var _app2 = _interopRequireDefault(_app);
require('./auth');
function _interopRequireDefault(obj) { return obj ... |
var express = require("express");
var router = express.Router();
// Require controller modules
var book_controller = require("../controllers/bookController.js");
var author_controller = require("../controllers/authorController.js");
var genre_controller = require("../controllers/genreController.js");
var book_instance... |
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from django.conf import settings
from django.test import TestCase, override_settings
from django.db.models.query import QuerySet
from django.utils.timezone import utc
from sis_provisioner.models.admin import Admin
from sis_provision... |
from collections import OrderedDict, namedtuple
import copy
import datetime as dt
import logging
import matplotlib
import matplotlib.pyplot as plt
import pytz
import re
import textwrap
import numpy as np
import pandas as pd
from dsgrid.dataformat.enumeration import EndUseEnumerationBase
logger = logging.getLogger(__... |
const joi = require("@hapi/joi");
const boom = require("boom");
const BaseRoute = require("./base/BaseRoute");
const failAction = (request, headers, erro) => {
throw erro;
};
const headers = joi
.object({
authorization: joi.string().required(),
})
.unknown();
class HeroRoutes extends BaseRoute {
constru... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
import React from 'react';
import { useStaticQuery, graphql } from 'gatsby';
import NonStretchedImage from './nonStretchedImage';
const Image = () => {
const data = useStaticQuery(graphql`
query {
astronaut: file(relativePath: { eq: "gatsby-astronaut.png" }) {
...squareImage
}
}
`);
r... |
import pytest
from numpy.testing import assert_almost_equal
import astropy.units as u
from sunpy.instr import fermi
from sunpy.time import parse_time
@pytest.mark.remote_data
def test_download_weekly_pointing_file():
# set a test date
date = parse_time('2011-10-01')
afile = fermi.download_weekly_pointin... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from translate.lang import factory
def test_punctranslate():
"""Tests that we can translate punctuation."""
language = factory.getlanguage('el')
assert language.punctranslate(u"") == u""
assert language.punctranslate(u"abc efg") == u"abc efg"
assert l... |
import React, { useState, useEffect } from 'react'
import { useHistory } from 'react-router-dom';
import axios from 'axios'
import { Input, Label, Select, Button, Textarea } from '@windmill/react-ui'
import PageTitle from '../../components/Typography/PageTitle'
import { Toast } from '../../utils/SwalUti';
function Pr... |
# 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.
# C... |
const https = require("https");
module.exports = function get(url) {
return new Promise((fulfil, reject) => {
https.get(url, response => {
let body = "";
response.on("data", chunk => {
body += chunk;
});
response.on("end", () => {
fulfil(body);
});
response.... |
from distutils.core import setup
setup(name='Faceless',
version='0.1',
url='https://github.com/faithlessfriend/faceless',
author='Andrei Zhabinski',
author_email='github_nickname@gmail.com',
description='Reimplementation of ICAAM',
platforms='any... |
require('dotenv').config()
const express = require('express')
const morgan = require('morgan')
const cors = require('cors')
const helmet = require('helmet')
const logger = require('./logger')
const { NODE_ENV } = require('./config')
const foldersRouter = require('./folders/folders-router.js')
const notesRouter = requir... |
module.exports = (env, throwEnvironmentError) => {
return {
log (message) { return env === 'test' ? console.log(message) : throwEnvironmentError(); },
error: console.error
};
};
|
const arcgisClient = require('./lib/arcgisClient');
const coreTableHeaders = [
'Province/State',
'Country/Region',
'Confirmed',
'Deaths',
'Recovered'
];
const coreTableHeadersWithLocation = [
...coreTableHeaders,
'Latitude',
'Longitude'
];
const totalsTableHeaders = [
'Total Confirm... |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
return mod(require("../lib/tern"), require("./node_resolve"));
if (typeof define == "function" && define.amd) // AMD
return define(["../lib/tern", "./node_resolve"], mod);
mod(tern, tern);
})(function(tern) {
"use ... |
import os
val = 0
test = 1
if val:
print("Gen val set")
cmd = 'CUDA_VISIBLE_DEVICES=3 ~/anaconda3/bin/python ../../evaluate.py ./dump/lj/logmelspectrogram/norm/dev ./exp/lj_train_no_dev_mol_wavenet/checkpoint_step000700000_ema.pth ./gen_val_wav --preset=./conf/mol_wavenet.json --hparams="batch_size=10, postp... |
!function(t){var e,i,o,n;i=0,o=0,e=!1,n={init:function(s){"fixed"!==t("body").css("position")&&(i=t(document).scrollTop()),o=window.innerWidth-document.documentElement.clientWidth,e=s.freeze,n.create(s.name,s.size,s.title,s.content,s.callback)},create:function(i,o,s,l,d){var a;a=n.template(i,o,s,l),e&&"fixed"!==t("body... |
from django.core.management.base import BaseCommand, CommandError
from django.template.loader import render_to_string
from pyconcz_2017.proposals.models import Talk, Workshop, FinancialAid
PROPOSAL_MAP = dict(
talk=Talk.objects.filter(accepted=True),
workshop=Workshop.objects.filter(accepted=True, type='works... |
import fs from 'fs';
import path from 'path';
import _ from 'underscore';
import * as esprima from 'esprima';
import { Parser } from 'jison';
const grammar = fs.readFileSync(path.resolve(__dirname, './restjsdoc.jison')).toString();
const parser = new Parser(grammar);
export const parse = function(code) {
// TODO ... |
import React, { useState, useRef } from 'react';
import { Modal, TextInput } from 'carbon-components-react';
import PropTypes from 'prop-types';
import uuidv4 from '../../global/js/utils/uuidv4';
import { Canary } from '../_Canary';
import { pkg } from '../../settings';
const componentName = 'RemoveDeleteModal';
expo... |
import { NOT_AVAILABLE } from '../constants'
const getNavigatorPlatform = () => {
if (navigator.platform) {
return navigator.platform
} else {
return NOT_AVAILABLE
}
}
function getData (done) {
done(getNavigatorPlatform())
}
export default {
key: 'platform',
getData
}
|
import Helper from '../../helper.js'
class Accordeon extends Helper {
constructor(block){
super();
if(!block) return;
this.buttonToAddOrEdit = 'side-card-wrapper__add-block';
this.blockToDispatch = document.querySelector('.side-card-wrapper__links-block');
this.flyEvent('add', ['click'], block, this.addB... |
from atxt.__main__ import main
def test_main():
assert main([]) == 0
|
var ReadBuffer = require('../readbuffer');
var Type = require('../type');
var util = require('../util');
module.exports = function (buffer, font) {
var table = new ReadBuffer(buffer);
return table.read(util.struct({
version: Type.FIXED,
ascender: Type.FWORD,
descender: Type.FWORD,
lineGap: Type.FW... |
import Link from "next/link";
import { jsx } from "@emotion/core";
import React, { Fragment, useState } from "react";
import { Query } from "react-apollo";
import gql from "graphql-tag";
import Router from "next/router";
const userProfile = props => {
return (
<div>
<Query
query={gql`
{
... |
export default {
name: 'feather-edit-2',
icon: {
tag: 'svg',
attrs: {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
strokeWidth: 2,
strokeLinecap: 'round',
strokeLinejoin: 'round'
},
children: [
{
... |
sap.ui.define(['sap/ui/webc/common/thirdparty/base/asset-registries/Icons'], function (Icons) { 'use strict';
const name = "past";
const pathData = "M487.732 283c13 2 23 18 20 30-25 112-127 199-249 199-123 0-224-84-250-199-2-12 8-28 20-30 13-3 28 5 31 20 20 92 102 158 199 158s178-69 198-158c3-13 18-23 31-20zm-459-77... |
#File reading
#1 .Read All content
all_the_text = open('name.txt', 'rU').read() #'rU' will tran `\n\r`, '\r' to '\njj'
all_the_data = open('abinfile', 'rb').read()
# Read with try-finally
file_object = open('thefile.txt')
try:
all_the_text = file_object.read()
finally:
file_object.close()
#Read by line
list_o... |