text stringlengths 3 1.05M |
|---|
"""
This file offers the methods to automatically retrieve the graph Candidatus Peregrinibacteria bacterium CG2_30_44_17.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title=... |
export default angular
.module('chpl.charts', [
'angulartics',
'chpl.services',
'googlechart',
'ui.bootstrap',
]);
|
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.Moddle = {}));
}(this, function (exports) { 'use strict';
/**
* Flatten array, ... |
# coding: utf-8
"""
Divseek Canada MVP application API
Implements all the calls necessary for finding genomic markers for germplasm, but doesn't conform to BrAPI. # noqa: E501
OpenAPI spec version: 0.0.1
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git... |
System.register([], function(exports_1) {
var ValidationMetadata, ValidationPropertyMetadata;
function ensure(setupStep) {
return function (target, propertyName) {
if (target._validationMetadata === undefined) {
target._validationMetadata = new ValidationMetadata();
... |
# type: ignore
"""Standard library "os" equivalents"""
from os import * # noqa
from airfs.os import path # noqa
from airfs._core.functions_os import ( # noqa
listdir,
lstat,
makedirs,
mkdir,
readlink,
remove,
rmdir,
scandir,
stat,
symlink,
unlink,
)
|
import sqlite3
from hashlib import sha256
ADMIN_PASSWORD = "123456"
connect = input("What is your password?\n")
while connect != ADMIN_PASSWORD:
connect = input("What is your password?\n")
if connect == "q":
break
conn = sqlite3.connect('pass_manager.db')
def create_password(pass_key, service, ad... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
# import the necessary packages
from imutils import paths
import face_recognition
import pickle
import cv2
import os
args = {}
# path to input directory of faces + images"
args['dataset'] = os.path.join(os.path.dirname(__file__), '..', 'dataset', 'classmates')
# path to serialized db of facial encodings
args['encodin... |
const { UnixTimestamp } = require('@darkwolf/time.cjs')
const { PaymentsStats } = require('../types')
const { UnknownError } = require('../errors')
const { EventType, PaymentType } = require('../constants')
class GetPaymentsStatsRequest {
constructor(parameters = {}, context) {
this.authRequired = GetPaymentsSta... |
import NetInfo from "@react-native-community/netinfo";
import { CHECK_NETWORK_STATUS } from "./types";
export const networkStatus = () => dispatch => {
NetInfo.addEventListener(state => {
console.log("Connection type", state.type);
console.log("Is connected?", state.isConnected);
dispatch({
type: C... |
const { decryptMedia } = require('@open-wa/wa-decrypt')
const fs = require('fs-extra')
const axios = require('axios')
const { getText } = require('./lib/ocr')
const images = require('./lib/images')
const adminNumber = JSON.parse(fs.readFileSync('./lib/admin.json'))
const Math_js = require('mathjs');
const { langCheck }... |
# Copyright 2022 Huawei Technologies Co., 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
# Unless required by applicable law or agreed to in... |
import Vue from 'vue'
import App from './App.vue'
import router from './router'
Vue.config.productionTip = false
Vue.prototype.$bus = new Vue()
new Vue({
render: h => h(App),
router
}).$mount('#app')
|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
var interface=[
{
"parameter": "--collect-only",
"description": "只收集测试,不执行测试"
},
{
"parameter": "----maxfail=num",
"description": "在第一次num失败或错误之后退出"
},
{
"parameter": "--last-failed",
"description": "当一个或者多个测试失败时,我们常常希望能够定位到最后一个失败的测试用例重新运行"
},
... |
'use strict';
/* Services */
// Demonstrate how to register services
// In this case it is a simple value service.
angular.module('bootstrapVariablesEditor.services', []).
value('version', '0.2').
factory('ap_less',['$http', function($http) {
var lessEngine = {};
lessEngine.importVariables = func... |
/**
* Copyright 2012 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 appli... |
# Generated by Django 2.2.7 on 2019-11-15 09:19
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
import React from "react";
import ReactDOM from "react-dom";
import { Route, BrowserRouter as Router } from "react-router-dom";
import "./index.css";
import App from "./components/App";
import * as serviceWorker from "./serviceWorker";
import "bootstrap/dist/css/bootstrap.css";
import Counters from "./components/count... |
#
# MIT License
#
# (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
#
# 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... |
/**
* Created by zhigang on 14-10-9.
*/
var expressJwt = require('express-jwt');
var _ = require('lodash');
var config = require('config');
var jwtOption = require('../middlewares/jwtSecure.js').jwtSetting;
exports.authorize = expressJwt(jwtOption);
exports.unauthorizedHandler = function (err, req, res, next) {
... |
import React from "react";
import "../styles/SearchBox.css";
function SearchBox({ handleSearchChange }) {
return (
<div className="searchbox">
<form className="form-inline">
<input
className="form-control"
type="search"
placeholder="Search"
aria-label="Search... |
export type ModalProps = {
visible: bool
};
|
# Copyright (c) 2020 Foundry.
#
# 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,... |
# store_data_file.py - Process JSON files from AWS S3 to PostgreSQL Database
# forked from Joinville Smart Mobility Project and Louisville WazeCCPProcessor
# modified by Bryan.Blackford@lacity.org for City of Los Angeles CCP
# Database Config - fill in the details for your database here:
DATABASE = {
'drivername': "po... |
import streamlit as st
import numpy as np
from code.trajectory import get_trajectory, fig_from_list, check_solution
# Fill up the page
c1, c2 = st.columns([8,1])
c1.title("The Game")
restart = c2.button("Restart")
# Gravity constants by planet
GRAVITY_DICT = {'Earth': 9.8, 'Moon': 1.6, 'Mars': 3.7, 'Jupiter': 24.8}
... |
/*
* The MIT License
*
* Copyright (c) 2007 Markus Stocker
*
* 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 ... |
/*
* Licensed Materials - Property of IBM (c) Copyright IBM Corp. 2012, 2013 All Rights Reserved.
*
* US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
* IBM Corp.
*
* DISCLAIMER OF WARRANTIES :
*
* Permission is granted to copy and modify thi... |
import os
import sys
import copy
import logging
from checker import *
from .ofp import register_ofp_creators
from .ofp import OfpBase
from .ofp_band_stats import SCE_BAND_STATS
from .ofp_band_stats import OfpBandStatsCreator
# YAML:
# - port_stats:
# port_no: 0
# rx_packets: 0
# tx_packets: 0
# rx_byt... |
import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="scattercarpet.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent... |
/* ../netlib/csptri.f -- translated by f2c (version 20100827). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the en... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
:url: https://github.com/allenta/zabbix-template-for-varnish-cache
:copyright: (c) 2015 by Allenta Consulting S.L. <info@allenta.com>.
:license: BSD, see LICENSE.txt for more details.
'''
from __future__ import absolute_import
import json
import re
import subprocess
im... |
import os
# Telegram configuration settings
TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
TELEGRAM_CHANNEL_ID = os.getenv('TELEGRAM_CHANNEL_ID')
TELEGRAM_ADMINS_LIST = list(
map(int, os.getenv('TELEGRAM_ADMINS_LIST').split(',')))
|
/**
Author Erlandas Miezys
https://open.kattis.com/problems/simonsays
*/
#include <stdio.h>
#include <string.h>
typedef int bool;
#define true 1
#define false 0
char* simonsays = "Simon says";
bool simonSays(char* input){
bool result = true;
int lenght = strlen(simonsays);
int i;
f... |
#!/usr/bin/env python
# encoding: utf-8
# Hanoh Haim
# Cisco Systems, Inc.
VERSION='0.0.1'
APPNAME='cxx_test'
import os;
import commands;
import shutil;
import copy;
from distutils.version import StrictVersion
top = '../'
out = 'build'
b_path ="./build/linux/"
REQUIRED_CC_VERSION = "4.7.0"
class SrcGroup:
' ... |
$(function () {
$(".btn-check").click(function () {
var btn = $(this);
btn.parent().parent().find("td:nth-child(4)").html("");
var provider = btn.parents("table")[0].id;
var cnn = btn.parent().parent().find("td:nth-child(1)").text();
$.ajax({
url: '/en/test/dbco... |
# Copyright European Organization for Nuclear Research (CERN)
#
# 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
#
# Authors:
# - Vincent Garonne, <vin... |
/*
* File: Mymedfilt1.c
*
* MATLAB Coder version : 3.1
* C/C++ source code generated on : 23-Sep-2016 04:55:32
*/
/* Include Files */
#include "rt_nonfinite.h"
#include "yaapt.h"
#include "Mymedfilt1.h"
#include "yaapt_emxutil.h"
#include "median.h"
/* Function Definitions */
/*
* Arguments : em... |
import getApiClient, { HttpError } from '../api';
const client = getApiClient({baseURL: '/api/v1/'});
export const FETCH_PAGE_REQUEST = 'FETCH_PAGE_REQUEST';
export const FETCH_PAGE_SUCCESS = 'FETCH_PAGE_SUCCESS';
export const FETCH_PAGE_FAILURE = 'FETCH_PAGE_FAILURE';
export const fetchPageRequest = slug => ({
typ... |
'use strict'
const Channel = require('ipfs-pubsub-1on1')
const Logger = require('logplease')
const logger = Logger.create('exchange-heads', { color: Logger.Colors.Yellow })
Logger.setLogLevel('ERROR')
const getHeadsForDatabase = async store => {
if (!(store && store._cache)) return []
const localHeads = await st... |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2018-02-07 21:45
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('local_groups', '0061_group_group_type'),
]
operations = [
migrations.RemoveField(
... |
function _extends() { _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]; } } } return target; }; return _extends.apply(this, arguments); }
f... |
import time
import os
import json
import logging
import torch as th
from latent_dialog.utils import Pack, prepare_dirs_loggers
import latent_dialog.corpora as corpora
from latent_dialog.data_loaders import BeliefDbDataLoaders
from latent_dialog.evaluators import MultiWozEvaluator
from latent_dialog.models_task import S... |
import os
import re
import hou
import json
import errno
import shutil
from hutil.Qt import QtCore, QtGui, QtWidgets, QtUiTools
material_library=None
HELP_TEXT = '''
To import a material click on a corresponding swatch. The material is always imported as a separate "Material Library" LOP node.
The importer always aut... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... |
import {
GraphQLInt as Int,
GraphQLNonNull as NonNull,
GraphQLObjectType as ObjectType,
GraphQLString as StringType,
GraphQLList
} from 'graphql';
import JobType from './JobType';
import { Category, Job } from '../models';
const CategoryType = new ObjectType({
name: 'Category',
fields: {
id: { type:... |
# 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 may ... |
#
# Девятый простой парсер для тестирования скорости работы.
#
# Автор: Никитенко Михаил
# Лицензия: MIT License
#
from bs4 import BeautifulSoup
from .parsers_base import get_htmls, get_html
URL = 'https://www.google.com/search?newwindow=1&hl=ru&sxsrf=ACYBGNTjJc7js-ok-u_CvNXEbIXrj2T56A%3A1581684411300&ei=u5' \
... |
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <sys/time.h>
#include <setjmp.h>
#include <cmocka.h>
#include "reactor.h"
static void release(void *object)
{
printf("free %p\n", *(void **) object);
free(*(void **) object);
printf("freed\n");
}
static ... |
movies = {
"Apollo 13": ['Apollo 13 is an American space docudrama film directed by Ron Howard and starring Tom Hanks, Kevin Bacon, Bill Paxton, Ed Harris, and Gary Sinise.', 1995, 'https://en.wikipedia.org/wiki/Apollo_13_(film)'],
"The Martian": ['The Martian is a science fiction survival film directed by Ridley Scot... |
#!/usr/bin/env python
from setuptools import setup
setup(
name='awsudo2',
description='sudo-like utility to manage AWS credentials',
url='https://github.com/outersystems/awsudo2',
packages=['awsudo2'],
entry_points={
'console_scripts': [
'awsudo2 = awsudo2.main:main',
]... |
# -*- coding: utf-8 -*-
from torch import nn
from torch.nn import TransformerEncoderLayer
import logging
import os
import torch
import json
class TransformerUnit(nn.Module):
"""Transformer customized
"""
def __init__(
self,
d_model: int,
n_heads: int ... |
#ifndef __LOBBYWINDOW_H__
#define __LOBBYWINDOW_H__
#include "ns_window.h"
#include "aui_action.h"
#include "ns_string.h"
class aui_StringTable;
class LobbyWindow;
extern LobbyWindow *g_lobbyWindow;
#define k_PP_PUBLIC 0
#define k_PP_PRIVATE 1
class LobbyWindow : public ns_Window
{
public:
Lob... |
"""Constants for the resoulution manager."""
from enum import Enum
from pathlib import Path
from ..const import SUPERVISOR_DATA
FILE_CONFIG_RESOLUTION = Path(SUPERVISOR_DATA, "resolution.json")
SCHEDULED_HEALTHCHECK = 3600
MINIMUM_FREE_SPACE_THRESHOLD = 1
MINIMUM_FULL_BACKUPS = 2
class ContextType(str, Enum):
... |
import FWCore.ParameterSet.Config as cms
hltPFMETJetCorrectorL2 = cms.EDProducer("LXXXCorrectorProducer",
algorithm = cms.string('AK4PFchs'),
level = cms.string('L2Relative')
)
|
#ifndef __REPLAYFS_DISKALLOC_H
#define __REPLAYFS_DISKALLOC_H
#include <linux/kernel.h>
#include <linux/btree.h>
#include <linux/mutex.h>
#include <linux/mm.h>
#define REPLAYFS_DISK_FILE "/replay_logdb/replaymap.disk"
/* 4MB extents */
#define EXTENT_SIZE (1 << 22)
/* The number of free'd bytes in an extent before it... |
import { createContext } from "react";
const BrandContext = createContext();
export default BrandContext;
|
"""
Various Reader class instances.
"""
class Position(object):
def __init__(self, offset, line, column):
self.offset = offset
self.line = line
self.column = column
def __repr__(self):
return "<Pos %r (%r:%r)>" % (self.offset, self.line, self.column)
def __str__(self):
... |
import styled, { css } from 'styled-components'
import { color, grid, layout } from 'styled-system'
export const Grid = styled.div(
({ autoFit, center }) => css`
display: grid;
${autoFit &&
`grid-template-columns: repeat(auto-fit, minmax(${autoFit}, 1fr));`}
${center && 'justify-items: center; align-conten... |
# Copyright 2018 The TensorFlow Probability 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 applicable law o... |
/* te-sun3.h -- Sun-3 target environment declarations.
Copyright (C) 1987-2017 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS 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 F... |
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
YUI.add("lang/calendar_es",function(e){e.Intl.add("calendar","es",{weekdays:["Domingo","Lunes","Martes","Mi\u00e9rcoles","Jueves","Viernes","S\u00e1bado"],short_weekdays:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],very_short_weekdays... |
# merge sort implementation
import math
from heapq import merge
def merge_sort(a):
if len(a) <= 1:
return a
mid = len(a) // 2
left = merge_sort(a[:mid])
right = merge_sort(a[mid:])
return list(merge(left, right))
if __name__ == '__main__':
v = [1, 7, 9, 3, 2, -1, -19]
v = merge_sort(v)
print v |
import { render } from '@ember/test-helpers';
import { setupRenderingTest } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { module, test } from 'qunit';
module('Integration | Helper | logic-nor', function(hooks) {
setupRenderingTest(hooks);
test('can verify nor true true', async functio... |
from .blocks import VAEEncoder, VAEDecoder
from .latent import LatentModel
from .cond_distr import *
|
/**
* This file is part of DSO.
*
* Copyright 2016 Technical University of Munich and Intel.
* Developed by Jakob Engel <engelj at in dot tum dot de>,
* for more information see <http://vision.in.tum.de/dso>.
* If you use this code, please cite the respective publications as
* listed on the above website.
*
* DSO is f... |
/**
* Rainbow Enduser portal
* # Rainbow end user portal API guide ## Preamble ### Introduction This guide describes list of API services that are provided by OT Rainbow End user portal. This portal is dedicated to end user features. ### Protocol REST interface is used for sending/receiving OT rainbow API messag... |
#ifndef __FLOP_COUNTS__
#define __FLOP_COUNTS__
unsigned long int flop_counts(char op, unsigned long int a, unsigned long int b, unsigned long int c, unsigned long int d);
#endif
|
from tkinter import *
import cv2
from PIL import Image, ImageTk
import json
import detector
import management
import time
window = Tk()
window.title('Пишем историю')
window.geometry('1080x720+300+100')
window.configure(bg='Light Blue')
imageFrame = Frame(window, width=1080, height=720)
imageFrame.grid(row=0, column=0... |
const notes = require('./notes').all
const memoize = require('memoizee')
// pre-warmed / pre-memoized
module.exports = () => {
const { Scale, Chord } = require('tonal')
const { every } = module.exports
void [Scale, Chord].map(every)
return { every }
}
// lazy
module.exports.every = memoize(element => [...... |
from pypika import Table
from app.models.document_model import Document
from app.repositories.base_repository import BaseRepository
from app.utils.postgres import db_connection
class DocumentRepository(BaseRepository):
ENTITY = Document
TABLE_NAME = "documents"
TABLE = Table(TABLE_NAME)
@classmetho... |
#====================== BEGIN GPL LICENSE BLOCK ======================
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later vers... |
'use strict';
module.exports = (sequelize, DataTypes) => {
const author = sequelize.define('author', {
name: DataTypes.STRING,
email: DataTypes.STRING,
phone: DataTypes.CHAR,
address: DataTypes.TEXT,
publisher_id: DataTypes.INTEGER,
status_delete : DataTypes.BOOLEAN
}, {
defaultScope: {
... |
define([ "jquery", "nouislider/jquery.nouislider" ], function($) {
"use strict";
var RangeSlider = function() {
this.sliders = $(".js-range-slider");
this._initSliders();
},
rangeSlider;
RangeSlider.prototype._initSliders = function() {
var _this = this;
this.sliders.each(function() {
... |
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under ... |
/**
* @license Copyright (c) 2003-2022, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltesteditor';
import DomEventData from '@ckeditor/ckeditor5-engine/s... |
var data = {
"body": "<path opacity=\".3\" d=\"M7.46 9.46c-1.78 1.79-1.91 4.58-.43 6.54c1.53-2.54 3.73-4.64 6.37-6a15.994 15.994 0 0 0-4.88 7.32c.75.43 1.59.68 2.48.68c1.34 0 2.59-.52 3.54-1.46c1.74-1.74 2.81-6.57 3.26-10.33c-3.76.44-8.59 1.51-10.34 3.25z\" fill=\"currentColor\"/><path d=\"M6.05 8.05a7.007 7.007 0 0 0... |
import authAxios from 'modules/shared/axios/authAxios';
export default class IamService {
static async enable(ids) {
return this._changeStatus(ids, false);
}
static async disable(ids) {
return this._changeStatus(ids, true);
}
static async _changeStatus(ids, disabled) {
const body = {
ids,... |
#!/bin/env python3
import fileinput
from collections import Counter
data = [line.strip() for line in fileinput.input()]
twos = 0
threes = 0
for line in data:
count = Counter(line).values()
twos += 2 in count
threes += 3 in count
print(twos * threes)
for i, line1 in enumerate(data):
for line2 in d... |
const { richEmbed } = require('discord.js');
module.exports.run = async (bot, message, args, funcs, con) => {
try {
con.query(`SELECT cn.caseNumber, gs.logsEnabled, gs.twoFAEnabled, gs.twoFAPass, gs.logsChannel FROM guildCasenumber as cn LEFT JOIN guildSettings as gs ON gs.guildId = cn.guildId WHERE cn.guil... |
'use strict';
angular.module('arethusa.depTree', []);
|
{
if (x === 253) {
return AdsEditorCampaignGroupDetailsSection109(252);
}
}
|
define([
'underscore',
'knockout'
],function(
__,
ko
){
var vm = {
width : ko.observable('100%'),
height : ko.observable('480'),
src : ko.observable('')
};
vm.src.subscribe(function( v ) {
setTimeout(function() {
resize();
window['previewer-iframe'].src = v;
}, 100);
... |
import React, { Component } from 'react';
import SearchBar from './../containers/search-bar';
import WeatherList from './../containers/weather-list';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
<WeatherList />
</div>
);
}
}
|
import numpy as np
import tensorflow as tf
def init_weights(shape, name):
return tf.get_variable(name, shape=shape, initializer=tf.contrib.layers.xavier_initializer())
def init_biases(shape):
return tf.Variable(tf.zeros(shape))
def lrelu(x, leak=0.02):
return tf.maximum(x, leak*x)
def batch_norm(input, phase_tr... |
#!/usr/bin/python
import unittest
from graphtheory.structures.edges import Edge
from graphtheory.structures.graphs import Graph
from graphtheory.forests.treecenter import TreeCenter
# 0 3
# | |
# | |
# 1 --- 4 --- 5 --- 6
# |
# |
# 2
class TestTreeCenter(unittest.TestCase):
def setUp(self):
... |
/*globals grecaptcha*/
import Component from '../_classes/component/Component';
import { GlobalFormio as Formio } from '../../Formio';
import _get from 'lodash/get';
import _debounce from 'lodash/debounce';
import NativePromise from 'native-promise-only';
export default class ReCaptchaComponent extends Component {
s... |
/***************************************************************************
* Copyright (C) by GFZ Potsdam *
* *
* You can redistribute and/or modify this program under the *
* terms o... |
"""
Module for reading config files (xknx.yaml).
* it will parse the given file
* and add the found devices to the devies vector of XKNX.
"""
from enum import Enum
import logging
import os
from xknx.devices import (
BinarySensor,
Climate,
Cover,
DateTime,
ExposeSensor,
Fan,
Light,
Noti... |
#include <stdio.h>
int main(void){
int i;
float quant=2, uni, soma=0, val;
do{
printf("Informe a quantidade de um produto: ");
scanf("%f", &quant);
if(quant == 0){
break;
}
printf("Informe o valor unitario do produto: ");
scanf("%f", &uni);
soma = soma + quant * uni;
... |
"""Default methods and helpers for estimation of propensities"""
from pygam import LogisticGAM, s
from sklearn.linear_model import LogisticRegression
def get_default_estimator():
"""Retrieve a default choice of probability estimator
Returns:
sklearn model with predict_proba() method
"""
retur... |
import { Form, Input, Modal, DatePicker } from 'antd';
import React, { PureComponent } from 'react';
import MeterTypeSelect from './MeterTypeSelect';
import DictSelect from '../../System/components/DictSelect';
const FormItem = Form.Item;
const { MonthPicker } = DatePicker;
@Form.create({
mapPropsToFields() {
r... |
import * as date from './dateMgr.js';
import * as nbr from './nbrMgr.js';
import { renderTextOptions } from '../marks/label-text.jsx';
const hasWindow = () => typeof window !== 'undefined';
const hasDocument = () => typeof document !== 'undefined';
const isPeriod = function(v){
let out = false;
for(let t in {year... |
# Generated by Django 2.0 on 2017-12-11 11:06
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Foo',
fields=[
('id', models.AutoField(auto_c... |
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/strongly-recommended',
'@vue/standard'
],
rules: {
'no-console': 'off',
'no-case-declarations': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'generator-star-spacing': 'off... |
class Card {
constructor(card){
this.id = card.id
this.question = card.question
this.responses = card.responses ? card.responses : []
this.topicID = card.topic_id
}
} |
#!/usr/bin/python
#
# Copyright 2014 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 b... |
"""Module contains utilities to improve the interface with Biopython."""
from Bio.Seq import Seq
from Bio.SeqFeature import SeqFeature, FeatureLocation
from Bio.SeqRecord import SeqRecord
from typing import Union, List
def feature_from_qualifier(
seqrec: Union["BasicPart", SeqRecord], qualifier_key: str, qualifi... |
#!/usr/bin/env python3
#
# Copyright (c) 2015, Roberto Riggio
# 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 the above copyright
# notice, t... |