text stringlengths 3 1.05M |
|---|
import sqlalchemy as sa
from sqlservice import event
from .fixtures import Model, parametrize
class EventModel(Model):
__tablename__ = "test_events"
id = sa.Column(sa.types.Integer(), primary_key=True)
@event.on_set("id")
def on_set(self, value, oldvalue, initator):
pass
@event.on_app... |
#!/usr/bin/env python
# Copyright 2018 Palo Alto Networks, 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... |
#-----------------------------------------------------------------------------
# Runtime: 100ms
# Memory Usage:
# Link:
#-----------------------------------------------------------------------------
class Solution:
def convert(self, s, numRows):
"""
:type s: str
:type numRows: int
... |
# the script that will be feeded to sbatch
# note: the placeholders {arrayTaskIds} and {script} will be replaced automatically
batchScript = '''#!/bin/bash
#SBATCH --time=4:00:00
#SBATCH --mem=8G
##SBATCH --partition=batch
#SBATCH --partition=short
##SBATCH --partition=gpushort
##SBATCH --gres=gpu:teslak80:1
##SBATCH... |
from transmute_core.exceptions import APIException, SerializationException
def test_serialization_error_is_api_exception():
"""
a serialization exception should
be considered in the default exceptions
of the api.
"""
assert isinstance(SerializationException(""), APIException)
|
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "uik/uik.h"
void main() {
int err;
// int fd = connect_to_named_socket("fabrick");
// if (fd < 0) {
// perror("asd");
// return printf("Err... |
/**
* Note that this script is intended to be included at the *end* of the document, before </body>
*/
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return... |
import cleanBasicHtml from '@tryghost/kg-clean-basic-html';
/* global DOMParser, window */
function createParserPlugins(_options = {}) {
const defaults = {};
const options = Object.assign({}, defaults, _options);
if (!options.createDocument) {
const Parser = typeof DOMParser !== 'undefined' && DOMParser || ... |
# Credits: @mrismanaziz
# Thanks To @tofik_dn || https://github.com/tofikdn
# FROM Zee-Userbot <https://github.com/kykoubot/Zee-Userbot>
# t.me/Dbzea & t.me/Storezeastore
from pytgcalls import StreamType
from pytgcalls.types import Update
from pytgcalls.types.input_stream import AudioPiped, AudioVideoPiped
from pytgca... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Part of pymzml test cases
"""
# import sys
# import os
# # import PyNumpress
# import pymzml
# import pymzml.decoder as decoder
# import time
# import unittest
# import numpy as np
# # import PyNumpress as pnp
# import zlib
# from base64 import b64encode as b64enc
# im... |
from setuptools import setup, find_packages
install_requires = [
'django',
]
version = "0.3.1"
setup(name='django-medusa-unstoppable',
version=version,
description='A Django static website generator. Fork of django-medusa',
author='Tobias Schulmann', # update this as needed
author_email='tobiassc... |
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/ResponseKit.framework/ResponseKit
*/
@interface RKSentenceClassifier_zh_Hans_CN : RKSentenceClassifier
- (id)addSentenceTerminatorQuestion:(id)arg1;
- (id)alternativeConjunctions;
- (void)analyzeSentence;
- (id)classifySentence;
@end
|
/**
* @module ol/CollectionEventType
*/
/**
* @enum {string}
*/
const CollectionEventType = {
/**
* Triggered when an item is added to the collection.
* @event module:ol/Collection.CollectionEvent#add
* @api
*/
ADD: 'add',
/**
* Triggered when an item is removed from the collection.
* @even... |
from typing import Text
class Tag(str):
def __str__(self) -> Text:
return ":%s" % super().__str__()
def __repr__(self) -> Text:
return "%s('%s')" % ('Tag', super().__repr__())
|
export const removeAReportAPI = async (reportId) => {
const response = await fetch(`/api/board/1/report/${reportId}`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
},
})
if (!response.ok) return null
if (response.redirected) location.href = response.url
const { success... |
#import <Flutter/Flutter.h>
@interface QrCodeScanner2Plugin : NSObject<FlutterPlugin>
@end
|
import json
def lambda_handler(event, context):
try:
body = json.loads(event['body'])
except:
return {
"statusCode": 400,
"body": json.dumps({'message': 'Unable to parse hasura event'})
}
message = 'Not able to process request'
data = body['event']['dat... |
import sys
import os
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname('__file__'))))
sys.path.insert(0, ROOT_DIR)
import logging
import torch
from torch.utils.data import DataLoader, Subset, ConcatDataset
from models.mask_r_cnn_model import get_mask_r_cnn
from data.mask_r_cnn_dataset import Pe... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
# -*- coding: utf-8 -*-
#
# 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
#... |
const path = require('path');
const fs = require('fs-extra');
const minimist = require('minimist');
const params = minimist(process.argv.slice(2));
const isSimple = params.simple;
const simplePath = path.resolve(
__dirname,
'../simple-pro-template/arco-design-pro-next'
);
const templatePath = path.resolve(__dirn... |
# Copyright 2010 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
import datetime
startDate = datetime.date(2020,8,17)
delta = datetime.timedelta(days=270)
endDate = startDate + delta
print(endDate)
|
# Copyright 2017 Bloomberg Finance L.P.
#
# 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 ... |
#!/usr/bin/env python3
from Crypto.Cipher import AES
key = b"\x71\x96\xab\xa1\x5d\x50\x37\x04\xfe\x2e\xf8\x14\xad\xbc\x4a\xb3"
data = [
b"\xbe\x43\x1a\x3a\x1a\xc7\x93\xee\x5a\x7f\x77\x3c\x6e\x51\x0c\x20",
b"\xec\x7b\x87\x2c\xcd\x83\x3d\xaa\x96\xb2\x63\xbc\x21\x62\x94\x42",
]
iv = b"\x00" * 16
aes = AES.new(k... |
# NOTE: training using SumTreeReplayBuffer fails to converge
# Source: https://raw.githubusercontent.com/rlcode/per/master/SumTree.py
import numpy
# SumTree
# a binary tree data structure where the parent’s value is the sum of its children
import torch
from src.v2_dqn.ReplayBuffer import Experience, device
class ... |
'use strict'
const {
getNamedType,
print,
parse,
Kind
} = require('graphql')
const kEntityResolvers = Symbol('mercurius.entity-resolvers')
function getFieldType (schema, type, fieldName) {
return getNamedType(schema.getType(type).getFields()[fieldName].type)
}
function getDirectiveSelection (node, directi... |
from __future__ import unicode_literals
from django.db import models
from pygments.lexers import get_lexer_by_name
from pygments.formatters.html import HtmlFormatter
from pygments import highlight
class Sensors(models.Model):
switch = 'SW'
output = 'OU'
slider = 'SL'
sensor_types_choices = (
(... |
import torch
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import pickle
import torch.utils.data as torchdata
import matplotlib.patches as mpatches
import colorcet
from pathlib import Path
from torch import nn
from torch.nn import functional as F
from alr.utils import savefig
from alr.da... |
/**
* Copyright (c) 2014-present, Facebook, 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.
*
* @flow
*/
'use strict';
const path = require('path');
const {sync: spawnSync} = require('cross-spawn');
const ski... |
App({
onLaunch: function () {
//判断机型(适配iphoneX)
wx.getSystemInfo({
success: (res) => {
this.globalData.systemInfo = res;
if (res.model.search('iPhone X') != -1) {
this.globalData.isIphoneX = true
}
}
});
},
globalData: {
systemInfo: null,
userInfo: null,
version: "1.0.0",
isIphon... |
'use strict';
describe('clear-images', function() {
// TODO(ndhoule): Add tests
it('should pass a basic smoke test', function() {
require('../lib');
});
});
|
/* Test of <netinet/in.h> substitute.
Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program 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 of the License, or
(... |
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test read/write functionality for NITF driver.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
##########################################... |
/**
* @ngdoc controller
* @name Umbraco.NavigationController
* @function
*
* @description
* Handles the section area of the app
*
* @param {navigationService} navigationService A reference to the navigationService
*/
function NavigationController($scope, $rootScope, $location, $log, $q, $routeParams, $timeout... |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
import ggrc.builder
import ggrc.models
from ggrc.builder.json import publish
from ggrc.services.common import Resource
from mock ... |
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import lmfit
import scipy.stats
import scipy.optimize
minimize = lmfit.minimize
from fitter import Fitter
# To use different defaults, change these three import statements.
from kid_readout.analysis.khalil import delayed_generic_s21 a... |
/*!
* bootstrap-fileinput v4.3.4
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2016, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
*/!function(a){"use strict";"function"==ty... |
#!/usr/bin/env python
#################################################################
# Python Script to retrieve 164 online Data files of 'ds131.2',
# total 3.02G. This script uses 'requests' to download data.
#
# Highlight this script by Select All, Copy and Paste it into a file;
# make the file executable and run ... |
from typing import List
class KeypadInstructionsInterpreter:
KEYPAD = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
instructions = []
keypad_combination = []
def __init__(self, instructions_string:str) -> "KeypadInstructionsInterpreter":
self.instructions_string = instruction... |
# Copyright (c) 2020 Oxford-Hainan Blockchain Research Institute
#
# 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... |
//
// Created by Bradley Austin Davis on 2018/01/09
// Copyright 2013-2018 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_RenderCommonTask_h
#define hifi_RenderCommonTask_h
#includ... |
/*!
* Copyright 2015 by Contributors
* \file simple_dmatrix.h
* \brief In-memory version of DMatrix.
* \author Tianqi Chen
*/
#ifndef XGBOOST_DATA_SIMPLE_DMATRIX_H_
#define XGBOOST_DATA_SIMPLE_DMATRIX_H_
#include <xgboost/base.h>
#include <xgboost/data.h>
#include <algorithm>
#include <memory>
#include <limits>
... |
module.exports = ({ actions }) => {
actions.createTypes(`
type Article implements Node {
id: ID!
slug: String!
title: String!
date: Date! @dateformat
author: String!
excerpt(pruneLength: Int = 140): String!
body: String!
hero: File @fileByRelativePath
thumbnai... |
__author__ = "aleaf"
import sys
import os
import numpy as np
import warnings
import copy
from numpy.lib import recfunctions
from ..pakbase import Package
from ..utils import MfList
from ..utils.flopy_io import line_parse
from ..utils.recarray_utils import create_empty_recarray
from ..utils.optionblock import OptionBlo... |
import{r as a,c as e,o as t,b as s,d as u,e as l,F as n,i as r,u as o,m as c,f as m,j as i}from"./vendor.801e32df.js";import{_ as d,a as v,b as f,s as b}from"./index.cc0145b4.js";import{_ as p,a as h,b as j,c as y,d as _}from"./Footer.11da7d07.js";const g={id:"sidebar"},x={id:"infos"};i({setup(i){const b=a("1228.8px"),... |
from datawinners.main.couchdb.utils import all_db_names
from datawinners.main.database import get_db_manager
import logging
from datawinners.search.index_utils import get_elasticsearch_handle
from migration.couch.utils import migrate, mark_as_completed
from mangrove.errors.MangroveException import FormModelDoesNotExist... |
var ncloud = require('../../../lib/');
(function(){
var client = ncloud.createClient({
oauth_consumer_key:'%YOUR_CONSUMER_KEY%',
oauth_consumer_secret:'%YOUR_CONSUMER_SECRET%'
});
client.compute.findPublicImages( function( error, response ){
if( error ){
console.log( error );
}else {
... |
# Copyright (c) 2012 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.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'message_center',
'type': '<(component)',
'dependen... |
#pragma once
#include <libdariadb/utils/logger.h>
#include <libdariadb/utils/strings.h>
#include <stdexcept>
#include <string>
#define CODE_POS (dariadb::utils::CodePos(__FILE__, __LINE__, __FUNCTION__))
#define MAKE_EXCEPTION(msg) dariadb::utils::Exception::create_and_log(CODE_POS, msg)
// macros, because need CODE_... |
#
# PySNMP MIB module RADLAN-vlanVoice-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-vlanVoice-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:51:35 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... |
#include <ngx_http_push_module.h>
#include "store.h"
#include <store/rbtree_util.h>
#include <store/ngx_rwlock.h>
#include <store/ngx_http_push_module_ipc.h>
#define NGX_HTTP_PUSH_BROADCAST_CHECK(val, fail, r, errormessage) \
if (val == fail) { \
... |
{
"images": [],
"object": {
"uuid": "31A349AD-1715-42A8-AD42-859FEC4E5C0D",
"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
"children": [{
"type": "Mesh",
"name": "Cube",
"uuid": "FD45CB2E-764E-4812-8FA6-BC38846D0FEA",
"position": [0.0,0.0,0.0... |
#!/usr/bin/env python
import time
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
INFO = 1;
WARNING = 2;
level = INFO
def logConfig(l=INFO):
global level
level... |
/*
* @Author: your name
* @Date: 2021-02-01 11:45:33
* @LastEditTime: 2021-04-28 18:12:25
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \vue-admin-template\src\settings.js
*/
module.exports = {
title: 'Vue Admin Template',
/**
* @type {boolean} true | false
... |
// Region
// ------
// Manage the visual regions of your composite application. See
// http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/
Marionette.Region = function(options){
this.options = options || {};
var eventBinder = new Marionette.EventBinder();
_.extend(this,... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "snippetsjava.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
window.__NUXT__=(function(a,b,c,d,e){return {staticAssetsBase:"https:\u002F\u002Fwww.baca-quran.id\u002Fstatic\u002F1627814429",layout:"default",error:b,state:{notification:{show:a,title:c,message:c},isShowSidebar:a,isSupportWebShare:a,headerTitle:"Baca Qur'an",page:"home",lastReadVerse:b,settingActiveTheme:{name:"dark... |
#!/usr/bin/env python3
from .._utils.attribution import LayerAttribution
from .._utils.common import _format_input, _format_additional_forward_args
from .._utils.gradient import compute_layer_gradients_and_eval
class LayerGradientXActivation(LayerAttribution):
def __init__(self, forward_func, layer, device_ids=No... |
(function() {
var debug = false;
var module = {
debug: debug,
inputSelector: '.annotation-input',
tagSelector: '.tag',
tagsSelector: '.tags',
commentSelector: 'textarea.comment',
valueSelector: 'input.value', // stash tag selections and comment here as a JSON str... |
/*
*
* Copyright (c) 2021 Project CHIP 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 requir... |
import chess
import numpy as np
import argparse
import random
import os
import convert_board as convert
def generate(raw_data, max_size, len_history=8, shuffle=False):
dir = {"1-0": 1, "1/2-1/2": 0, "0-1": -1}
raw_data = raw_data.split("\n")[5:]
random.shuffle(raw_data)
size = 0
for mat... |
import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import { Chess } from 'chess.js';
import ChessBoard from '../lib';
const HTTP_BASE_URL = 'https://en.lichess.org';
const SOCKET_BASE_URL = 'wss://socket.lichess.org';
export default class PlayerVsPlayer extends Component {
... |
class User:
"""More or less just a container to hold information on the viewer who sent a message.
Parameters
-----------
name : str
The username of the viewer.
uid : str
The user ID of the viewer.
broadcaster : bool
True if this viewer is the broadcaster (... |
module.exports = {
all: {
expand: true,
cwd: "<%= paths.src.images %>",
src: ["**/*.svg"],
dest: "<%= paths.dist %>/svgmin.tmp"
}
}
|
// Copyright 2020 Las Venturas Playground. All rights reserved.
// Use of this source code is governed by the MIT license, a copy of which can
// be found in the LICENSE file.
// @ts-check
import { Color } from 'base/color.js';
import { Rect } from 'base/rect.js';
import { ZoneAreaManager } from 'features/gang_zones/z... |
import React from 'react';
/* eslint-disable import/no-extraneous-dependencies */
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { Slider } from '../src';
const displayName = Slider.displayName || 'Slider';
const title = 'Simple usage';
const description = `
Th... |
"""photo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based v... |
#!/usr/bin/python
# Copyright (c) 2018 Confetti Interactive Inc.
#
# This file is part of The-Forge
# (see https://github.com/ConfettiFX/The-Forge).
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional... |
from league_api.api import ApiType
from typing import List, Mapping
class ChampionMastery(ApiType):
chestGranted: bool = None # Is chest granted for this champion or not in current season.
championLevel: int = None # Champion level for specified player and champion combination.
championPoints: int = No... |
#ifndef ossimPlanetQtLegendAnimationPathItem_HEADER
#define ossimPlanetQtLegendAnimationPathItem_HEADER
#include <ossimPlanetQt/ossimPlanetQtLegendItem.h>
#include <osg/AnimationPath>
#include <osg/ref_ptr>
class ossimPlanetQtLegendAnimationPathItem : public ossimPlanetQtLegendItem
{
public:
ossimPlanetQtLegendAnim... |
const walk = 500; // 500px
|
from vetka import db
from enum import Enum
class Priority(Enum):
low = 1
normal = 2
high = 3
GoodTag = db.Table('good_tag',
db.Column('good_id', db.Integer, db.ForeignKey('good.id')),
db.Column('category_id', db.Integer, db.ForeignKey('category.id')))
GoodReview =... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... |
define(function () {
'use strict';
return {
bg_BG: {
'Playlist': 'Плейлист',
'Playback aborted': 'Прекратено изпълнение',
'Network or communication error': 'Проблем с връзка към мрежа',
'Decoding failed. Corruption or unsupported media': 'Провалено декодир... |
# -*- coding: utf-8 -*-
import scrapy
from douban.items import DoubanItem
class DoubanSpiderSpider(scrapy.Spider):
# 这里是爬虫名
name = 'douban_spider'
# 允许的域名
allowed_domains = ['movie.douban.com']
# 入口url
start_urls = ['https://movie.douban.com/top250']
# 解析规则
# 默认解析方法
def parse(s... |
/*
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("easyimage","ru",{commands:{fullImage:"Изображение во всю ширину",sideImage:"Изображение сбоку",altText:"Изменить альтернативный ... |
// Copyright 2015 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.
#ifndef FLUTTER_FLOW_LAYERS_LAYER_TREE_H_
#define FLUTTER_FLOW_LAYERS_LAYER_TREE_H_
#include <stdint.h>
#include <memory>
#include "flutter/flow/compos... |
const {parse, sep, normalize: norm} = require('path')
function* commonArrayMembers (a, b) {
const [l, s] = a.length > b.length ? [a, b] : [b, a]
for (const x of s) {
if (x === l.shift())
yield x
else
break
}
}
const commonAncestorPath = (a, b) => a === b ? a
: parse(a).root !== parse(b).ro... |
'use strict';
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ListView,
Image
} from 'react-native';
class RNHighScores extends React.Component {
constructor(props) {
super(props);
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
this.sta... |
import numbers
import unittest
import numpy as np
from bio_rtd import peak_shapes, utils
from bio_rtd.uo import surge_tank
from bio_rtd.utils import vectors
from bio_rtd_test.aux_bio_rtd_test import TestLogger
class MockUpNoSimCstr(surge_tank.CSTR):
sim_conv = False
sim_num = False
def _sim_convolution... |
/**
* List for data storage
* @module echarts/data/List
*/
define(function (require) {
var UNDEFINED = 'undefined';
var globalObj = typeof window === 'undefined' ? global : window;
var Float64Array = typeof globalObj.Float64Array === UNDEFINED
? Array : globalObj.Float64Array;
var Int32Array... |
import {
deviceAccessHook,
setEnforcementConfig,
userSyncHook,
userIdHook,
makeBidRequestsHook,
validateRules,
enforcementRules,
purpose1Rule,
purpose2Rule,
enableAnalyticsHook,
getGvlid,
internal
} from 'modules/gdprEnforcement.js';
import { config } from 'src/config.js';
import adapterManager,... |
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double AYSegmentedControlsVersionNumber;
FOUNDATION_EXPORT const unsigned char AYSegmentedControlsVersionS... |
/*
* Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution... |
# 4-3 Counting to Twenty
for value in range(1, 21):
print(value) |
ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-builds-github",t.cssText='.ace-builds-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-builds-github {background: #fff;color: #000;}.ace-builds-github .ace_keyword {font-weight: bold;}.ace-bu... |
(function($, Drupal) {
/* SELECT2
----------------------- */
Drupal.behaviors.advancedSelect = {
attach: function (context, settings) {
$("select", context).once('selects').each(function(){
$( 'form:not(.entity-embed-dialog):not(.entity-form-display-form):not(.entity-view-display-form):not(.layout-builder-ad... |
/*
============================================================================================
Big include file for all the distinct FEM basis function classes.
NOTE: portions of this code are automatically generated!
Copyright (c) 02-17-2011, Shawn W. Walker
=========================================... |
# Copyright (C) 2003 Python Software Foundation
import unittest
import shutil
import tempfile
import sys
import stat
import os
import os.path
import errno
import functools
import subprocess
from test import support
from test.support import TESTFN
from os.path import splitdrive
from distutils.spawn import find_executab... |
var expect = require('expect.js');
var util = require('util');
var chalk = require('chalk');
var fixtures = require('../fixtures');
var helpers = require('../helpers');
var BaseReporter = require('../../lib/reporters/base');
var Inspector = require('../../lib/inspector');
// A simple TestReporter for testing the BaseR... |
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.generic.base import TemplateView
from ._common import DALMEContextMixin
from dalme_app.forms import SearchForm
from django.forms import formset_factory
from dalme_app.utils import Search, Sea... |
import * as React from 'react';
import NavigationTestUtils from 'react-navigation/NavigationTestUtils';
import renderer from 'react-test-renderer';
import App from '../App';
jest.mock('expo', () => ({
AppLoading: 'AppLoading',
}));
jest.mock('../navigation/AppNavigator', () => 'AppNavigator');
describe('App', () ... |
(function() {
"use strict";
JSYG.Alignment = function(arg) {
this.list = arg;
};
JSYG.Alignment.prototype = new JSYG.StdConstruct();
JSYG.Alignment.prototype.onalign = null;
JSYG.Alignment.prototype.onalignleft = null;
JSYG.Alignment.prototype.onaligncenter = null;
JSYG.Alignment.prototype.onali... |
# Copyright (c) Facebook, Inc. and its affiliates.
import numpy as np
from typing import List, Optional, Tuple
import torch
from detectron2.data.detection_utils import read_image
from ..structures import DensePoseChartResult
from .base import Boxes, Image
from .densepose_results import DensePoseResultsVisualizer
de... |
from bika.lims.browser.sample import SamplesView as _SV
from bika.lims.permissions import *
from Products.CMFCore.utils import getToolByName
from zope.interface import implements
from Products.CMFPlone.utils import safe_unicode
import plone
class SamplesView(_SV):
def __init__(self, context, request):
s... |
module.exports = require('near-sdk-as/imports');
module.exports.include = ["*/assembly/__tests__/**/*.spec.ts"];
|
strings = [
("no_string", "NO STRING!"),
("empty_string", " "),
("yes", "Yes."),
("no", "No."),
# Strings before this point are hardwired.
("credits_0", "Persistent World Module^Copyright 2010 Steven Schwartfeger (Vornne)"),
("credits_1", "Mount&Blade: Warband Copyright 2008-2014 Taleworlds Entertainment"),... |
import { addRoute, getSetting} from 'meteor/vulcan:core';
// example-forum routes
addRoute([
{name:'posts.daily', path:'daily', componentName: 'PostsDaily', title: "Posts by Day" },
{name:'users.single', path:'users/:slug', componentName: 'UsersSingle'},
{name:'users.account', ... |
import os
import re
from setuptools import setup
def get_long_description():
"""
Return the README.
"""
return open("README.md", "r", encoding="utf8").read()
def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [
dirpath
for dirpath, di... |