text stringlengths 3 1.05M |
|---|
const router = require( 'express' ).Router()
const { pageLanding , pageStudy , pageGiveClasses, saveClasses , page404 } = require( './../controllers/index.js' )
router.get( '/' , pageLanding )
router.get( '/study' , pageStudy )
router.get( '/give-classes' , pageGiveClasses )
router.post( '/save-classes' , sav... |
#!/usr/bin/env python3
# Test whether a UNSUBSCRIBE with no topic results in a disconnect. MQTT-3.10.3-2
from mosq_test_helper import *
def gen_unsubscribe_invalid_no_topic(mid):
pack_format = "!BBH"
return struct.pack(pack_format, 162, 2, mid)
def do_test(proto_ver):
rc = 1
mid = 3
keepalive = ... |
var searchData=
[
['manual_0',['MANUAL',['../pixie__chroma__internal_8h.html#a8dbce326e7d153234a6fa2f171dfd19ca506e8dd29460ea318b68d035f679b01b',1,'pixie_chroma_internal.h']]]
];
|
from typing import List
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from zerver.decorator import REQ, has_request_variables
from zerver.lib.actions import check_send_typing_notification
from zerver.lib.response import json_error, json_success
from zerver.lib.va... |
const Discord = require('discord.js');
const fs = require('fs');
const fetch = require('node-fetch');
const moment = require('moment');
const client = new Discord.Client();
client.commands = new Discord.Collection();
// Read the JSON config file with token, log in and set the prefix
var jsonf = JSON.parse(fs.readFile... |
import {http, httpFile} from "./http_service";
export function userScope() {
return http().get('/user/user-scope');
}
export function adminScope() {
return http().get('/user/admin-scope');
}
|
// function to load quotes.json
function loadJSON(callback) {
var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
xobj.open('GET', '/static/books_app/quotes.json', true); // Replace 'my_data' with the path to your file
xobj.onreadystatechange = function () {
if (xobj.readyState == ... |
DECL|SYS_LOG_LEVEL|macro|SYS_LOG_LEVEL
DECL|TEST_DATA_SIZE|macro|TEST_DATA_SIZE
DECL|buffer_print_eeprom|variable|buffer_print_eeprom
DECL|buffer_print_i2c|variable|buffer_print_i2c
DECL|eeprom_0_data|variable|eeprom_0_data
DECL|eeprom_1_data|variable|eeprom_1_data
DECL|i2c_buffer|variable|i2c_buffer
DECL|run_full_read... |
import React from 'react';
import { graphql, Link } from 'gatsby';
import PropTypes from 'prop-types';
import Container from '../layout/container';
import Content from '../layout/content';
import Layout from "../components/layout"
import Img from "gatsby-image"
const Post = ({ data }) => {
const {html } = data.mark... |
# coding=utf-8
# Copyright 2020 The Google Research 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 applicab... |
const mongodb = require('mongoose');
const User = require('../users/userSchema');
const bcrypt = require('bcrypt');
const auth = require('../../authentication/auth')
exports.registerUser = (req, res) => {
User.exists({ email: req.body.email }, (err, result) => {
if (err) {
return res.status(400).json(err)... |
# base class for recall algorithm
# author: WenYi
# time: 2019-08-20
class Recall(object):
"""
the base class for recall algorithm, other algorithm should inherit this
class and rewrite some methods
"""
def __init__(self, **kwargs):
"""
:param data: input DataFrame include ['user_i... |
import cv2
import numpy as np
import time
import os
import HandTrackingModule as htm
#######################
brushThickness = 20
eraserThickness = 100
########################
folderPath = "Header"
myList = os.listdir(folderPath)
print(myList)
overlayList = []
for imPath in myList:
image = cv2.i... |
# This combines the images processed by preprocess.py and combine them into a singly numpy array
import os
from PIL import Image
import numpy as np
from tqdm import tqdm
img_dir = 'resources/essex images/processed'
files = [x for x in os.listdir(img_dir) if x[-4:] == '.png']
dataset = np.empty((len(files),64,64,1))
f... |
"""
This file offers the methods to automatically retrieve the graph Pseudomonas kuykendallii.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prote... |
const JSPackager = require('./JSPackager');
const CSSPackager = require('./CSSPackager');
const HTMLPackager = require('./HTMLPackager');
const RawPackager = require('./RawPackager');
class PackagerRegistry {
constructor() {
this.packagers = new Map();
this.add('js', JSPackager);
this.add('css', CSSPack... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'liststyle', 'sq', {
armenian: 'Numërim armenian',
bulletedTitle: 'Karakteristikat e Listës me Pulla',
circle: 'Rreth',
decimal: 'Decimal (1, 2, 3... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017-2018 The TenUp developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_SCRIPT_STANDARD_H
#def... |
/*
* Copyright (c) 2020-2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
const execFile = require('child_process').execFile;
const debug = require('debug')('UAT:Server:AuditCli');
const execAudit = (auditor, file) => {
debug('file', file);
const cmdParams = [
// // Testing commands
// 'docker',
// 'exec',
// 'asqatasun-cli',
`./bin/${auditor}.sh`,
'-f',
'/opt/firefox/firefo... |
#pragma once
#include "glm/glm.hpp"
namespace Tiny {
struct Vertex {
glm::vec3 pos;
glm::vec3 normal;
glm::vec3 color;
glm::vec2 texCoords;
};
class Actor
{
public:
Actor();
~Actor();
inline virtual glm::mat4& GetTransform() { return m_ActorData.Transform; }
void SetVertices(std::vector<Verte... |
// ----- Ember modules -----
import {helper} from 'ember-helper'
// ----- Ember addons -----
// ----- Third-party libraries -----
// ----- Own modules -----
export function <%= camelizedModuleName %> (params/*, hash*/) {
return params
}
export default helper(<%= camelizedModuleName %>)
|
from time import time
import datetime
import os
os.environ["CUDA_VISIBLE_DEVICES"]="2"
from models.Gan import Gan
from models.textGan_MMD.TextganDataLoader import DataLoader, DisDataloader
from models.textGan_MMD.TextganDiscriminator import Discriminator
from models.textGan_MMD.TextganGenerator import Generator
from ... |
const zlib = require('zlib');
const fs = require('fs');
describe("overwatch-s3-es", function () {
var overWatch = require('../../index')
describe("overwatch-s3-es", function () {
it("should be able to parse fastly log string to a mapped object", function () {
var fastlyKeyMessage = '<134>... |
"""
Copyright (c) 2016-17 Keith Sterling http://www.keithsterling.com
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 rights to use, copy, mod... |
import React, { Component } from 'react'
import st from './style.module.css'
import Link, { navigateTo } from 'gatsby-link'
import BackButton from '../back-button'
import marked from 'marked'
import { Box, Thread } from 'react-disqussion'
import { Player } from '../Player'
import { timestampToSeconds } from '../../util... |
#ifndef MINIMAP2_H
#define MINIMAP2_H
#include <stdint.h>
#include <stdio.h>
#include <sys/types.h>
#define MM_F_NO_DIAG 0x001 // no exact diagonal hit
#define MM_F_NO_DUAL 0x002 // skip pairs where query name is lexicographically larger than target name
#define MM_F_CIGAR 0x004
#define MM_F_OUT_S... |
(function(context, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS
module.exports = factory();
} else {
var namespace = 'hopscotch';
// Bro... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
//>>built
define({"widgets/GriddedReferenceGraphic/nls/strings":{_widgetLabel:"Ruudukkomuotoinen viitegrafiikka"... |
"""Implementation of sample attack."""
# coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import tensorflow as tf
from utils import *
from attack_method import *
from tqdm import tqdm
from tensorpack import TowerConte... |
"""model.py - Model and module class for EfficientNet.
They are built to mirror those in the official TensorFlow implementation.
"""
# Author: lukemelas (github username)
# Github repo: https://github.com/lukemelas/EfficientNet-PyTorch
# With adjustments and added comments by workingcoder (github username).
import... |
static void fenz(ReturnType uint32_t out[1], const uint32_t in1[4]) {
{ const uint32_t x5 = in1[3];
{ const uint32_t x6 = in1[2];
{ const uint32_t x4 = in1[1];
{ const uint32_t x2 = in1[0];
{ uint32_t x7 = (x6 | x5);
{ uint32_t x8 = (x4 | x7);
{ uint32_t x9 = (x2 | x8);
out[0] = x9;
}}}}}}}
}
|
/* $NetBSD: crc_extern.h,v 1.2 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are... |
import sys
from typing import TypeVar
from flask import Flask
from flask_injector import FlaskInjector, request
from flask_restx import Api
from injector import Injector, Binder, singleton
from werkzeug.utils import redirect
from pdip.logging.loggers.console.console_logger import ConsoleLogger
from ...utils.utils im... |
import {useSelector} from 'react-redux';
import {useDarkMode} from 'react-native-dark-mode';
/**
* Define Const color use for whole application
*/
export const BaseColor = {
grayColor: '#9B9B9B',
dividerColor: '#BDBDBD',
whiteColor: '#FFFFFF',
fieldColor: '#F5F5F5',
yellowColor: '#FDC60A',
navyBlue: '#3C... |
$((function(){"use strict";var a=$(".invoice-list-table"),t="../../../app-assets/",e="app-invoice-preview.html",s="app-invoice-add.html",n="app-invoice-edit.html";if("laravel"===$("body").attr("data-framework")&&(t=$("body").attr("data-asset-path"),e=t+"app/invoice/preview",s=t+"app/invoice/add",n=t+"app/invoice/edit")... |
#ifndef config_h
#define config_h
#include "stdint.h"
// define class name and unique id
#define MODEL_IDENTIFIER ControlledClocksSE
#define INSTANTIATION_TOKEN "{8c4e810f-3df3-4a00-8276-176fa3c9f002}"
#define WINDOWS
#define SCHEDULED_CO_SIMULATION
// define model size
#define NX 0
#define NZ 0
#define EVENT_UPD... |
#!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['... |
from clvm.casts import int_from_bytes
from clvm_tools import binutils
from thyme.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward
from thyme.types.blockchain_format.program import Program
from thyme.types.condition_opcodes import ConditionOpcode
from thyme.util.bech32m import decode_p... |
"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... |
var searchData=
[
['k1_9437',['k1',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_m_d_l0_material_node.html#aa4932377844d78e11ed47d8030ef1e81',1,'BrawlLib::SSBB::ResourceNodes::MDL0MaterialNode']]],
['k2_9438',['k2',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_m_d_l0_material_node.html#a276cb6fd... |
var struct_x_m_l___r_u_l_e__t =
[
[ "belongsTo", "struct_x_m_l___r_u_l_e__t.html#a86d0de8339baa8601ebed389b9d09263", null ],
[ "contentType", "struct_x_m_l___r_u_l_e__t.html#a9c16c692aa47d3f51911da35a132e190", null ],
[ "name", "struct_x_m_l___r_u_l_e__t.html#a2d016703b49d92d9a4b2586144ac8ed4", null ]
]; |
//
// XTCloudHandler.h
// Notebook
//
// Created by teason23 on 2019/3/6.
// Copyright © 2019 teason23. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <XTlib/XTlib.h>
#import <CloudKit/CloudKit.h>
@interface XTIcloudUser : NSObject <NSCoding>
@property (copy, nonatomic) NSString *userRecordName... |
from objects.notifier import Notifier
from direct.task.TaskManagerGlobal import taskMgr
from direct.gui.OnscreenText import OnscreenText
from direct.gui.DirectGui import DirectButton
class SinglePlayer(Notifier):
def __init__(self, debug_ui):
Notifier.__init__(self, "ui-single-player")
self.debug... |
"""supervisr dns provider compatibility"""
from copy import deepcopy
from itertools import chain
from logging import getLogger
from typing import Generator, List, Union
from supervisr.core.providers.base import BaseProvider
from supervisr.core.providers.objects import (ProviderObject,
... |
# (c) Copyright IBM Corp. 2019. All Rights Reserved.
# # -*- coding: utf-8 -*-
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError
from fn_datatable_utils.ut... |
/**
*
* @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condition... |
import os
import gc
import numpy as np
import torch
from tensorboardX import SummaryWriter
from termcolor import colored
from tqdm import tqdm
from deeppipeline.common.core import save_checkpoint, init_optimizer, init_session
from deeppipeline.common.dataset import init_folds
from deeppipeline.kvs import GlobalKVS
fr... |
# Copyright 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 required by applicable law or agreed ... |
module.exports = function (at, t) {
t.test('string that starts with a BMP symbol', function (st) {
st.equal(at('abc\uD834\uDF06def', -Infinity), '');
st.equal(at('abc\uD834\uDF06def', -1), '');
st.equal(at('abc\uD834\uDF06def', -0), 'a');
st.equal(at('abc\uD834\uDF06def', +0), 'a');
st.equal(at('abc\uD834\uD... |
// Called once when the dialog displays
function onLoad() {
// Use the arguments passed to us by the caller
document.getElementById("url").value = window.arguments[0].inn.url;
document.getElementById("title").value = window.arguments[0].inn.title;
updateGeneric();
}
// Called once if and only if the user click... |
while True:
try:
fruit_name = input("입력하고 싶은 숫자가 뭐에요?")
fruit_name = int(fruit_name)
if fruit_name < 10:
print("10보다 작은 숫자가 입력이 되었습니다")
else:
print("10보다 큰 숫자가 입력이 되었습니다.")
break
except:
print("숫자를 입력해주세요 ㅠㅠ")
continue
|
import * as React from "react";
import Svg, { Path } from "react-native-svg";
function SvgCriminalFill(props) {
return (
<Svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<Path fill="none" d="M0 0h24v24H0z" />
<Path d="M12 2a9 9 0 016.894 14.786c1.255.83 2.033 1.89 2.101 3.049L2... |
const { start } = require('reboost');
start({
entries: [
['./src/index.js', './public/dist/index.js']
],
contentServer: {
root: './public',
open: true
}
});
|
import forEach from 'lodash/forEach';
import immutable from 'immutable';
export class PaginationTracker {
constructor(options) {
const data = {};
data.currentPage = options.initialPage || 1;
data.totalItems = options.totalItems || 0;
data.itemsPerPage = options.itemsPerPage || 1;
data.totalPages... |
# File: Function_Optimization.py
# Description: Optimization of smooth and non-smooth functions with 'BFGS' and 'differential evolution' methods
# Environment: PyCharm and Anaconda environment
#
# MIT License
# Copyright (c) 2018 Valentyn N Sichkar
# github.com/sichkar-valentyn
#
# Reference to:
# Valentyn N Sichkar. M... |
#ifndef UTILS_H__
#define UTILS_H__
#include <numeric>
#include <vector>
#include <cstdarg>
#include <iostream>
#include <memory>
#include <signal.h>
#include <thread>
#include <algorithm>
#include <queue>
#include "Task.h"
#include "Job.h"
#include "ECU.h"
#include "Logger.h"
/** This file is engine code of CPSim-R... |
from ..metaclasses import Singleton
class NetworkManager(metaclass=Singleton):
def __init__(self, client):
self.client = client
def create_bitso(self):
self._create_network('bitso')
def create_mssql(self):
self._create_network('mssql')
def create_poloniex(self):
sel... |
'use strict';
goog.require('Blockly.JavaScript');
goog.require('Blockly.PHP');
// return statement
Blockly.Blocks['utils_return'] = {
init: function() {
this.setColour("#0B3B17");
this.appendValueInput("return")
.appendField("return");
this.setPreviousStatement(true);
this.setTooltip('Return ... |
export const PieceValues = {
p: 100,
n: 320,
b: 330,
r: 500,
q: 900,
k: 20000,
};
export const Pieces = {
PAWN: "p",
KNIGHT: "n",
BISHOP: "b",
ROOK: "r",
QUEEN: "q",
KING: "k",
};
export const Colors = {
WHITE: "w",
BLACK: "b",
};
export const ENDGAME_MATERIAL_... |
/* Permutation code implementation with modified recoverying scheme.
coder: Mahdi Hajiaghayi
Program summary: it implements the encoding and failure recovery of the permutation code based on the Jafar's paper on permutational code and our modified scheme.
plot: It returns the recovery time vs the number of p... |
from arm.logicnode.arm_nodes import *
class RemoveObjectNode(ArmLogicTreeNode):
"""Use to delete an object from the scene."""
bl_idname = 'LNRemoveObjectNode'
bl_label = 'Remove Object'
arm_version = 1
def init(self, context):
super(RemoveObjectNode, self).init(context)
self.add_in... |
/*
* clove-unit
* v2.0.0
* Unit Testing library for C
* https://github.com/fdefelici/clove-unit
*
*/
#ifndef CLOVE_H
#define CLOVE_H
#pragma region INTERNALS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define __CLOVE_STRING_LENGTH 256
#define __CLOVE_TEST_ENTRY_LENGTH 60
//... |
import unittest
from app.models import Review,User
from flask_login import current_user
# from app import db
class TestReview(unittest.TestCase):
def setUp(self):
self.user_James = User(username = 'James',password = 'potato', email = 'james@ms.com')
self.new_review = Review(movie_id=12345,movie_ti... |
import glob
import os
import random
import trimesh
import numpy as np
import json
import argparse
import signal
import trimesh.transformations as tra
from acronym_tools import Scene, load_mesh, create_gripper_marker
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def load_contacts(root_folder,... |
import styled, { keyframes } from 'styled-components'
const unfade = keyframes`
0% {
opacity: 0.0;
// transform: translate3d(0, -1rem, 0);
}
100% {
opacity: 1.0;
// transform: translate3d(0, 0, 0);
}
`
export const Container = styled.div`
width: 100%;
max-width:... |
import logging
import shlex
import subprocess
from brigade.core.exceptions import CommandError
from brigade.core.task import Result
logger = logging.getLogger("brigade")
def command(task, command):
"""
Executes a command locally
Arguments:
command (``str``): command to execute
Returns:
... |
/*
* Copyright 2016 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 by applic... |
var naturalSort = require('../');
var through = require('through');
var should = require('should');
var createFS = require('vinyl-fs-mock');
require('mocha');
describe('gulp-natural-sort', function() {
function generateStream() {
return createFS({
'2-test.md': 'one',
'1-test.md': 'two',
'10-tes... |
import os
import shutil
import hashlib
import subprocess
def build_icons(specs, error_callback, cache_dir):
os.makedirs(cache_dir, exist_ok=True)
for spec in specs:
in_path = _get_existing_logo_file_path(
spec.site, error_callback=error_callback)
in_path_hash = _hash_file_contents(... |
"""Sitemaps for CMS pages"""
from django.contrib.sitemaps import Sitemap
from cms.models import Page
class BlogSitemap(Sitemap):
"""Sitemap of blog posts"""
changefreq = 'weekly'
priority = 0.5
def items(self):
return Page.objects.filter(blog_entry=True).order_by('-id')
def lastmod(self, ... |
const puppeteer = require('puppeteer');
const url = 'https://movie.douban.com/subject/';
// const doubanId = '3078549';
// 延时函数
const sleep = time => new Promise(resolve => {
resolve(setTimeout(() => {}, time));
});
process.on('message', async movies => {
console.log('Start visit the target page');
// 创... |
import pytest
from carsus.io.nist.weightscomp_grammar import *
from carsus.io.util import to_flat_dict
from numpy.testing import assert_almost_equal, assert_allclose
@pytest.mark.parametrize("test_input,expected",[
("1.00784", 1.00784),
("6.0151228874", 6.0151228874)
])
def test_float_(test_input, expected):... |
/*
Software License Agreement (BSD License)
http://taffydb.com
Copyright (c) 2008
All rights reserved.
Version 1.7.3
Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following condition is met:
* Redistributions of source code must ret... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from CTFd.models import Challenges
from CTFd.plugins.dynamic_challenges import DynamicChallenge, DynamicValueChallenge
from CTFd.utils.security.signing import hmac
from tests.helpers import (
FakeRequest,
create_ctfd,
destroy_ctfd,
gen_flag,
gen_user,
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Remote session service for frontend server.
* Set session info for backend servers.
*/
const utils = require("../../../util/utils");
function default_1(app) {
return new SessionRemote(app);
}
exports.default = default_1;
;
class S... |
from color import get_color_from_screen_pixel,set_color_board
from . import utils
def light_screen(board):
color = get_color_from_screen_pixel()
set_color_board(board.board,color)
utils.apply_light(board) |
/**
* Copyright 2018 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/
/**
* `example-hax-element`
* @element example-hax-element
* `Provide an example to pick apart of a working HAX element`
*
* @microcopy - language worth noting:
* -
*
* @demo demo/index.html
*/
c... |
// 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 QUICHE_QUIC_PLATFORM_API_QUIC_ENDIAN_H_
#define QUICHE_QUIC_PLATFORM_API_QUIC_ENDIAN_H_
#include "net/quic/platform/impl/quic_endian_impl.h"
nam... |
/* */
"format global";
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
f... |
var searchData=
[
['typesignalhomebuttonclicked_97',['typeSignalHomeButtonClicked',['../classQuizBox.html#ad5f7d0bdf6fda6fa200d4a8f61a8e8ed',1,'QuizBox']]],
['typesignalquizsetbuttonclicked_98',['typeSignalQuizSetButtonClicked',['../classHomeBox.html#a406256bab8f31ce0544169a17afb4197',1,'HomeBox']]]
];
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='City',
fields=[
('id', models.AutoField(verbose... |
from django.urls import path
from application.blog import views
from application.blog.apps import BlogConfig
app_name = BlogConfig.label
urlpatterns = [
path("", views.AllPostsView.as_view(), name="all"),
path("new/", views.NewPostView.as_view(), name="new"),
path("dell_all_post/", views.DelAll.as_view()... |
#!/usr/bin/env python3
## see ASCII (https://www.asciitable.com)
## new line
print('hello\nworld')
## tab
print('hello\tpython')
## vertical tab
print('hello world', end = '\v')
|
import API from '../API';
const API_URL = "/users/login";
async function login(email, password) {
try {
const { data: res } = await API.post(API_URL, {
email,
password
});
if (res.success) {
return {
success: true,
data: res.token
};
}
} catch (err) {
co... |
(function () {
'use strict';
angular.module('freeants').factory('imagesRawDataContext', ['$http', 'helpers','path',
function ($http, helpers, path) {
function imagesRawUrl(id) { return path.api + "/imagesRaw/" + (id || ""); }
return {
createImageRaw : function (imageData) {
... |
/*******************************************************************************
* Copyright 2014 Paxcel Technologies
*
* 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://ww... |
'use strict';
const expect = require('chai').expect;
const injectr = require('injectr');
const sinon = require('sinon');
const ocClientVersion = require('../../package.json').version;
const templateHeader = require('../test-utils/get-templates-header');
const getDefaultUserAgent = () =>
`oc-client-${ocClientVersio... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@Author : 王超逸
@File : async.py
@Time : 2020/9/15 11:53
@Desc :
提供一个修饰器,将一个同步的方法转变为一个异步的方法
当然,你也可以使用celery,不过celery并不总是很好用,比如说我们以后可能会想要异步执行rpc方法
btw,能开线程解决的事情,就不要起服务、开进程、配消息队列了
os.exec是相对不优雅的做法,我们应该逐渐用其他方法替代!
"""
import traceback
from .threadpool_wcy i... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.0-master-2b98560
*/
function MdCheckboxDirective(e,t,n,i,o,c){function a(a,d){function r(a,d,r,l){function s(e,t,n){r[e]&&a.$watch(r[e],function(e){n[e]&&d.attr(t,n[e])})}function u(e){var t=e.which||e.keyCode;t!==n.KEY_CODE.... |
from .basesolver import BaseSolver
class Example(BaseSolver):
"""Solve the problem nice and steady!
"""
def __init__(self, input_str):
super().__init__(input_str)
def solve(self):
"""Compute a solution to the given problem.
Save everything in an internal state.
:retu... |
from opentrons import protocol_api
import os
import sys
sys.path.append("/var/lib/jupyter/notebooks")
import labware_modifier
metadata = {
'protocolName': 'Use labware_modifier Module',
'author': 'Opentrons <protocols@opentrons.com>',
'description': 'Loads labware that has been modified',
'apiLevel':... |
//
// SZSlideSwitchManager.h
// xuyong
//
// Created by xuyong on 15/5/14.
// Copyright (c) 2015年 TIXA. All rights reserved.
// @author XuYong, 15-05-14 09:05:01
// 分布式控制器,主要用来多tab显示用,在HMSegmentedControl基础上再封装。欢迎使用,如果你喜欢请关注下,次项目会持续跟新。
#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
XYYSegmentedControlSe... |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import
import os
import sys
from tqdm import tqdm
from dcase_util.datasets import SoundEventDataset
from dcase_util.containers import MetaDataContainer, MetaDataItem, ListDictContainer, AudioContainer
from dcase_util.util... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
rss.py - jenni RSS Module
Copyright 2012-2013, yano (yanovich.net)
Licensed under the Eiffel Forum License 2.
More info:
* jenni: https://github.com/myano/jenni/
* Phenny: http://inamidst.com/phenny/
"""
import feedparser
import socket
import sqlite3
import sys
impo... |
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
*/
#ifndef RTE_EXEC_ENV_LINUXAPP
#error "KNI is not supported"
#endif
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <rte_spinlock.h>
#include <rte_string_fns.h>
#include <rte_ethdev.h>
#... |
"""
WSGI config for AppointmentProject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('D... |
//
// BOXFolderItemsRequest+Metadata.h
// BoxContentSDK
//
// Created by Mina Hattori on 7/19/18.
// Copyright © 2018 Box. All rights reserved.
//
#import <BoxContentSDK/BOXFolderItemsRequest.h>
#import <BoxContentSDK/BOXContentSDKConstants.h>
@interface BOXFolderItemsRequest (Metadata)
@property (nonatomic, rea... |
#include <stdio.h>
#include <stdlib.h>
int main() {
int i, n;
float x=0.5;
// Tabuada de N
printf("\n Numero: ");
scanf("%d", &n);
printf("\n Tabuada de %d", n);
for(i=0; i<=10; i++){
printf("\n %d * %2d = %3d",n,i,n*i);
}
printf("\n\n");
// Multiplos de 0.5
printf("\n Multiplos de 0.5");
for... |
import os.path
import re
from dpa.app.entity import EntityRegistry, EntityError
from dpa.maya.entity.base import SetBasedEntity
# options:
# export types: obj
# -----------------------------------------------------------------------------
class GeomEntity(SetBasedEntity):
category = "geom"
# ------------... |