text
stringlengths
3
1.05M
"""Mini-functions that do not belong elsewhere.""" from datetime import datetime def current_time(template="%Y%m%d %H:%M:%S"): return datetime.now().strftime(template)
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file IPCC/IPCC_HalfDuplexMode_DualCore/CM0PLUS/Src/main.c * @author MCD Application Team * @brief Main program body *************************************************************************...
/** * Module dependencies. */ var $ = require('helix'), should = require('chai').should(); describe('Helix', function(){ describe('Helix(selector, context)', function(){ it('should select correct element', function(){ var el = $('.name'); el[0].should.have.property('nodeType').with.valueOf(1)...
from django import forms from selectable.forms import AutoCompleteSelectField from selectable.forms import AutoCompleteSelectWidget from opendata.catalog.lookups import CityLookup, CountyLookup from .models import Suggestion class SuggestUrlForm(forms.Form): url = forms.URLField() class SuggestionCreateForm(fo...
/** * Module configuration and setup for Spark Boxcar test planning module * * @author Randall Crock * @copyright 2015 NetApp, Inc. * @date 2015-09-01 * */ (function() { 'use strict'; angular .module('spark.planner.boxcar', [ 'angular-spinkit', 'mgcrea.ngStrap', ...
/** ****************************************************************************** * @file stm32f7xx_hal_flash.h * @author MCD Application Team * @brief Header file of FLASH HAL module. ****************************************************************************** * @attention * * <h2><center>&cop...
/** * Module dependencies */ var configuration = require('../core/configuration') , path = require('path') , glob = require('glob') , corePath = require('../core/path'); /** * Core server configs for your app. Use DEV__, STAG__, PROD__ prefixes * to set specific environmental configurations. When you set s...
/**************************************************************************** **************************************************************************** *** *** This header was automatically generated from a Linux kernel header *** of the same name, to make information necessary for userspace to *** call i...
let http = require('http'); let server = http.createServer(); let port = 3000; //server.listen(port, function() { server.listen(port, () => { console.log('Web server started. : %d', port); }); //server.on('connection', function(socket) { server.on('connection', (socket) => { let addr = socket.address(); ...
/** * Copyright 2018 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...
/* eslint-disable no-useless-escape */ const crypt = require('../../common/crypt'); require('../../common/register'); function work(req, res) { if (req.method !== 'POST') { res.writeHead(403, {}); res.end('请使用post方式发送'); } const chunks = []; let size = 0; req.on('data', function (buff) { size = b...
from typing import Tuple from ground.hints import (Scalar, Segment) from hypothesis import given from locus.segmental import Tree from tests.utils import to_segments_distance from . import strategies @given(strategies.trees_with_segments) def test_basic(tree_with_segment: Tuple[Tree, Segme...
// Copyright (c) 2009 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 CHROME_BROWSER_SYNC_SYNC_UI_UTIL_MAC_H_ #define CHROME_BROWSER_SYNC_SYNC_UI_UTIL_MAC_H_ #include "chrome/browser/sync/sync_ui_util.h" #impor...
#!/usr/bin/env python import os import subprocess import time from setuptools import find_packages, setup import torch from torch.utils.cpp_extension import BuildExtension, CUDAExtension def readme(): with open('README.md', encoding='utf-8') as f: content = f.read() return content MAJOR = 1 MINOR =...
import { loadFragment, toClassName, decorateIcons, insertNewsletterForm, } from '../../scripts/scripts.js'; /** * collapses all open nav sections * @param {Element} sections The container element */ function collapseAll(elems) { elems.forEach((section) => { section.setAttribute('aria-expanded', 'fals...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSHelperFn, AWSObject, AWSProperty, If, FindInMap, Ref from .validators import boolean, integer, exactly_one, mutually_exclusive from . import cloudformation EC2_INSTANCE_LAUNCH = "autosc...
import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; const plugins = ['sinon-chai', 'chai-dom']; export default plugins.map(plugin => ({ input: plugin, output: { dir: 'plugins', }, plugins: [resolve(), commonjs()], }));
import factory from factory.django import DjangoModelFactory from d2e_share_splitter.shareconf.factories import ProjectFactory from d2e_share_splitter.sharecontributions.models import Contribution from d2e_share_splitter.sharecontributions.models import ContributionTypeChoices class ContributionFactory(DjangoModelFa...
/* * Copyright (c) 2016, Alliance for Open Media. All rights reserved * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at w...
# 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 """Tests for certbot._internal.main.""" # pylint: disable=too-many-lines from __future__ import print_function import datetime import itertools import json import shutil import sys import tempfile import traceback import unittest import josepy as jose try: import mock except ImportError: # pragma: ...
# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # # SPDX-License-Identifier: MIT import os import sys sys.path.insert(0, os.path.abspath("..")) # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings...
#ifndef _NUODB_PAYMENT_H_ #define _NUODB_PAYMENT_H_ #include "nuodb_common.h" int execute_payment(struct db_context_t *dbc, struct payment_t *data); #endif /* _NUODB_PAYMENT_H_ */
import json from django import VERSION from django.conf import settings try: from django.conf.urls import url except ImportError: # Django < 1.4 from django.conf.urls.defaults import url from django.contrib.admin import ModelAdmin, TabularInline, StackedInline from django.contrib.admin.opti...
'use strict'; var tape = require('../lib/thaliTape'); var testUtils = require('../lib/testUtils.js'); var extend = require('js-extend').extend; var crypto = require('crypto'); var Promise = require('bluebird'); var PouchDB = require('pouchdb'); var express = require('express'); var expressPouchDB = require('express-p...
import Router from 'express'; const router = Router(); import UserController from "../controllers/UserController.js"; //Login router.get('/login', UserController.showLoginForm); router.post('/login', UserController.login); //Register router.get('/register', UserController.registerationForm); router.post('/register',...
import PaymentMethod from './PaymentMethod'; export { default as PaymentMethodFormContext } from './context/PaymentMethodFormContext'; export default PaymentMethod;
// // RMMapTiledLayerView.h // MapView // // Copyright (c) 2008-2013, Route-Me Contributors // All rights reserved. // // 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...
import os from options.test_options import TestOptions from data import CreateDataLoader from models import create_model from util.visualizer import save_images from util import html if __name__ == '__main__': opt = TestOptions().parse() opt.nThreads = 1 # test code only supports nThreads = 1 opt.batchS...
from setuptools import setup setup( name='hatena_blog', version='0.0.1', description='Hatena Blog Atom API Wrapper', author='Tatsuya Matoba', author_email='tatsuya.matoa.wk.jp@gmail.com', packages = ['hatena_blog'], include_package_data=True, install_requires=[ 'requests', ...
from rest_framework import serializers from .models import Drug, Interaction class DrugSearchSerializer(serializers.Serializer): name = serializers.CharField() class DrugSerializer(serializers.ModelSerializer): class Meta: model = Drug fields = ( 'id', 'rxcui', ...
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPrint = (props) => ( <SvgIcon {...props}> <path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/> </...
"""init Revision ID: 49e0df2ddbd6 Revises: Create Date: 2022-03-14 17:47:20.964917 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '49e0df2ddbd6' down_revision = None branch_labels = None depends_on = None def upgrad...
// THIS FILE IS AUTO GENERATED import { GenIcon } from '../lib'; export function AiOutlineFunction (props) { return GenIcon({"tag":"svg","attr":{"t":"1569683610100","viewBox":"0 0 1024 1024","version":"1.1"},"child":[{"tag":"defs","attr":{},"child":[]},{"tag":"path","attr":{"d":"M841 370c3-3.3 2.7-8.3-0.6-11.3-1.5-1....
import math import torch from torch import nn import torch.nn.functional as F from utils import set_init class DiscreteNet(nn.Module): def __init__(self, s_dim, a_dim): super(DiscreteNet, self).__init__() self.s_dim = s_dim self.a_dim = a_dim self.pi1 = nn.Linear(s_dim, 128) ...
import datetime from mongoengine import Document, EmbeddedDocument, StringField, IntField from mongoengine import EmbeddedDocumentField, DateTimeField, ListField from django.conf import settings from crits.core.crits_mongoengine import CritsBaseAttributes, CritsDocumentFormatter from crits.campaigns.migrate import mi...
import styled from 'styled-components'; export const StyledMenu = styled.nav` display: flex; flex-direction: column; justify-content: center; background: ${({ theme }) => theme.primaryLight}; transform: ${({ open }) => open ? 'translateX(0)' : 'translateX(-100%)'}; height: 100vh; text-align: left; padd...
/* ** Buggy-Mushroom's Spore Game Library ** Copyright (C) 2008-2009, Buggy-Mushroom Studio ** ** bsglRect util class header */ #ifndef BSGLRECT_H #define BSGLRECT_H class bsglRect { public: float x1; float y1; float x2; float y2; bsglRect(); bsglRect(float _x1, float _y1, float _x2, float...
import click import os import sys import typing from fly import Fly import tempfile import importlib.machinery as imm import signal from fly.__init__ import __version__ as __version__ class FlyNotFoundError(Exception): pass @click.command() @click.version_option(__version__) @click.argument( "app", type=c...
/*------------------------------------------------------------------------- * * selfuncs.c * Selectivity functions and index cost estimation functions for * standard operators and index access methods. * * Selectivity routines are registered in the pg_operator catalog * in the "oprrest" and "oprjoin" att...
!function(){"use strict";var e,t,n,a,s,c,r,o={},i={};function f(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,f),n.loaded=!0,n.exports}f.m=o,e=[],f.O=function(t,n,a,s){if(!n){var c=1/0;for(i=0;i<e.length;i++){n=e[i][0],a=e[i][1],s=e[i][2];for(...
define([ 'dojo/_base/declare', 'dijit/_WidgetBase', 'dojo/on', 'dojo/dom-class', './Button', 'dojo/dom-construct', 'dijit/Tooltip', 'dojo/dom', 'dojo/_base/event', 'dojo/mouse', 'dojo/topic' ], function ( declare, WidgetBase, on, domClass, Button, domConstruct, Tooltip, dom, Event, mouse, Topic ) { retu...
from .. import NCSource import numpy as np from os.path import dirname, join class Era5Source(NCSource): """The Era5Source object manages weather data (as netCDF4 files) coming from the `ERA5 climate data products<https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5>` If furthermore allo...
$(document).ready(function() { // Make the drop down menus accessible on focus // $(".pfc-nav-wrapper").find( "a, .fake-link" ).on( "focus blur", function() { $(this).parents().toggleClass( "focus" ); } ); // Key questions $(function(){ $('.bubbles').each(function(i, n){ ...
import React, { useEffect, useState } from 'react' import { loadFirebase } from '../../lib/firebase' import Layout from '../../components/admin/layout' import styles from '../../styles/admin/logg.module.scss' import DateFnsUtils from '@date-io/date-fns' import { MuiPickersUtilsProvider, KeyboardDatePicker } from '@ma...
''' Simple Client Counter for VLC VLM ''' import threading import logging import time import aceclient import gevent from aceconfig import AceConfig class ClientCounter(object): def __init__(self): self.lock = threading.RLock() self.clients = dict() self.idleace = None self.total =...
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edi...
from twarc import Twarc2, expansions import json # Replace your bearer token below client = Twarc2(bearer_token="XXXXX") def main(): # This mentions functions gets the mentions for a specified user user_mentions = client.mentions(user="twitterdev") # Twarc returns all Tweets for the criteria set above, ...
# -*- coding: utf-8 -*- import threading from pip_benchmark_python.runner.execution.CpuLoadMeter import CpuLoadMeter class TestCpuLoadMeter: def test_measure(self): meter = CpuLoadMeter() measure = meter.measure() assert measure == 0 def _test_measure(): _measure = ...
import React from 'react'; import { shallow } from 'enzyme'; import ContactUs from './ContactUs'; describe('ContactUs', () => { test('matches snapshot', () => { const wrapper = shallow(<ContactUs />); expect(wrapper).toMatchSnapshot(); }); });
import json from datetime import datetime from typing import List, Dict from unittest import mock from fastapi_pagination import Params import pytest from starlette.testclient import TestClient from fidesops.api.v1.endpoints.privacy_request_endpoints import ( EMBEDDED_EXECUTION_LOG_LIMIT, ) from fidesops.api.v1.u...
/****************************************************************************** * Copyright 2017-2018 Baidu Robotic Vision 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 ...
module.exports = function (name) { return `const passport = require("passport"); const gitHubStrategy = require("passport-github").Strategy; const ${name}Model = require("../models/${name}"); // * Settingup Passport github strategy passport.use('${name}-github', new gitHubStrategy( { clientID: process.e...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) bio = models.CharField(blank=True, null=True, max_length=300) ...
module.exports = `@prefix acl: <http://www.w3.org/ns/auth/acl#>. @prefix foaf: <http://xmlns.com/foaf/0.1/> . <#authorization1> a acl:Authorization; acl:agent <https://alice.example.com/#me>; acl:agentGroup <https://alice.example.com/work-groups#Accounting>; acl:accessTo <https://alice...
module.exports = { extends: ['@anvilabs/eslint-config', '../../index.js', '../../react.js'], };
# Generated by Django 2.2.6 on 2020-02-21 13:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("leases", "0004_calculate_default_dates"), ] operations = [ migrations.AlterField( model_name="b...
const CC_API_BASE_URL = 'https://support.google.com/s/community/api/'; const apiErrors = { 0: 'OK', 1: 'CANCELLED', 2: 'UNKNOWN', 3: 'INVALID_ARGUMENT', 4: 'DEADLINE_EXCEEDED', 5: 'NOT_FOUND', 6: 'ALREADY_EXISTS', 7: 'PERMISSION_DENIED', 8: 'RESOURCE_EXHAUSTED', 9: 'FAILED_PRECONDITION', 10: 'ABO...
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ /* cairo-wasm - a vector graphics library with display and print output * * Copyright © 2004 Red Hat, Inc * Copyright © 2006 Red Hat, Inc * Copyright © 2007, 2008 Adrian Johnson * * This library is free software; you can redistribute it ...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * from spack.pkg.builtin.boost import Boost class PyPycuda(PythonPackage): """PyCUDA gives you eas...
#ifndef _LPORT_H_ #define _LPORT_H_ extern "C" { #include <lua.h> #include <lualib.h> #include <lauxlib.h> #include <tolua++.h> } int luaopen_port(lua_State *L); #endif
#!/usr/bin/env python3 import signal import sys import time import threading class Hi(): def __init__(self): signal.signal(signal.SIGINT, self.signal_handler) assert False for i in range(5000): print("Sleeping {}".format(i), end="\r") time.sleep(i) def signal_handler(self, signal, frame): print(...
define("ace/mode/scad",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/scad_hig...
import asyncio from typing import Any, Generator import aioreactive as rx import pytest from aioreactive.testing import VirtualTimeEventLoop from expression.core import pipe class MyException(Exception): pass @pytest.yield_fixture() # type:ignore def event_loop() -> Generator[Any, Any, Any]: loop = Virtua...
def year_wise_medal_tally(df, country): cm = df.dropna(subset=['Medal']) cm = cm.drop_duplicates(subset=['Team', 'NOC', 'Games', 'Year', 'City', 'Sport', 'Event', 'Medal']) cm = cm[cm['Country'] == country] cm = cm.groupby('Year').count()['Medal'].reset_index() return cm def country_event_heatmap(...
/** * @private */ Ext.define('Ext.device.twitter.Abstract', { /** * Pops up a Twitter compose sheet view with your specified tweet. * * @param {Object} config An object which contains the following config options: * * @param {String} config.tweet The default tweet text to add to the compo...
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // 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...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{"100U":function(t,e,n){"use strict";var a=n("zKsV"),o=n.n(a);o.a},"2goY":function(t,e,n){"use strict";function a(t){return Object.prototype.toString.call(t).slice(8,-1)}function o(t){let e=[];function n(t){if(t&&"Object"===a(t)){if(-1!==e.indexOf(t))return...
module.exports=/[\uABC0-\uABFF]/
/*! * lock v11.30.1 * * Author: Auth0 <support@auth0.com> (http://auth0.com) * Date: 6/4/2021, 10:26:05 AM * License: MIT * */ !function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.i=function(t){...
import { FETCH_WEATHER } from '../actions'; export default function(state = [], action) { switch (action.type) { case FETCH_WEATHER : return [action.payload.data, ...state]; } return state; }
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
from django.db import models from django.utils import timezone class Post(models.Model): name = models.CharField(max_length=250) topic = models.CharField(max_length=250) details = models.TextField() date_of_publish = models.DateTimeField(default=timezone.now) class details(models.Model): author =...
var path = require('path') var webpack = require('webpack') var BrowserSyncPlugin = require('browser-sync-webpack-plugin') var pixi = path.join(__dirname, '/node_modules/pixi.js/dist/pixi.js') var definePlugin = new webpack.DefinePlugin({ __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')) }) module...
from brownie import chain from brownie.test import strategy WEEK = 7 * 86400 class StateMachine: """ Validate gauge weights and gauge weight sum. Strategies ---------- st_type : Decimal Gauge type, multiplied by `len(self.gauges)` to choose a value st_gauge_weight : int Gauge...
#include "types.h" #include "x86.h" #include "defs.h" #include "date.h" #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" int sys_fork(void) { return fork(); } int sys_exit(void) { exit(); return 0; // not reached } int sys_wait(void) { return wait(); } int sys_kill(void) { int...
(function(e){const i=e["el"]=e["el"]||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"","Block quote":"Περιοχή παράθεσης",Blue:"",Bold:"Έντονη","Bulleted List":"Λίστα κουκκίδων","Bulleted list styles toolbar":"",Cancel:"Ακύρωση","Centered image":"","Change image text alternative":"Αλλ...
/* $ termux-download [-d description] [-t title] url-to-download Download a resource using the system download manager. -d description description for the download request notification -t title title for the download request notification - Usage: api.download() .url('...') .title('cool') .desc...
import {Services} from '#service'; import {createCustomEvent} from '#utils/event-helper'; import {whenContentIniLoadMeasure} from '../ini-load'; /** * Registers ini-load listener that will fire custom 'amp-ini-load' event * on window (accessible if creative is friendly to ad tag) and postMessage to * window paren...
/*- ***** BEGIN LICENSE BLOCK ***** - Version: MPL 1.1/GPL 2.0/LGPL 2.1 - - The contents of this file are subject to the Mozilla Public License Version - 1.1 (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.mozilla.org/M...
'use strict' const uuid = require('uuid-base62') const fixtures = { getImage () { let id = uuid.uuid() return { description: 'an #awesome picture with #tags #platzi', tags: [ 'awesome', 'tags', 'platzi' ], url: `https://platzigram.test/${uuid.v4()}.jpg`, likes: 0, liked: false,...
"""The /data controller. Please refer to doc/api for more information.""" import json import logging from typing import Tuple, Union from uuid import UUID from flask import Blueprint, session, request, jsonify, Response from fractalis import celery, redis from fractalis.authorization import authorized from fractalis...
"""Endless Fake Usage: endless-fake-patch [--disable-random] <game-dir> endless-fake-patch (-h | --help) Options: --disable-random Always output the same level. -h --help Show this screen. --version Show version. """ import os import re from docopt import docopt from .. import version ...
import Vue from 'vue' import Router from 'vue-router' import Home from '../pages/Home.vue' import Categories from '../pages/Categories.vue' import CategoryJokes from '../pages/CategoryJokes.vue' import Search from '../pages/Search.vue' import SearchDetail from '../pages/SearchDetail.vue' import About from '../pages/Ab...
import styled from "styled-components" const iconColorsMap = { facebook: "#4968ad", twitter: "#49a1eb", instagram: "black", linkedIn: "#3077b0", youtube: "#eb3223", } export const StyledSocialFollow = styled.div` p { margin-top: 0; } ` export const SocialFollowIcon = styled.a` display: inline-blo...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #if defined(GB_MEASURE_MEMORY_FOR_THIS) #undef GB_MEASURE_MEMORY_FOR_THIS #endif #ifdef __cplusplus #include <cstdlib> #else #include <stdlib.h> #endif #include "azure...
#!/usr/bin/env node const fs = require('fs-extra'); const path = require('path'); const yargs = require('yargs'); const yaml = require('js-yaml'); const chalk = require('chalk'); const Profile = require('./lib/profile'); const Loader = require('./lib/inspect/checks/loader'); const Reporter = requir...
// // PresentGradientViewController.h // TTKitDemo // // Created by apple on 2018/1/16. // Copyright © 2018年 shang. All rights reserved. // #import <UIKit/UIKit.h> @interface PresentGradientViewController : UIViewController @end
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
import math import torch import torch.optim as optim import torch.nn.functional as F from CIRNO.CIRNONetwork import CIRNONetwork from CIRNO.ReplayMemory import ReplayMemory, Transition # # Deep Q Network: # Environment change -> expectation # # Goal: Train a policyNetwork that have # most Discounted Cumulative R...
'use strict'; /* Environment Vars ..............................*/ require('dotenv').load(); /* Packages ..............................*/ const async = require('async'); const express = require('express'); const session = require('express-session'); const cookie = require('cookie-parser'); const pa...
#!/usr/bin/env python from optparse import OptionParser import sys import os from subprocess import call, Popen, PIPE import re f_log = "log.txt" def main(): parser = OptionParser(usage="usage: %prog [options]") parser.add_option("-d", action="store_true", dest="offline", help="offline mode") parser.ad...
from decimal import Decimal from gtin import GTIN, GCPNotFoundError from gtin.gcp import prefixes_lengths def test_check_digit(): assert GTIN(raw=890123456789).check_digit == '0' assert GTIN(raw=10101).check_digit == '1' assert GTIN(raw=567898901234).check_digit == '2' assert GTIN(raw=82957399425).ch...
/*! * # Semantic UI 1.11.2 - Popup * http://github.com/semantic-org/semantic-ui/ * * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(e,t,o,n){"use strict";e.fn.popup=function(i){var r,s=e(this),a=e(o),p=s.selector||"",l="ontouchstart"in o.docum...
# 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. DEPS = [ 'builder_name_schema', ] def RunSteps(api): names = [ 'Build-Debian9-Clang-x64-Release-Android', 'Upload-Test-Debian9-Clang-GCE-CPU-A...
#!/usr/bin/env python3 # Copyright (c) 2020 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test addrv2 relay """ import time from test_framework.messages import ( CAddress, msg_addrv2, ...
/*! * Sizzle CSS Selector Engine v1.10.16 * http://sizzlejs.com/ * * Copyright 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-01-13 */ (function( window ) { var i, support, Expr, getText, isXML, compile, o...
/* * Copyright (c) 2012, Intel Corporation. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 * */ Card = function() { this.cardId = ""; this.cardFrontId = ""; thi...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: target_info.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf...
""" Configuration file for the Sphinx documentation builder. This file only contains a selection of the most common options. For a full list see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ import os import sys from unittest.mock import MagicMock # -- Path setup --------------...