text stringlengths 3 1.05M |
|---|
// Generated by BUCKLESCRIPT VERSION 2.2.2, PLEASE EDIT WITH CARE
'use strict';
var List = require("bs-platform/lib/js/list.js");
var $$Array = require("bs-platform/lib/js/array.js");
var ReasonReact = require("reason-react/lib/js/src/ReasonReact.js");
var Js_undefined = require("bs-platform/lib/js/js_undefined.js");
... |
import os.path as osp
import xml.etree.ElementTree as ET
import mmcv
import numpy as np
from .custom import CustomDataset
from .registry import DATASETS
@DATASETS.register_module
class XMLDataset(CustomDataset):
def __init__(self, min_size=None, **kwargs):
super(XMLDataset, self).__init__... |
from rest_framework import serializers
from apps.bookstore.models import Book, Publisher, Store
class PublisherSerializer(serializers.ModelSerializer):
class Meta:
model = Publisher
fields = '__all__'
class BookSerializer(serializers.ModelSerializer):
publisher = PublisherSerializer()
... |
/*
FusionCharts JavaScript Library
Copyright FusionCharts Technologies LLP
License Information at <http://www.fusioncharts.com/license>
@author FusionCharts Technologies LLP
@meta package_map_pack
@id fusionmaps.Rangpur.17.11-26-2015 08:30:21
*/
(function(b){"object"===typeof module&&"undefined"!==typeof module.... |
#!/usr/bin/python
# Author= Timo Fischer
import re
import sys
import os
class File:
"""
File Class
"""
def __init__(self, file):
"""
File class constructor
:param file:
"""
self.file = file
self.path = '.\storage'
self.absolute_path = "%s\\%s" ... |
# -*- coding: utf-8 -*-
FILE_TYPE_FIT = 'fit'
FILE_TYPE_TCX_HISTORY = 'tcx-history'
FILE_TYPE_TCX_COURSE = 'tcx-course'
FILE_TYPE_GPX_WAYPOINT = 'gpx-waypoint'
FILE_TYPE_GPX_TRACKPOINT = 'gpx-trackpoint'
|
var chai = require('chai');
var assert = chai.assert;
var should = chai.should();
var ClassMaker = require("../source/classmaker.js");
describe('Test ClassMaker', function () {
function Animal(name) {
this.name = name || "Undefined Animal";
this.getAbility = function () {
return "I can run";
};
... |
'use strict';
module.exports = (req, res, next)=>{
res.status(404).json({error: 'Not Found'});
}; |
import React, { Component, TouchableHighlight } from "react";
import { Alert, View, ScrollView, StyleSheet } from "react-native";
import {
Container,
Header,
Title,
Content,
Text,
Label,
Item,
Left,
Right,
ListItem,
Button,
Body
} from "native-base";
import moment from "moment";
import { getData... |
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/alpinejs/dist/module.esm.js":
/*!**************************************************!*\
!*** ./node_modules/alpinejs/dist/module.esm.js ***!
\**************************************************/
/***/ ((__unused_webpac... |
import * as React from 'react';
import wrapIcon from '../utils/wrapIcon';
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", className: className },
React.crea... |
#!/usr/bin/python
#
# Copyright 2015 Google Inc. 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 b... |
// Copyright 2017 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 MEDIA_AUDIO_AUDIO_DEVICE_INFO_ACCESSOR_FOR_TESTS_H_
#define MEDIA_AUDIO_AUDIO_DEVICE_INFO_ACCESSOR_FOR_TESTS_H_
#include <string>
#include "medi... |
import heapq
class Solution:
def mergeKLists(self, arr, K):
heap = []
counter = 0
for node in arr:
if node != None:
heapq.heappush(heap, (node.data, counter, node))
counter += 1
if len(heap) == 0:
return None
main_head ... |
/*!A cross-platform build utility based on Lua
*
* 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... |
from django.contrib import admin
from .models import Movie, Myrating, MyList
# Register your models here.
admin.site.register(Movie)
admin.site.register(Myrating)
admin.site.register(MyList) |
#===============================================================================
# Copyright 2020-2022 Intel Corporation
#
# 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.apa... |
import pandas as pd
from pdia.utils.countVisits import countVisits
def createUniqueRunID(df, var='onScreen', runId='onScreenRunID'):
"""Create a new column with countVisits()
:param df: data frame
:param var: name of the column from which we are creating the runs
:param runId: name of the column we ... |
# -*- coding: utf-8 -*-
import os
import sys
from PyPDF2 import PdfFileReader, PdfFileWriter
from .core import TableList
from .parsers import Stream, Lattice
from .utils import (TemporaryDirectory, get_page_layout, get_text_objects,
get_rotation, is_url, download_url)
class PDFHandler(object):
... |
import tensorflow as tf
def gated_linear_layer(inputs, gates, name=None):
activation = tf.multiply(x=inputs, y=tf.sigmoid(gates), name=name)
return activation
def instance_norm_layer(
inputs,
epsilon=1e-06,
activation_fn=None,
name=None):
instance_norm_laye... |
(function(e){function t(t){for(var s,i,n=t[0],l=t[1],c=t[2],p=0,u=[];p<n.length;p++)i=n[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&u.push(o[i][0]),o[i]=0;for(s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s]);d&&d(t);while(u.length)u.shift()();return r.push.apply(r,c||[]),a()}function a(){for(var e,... |
const path = require('path');
const config = require('../config');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production' ? config.build.assetsSubDirectory : config.dev.assetsSubDirectory;
return path... |
/*
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( 'newpage', 'az', {
toolbar: 'Yeni səhifə'
} );
|
# Copyright 2012 OpenStack Foundation
# 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 requ... |
import datetime
import openpyxl
from django.http import HttpResponse, JsonResponse
# ===================================================================
# JSON
# ===================================================================
def json_response(dictionary):
return JsonResponse(dictionary, safe=False)
# ===... |
# Copyright 2017 Google LLC.
#
# 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 notice,
# this list of conditions and the following disclaimer.
#
#... |
#!/usr/bin/env python
# 2017, Daniel Kirstenpfad
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the followin... |
# Copyright 2015 The TensorFlow 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 applica... |
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from identity import views
urlpatterns = patterns('',
# Admin
url(r'^admin/projects/$', views.ListProjectView.as_view(), name='admin_projects'),
url(r'^admin/project/add/?$', views.CreateProjectView.as_view(), name='admin_add_project'),
... |
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Yamaan org and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class ServiceDetail(Document):
pass
|
import numpy as np
from ..dendrogram import Dendrogram, TreeIndex
def assert_permuted_fancyindex(x, y):
""" Assert that two fancy indices (tuples of integer ndarrays)
are permutations of each other
"""
if not isinstance(x, tuple) or not(isinstance(x[0], np.ndarray)):
raise TypeError("First argu... |
import styles from './template.css';
import template from './template';
import AoflElement from '@aofl/web-components/aofl-element';
/**
* @summary IconBaselineVerticalAlignBottomElement
* @class IconBaselineVerticalAlignBottomElement
* @extends {AoflElement}
*/
class IconBaselineVerticalAlignBottomElement extends... |
/*****************************************************************************************
*****************************************************************************************
* *
* Revision : *
* ... |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import sys
import json
import pprint
import ssg.build_yaml
import ssg.build_remediations
import ssg.products
import ssg.rule_dir_stats as rds
import ssg.rules
import ssg.yaml
SSG_ROOT = os.path.abspath(os.path.join(os.path.dirna... |
(function () {
'use strict';
const userNameInput = document.getElementById('user-name');
const assessmentButton = document.getElementById('assessment');
const resultDivided = document.getElementById('result-area');
const tweetDivided = document.getElementById('tweet-area');
/**
* 指定した要素の子どもを全て除去する
* @p... |
/**
* 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... |
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import sys, unittest
import pymel.util.testing as testingutils
class TestAssertIteration(testingutils.TestCaseExtended):
#################################################
## orderMatters=True, onlyMembe... |
/**
* Copyright IBM Corp. 2016, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var _24 = {
"elem": "svg",
"attrs": {
"xmlns": "http:/... |
from functools import cached_property
from pydantic import BaseModel
import numpy as np
from .polyline import Polyline
from .position import Position
__all__ = ['Polyline', 'Position', 'BBXCornersClass']
def rot_x(x, y, phi):
return x * np.cos(phi) - y * np.sin(phi)
def rot_y(x, y, phi):
... |
__version__ = '2.5.13' |
import spectroscope
from ethereumapis.v1alpha1 import beacon_chain_pb2, beacon_chain_pb2_grpc
from spectroscope.model import ChainTimestamp, ValidatorIdentity
from spectroscope.model.update import (
ValidatorBalanceUpdate,
ValidatorStatusUpdate,
UpdateBatch,
)
from spectroscope.module import Module, Plugin... |
//VARIABLES AND REQUIRED MODULES
const express = require("express");
const { v1: uuidv1 } = require('uuid');
const fs = require("fs");
const path = require("path");
const notes = JSON.parse(fs.readFileSync("db/db.json"))
var app = express();
var PORT = process.env.PORT || 3000;
// MIDDLEWARE
app.use(express.urlenc... |
import FWCore.ParameterSet.Config as cms
# filter to select HLT events
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
l1tSyncHltFilter = hltHighLevel.clone(TriggerResultsTag ="TriggerResults::HLT")
l1tSyncHltFilter.throw = cms.bool(False)
l1tSyncHltFilter.HLTPaths = ['HLT_ZeroBias_v*',
... |
import json
from pymongo import MongoClient
def lerArquivo(nomeArquivo, magias):
f = open(nomeArquivo, 'r', encoding="utf-8")
linhas = f.readlines()
temp = ''
for i in linhas:
if(i == '\n'):
magias.append(temp[:len(temp)-1])
temp = ''
else:
temp += i... |
import json
import pytest
from collections import OrderedDict
from opentrons.server import serialize
from opentrons import robot, instruments, containers
@pytest.fixture
def instance():
class A:
def __init__(self, args):
self.update(args)
def update(self, args):
for k, v ... |
mark: int = int(input("ENter a mark to be graded:"))
if mark < 0:
print("Enter a mark in the range 1 - 100")
elif mark > 100:
print("Enter a mark in the range 1 - 100")
elif mark >= 85:
if mark <= 100:
print("D1")
elif mark >= 80:
if mark <= 84:
print("D2")
elif mark >= 75:
if... |
from __future__ import with_statement
import sys
import time
from select import select
from fabric.context_managers import settings, char_buffered
from fabric.state import env, output, win32, io_sleep
from fabric.auth import get_password, set_password
import fabric.network
if win32:
import msvcrt
def _flush(pi... |
#! python
"""run `pbsv config`, potentially allowing any option to be configurable from SL GUI."""
from __future__ import absolute_import
from __future__ import print_function
import logging
import sys
from pbsv1.config import SVConfig, SVConfigManipulator
import pbsv1.Constants as C
from pbcommand.models import Fil... |
import React from 'react';
import ReactDOM from 'react-dom';
import './css/index.css';
import App from './components/App';
import { createStore } from 'redux';
import rootReducer from './reducers/index';
import { Provider } from 'react-redux';
import { ReactReduxFirebaseProvider } from 'react-redux-firebase';
import { ... |
import { splitText } from 'wherehows-web/helpers/split-text';
import { module, test } from 'qunit';
module('Unit | Helper | split text');
const defaultSeparator = '...';
const scenarios = {
'htmlbars-inline-precompile': 'htmlbars...ecompile',
'Kubernetes has an ApiServer running on the master which acts as the su... |
import os
import unittest
from lyricsgenius.api import Genius
from lyricsgenius.song import Song
from lyricsgenius.artist import Artist
# Import client access token from environment variable
client_access_token = os.environ.get("GENIUS_CLIENT_ACCESS_TOKEN", None)
assert client_access_token is not None, "Must declare e... |
var WORKER_ENABLED = !!(global === global.window && global.URL && global.Blob && global.Worker)
function InlineWorker (func, self) {
var _this = this
var functionBody
self = self || {}
if (WORKER_ENABLED) {
functionBody = func.toString().trim().match(
/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$... |
#!/usr/bin/env python
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot/blob/master/LICENSE
from __future__ import absolute_import
import base64
import codecs
import glob
import importlib
import inspect
import itertools
import math
import numbers
import os
import re
import struct
import sys
import thr... |
var yo = require('yo-yo')
var icon = document.getElementById('status')
if (!icon) {
document.body.appendChild(yo`<div id='status' class="status-container">
<img src='public/OpenSmartCountry_gif_animado.gif' alt="Open Smart Country logo"></div>`)
icon = document.getElementById('status')
icon.addEventListener('... |
# we will make categories out of....
#
import os
import pickle
from collections import Counter
def load_all_categories():
path= "/Users/yaatehr/Documents/course6/research/shallablacklists/"
url_paths_by_category = {}
for root, dirs, files in os.walk(path, topdown=False):
# print(root)
# p... |
# -*- coding: utf-8 -*-
# pylint: disable-msg=E1101,W0612
from datetime import datetime, timedelta
import pytest
import re
from numpy import nan as NA
import numpy as np
from numpy.random import randint
from pandas.compat import range, u
import pandas.compat as compat
from pandas import Index, Series, DataFrame, isn... |
/* $Id$ */
#ifndef MEM_INCLUDED
#define MEM_INCLUDED
#include "except.h"
extern const Except_T Memchk_Failed;
extern void *Memchk_alloc (long nbytes,
const char *file, int line);
extern void *Memchk_calloc(long count, long nbytes,
const char *file, int line);
extern void Memchk_free(void *ptr,
const char *file, int ... |
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..minc import ToEcat
def test_ToEcat_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_acquisition_variable=dict(argstr='-ignore_acquisitio... |
##############################################################################
#
# Copyright (c) 2004-2011 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THI... |
/*
* This header is generated by classdump-dyld 1.0
* on Tuesday, November 5, 2019 at 3:11:38 PM Mountain Standard Time
* Operating System: Version 13.0 (Build 17J586)
* Image Source: /usr/libexec/gamed
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos.
*/
#import <gamed/gamed-Structs.h>... |
#!/usr/bin/env python
# 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
# "Lic... |
# -*- coding: utf-8 -*-
import tempfile
from django import db
from django.conf.urls import url
from django.contrib.gis.measure import Distance
from django.core.urlresolvers import reverse
from django.http.response import HttpResponse
from tastypie import fields
from tastypie.authentication import MultiAuthentication
f... |
#subnit this as a job on EMR
import boto3
import os
# The name of the state machine
SF_NAME = 'SampleStepFunction-StateMachine1'
SampleStepFunction_DEF = '{ "Comment": "Job Orchestration for EDL HAO daily Workflow", "StartAt": "DailyDataLoadSelectedEntityPass", "States": { "DailyDataLoadSelectedEntityPass": ... |
import os
import string
import subprocess
import mvpipe.support
import mvpipe.config
from mvpipe.runner import Runner, Job
def_options = {'env': True, 'wd': os.path.abspath(os.curdir), 'hold': False, 'nodes': 1}
'''
SLURM options:
global_hold - start all pipelines with a "placeholder" job to synchronize
... |
/*
* File: FixedColumns.js
* Version: 1.0.1
* Description: "Fix" columns on the left of a scrolling DataTable
* Author: Allan Jardine (www.sprymedia.co.uk)
* Created: Sat Sep 18 09:28:54 BST 2010
* Language: Javascript
* License: GPL v2 or BSD 3 point style
* Project: Just a littl... |
module.exports = {
forbidden: [
/* rules from the 'recommended' preset: */
{
name: 'no-circular',
severity: 'warn',
comment:
'This dependency is part of a circular relationship. You might want to revise ' +
'your solution (i.e. use dependency inversion, make sure the modules ... |
# Here is a code that implements memory compaction process. Go through the below code and observe how linked list is used for its implementation
class Node:
def __init__(self,data):
self.__data=data
self.__next=None
def get_data(self):
return self.__data
def set_data(sel... |
var specHelper = require('../spec-helper');
var WidgetModel = require('../../src/widgets/widget-model');
describe('widgets/widget-model', function () {
beforeEach(function () {
var vis = specHelper.createDefaultVis();
// Use a category dataview as example
var dataviewModel = vis.dataviews.createCategoryM... |
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sdnantwr.settings')
try:
from django.core.management import execute_from_command_line
except Imp... |
"""Rudimentary Apache Arrow-backed ExtensionArray.
At the moment, just a boolean array / type is implemented.
Eventually, we'll want to parametrize the type and support
multiple dtypes. Not all methods are implemented yet, and the
current implementation is not efficient.
"""
import copy
import itertools
import numpy ... |
class CommitConfigException(Exception):
pass
class DiscardConfigException(Exception):
pass
|
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2009 Torch Mobile, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as pub... |
module.exports = function (path, context) {
path = path.replace('/','');
var partial = handlebars.partials[path];
if (typeof partial !== 'function') {
partial = handlebars.compile(partial);
}
if(context) {
// Assume every parameter after path + context are modifier classes (excluding last = options object)
c... |
define({
root: ({
_widgetLabel: "Демо",
label1: "Я демонстрационный виджет.",
label2: "Это настраивается."
}),
"ar": 0,
"cs": 0,
"da": 0,
"de": 0,
"el": 0,
"es": 0,
"et": 0,
"fi": 0,
"fr": 0,
"he": 0,
"it": 0,
"ja": 0,
"ko": 0,
"lt": 0,
"lv": 0,
"nb": 0,
"nl": 0,
"pl... |
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
/**
*
* Stores metadata for a syndication feed channel
*
*/
TimelineTracking = {};
TimelineTracking.entityName = 'track_timeline';
TimelineTracking.entitySchema = {
id: {
type: String,
renderable: false,
writable: false
},
owner_id : {
type: String,
renderable: ... |
/*
CF3
Copyright (c) 2015 ishiura-lab.
Released under the MIT license.
https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md
*/
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
#include"test1.h"
int32_t x17 = -1;
static int8_t x20 = 1;
uint64_t t0 = UINT64_MAX;
int16_t x323 = INT16_MIN;
static uint8_t x3... |
# -*- coding: utf-8 -*-
"""
@file: __init__
@author: Memory
@date: 2020/10/11
"""
from .alert import Alert
plugin = Alert
|
l = [1,2,3,4,5]
print(l)
def mul_by2(num):
return num*2
for result in map(mul_by2,l):
print(result)
|
sap.ui.define(['sap/ui/webc/common/thirdparty/base/renderer/ifDefined', 'sap/ui/webc/common/thirdparty/base/renderer/LitRenderer'], function (ifDefined, litRender) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
var ifDefined__default = ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 26 11:35:43 2018
@author: rjackson
"""
import pydda
import pyart
import numpy as np
from distributed import Client, LocalCluster
from copy import deepcopy
def test_make_updraft_from_convergence_field():
""" Do we have an updraft in a region ... |
// Copyright (c) 2015-2017, Satoshi Tanda. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
/// @file
/// @brief Declares interfaces to hot-plug functions.
#ifndef HYPERPLATFORM_HOTPLUG_CALLBACK_H_
#define HYPERPLATFORM_HOTPLUG_CALLBACK_H_
#... |
# WRITTEN BY ANDREW SAGER FOR EECS 452
# FUNCTION: APPLIES A GAIN VECTOR TO AN INPUT
from numpy import argwhere, newaxis, concatenate
from scipy.signal import stft, istft
def apply_profile(input, f_vec, gainVec, fs):
"""
Applies the gain vector to the input
:param input: input audio signal
:param f_... |
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define("@angular/localize/src/tools/src/translate/source_... |
/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE. */
/*
* Generate a few thousand headers, frame them using frame writer, read them
* using frame reader, parse them, and compare with the original list: the
* two should be identical (we ignore pseudo-headers).
*
* Two variables change:
* 1. M... |
from utils import import_kv
__all__ = ('NavigationDrawer',)
import os.path
from kivy.animation import Animation
from kivy.uix.stencilview import StencilView
from kivy.metrics import dp
from kivy.clock import Clock
from kivy.properties import (ObjectProperty, NumericProperty, OptionProperty,
... |
from model.contact import Contact
import time
import random
def test_delete_contact(app, db, check_ui):
if app.contact.count() == 0:
app.contact.open_new_contact_page()
app.wd.find_element_by_xpath("/html/body/div/div[3]/ul/li[2]/a").click()
app.contact.fill_forms_contacts(Contact())
... |
# Generated by Django 3.0.2 on 2020-04-03 10:48
import uuid
import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
import simple_history.models
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migratio... |
#include "ringbuffer.h"
int8_t ringbuffer_init(ringbuffer * buffer,
uint8_t * data,
uint32_t dataSize,
uint32_t len,
void *(*user_memcpy) (void *str1, const void *str2,
size_t n)
#ifndef RINGBUFFER_EXCLUDE_LOCKING
, void (*buffer_lock) (void),
void (*buff... |
# 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 use ... |
import torch
from sigver.featurelearning.data import extract_features
import sigver.featurelearning.models as models
import argparse
from sigver.datasets.util import load_dataset, get_subset
import sigver.wd.training as training
import numpy as np
import pickle
def main(args):
exp_users = range(*args.exp_users)
... |
// 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 COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_
#define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_
#in... |
# https://leetcode.com/problems/symmetric-tree
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def isSymmetric(self, root):
"""
:type root: TreeNode
:rtype: bo... |
/// @file
/// @brief Contains xtd::event_handler event handler.
/// @copyright Copyright (c) 2021 Gammasoft. All rights reserved.
#pragma once
#include "delegate.h"
#include "event.h"
#include "event_args.h"
/// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and mor... |
from notebook.auth.security import passwd, passwd_check
from .base import *
class Role(EmbeddedDocument):
operate = StringField()
permission = BooleanField()
class User(Document):
name = StringField(max_length=50, unique=True)
email = EmailField(unique=True)
fullname = StringField(max_length=50... |
from flask import Flask, request, render_template
import requests
import pandas as pd
import numpy as np
import pickle
import re
app = Flask(__name__)
pickle_in = open('model-pakwheels-carprice.pkl', 'rb')
model = pickle.load(pickle_in)
q_transform = pickle.load(open('q_transform.pkl','rb'))
@app.route('/', methods... |
#
# ovirt-engine-setup -- ovirt engine setup
# Copyright (C) 2013 Red Hat, 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 r... |
import React from 'react';
import axios from 'axios';
import qs from 'qs';
class ContactForm extends React.Component {
constructor(props) {
super(props);
this.state = {
lName: 'a',
fName: 'b',
phone: '778',
email: 'd@e.com',
address: 'f',
suiteNum: '3',
author_type:... |
"""project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/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... |
# Copyright (c) 2014-2019, iocage
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted providing that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... |