text stringlengths 3 1.05M |
|---|
// Copyright (c) 2011-2013 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef ROICOIN_QT_MACNOTIFICATIONHANDLER_H
#define ROICOIN_QT_MACNOTIFICATIONHANDLER_H
#include <QObject>
/** Macintosh-sp... |
/* Audio Library for Teensy
* Copyright (c) 2021, Nic Newdigate
*
* 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, ... |
!function(a,b){b.site=a,function c(a,b,d){function e(g,h){if(!b[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=b[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];... |
"""The Hello World package."""
from hashlib import blake2b
__name__ = 'helloworld'
__version__ = "0.0.3"
__author__ = 'Mikel Menta Garde'
__url__ = "https://github.com/mkmenta/python-package-example"
__license__ = "MIT License"
def say_hello(name=None):
"""Say hello to the world or someone.
Args:
na... |
from PyQt5.QtWidgets import QMessageBox, QMainWindow
from PyQt5.QtGui import QPixmap, QBrush, QResizeEvent, QPalette
from PyQt5.QtCore import Qt
from PyQt5 import uic
from datetime import date
import ctypes
class Main_Window(QMainWindow):
def __init__(self, presentador):
QMainWindow.__init__(self)
... |
require('./bootstrap');
// oggetto elementi button 'Cancella'
const deleteBtn = document.getElementsByClassName('delete_btn');
// oggetto elementi button 'Annulla'
const cancelBtn = document.getElementsByClassName('cancel_btn');
// ciclo n volte quanti sono i bottoni 'Cancella' e 'Annulla' (nel nostro caso stessa qua... |
from src import annotations
# Script below can be used to tune paramaters of of sampling and ranking functions
# In current setup, .75 is sampled, and val_reweight is set to 60
# This gives around 81% precision at rank 10 and 77% precision at rank 20
# Only on set T9 do we have more than 20 results, which results in a... |
import * as alt from 'alt';
import * as native from 'natives';
import { distance } from '/client/utility/vector.js';
let itemsOnGround = [];
let objects = [];
let lastDropUpdate = Date.now();
let drawItemsInterval;
const unknownModel = native.getHashKey('sm_prop_smug_rsply_crate02a');
alt.loadModel(unknownModel);
na... |
import numpy as np
import sqlalchemy
import datetime as dt
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
# Database Setup
engine = create_engine("sqlite:///Resources/hawaii.sqlite")
# reflect an existing... |
import pandas as pd
import psycopg2
import uuid
from modules.connector import Bancosql
from modules.connector_cassandra import Cassandra
import __main__
class Insert:
## 1 passo - Editando os arquivos CSV - SQL
def popular_sql():
try:
data = pd.read_csv("Sistema_A_SQL.csv", sep=",") ##sa... |
#!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
const React=require("react");function FinderColor(e){return React.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",width:32,height:32,strokeWidth:!0,stroke:!0},e),React.createElement("g",{filter:"url(#a)"},React.createElement("rect",{width:28,height:24,x:2,y:4,fill:"... |
import { Text, View, Image, TextInput, ImageBackground, KeyboardAvoidingView } from 'react-native';
import React, { Component } from 'react';
import * as Styles from '@res/styles';
import { Button } from '@utils/CustomView';
import { isNaturalNumber } from '@utils/isNatural'
import { COLOR_BLACK} from '@res/color';
imp... |
H5.merge(new System.Globalization.CultureInfo("fr-TD", true), {
englishName: "French (Chad)",
nativeName: "français (Tchad)",
numberFormat: H5.merge(new System.Globalization.NumberFormatInfo(), {
nanSymbol: "NaN",
negativeSign: "-",
positiveSign: "+",
negativeInfinitySymbol:... |
/*
* Backpack - Skyscanner's Design System
*
* Copyright 2018 Skyscanner 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
*
* Un... |
// --------------------------------------
// Variables, strings, numbers, floats
// --------------------------------------
// Exercise 1 - Console and constiables
const firstName = "Anders";
const lastName = "Latif";
// EXERCISE
// show in the console
// My first name is Anders and my last name is Latif
console.log("... |
import numpy as np
a=np.array([[1,2,3],[4,5,6]])
#print(a.shape)
a.shape=(3,2)
print(a)
|
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from web import my_form
from zen import router
def index(_write_tmpl):
url = router.to_path(my_form)
_write_tmpl('templates/home.html', {'form_url': url})
|
"""Basic canvas for animations."""
from __future__ import annotations
__all__ = ["Scene"]
import copy
import datetime
import inspect
import platform
import random
import threading
import time
import types
from queue import Queue
import srt
from manim.scene.section import DefaultSectionType
try:
import dearpyg... |
// eslint-disable-next-line
import * as loginService from '@/api/login'
// eslint-disable-next-line
import { BasicLayout, BlankLayout, PageView, RouteView } from '@/layouts'
// 前端路由表
const constantRouterComponents = {
// 基础页面 layout 必须引入
BasicLayout: BasicLayout,
BlankLayout: BlankLayout,
RouteView: RouteView,... |
/*
* Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
* Copyright (c) 2004 Infinicon Corporation. All rights reserved.
* Copyright (c) 2004 Intel Corporation. All rights reserved.
* Copyright (c) 2004 Topspin Corporation. All rights reserved.
* Copyright (c) 2004 Voltaire Corporation. All ri... |
import React from 'react';
const Navbar = () => {
return (
<div className='navigation'>
<p>Lab 1 - Audio Cues</p>
<p>Lab 2 - Use of Colors</p>
<p>lab 3 - Where to Click</p>
<p>Lab 4 - Autoplay Video</p>
<p>Lab 5 - Captions</p>
</div>
);
}
export default Navbar;
|
/*
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://p... |
import os
import random
import string
import time
import ctypes
try: # Check if the requrements have been installed
from discord_webhook import DiscordWebhook # Try to import discord_webhook
except ImportError: # If it chould not be installed
input(f"Module discord_webhook not installed, to install run '{'py -... |
# coding: utf-8
"""
EXACT - API
API to interact with the EXACT Server # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ImageRegistrations(object):
"""NOTE: This class is au... |
import React, { Component, PropTypes } from 'react';
import CSSModules from 'react-css-modules';
import Todo from './Todo';
import styles from './TodoList.css';
class TodoList extends Component {
createToDo (e) {
e.preventDefault();
const uid = () => Math.random().toString(34).slice(2);
const text = th... |
# model settings
model = dict(
type='CascadeRCNN',
num_stages=3,
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dict(
type='FPN',
... |
!function(e){function r(r){for(var n,i,l=r[0],f=r[1],p=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(a&&a(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r... |
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
steps=250
distance=0
x=0
distance_list=[]
steps_list=[]
while x<steps:
distance+=np.random.randint(-1,2)
distance_list.append(distance)
x+=1
steps_l... |
'use strict';
const { storage, tabs, runtime, alarms } = chrome;
import { getStoredBlackList } from './storage';
chrome.action.onClicked.addListener((tab) => {
tabs.create({
url: 'index.html',
});
});
const background = {
active: false,
sessionTime: 0,
init: async function () {
try {
if (!this... |
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @emails react-co... |
import os, json
class Config:
__INSTANCE = None
@staticmethod
def get_instance():
if not Config.__INSTANCE:
Config.__INSTANCE = Config()
return Config.__INSTANCE
def __init__(self):
self.index = 1
self.base_dir = os.path.dirname(os.path.realpath(__file... |
// Codigo del cuadrado
console.group("Cuadrados");
const ladoCuadrado = 5;
console.log("Los lados del cuadrado miden: " + ladoCuadrado + "cm");
function perimetroCuadrado (lado) {
return lado * 4;
}
console.log("El perimetro del cuadrado es: " + perimetroCuadrado + "cm");
function areaCuadrado (lado) {
retur... |
import React from "react";
function Form(props) {
return (
<form>
<div className="form-group">
<label htmlFor="search">Search:</label>
<input
onChange={props.handleInputChange}
value={props.search}
name="search"
type="text"
className="form-c... |
/**********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
* other uses are authorized. This software is owned by Renesas ... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
function getTestDocument(markup) {
document.open();
document.write(markup || '<!doctype html><html><meta charset=u... |
define(["leaflet", "map.core", "map.events"], function(L, mapCore, mapEvents) {
let button;
let autoFocusEnabled = true;
const eventEmitter = mapCore.getEventEmitter();
const autoFocusingEvents = [
mapEvents.viewport.boundedMarkerCreated,
mapEvents.viewport.boundedMarkerRemoved,
... |
/*
* ScopedLock.h
* ------------
* Purpose: A wrapper class for CSoundFile and CModDoc that ensures that access to those objects is done while a lock is held.
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#pragm... |
import React from "react";
import { GoogleLogout } from "react-google-login";
import { connect } from "react-redux";
import { signOut } from "../redux/auth/actions";
const clientId =
"1005866627235-pkltkjsfn593b70jaeqs8bo841dgtob3.apps.googleusercontent.com";
function Logout(props) {
const onSuccess = () => {
... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef VERSIONAPI_H
#define VERSIONAPI_H
#include "updater.h"
class VersionApi final : public Updater {
Q_DIS... |
$(document).ready(function () {
Global.initParallax({
parent: '#parallax'
});
Global.initParallax({
parent: '#parallax2'
});
Global.fourSlider({
slider: '.four-slider'
});
Global.threeSlider({
slider: '.events'
});
Global.square({
widthEl: '.four-slider__item',
heightEl: '.four-slider__conten... |
//control table
var json_data, dotprobe_table;
function serverData() {
$.ajax({
url: "php/get.php", // this is the path to the above PHP script
type: 'post',
success: function (data) {
json_data = JSON.parse(data);
//if redirect message
if (json_data.redirect !== undefined && json_data.redirec... |
from setuptools import setup, Extension
# check if cython or pyrex is available.
pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext'
for pyrex_impl in pyrex_impls:
try:
# from (pyrex_impl) import build_ext
build_ext = __import__(pyrex_impl, fromlist=['build_ext']).build_ext
... |
import React from 'react';
import ReactDOM from 'react-dom';
import "bootstrap/dist/css/bootstrap.css";
import App from './app';
ReactDOM.render(<App style = {{resize : 'both', width : window.innerWidth, height : window.innerHeight}}/>, document.getElementById("root")); |
function core (method, url, options) {
let xhr = new XMLHttpRequest()
xhr.open(method, url)
xhr.onload = () => {
options.success && options.success(xhr.response)
}
xhr.onerror = () => {
options.fail && options.fail(xhr, xhr.status)
}
xhr.send(options.data)
}
export default {
get () {},
post (... |
#!/usr/bin/env python
import os
import optparse
import sys
import re
from pip.exceptions import InstallationError, CommandError, PipError
from pip.log import logger
from pip.util import get_installed_distributions, get_prog
from pip.vcs import git, mercurial, subversion, bazaar # noqa
from pip.baseparser import Conf... |
import JATS from '../JATS'
import XMLIterator from '../../util/XMLIterator'
let GRAPHIC_ELEMENTS = JATS.ACCESS
.concat(JATS.ADDRESS_LINK)
.concat(['caption', 'object-id', 'kwd-group', 'label'])
.concat(JATS.DISPLAY_BACK_MATTER)
export default {
type: 'graphic',
tagName: 'graphic',
/*
Attribute... |
# Copyright 2019 U.C. Berkeley RISE Lab
#
# 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 agree... |
from kamodo import Kamodo, kamodofy
import numpy as np
import scipy
import datetime
from datetime import timezone
import urllib
import plotly.express as px
import plotly.graph_objects as go
def ror_get_extraction(server, runID, coord, satellite):
'''Query for file contents from server'''
query = '{}/{}/{}/{}_{... |
# -*- coding: utf-8 -*-
"""
stamps.services
~~~~~~~~~~~~~~~
Stamps.com services.
:copyright: 2014 by Jonathan Zempel.
:license: BSD, see LICENSE for more details.
"""
from decimal import Decimal
from logging import getLogger
from re import compile
from suds import WebFault
from suds.bindings.docu... |
var express = require('express');
var router = express.Router();
/* GET developer page. */
router.get('/', function (req, res, next) {
res.render('developer', {
title: 'KITENGE DEVELOPERS'
});
});
module.exports = router; |
import pymongo
MONGO_URL = f"mongodb://127.0.0.1:27017/"
con = pymongo.MongoClient(MONGO_URL)
db = con['test_mongo']
table = db['record']
table.drop()
|
from json_typer import TypeSerializable
class Bar(TypeSerializable):
def __init__(self, *args, **kwargs):
super(Bar, self).__init__(*args, **kwargs)
|
const mongoose = require('mongoose');
const config = require('../config/database');
const Schema = mongoose.Schema;
const tokenSchema = new Schema({
_userId: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: 'User'
},
token: {
type: String,
required: ... |
'''
From https://github.com/tonylins/pytorch-mobilenet-v2
'''
import torch.nn as nn
import math
def conv_bn(inp, oup, stride):
return nn.Sequential(
nn.Conv2d(inp, oup, 3, stride, 1, bias=False),
nn.BatchNorm2d(oup),
nn.ReLU6(inplace=True)
)
def conv_1x1_bn(inp, oup):
return nn.S... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 - present Instructure, Inc.
*
* 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 ri... |
import math
class GaussianPerceptron():
def __init__(self, inputs, targets, n, d, sigma):
super(object, self).__init__()
assert n == len(inputs), 'number of inputs is not equal to n'
assert d == len(inputs[0]), 'number of attributes is not equal to d'
self.w = [0 for i in... |
/* MagicMirror² Test config default calendar with auth by default
*
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
* MIT Licensed.
*/
let config = {
timeFormat: 12,
modules: [
{
module: "calendar",
position: "bottom_bar",
config: {
calendars: [
{
maximumNumberOfDays: 10000,
... |
from bs4 import BeautifulSoup
from string import ascii_lowercase
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
import pypyodbc
import re
from PIL import Image
import urllib.request
import os
'''
TODO: Better organize how I am scraping this data.
For... |
//
// NADInterstitial.h
// NendAd
//
// Created by ADN division on 2014/05/12.
// Copyright (c) 2014年 F@N Communications, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
///-----------------------------------------------
/// @name Constants
///-------------------------------... |
export const cisBorderStyle = ["512 512"," <path fill='currentColor' d='M435,16H77A61,61,0,0,0,16,77V435a61,61,0,0,0,61,61H435a61,61,0,0,0,61-61V77A61,61,0,0,0,435,16ZM160,440H128V408h32Zm56,0H184V408h32Zm56,0H240V408h32Zm56,0H296V408h32Zm56,0H352V408h32Zm56,0H408V408h32Zm0-56H408V352h32Zm0-56H408V296h32Zm0-56H408V240... |
from __future__ import with_statement
from fabric.api import *
def production():
projectname = 'pumpwerk'
basepath = '/srv/pumpwerk.org/%s'
env.hosts = ['pumpwerk@pumpwerk.org']
env.path = basepath % projectname
env.virtualenv_path = basepath % (projectname + 'env')
env.push_branch = 'master'... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_cpy_67a.c
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE193.label.xml
Template File: sources-sink-67a.tmpl.c
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocate memory... |
from keras.models import Sequential, Model
from keras.layers import Reshape, Activation, Conv2D, Input, MaxPooling2D, BatchNormalization, Flatten, Dense, Lambda
from keras.layers.advanced_activations import LeakyReLU
from keras.callbacks import EarlyStopping, ModelCheckpoint, TensorBoard
from keras.optimizers import S... |
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
import time
from datetime import datetime
from random import choice, randint
from telethon.events import St... |
import React from 'react';
import moment from 'moment';
import {createComponentWithIntl} from '@ciscospark/react-test-utils';
import DaySeparator from '.';
describe('DaySeparator component', () => {
const today = moment('2001-01-31');
const yesterday = moment(today).subtract(1, 'days');
const aMonthAgo = moment... |
//
// License type: BSD 3-Clause License
// License copy: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/LICENSE
//
// Created by Stephane Bourque on 2021-03-04.
// Arilia Wireless Inc.
//
#pragma once
#include "framework/MicroService.h"
namespace OpenWifi {
class RESTAPI_blacklist : publi... |
"""Gather -- Collect all your plugins
Gather allows a way to register plugins.
It features the ability to register the plugins from any module,
in any package, in any distribution.
A given module can register plugins of multiple types.
In order to have anything registered from a package,
it needs to declare that it s... |
# def findProfession(level, pos):
# if level == 1:
# return "Engineer"
# tot_nodes = 1
# for i in range(1, level - 1):
# tot_nodes += i*2
# pos -= tot_nodes
# while pos not in range(1, 4):
# pos = (pos - 1)//4
# pos += 1
# if pos == 1 or pos == 4:
#
#
#
#
# print(... |
from typing import Set
from sqlalchemy.orm import joinedload, Session
from sqlalchemy.orm.query import Query
from aspen.app.views.api_utils import authz_sample_filters
from aspen.database.models import DataType, Sample, UploadedPathogenGenome
from aspen.database.models.usergroup import User
class FastaStreamer:
... |
from .. import env
from ..exceptions import EnvironmentFileNotFound
class YamlFileSpec(object):
_environment = None
def __init__(self, filename=None, **kwargs):
self.filename = filename
self.msg = None
def can_handle(self):
try:
self._environment = env.from_file(self.... |
// Auto-generated file. Do not edit!
// Template: src/qs8-dwconv/unipass-avx512skx-mul32.c.in
// Generator: tools/xngen
//
// Copyright 2020 Google LLC
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#include <assert.h>
#includ... |
from django.contrib.auth.decorators import login_required
from django.db import transaction
from django.shortcuts import render, redirect
from django.contrib.auth import login, authenticate
from hasker.profiles.forms import SignUpForm, SettingsForm
def signup(request):
if request.method == 'POST':
form =... |
from random import randint
class Person:
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
self.contacts = {}
self.interests = {}
def add_contact(self, contact):
self.contacts[contact.first_name] = contact
return... |
# Copyright 2019 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 createSvgIcon from './utils/createSvgIcon.js';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M9 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm7 9c-.01-1.34-.83-2.51-2-3 0-1.66-1.34-3-3-3s-3 1.34-3 3v7h2v5h3v-5h3v-4z"
}), 'PregnantWoman'); |
"""
Fractimation Data_Models Subpackage contains various modules and classes related to parameter and
state objects.
Public Modules :
* complex_range_params - Contains class for representing parameters associate with a range of
complex numbers
* formula_params - Contains class for representing parameters a... |
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
*
* parameters = {
* color: <hex>,
* opacity: <float>,
* map: new THREE.Texture( <Image> ),
*
* size: <float>,
*
* blending: THREE.NormalBlending,
* depthTest: <bool>,
* depthWrite: <bool>,
*
* vertexColors: ... |
// This is the Base controller for our project. In every other controller, we inherit functions from our base controller, which make functions reusable in many places.
sap.ui.define(
[
"sap/ui/core/mvc/Controller",
"sap/ui/core/UIComponent",
"sap/ui/core/routing/History",
],
function (Controller, UICo... |
from adafruit_blinka.agnostic import microcontroller
if microcontroller == "esp8266":
pin_count = 10
elif microcontroller == "samd21":
pin_count = 38
else:
raise NotImplementedError("Microcontroller not supported")
|
var _ = require('../lodash-local')
var util = require('../util')
// task definition function
// .task() simply passes through json raw
var task = function(json) {
return json
}
task.toCode = function(json, Flexio) {
var params = JSON.parse(JSON.stringify(json))
delete params['eid']
return 'task(' + JSON.strin... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Retired", "CONTRIBUTION AMOUNT (F3L Bundled)": "50.00", "ELECTION CODE": "G2010", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "Retired", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "4237 Trias Street", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CAND... |
import reversion
from apps.catalog.models.core import *
from django.contrib.auth.models import User
reversion.register(Note)
reversion.register(User)
reversion.register(Comment)
reversion.register(Documentation)
reversion.register(Image)
reversion.register(Video)
reversion.register(Product)
reversion.register(Makey,... |
#pragma once
#include <torch/csrc/jit/ir/ir.h>
namespace torch {
namespace jit {
TORCH_API void ScalarTypeAnalysisForONNX(const std::shared_ptr<Graph>& graph);
} // namespace jit
} // namespace torch |
import lldb # type: ignore[import]
# load into lldb instance with:
# command script import tools/lldb/deploy_debugger.py
target = lldb.debugger.GetSelectedTarget()
bp = target.BreakpointCreateByRegex("__deploy_register_code")
bp.SetScriptCallbackBody("""\
process = frame.thread.GetProcess()
target = process.target
... |
var arrayToSort = [];
var threshold = 100;
var maximumSize = 100;
var bruteForceValue;
var binarySearchValue;
//the number of elements to place in the array
var numElements = Math.floor(Math.random() * threshold);
//display the array when the document loads
$(document).ready(function() {
loop("myList");
});
... |
# -*- coding: utf-8 -*-
#
# {{ cookiecutter.project_name }} documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All con... |
/*!
* Express - request
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var http = require('http')
, req = http.IncomingMessage.prototype
, utils = require('./utils')
, mime = require('mime');
/**
* Default notification formatters.
*/
var defaul... |
//先显示div, 在执行初始化代码
/*
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone"></a><a href="#" class="bds_tsina" data-cmd="tsina"></a><a href="#" class="bds_tqq" data-cmd="tqq"></a><a href="#" class="bds_renren" data-cmd="renren"></a><a href="#" cla... |
# coding: utf-8
#
# Copyright 2020 The Oppia 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 requi... |
module.exports = {
client: {
name: 'DELISH [web]',
service: 'themealdb-graph'
}
}
|
/** \file
* \brief inheritance of file descriptors
*/
/*
* Copyright (c) 2010, 2012, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Z... |
/* Generated by CIL v. 1.7.0 */
/* print_CIL_Input is false */
struct _IO_FILE;
struct timeval;
extern float strtof(char const *str , char const *endptr ) ;
extern void signal(int sig , void *func ) ;
typedef struct _IO_FILE FILE;
extern int atoi(char const *s ) ;
extern double strtod(char const *str , char co... |
from django import template
from django.contrib.contenttypes.models import ContentType
register = template.Library()
@register.assignment_tag
def has_unread_events(object, unread_events):
content_type = ContentType.objects.get_for_model(object)
obj_list = [event for event in unread_events.get(content_type.... |
"""
Statistical tools for time series analysis
"""
from __future__ import annotations
from statsmodels.compat.numpy import lstsq
from statsmodels.compat.pandas import deprecate_kwarg
from statsmodels.compat.python import Literal, lzip
from statsmodels.compat.scipy import _next_regular
from typing import Tuple
import ... |
// Copyright 2018, Timothy Davison. All rights reserved.
#pragma once
#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "CollectionSpace.generated.h"
UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class LIFEBRUSH_API UInteractionSpace : public USceneComponent
{
GENERATED_... |
// Generated by CoffeeScript 1.12.7
/*
@file
Handles the functionality of the photography game.
*/
(function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototyp... |
import React, { Component } from "react";
import {
Container,
Header,
Title,
Content,
Button,
Icon,
Left,
Right,
Body,
Text,
ListItem,
List
} from "native-base";
import styles from "./styles";
const datas = [
{
route: "Header1",
text: "Only Title"
},
{
route: "Header2",
... |
from .base import Unknown
from .dhl import DHLAWB
from .dhl import DHLEXPRESSBOXNUM
from .fedex import FedExExpress
from .fedex import FedExGround96
from .ontrac import OnTrac
from .ups import UPS
from .usps import USPSIMpb
from .usps import USPSS10
from .usps import USPS20
barcode_classes = ['DHLAWB', 'DHLEXPRESSBOX... |