text stringlengths 3 1.05M |
|---|
import React from 'react'
import PropTypes from 'prop-types'
import SvgContainer from './SvgContainer'
const Medal = props => {
return (
<SvgContainer
height={props.height}
width={props.width}
color={props.color}
onClick={props.onClick}
rotate={props.rotate ? 1 : 0}
shake={pr... |
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var utilities = require('gulp-util');
var buildProduction = utilities.env.production;
var del = require('del');
var jshint = require(... |
# coding: utf-8
"""
Trend Micro Deep Security API
Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate De... |
# -*- coding: utf-8 -*-
#
# This class was auto-generated.
#
from onlinepayments.sdk.data_object import DataObject
class LabelTemplateElement(DataObject):
"""
| Array of attribute keys and their mask
"""
__attribute_key = None
__mask = None
@property
def attribute_key(self):
"""
... |
import sys, os
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
sys.path.append(sys.path.append(os.path.dirname(__file__) + "/.."))
from mnist_neural_network import mnist_neural_network
def variable(shape, name):
initial = tf.truncated_normal(shape, stddev = 0.1)
return tf.Variabl... |
/**
* https://en.wikipedia.org/?title=YPbPr
*
* YPbPr is analog form of YCbCr
* hence limits are [0..1]
*
* Default conversion is ITU-R BT.709
*
* @module color-space/ypbpr
*/
var rgb = require('./rgb');
var ypbpr = module.exports = {
name: 'ypbpr',
min: [0,-0.5,-0.5],
max: [1, 0.5, 0.5],
channel: ['Y',... |
const rootRouter = require('express').Router();
const Place = require('../models/place');
const logger = require('../../config/logger');
const sanitize = require('../../bin/sanitizer');
rootRouter.get('/', (req, res, next) => {
res.render('index', { user: req.user, message: req.flash('message') },
(err, html) ... |
from datetime import datetime
import pytest
from tests.conftest import CSV_FOLDER, TESTS_FOLDER
from vigorish.app import Vigorish
from vigorish.database import Season
from vigorish.enums import DataSet
from vigorish.tasks.import_scraped_data import ImportScrapedDataTask
@pytest.fixture()
def vig_app(request):
"... |
const types = require('../constants/ActionTypes');
const { push } = require('react-router-redux');
const ReactGA = require('react-ga');
const { setForm, resetForm } = require('./FormActions');
const { requestedQuery, receivedQuery, setError, setSuccess, resetSuccess } = require('./QueryActions');
const commonsAPI = req... |
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from ping.defaults import *
from collections import OrderedDict
def checks(request):
"""
Iterates through a tuple of systems checks,
then returns a key name for the check and the v... |
from pathlib import Path
from s3_helpers import upload_file_to_s3
from os.path import join
def s3_sync(s3_bucket: str, s3_root_key: str, local_folder_path: str) -> bool:
"""
Copy a directory tree from a local folder to an S3 bucket.
:param s3_bucket: Name of the S3 bucket.
:param s3_root_key: Name of... |
const ascii = require('ascii-art')
var LogService = function(Configuration){
var renderedLogo = false;
var buffer = [];
const APP_NAME = Configuration.app;
initializeApp();
const target = 'Log';
init(target);
initErrorHandling();
function err(msg, target){
console.error('ER... |
/*
LittleJS Platformer Example - Effects
- Plays different particle effects which can be persistant
- Destroys terrain and makes explosions
- Outlines tiles based on neighbor types
- Generates parallax background layers
- Draws moving starfield with plants and suns
- Tracks zzfx sound effect... |
// deklarasi path url host
var url = window.location.origin+"/~maulayyacyber/nyimakid/auth/";
// Get data chart
function GetToday(tgl)
{
var dataString = 'tgl='+ tgl;
$.ajax({
type: "POST",
url: url+"dashboard/get_chart_today",
data: dataString,
dataType: 'json',
cache: ... |
/* SPI pins */
#define SPI_MOSI_PIN MOSI
#define SPI_MISO_PIN MISO
#define SPI_SCLK_PIN SCK
static const byte DIR_PIN = 0; // atmega pin 20, digital pin 0/RX; direction of stepper, HIGH: clockwise, LOW: counter clockwise
static const byte PULSE_PIN = 1; // atmega pin 21, digital pin 1/TX; provid... |
var Type = require("@kaoscript/runtime").Type;
module.exports = function() {
class Weekday {
constructor() {
this.__ks_init();
this.__ks_cons(arguments);
}
__ks_init() {
}
__ks_cons_0(index, name) {
if(arguments.length < 2) {
throw new SyntaxError("Wrong number of arguments (" + arguments.length... |
/**
* Copyright 2017 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the 'License'); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(null, {file:"js/jquery.min.js"})
chrome.tabs.executeScript(null, {file:"js/jszip.min.js"})
chrome.tabs.executeScript(null, {file:"js/jszip-utils.min.js"})
chrome.tabs.executeScript(null, {file:"js/FileSaver.min.js"})
chrome.tabs.e... |
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import formControlState from '../FormControl/formControlState';
import useFormControl from '../FormControl/useFormControl';
import withStyles from '../styles/withStyles';
export const styles = theme => ({
/* Styles applied t... |
import os
import discord
from discord.ext import commands
from discord import utils
import discord.emoji
class Channels(commands.Cog):
def __init__(self, bot):
self.bot = bot
def get_news_role(self, ctx, channel: discord.TextChannel = None):
ch = channel if channel else ctx.channel
re... |
from __future__ import absolute_import
from __future__ import print_function
import os
import veriloggen
import thread_stream_multipattern
def test(request):
veriloggen.reset()
simtype = request.config.getoption('--sim')
rslt = thread_stream_multipattern.run(filename=None, simtype=simtype,
... |
"""Per-prefix data, mapping each prefix to a dict of locale:name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2021 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... |
//
// Created by zhanglei on 2020/11/14.
//
#ifndef PHPLOGGUARD_UNIXCONDITIONMUTEX_H
#define PHPLOGGUARD_UNIXCONDITIONMUTEX_H
#include <pthread.h>
#include <iostream>
#include "UnixMutex.h"
namespace OS {
class UnixConditionMutex :Noncopyable {
public:
/**
* 初始化条件变量互斥器
* @param mute... |
import time
from ichnaea.models import Radio
from ichnaea.api.submit.tests.base import BaseSubmitTest
from ichnaea.tests.base import CeleryAppTestCase
from ichnaea.tests.factories import (
CellFactory,
WifiFactory,
)
class TestSubmitV2(BaseSubmitTest, CeleryAppTestCase):
url = '/v1/geosubmit'
metric... |
from __future__ import division
from typing import Dict, Tuple, List, Iterable, Set, Any, DefaultDict, Optional, TYPE_CHECKING
from collections import Counter, defaultdict
from difflib import SequenceMatcher
from itertools import combinations, chain, permutations
from pydfs_lineup_optimizer.settings import LineupPositi... |
import Vue from 'vue'
import iView from 'iview'
import {router} from './router/index'
import {appRouter} from './router/router'
import store from './store'
import App from './app.vue'
import '@/locale'
import 'iview/dist/styles/iview.css'
import VueI18n from 'vue-i18n'
import util from './libs/util'
import storage from... |
# Copyright 2020 Louise Poubel
#
# 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 writing... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
#!/usr/bin/env python3
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Copyright (c) 2019-2020 The Verge Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
from ds_store import DSStore
from mac_a... |
{
"cells": [
{
"cell_type": "code",
"execution_count": 20,
"id": "eced0ee2",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO:root:__set__: '2.2.2.2'\n"
]
},
{
"ename": "ValidationException",
"evalue": "5.5.5. is ... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
import React, { useContext, useEffect, useState } from 'react';
import { useHistory, useParams } from 'react-router';
import thegraph from '../../../api/thegraph';
import '../styles.css';
// import GuildsInfo from '../components/GuildInfo/GuildInfo';
import GuildsGotchis from '../components/GuildGotchis';
import GuildB... |
import json
from argus.callbacks import MonitorCheckpoint, \
EarlyStopping, LoggingToFile, ReduceLROnPlateau
from torch.utils.data import DataLoader
from src.stacking.datasets import get_out_of_folds_data, StackingDataset
from src.stacking.transforms import get_transforms
from src.stacking.argus_models import St... |
#!/usr/bin/python3
import copy
import json
import logging
import math
import os
import pycurl
import queue
import shutil
import threading
import time
from datetime import datetime
import requests
import yaml
from watchdog.events import FileSystemEventHandler
from watchdog.observers.polling import PollingObserver
logg... |
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/SpringBoardFoundation.framework/SpringBoardFoundation
*/
@interface SBFObserver : NSObject
+ (id)observerWithResultBlock:(id /* block */)arg1;
+ (id)observerWithResultBlock:(id /* block */)arg1 completionBlock:(id /* block */)arg2 failureBloc... |
MWF.xApplication.Forum = MWF.xApplication.Forum || {};
MWF.xDesktop.requireApp("Template", "Explorer", null, false);
MWF.xDesktop.requireApp("Template", "MPopupForm", null, false);
MWF.require("MWF.widget.O2Identity", null,false);
MWF.xApplication.Forum.Setting = new Class({
Extends: MWF.widget.Common,
Impleme... |
import React, { useState } from 'react';
import DancingStickers from '../../../../ds-api/write';
import { getStickersByEmojiSet } from '../../../../ds-api/common/stickers';
import StickersList from './stickers-list';
import EmojisSelector from './emojis-selector';
import * as style from './style.scss';
function Stic... |
load("1d8ada728956c1a3d52d68d1d4d6dd52.js");
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --crankshaft
(function() {
function foo(a) { return a.pop(); }
var x... |
/*
* 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 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be use... |
R = float(input('Quantos reais você tem? '))
print('Em fevereiro de 2020 você podera retirar até \nU${:.2f} \nE${:.2f} \nY${:.2f} \nL${:.2f}'.format(R/4.39, R/4.76, R/0.39, R/5.69))
|
const { Sequelize } = require("sequelize");
module.exports = (sequelize, DataTypes) => {
const Profile = sequelize.define("Profile", {
image: {
type: Sequelize.STRING,
allowNull: true,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},
bio: {
type: DataTypes.STR... |
/**
* Layout component that queries for data
* with Gatsby's StaticQuery component
*
* See: https://www.gatsbyjs.org/docs/static-query/
*/
import React from "react"
import { StaticQuery, graphql, Link } from "gatsby"
import { FiFacebook, FiInstagram, FiMail } from "react-icons/fi"
import { Container, Row, Col } f... |
if (FuseBox.isServer) {
module.exports = global.require('timers');
} else {
// Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the... |
import Layout from "./layout"
import React from "react"
const Header = () =>
<header class="header">
<h1 class="header__title">
Day / Night<br>
Tumbler
</h1>
<div class="tumbler__wrapper">
<div class="tumbler"></div>
</div>
</header>
export default Header
|
import math
import torch
from torch import optim
from models import BaseVAE
from models.types_ import *
from utils import data_loader
import pytorch_lightning as pl
from torchvision import transforms
import torchvision.utils as vutils
from torchvision.datasets import CelebA
from torch.utils.data import DataLoader
impor... |
import os
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.test import RequestFactory, TestCase
from django.urls import reverse
from photographic.users.models import User
from photographic.photos.models import Photo
from photographic.photos.views import DetailView
from... |
/**
* @author mrdoob / http://mrdoob.com/
* @author kile / http://kile.stravaganza.org/
* @author alteredq / http://alteredqualia.com/
* @author mikael emtinger / http://gomo.se/
* @author zz85 / http://www.lab4games.net/zz85/blog
* @author bhouston / http://exocortex.com
*/
THREE.Geometry = function () {
thi... |
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/duration.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg_internal.h"
#include "google/protobuf/duration.upb.h"
#include "upb/port_... |
const path = require('path');
const express = require('express');
const productsController = require('../controllers/products');
const router = express.Router();
router.get('/', productsController.getProducts);
module.exports = router;
|
/*
* Copyright 2006-2016 zorba.io
*
* 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... |
const db = require("../../config/db");
const Base = require("./Base");
Base.init({ table: "recipe_files" });
module.exports = {
...Base,
async getIdFiles(id) {
const results = await db.query(`SELECT * FROM recipe_files WHERE id = $1 `, [id]);
return results.rows[0].file_id;
... |
import os
import sys
sys.path.append('../../common')
from env_indigo import *
indigo = Indigo()
for root, dirnames, filenames in os.walk(joinPathPy("molecules/set1", __file__)):
filenames.sort()
for filename in filenames:
sys.stdout.write("%s: " % filename)
try:
... |
"""
BiMPM (Bilateral Multi-Perspective Matching) model implementation.
"""
from typing import Dict, List, Any
from overrides import overrides
import torch
from allennlp.common.checks import check_dimensions_match
from allennlp.data import TextFieldTensors, Vocabulary
from allennlp.modules import FeedForward, Seq2Seq... |
# coding: utf-8
"""
Argo Events
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... |
$(function () {
"use strict";
$('[data-toggle="offcanvas"]').on("click", function () {
$(".main-sidebar").toggleClass("sidebar-active");
$(".hamburger").toggleClass("is-active");
$('body').toggleClass('sidebar-fixed')
});
});
$(function () {
"use strict";
$('.sidebardrop').on("click", function ... |
import { default as Form } from './form.svelte'
import { default as Field } from './field.svelte'
import { default as Fields } from './fields.svelte'
Form.Field = Field
Form.Fields = Fields
export {Form, Field, Fields}
export default Form
|
import { isUndefined } from '../isUndefined';
import { coerceArray } from '../coerceArray';
import { toBoolean } from '../toBoolean';
import { isFunction } from '../isFunction';
/**
* Each plugin that wants to add support for entities should extend this interface.
*/
var EntityCollectionPlugin = /** @class */ (functi... |
####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
from djan... |
import Vue from 'vue'
const TIME_LIMIT = 500
const _nextTick = function (func, thisArg, ...args) {
if (!func || typeof func !== 'function') return
if (!func.startTime) {
func.startTime = new Date()
}
if (new Date() - func.startTime > TIME_LIMIT) {
func.startTime = null
} else {
Vue.nextTick(() =... |
import Stripe from 'stripe';
import debug from 'debug';
import { isEmail, isNumeric } from 'validator';
import {
getAsyncPaypalToken,
verifyWebHook,
updateUser,
verifyWebHookType
} from '../utils/donation';
import {
durationKeysConfig,
donationOneTimeConfig,
donationSubscriptionConfig,
durationsConfig,... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.11/esri/copyright.txt for details.
//>>built
define({zoom:"\u062a\u0642\u0631\u064a\u0628 \u0625\u0644\u0649",next:"\u0627\u0644\u0645\u0639\u0644\u0645 \u0627\u0644\u062a\u0627\u0644\u064a",previous:"\u0627\... |
#pragma once
#include <string>
/*
* Evaluate a string in the following grammar.
*
* <input> := <expression>
* <expression> := <term> | <term> + <expression> | <term> - <expression>
* <term> := <factor> | <factor> * <term> | <factor> / <term>
* <factor> := ( <expression> ) | <number>
* <number> := 12, 5, -... |
import base from './base';
import goods from './goods';
import shop from './shop';
import member from './member';
export default class config extends base {
static fieldsToCopy = {
SWIPER: ['height'],
IMAGE_BOX: ['height', 'width', 'isTitle'],
GOODS_BOX: ['isCart', 'isPrice', 'is... |
import _ from 'lodash'
import componentState from '../component/state'
export default _.extend(componentState(),{
})
|
"""
Base classes for job runner plugins.
"""
import datetime
import logging
import os
import string
import subprocess
import sys
import threading
import time
import traceback
from six.moves.queue import (
Empty,
Queue
)
import galaxy.jobs
from galaxy import model
from galaxy.jobs.command_factory import build_... |
$(function() {
console.log('wrgebrwge');
$.getJSON("data/index.php", function (data) {
var items = [];
$.each(data, function (key, val) {
items.push("<li id='" + key + "'>" + val + "</li>");
});
$("<ul/>", {
"class": "my-new-list",
html: items.join("")
}).appendTo("#foo");
}... |
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db.models import Q, F
from olympia.users.models import UserProfile
from olympia.translations.models import Translation
class Command(BaseCommand):
help = "Fix summary of broken language packs for #5432"
def hand... |
/* filename: cola_rates_script.js
last modified: 06/23/2020
description: File contains functions specific to cola webscraping from
aoprals.state.gov and exports these functions.
Should be imported into main server entry point,
server.js and sched... |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements a FloatWithUnit, which is a subclass of float. It
also defines supported units for some commonly used units for energy, length,
temperature, time and charge. FloatWithUnit also support conversion to ... |
import React from 'react'
import {
Wrapper,
Form,
TextFieldColor,
DeleteButtonWrapper,
} from './NewTimeEntryCategoryForm.styles'
import PropTypes from 'prop-types'
import { SectionTitle } from '../../_shared/SectionTitle/SectionTitle'
import { DeleteButton } from '../../_shared/DeleteButton'
import { ErrorMess... |
from marionette import Actions
def press_release(marionette, wait_for_condition, expected):
testAction = marionette.absolute_url("testAction.html")
marionette.navigate(testAction)
action = Actions(marionette)
button = marionette.find_element("id", "button1")
action.press(button).release().perform()
... |
from django.contrib.auth.models import User
from user.models import NotificationRegistration
from fcm_django.models import FCMDevice
from notifications.signals import notify
def generate_notifications(service, given_kwargs):
"""
A function to generate notifications for a service
:param service: The servic... |
from hdx.utilities.text import get_fraction_str
def calculate_ratios(ratios, items_per_country, affected_items_per_country):
for countryiso in items_per_country:
if countryiso in affected_items_per_country:
ratios[countryiso] = get_fraction_str(
affected_items_per_country[count... |
#!/usr/bin/env python3
import rospy
from wecook.msg import ActionMsg, TaskMsg, SceneMsg, ObjectMsg, ContainingMsg, AgentMsg
def talker():
pub = rospy.Publisher('WeCookDispatch', TaskMsg, queue_size=10)
rospy.init_node('wecook_fruit_jelly', anonymous=True)
scene_msg = SceneMsg([ObjectMsg('table0',
... |
import singleSpaAngular from 'single-spa-angular';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import mainModule from './main-module.ts';
import { Router } from '@angular/router';
import {ApplicationRef} from '@angular/core';
const ngLifecycles = singleSpaAngular({
domElementGe... |
from .BaseException import BaseException
from .RequestException import *
from .ResponseException import * |
from .. import _TextInput
def parse_json(content_json):
text_input = _TextInput._create()
text_input._max_length = content_json.read("max_length", text_input._max_length)
text_input._placeholder_text = content_json.read("placeholder_text", text_input._placeholder_text)
text_input._input_text = content... |
# -*- coding: utf-8 -*-
"""The main ``lutugino`` package."""
|
# asks you to fix this code so that it prints a sorted list of all of our friends (alphabetical)
friends = ['Simon', 'Patty', 'Joy', 'Carrie', 'Amira', 'Chu']
new_friend = ['Stanley']
# my code starts here
new_list = friends + new_friend
new_list.sort()
print(new_list)
# alternative way, as given in course as exa... |
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os.path
import sqlite3
import mock
import pytest
import six
from pre_commit import git
from pre_commit.store import _get_default_directory
from pre_commit.store import Store
from pre_commit.util import cmd_output
from pre... |
const express = require("express");
const app = express();
const cors = require("cors");
const pool = require("./db");
app.use(cors());
app.use(express.json());
app.get("/voting", async (request, response) => {
console.log("Get all request");
try {
const allTodos = await pool.query("SELECT * FROM voting_app.c... |
import sqlalchemy as sa
from sqlalchemy import and_
from sqlalchemy import cast
from sqlalchemy import column
from sqlalchemy import desc
from sqlalchemy import event
from sqlalchemy import exc as sa_exc
from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import inspect
from sqlalchemy import ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/get_pet_labels.py
#
# PROGRAMMER: Steven Rojas <steven.rojas@gmail.com>
# DATE CREATED: 2018-10-17
# REVISED DATE:
# PURPOSE: Create the func... |
module.exports = MockChannelAPI
function MockChannelAPI() {
this.ops = []
}
MockChannelAPI.prototype.setChannelMetrics = function(id, updates, callback) {
this.ops.push(["setChannelMetrics", id, updates])
}
|
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t; python-indent-offset: 2 -*-
# vim: tabstop=2:shiftwidth=2:noexpandtab
# kate: tab-width 2; replace-tabs off; indent-width 2;
# ==============================================================================
# Authors: Patrick Lehmann
#
# Python fu... |
const arr = [1, 2, 3, 4, 5, 6, 7, 8];
console.log(arr.map(n => n * 2)); // [ 2, 4, 6, 8, 10, 12, 14, 16 ]
console.log(arr.filter(n => n % 3 === 0)); // [ 3, 6 ]
console.log(arr.find(n => n > 4)); // 5
console.log(arr.every(n => n !== 0)); // true
console.log(arr.some(n... |
/******************************************************************************
* @file arm_vec_filtering.h
* @brief Private header file for CMSIS DSP Library
* @version V1.7.0
* @date 30. October 2019
******************************************************************************/
/*
* Copyright (c) 2... |
#ifndef sum_h
#define sum_h
#include "bit.h"
#include "obj.h"
void sum_learn(case_obj_t obj[], long objsz, long type);
case_bit_t sum_classify(case_obj_t obj, long type);
#endif
|
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'rereferencingDialogUi.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_rereferencingDialog(object):
def setupUi(self, rerefer... |
# Automatically generated from poetry/pyproject.toml
# flake8: noqa
# -*- coding: utf-8 -*-
from setuptools import setup
packages = \
['c7n',
'c7n.actions',
'c7n.filters',
'c7n.reports',
'c7n.resources',
'c7n.ufuncs']
package_data = \
{'': ['*']}
install_requires = \
['argcomplete>=1.11.1,<2.0.0',
'boto3>=1.12... |
# Copyright 2016 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... |
import logging
import threading
from queue import Queue
from typing import Optional
try:
import miniupnpc
except ImportError:
pass
log = logging.getLogger(__name__)
class UPnP:
thread: Optional[threading.Thread] = None
queue: Queue = Queue()
def __init__(self):
def run():
t... |
// Freelancer Theme JavaScript
(function($) {
"use strict"; // Start of use strict
// jQuery for page scrolling feature - requires jQuery Easing plugin
$('.page-scroll a').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anc... |
export { Cases } from './Cases';
|
import E from '../errors';
import ejs from 'ejs';
import fs from 'fs-extra';
import getEndpoints from '../endpoints';
import jws from 'jws';
import open from 'open';
import path from 'path';
import snooplogg from 'snooplogg';
import TokenStore from '../stores/token-store';
import * as environments from '../environment... |
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
'use strict';
const express = require('express');
const router = express.Router();
const Category = require('../models/category');
const Note = require('../models/note');
const ctrl = require('../controllers/category');
router.param('id', (req, res, next, id) => {
Category.findById(id, (err, category) => {
if... |
import IntegrationForm from './IntegrationForm';
import DocLink from 'Shared/DocLink/DocLink';
const DatadogForm = (props) => (
<>
<div className="p-5 border-b mb-4">
<div>How to integrate Datadog with OpenReplay and see backend errors alongside session recordings.</div>
<DocLink className="mt-4" la... |
import datetime
import logging
from httpx import Response
from hamcrest import assert_that, equal_to
from ariadne.asgi import (
GQL_CONNECTION_ACK,
GQL_CONNECTION_ERROR,
GQL_CONNECTION_INIT,
)
from models import Session
GQL_INIT = {"type": GQL_CONNECTION_INIT, "payload": {}}
"""
When we have a user in the ... |
#!/usr/bin/env python3
import logging
from typing import List, Optional
from synthaser import settings
from synthaser.models import Serialiser, Domain
LOG = logging.getLogger(__name__)
def traverse_graph(graph, rules, domains, classifiers=None):
"""Traverses a rule graph and classifies a collection of domains... |