text stringlengths 3 1.05M |
|---|
from __future__ import unicode_literals
import boto3
from freezegun import freeze_time
import requests
import sure # noqa
from botocore.exceptions import ClientError
import responses
from moto import mock_apigateway, settings
from nose.tools import assert_raises
@freeze_time("2015-01-01")
@mock_apigateway
def tes... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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 Lic... |
from pytest import approx
import math
from my_source import euclid
def test_euclid():
a = [0, 0, 0]
b = [4, 4, 4]
dist = euclid(a, b)
assert(math.sqrt(48.) == approx(dist)) |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... |
describe('dialogFieldRefresh', function() {
describe('#addOptionsToDropDownList', function() {
var data = {};
beforeEach(function() {
var html = "";
html += '<select class="dynamic-drop-down-345 selectpicker">';
html += '</select>';
setFixtures(html);
});
context('when the re... |
/* 7zBuf.h -- Byte Buffer
2013-01-18 : Igor Pavlov : Public domain */
#ifndef __7Z_BUF_H
#define __7Z_BUF_H
#include "7zTypes.h"
EXTERN_C_BEGIN
typedef struct
{
Byte *data;
size_t size;
} CBuf;
void Buf_Init(CBuf *p);
int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc);
void Buf_Free(CBuf *p, ISzAlloc *alloc... |
const typedef struct as340kj_ {
short t45e;
char *u76h;
} as340kj;
extern char *hh(char, as340kj*);
|
import pytest
from django.urls import resolve, reverse
from trycookie.users.models import User
pytestmark = pytest.mark.django_db
def test_detail(user: User):
assert (
reverse("users:detail", kwargs={"username": user.username})
== f"/users/{user.username}/"
)
assert resolve(f"/users/{use... |
# 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 ... |
/**
* Created by jibin on 17/9/7.
*/
|
"""
ASGI config for django_chatroom project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
import django
from channels.routing import get_default_application
from django.... |
//
// Copyright 2017 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... |
# configobj.py
# A config file reader/writer that supports nested sections in config files.
# Copyright (C) 2005-2006 Michael Foord, Nicola Larosa
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# nico AT tekNico DOT net
# ConfigObj 4
# http://www.voidspace.org.uk/python/configobj.html
# Released subject to th... |
/**
* @class draw2d.shape.icon.End
* See the example:
*
* @example preview small frame
*
* let icon = new draw2d.shape.icon.End();
*
* canvas.add(icon,50,10);
*
* @inheritable
* @author Andreas Herz
* @extends draw2d.shape.icon.Icon
*/
import draw2d from '../../packages'
draw2d.shape.icon.En... |
/**
* TODO: Rename to reflect new functionality
* TODO: Namespace everything.
*/
/*
bubbleEvents: [
'label_in',
'label_out',
'label_click',
'sub_label_in',
'sub_label_out',
'sub_label_click'
],
*/
Orientation = {HORIZONTAL: 1, VERTICAL: 2};
function Label(data, renderers, ctx, ctxOverlay) {
this.data ... |
from itertools import count
import os
import csv
csv_path = os.path.join("..","..", "Python-Challenge", "Pybank", "resources", "budget_data.csv")
month = []
profit_loss = []
monthly_changes = []
row = []
count_mth = 0
net_P_L = 0
P_L_change =0
begining_profit = 0
with open(csv_path, 'r') as csvfile:
csvreade... |
'''
===============================================================================
-- Author: Hamid Doostmohammadi, Azadeh Nazemi
-- Create date: 04/11/2020
-- Description: This code finds similarity (SSIM), distance (Hash),
mean square error (MSE) and Chi-square distance (Chi) for
... |
//=====================================================================
// Collapse Button
//=====================================================================
// Collapse Button Click Event
/$(document).on('click','.btn.btn-toggle, .btn.btn-untoggle', function(e){
e && e.preventDefault();
if($(e.target).at... |
"""
ASGI config for sn_test_task project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_... |
import React from 'react';
import PropTypes from 'prop-types';
import { UrlField } from 'react-admin';
const UrlLattes = ({ record, source }) => {
if (!record[source]) {
return null;
}
const newRecord = { url: `http://lattes.cnpq.br/${record[source]}` };
return <UrlField record={newRecord} source="url" target="_... |
// @flow
import request from '../utils/request'
type actionType = {
+type: string
};
export const SEARCH_TX = 'SEARCH_TX'
export const SAVE_TX_LIST = 'SAVE_TX_LIST'
export const CREATE_TX = 'CREATE_TX'
export function setCurrentTX(payload) {
return {
type: SEARCH_TX,
payload
};
}
export function saveT... |
"""kikoripi URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... |
# -*- coding: utf-8
"""
Constants of Django Flickrsets application.
"""
from django.utils.translation import ugettext_lazy as _
# Prefix used for application's tables
APP_TABLE_PREFIX = 'flickrsets'
# Flickr's photo URLs
FLICKR_PHOTO_URL_SQUARE = 'sq'
FLICKR_PHOTO_URL_THUMBNAIL = 't'
FLICKR_PHOTO_URL_SMALL = 's'
FLI... |
import React, { Component } from 'react';
import Header from './Header';
import Meta from './Meta';
class Page extends Component {
render() {
return (
<div>
<Meta />
<Header />
{this.props.children}
</div>
);
}
}
export default Page;
|
xui.Class("xui.UI.Dialog","xui.UI.Widget",{
Instance:{
showModal:function(parent, left, top, callback, ignoreEffects){
this.show(parent, true, left, top, callback, ignoreEffects);
},
show:function(parent, modal, left, top, callback,ignoreEffects){
parent = paren... |
// Copyright (c) 2011-2019 The Syscoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef SYSCOIN_QT_WALLETMODEL_H
#define SYSCOIN_QT_WALLETMODEL_H
#include <amount.h>
#include <key.h>
#include <serialize.h... |
(function() {
var fn = function() {
(function(root) {
function now() {
return new Date();
}
var force = false;
if (typeof (root._bokeh_onload_callbacks) === "undefined" || force === true) {
root._bokeh_onload_callbacks = [];
root._bokeh_is_loading = u... |
"""Tests for execute commands function"""
import os
import subprocess
import pytest
from scout.server.extensions.loqus_extension import execute_command
TRAVIS = os.getenv("TRAVIS")
GITHUB = True if os.getenv("CI") else False
def test_run_execute_command():
"""Test run echo with execute command"""
# GIVEN a... |
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
import { createStore } from "redux";
import { Provider } from "react-redux";
import { graph, windowManager } from "redux-visualize-tools";
import { connect } from... |
# coding: utf-8
from data import ruta, orden, campos, carreras
from flask import Flask, jsonify, request, abort
from json import loads
# ## Definición de funciones.
# ### Funciones de gestión de la base de datos.
#
# En este caso la base de datos no es otra cosa más que un archivo de texto que representa a un obj... |
# ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: launcher.py
#
# Tests: This script tests internallauncher's transformation of visit
# command line arguments into parallel launch arguments.
#
# Brad Whitlock, Tue Sep 11 12:31:34 PDT ... |
#!/bin/sh
""":"
PYTHONPATH=/home/wazoocom/www/pygame/libs exec /home/wazoocom/bin/python $0 ${1+"$@"}
"""
################################################################################
# Std Libs
import os
# User Libs
from pywebsite import *
from helpers import relative_to, ResultsZip
import process_results
####... |
// Copyright 2018 The PDFium 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 SAMPLES_PDFIUM_TEST_WRITE_HELPER_H_
#define SAMPLES_PDFIUM_TEST_WRITE_HELPER_H_
#include <string>
#include "pdfium/include/fpdfview.h"
// std::st... |
# 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 agreed to in writing, s... |
# coding=utf-8
# Copyright 2019 The Google AI Language Team 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 ... |
// Copyright 2018 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.
load("test/mjsunit/wasm/wasm-module-builder.js");
(function exportImmutableGlobal() {
var builder = new WasmModuleBuilder();
let globals = [
[k... |
/**
******************************************************************************
* @file stm32f7xx_hal_rtc_ex.c
* @author MCD Application Team
* @version V1.2.0
* @date 30-December-2016
* @brief RTC HAL module driver.
* This file provides firmware functions to manage the following
*... |
import React, {Component} from 'react'
import {HashRouter, Route, Switch} from 'react-router-dom'
import './App.css'
import '@coreui/icons/css/coreui-icons.min.css'
import 'flag-icon-css/css/flag-icon.min.css'
import 'font-awesome/css/font-awesome.min.css'
import 'simple-line-icons/css/simple-line-icons.css'
import './... |
var $ = require('../internals/export');
var fails = require('../internals/fails');
var expm1 = require('../internals/math-expm1');
var abs = Math.abs;
var exp = Math.exp;
var E = Math.E;
var FORCED = fails(function () {
return Math.sinh(-2e-17) != -2e-17;
});
// `Math.sinh` method
// https://tc39.github.io/ecma262... |
import fcm
from fcm.load import load_csv, load_xlsx
from pandas.core.frame import DataFrame
import pytest
def test_load_csv(shared_datadir):
df = load_csv(shared_datadir / "test_adjacency_matrix.csv")
assert isinstance(df, DataFrame)
def test_load_xlsx(shared_datadir):
df = load_xlsx(shared_datadir / "... |
export const ConnectNewVersionInfo = {
inject: ['nowPluginWidth'],
data () {
return {
versionInfos: []
}
},
computed: {
Classes: function () {
if (this.nowPluginWidth < 399) return 'px-0'
else return 'px-5'
}
},
mounted () {
let info
info = [
'新增更新日誌。',
... |
import Ember from 'ember';
const { Component, getOwner } = Ember;
const assign = Ember.assign || Ember.merge;
export function registerTestComponent(context, opts = {}) {
let owner = context.owner || getOwner(context);
let options = assign({ tagName: 'dummy' }, opts);
let TestComponent = Component.extend(options... |
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redist... |
module.exports = (sequelize, DataTypes) => {
const CmpTemplate = sequelize.define('CmpTemplate', {
id: {
type: DataTypes.STRING(45),
allowNull: false,
primaryKey: true,
},
name: {
type: DataTypes.STRING(100),
allowNull: false,
default: 'No Name',
},
cmpChannelId... |
# -*- coding: utf-8 -*-
# Copyright 2012-2021 Dr. Jan-Philip Gehrcke. See LICENSE file for details.
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
gipcversion = re.search(
'^__version__\s*=\s*"(.*)"', open("gipc/__init__.py").read(), re.M
).group(1)
asser... |
from pydantic import BaseModel, Field
from typing import Optional
import math
from ROAR.utilities_module.data_structures_models import Transform, Vector3D
import numpy as np
class VehicleControl(BaseModel):
throttle: float = Field(default=0)
steering: float = Field(default=0)
brake: bool = Field(default=F... |
/*!
* jQuery Cookiebar Plugin
* https://github.com/carlwoodhouse/jquery.cookieBar
*
* Copyright 2012, Carl Woodhouse
* Disclaimer: if you still get fined for not complying with the eu cookielaw, it's not our fault.
*/
!function(a){a.fn.cookieBar=function(b){var c=a.extend({closeButton:"none",sec... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
from collections import deque
def get_cheapest_cost(rootNode):
def get_all_paths(self, node, sum_so_far=0):
# update the sum so far
sum_so_far += node.cost
# for each child in the deque
for child_node in node.children:
# call the function again
get_all_paths... |
# CS110Exam_ZZZ.py
# ZZZ, ZZZ (Jan,2016)
'''
Pseudocode:
define a function to simulate a chicken crossing the road
chickens=1000
lane1=(random.randint(90,100))/100
lane2=(random.randint(90,100))/100
lane3=(random.randint(90,100))/100
lane4=(random.randint(90,100))/100
lane5=(random.randint(90,100))/100
lan... |
import $ from 'jquery';
import router from 'girder/router';
import View from 'girder/views/View';
import ItemBreadcrumbTemplate from 'girder/templates/widgets/itemBreadcrumb.pug';
/**
* Renders the a breadcrumb for the item page
*/
var ItemBreadcrumbWidget = View.extend({
events: {
'click a.g-item-brea... |
webpackJsonp([53],{56:function(n,t){n.exports="## DropdownMenu \n\nDropdownMenu.\n\n## Usage\n\n```js\n<o-dropdown-menu >\n <item icon={{ path: path.pathA, color: '#F2F2F2' }} text='Chat'></item>\n <item icon={{ path: path.pathB, color: '#F2F2F2' }} text='Add Friend'></item>\n <item icon={{ path: path.pathC, color: ... |
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# modify from detectron2 https://github.com/facebookresearch/detectron2/blob/master/detectron2/engine/defaults.py
# need to fix
import os
import argparse
def default_argument_parser():
"""
Create a parser with some... |
//Definindo uma funcao normalmente
function quadrado(x) {
return x*x
}
//Definindo uma funcao de outra maneira
var cubo = function(x) {
return x*x*x
}
//Basta exportar um JSON no module.exports:
module.exports = {
//definindo uma funcao inline
dobro: function(x) {
return 2*x
},
//proc... |
from dsbox.template.template import DSBoxTemplate
from d3m.metadata.problem import TaskKeyword
from dsbox.template.template_steps import TemplateSteps
from dsbox.schema import SpecializedProblem
import typing
import numpy as np # type: ignore
class DistilVertexNominationTemplate(DSBoxTemplate):
def __init__(... |
import { CART_ADD_ITEM, CART_REMOVE_ITEM, CART_SAVE_SHIPPING, CART_SAVE_PAYMENT } from "../constants/cartConstants";
function cartReducer(state = { cartItems: [], shipping: {}, payment: {} }, action) {
switch (action.type) {
case CART_ADD_ITEM:
const item = action.payload;
const pro... |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(gene... |
import numpy as np
import pandas as pd
import taxa
import sklearn.inspection
from sklearn.ensemble import RandomForestClassifier
def feature_importance(model, top=None):
""" Returns importances of the model features and a list of indices sorted by the importances
Parameters:
model - the relevant classif... |
const fs = require("fs");
const { execSync } = require("child_process");
const { camelCase, lowerCase } = require("lodash");
const { reactHtmlPropsMap, reactSvgPropsMap } = require("./maps");
const { htmlElements } = require("../props/html");
const { htmlPropToReactPropMap } = require("../props/react");
const {
svgEl... |
const path = require('path');
const CHARS = { '{': '}', '(': ')', '[': ']'};
const STRICT = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\)|(\\).|([@?!+*]\(.*\)))/;
const RELAXED = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
/**
* Detect if a string cointains glob
* @param {String} str Inpu... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
# Copyright (c) Microsoft Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
import * as React from "react"
import { graphql } from "gatsby"
import Bio from "../components/bio"
import Layout from "../components/layout"
import Seo from "../components/seo"
import Post from "../components/post"
const BlogIndex = ({ data, location }) => {
const siteTitle = data.site.siteMetadata?.title || `Titl... |
import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import { Link, graphql } from 'gatsby';
import styled from 'styled-components';
import { Layout, Wrapper, Header, Subline, Article, SectionTitle } from 'components';
import { media } from '../utils/media';
import co... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: schema.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobu... |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 11 2021 20:53:35).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import <AppKit/NSViewController.h>
#import <Flexo/NSPopoverDelegate-Protocol.h>
@class NSPopover, NSSet, NSString;
__attribute__((visibility("hidden")))
@interface FFShareDi... |
import WebpackHotMiddleware from 'webpack-hot-middleware'
import applyExpressMiddleware from '../lib/apply-express-middleware'
import _debug from 'debug'
const debug = _debug('app:server:webpack-hmr')
export default function (compiler, opts) {
debug('Enable Webpack Hot Module Replacement (HMR).')
const ... |
/*
* (C) Copyright 2013 Kurento (http://kurento.org/)
*
* 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... |
# uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.MLHood
from direct.directnotify.DirectNotifyGlobal import directNotify
from ToonHood import ToonHood
from MLSafeZon... |
from datetime import datetime, timezone, timedelta
from enum import Enum, auto
import logging
from urllib.parse import urlparse
from yaml import dump
from workdocs_dr.aws_clients import AwsClients
from workdocs_dr.document import DocumentHelper
from workdocs_dr.user import UserKeyHelper
class RunStyle(Enum):
AB... |
import os
from strato.common.log import environment
import signal
LOGS_DIRECTORY = os.environ.get('STRATO_LOGS_DIRECTORY', None)
if LOGS_DIRECTORY is None:
LOGS_DIRECTORY = os.path.join(os.environ['HOME'], "tmp", "stratoscalelogs")
LOGS_SUFFIX = ".stratolog"
LOG_CONFIGURATION = os.environ.get('STRATO_LOGS_CONFIGUR... |
//
// SystemConfigurationTest.h
//
// $Id: //poco/1.4/Util/testsuite/src/SystemConfigurationTest.h#1 $
//
// Definition of the SystemConfigurationTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef SystemConfi... |
$(document).ready(function () {
$('#CreateClientForm').on("submit",function(event) {
event.preventDefault();
$.ajax({
url:"../ADMIN/insert_data/insert-client.php",
method:"POST",
data:$('#CreateClientForm').serialize(),
beforeSend:function(){
$('#insert').val("Inserti... |
import boot from './api/boot';
import UIkit from './uikit-core';
import Countdown from './components/countdown';
import Filter from './components/filter';
import Lightbox from './components/lightbox';
import lightboxPanel from './components/lightbox-panel';
import Notification from './components/notification';
import P... |
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/************************************************
rbgdkpixmap.c -
$Author: mutoh $
$Date: 2006/11/25 17:50:41 $
Copyright (C) 2002-2004 Ruby-GNOME2 Project Team
Copyright (C) 1998-2000 Yukihiro Matsumoto,
Daisuke Kanda,
... |
# -*- coding: utf-8 -*-
#
# test_get_sp_status.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Lice... |
/***********************************************************************/
/**
AudioScience HPI driver
Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com>
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public Lic... |
# vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import codecs
from powerline.lint.markedjson.error import MarkedError, Mark, NON_PRINTABLE
from powerline.lib.unicode import unicode
# This module contains abstractions for the input stream. You don’t ... |
/**************************************************************************
* IMPORTS
***************************************************************************/
// BASE COMPONENTS
import BaseAlert from "./components/darkmode/base/BaseAlert.vue";
import BaseAvatar from "./components/darkmode/base/BaseAvatar.vue";
i... |
#!/usr/bin/python
import math, re, sys
# usage: python TSPAllVisited.py input_file output_file
def main(input_file, output_file):
input_point_labels = read_input_vals(input_file)
output_point_labels = read_output_vals(output_file)
problems = check_match(input_point_labels, output_point_labels)
if( len(prob... |
from platonic.sqs.queue import SQSReceiver, SQSSender
class Spell:
"""Magical spell."""
def __init__(self, text: str) -> None:
"""Initialize."""
self.text = text
class SpellSender(SQSSender[Spell]):
"""Spell sender."""
def serialize_value(self, spell: Spell) -> str:
"""Seri... |
"""
Tests for the effect.testing module.
"""
import attr
import pytest
from testtools import TestCase
from testtools.matchers import (MatchesListwise, Equals, MatchesException,
raises)
from . import (
ComposedDispatcher,
Constant,
Effect,
base_dispatcher,
parallel... |
from collections import defaultdict
import yaml
import sublime
def load_resource():
res = sublime.find_resources("auto_typography.yaml")[0]
res_content = sublime.load_resource(res)
resource = yaml.load(res_content)
return resource
def _get_transformation_map():
if hasattr(_get_transformation_ma... |
/* *******************************************************************************************
* *
* Please read the following tutorial before implementing tasks: *
* https://developer.mozilla.org/e... |
/*
Q Light Controller Plus
freedmxcontroller.h
Copyright (c) 2017 Rodolphe Dejeunes
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.txt... |
''' Continue Statements
Used to stop the current iteration and continue with the next iteration of the loop.
'''
i = 0
whike i < 8:
|
var searchData=
[
['clear',['clear',['../classAverageSolution.html#aa3a3cb91cebd294f7cf5a73da5ff2c8d',1,'AverageSolution']]],
['closefile',['closeFile',['../classDatFile.html#a10e08fabc7003400b772e47af81594d6',1,'DatFile']]],
['createdirectory',['createDirectory',['../classDatFile.html#a49c1fe958444784c374bac5b74... |
/******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
# Here we show one demo how to load model, calulate bpd, random sample from latent space and generate samples
from tqdm import tqdm
import numpy as np
from PIL import Image
from math import log, sqrt, pi
import argparse
import torch
from torch import nn, optim
from torch.autograd import Variable, grad
from torch.uti... |
"""
Meta values for current package.
"""
__version__ = "0.4.3"
__email__ = "osterrfr@crim.ca"
__author__ = "Frederic Osterrath"
|
"""Library base file."""
from six import PY2, string_types
from uuid import uuid1
import inspect
import json
import logging
from requests import Session
from tempfile import gettempdir
from os import path, mkdir
from re import match
import http.cookiejar as cookielib
import getpass
from pyicloud.exceptions import (
... |
from typing import List
class Solution:
def countComponents(self, n: int, edges: List[List[int]]) -> int:
if n <= 1:
return n
nInEdge = dict([(i, False) for i in range(n) ])
sToE = {}
for edge in edges:
nInEdge[ edge[0] ] = True
nInEdge[ edge[1] ... |
from typing import Any, Callable, List, Optional, cast
import torch
import argparse
import numpy as np
import shutil
import glob
import time
import random
import os
from torch import nn
from tensorboardX import SummaryWriter
from perceptual_advex import evaluation
from perceptual_advex.utilities import add_dataset_mod... |
import React, { useState, useEffect, useContext } from "react"
import styled from "styled-components"
import { Dialog } from "@reach/dialog"
import "@reach/dialog/styles.css"
import Img from "gatsby-image"
import Layout from "../components/layout"
import SEO from "../components/seo"
import Carousel from "../components/... |
/*
The MIT License (MIT)
Copyright (c) 2012-2018 Syoyo Fujita and many contributors.
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 right... |
# Copyright (c) 2015 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
//
// UINavigationBar+Awesome.h
// LTNavigationBar
//
// Created by ltebean on 15-2-15.
// Copyright (c) 2015 ltebean. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UINavigationBar (SmartUtils)
- (void)lt_setBackgroundColor:(UIColor *)backgroundColor;
- (void)lt_setElementsAlpha:(CGFloat)alpha;
- (vo... |
/*! `objectivec` grammar compiled for Highlight.js 11.3.1 */
(()=>{var e=(()=>{"use strict";return e=>{const n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={
$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]}
;return{name:"Objective-C",
aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{$pattern:n,
... |
# -*- coding: utf-8 -*-
'''
Update rev
$Author: michael $
$Revision: 1148 $
$Date: 2015-04-14 21:14:18 +0200 (Tue, 14 Apr 2015) $
$Id: plugin.py 1148 2015-04-14 19:14:18Z michael $
'''
# C0111 (Missing docstring)
# C0103 (Invalid name)
# C0301 (line too long)
# W0603 (global statement)
# W0141 (map, filter, etc.)
# W0... |