text stringlengths 1 1.05M |
|---|
<reponame>Vlady14/project3<filename>scripts/seedDB.js
const mongoose = require("mongoose");
const db = require("../models");
mongoose.connect(
process.env.MONGODB_URI ||
"mongodb://localhost/stock-up-users"
);
const userSeed = [
{
email: '<EMAIL>',
username: 'mik2',
firstName: 'Mik... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.fhwa.c2cri.infolayer;
/**
* Represents the specification of a value within a message.
*
* @author TransCore ITS, LLC
* Last Updated: 1/8/2014
*/
public class ValueSpecificationItem {
/** The val... |
<reponame>rockenbf/ze_oss
// Copyright (c) 2015-2016, ETH Zurich, <NAME>, Zurich Eye
// 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 abo... |
<filename>src/components/icon/assets/branch.tsx
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your... |
package io.github.biezhi.wechat.api.response;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 附件响应体
*
* @author biezhi
* @date 2018/1/20
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class MediaResponse extends JsonResponse {
@SerializedNa... |
def extract_email_references(input_file):
email_references = {}
with open(input_file, 'r') as file:
data = file.read()
entries = data.split('##################################################')
for entry in entries:
if entry.strip():
email = entr... |
package com.taylak.wallpaper.universalimage;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.AbsListView;
import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener;
import com.taylak.wallpaperhd.R;
public class AbsListViewBaseActivity extend... |
<reponame>linyineng/mip2-extensions<filename>components/mip-story/mip-story-img.js
/**
* @file mip-story-img 子组件
* @description 创建和展现小故事中的图片
* @author wangqizheng
*/
import {
getAttributeSet,
getJsonString
} from './utils'
const { CustomElement, util } = MIP
const { dom } = util
export default class MIPStoryIm... |
#!/bin/bash
: '
The following script calculates
the square value of the number, 5.
'
((area=5*5))
echo $area
|
package weixin.lottery.service.impl;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import weixin.lottery.entity.WeixinCommonforhdEntity;
import weixin.lottery.service.WeixinCommonforh... |
package word;
public class Initialization {
private Initialization() {
}
public static CommandImpl buildCommandInterface(StringBuilder text) {
CommandImpl textHolder = new CommandImpl(text);
textHolder.init();
return textHolder;
}
}
|
sum: 9
|
/* @jsx h */
import {theme} from '../theme/Theme';
import {css} from 'emotion';
import {h} from '../nori/Nori';
import Box from '../components/Box';
import Lorem from '../components/Lorem';
import Greeter from '../components/Greeter';
import Lister from '../components/Lister';
import {useState} from "../nori/Hooks";
i... |
ROOT="/orch/scratch/vishal_mirna_kidney/publish"
mkdir -p $ROOT/results/FA-model
mkdir -p $ROOT/results/UUO-model
# Run FA rnaseq
Rscript -e 'root_path="/orch/scratch/vishal_mirna_kidney/publish/FA-model/rnaseq/final/2016-02-05_mrna_bio";library(rmarkdown);render(FA-model/mrna-summary.Rmd)'
mkdir -p $ROOT/results/FA-m... |
package me.hydos.blaze4d.mixin.vertices;
import com.mojang.blaze3d.vertex.BufferBuilder;
import com.mojang.blaze3d.vertex.BufferUploader;
import com.mojang.datafixers.util.Pair;
import it.unimi.dsi.fastutil.objects.ObjectIntPair;
import me.hydos.blaze4d.Blaze4D;
import me.hydos.blaze4d.api.GlobalRenderSystem;
import m... |
import requests
from bs4 import BeautifulSoup
def scrape_flights(location_from, location_to, start_date, end_date):
# make an HTTP request to retrieve the web page
url = 'https://example.com/flights?from={}&to={}&start_date={}&end_date={}'.format(location_from, location_to, start_date, end_date)
response = request... |
<reponame>orangecms/lumina-desktop<filename>src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp
#include <QVariant>
#include <QSettings>
#include <QGuiApplication>
#include <QScreen>
#include <QFont>
#include <QPalette>
#include <QTimer>
#include <QIcon>
#include <QRegExp>
#ifdef Q... |
cm._lang = 'ru';
cm._locale = 'ru-IN';
cm._config.displayDateFormatCase = 'genitive';
cm._config.displayDateFormat = '%j %F %Y';
cm._config.displayDateTimeFormat = '%j %F %Y в %H:%i';
cm._messages = {
common: {
'server_error': 'Произошла непредвиденная ошибка. Пожалуйста, повторите попытку позже.',
},
... |
#include <fstream>
#include <iostream>
#include <string>
#include <cmath>
#include <emscripten/bind.h>
#include <emscripten/emscripten.h>
#define GLFW_INCLUDE_ES3
#if defined(_MSC_VER)
#include <windows.h>
#endif
#include <GLFW/glfw3.h>
#include "delfem2/msh_io_obj.h"
#include "delfem2/msh_primitive.h"
#include "del... |
package google
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"cloud.google.com/go/storage"
"golang.org/x/net/context"
"golang.org/x/oauth2"
googleOauth2 "golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
"google.golang.org/api/option"
"github.com/lytics/cloudstorage"
)
const (
// Authentication Source'... |
<reponame>Lamburger/PlexRequests
AutoForm.hooks({
updateGeneralSettingsForm: {
onSuccess: function(formType, result) {
if (result) {
Bert.alert('Updated successfully', 'success');
Meteor.call("settingsUpdate");
}
this.event.preventDefault();
return false;
},
onError... |
<filename>hello.java<gh_stars>0
# tomandjerry
developed by devika
class sample
{
public static void main (string a[])
{
system.out.println("hello world");
}
}
|
def tobin(num):
bin_list = []
while num != 0:
bin_list.append(num % 2)
num //= 2
return ''.join([str(x) for x in bin_list[::-1]])
num = int(input('Enter a number: '))
print(tobin(num)) |
import numpy as np
import matplotlib.pyplot as plt
from deap import base, creator, tools, algorithms
from ....Classes.ImportMatrixVal import ImportMatrixVal
from ....Classes.ImportGenVectLin import ImportGenVectLin
from ....Classes.OptiGenAlgNsga2Deap import OptiGenAlgNsga2Deap
# Define the ZDT3 problem evaluation fun... |
# General
alias ll="ls -lAFh --color"
alias dedup="awk '!visited[$0]++'"
# Git
alias ga="git add -u; git add .; git status -sb"
alias gb="git branch -v"
alias gc="git ci --allow-empty -m"
alias gd="git diff"
alias gdc="git diff --cached"
alias gl="git log --graph --abbrev-commit --decorate --date=relative --format=for... |
# Testbench for top-level (opentdc_wb)
#
# SPDX-FileCopyrightText: (c) 2020 Tristan Gingold <tgingold@free.fr>
# SPDX-License-Identifier: Apache-2.0
${GHDL:-ghdl} -c --std=08 \
../rtl/opendelay_comps.vhdl \
delaylines.vhdl \
../rtl/opentdc_pkg.vhdl \
../rtl/opentdc_delay.vhdl \
../rtl/opentdc_delay-sim.vhdl \
..... |
#!/bin/bash
python scripts/travis_skip.py
if [ "$?" -eq "0" ]
then
pip install coverage coveralls django-nose
pip install --editable .
pip install $DJANGO
else
echo "Skipping"
fi
|
<reponame>sntsabode/react-native-walletconnect
import { createContext } from 'react'
const createErrorThunk = () => () => Promise.reject(
new Error('It looks like you\'ve forgotten to wrap your App with the <WalletConnectProvider />.')
)
export const defaultContext = Object.freeze({
createSession: createErrorThun... |
function checkAnswers(answers) {
const answerMap = {};
for (let i = 0; i < answers.length; i++) {
const answer = answers[i];
if(answerMap[answer]) {
return false;
} else {
answerMap[answer] = true;
}
}
return true;
} |
#!/bin/bash
run_sys_bench_test()
{
MYSQL_HOST=$1
MYSQL_ROOT_PASSWORD=$2
DOCKER_NETWORK=$3
USE_MYSQL_NATIVE_PASSWORD_PLUGIN=$4
# create schema
docker run --rm -i --network="${DOCKER_NETWORK}" rapidfort/mysql:latest \
-- mysql -h "${MYSQL_HOST}" -uroot -p"${MYSQL_ROOT_PASSWORD}" -e "CREA... |
#!/usr/bin/env bash
set -eu
cargo +nightly contract build --manifest-path util/Cargo.toml
cargo +nightly contract build --manifest-path asset/Cargo.toml
cargo +nightly contract build --manifest-path oracle/Cargo.toml
cargo +nightly contract build --manifest-path distributor/Cargo.toml
cargo +nightly contract build --... |
#!/bin/bash
# Runs the docker-compose project
###################################################################################################
# CONFIGURATION
###################################################################################################
PROJECT_NAME="greeter"
##############################... |
#!/bin/bash
#This file is to download pretrained model file and associate synset.txt file. It is assumed that these two files are already in a blob
#container, if you want to use a pretrained image classification model and associated synset file, you can download them from the links below
# and put them in storage con... |
# Function to swap two numbers
def swap_nums(num1, num2):
# Swapping the two numbers
num1, num2 = num2, num1
return num1, num2
# Main code
num1 = 5
num2 = 10
# Printing the values before swapping
print("Before swapping: ")
print("Number 1 = ", num1)
print("Number 2 = ", num2)
# Calling th... |
# Dataset: market1501
# imagesize: 256x128
# batchsize: 16x4
# warmup_step 10
# random erase prob 0.5
# last stride 1
# with center loss
# weight regularized triplet loss
# generalized mean pooling
# non local blocks
# without re-ranking: add TEST.RE_RANKING "('on')" for re-ranking
python3 tools/main.py --config_file='... |
/// <reference path="../../typings/tsd.d.ts"/>
var gulp = require('gulp');
var concat = require('gulp-concat');
//var gulpIf = require('gulp-if');
//var ngAnnotate = require('gulp-ng-annotate');
var ts = require('gulp-typescript');
//var uglify = require('gulp-uglify');
//var srcGlob = ['app/assets/**/*.ts', '!**/*.sp... |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import tensorflow as tf
import tensorflow.contrib.learn.python.learn as learn
import csv
import json
import math
import random
random.seed()
def read_data(path):
df = pd.read_csv('data/type-inference+vars.csv')
label_names = [c for c in df... |
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
printf "PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\n\0\21ClickHouse client\24\r\253\251\3\0\7default\0\4\1\0\1\0\0\t0.0.0.0:0\1\tmilovidov\21milovidov-desktop\vC... |
/*
Retrieve information about the specified console screen buffer.
Remarks:
Refer at fn. cli_init_ty_beta.
*/
# define CBR
# define CLI_W32
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_get_csbi_beta(CLI_W32_STAT(*argp))) {
auto signed i,r;
if(!argp) return(0x00);
if(!(*(CLI_OUT+((*... |
SELECT AVG(TIMESTAMPDIFF(HOUR, customers.in_time, customers.out_time))
FROM store_visits
WHERE DAYOFWEEK(customers.in_time) NOT IN (1, 7); |
#!/bin/sh
cat materialize-go-prejoined-views.mysql
cat materialize-go-graph-views.mysql
cat materialize-go-obd-bridge.mysql
cat materialize-go-annotation-reports.mysql
cat materialize-go-evidence-views.mysql
cat materialize-go-taxon-views.mysql
cat materialize-go-refgenomes-views.mysql
#cat go-term-motif-correlation.my... |
"""
Build a Python program that includes a function to add two given numbers.
"""
def add(a, b):
return a + b
if __name__ == '__main__':
result = add(2, 3)
print(f'The sum of 2 and 3 is {result}') |
<gh_stars>0
package org.firstinspires.ftc.teamcode.autonomous;
import org.firstinspires.ftc.teamcode.game.Alliance;
/**
* Created by <NAME> on 09/28/2019
* <p>
* Here's our approach for the autonomous period
* Steps
* 1. Find Sky-stone in top section of quarry
* 2. Approach top sky-stone
* 3. Capture sky-stone... |
<reponame>p3d-in/react-babylonjs<filename>src/customComponents/VRExperienceHelperLifecycleListener.ts
import { LifecycleListener } from "../LifecycleListener"
import { CreatedInstance } from "../CreatedInstance"
export default class VRExperienceHelperLifecycleListener implements LifecycleListener {
private props: an... |
import React from 'react';
import profile from '../images/profile-picture.jpg'
import swal from 'sweetalert';
function SweetAlert() {
swal("What is your favourite taco? Hint: type in fish, veggi, choriso, al pastor, arabes or barbacoa", {
content: "input",
})
.then((value) => {
if (value === "choriso") ... |
<gh_stars>0
import { Controller, Get, Post, Body, Param, Delete, Patch, Query, UsePipes, ValidationPipe, ParseIntPipe, UseGuards } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { Usuario } from 'src/auth/usuario.entity';
import { GetUsuario } from 'src/auth/get-usuario.decorator';
import {... |
angular.module('bookkeeping.accounts', ['ui.router', 'ngResource', 'bookkeeping.date', 'bookkeeping.error', 'bookkeeping.stringarray.directive'])
.config(['$stateProvider', function ($stateProvider) {
$stateProvider
.state('accounts', {
url: '/accounts',
template... |
<filename>api/modules/system/controllers/info.system.controller.js
'use strict';
const PKG = require('../../../package');
module.exports = (request, reply) => {
return reply({
'name': PKG.name,
'version': PKG.version,
'description': PKG.description
});
};
|
#!/bin/bash
#SBATCH --gres=gpu:2
#SBATCH --cpus-per-task=4
#SBATCH --ntasks=2
#SBATCH --mem=12G
#SBATCH --time=0-00:19
#SBATCH --output=logdnn.out
module load cuda cudnn python/3.5.2
source tensorflow/bin/activate
python3 SimBoost/xgboost/DNN_est.py
|
// Copyright (c) 2016-2019 <NAME>. All rights reserved.
// Copyright (c) 2016-2019 <NAME>. All rights reserved.
// Copyright (c) 2020-2021 Oasis Labs Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions a... |
#!/usr/bin/env sh
# https://helm.sh/docs/topics/plugins/#downloader-plugins
# It's always the 4th parameter
file=$(printf '%s' "${4}" | sed -e 's!.*://!!')
exec sops --decrypt --input-type "yaml" --output-type "yaml" "${file}"
|
#!/bin/bash
#
# Author: Sarven Capadisli <info@csarven.ca>
# Author URI: http://csarven.ca/#i
#
. $HOME/lodstats-env/bin/activate
. ./bfs.config.sh
rm "$data"import/*stats*
#lodstats -val "$data"import/graph.meta.nt > "$data"import/graph.meta.nt.stats.ttl
#find "$data" -name "*[!Structure|prov].rdf" | while ... |
import numpy as np
import pytest
from numpy.testing import assert_almost_equal, assert_raises
from sklearn.metrics import pairwise_distances
from sklearn.metrics.pairwise import pairwise_kernels
from ...tools import linear
from .. import MaxMargin
class TestMaxMarginStat:
@pytest.mark.parametrize(
"n, ob... |
import React, {Component} from 'react';
import {
StyleSheet,
View,
Text,
} from 'react-native';
export default class App extends Component {
state = {};
render(){
return (
<View style={styles.container}>
<Text>HomePage</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container:{
fle... |
package de.aitools.ie.segmentation;
import java.io.ObjectInputStream;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Locale;
import edu.stanford.nlp.io.IOUtils;
import edu.stanford.nlp.ling.CoreLabel;
import edu.stanford.nlp.parser.lexpa... |
/**
* Gets the repositories of the user from Github
*/
import { put, takeLatest, all } from 'redux-saga/effects';
import { Auth, API, graphqlOperation } from 'aws-amplify';
import {
selectCurrentUser,
selectCurrentUserContainer,
} from 'utils/selectUserInfo';
import { createUserContainer, updateUserContainer } f... |
package org.amplecode.staxwax.factory;
/*
* Copyright (c) 2008, the original author or authors.
* 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 r... |
package ff.camaro;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.gradle.api.Project;
public class Configurator extends Store {
protected Map<String, Object> config;
protected Project project;
public ArtifactInfo getArtifactInfo() {
final M... |
<gh_stars>0
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the A... |
package com.linkedin.datahub.graphql.types.dataplatform.mappers;
import com.linkedin.common.urn.Urn;
import com.linkedin.datahub.graphql.generated.DataPlatform;
import com.linkedin.datahub.graphql.generated.EntityType;
import com.linkedin.datahub.graphql.types.common.mappers.util.MappingHelper;
import com.linkedin.dat... |
import tensorflow as tf
def concat(dest, src, stride=1, activation=True, name=None, config=config.Config()):
def conv(input_tensor, kernel_size, stride, bias, name, config):
# Implementation of the convolution operation
pass # Replace with actual convolution operation
def norm(input_tensor, n... |
<reponame>TikhomirovSergei/simpleAppWithHooks
export const getWeatherImage = (icon: string) => {
switch (icon) {
case "01d":
return require(`../assets/01d.png`);
case "01n":
return require(`../assets/01n.png`);
case "02d":
return require(`../assets/02d.png... |
export const data = [
{
title: 'Principal Developer',
guid: 'oakvkx94htkgyhboaamzh',
specialization: '',
city: 'Amsterdam',
companyName: 'Booking.com',
totalCompensation: '€206,000',
totalCompensationNumber: 206000,
totalCompensationDetails: '€132K salary, €34K bonus, ... |
import { Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { WorkbasketSummaryResource } from 'app/models/workbasket-summary-resource';
@Component({
selector: 'taskana-pagination',
templateUrl: './pagination.component.html',
styleUrls: ['./pagination.component.s... |
import argparse
def main():
parser = argparse.ArgumentParser(description="FPGA Configuration Tool")
parser.add_argument('-g', '--gap',
required=False,
type=int,
default=1,
dest="gap",
metava... |
import { TransactionPage } from '../../features/transactions/ui/pages/TransactionPage';
export default TransactionPage;
|
<filename>Documentation/_space_to_depth_8cpp.js<gh_stars>0
var _space_to_depth_8cpp =
[
[ "SpaceToDepth", "_space_to_depth_8cpp.xhtml#a5e1dc69443b64ad16b669388a6023f7a", null ]
]; |
func findLargestNumber(num1: Int, num2: Int, num3: Int) -> Int {
var largestNumber = num1
if(num2 > largestNumber){
largestNumber = num2
}
if(num3 > largestNumber){
largestNumber = num3
}
return largestNumber
}
let num1 = 5
let num2 = 10
let num3 = 8
let result = findLargestNumber(num1:... |
<gh_stars>0
package com.example.android.miwok;
import android.app.Activity;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android... |
import * as path from "https://deno.land/std@0.87.0/path/mod.ts";
export function pathResolver(meta: ImportMeta): (p: string) => string {
return (p) => path.fromFileUrl(new URL(p, meta.url));
}
|
for dir in `ls src`
do
if [ -d src/$dir ]
then
echo src/$dir
cd src/$dir
chmod +x build.sh
./build.sh
cd ../../
fi
done
|
class ElectricPower:
def __init__(self, voltage):
self.voltage = voltage
class PowerWire:
pass # Placeholder for PowerWire class implementation
class SystemTask:
def __init__(self, name, value):
self.name = name
self.value = value
class Function:
TASKED = 'TASKED'
POWERED... |
/*
* Copyright (C) 2012 Sony Mobile Communications AB
*
* This file is part of ApkAnalyser.
*
* 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/LIC... |
import psutil
import time
def monitor_cpu_utilization(threshold, monitoring_duration):
utilization_values = []
start_time = time.time()
while True:
cpu_utilization = psutil.cpu_percent(interval=1)
utilization_values.append(cpu_utilization)
if cpu_utilization > threshold:
... |
<filename>projects/ngx-grid-core/src/lib/ui/cell/cell-types/value-multi-editing/text-append.ts<gh_stars>1-10
import { TCellTypeName } from '../../../../typings/types/cell-type-name.type'
import { StringParser } from '../value-parsing/parsers/string.parser'
import { BaseMultiEdit } from './base-multi-edit.abstract'
exp... |
#ifndef __PERFTIMER_H__
#define __PERFTIMER_H__
class PerfTimer
{
public:
// Constructor
PerfTimer();
void Start();
double ReadMs() const;
int ReadTicks() const;
private:
int started_at;
static int frequency;
};
#endif //__PERFTIMER_H__ |
#!/usr/bin/env bash
catkin_ws=${1:-"$HOME/catkin_ws"}
ros_version=${2:-"$(rosversion -d)"}
script_dir="$(dirname "$(readlink -e "${BASH_SOURCE[0]}")" && echo X)" && script_dir="${script_dir%$'\nX'}"
source "/opt/ros/${ros_version}/setup.bash"
source "${catkin_ws}/devel/setup.bash"
"${script_dir}/a_dependencies.sh... |
<gh_stars>1-10
/*
* Copyright (C) 2005-2015 <NAME> (<EMAIL>).
*
* 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... |
#include <iostream>
#include <string>
int main() {
std::string user_input;
while (true) {
std::cout << "User: ";
std::getline(std::cin, user_input);
if (user_input == "hello") {
std::cout << "Chatbot: Hello there!" << std::endl;
} else if (user_input == "how are yo... |
#!/usr/bin/env bash
cat <<'EOF' | docker build --force-rm -t githooks:windows-lfs -f - .
FROM mcr.microsoft.com/windows/servercore:2004
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
RUN iex ((New... |
from typing import List
def check_winner(board: List[List[str]], label: str) -> str:
# Check rows, columns, and diagonals for a winner
for i in range(3):
# Check rows and columns
if board[i][0] == board[i][1] == board[i][2] != 'nan' or \
board[0][i] == board[1][i] == board[2][i] != '... |
import { NextFunction, Request, Response } from 'express';
import { SUCCESS } from '../../consts';
export const booking = async (req: Request, res: Response, next: NextFunction) => {
res.customSuccess(SUCCESS, null, {
evidenceId: 'bookingEvidenceId',
});
};
|
// Copyright (c) 2015, the Dart GL extension authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD-style license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// This file is auto-generated by sc... |
<reponame>sander-adhese/prebid-server-java<filename>src/main/java/org/prebid/server/settings/CachingApplicationSettings.java
package org.prebid.server.settings;
import io.vertx.core.Future;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import org.apache.commons.lang3.StringUtils;
imp... |
<reponame>brunofurquimc/back<filename>models/payment_method.js
const { Schema } = require('mongoose');
var { mongoose } = require('../database/db');
/**
* Modelo de método de pagamento
*/
const PaymentMethod = mongoose.model('PaymentMethod', Schema({
_id: Schema.Types.ObjectId,
name: String,
}, { collection: 'pa... |
AUTHOR='@xer0dayz'
VULN_NAME='Directory Listing Enabled'
URI='/'
METHOD='GET'
MATCH="<title>Index\ of|To\ Parent\ Directory"
SEVERITY='P4 - LOW'
CURL_OPTS="--user-agent '' -s -L --insecure"
SECONDARY_COMMANDS=''
GREP_OPTIONS='-i' |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(os.path.realpath(__file__))), '..')))
from h4l_minitree_reader.sample import Sample
from h4l_minitree_reader.sample import Category
from h4l_minitree_reader import helper... |
package com.ride.myride.firebase;
public class UserReview {
private String userName;
private Boolean verification;
private String reviewText;
private float userReviewInFloat;
private RideTime time;
public UserReview(){}
public UserReview(String userName, Boolean verification, String revie... |
#!/bin/bash
# Check for dependencies
read -d '' DEPS <<EOT
bc
gperf
bison
flex
texi2html
texinfo
help2man
gawk
libtool
libtool-bin
build-essential
automake
libncurses5-dev
libglib2.0-dev
device-tree-compiler
qemu-user-static
binfmt-support
multistrap
git
lib32z1
lib32ncurses5
libbz2-1.0
lib32stdc++6
libssl-dev
kpartx... |
<reponame>PanRagon/HS-Pack-Simulator<filename>src/server/routes/collection-api.js
const express = require("express");
const Collection = require("../db/collection");
const Users = require("../db/users");
const Cards = require("../db/cards/cards");
const router = express.Router();
router.get("/collection/:id", funct... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
<filename>src/global_setting.h
#ifndef _GLOBAL_SETTING_H_
#define _GLOBAL_SETTING_H_
#include <M5EPD.h>
#include <nvs.h>
#define WALLPAPER_NUM 3
enum {
LANGUAGE_EN = 0, // default, English
LANGUAGE_JA, // Japanese
LANGUAGE_ZH // Simplified Chinese
};
void SetLanguage(uint8_t language);
uint8_t GetL... |
#!/bin/bash
git submodule update --init --recursive
exec ./kbash/shell.sh
|
#!/usr/bin/env sh
# generated from catkin/cmake/template/setup.sh.in
# Sets various environment variables and sources additional environment hooks.
# It tries it's best to undo changes from a previously sourced setup file before.
# Supported command line options:
# --extend: skips the undoing of changes from a previou... |
import numpy as np
def is_prime(nums):
is_prime = np.ones(len(nums), dtype=bool)
for i, num in enumerate(nums):
if num > 1:
# Check if any number in the range 2 to num-1 can divide num
for j in range(2, num):
if (num % j) == 0:
is_prime[i] = False
return is_prime
is_prime([2, 4... |
from typing import List
def getActions(getCamera: bool, getPhotos: bool, getVideos: bool, getFiles: bool) -> List[str]:
actions = []
if getCamera:
actions.append("actionCamera")
if getPhotos:
actions.append("actionPhotoLibrary")
if getVideos:
actions.append("actionVideo")
if... |
#!/bin/bash
# Copyright 2015 The Kubernetes 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 ... |
<reponame>topolr/ada-pack<filename>bin/lib/process.js
let helper = require("../../src/util/helper");
let DevServer = require("./../lib/server");
let appInfo = helper.getAppInfo(process.cwd(), false);
return new DevServer(appInfo).start().then(() => {
process.send({type: "done"});
}); |
#!/bin/bash
# Start Soda Fountain main server
set -e
REALPATH=$(python -c "import os; print(os.path.realpath('$0'))")
BINDIR=$(dirname "$REALPATH")
CONFIG="$BINDIR/../configs/application.conf"
JARFILE=$("$BINDIR"/build.sh "$@")
"$BINDIR"/run_migrations.sh
java -Djava.net.preferIPv4Stack=true -Dconfig.file="$CONFIG"... |
<gh_stars>0
require 'rails_helper'
require 'dirty_change_wrapper'
RSpec.describe DirtyChangeWrapper do
let(:base) { OpenStruct.new(foo: 'bar') }
let(:changes) { { baz: %w[bar bat] } }
subject { DirtyChangeWrapper.new(base, changes) }
context 'for changes' do
it 'should provide a _was method to access the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.