text stringlengths 3 1.05M |
|---|
from typing import Tuple, FrozenSet
from collections import Iterable
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_mak... |
import React from 'react'
import { Redirect as ReactRouterRedirect } from 'react-router-dom'
import Head from 'react-helmet'
//
function join(a, b) {
var trimmedA = a.endsWith('/') ? a.slice(0, -1) : a;
var trimmedB = b.startsWith('/') ? b.slice(1) : b;
return trimmedA + '/' + trimmedB;
}
export default class ... |
"""Game class to represent 2048 game state."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorforce.environments import Environment
import numpy as np
ACTION_NAMES = ["left", "up", "right", "down"]
ACTION_LEFT = 0
ACTION_UP = 1
ACTION_RIGHT = ... |
"""
Some functions internally use by SortingComparison.
"""
import numpy as np
import pandas as pd
from joblib import Parallel, delayed
from scipy.optimize import linear_sum_assignment
def count_matching_events(times1, times2, delta=10):
"""
Counts matching events.
Parameters
----------
times1: ... |
'use strict';
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
mode: 'production',
context: `${__dirname}/src/`,
entry: {
phaser: './phaser.js',
'phaser.min': './p... |
// SPDX-License-Identifier: GPL-2.0-only
/*
* DVB USB library - provides a generic interface for a DVB USB device driver.
*
* dvb-usb-init.c
*
* Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
*
* see Documentation/media/dvb-drivers/dvb-usb.rst for more information
*/
#include "dvb-usb-comm... |
//// [TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js]
var A;
(function (A) {
var Point = (function () {
function Point() {
}
return Point;
})();
A.Point = Point;
})(A || (A = {}));
var A;
(function (A) {
// expected error
var Point = (function () {
... |
""" texasbbq """
from setuptools import setup
from os import path
# io.open is needed for projects that support Python 2.7
from io import open
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_descript... |
from .base import *
DEBUG = True
TORCHSERVE_URL = "http://127.0.0.1:8080/"
ALLOWED_HOSTS = [r'*']
CORS_ALLOW_ALL_ORIGINS = True
WSGI_APPLICATION = 'pwb.wsgi.dev.application'
|
if (process.env.NODE_ENV !== "production") {
require("dotenv").config();
}
const express = require("express");
const db = require("./config/database");
const router = require("./routes");
const errorHandler = require("./middlewares/errorhandler");
const app = express();
db();
app.use(express.json());
app.use(expr... |
# test_writers.py
from __future__ import unicode_literals
import io
import csv
import pytest
from csv23.openers import open_writer
from csv23.writers import writer, UnicodeTextWriter, UnicodeBytesWriter
from csv23._common import is_8bit_clean
if not pytest.csv23.PY2:
from csv23.writers import _UnicodeTextWrite... |
// pages/articles/articles.js
var config = require("../../articles.js");
var app = getApp();
Page({
/**
* Page initial data
*/
data: {
},
/**
* Lifecycle function--Called when page load
*/
onLoad: function (options) {
this.title = options.type || 'Event Details';
var that = this;
... |
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "test_tf2"
PROJECT_SPACE_DIR = "/home/... |
/* jshint esnext: true */
var logger = require('winston');
var crypto = require('crypto');
var fs = require('fs');
var getConfiguration = function(req, callback){
var appConfig = req.app.locals.config;
var configurationName = req.params.configName;
var storeType = appConfig.dataStore.type;
var dataSt... |
from . import get # noqa
|
"""empty message
Revision ID: 1ba46280f27d
Revises: c8bad06b9d98
Create Date: 2018-08-14 10:31:01.636052
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1ba46280f27d'
down_revision = 'c8bad06b9d98'
branch_labels = None
depends_on = None
def upgrade():
# ... |
import React, { Component } from 'react'
class Bundle extends Component {
state = {
// short for "module" but that's a keyword in js, so "mod"
mod: null
}
componentWillMount() {
this.getComponent(this.props)
}
componentWillReceiveProps(nextProps) {
if (nextProps.load !== this.props.load) {
... |
#ifndef RecoTBCalo_EcalTBTDCReconstructor_EcalTBH2TDCRecInfoAlgo_HH
#define RecoTBCalo_EcalTBTDCReconstructor_EcalTBH2TDCRecInfoAlgo_HH
#include "TBDataFormats/EcalTBObjects/interface/EcalTBEventHeader.h"
#include "TBDataFormats/HcalTBObjects/interface/HcalTBTiming.h"
#include "TBDataFormats/EcalTBObjects/interface/Ec... |
import { NotImplementedError } from '../extensions/index.js';
/**
* There's a list of file, since two files cannot have equal names,
* the one which comes later will have a suffix (k),
* where k is the smallest integer such that the found name is not used yet.
*
* Return an array of names that will be given to th... |
// var iframe = document.getElementById('the-iframe');
// var style = document.createElement('style');
// style.textContent =
// 'body {' +
// ' background-color: red;' +
// '}'
// ;
// iframe.contentDocument.head.appendChild(style); |
(window.webpackJsonp=window.webpackJsonp||[]).push([[138],{272:function(e,t,i){"use strict";i.r(t),i.d(t,"frontMatter",(function(){return s})),i.d(t,"metadata",(function(){return l})),i.d(t,"rightToc",(function(){return c})),i.d(t,"default",(function(){return p}));var n=i(2),r=i(9),a=(i(0),i(327)),o=i(329),s={id:"verif... |
/**
* @module
*/
/* eslint-disable require-await */
import { matchPattern } from "../../tools/matchpattern.js";
/**
* L'expression rationnelle pour extraire l'URL de la vidéo.
*
* @constant {RegExp}
*/
const URL_REGEXP = /sources: \["(?<sources>[^"]+)",/u;
/**
* Extrait les informations nécessaire pour lire u... |
#!/usr/bin/python
"""
history.py: A LIBRARY for history evaluation.
UI details should go in core/ui.py.
"""
from __future__ import print_function
import sys
from _devbuild.gen.id_kind_asdl import Id
from core import util
#from core.util import log
from frontend.match import HISTORY_LEXER
from frontend import reader
... |
/* STLport configuration file
* It is internal STLport header - DO NOT include it directly
*/
#define _STLP_COMPILER "Symantec"
/* if not using maximum ANSI compatibility ( -A -Ab -Aw),
* uncomment the following two lines:
*/
/*# define _STLP_NO_BOOL 1 */
/*# define _STLP_NO_WCHAR_T 1 */
/* TODO: Check that th... |
# O(logN) / O(1)
class Solution:
def searchInsert(self, nums: List[int], target: int) -> int:
l, r = 0, len(nums)
while l < r:
m = l + (r - l) // 2
if nums[m] >= target:
r = m
else:
l = m + 1
return l |
(window.webpackJsonp=window.webpackJsonp||[]).push([[289],{352:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return p}));var r=n(3),a=n(7),o=(n(0),n(442)),i={id:"docker",title:... |
import logging
import os
from string import Template
import six
from .errors import ConfigurationError
log = logging.getLogger(__name__)
def interpolate_environment_variables(config):
mapping = BlankDefaultDict(os.environ)
return dict(
(service_name, process_service(service_name, service_dict, mapp... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[106],{
/***/ "./node_modules/@ionic/core/dist/esm/es5/build/39fhulxe.entry.js":
/*!***********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/es5/build/39fhulxe.entry.js ***!
\*******************... |
import argparse
import torch as t
from torch.utils.data import DataLoader
from data.voc_dataset import VOCDataset
from data.coco_dataset import COCODataset
from models.faster_rcnn import FasterRCNN
from models.feature_pyramid_network import FPN
from utils.config import opt
from utils.eval_tool import evaluate_v... |
define( [
"../var/document",
"../var/support"
], function( document, support ) {
( function() {
var div = document.createElement( "div" );
// Support: IE<9
support.deleteExpando = true;
try {
delete div.test;
} catch ( e ) {
support.deleteExpando = false;
}
// Null elemen... |
import { useEffect, useState } from "react"
import { CoveragePoolsFactory } from "../lib/coverage-pool"
const coveragePoolV1 = CoveragePoolsFactory.create()
const useCoveragePoolsAPY = () => {
const [isFetching, setIsFetching] = useState(true)
const [coveragePoolAPY, setCoveragePoolAPY] = useState([])
const [err... |
function openNav() {
document.getElementById("mySidenav").style.width = "28%";
document.getElementById("main").style.marginLeft = "30%";
document.getElementById("main").style.width = "64%";
document.getElementById("doc-button").style.display = "none";
//document.body.style.backgroundColor = "rgba(0,0,0,0.4)";... |
from django.shortcuts import render
from htmlmin.decorators import not_minified_response
from apps.utils.functions import parse_formatting
# Create your views here.
from .models import PrivacyPolicy, RobotsTxtModifications
def privacy_policy(request):
'''Privacy policy page'''
try:
content = Privacy... |
!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.ex... |
!function(t,e){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.4.1",settings:{active_class:"open",align:"bottom",is_hover:!1,opened:function(){},closed:function(){}},init:function(t,e,i){Foundation.inherit(this,"throttle"),this.bindings(e,i)},events:function(){var i=this,n=i.S;n(this.scope).off(".drop... |
from rich.console import Console, Group
from rich.markup import escape
from rich.text import Text
from rich.tree import Tree
from rich.table import Table
from sherlock.model import DIRECTORY_TYPE
from sherlock.model import KeywordTimings
def timings_to_table(timings):
timings_table = Table(title="Elapsed time")... |
# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
# Copyright (c) 2016, Gluu
#
# Author: Yuriy Movchan
#
import java
import sys
from javax.ws.rs.core import Response
from org.jboss.resteasy.client import ClientResponseFailure
from org.jboss.resteasy.cli... |
# coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... |
# 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... |
/**
* @template {T}
* @extends {Set<T>}
*/
class MySet extends Set {}
// MySet<number>
const mstNum = new MySet([1, 2, 3]);
// MySet<string>
const mstStr = new MySet(["str1", "str2"]);
|
# -*- coding: utf-8 -*-
import codecs
import os
import re
import setuptools
PACKAGES = setuptools.find_packages(where='src')
META_PATH = os.path.join('src', 'bio2bel_cmo', '__init__.py')
INSTALL_REQUIRES = [
'pybel_tools==0.4.3',
'click',
]
ENTRY_POINTS = {
'bio2bel': [
'cmo = bio2bel_cmo',
]... |
# -*- coding: utf8 -*-
"""
Copyright 2014-2016 Andreas Würl
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 ap... |
var LighthouseJson = require('./shared_json_code.js');
var $ = require('jquery');
//make the call to beacon
function GetJSONfromBeacon(unit, host, StartDate, EndDate, userId = 'notPassed', token, callback, progressCallBack, viewmodel) {
if (typeof viewmodel === 'undefined') //if they dont specify a viewmodel to loa... |
import time
import ujson
from typing import Any, Callable, Dict, List, Set, Text
from argparse import ArgumentParser
from django.core.management.base import CommandError
from django.db import connection
from zerver.lib.management import ZulipBaseCommand
from zerver.lib.topic_mutes import build_topic_mute_checker
fr... |
// eslint-disable-next-line no-unused-vars
import React from 'react';
import { DataTableContainer } from './DataTableContainer';
export default {
title: 'Elements|Data Table/Container',
component: DataTableContainer
};
export const field = () => (
<>
<DataTableContainer>
<p>Tabular co... |
#!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# 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 ... |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*global require, Microsoft, Windows, WinJS*/
var Deferred = require('./utility').Utility.Deferred;
var isPhone = WinJS.Utilities.i... |
Ext.data.JsonP.Ext_data_proxy_JsonP({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{"author":["Ed Spencer"]},"mixedInto":[],"uses":[],"aliases":{"proxy":["jsonp","scripttag"]},"parentMixins":["Ext.util.Observable"],"superclasses":["Ext.Base","Ext.data.proxy.Proxy","Ext.data.proxy.Ser... |
//# sourceMappingURL=NameMappable.js.map |
# encoding: utf-8
import os
import sys
import time
import random
import argparse
from collections import OrderedDict, defaultdict
import torch
import torch.utils.model_zoo as model_zoo
from engine.logger import get_logger
logger = get_logger()
model_urls = {
'resnet18': 'https://download.pytorch.org/models/resn... |
import graphene
from django.contrib.auth import get_user_model
from graphene_django import DjangoObjectType
from insta.models import Profile
class ProfileType(DjangoObjectType):
class Meta:
model = Profile
class UserType(DjangoObjectType):
class Meta:
model = get_user_model()
class Query(g... |
import subprocess
from shutil import copy
from typing import Tuple
from demisto_sdk.commands.common.tools import LOG_COLORS, print_color
from demisto_sdk.commands.format.format_constants import (
ERROR_RETURN_CODE, SKIP_VALIDATE_PY_RETURN_CODE, SUCCESS_RETURN_CODE)
from demisto_sdk.commands.format.update_generic_y... |
$(function () {
// ****************************************
// U T I L I T Y F U N C T I O N S
// ****************************************
// Updates the form with data from the response
function update_form_data(res) {
$("#supplier_id").val(res.id);
$("#supplier_name")... |
var user_status;
window.onload=function(){
startPartials();
load();
}
function load(){
$.ajax({
type: 'GET',
url: '/api/userStatus',
contentType: 'application/json',
dataType: 'json',
success: function(data){
console.log(data.result)
user_status = data.result.us... |
const express = require('express');
const cors = require('cors');
const app = express();
const path = require('path');
const githubUtil = require('./github-util');
const l = console.log;
// Enable CORS
app.use(cors());
// Serve static assets
// https://medium.com/@patriciolpezjuri/using-create-react-app-with-react-... |
import { graphql, useStaticQuery } from 'gatsby'
const useLogos = () => {
const data = useStaticQuery(graphql`
query {
allImageSharp: allFile(
filter: { sourceInstanceName: { eq: "logos" } }
sort: { order: ASC, fields: [name] }
) {
edg... |
/**
*
* MIT Free Software License
*
* Copyright (c) 2010 Susanna Kaukinen
*
* 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 righ... |
# 導入 GPIO 模塊庫
import RPi.GPIO as GPIO
from time import sleep
# 設置GPIO 17來驅動LED
GPIO_PIN=17
GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_PIN, GPIO.OUT)
for i in range(0,10):
GPIO.output(GPIO_PIN,1) # 打開引針17 – 3.3v
sleep(1) # 睡1秒
GPIO.output(GPIO_PIN,0) # 關閉引針17 – 0v
sleep(1) ... |
from __future__ import print_function, absolute_import, division
# Other imports
import co_simulation_ios.co_simulation_io_factory as io_factory
def CreateSolver(cosim_solver_settings, level):
return CoSimulationBaseSolver(cosim_solver_settings, level)
class CoSimulationBaseSolver(object):
"""The base class ... |
# Copyright (c) 2021 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 appli... |
var _body_8h =
[
[ "Body", "class_body.html", "class_body" ],
[ "BodyOptions", "struct_body_1_1_body_options.html", "struct_body_1_1_body_options" ],
[ "COLLIDE_EVENT_NAME", "_body_8h.html#a8e77963cfe9b1f2033206cc683335446", null ],
[ "AWAKE", "_body_8h.html#a14bfdbf06c4e5cb12479ff11e64ac44a", null ],
... |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# 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... |
/******************************************************************************
* Automatically generated file. Please don't change anything. *
*****************************************************************************/
#include <stdlib.h>
#include <lua.h>
#include <lauxlib.h>
#include "... |
"""
===================================================
01: Standard variational training for mixture model
===================================================
How to train a mixture of multinomials.
"""
import bnpy
import numpy as np
import os
from matplotlib import pylab
import seaborn as sns
FIG_SIZE = (3, 3)
SMA... |
import json
import pytest
import random
import re
import string
import threading
import time
from multiprocessing.dummy import Pool
from helpers.client import QueryRuntimeException
from helpers.cluster import ClickHouseCluster
from helpers.test_tools import TSV
cluster = ClickHouseCluster(__file__)
node1 = cluster.ad... |
let data = [
{img: "./0501/ar5101/ar/001.png",patt:"./0501/ar5101/ar/001.patt",},
{img: "./0501/ar5101/ar/002.png",patt:"./0501/ar5101/ar/002.patt",},
{img: "./0501/ar5101/ar/003.png",patt:"./0501/ar5101/ar/003.patt",},
{img: "./0501/ar5101/ar/004.png",patt:"./0501/ar5101/ar/004.patt",},
{img: "./0501/ar5106/ar/1.p... |
import os
import json
from six.moves import urllib
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def get_latest():
data = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/k... |
import mongoose from "mongoose"
const SellerSchema = new mongoose.Schema({
userId: { type: String, required: true },
id: String, // Seller ID
storeName: { type: String, required: true },
storeEmail: { type: String, required: true },
storeImage: { type: String, required: true },
})
module.exports =
mongoos... |
# -*- coding: utf-8 -*-
from redis import StrictRedis
import redis_lock
import time
redis = StrictRedis(host="127.0.0.1",
port=6379,
db=0)
with redis_lock.Lock(redis, "test") as lock:
print("获取锁")
time.sleep(30)
|
# coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... |
import {StyleSheet} from 'react-native';
export default StyleSheet.create({
container: {
flex: 1,
//alignItems: 'center',
//justifyContent: 'center'
//marginTop: '20%',
},
back:{
position: 'absolute',
left: '10%',
top: '40%',
},
navBar: {
alignItems: 'center',
justifyConte... |
from .utils import (
load_data,
split_data,
number_of_features,
target_distribution,
drop_nan_target_rows
)
from .data_splitters import (
TrainingValidationSplit,
TimeSeriesSplit,
BalancedClassificationDataCVSplit,
BalancedClassificationDataTVSplit,
KMeansSMOTETVSplit,
KMeans... |
'use strict';
const chai = require('chai');
const expect = chai.expect;
const Support = require('./support');
const { Transaction } = require('sequelize/lib/transaction');
const current = Support.sequelize;
const delay = require('delay');
if (current.dialect.supports.transactions) {
describe(Support.getTestDiale... |
# Copyright (c) 2021, instrument and Contributors
# See license.txt
# import frappe
import unittest
class TestEngineeringRevision(unittest.TestCase):
pass
|
import {
CLEAR_CONTACT_ERRORS,
CLEAR_SUBSCRIBE_ERRORS,
CONTACT_QUERY_CREATE,
CONTACT_QUERY_FAILED,
CONTACT_QUERY_SUCCESS,
SUBSCRIBING_NEWSLETTER,
SUBSCRIBING_NEWSLETTER_FAILED,
SUBSCRIBING_NEWSLETTER_SUCCESS,
} from "../actionTypes/contactActionTypes"
const contactInitialState = {
creatingContact: fa... |
var config = {
/*
|--------------------------------------------------------------------------
| Trust Proxy
|--------------------------------------------------------------------------
|
| Indicates the app is behind a front-facing proxy, and to use the
| X-Forwarded-* headers to dete... |
# -*- coding: utf-8 -*-
from . import table
from . import plot
from . import chart
|
import React from "react";
import Events from "./events/Events";
import News from "./news/News";
import Situation from "./context-sensitive/Situation";
import ManagerInfo from "./containers/ManagerInfoContainer";
import Header from "./containers/HeaderContainer";
import HeaderedPage from "./ui/HeaderedPage";
import Bu... |
import pyperclip
def make_map(start,end):
"""
make_map(0x2800,0x2840)
>>>Output string copied to clipboard
(⠀⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿)
(Copied to clipboard, paste it into a txt file and use utf-8 encoding.)
"""
i= start
string=""
whi... |
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
export default {
methods: {
genTHead: function genTHead() {
var _this = this;
if (this.hideHeaders) retu... |
# Copyright (c) 2018, NVIDIA CORPORATION.
import numpy as np
import pandas as pd
import pytest
from cudf.dataframe import DataFrame, Series
from cudf.dataframe.index import as_index
from cudf.tests.utils import assert_eq
def test_categorical_basic():
cat = pd.Categorical(["a", "a", "b", "c", "a"], categories=["... |
#%%
from networkx.classes.function import non_edges
import numpy as np
from sklearn.utils import check_random_state
from graspologic.simulations import er_np
from graspologic.plot import heatmap
from numpy.random import default_rng
from numpy.random import SeedSequence
from numba import jit
n = 20
p = 0.1
A = er_np... |
/**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive ... |
#include "u_log.h"
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
/**
* @file u_log.h
* @brief Implements log file.
* @author Tortrat-Gentilhomme Nicolas
* @author Raymond Nicolas
* @author Runarvot Loïc
* @version 0.1
* @date 2015-02-09
*/
int write_log(const char *msg) {
return dwrite_log... |
import unittest
import battlesnake
from move import Move
from grid import Grid
import copy
import pathfinding
class TestBattlesnake(unittest.TestCase):
def setUp(self):
self.body = [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0}
]
self.board = {... |
var electronInstaller = require('electron-winstaller');
// In this case, we can use relative paths
var settings = {
// Specify the folder where the built app is located
appDirectory: __dirname,
// Specify the existing folder where
outputDirectory: './installers',
// The name of the Author ... |
import * as THREE from 'three';
// import {V_000, V_111} from 'ethereal'
export class DemoBase {
constructor() {
this.container = new THREE.Object3D;
this.view = new THREE.Object3D;
}
}
|
webpackJsonp([22,45],{4:function(e,t,a){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n,o=a(10),r=i(o),A=a(9),s=i(A),l=a(3);t.default=(n={data:function(){return{}},mounted:function(){this.getUserInfo()}},(0,r.default)(n,"mounted",function(){}),(0,r.... |
/*
Massively by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
var $window = $(window),
$body = $('body'),
$wrapper = $('#wrapper'),
$header = $('#header'),
$main = $('#main');
// Breakpoints.
breakpoints({
defaul... |
// Author: Jonas Byström
// Copyright (c) Pixel Doctrine
#pragma once
#include "../../lepra/include/lepra.h"
#include "uimaterial.h"
#include "uiopenglrenderer.h"
#include <list>
namespace uitbc {
class OpenGLRenderer;
class OpenGLMaterial: public Material {
typedef Material Parent;
public:
OpenGLMate... |
import numpy as np
import matplotlib.pyplot as plt
plt.ion()
class TwoD_plots:
def __init__(self, target_lnpdf, min_x, max_x, num_x, min_y, max_y, num_y):
np.seterr(under="warn")
self.target_lnpdf = target_lnpdf
self.min_x = min_x
self.max_x = max_x
self.min_y = min_y
... |
//
// Copyright 2017 Pixar
//
// 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 wri... |
/*
* Kendo UI v2014.3.1119 (http://www.telerik.com/kendo-ui)
* Copyright 2014 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the tria... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.test import TestCase
from lck.django.common.models import MACAddressField
from powerdns.models import Domain, Record
from ralph.disco... |
/**
* detect IE
* returns version of IE or false, if browser is not Internet Explorer
*/
function detectIE() {
//http://stackoverflow.com/questions/19999388/check-if-user-is-using-ie-with-jquery
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or old... |
//
// AppDelegate.h
// MapView
//
// Created by Camilo Jimenez Ibañez on 2/04/14.
// Copyright (c) 2014 Camilo Jimenez Ibañez. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from nxxcgram.users import models as user_models
from taggit.managers import TaggableManager
from django.contrib.humanize.templatetags.humanize import naturaltime
# Create your models here
@python_2_unicode_compatible
class Tim... |
$(window).on("load",function(){var a="#324ECF",e="#28C76F",o="#EA5455",i="#FF9F43",r="#1E1E1E",t="#dae1e7",l="#f3f3f3",s="#fff",n=[a,e,o,i,r],d=$("#line-chart"),p=(new Chart(d,{type:"line",options:{responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},hover:{mode:"label"},scales:{xAxes:[{display:!0,gridLines:{co... |
/**
* aaronpero-button
*/
import $ from 'jquery';
// Module dependencies
import 'protons';
// Module template
import './_aaronpero-button.twig';
import './index.css';
export const name = 'aaronpero-button';
export const defaults = {
dummyClass: 'js-aaronpero-button-exists',
};
/**
* Components may need to ru... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |