text stringlengths 3 1.05M |
|---|
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
i... |
# -*- coding: utf-8 -*-
import unittest
from openregistry.lots.core.tests import lots
def suite():
suite = unittest.TestSuite()
suite.addTest(lots.suite())
return suite
if __name__ == '__main__':
unittest.main(defaultTest='suite')
|
/**
* ニュース画面UI
* loadFeed フィードを読み込む
* @tabGroup
* @teamId
* @teamName
*/
function NewsWindow(tabGroup, teamId, teamName) {
var News = require("/model/News");
var Standings = require("/model/Standings");
var util = require("/util/util").util;
var WebWindow = null;
if(util.isiOS()) {
Web... |
/*
* Copyright 2009 Stefan Gustavson (stefan.gustavson@gmail.com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright noti... |
import { useForm } from "react-hook-form";
import React from "react";
import jsonData from "../data/data.json";
import { ErrorMessage } from "@hookform/error-message";
import { yupResolver } from "@hookform/resolvers/yup";
import * as Yup from "yup";
import { useTranslation } from "react-i18next";
import monkey from ".... |
import React from 'react';
import { StaticQuery, graphql } from 'gatsby';
import Img from 'gatsby-image';
const Image = () => (
<StaticQuery
query={graphql`
query {
placeholderImage: file(relativePath: { eq: "signature-mobile.png" }) {
childImageSharp {
fixed(width: 135, heigh... |
################################################################################
# BSD LICENSE
#
# Copyright(c) 2019-2022 Intel Corporation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# *... |
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
import logging
import os
import signal
import subprocess
import sys
from tornado.httpclient import HTTPClient, HTTPError
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from tornado.log i... |
from flask import current_app
from flask_restful import Resource, reqparse
from crapi.blueprints.api.util import authenticate_bot
from crapi.data.reaction import reaction_schema, reactions_schema
from crapi.models import db
from crapi.models.reaction import Reaction
class ReactionsResource(Resource):
method_deco... |
import {deprecate, checkHtmlElement, HtmlElementTypeError} from '../utils'
import document from './helpers/document'
test('deprecate', () => {
const spy = jest.spyOn(console, 'warn').mockImplementation(() => {})
const name = 'test'
const replacement = 'test'
const message = `Warning: ${name} has been deprecate... |
from pkg_resources import get_distribution
__version__ = get_distribution('calicompari').version
|
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
|
/******************************************************************************\
Copyright (c) 2005-2018, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source c... |
"use strict";
const https = require("https");
const utilities = require("../../utilities.js");
const lowKickCalcs = (number) => {
if (number < 10) {
return 20;
}
if (number < 25) {
return 40;
}
if (number < 50) {
return 60;
}
if (number < 100) {
return 80;
}
if (number < 200) {
return 100;
}
ret... |
from setuptools import find_packages
from setuptools import setup
setup(
name="shelephant",
license="MIT",
author="Tom de Geus",
author_email="tom@geus.me",
description="YAML based shell commands",
long_description="YAML based shell commands",
keywords="YAML, Bash",
url="https://github.... |
/*!
* Remark (http://getbootstrapadmin.com/remark)
* Copyright 2017 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
!function(global,factory){if("function"==typeof define&&define.amd)define("/pages/profile_v3",["jquery","Site"],factory);else if("undefined"!=typeof exports)factory(require("jquery... |
import logging
import unittest
from contextlib import contextmanager
from typing import Dict
import disnake
from disnake.ext import commands
from bot.log import get_logger
from tests import helpers
class _CaptureLogHandler(logging.Handler):
"""
A logging handler capturing all (raw and formatted) logging out... |
define(["require","underscore","dashboard/hyperlink/handler/dashboardHyperlinkHandlerAdhocExecution","dashboard/enum/dashboardWiringStandardIds","../FreeTextView"],function(e){"use strict";function t(e){e.name===i.REFRESH_SLOT?this._renderComponent():e.name===i.APPLY_SLOT&&this._renderComponent()}var n=e("underscore"),... |
#!/usr/bin/env python
"""conference_session.py
Models for the ConferenceSession ndb kind and protorpc messages.
"""
from protorpc import messages
from google.appengine.ext import ndb
class ConferenceSession(ndb.Model):
"""Session -- Session object"""
title = ndb.StringProperty(required=True)
highlight... |
#!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'face_recognition_models==0.3.0',
'dlib==19.22.0',
... |
# example6-download-thread.py - download json and all full-size images from a thread
from __future__ import print_function
import basc_py4chan
import sys
import os
import requests
import json
def mkdirs(path):
"""Make directory, if it doesn't exist."""
if not os.path.exists(path):
os.makedirs(path)
de... |
/* URL to get Data withPagination
KO ERVIN: http://10.0.112.164:8081/getUnitList
WILB :http://10.0.112.246:8081/getUnitList */
//MASTER UNIT
var url_getListByPaging="https://api.docnet.id/getUnitList";
//URL TAMBAH UNIT
var url_insertMasterUnit="https://api.docnet.id/newUnit";
//URL AKTIF/... |
import os
from posixpath import basename
from urllib.parse import urlparse
from .common.spiders import BaseDocumentationSpider
from typing import Any, List, Set
def get_images_dir(images_path: str) -> str:
# Get index html file as start url and convert it to file uri
dir_path = os.path.dirname(os.path.real... |
# This file was automatically created by FeynRules 2.3.36
# Mathematica version: 11.3.0 for Linux x86 (64-bit) (March 7, 2018)
# Date: Wed 24 Feb 2021 15:56:08
from object_library import all_couplings, Coupling
from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
GC_1 = Coupling(name =... |
const { QuestionBank } = require('../../models')
module.exports = async (req,res,next) => {
try {
const id = req.params.id
const title = req.body.title
const findOne = await Subject.findOne({where: {title}})
if (findOne) {
const SubjectId = findOne.id
const objQuestion = {
questio... |
import gym
import tensorflow as tf
#import tensorflow.compat.v1 as tf
#tf.disable_v2_behavior()
import numpy as np
from collections import deque
import trfl
class QNetwork:
def __init__(self, name, learning_rate=0.01, state_size=20,
action_size=10, hidden_size=128, hidden_size_1=64, hidden_size_2... |
export default [
{ code: 'af', name: 'Afrikaans' },
{ code: 'sq', name: 'Albanian' },
{ code: 'am', name: 'Amharic' },
{ code: 'ar', name: 'Arabic' },
{ code: 'hy', name: 'Armenian' },
{ code: 'az', name: 'Azerbaijani' },
{ code: 'eu', name: 'Basque' },
{ code: 'be', name: 'Belarusian' },
{ code: 'bn'... |
const config = require('better-config');
config.set('../config.json');
const redis = require('../src/daos/impl/redis/redis_client');
const client = redis.getClient();
const testSuiteName = 'Basic';
const testPlanets = [
'Mercury',
'Mercury',
'Venus',
'Earth',
'Earth',
'Mars',
'Jupite... |
from functools import wraps
def decorator_name(func):
@wraps(func)
def wrapper(*args, **kwargs):
# 1. Code to execute BEFORE calling the decorated function.
# 2. Call the decorated function as required, returning its
# results if needed.
return func(*args, **kwargs)
... |
"""
Freckle client implementation.
Idea stolen from here:
https://github.com/sarumont/py-trello/blob/master/trello/__init__.py#L108
"""
import json
import requests
from . import __version__
from . import exceptions
class FreckleClient(object):
"""Simple client implementation to fetch json data from the v1 API... |
import os
from dynamorm.model import DynaModel
from dynamorm.signals import model_prepared
if 'marshmallow' in (os.getenv('SERIALIZATION_PKG') or ''):
from marshmallow.fields import String
else:
from schematics.types import StringType as String
def test_model_prepared():
def receiver(model):
rec... |
import json
from django.test import TestCase
from suggestion.models import Study
from suggestion.models import Trial
from suggestion.models import TrialMetric
from suggestion.early_stop_algorithm.early_stop_first_trial import (
EarlyStopFirstTrialAlgorithm,
)
class EarlyStopFirstTrialAlgorithmTest(TestCase):
... |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 19 02:10:58 2018
@author: WPF95
"""
from __future__ import print_function
import billboard
import pandas as pd
import spotipy
import sys
import spotipy.util as util
import os
from spotipy.oauth2 import SpotifyClientCredentials
import time
import json
... |
/*
* Copyright (c) 2014-2016 Alibaba Group. All rights reserved.
* License-Identifier: Apache-2.0
*
* 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... |
#!/usr/bin/python3
# -*- mode: python; coding: utf-8 -*-
"""Topological sorting."""
from dsapy.algs.error import Error
import collections
class CycleError(Error):
pass
class _NodeInfo(object):
def __init__(self):
self.n_parents = 0
self.children = []
def __repr__(self):
retur... |
# Copyright The PyTorch Lightning team.
#
# 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 i... |
function jsonp(app, opts = {}) {
let callback = opts.callback || 'callback';
app.context.jsonp = function(obj = {}) {
let ctx = this;
if (Object.prototype.toString.call(obj).toLowerCase() === '[object object]') {
let jsonpStr = `;${callback}(${JSON.stringify(obj)})`;
// 用text/javascript,让请求支持跨... |
#!/usr/bin/env python
from ansible.module_utils.hashivault import hashivault_argspec
from ansible.module_utils.hashivault import hashivault_auth_client
from ansible.module_utils.hashivault import hashivault_init
from ansible.module_utils.hashivault import hashiwrapper
import json
ANSIBLE_METADATA = {'status': ['stable... |
import numpy as np
import util
@util.dec.print_test
def test_double():
a = np.ones((3, 3), 'int')
b = util.dtype.double(a)
np.testing.assert_equal(b.dtype, np.dtype('float64'))
if util.mod.is_main(__name__):
test_double()
|
from __future__ import print_function
import sys
sys.path.append('..')
sys.path.append('/usr/share/armory')
import getpass
import os
from armoryengine import *
# Use the parseDownloadList from verify script
from extras.verify_dl_list import *
wltfile = open(os.path.join(ARMORY_HOME_DIR, 'signingwlt.txt'),'r')
wltna... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... |
from dylan.accessors import *
from dylan import summaries
@summaries.register('<dfmc-dood>', 'dfmc-namespace', 'dfmc-namespace')
def dfmc_dood_summary(value, internal_dict):
dood_name = dylan_slot_element_by_name(value, 'dood-name')
return dylan_symbol_name(dood_name)
|
/* @flow */
import config from '../config'
import { warn } from './debug'
import { nativeWatch } from './env'
import { set } from '../observer/index'
import {
ASSET_TYPES,
LIFECYCLE_HOOKS
} from 'shared/constants'
import {
extend,
hasOwn,
camelize,
toRawType,
capitalize,
isBuiltInTa... |
# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
# File called _pytest for PyCharm compatability
import pytest
from eland.field_mappings import FieldMappings
from el... |
/* global document */
import React from 'react';
import {hydrate, render} from 'react-dom';
import FastClick from 'fastclick';
import App from './App';
import {initializeAnalytics} from '../app/analytics';
// load DevTools
import './DevTools';
// Remove the server-side injected CSS.
const jssStyles = document.getEl... |
const ModuleLoader = require("./loaders/modules")
const { EventEmitter } = require("events")
const Logger = require("./Logger")
const fs = require("fs")
const path = require("path")
const electron = require("electron")
const fetch = require("node-fetch").default
const uuid = require("uuid/v4")
const isPackaged = elect... |
/*!!!!!!!!!!!Do not change anything between here (the DRIVERNAME placeholder will be automatically replaced at buildtime)!!!!!!!!!!!*/
import NodeDriver from 'shared/mixins/node-driver';
// do not remove LAYOUT, it is replaced at build time with a base64 representation of the template of the hbs template
// we do this... |
(function() {var implementors = {};
implementors["nom"] = [{text:"impl<E: <a class=\"trait\" href=\"nom/lib/std/hash/trait.Hash.html\" title=\"trait nom::lib::std::hash::Hash\">Hash</a>> <a class=\"trait\" href=\"nom/lib/std/hash/trait.Hash.html\" title=\"trait nom::lib::std::hash::Hash\">Hash</a> for <a cla... |
const Colors = {
accent:'#f15a24',
transparent: 'rgba(0, 0, 0, 0)',
white:'#fff',
darkTransparent:'rgba(0,0,0,0.9)',
}
export default Colors |
import aria2p
from JavHelper.core.ini_file import return_default_config_string
def get_aria2():
return aria2p.API(
aria2p.Client(
host=return_default_config_string('aria_address'),
port=int(return_default_config_string('aria_port') or 0),
secret=return_default_config_st... |
exports.up = function (knex) {
return knex.schema.alterTable('tokens', (table) => {
table.uuid('project').nullable().alter()
})
}
exports.down = function (knex) {
return knex.schema.alterTable('tokens', (table) => {
table.uuid('project').notNullable().alter()
})
}
|
from datetime import datetime
from django.core.management.base import BaseCommand
from viewer.helpers import UPDATED
class Command(BaseCommand):
args = "no args plz"
help = "Updates appcache"
cachefile = "/home/inopia/webapps/mlfw_static/dictionary.appcache"
def handle(self, *args, **options):
... |
$(function(){
// filter elements
var tahunajaran_id = $('#form-filter').find('#tahunajaran_id');
var semester_id = $('#form-filter').find('#semester_id');
var tingkat_id = $('#form-filter').find('#tingkat_id');
var kelas_id = $('#form-filter').find('#kelas_id');
var jenis_surat = $('#form-filt... |
# encoding: utf-8
'''**All lib functions should have tests**.
.. todo::
Write the tests for one ``ckan.lib`` module, figuring out the best way
to write lib tests. Then fill in this guidelines section, using the first
We probably want to make these unit tests rather than high-level tests and
mock out ``... |
describe('supportingmetadata', function() {
var scope, rootScope, compile;
var supportingMaterialsService, imageUtils;
beforeEach(angular.mock.module('corespring-templates'));
beforeEach(angular.mock.module('corespring-editor.directives'));
beforeEach(module(function($provide) {
imageUtils = {
... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 14, 2021 at 2:33:23 PM Mountain Standard Time
* Operating System: Version 14.4 (Build 18K802)
* Image Source: /System/Library/PrivateFrameworks/AppStoreKi... |
import React from 'react';
import PropTypes from 'prop-types';
import { BaseComponent, Typography, SvgIcon } from '../../shared';
class DashboardUserInfo extends BaseComponent {
renderItem = (label, value, isPoint = false) => {
return (
<div className='info-item'>
<Typography ... |
import sys
import time
from PIL import Image, ImageDraw
# from models.tiny_yolo import TinyYoloNet
from utils import *
from image import letterbox_image, correct_yolo_boxes
from darknet import Darknet
namesfile = None
def detect(cfgfile, weightfile, imgfile, conf_threshold, nms_threshold):
m = Darknet(cfgfile)
... |
!function(){function a(a,b,c){"undefined"==typeof c&&(c=b,optionsValues=void 0);var d="undefined"!=typeof a?a:b;if("undefined"==typeof d)return null;if("function"==typeof d){var e=[c];return c.geography&&(e=[c.geography,c.data]),d.apply(null,e)}return d}function b(a,b,c){return this.svg=n.select(a).append("svg").attr("... |
/*****************************************************************************
Copyright (c) 2011, Intel Corp.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source cod... |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WARNING: This file was auto-generated, any change will be overridden in next release. Please use configs/es6.conf.js then run "npm run convert". //
//////////////////... |
module.exports = app => {
const insert = (req, res) => {
const network = { ...req.body }
console.log({ ...network })
app.db('student_occupation_area')
.insert(network)
.returning('id')
.then(id => {
res.json({ id: id[0] })
... |
from django.utils.translation import ugettext_lazy as _
CRITERIA_CHOICES = (
(1, _('High')),
(2, _('Good')),
(3, _('Medium')),
(4, _('Low')),
)
|
import pytest
from endex import cx, settings
from endex.utils import factories, sqlutils
@pytest.fixture(scope='function')
def connection():
"""
This fixture returns a connection to the test database.
Tables are created before the connection is returned.
Returns:
psycopg2.connection: A connec... |
import handler from "./libs/handler-lib";
import dynamoDb from "./libs/dynamodb-lib";
export const main = handler(async (event, context) => {
const params = {
TableName: process.env.tableName,
// 'KeyConditionExpression' defines the condition for the query
// - 'userId = :userId': only return items with ... |
# Copyright 2013 Intel Corporation
# 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 require... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var Class = require('../../utils/Class');
var CONST = require('../../const');
var File = require('../File');
var FileTypesManager = req... |
const controller = {};
const addKategori = require("../service/kategori/addKategori");
const getKategori = require("../service/kategori/getKategori");
const editKategori = require("../service/kategori/editKategori");
controller.addKategori = (req, res) => {
const validation = [];
let data = req.body;
if (!data.... |
import io
import logging
import operator
import os
import shutil
import subprocess # nosec
import tempfile
from functools import reduce
import yaml
from checkov.common.output.report import Report
from checkov.common.runners.base_runner import BaseRunner, filter_ignored_paths
from checkov.helm.registry import registr... |
Trex.I.Processor.TridentP = {
};
|
/**
* 系统常量定义
*
* @author wengwenhui
* @date 2018年4月20日
*/
(function () {
'use strict';
angular.module('adminApp')
.constant('contextRoot', {
flowService: 'http://work.plumdo.com/flow-service',
identityService: 'http://work.plumdo.com/identity-service',
formService: 'http://work.plumdo.co... |
"""Lie groups."""
import geomstats.backend as gs
import geomstats.riemannian_metric as riemannian_metric
from geomstats.invariant_metric import InvariantMetric
from geomstats.manifold import Manifold
def loss(y_pred, y_true, group, metric=None):
"""
Loss function given by a riemannian metric.
"""
i... |
/*
* Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use th... |
import numpy as np
import time
import copy
def calculate_mean_prediction_error(env, action_sequence, models, data_statistics):
model = models[0]
# true
true_states = perform_actions(env, action_sequence)['observation']
# predicted
ob = np.expand_dims(true_states[0],0)
pred_states = []
fo... |
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 11:44:35 AM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/PrivateFrameworks/StoreKitUI.framework/StoreKitUI
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by E... |
# -*- coding: utf-8 -*-
# Copyright (c) 2018, frappe and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestMeeting(unittest.TestCase):
pass
|
from typing import Any, Optional
import os, time
from sqlalchemy.sql.expression import table
from sqlalchemy.sql.operators import ColumnOperators
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import Session
from sqlalchemy.orm import declarative_base, relationship, ba... |
""" Scripts for validation """
from __future__ import division
import logging
import copy
import matplotlib.pyplot as pl
import numpy as np
from sklearn.metrics import explained_variance_score, r2_score
from revrand.metrics import lins_ccc, mll, msll, smse
from uncoverml.models import apply_multiple_masked
from unc... |
from __future__ import annotations
import importlib
import abc
from collections.abc import Generator
import dataclasses
from typing import TYPE_CHECKING
import unicorn
from megastone.util import NamespaceMapping
if TYPE_CHECKING:
from megastone.arch import Architecture
INVALID_REG_NAMES = ['invalid']
@datac... |
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notic... |
"""This module contains the general information for FabricLanPinGroup ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class FabricLanPinGroupConsts():
INT_ID_NONE = "none"
POLICY_OWNER_LOCAL =... |
/* Copyright (c) 2018 ARM Limited
*
* SPDX-License-Identifier: Apache-2.0
*
* 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
*
* Unle... |
from typing import Dict, Sequence
def freq_table(freqtable, n: int, max_number_to_print: int) -> Sequence[Dict]:
"""Render the rows for a frequency table (value, count).
Args:
freqtable: The frequency table.
n: The total number of values.
max_number_to_print: The maximum number of observati... |
import os
from abc import ABC
import numpy as np
from algorithm.nic_nes.optimizers import SGD, Adam
from algorithm.tools.experiment import Experiment, logger
from algorithm.tools.utils import Config, mkdir_p
class NESExperiment(Experiment, ABC):
"""
Subclass for NIC-NES experiment
"""
def __init__(... |
/*
* This header is generated by classdump-dyld 1.5
* on Friday, April 30, 2021 at 11:37:15 AM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/PrivateFrameworks/EmailFounda... |
from girder_client import GirderClient
import json
import os
import pymongo
import sys
if len(sys.argv) < 2:
print "%s /path/to/arborCollections" % sys.argv[0]
print "This should be the root of a directory tree containing .json analysis files"
sys.exit(1)
arbor_collections_path = sys.argv[1]
# Authenticat... |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'showblocks', 'uk', {
toolbar: 'Показувати блоки'
});
|
# Copyright 2010-2011 OpenStack Foundation
# Copyright 2012-2013 IBM Corp.
# 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/li... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
__VERSION__="ete2-2.2rev1056"
# -*- coding: utf-8 -*-
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://ete.cgenomics.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the t... |
from . import load_template
from . import load_option
class Template:
def __get__(self, obj, objtype=None):
path = obj.template_path
if path:
return load_template(path)
else:
return {}
class Html:
template = Template()
def __init__(self, template_path, co... |
// I had made this a function (constructor) but there wasn't really any reason.
Rx.CoreType = {};
// Simple types
Rx.CoreType.allType = function (opt, rx) {
if (! opt.of) throw new Rx.Error('no of given for //all');
if (opt.of.length == 0)
throw new Rx.Error('no alternatives given for //all of');
this.al... |
import unittest
from masonite.helpers import dot, Dot as DictDot
class TestDot(unittest.TestCase):
def test_dot(self):
self.assertEqual(dot('hey.dot', compile_to="{1}[{.}]"), "hey[dot]")
self.assertEqual(dot('hey.dot.another', compile_to="{1}[{.}]"), "hey[dot][another]")
self.assertEqual... |
from django.contrib.auth.models import AbstractUser
from django.db import models
from rest_framework.exceptions import ValidationError
from core.models import TimeStampedModel as CoreModel
from location.models import Locate
def content_file_name(instance, filename):
return '/'.join(['avatars', f'{instance.userna... |
import glob
import os
import pytest
from selenium import webdriver
from webdriver_manager.opera import OperaDriverManager
from webdriver_manager.utils import os_type as get_os_type
def test_opera_driver_manager_with_correct_version():
driver_path = OperaDriverManager("v.2.45").install()
assert os.path.exist... |
from domainmodel.review import Review
from domainmodel.movie import Movie
from domainmodel.user import User
def test_basic():
user1 = User('Martin', 'pw12345')
assert user1.username == "martin"
assert user1.__repr__() == "<User martin>"
def test_add_movie():
movie = Movie("Shrek but every time he ta... |
import unittest
from pythran.tests import TestEnv
import numpy
from pythran.typing import NDArray
@TestEnv.module
class TestNumpyLinalg(TestEnv):
def test_linalg_norm0(self):
self.run_test("def linalg_norm0(x): from numpy.linalg import norm ; return norm(x)", numpy.arange(6.), linalg_norm0=[NDArray[float... |
import random
import numpy as np
import rlcard
from gym import spaces
from pettingzoo import AECEnv
from pettingzoo.utils import wrappers
from pettingzoo.utils.agent_selector import agent_selector
from .rlcard_base import RLCardBase
def env(**kwargs):
env = raw_env(**kwargs)
env = wrappers.CaptureStdoutWra... |
export const TaskStatus = {
TO_DO: 'toDo',
IN_PROGRESS: 'inProgress',
COMPLETE: 'complete'
}
|
import request from '@/utils/request';
export async function studentPaperDetailForSdt (params) {
return request({
url: '/api/exam/paper/studentPaperDetailForSdt',
method: 'post',
data: params,
})
}
|