text
stringlengths
1
1.05M
#!/bin/bash set -e # DO NOT REMOVE -- used to fail test if intermediate command fails DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" . "$DIR"/../common/util/bc-messages.sh suite_started SOTA "$DIR"/vagrant-up.sh cleanup() { suite_finished SOTA } trap cleanup 0 # Need a Yocto vagrant im...
<gh_stars>1-10 // Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the maximum average value. // // // Example 1: // // Input: [1,12,-5,-6,50,3], k = 4 // Output: 12.75 // Explanation: Maximum average is (12-5-6+50)/4 ...
<gh_stars>1-10 // 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. #ifndef UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ #define UI_AURA_REMOTE_ROOT_WINDOW_HOST_WIN_H_ #include <vector> #include "base/compil...
<gh_stars>0 import math def theater_point_calculation(current_score, object_score, items): current_score = int(current_score) object_score = int(object_score) items = int(items) needed_point = object_score - (current_score + (math.fabs(items / 180) * 537)) #MM_ticket_maximum_play = math.fabs...
var ss = require('../') , should = require('should') , assert = require('assert'); var push = ss.socket('push') , pull = ss.socket('pull'); // basic 1-1 push/pull var msgs = [] , n = 0; push.bind(4000); pull.connect(4000); var id = setInterval(function(){ push.send(String(n++)); }, 2); pull.on('message...
# Get list of all background services Get-Service | Select-Object -Property Name, Status | Format-Table
<filename>design-editor/src/vsc/vsc-editor.js 'use babel'; /** * This is a copy of similar file brackets-editor.js * TODO: Rewrite this file to enable works Design Editor in VSCode. */ import brackets from 'brackets'; import fs from 'fs'; import $ from 'jquery'; import {packageManager} from 'content-manager'; import...
def update_gitlab_system_user_photo_to_v1(apps, schema_editor): User = apps.get_model('your_app_name', 'User') # Replace 'your_app_name' with the actual app name try: db_alias = schema_editor.connection.alias user = User.objects.using(db_alias).get(username__startswith="gitlab-", ...
source "bs/bundle.sh" sudo cp dist/axon /usr/bin/axon sudo cp dist/axon-export /usr/bin/axon-export sudo cp dist/axon-import /usr/bin/axon-import echo '🧠 axon installed.' ls /usr/bin/axon*
<reponame>ssayanm/gatsby-strapi-stripe-frontend import React from "react"; import Layout from "../components/Layout"; import TitleBar from "../components/TitleBar"; import Seo from "../components/Seo"; import MiniContact from "../components/MiniContact"; import { Fade } from "react-reveal"; import { graphql } from "gat...
<reponame>Trice254/alx-higher_level_programming<gh_stars>0 #!/usr/bin/python3 """ Module Devide Matrix """ def matrix_divided(matrix, div): """ Devides all elements in matrix Args: matrix (list[list[int/float]]) : matrice div (int/float) Devider Raise: ...
<reponame>LinuxSuRen/satellity import '../node_modules/noty/src/noty.scss'; import '../node_modules/noty/src/themes/nest.scss'; import '../node_modules/normalize.css/normalize.css'; import '../node_modules/@fortawesome/fontawesome-free/css/all.css'; import './assets/css/h5bp.css'; import './index.scss'; import React fr...
//////////////////////////////////////////////////////////// launchNet(); swapChain(EXCHAINS.classic.ncid); stopSession(sestime); statsEthers(refresh); showDefault(); ////////////////////////////////////////////////////////////
<gh_stars>0 import { DeployVerifierInstance, RelayVerifierInstance, TestTokenInstance, SmartWalletFactoryInstance, SmartWalletInstance, TestVerifiersInstance } from '../types/truffle-contracts' import { expectRevert, expectEvent } from '@openzeppelin/test-helpers' import { ethers } from 'ethers' import { t...
#!/bin/bash set -e LANG=en_US.utf8 default_compatibility_version=v1.0.0-rc4 # update this every release compatibility_version= LOG_INFO() { local content=${1} echo -e "\033[32m[INFO] ${content}\033[0m" } LOG_ERROR() { local content=${1} echo -e "\033[31m[ERROR] ${content}\033[0m" } help() { ec...
package org.multibit.hd.ui.views.wizards.send_bitcoin; import com.google.common.base.Optional; import org.multibit.hd.ui.views.wizards.AbstractHardwareWalletWizard; import org.multibit.hd.ui.views.wizards.AbstractWizardPanelView; import java.util.Map; /** * <p>Wizard to provide the following to UI for "Send Bitcoi...
<reponame>fermi-lat/CalibData // $Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/CalibData/CalibData/Tkr/TkrBase.h,v 1.6 2007/06/11 20:31:56 jrb Exp $ /// @file TkrBase.h /// @author <NAME> #ifndef CalibData_TkrBase_h #define CalibData_TkrBase_h #include <vector> #include "CalibData/CalibBase.h" // #include ...
'use strict'; const Pipeline = require('coinstac-pipeline'); const path = require('path'); const { fork } = require('child_process'); const exitHook = require('exit-hook'); /** * Starts a simulator run with the given pipeline spec * * @param {Object} spec a valid pipeline spec * @param {St...
<reponame>sigtot/sanntid<gh_stars>0 package indicators import ( "encoding/json" "fmt" "github.com/sigtot/elevio" "github.com/sigtot/sanntid/pubsub" "github.com/sigtot/sanntid/types" "log" "sync" "testing" "time" ) // This test cannot fail. Just watch the lights :) func TestStartHandlingIndicators(t *testing....
#!/bin/bash echo "Applying migration DirectorNino" echo "Adding routes to conf/register.company.routes" echo "" >> ../conf/app.routes echo "GET /directorNino controllers.register.company.DirectorNinoController.onPageLoad(mode: Mode = NormalMode)" >> ../conf/register.company.routes echo "POST ...
<reponame>queued/SLR4V<filename>src/com/github/queued/slr4v/utils/DatasetParser.java<gh_stars>0 package com.github.queued.slr4v.utils; import com.github.queued.slr4v.model.entity.Day; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List;...
<filename>applications/physbam/physbam-lib/Public_Library/PhysBAM_Solids/PhysBAM_Solids/Collisions/BW_COLLISIONS.cpp<gh_stars>10-100 //##################################################################### // Copyright 2010. // This file is part of PhysBAM whose distribution is governed by the license contained in the a...
<filename>open-sphere-base/mantle/src/test/java/io/opensphere/mantle/data/impl/specialkey/SpeedKeyTest.java<gh_stars>10-100 package io.opensphere.mantle.data.impl.specialkey; import org.junit.Assert; import org.junit.Test; import io.opensphere.mantle.data.MetaDataInfo; import io.opensphere.mantle.data.impl.Defa...
#! /bin/bash if [ ! -f PUBLISH ]; then echo Skipping publishing, PUBLISH file is missing exit fi IFS="$(printf '\n\t')" DATE=$(node -e 'console.log((new Date()).toISOString())') # Latest power mkdir -p dist/miner-power-daily-average-latest if [ -f ../work/output/miner_power/by_miner_region/sum_avg_daily/json/_SUC...
<reponame>w2ogroup/titan package com.thinkaurelius.titan.graphdb.query; import com.google.common.base.Preconditions; import com.thinkaurelius.titan.core.*; import com.thinkaurelius.titan.graphdb.query.keycondition.*; import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Element; import com.tinkerpop.bl...
python train/train.py \ test-stl-nw-profit-tiny+ \ --experiment-name=test-stl-nw-profit-tiny+ \ --num-env-steps=200000000 \ --algo=ppo \ --use-gae \ --lr=2.5e-4 \ --clip-param=0.1 \ --value-loss-coef=0.5 \ --num-processes=100 \ --eval-num-processes=50 \ --num-steps=500 \ ...
<gh_stars>0 import LED_display as LD import threading import time import copy import os import alphabet import number from score_func import * delay = 0.1 t=threading.Thread(target=LD.main, args=()) t.setDaemon(True) t.start() #drawChar(alphabet.alpha_a, oScreen, 5, 7, (1, 1), 1) iScreen =[[0, 0, 0, 0, 0, 0, 0, 0...
#include "Common.h" namespace Lunia { namespace XRated { namespace Lobby { UserRegistryClass<User>& UserRegistry(const uint32& timeout) { return UserRegistryClass<User>::GetInstance(timeout); } } } }
import React from "react" import { Container, Row, Col } from 'react-bootstrap' // import Isometrics from "../components/isometrics" import Layout from "../components/layout" import SEO from "../components/seo" const Lab = ({ location }) => { return ( <Layout animateKey={location.key}> <SEO tit...
<gh_stars>1-10 package com.nbouma.jsonldjava.impl; import com.nbouma.jsonldjava.core.JsonLdTripleCallback; import com.nbouma.jsonldjava.core.RDFDataset; import com.nbouma.jsonldjava.core.RDFDatasetUtils; public class NQuadTripleCallback implements JsonLdTripleCallback { @Override public Object call(RDFDataset...
def handle_turn_event(traitor, did_something, var): debuglog(traitor, "(traitor) TURNING") if did_something and var.PHASE in var.GAME_PHASES: var.TRAITOR_TURNED = True channels.Main.send(messages["traitor_turn_channel"]) evt.prevent_default = True evt.stop_processing = True
#!/bin/bash # short url manager: https://github.com/nhoizey/1y site="site" if [ -n "$1" ] then title=$1 else read -p "Title: " title fi if [ -n "$2" ] then note=$2 else read -p "Note: " note fi if [ -n "$3" ] then shorty=$3 else read -p "Enter the shorty: " shorty fi notes_dir="notes" url...
import { Engine, EngineMode, SystemMode, System } from '@trixt0r/ecs'; import { RunOptions } from './runOptions'; import { YaveEngine } from '@/engine'; import { YaveSystem } from './system'; export class YaveECS extends Engine { /** * Reference to the actual yave engine that uses this ECS engine. */ public ...
<reponame>hoelzl/CleanCodeCppCatch<gh_stars>0 #pragma once #include <cstdint> #include <iostream> #include <string> #include <vector> template <typename T> void print_address(const std::string& prefix, T obj) { std::cout << prefix << " Ox" << std::hex << reinterpret_cast<std::uintptr_t>(obj) << std:...
function prompt() { echo "Syntax: bash refine.sh <GPU_ID> <SIZE> <ADDON [concrete/commit]>" exit; } if [[ $# -lt 2 ]]; then prompt; fi GPU=$1; SIZE=${2}; ADDON=${3:-""} TASK="refine" if [[ ${ADDON} != "" ]]; then TASK="${TASK}-${ADDON}"; fi CODE_HOME_DIR=`realpath ../..`; DATA_DIR="${CODE_HOME_DIR}/d...
kind create cluster kubectl apply -f ./faas-netes/namespaces.yml kubectl -n openfaas create secret generic basic-auth \ --from-literal=basic-auth-user=admin \ --from-literal=basic-auth-password=admin kubectl apply -f ./faas-netes/yaml kubectl get pods -n openfaas kubectl get service -n openfaas
<filename>website/src/templates/blogPostTemplate.tsx import { graphql } from 'gatsby' import { Link } from 'gatsby' import * as React from 'react' import { Helmet } from 'react-helmet' import Layout from '../components/Layout' import SocialLinks from '../components/SocialLinks' import { eventLogger } from '../EventLogg...
<gh_stars>0 import {ReportCardRescheduledAtom} from './report-card-rescheduled.model' import {maxBy} from '../utils/functions' export const latestReportCardReschedule = (reschedules?: ReportCardRescheduledAtom[]): ReportCardRescheduledAtom | undefined => reschedules && maxBy(reschedules, (a, b) => a.lastModified.g...
module BrNfe module Product module Nfe module ItemTax class Ipi < BrNfe::ActiveModelBase # CÓDIGO DA SITUAÇÃO TRIBUTÁRIA do IPI # 00 = Entrada com recuperação de crédito # 01 = Entrada tributada com alíquota zero # 02 = Entrada isenta # 03 = Entrada não-tributada # 04 =...
package admin import ( adminHandlers "github.com/backpulse/core/handlers/admin" "github.com/gorilla/mux" ) func handleGalleries(r *mux.Router) { r.Handle("/gallery/{id}", ProtectedRoute(adminHandlers.GetGallery)).Methods("GET") r.Handle("/gallery/{id}", ProtectedRoute(adminHandlers.DeleteGallery)).Methods("DELETE...
package cyclops.monads.jdk; import static cyclops.monads.AnyM.fromStream; import static java.util.Arrays.asList; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItems; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.junit.As...
import React from 'react'; import {makeStyles} from '@material-ui/core/styles'; import {getDukeImgPath} from "../../functions/paths"; const useStyles = makeStyles({ root: { height: "100%", backgroundColor: "var(--primary-color)", position: "relative", width: 50 }, }); type Side...
#!/bin/bash set -ex EXIT_STATUS=0 # Autoformatter *first*, to avoid double-reporting errors black --check setup.py asynctb \ || EXIT_STATUS=$? # Run flake8 without pycodestyle and import-related errors flake8 asynctb/ \ --ignore=D,E,W,F401,F403,F405,F821,F822\ || EXIT_STATUS=$? # Uncomment to run mypy ...
import numpy as np # Given parameters m = 1.0 # mass k = 1.0 # spring constant c = 0.1 # damping coefficient dt = 0.01 # time step t_max = 10.0 # maximum time for simulation # External force function def f(t): return np.sin(t) # Example external force function # Initial conditions x = 1.0 # initial displa...
package Bigdata.Twitter case class SocketConfig(host: String, port: Int)
<filename>src/app/thought/thought-process/thought-process.component.spec.ts import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ThoughtProcessComponent } from './thought-process.component'; describe('ThoughtProcessComponent', () => { let component: ThoughtProcessComponent; let fixtu...
#!/bin/bash module load picard module load bwa module load samtools module load parallel PICARD_HOME="/work/LAS/mhufford-lab/arnstrm/newNAM/analyses/l-gatk-illumina" REF="/work/LAS/mhufford-lab/arnstrm/newNAM/analyses/l-gatk-illumina/b-genome/B73.PLATINUM.pseudomolecules-v1.fasta" ulimit -c unlimited PLT="illumina" TD...
<gh_stars>0 import Ux from 'ux'; const fnLogout = (reference, key = "") => { Ux.aiConfirm(reference, () => { // 清掉Session Ux.toLogout(); // 路由处理 Ux.toRoute(reference, Ux.Env.ENTRY_LOGIN); // 清楚State上的数据 Ux.eraseTree(reference, ["user"]); }, "window", key); }; co...
const db = require('../db') const Sequelize = require('sequelize') const Order = db.define( 'order', { status: { type: Sequelize.ENUM('pending', 'purchased', 'cancelled', 'fulfilled'), defaultValue: 'pending' }, sessionId: Sequelize.STRING, purchasedAt: Sequelize.DATE, cancelledAt: ...
#!/bin/sh # Check usage, and get the platform. if [ $# -ne 1 ]; then echo 'Usage: ./build_qts_functionality_bitstream.sh fpga_platform.' exit 1; fi fpga_platform=$1 # Make sure the environment is set up. source $XILINX_VIVADO_DIR/settings64.sh # Make a fresh workspace directory. rm -frv workspace mkdir -p wo...
class BankAccount: transaction_counter = 0 def __init__(self, initial_balance): self.balance = initial_balance self.transaction_history = [] def deposit(self, amount): self.balance += amount BankAccount.transaction_counter += 1 transaction_id = f"D{str(BankAccount.t...
<filename>src/index.ts export { Pool, DEFAULT_DECONSTRUCTOR, IPoolConstructor, IPoolDeconstructor, } from "./Pool";
#!/bin/bash sudo apt-get install -y cachefilesd sudo sed -i -e 's/#RUN=yes/RUN=yes/g' /etc/default/cachefilesd : ${FSCACHE_DIR:=/var/cache/fscache} cat <<EOF | sudo tee /etc/cachefilesd.conf > /dev/null dir $FSCACHE_DIR tag dgx1cache brun 25% bcull 15% bstop 5% frun 10% fcull 7% fstop 3% EOF sudo modprobe cachefiles su...
/* * */ package net.community.chest.math.test; import net.community.chest.AbstractTestSupport; import net.community.chest.math.DivisionSigns; import org.junit.Test; /** * <P>Copyright as per GPLv2</P> * @author <NAME>. * @since Jun 12, 2011 8:20:57 AM */ public class DivisionSignsTest extends AbstractTestSuppo...
import { Module } from '@nestjs/common'; import { MailerModule } from '@nestjs-modules/mailer'; import { SentMailConfigService } from './sent-mail-config.service'; @Module({ imports:[MailerModule.forRootAsync({useClass:SentMailConfigService})] }) export class SentmailModule {}
platform='unknown' unamestr=`uname` if [[ "$unamestr" == 'Linux' ]]; then platform='linux' elif [[ "$unamestr" == 'Darwin' ]]; then platform='darwin' fi # 1-100: g3.4 # 101-200: p2 # AMI="ami-660ae31e" AMI="ami-a7fa31df" #extract INSTANCE_TYPE="g3.4xlarge" # INSTANCE_TYPE="g3.4xlarge" #INSTANCE_TYPE="c3.2xlarge...
#!/bin/sh set -euo pipefail # Assumption: Being in toplevel "syndesis" workingdir # Usage: # patch_pr.sh <module dir> <patch nr> # # This will create a branch "pr/<patch nr>" which contains the merged PR # Repos map: key == dir name, value == GitHub repo name REPOS=( "rest:syndesis-rest" "ui:syndesis-ui" "pro...
class A { static name = 1; static length = 2; static foo = 3; static [bar] = 4; static ["name"] = 5; static [name] = 6; static "name" = 7; name = 8; length = 9; }
#!/bin/bash set -e echo "checking style ..." docker run -i --rm registry.sonata-nfv.eu:5000/tng-sdk-benchmark flake8 --exclude .eggs --exclude venv --exclude build . echo "done." # always exit with 0 (ugly code style is not an error :)) #exit 0
<gh_stars>0 #include "defines.h" #include <stm32f4xx_hal.h> HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *) { return HAL_ERROR; } uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *, uint32_t[], uint32_t) { return 0; }
package org.jenkinsci.plugins.hue_light; import hudson.Extension; import hudson.Launcher; import hudson.model.BallColor; import hudson.model.BuildListener; import hudson.model.AbstractBuild; import hudson.model.AbstractProject; import hudson.tasks.BuildStepDescriptor; import hudson.tasks.BuildStepMonitor; import hudso...
#!/bin/bash SCHEMAS=$1 tmpd=`mktemp -d` pushd ${tmpd} >>/dev/null echo "include /etc/openldap/schema/core.schema" >> convert.dat echo "include /etc/openldap/schema/cosine.schema" >> convert.dat echo "include /etc/openldap/schema/nis.schema" >> convert.dat echo "include /etc/openldap/schema/inetorgperson.schema" >> c...
'use strict'; (function(){ function get(line) { var pixState = document[line].src.charAt( (document[line].src.length) - 6); return pixState != "0"; } function getC(line) { var pixState = document[line].src.charAt( (document[line].src.length) - 7); return pixState != "0"; } function set(line) { if(!get(li...
<gh_stars>0 import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { Button, Card, CardBody, CardGroup, Col, Container, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from 'reactstrap'; import qs from 'qs'; import axioApi from './../../../config/axioConfig'; let $this; cla...
const express = require('express'); const app = express(); const bodyParser = require('body-parser'); const Read = require('@google-cloud/text-to-speech'); const client = new Read.TextToSpeechClient(); // Configure express app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json({ limit: '1mb' })); ...
package com.balceda.archj.controller; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedProperty; import javax.faces.bean.SessionScoped; import javax.faces.event.ActionEvent; import javax.faces.event.ValueChangeEvent; import com.balceda....
#!/bin/bash # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
elm-make src/examples/editor/AbcEditor.elm --output=distjs/elmAbcEditor.js
#!/bin/bash echo Running on $HOSTNAME num_obj=$1 name=$2 encoder=$3 cmap=$4 seed=$5 loss=$6 mode=$7 emb=$8 dir="models_"$emb data="data/FixedObserved/wshapes_fixedunobserved" save=$dir"/Observed/"$name"_"$seed"/" name=$name"_"$loss"_"$encoder"_"$num_obj"_"$cmap echo $name extras="" if [[ $name == *"LSTM"* ]]; th...
/* * */ package net.community.chest.ui.helpers.frame; import net.community.chest.dom.DOMUtils; import net.community.chest.swing.component.frame.BaseFrameReflectiveProxy; import org.w3c.dom.Element; /** * <P>Copyright 2008 as per GPLv2</P> * * @param <F> The reflected {@link HelperFrame} * @author <NAME>. * @s...
import { User } from 'src/auth/entities/user.entity'; import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryColumn, } from 'typeorm'; @Entity() export class Note { @PrimaryColumn() id: string; @Column() title: string; @Column() body: string; @Column() createdAt: Date; @ManyToOne(...
<filename>node_modules/react-icons-kit/metrize/magnet.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.magnet = void 0; var magnet = { "viewBox": "0 0 512 512", "children": [{ "name": "path", "attribs": { "d": "M256,0C114.609,0,0,114.609,0,256c0,141.391,114.60...
<filename>typings/aurelia/aurelia-dialog.d.ts declare module 'aurelia-dialog' { import { customElement, bindable, customAttribute, ViewSlot, CompositionEngine } from 'aurelia-templating'; import { Origin } from 'aurelia-metadata'; import { Container } from 'aurelia-dependency-inj...
import React, { Suspense } from 'react' import { Canvas as Fiber } from 'react-three-fiber' import { Html } from '@react-three/drei' import { Controls } from './Controls' function loaders() { const captions = [ 'Loading...', 'harnessing the bits', 'do you have faith?', 'experiencing real time', 'building u...
from dataclasses import fields, is_dataclass def pretty_dataclass_instance(value, ctx): if is_dataclass(type(value)): field_values = {field.name: getattr(value, field.name) for field in fields(value)} return field_values else: return {}
import { IImport, Named } from ".."; export class Import extends Named implements IImport { private _default?: string; private _imports: [string, string | undefined][] = []; get Imports() { return this._imports as ReadonlyArray<[string, string | undefined]>; } get Default() { return this._default; ...
module.exports = ( promises, params, transaction ) => params.select.split( "," ).forEach( ( _field ) => { const fieldSplited = _field.split( "." ); let table = fieldSplited[ 0 ]; let field = fieldSplited[ 1 ]; const theFieldIsTheSameOfFrom = !field; if ( theFieldIsTheSameOfFrom ){ field = t...
def get_houses(file_path): houses = [] with open(file_path, 'r') as file: for line in file: data = line.strip().split(',') if len(data) == 4: # Assuming the file format is: house_name, address, price, area house = { 'name': data[0], ...
import { Manifest } from '../../generator/manifest'; export default (manifest: Manifest) => { manifest.addComponent({ name: 'Component1', displayName: 'Component1', placeholders: [ { name: 'page-header' }, { name: 'page-content' }, ], }); };
<reponame>skimah/skimah import { Attribute, Criteria, CriteriaFilter, Datasource, Model, MutationModel, MutationResponse, QueryModel } from "@skimah/api"; import sift from "./sift"; export interface Config { /** * The path of the csv file that should be loaded */ filepath?: string; /** ...
SELECT s.address, g.alias, s.last_seen_turn, sp.nation_id, sp.custom_nation_name, l.owner_id, l.era, l.player_count, l.description FROM players p JOIN server_players sp on sp.player_id = p.id JOIN game_servers g on g.id = sp.server_id LEFT JOIN lobbies l on l.id = g.lobby_id LEFT JOI...
set -ex LOCAL_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ROOT_DIR=$(cd "$LOCAL_DIR"/../.. && pwd) TEST_DIR="$ROOT_DIR/test" gtest_reports_dir="${TEST_DIR}/test-reports/cpp" pytest_reports_dir="${TEST_DIR}/test-reports/python" # Figure out which Python to use PYTHON="$(which python)" if [[ "${BUILD_ENVIRONMENT}...
package no.mnemonic.commons.logging.log4j; import org.junit.Test; import static org.junit.Assert.*; public class Log4jLoggingContextTest { private Log4jLoggingContext context = new Log4jLoggingContext(); @Test public void getByNull() throws Exception { assertNull(context.get(null)); } @Test public...
/****************************************************************************** Copyright (c) 2015, Intel Corporation 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 abov...
import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { CalculosDirective } from '../../directives/calculos/calculos'; //import { DirectivesModule } from '../../directives/directives.module'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class Ho...
#!/usr/bin/env bash set -eu : ${NOOP:=} HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )" source $HERE/../../common.sh docker_task="docker" push_msg= while [[ $# -gt 0 ]] do case $1 in --push|--push-docker-images) docker_task="dockerBuildAndPush" push_msg="Pushed the docker images." ...
<html> <head> <title>Countdown Timer</title> <style> #timer-container { width: 300px; height: 150px; text-align: center; margin: 20px auto; } #timer { font-size: 4rem; font-weight: bold; color: #f00; } </style> </head> <body> <div id="timer-container"> <div id="timer"></div> </div> <script> //...
/* * Filter.hpp * * * Copyright (C) 2019 <NAME> <<EMAIL>> * */ #ifndef FILTER_HPP #define FILTER_HPP #include "HeadTail.hpp" #include "Select.hpp" #include "IsEmpty.hpp" template <template <class> class Pred, class cont, bool empty = IsEmpty<cont>::result> struct Filter { typedef typename Filt...
import datetime import sys # noinspection PyPackageRequirements import bson import pymongo import colors slow_ms = 5 def remove_indexes(db): print(colors.bold_color + "Removing indexes ... ", end='') sys.stdout.flush() db.Publisher.drop_indexes() db.User.drop_indexes() db.Book.drop_indexes() ...
#!/bin/bash WORDS="${@:2}" if [[ "$1" = "-d" ]]; then echo -e "Deleting the following words from wordlist.txt:\n${WORDS}" for i in $WORDS; do sed -i -r "/^${i}$/d" wordlist.txt done elif [[ "$1" = "-a" ]]; then echo -e "Adding the following words to wordlist.txt:\n${WORDS}" for i in $WORDS; do echo ...
class OverlayController { private _overlayView: OverlayView; constructor(sections: SectionData[], config: WheelOfFortuneConfig) { this._overlayView = new OverlayView(sections, config); } }
<reponame>MccreeFei/jframe<filename>jframe/jframe-core/src/main/java/jframe/core/plugin/annotation/MsgRecv.java /** * */ package jframe.core.plugin.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Tar...
from typing import List, Tuple import psycopg2 def retrieve_tag_data(tag_name: str) -> List[Tuple[str, str]]: tag_data_list = [] with AppState.Database.CONN.cursor() as cur: if tag_name is not None and tag_name != 'global': query = "SELECT tag_name, tag_data FROM tags WHERE tag_name = %s" ...
#!/bin/bash ################################################################################## #Copyright (c) 2016, Intel Corporation #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # #1. Redistribu...
<filename>LZUISDK/SDK/LSDeviceManagerFramework.framework/Headers/WeatherData.h // // WeatherData.h // LSWearable // // Created by 郭景煊 on 17/1/11. // Copyright © 2017年 lifesense. All rights reserved. // #import <Foundation/Foundation.h> @interface WeatherData : NSObject @end
import Trie from "../utils/trie"; /** * Utility class to manage the Waste Wizard Data */ class WasteWizardDataManager { /** * Store the keywords into a Trie for searching */ static storeKeywordsInTrie() { Object.keys(this.keywordDictionary).forEach(keyword => { this.keywords.insert(keyword); ...
<reponame>groupon/nakala /* Copyright (c) 2013, Groupon, Inc. 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, this list of conditio...
<filename>applications/physbam/physbam-lib/Public_Library/PhysBAM_Solids/PhysBAM_Rigids/Collisions/RIGID_TRIANGLE_COLLISIONS_EDGE_EDGE_VISITOR.cpp<gh_stars>10-100 //##################################################################### // Copyright 2011. // This file is part of PhysBAM whose distribution is governed by ...
#!/bin/bash rm -r local_mount rm build.sh rm Dockerfile rm runDocker.sh mkdir -p /home/codeql_home mv /home/playground/codeql-linux64.zip /home/codeql_home/ cd /home/codeql_home unzip codeql-linux64.zip # clone stable version git clone https://github.com/github/codeql.git --branch v1.26.0 codeql-repo echo "export...
package com.vlkan.hrrs.distiller.cli; import com.beust.jcommander.Parameter; import com.vlkan.hrrs.commons.jcommander.JCommanderConfig; import com.vlkan.hrrs.commons.jcommander.JCommanderConfigs; import com.vlkan.hrrs.commons.jcommander.validator.LoggerLevelSpecsValidator; import com.vlkan.hrrs.commons.jcommander.vali...