text stringlengths 3 1.05M |
|---|
import Ember from 'ember';
import ShowEdit from 'aeonvera/mixins/routes/crud/events/show/edit';
export default Ember.Route.extend(ShowEdit, {
modelName: 'shirt'
});
|
from django.contrib.auth.models import Group, Permission
from rest_framework import serializers
from encounterapp.models import Refer
class PatientReferSerializer(serializers.ModelSerializer):
encounter_id = serializers.PrimaryKeyRelatedField(many=False,read_only=True)
class Meta:
model = Refer
fields = ('id'... |
const inquirer = require('inquirer');
const _ = require('lodash');
const crudFlow = async (role, permissionMap = {}, defaults = []) => {
if (!role) throw new Error('No role provided to permission question flow');
const possibleOperations = Object.keys(permissionMap).map(el => ({ name: el, value: el }));
const a... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])... |
QUnit.module('views');
QUnit.test("Open a module or tool", function(assert) {
assert.expect(2);
let done = assert.async();
let option_number=0;
let awesome_search = $('#navbar-search').get(0);
let options = () => {
// Method to return the available options after search
return $('body > div.main-section > h... |
// Material Dashboard 2 PRO React base styles
import borders from "assets/theme-dark/base/borders";
import colors from "assets/theme-dark/base/colors";
// Material Dashboard 2 PRO React helper functions
import pxToRem from "assets/theme-dark/functions/pxToRem";
const { borderWidth } = borders;
const { light } = color... |
# Generated by Django 2.1.2 on 2018-11-01 20:47
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Page',
fields=[
('id', models.AutoField(aut... |
import React from 'react';
import Slider from 'material-ui/lib/slider';
import Colors from 'material-ui/lib/styles/colors';
/** Author: Mike Chabot
* Description: Simple controlled slider
* Default Element: See render()
* Props: See PropTypes
*/
class ControlledSlider extends React.Compon... |
import Storage from './Storage';
export default class LocalStorage extends Storage {
storage = localStorage;
static getInstance() {
let instance = LocalStorage.instance;
if (!instance) {
instance = new LocalStorage();
}
return instance;
}
}
|
import { PrismaClient } from '@prisma/client'
const prisma = global.prisma || new PrismaClient({
log: ['warn', 'error']
})
if (process.env.NODE_ENV === 'development') global.prisma = prisma
export default prisma
|
/*
* Polish language file.
*
* Initial Author: Penknife (penknife1@gmail.com)
*
* Author: Dare (piczok@gmail.com)
*/
var theUILang =
{
kbs : "kB/s",
General : "Główne",
Downloads : "Pobieranie",
Connection : "Połączenie",
BitTorrent : "BitTorrent",
Advanced : "Zaawansowane",
User_Interface ... |
import { PhantomServiceManager } from "phantom-core";
const {
EVT_CHILD_INSTANCE_ADDED,
EVT_CHILD_INSTANCE_REMOVED,
EVT_UPDATED,
EVT_DESTROYED,
} = PhantomServiceManager;
export {
EVT_CHILD_INSTANCE_ADDED,
EVT_CHILD_INSTANCE_REMOVED,
EVT_UPDATED,
EVT_DESTROYED,
};
// TODO: Refactor this handling into... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Emoji falback, right now just uses fallback on windows,
// but could expand to be more sophisticated to allow emoji
// on Hyper term on windows, for example.
exports.emoji = (x, fallback) => {
if (process.platform === 'win32') {
... |
var error_correction_codewords = {
35: {
'Q': {'g2blocks': 14, 'g2blockcodewords': 25, 'g1blocks': 39, 'g1blockcodewords': 24, 'eccodewordsperblock': 30, 'totalcodewords': 1286},
'L': {'g2blocks': 7, 'g2blockcodewords': 122, 'g1blocks': 12, 'g1blockcodewords': 121, 'eccodewordsperblock': 30, 'totalc... |
from django.db import ProgrammingError
from django.utils.functional import cached_property
class BaseDatabaseFeatures:
gis_enabled = False
allows_group_by_pk = False
allows_group_by_selected_pks = False
empty_fetchmany_value = []
update_can_self_select = True
# Does the backend distinguish be... |
const fp = require('lodash/fp');
const { ATTIBUTE_TYPES, ENTITY_TYPES } = require('./constants');
const submitItems = async (
{
previousEntitiesInMISP,
submitTags,
...attributeCreationProperties
},
requestWithDefaults,
options,
Logger,
callback
) => {
try {
const createdAttributes = awai... |
const responses = require('./helpers/dialog');
const _ = require('lodash');
// Private generic randomized response function
const getGenericResponse = response => _.sample(response);
const yesLogoutResponse = () => getGenericResponse(responses.yeslogoutDialog);
const notLogoutResponse = () => getGenericRespons... |
import vernam from '../../lib/src/cipher/vernam';
import zxcvbn from 'zxcvbn';
import updateSummary from './summary';
import {shortHash, updateIcon} from './util';
const HASH_ALGORITHM = `SHA256`;
const DEFAULTS = {
hash: true // Hash by default
};
const text = document.getElementById(`encrypt-text`);
const secret ... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Text, Button, Icon } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import styles from './styles';
const... |
import macro from 'vtk.js/Sources/macro';
import vtkMath from 'vtk.js/Sources/Common/Core/Math';
import vtkMatrixBuilder from 'vtk.js/Sources/Common/Core/MatrixBuilder';
import vtkInteractorStyleManipulator from 'vtk.js/Sources/Interaction/Style/InteractorStyleManipulator';
// import vtkMouseCameraTrackballRotateManipu... |
#!/usr/bin/env node
const path = require('path');
const fs = require('fs');
const spawn = require('cross-spawn');
const requiredConfig = [
'dockerImage',
'sourceDir',
'testSourceDir',
'protoSourceDir',
'generatedSourceDir',
'compileDescriptorArgs',
];
const akkaslsScriptDir = path.resolve(__dirname, '..'... |
window.__NUXT__=(function(a,b,c,d){return {staticAssetsBase:"\u002Fstatic\u002F1597376630",layout:"default",error:b,state:{notification:{show:a,title:c,message:c},isShowSidebar:a,isSupportWebShare:a,headerTitle:"e-AlQur'an",page:"home",lastReadVerse:b,settingActiveTheme:{name:"dark",bgColor:"#071e3d",fgColor:"#fff"},se... |
var LatLngPiura=[
new google.maps.LatLng(-4.1141620971,-80.4644764896),
new google.maps.LatLng(-4.1287363474,-80.4662323646),
new google.maps.LatLng(-4.12089834748,-80.4468847395),
new google.maps.LatLng(-4.12829484773,-80.449915989),
new google.maps.LatLng(-4.20905072271,-80.4489218641),
new google.maps.LatLng(-4.1955... |
import logging
import socket
import select
import threading
from server.tcp4 import TCP4Server
from server.basicworker import WorkerServer, SLBWorkerServer
from server.simpletcpworker import SimpleTCPWorkerServer
from server.httpworker import HTTPWorkerServer
from server.sslworker import SSLWorkerServer
import models
... |
import S from '@sanity/desk-tool/structure-builder'
import React from 'react'
import { BsFillPersonFill } from 'react-icons/bs'
import { FiSettings } from 'react-icons/fi'
import { FaMicroblog, FaHome, FaClipboardList, FaConnectdevelop } from 'react-icons/fa'
import { ImProfile } from 'react-icons/im'
import { MdCompu... |
module.exports = {
purge: [],
theme: {
fontFamily: {
'title': ['MuseoModerno', 'sans-serif'],
'global': ['Raleway', 'sans-serif']
},
extend: {
colors: {
fof: "#fof"
}
},
},
variants: {},
plugins: [],
}
|
#!/usr/bin/env python3
import shutil
import sys
import os
from datetime import datetime
from src.dependency import check_dependencies
from src.exif import Exif
from src.phockup import Phockup
os.chdir(os.path.dirname(__file__))
def test_check_dependencies(mocker):
mocker.patch('shutil.which', return_value='exif... |
import { ethers } from "ethers";
import { governorAbi, tokenAbi } from "./proposals.abi";
const tokenAddress = "0xEC189C53D7FA727575bF48BE40039679e923BCB2";
const provider = ethers.providers.getDefaultProvider("http://127.0.0.1:9545");
const governorAddress = "0xED74b8F16502D1165F52cD1545F0484B733591f8";
const token =... |
const vec3 = require('../math/vec3')
const geom3 = require('../geometry/geom3')
const poly3 = require('../geometry/poly3')
/** Construct an ellipsoid.
* @param {Object} [options] - options for construction
* @param {Array} [options.center=[0,0,0]] - center of ellipsoid
* @param {Array} [options.radius=[1,1,1]] - r... |
import collections
import hashlib
import json
import logging
import time
import warnings
from os.path import join, exists, abspath
from os import mkdir, environ
from socket import gethostname
from getpass import getuser
from functools import partial
from six import string_types
import numpy
from numpy.testing import a... |
var Service, Characteristic;
var request = require("sync-request");
var temperatureService;
var humidityService;
var url;
var humidity = 0;
var temperature = 0;
var channel = 1;
module.exports = function(homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
homebridge.r... |
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
// below 2 in vendor dir
//= require legacy-1/pwb-admin-vendor
//= require legacy-1/pwb-admin
|
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */
/*global define, $, Audio, clearTimeout */
// A module that provides UI utility for every component needed for taking
// a picture
define(function (require, exports, module) {
"use strict";
var selfieWidgetHT... |
import { makeStyles } from "@material-ui/core/styles";
const useStyles = makeStyles((theme) => ({
root: {
display: "flex",
flexWrap: "wrap",
justifyContent: "space-around",
overflow: "hidden",
backgroundColor: theme.palette.background.paper,
},
gridList: {
height: 370,
},
}));
export d... |
import os.path as osp
import pickle
import random
import numpy as np
import torch
from .base_dataset import BaseDataset
class UnpairedLMDBDataset(BaseDataset):
def __init__(self, data_opt, **kwargs):
""" LMDB dataset with unpaired data, for BD degradation
"""
super(UnpairedLMDBDataset, s... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _createEagerFactory = require('recompose/createEagerFactory');
var _createEagerFactory2 = _interopRequireDefault(_createEag... |
var block_num,timestamp,block_prefix,target,key,binargs,name;
$('#login').click(function () {
var reg_num =/^\d+(\.\d{1,2})?$/;
var name=document.getElementById("username").value.trim();
var count=document.getElementById("money_count").value.trim();
if (name==""){
alert("请输入用户名!");
}else if... |
// This file was automatically generated. Do not modify.
'use strict';
Blockly.Msg["ADD_COMMENT"] = "Gionté un coment";
Blockly.Msg["ARDUINO_GENERAL_MSG_COMMENT"] = "comment"; // untranslated
Blockly.Msg["ARDUINO_GENERAL_MSG_LOOP"] = "loop"; // untranslated
Blockly.Msg["ARDUINO_GENERAL_MSG_SETUP"] = "setup"; // u... |
import _extends from "@babel/runtime/helpers/esm/extends";
import _typeof from "@babel/runtime/helpers/esm/typeof";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
/**
* TODO: 4.0
*
* - Remove `dataSource`
* - `size` not work with customizeInput
* - CustomizeInput not feedback `ENTER` key s... |
import { createFactory } from 'react';
import { renderToString } from 'react-dom/server';
import Root from './Root';
import configureStore from '../store/configureStore';
export const rootFactory = createFactory(Root);
export function configureRootComponent(initialState) {
const store = configureStore(initialState)... |
/*
@source https://github.com/qiao/PathFinding.js/
*/
/**
* Backtrace according to the parent records and return the path.
* (including both start and end nodes)
* @param {Node} node End node
* @return {Array.<Array.<number>>} the path
*/
export function backtrace(node) {
var path = [node];
while (nod... |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import optparse
from telemetry import decorators
from telemetry.internal import story_runner
from telemetry.internal.util import command_line... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","zh-cn",{title:"辅助功能说明",contents:"帮助内容。要关闭此对话框请按 ESC 键。",legend:[{name:"常规",items:[{name:"编辑器工具栏",legend:"按 ${toolbarFocus} 切换到工具栏,使用 TAB ... |
import React from 'react';
// import {
// BlockQuote,
// Cite,
// Deck,
// Heading,
// Image,
// List,
// ListItem,
// Quote,
// Slide,
// Text
// } from 'spectacle';
// import createTheme from 'spectacle/lib/themes/default';
// import ReactQuill from 'react-quill';
// import 'react-quill/dist/quill... |
const express = require('express');
const { userHandler } = require('hanlders');
const { getApiMessage } = require('helpers');
const { API_MESSAGES_TYPES } = require('constants');
const router = (db) => {
const routes = express.Router();
routes.use('/users', userHandler(db));
routes.use('*', (req, res) => {
... |
'use strict';
var _ = require('lodash'),
Suite = require('./beans/suite'),
Test = require('./beans/test'),
Step = require('./beans/step'),
Attachment = require('./beans/attachment'),
util = require('./util'),
writer = require('./writer');
function Allure() {
this.suites = [];
this.optio... |
load("bf4b12814bc95f34eeb130127d8438ab.js");
load("93fae755edd261212639eed30afa2ca4.js");
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
Since calling Object as a function is identical to calling a function,
list... |
Template.loginHeader.helpers({
logoUrl() {
const asset = RocketChat.settings.get('Assets_logo');
const prefix = __meteor_runtime_config__.ROOT_URL_PATH_PREFIX || '';
if (asset != null) {
return `${ prefix }/${ asset.url || asset.defaultUrl }`;
}
}
});
|
def solution(n):
"""Returns the sum of all the multiples of 3 or 5 below n.
>>> solution(3)
0
>>> solution(4)
3
>>> solution(10)
23
>>> solution(600)
83700
"""
xmulti = []
zmulti = []
z = 3
x = 5
temp = 1
while True:
result = z * temp
if ... |
const express = require('express')
const router = express.Router()
const { db } = require('../db')
const { createGame, getUserGamebyID, getAllUsersInGame } = require('../db/userGame')
router.get('/:gameid', (request, response) => {
getAllUsersInGame(request, db)
.then(results => response.json(results))
.catch(... |
import { configure, shallow } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import React from 'react'
import renderer from 'react-test-renderer'
// import React from 'react'
// import { shallow, mount } from 'enzyme'
import Repo from './Repo'
configure({ adapter: new Adapter() })
const repo = {
id: 1... |
//// [inheritanceMemberFuncOverridingProperty.ts]
class a {
x: () => string;
}
class b extends a {
x() {
return "20";
}
}
//// [inheritanceMemberFuncOverridingProperty.js]
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
... |
"""
Question:
You have 15 six-sided blocks.
These are cubes with a letter (or a blank space) on each face.
Each block can have a different set of letters.
For instance, one block may have A E I O U _ on its faces;
another block may have A B C D E E.
Write a function that takes as input a 15 character message
and t... |
var config = require('../../../config');
/* Exports a card finder factory */
module.exports = {
get : function (name) {
if(config.sites.indexOf(name) == -1) {
throw "Resource not found";
}else{
return require('./' + name);
}
}
};
|
from tf_keras_vis.utils.scores import BinaryScore
from matplotlib import cm
from tf_keras_vis.gradcam_plus_plus import GradcamPlusPlus
from tf_keras_vis.utils.model_modifiers import ReplaceToLinear
from pretraineModel.model import get_model
import tensorflow as tf
import numpy as np
import cv2
import matplotlib.pypplot... |
import React from 'react'
import { footerStyles } from 'styles'
/**
* Site footer component
*/
const Footer = () => (
<footer>
<p>
Bon baiser de Nice
</p>
<style jsx global>{footerStyles}</style>
</footer>
)
export default Footer
|
/**
* Copyright 2012-2019, 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 tinycolor = require('tinycolor2');
var Registry = require('../../registry');
var Li... |
# coding: utf-8
"""
Copyright 2016 SmartBear Software
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... |
from __future__ import annotations
from pprint import pformat
from typing import Optional, Tuple
import disnake
from disnake.ext import commands
def injected(user: disnake.User, channel: disnake.TextChannel):
"""This description should not be shown
Parameters
----------
user: A User from `injected`... |
# Module to load odlcs from file and upload via interoperability.
import csv
import imghdr
import json
import logging
import os
import pprint
import re
from interop import Odlc
logger = logging.getLogger(__name__)
TARGET_TYPE_MAP = {
'STD': 'standard',
'OAX': 'off_axis',
'EMG': 'emergent',
}
LATITUDE_R... |
import variables from '@/styles/element-variables.scss'
import defaultSettings from '@/settings'
const { fixedHeader } = defaultSettings
const state = {
theme: variables.theme,
fixedHeader: fixedHeader
}
export default {
namespaced: true,
state
}
|
# Python Script, API Version = V17
import math
Tolerance = 1e-5
def checkSurface (aSolid):
"check the torus and sketch surface"
sketchFaces = [] # for two sketch faces at the two side of the pipe
Tori = []
for iFace in aSolid.Faces:
if type (iFace.Shape.Geometry) is Torus :
Tori.a... |
// const oAxios = (url) => {
// const xhr = new XMLHttpRequest();
// xhr.open("GET", url, true);
// xhr.responseType = "blob";
// //xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA==');
// xhr.onload = () => {
// if (xhr.status === 200) {
// console.log(xhr.response);
// // // 获... |
/********************************************************************************
* generated by de.acegen
********************************************************************************/
import SynchronousCommand from "../../ace/SynchronousCommand";
import Event from "../../ace/Event";
import * as AppUtils from... |
import Vue from 'vue'
const r = Vue.prototype.$rules
export default {
position: {
layout: { span: 20 },
type: 'select',
value: [],
label: '目标职业',
props: { props: { label: 'text', value: 'value' },multiple: true, 'multiple-limit': 3 },
rules: [r.required()],
options: []
},
industry: {
... |
export const COURSE_LIST_REQUEST = 'COURSE_LIST_REQUEST';
export const COURSE_LIST_SUCCESS = 'COURSE_LIST_SUCCESS';
export const COURSE_LIST_FAIL = 'COURSE_LIST_REQUEST';
export const COURSE_DETAIL_REQUEST = 'COURSE_DETAIL_REQUEST';
export const COURSE_DETAIL_SUCCESS = 'COURSE_DETAIL_SUCCESS';
export const COURSE_DETA... |
/*!
* Vue.js plugin for Masonry layouts
* https://github.com/shershen08/vue-masonry/
* file:vue-masonry-plugin-umd.js
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("vue-masonry-plugin",[],e):"object"==typeof exports?exports["v... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import iView from 'iview';
import store from './store';
import 'iview/dist/styles/iview.css';
import ... |
'use strict';
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var Command = require('commands-e... |
export default [
{
'name': 'Roberte',
'species': 'hen',
'legs': 2,
'age': 16,
'furColor': 'red'
},
{
'name': 'Henri',
'species': 'hen',
'legs': 2,
'age': 2,
'furColor': 'white'
},
{
'name': 'Georges',
'species': 'hen',
'legs': 2,
'age': 1,
'furColor'... |
import React from 'react';
import { StyleSheet, Platform, Image, Text, View, ScrollView, TextInput, Button } from 'react-native';
import LoginForm from '../components/LoginForm'
export default class Login extends React.Component {
_login() {
this.props.navigation.navigate("AppTab")
}
render() {
return (... |
var helper = require("../../../helper");
// var Manager = require("../../../src/etl/fact-purchasing-etl-manager");
var Manager = require("../../../../src/etl/purchasing/fact-pembelian");
var instanceManager = null;
var should = require("should");
var sqlMock = require("../../../sql-mock");
before("#00. connect db", fu... |
!function(e){function r(e,r,t,n){function o(){for(var e,r,t=o[p],n=t.length,i=o[l],f=i.length,s=o[_];n--;)if(r=t[n].apply(this,arguments),u(r)&&r.$skip===!0)return r.$data;for(e=s.apply(this,arguments);f--;)if(r=i[f].apply(this,arguments),u(r)&&r.$skip===!0)return e;return e}return e[a]===e?(e[p].push(r),e[l].push(t),e... |
import _ from 'lodash'
// Auto polyfill
import 'es6-object-assign/auto'
import 'es6-promise/auto'
// Import Vue
import Vue from 'vue'
// Import F7, F7-Vue
import Framework7 from 'framework7/dist/framework7.esm.bundle.js'
import Framework7Vue from 'framework7-vue/dist/framework7-vue.esm.bundle.js'
import VueYoutube fr... |
#!/usr/bin/env python3
# Copyright 2014 BitPay Inc.
# Copyright 2016-2017 The Bitcoin Core developers
# Copyright (c) 2017 The Atlas Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test framework for atlas utils.... |
import React from 'react'
import Text from './Text'
import Media from './Media'
export default class extends React.Component {
render() {
const {
media: media = null,
text: text = null,
display: display = "Text First",
classes: classes = [],
hideOrShow: hideOrShow = "Show Media and... |
/*!
* ${copyright}
*/
sap.ui.define([
'sap/ui/core/Icon',
'sap/ui/core/_IconRegistry',
"sap/base/Log",
"sap/ui/thirdparty/jquery",
'./Core' // provides sap.ui.getCore()
],
function(Icon, _IconRegistry, Log, jQuery) {
"use strict";
/**
* The IconPool is a static class for retrieving or registering icons.... |
# Copyright 2021 Huawei Technologies 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... |
import React, {Component} from 'react';
import ClientList from "./ClientList";
class ClientsIndexPage extends Component {
constructor(props) {
super(props);
}
render() {
return (<ClientList/>)
}
}
export default ClientsIndexPage; |
import pandas as pd
import numpy as np
from glob import glob
import os
__all__ = ['read_json', 'read_csv', 'flatten']
def _read_multi(read_function=None, path_or_buf=None, post_function=None, *args, **kwargs):
"""
Given a wildcard filename pattern (which may be just a single static
filename), expand ... |
import React, { useMemo } from 'react'
import { makeStyles } from '@material-ui/core/styles'
import Course from './Course'
import Masonry from './Masonry'
import { useInfoBox } from '../../components/InfoBox'
import DividerWithText from '../../components/DividerWithText'
import { sortedCourses } from '../../lib/orderi... |
const express = require ('express');
const router = express.Router();
const { Post } = require('../models/');
const withAuth = require('../utils/auth');
router.get('/', withAuth, async (req, res) => {
try {
const postData = await Post.findAll({
where: {
// TODO: SET USERID TO THE LOGGED-IN USER ID
... |
Teachers = new Mongo.Collection("teachers");
Teachers.allow({
insert: function(userId, doc) {
return !!userId;
}
});
Teachers.attachSchema(new SimpleSchema({
name: {
type: String,
label: "Nombre"
},
lastname: {
type: String,
label: "Apellido"
},
grade: {
type: String,
label: "Educación"
},
univ... |
from copy import deepcopy
from re import Pattern
from typing import _GenericAlias
empty = object()
def is_typing(obj) -> bool:
return isinstance(obj, _GenericAlias)
def has_custom_validation_schema(obj) -> bool:
return hasattr(obj, '__validation_schema__')
class CheckChain:
"""
>>> chain = CheckC... |
import React from 'react';
export default class LazyImage extends React.Component {
// constructor(props) {
// super(props);
// this.state = {
// loaded: false
// }
// this.handleScroll = this.handleScroll.bind(this);
// }
// componentDidMount() {
// this.handleScroll();
// window.addEventListen... |
'use strict';
/* ------------------------------------------------------------------------------------------------
CHALLENGE 1 - Review
Write a function called addTwo that takes in an array and adds two to every value using a for loop. Place the new value in a new array. Return the new array.
------------------------... |
(function(){
// Pts.namespace( this ); // add Pts into scope if needed
var demoID = "op_intersect";
// create Space and Form
var space = new CanvasSpace("#"+demoID).setup({ retina: true, bgcolor: "#e2e6ef", resize: true });
var form = space.getForm();
var pts = undefined;
// animation
space.ad... |
const CustomError = require("../extensions/custom-error");
module.exports = function createDreamTeam(members) {
if (!Array.isArray(members)) return false;
let names = members.map(item => typeof(item) == 'string' ? item.trim() : false);
let dreamTeam = [];
names.forEach(item => {
if (item) {
dr... |
import {
defaultAction,
} from '../actions';
import {
DEFAULT_ACTION,
} from '../constants';
describe('Corpus actions', () => {
describe('Default Action', () => {
it('has a type of DEFAULT_ACTION', () => {
const expected = {
type: DEFAULT_ACTION,
};
expect(defaultAction()).toEqual(... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[444],{LtfV:function(e,t,a){"use strict";a.r(t);var n=a("q1tI"),c={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4... |
// This file was procedurally generated from the following sources:
// - src/class-elements/err-delete-call-expression-private-method.case
// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
/*---
description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateNam... |
"""IMAP4 client.
Based on RFC 2060.
Public class: IMAP4
Public variable: Debug
Public functions: Internaldate2tuple
Int2AP
ParseFlags
Time2Internaldate
"""
# Author: Piers Lauder <piers@cs.su.oz.au> December 19... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { signInUser } from '../actions/authedUser'
import { Redirect, withRouter } from 'react-router-dom'
class Login extends Component {
state = {
userId: '',
redirectToReferrer: false
}
handleChange = (e) =>... |
// Load modules.
var passport = require('passport-strategy')
, url = require('url')
, uid = require('uid2')
, crypto = require('crypto')
, base64url = require('base64url')
, util = require('util')
, utils = require('./utils')
, OAuth2 = require('oauth').OAuth2
, NullStore = require('./state/null')
, N... |
const clientAgentDAO = require('../models/ClientAgentDAO');
const serverLogger = require('../util/ServerLogger.js');
const moment = require('moment');
const sysConst = require('../util/SystemConst.js');
const resUtil = require('../util/ResponseUtil.js');
const logger = serverLogger.createLogger('ClientAgent.js');
con... |
import {b as,} from 'a'; |
import React from "react";
// import { Clock, Maximize2 } from "react-feather";
import Layout from "../components/layout";
import SEO from "../components/seo";
function AboutPage() {
return (
<Layout>
<SEO
keywords={[`about`, `team`, `experience`]}
title="About"
description="Get to ... |
import styled from 'styled-components';
export const Container = styled.div`
display: flex;
justify-content: center;
flex-wrap: wrap;
.cards {
min-width: 300px;
margin: 12px;
padding: 15px;
color: #8945de;
border-radius: 8px;
box-shadow: 0px 4px 4px rgb(0 0 0 / 50%);
background... |
# -*- coding: utf-8 -*-
import os
from alchimia import TWISTED_STRATEGY
from sqlalchemy import create_engine
from twisted.internet import reactor
class Auditor(object):
def start(self):
raise NotImplementedError
def audit(self):
raise NotImplementedError
def setup_mysql(self):
s... |
var a="/build/assets/avatar-s-2.5283923e.jpg";export{a as default};
|