text stringlengths 3 1.05M |
|---|
var SignupWindow = function(_containingTab) {
//UI STUFF
var suWin = Ti.UI.createWindow({
backgroundColor:'transparent',
backgroundImage: '/images/grain.png',
title: "Signup",
barColor: '#6d0a0c',
layout: 'vertical'
});
var email = Ti.UI.createTextField({
hintText:'Email',
autocorrect:false,
autoca... |
from django.db import models
from initiatives.models import ORMInitiative
# Create your models here.
class Email(models.Model):
email = models.EmailField(primary_key=True)
token = models.CharField(max_length=1024)
expiry = models.DateTimeField(auto_now_add=False)
class Role(models.Model):
id = models.... |
(function () {
/* Imports */
var Meteor = Package.meteor.Meteor;
/* Exports */
if (typeof Package === 'undefined') Package = {};
Package['mrt:jquery-hotkeys'] = {};
})();
//# sourceMappingURL=mrt_jquery-hotkeys.js.map
|
(function (AJS, $, JIRA) {
//AJS.namespace("JIRA.Admin.CustomFields.UserPickerFilter");
/**
* A user of the SelectorPanel from the config page, a webwork action.
*
* Input data is obtained from ww action via data in the generated html.
* Configured filter data is sent back to server via for... |
"""
This sample file demonstrate how to upload a list of EnergyPlus models into one simulation job
Current issue the tracking will skip the first model, so user might see a model missing in the tracking information.
e.g.
Upload 2 models and run them in parallel
But tracking info shows:
Total progress 0%, success: 0, ... |
class MainMenuButtonEffect : ScriptedWidgetEventHandler
{
reference float speed;
reference float amount;
protected float m_textProportion;
protected float m_textProportion2;
protected ButtonWidget m_root;
protected ref AnimatorTimer m_anim;
// -----------------------------------------------------------
void M... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _vueTypes = require('../_util/vue-types');
var _vueTypes2 = _interopRequireDefault(_vueTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var triggerType = _vueTypes2['default']... |
/**
* \file
* A hash table which uses the values themselves as nodes.
*
* Author:
* Mark Probst (mark.probst@gmail.com)
*
* (C) 2007 Novell, Inc.
*
*/
#ifndef __MONO_UTILS_MONO_INTERNAL_HASH__
#define __MONO_UTILS_MONO_INTERNAL_HASH__
/* A MonoInternalHashTable is a hash table that does not allocate hash
... |
from coco_style_annotation_creator import test_human2coco_format as h2c
from detect2.tools import myinfer
import make_crop_and_mask_w_mask_nms as mcm
from global_local_parsing import gl_eval as gleval
import parsing_fusion as pfs
import argparse
import os
import time
from detectron2.config import get_cfg
from detectron... |
import cv2
import math
import numpy as np from scipy.spatial
import distance as dist
def midpoint(ptA, ptB):
return ((ptA[0] + ptB[0]) * 0.5, (ptA[1] + ptB[1]) * 0.5)
def calculateDistance(ex,ey,ew,eh):
dist = math.sqrt((ex - ew)**2 + (ey - eh)**2)
... |
// @flow
import React from 'react';
import { create } from 'react-test-renderer';
import { FixtureContainer } from '../../FixtureContainer';
it('renders string element type', () => {
expect(
create(
<FixtureContainer>
<div>Hello world!</div>
</FixtureContainer>
).toJSON()
).toEqual({ t... |
//数组或对象元素的位置
function(arrayToSearch, item) {
if (Array.prototype.indexOf) {
return arrayToSearch.indexOf(item);
} else {
for (var i = 0; i < arrayToSearch.length; i++) {
if (arrayToSearch[i] === item) return i;
}
return -1;
}
} |
# 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 ... |
var callbackArguments = [];
var base_0 = [618,-1,1.7976931348623157e+308,843,0,126,893]
var r_0= undefined
try {
r_0 = base_0.reduceRight()
}
catch(e) {
r_0= "Error"
}
function serialize(array){
return array.map(function(a){
if (a === null || a == undefined) return a;
var name = a.constructor.name;
if (name==='Ob... |
/*
Module: history.js
Description: Gets and sets users reading history
*/
import fastdom from 'fastdom';
import $ from 'lib/$';
import { storage } from '@guardian/libs';
import { getPath } from 'lib/url';
import isObject from 'lodash/isObject';
import {getCookie} from "lib/cookies";
import { ARTICLES_VIEWED_OPT_OUT... |
# 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
from... |
# Copyright (c) 2012 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.
{
'targets': [
{
'target_name': 'gtest',
'type': 'static_library',
'sources': [
'gtest/include/gtest/gtest-death-test.h',... |
"""
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Disnake Development
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 limi... |
"""Copy a skeleton directory structure keeping only [trajectory-NEB-results.txt] and endpoint .gins.
Needed as PCs appeared to die copying, zipping, or unzipping large directories.
"""
import os
import shutil
def Copy(sFromDirPath,sToDirPath):
for sEntity in os.listdir(sFromDirPath):
sEntityPath= sFromDirPath+sEnt... |
'use strict';
var util = require('./util');
var buildOptions = require('./util').buildOptions;
var XmlNode = require('./xmlNode');
var TagType = { OPENING: 1, CLOSING: 2, SELF: 3, CDATA: 4 };
let regx =
'<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|(([\\w:\\-._]*:)?([\\w:\\-._]+))([^>]*)>|((\\/)(([\\w:\\-._]*:)?([\\w:\\-._]+))... |
//// Core modules
const fs = require('fs')
//// External modules
const express = require('express')
const fileUpload = require('express-fileupload')
const flash = require('kisapmata')
const phAddress = require('ph-address')
const lodash = require('lodash')
const moment = require('moment')
const qr = require('qr-image'... |
from back.aleph.salidas import add_all, add_result
from back.aleph.memento import ConcreteMemento, Memento
from back.aleph.auxiliar import (
encolar,
getIndexPositions,
encargoDaemon,
check_daemons,
freeDaemon,
contPrioridad
)
class QManager:
def __init__(self):
self._state = None
... |
import {
Toast,
WARNING,
ERROR,
SENTRY
} from '@/modules/toast/handler/handlerToast';
import Vue from 'vue';
const WalletErrorHandler = (errors, warnings) => {
const errorValues = Object.keys(errors);
const warningValues = Object.keys(warnings);
return err => {
const foundError = errorValues.find(ite... |
from InquirerPy.utils import color_print
import os, ctypes, colorama
from src.startup import Startup
from src.config.constants import Constants
from src.utility_functions import ErrorHandling
colorama.init(autoreset=True)
if __name__ == "__main__":
print()
color_print([("Tomato", f""" _ _ __ __ _____... |
import opensearchpy
import requests
from lxml import etree
import click
import glob
from opensearchpy import OpenSearch
from opensearchpy.helpers import bulk
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logging.basicConfig(format='%(levelname)s:%(message)s')
# NOTE: this is not ... |
/*-
* Copyright (c) 1980, 1986, 1989, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Lab... |
--- qcommon/qcommon.h.orig 2006-12-31 19:01:34.000000000 +0200
+++ qcommon/qcommon.h
@@ -50,6 +50,8 @@ Foundation, Inc., 59 Temple Place - Suit
#if defined __FreeBSD__
#define BUILDSTRING "FreeBSD"
+#elif defined __DragonFly__
+#define BUILDSTRING "DragonFly"
#else
#define BUILDSTRING "Linux"
#endif
|
import _plotly_utils.basevalidators
class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="yperiod0", parent_name="box", **kwargs):
super(Yperiod0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... |
// flow-typed signature: 7bf53f2d625773fe86b682233ab197c8
// flow-typed version: <<STUB>>/pull-glob_v^1.0.6/flow_v0.51.0
/**
* This is an autogenerated libdef stub for:
*
* 'pull-glob'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work w... |
/*
* Copyright 2014-2016 Nippon Telegraph and Telephone 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 requi... |
/**
* @module modifiers/snapEdges
*
* @description
* This module allows snapping of the edges of targets during resize
* interactions.
*
* @example
* interact(target).resizable({
* snapEdges: {
* targets: [interact.snappers.grid({ x: 100, y: 50 })],
* },
* });
*
* interact(target).resizable({
* ... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mockTreeGridProps = exports.EMPTY_VIEW_TEXT_CONTENT = void 0;
var _react = _interopRequireDefault(require("react"));
var _fastCheck = _interopRequireDefault(require("fast-check"));
var _function = require("fp-ts/lib/function");
... |
#!/usr/bin/env python3
if __name__ == "__main__":
for word in [input() for _ in range(int(input()))]:
print(len([i for i in range(len(word) - 1) if word[i] == word[i + 1]]))
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... |
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.... |
var arrayLikeToArray = require("./arrayLikeToArray.js");
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n ... |
const util = require('./util');
const should = require('should');
describe('util 함수는..', () => {
it('A + B를 더하는 함수입니다.', () => {
const a = 1;
const b = 2;
const result = util(a)(b);
result.should.be.equal(3);
});
}); |
/**
***********************************************************************************************
* @file Haply_Arduino_Control.h
* @author Steve Ding, Colin Gallacher
* @version V0.1.0
* @date 27-February-2017
* @brief constants and helper functions actuator control
*******************... |
# Sample of de-serialization
import pickle
with open('./data/serialization', 'rb') as source_file:
L = pickle.load(source_file)
print(L)
print('load done.')
|
from Instrucciones.TablaSimbolos.Instruccion import Instruccion
class Decode(Instruccion):
def __init__(self, valor, tipo, linea, columna):
Instruccion.__init__(self,tipo,linea,columna)
self.valor = valor
def ejecutar(self, tabla, arbol):
super().ejecutar(tabla,arbol)
print("DE... |
const assert = require('chai').assert;
const funtionsToTest = require('./04.FunctionsToTest');
const sum = funtionsToTest.sum;
const isSymmetric = funtionsToTest.isSymmetric;
describe('SumTests', function () {
it('should Sum Correct', function () {
let arr = [1,2,3,4,5];
let result = sum(arr);
... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = _interopDefault(require('react'));
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (v... |
# coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
# --------------- COLLECTS DATA ON EIGENFACE BY RUNNING IT ON A GIVEN IMAGE AND SAVING DATA TO A TEXT FILE -------------
# ------------------------------ SAVES THE DATA IN 3 TEXT FILES & PLOTS THE DATA --------------------------------------
# ------------------------------------ BY LAHIRU DINALANKARA - AKA SPIKE ----... |
// Hello World client
// Connects REQ socket to tcp://localhost:5559
// Sends "Hello" to server, expects "World" back
#include "zhelpers.h"
int main (void)
{
void *context = zmq_ctx_new ();
// Socket to talk to server
void *requester = zmq_socket (context, ZMQ_REQ);
zmq_connect (requester, "tcp:/... |
from utils import *
def merge_cmd(args):
if len(args.graphs)<2:
logging.fatal("Specify multiple gfa files to merge them.")
return
G=nx.DiGraph()
for graph in args.graphs:
logging.info("Adding %s ..." %graph)
read_gfa(graph,None,"",G,remap=True)
if args.outpref... |
import React from 'react'
import GraphiQL from 'graphiql'
import { buildClientSchema, introspectionQuery, isType, GraphQLObjectType } from 'graphql'
const { POSTGRAPHQL_CONFIG } = window
/**
* The standard GraphiQL interface wrapped with some PostGraphQL extensions.
* Including a JWT setter and live schema udpate c... |
(function () {
'use strict';
angular
.module('core')
.service('utility', utility);
function utility($q, $timeout) {
/**
* sets an index
* @param obj the object from which we want to set the index
* @param is string representation of the index
* @param value
* @returns {*}
... |
// copied from https://github.com/xpl/crx-hotreload and modified for this project.
const filesInDirectory = dir =>
new Promise(resolve =>
dir.createReader().readEntries(entries =>
Promise.all(
entries
.filter(e => e.name[0] !== ".")
.map(
e =>
e.isDirec... |
x,y=map(int,input().split());s=[];f=True
for _ in range(x):
s.append(input())
for i in range(x):
z=input()
for j in range(y):
if z[2*j]!=z[2*j+1] or z[2*j]!=s[i][j]:f=False
if f: print("Eyfa")
else: print("Not Eyfa")
|
import pandas as pd
import numpy as np
from keras.preprocessing.text import Tokenizer, text_to_word_sequence
from keras import regularizers
from keras.callbacks import ModelCheckpoint
from keras.layers import Embedding, Input, Dense, LSTM, Bidirectional, TimeDistributed, Dropout
from keras.models import Model
import m... |
"""
# lex-re
Converter e associar expressões regulares da teoria de compiladores com
expressões regulares escritas em linguagem de programação
Criar e manipular expressões regulares em Python ou outra linguagem de programação.
Vamos testar esta habilidade traduzindo as regras para símbolos terminais de
Rust em expr... |
import nextConnect from "next-connect";
import middleware from "../../../../../lib/db";
const handler = nextConnect();
handler.use(middleware);
handler.get(async (req, res) => {
const id = parseInt(req.query.id);
const updateView = req.query.updateview ? (req.query.updateview === "false" ? false : true) : true;
... |
/*
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "... |
from argparse import ArgumentParser
from sys import stdin
from mlmorph import Generator, Analyser, check_foreign_word
def main():
"""Invoke a simple CLI analyser or generator."""
a = ArgumentParser()
a.add_argument('-i', '--input', metavar="INFILE", type=open,
dest="infile", help="sourc... |
import React from "react"
import cx from "classnames"
import { reduxForm } from "redux-form"
import { connect } from "react-redux"
import { ReduxFormCheckboxField } from "../../../forms/checkbox-field"
import { ReduxFormSelectField } from "../../../forms/select-field"
import { ReduxFormInputField } from "../../../form... |
'use strict'
var fs = require('graceful-fs')
var path = require('path')
var mkdirp = require('mkdirp')
var requireInject = require('require-inject')
var test = require('tap').test
var common = require('../common-tap.js')
var pkg = common.pkg
var json = {
name: 'gist-short-shortcut',
version: '0.0.0'
}
test('se... |
const server = require("../../server");
const { get, post } = server.router;
const { render } = server.reply;
server(
get("/", (ctx) => render("index.hbs")),
get("/:id", (ctx) => render("page.hbs", { page: ctx.params.id }))
);
|
''' URLS worker: Tries to extract URL from strings output '''
import re
import pprint
class URLS(object):
''' This worker looks for url patterns in strings output '''
dependencies = ['strings']
def __init__(self):
''' Initialize the URL worker '''
self.url_match = re.compile(r'http[s]?://... |
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 23 13:58:21 2013
@author: edouard.duchesnay@cea.fr
@author: benoit.da_mota@inria.fr
"""
from epac.workflow.pipeline import Pipe
from epac.workflow.splitters import Perms, Methods, CV
from epac.workflow.splitters import CVBestSearchRefit
from epac.workflow.splitters impor... |
const Discord = require("discord.js")
module.exports = {
name: 'help',
aliases: ["h"],
run: (bot, message, args) => {
const LogChannel = message.client.channels.cache.get("700438892888719501");
message.delete()
.catch(err => {
console.log(err)
});
... |
/* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2015, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file rendservice.c
* \brief The hidden-service side of rendezvous functionality.
**/
#define RENDSERVICE_PRIVATE
#include "or.h"
#include "circpathb... |
/* eslint-disable react/prop-types */
/* eslint-disable no-unused-vars */
/* eslint-disable prefer-const */
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import {
FaTwitter, FaFacebookF, FaPinterestP, FaAngleLeft, FaAngleRight,
} from 'react-icons/fa';
import { v4 as uuidv4 } from 'u... |
# This file is part of GridCal.
#
# GridCal 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 3 of the License, or
# (at your option) any later version.
#
# GridCal is distributed in the hope that... |
#!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Copyright (c) 2018-2021 The EMRALS Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests the includeconf argument
Verify that:
1. adding... |
import variable from "./../variables/platform";
export default (variables = variable) => {
const platform = variables.platform;
const cardItemTheme = {
"NativeBase.Left": {
"NativeBase.Body": {
"NativeBase.Text": {
".note": {
color: variables.listNoteColor,
fontWeight: "400",
marginR... |
/* $FreeBSD: src/sys/kern/sysv_sem.c,v 1.69 2004/03/17 09:37:13 cperciva Exp $ */
/*
* Implementation of SVID semaphores
*
* Author: Daniel Boulet
* Copyright (c) 2013 Larisa Grigore <larisagrigore@gmail.com>
*
* This software is provided ``AS IS'' without any warranties of any kind.
*/
#include "namespace.h"... |
"""
# -- --------------------------------------------------------------------------------------------------- -- #
# -- project: A SHORT DESCRIPTION OF THE PROJECT -- #
# -- script: data.py : python script for data collection ... |
"""myfunction.py"""
import requests
def myfunction(numbers):
"""Adds up all ints in numbers and returns the result"""
return sum(numbers)
def awesomefunction():
"""Returns stuff!"""
r = requests.get('http://localhost/', json={})
return r.json()
|
import React from 'react'
import PropTypes from 'prop-types'
/*
* Error Boundary for when components throw errors because of invalid props.
* TODO: Dispatch error message for visual feedback.
*/
class ErrorBoundary extends React.Component {
static propTypes = {
children: PropTypes.any,
}
stat... |
import React, { useRef, useLayoutEffect } from "react";
import anime from "animejs/lib/anime.es.js";
import Card from "./Card";
import Demo1 from "./Demo1";
import Demo2 from "./Demo2";
import Demo3 from "./Demo3";
import Demo4 from "./Demo4";
import Demo5 from "./Demo5";
const Rules = () => {
return (
<div>
... |
import discord
from discord.ext import commands
import sys
class Mod(commands.Cog):
def __init__(self, bot):
self.bot = bot
self._last_member = None
@commands.command()
async def calc(self, ctx, i):
await ctx.message.channel.send(eval(i))
@commands.command()
async def avat... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/**
* @template T
*/
class ArrayQueue {
/**
* @param {Iterable<T>=} items The initial elements.
*/
constructor(items) {
/** @private @type {T[]} */
this._list = items ? Array.from(item... |
/*
* This header is generated by classdump-dyld 1.5
* on Tuesday, November 10, 2020 at 10:18:40 PM Mountain Standard Time
* Operating System: Version 14.2 (Build 18K57)
* Image Source: /System/Library/PrivateFrameworks/VideoSubs... |
/*****************************************************************************\
* ANALYSIS PERFORMANCE TOOLS *
* Extrae *
* Instrumentation package for parallel applications *
**... |
###############################################################################
# Code from
# https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py
# Modified the original code so that it also loads images from the current
# directory as well as the subdirectories
################################... |
"""
Example script for data preparation.
If you use this code, please cite the following paper.
Seungbo Ha and Ilwoo Lyu
SPHARM-Net: Spherical Harmonics-based Convolution for Cortical Parcellation.
IEEE Transactions on Medical Imaging. 2022
Copyright 2022 Ilwoo Lyu
Licensed under the Apache License, Ver... |
'use strict';
module.exports = {
port: 443,
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/surveyapp14',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/an... |
#ifndef GOL_RENDERER
#define GOL_RENDERER
#include <SDL.h>
#include <vector>
#include "TextureWrapper.h"
namespace visual{
enum textureID{
ButtonLoad = 0,
ButtonSave = 1,
ButtonPause = 2,
};
class Renderer{
SDL_Renderer* sdlRenderer;
//no time to create texture sheet in gimp
TextureWrapper loadTextu... |
# Standard library imports
import inspect
import io
import os
import sys
from json import loads
# Bokeh imports
import bokeh.models as models
from bokeh.core.json_encoder import serialize_json
from bokeh.model import Model
dest_dir = sys.argv[1]
classes = [member for name, member in inspect.getmembers(models) if ins... |
# Copyright (c) 2003-2012 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
from impacket import ImpactPacket, ImpactDecoder, structure
O_ETH = 0
O_IP = 1
O_ARP = 1
O_UDP = 2
O_... |
import aioftp
from aiohttp import web
import asyncio
from utils import parse_headers
from errors import FtpProxyError, ServerUnreachable, MissingMandatoryQueryParameter
class AioftpError(FtpProxyError):
def __init__(self, ftp_error):
super().__init__('\n'.join([info.strip() for info in ftp_error.info]))... |
# coding: utf-8
"""
Uptrends API v4
This document describes Uptrends API version 4. This Swagger environment also lets you execute API methods directly. Please note that this is not a sandbox environment: these API methods operate directly on your actual Uptrends account. For more information, please visit ... |
import glob
import sys
import traceback
from os.path import basename, join
import numpy as np
import pandas
from hic import *
from redun import Dir, task
from scipy import stats
from insitro_core.utils.cloud.bucket_utils import *
from insitro_core.utils.storage import *
@task()
def compute_powerlaw_fit_from_hic(
... |
/* eslint-disable linebreak-style */
const algosdk = require('algosdk')
const { exit } = require('process')
const readline = require('readline')
const PricecasterLib = require('../lib/pricecaster')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
function ask (questionText) {
... |
# Replace this file with the Solution for Project Euler Problem #058
# Project Euler Problem: #058
# Repository Maintainer: https://www.github.com/theSwapnilSaste
# File Creation Date : 14th March 2020
# Solution Author : **** Insert Your Name/Github Handle Here ***
# Solution added on : **** Insert Dat... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... |
import stylize, {encodeDisallowedCharacters} from './style-serializer'
import serialize from './content-serializer'
export function path({req, value, parameter}) {
const {name, style, explode, content} = parameter
if (content) {
const effectiveMediaType = Object.keys(content)[0]
req.url = req.url.split(`... |
"""
Mixins for logistic regression and NMF models, shared across different models
"""
import numpy as np
from scipy.special import expit as _sigmoid, kl_div
from scipy.stats import bernoulli
class LogisticMixin(object):
def _negative_log_likelihood(self, w, y, X, mask=None):
"""
Returns logistic ... |
//
// YCXMenu.h
// YCXMenuDemo_ObjC
//
// Created by 牛萌 on 15/5/6.
// Copyright (c) 2015年 NiuMeng. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "YCXMenuItem.h"
// Menu将要显示的通知
extern NSString * const YCXMenuWillAppearNotification;
// Menu已经显示的通知
extern NSString * const YCXMenuDidAppearNotific... |
/*
YUI 3.17.1 (build 0eb5a52)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("event-touch",function(e,t){var n="scale",r="rotation",i="identifier",s=e.config.win,o={};e.DOMEventFacade.prototype._touch=function(t,s,o){var u,a,f,l,c;if(t.touches)... |
goog.addDependency("base.js", ['goog'], []);
goog.addDependency("debug/error.js", ['goog.debug.Error'], []);
goog.addDependency("dom/nodetype.js", ['goog.dom.NodeType'], []);
goog.addDependency("asserts/asserts.js", ['goog.asserts', 'goog.asserts.AssertionError'], ['goog.debug.Error', 'goog.dom.NodeType']);
goog.addDep... |
# Copyright 2021 Intel 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 wr... |
# Terminal_AD_and_Bat.py
from cyberbot import *
bot(22).tone(2000, 300)
display.off()
while True:
ad0 = pin0.read_analog()
ad1 = pin1.read_analog()
ad2 = pin2.read_analog()
ad4 = pin4.read_analog()
print('ad0 = %d, ad1 = %d, ad2 = %d, ad4 = %d' % (ad0, ad1, ad2, ad4))
sleep(1000) |
/*!
* jquery.wm-gridfolio - v 1.0
* desenvolvido por Welison Menezes
* email : welisonmenezes@gmail.com
*
*
* Copyright 2014 Welison Menezes
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @license http://www.gnu.org/licenses/gpl.html GPL2 License
*/
!function(e){"use strict";e.... |
from operator import itemgetter
import pytest
from responses import GET
from spinta.testing.datasets import pull
@pytest.mark.skip('datasets')
def test_csv(rc, cli, app, responses):
responses.add(
GET, 'http://example.com/countries.csv',
status=200, content_type='text/plain; charset=utf-8',
... |
from .copy_manager import DestinationAlreadyExistsError
from .native_copy_manager import NativeCopyManager
from .rsync_copy_manager import RsyncCopyManager
class UnknownCopyManagerError(Exception):
pass
class CopyManagerFactory(object):
@classmethod
def get(cls, manager_name):
if manager_name in... |
app.directive('pagination', function () {
return {
templateUrl: '../angular/app/admin/orders/orders-pagination.template.html',
controller: ['$scope', PaginationController]
}
});
function PaginationController($scope) {
$scope.rangeFrom = function (to)
{
var response = [];
... |
import string
import secrets
import math
import pickle
from spass.exceptions import ParameterError
def generate_random_password(length=9, letters=True, digits=True, punctuation=True, ignored_chars=''):
"""
Generates a cryptographically secure random password
:param length: Length of password
:param le... |
import torch
from PIL import ImageDraw
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision.ops import box_convert
from torchvision.datasets import VOCDetection
from utils.Color import getRandomColor
class YoloVOCDetection(VOCDetection):
def __init__(self,
... |