text stringlengths 1 1.05M |
|---|
package org.slos.battle.abilities.rule.target;
import org.slos.battle.GameContext;
import org.slos.battle.monster.MonsterBattleStats;
import java.util.List;
public interface TargetRule {
List<MonsterBattleStats> selectTargets(MonsterBattleStats monsterBattleStats, List<MonsterBattleStats> selectFrom, GameContext... |
#!/bin/bash
# Step performed after the cluster validation, to remove:
# 1. bad clusters (≥ 10% bad-aligned ORFs)
# 2. shadow clusters (≥ 30% shadow ORFs)
# 3. single rejected ORFs (shadow, spurious and bad-aligned)
# From the validation results we already have a table with the good clusters:
# good_cl.tsv (in the dir... |
<reponame>threathunterX/offline
package com.threathunter.bordercollie.slot.api;
import com.threathunter.bordercollie.slot.util.SlotVariableMetaRegister;
import com.threathunter.bordercollie.slot.util.StrategyInfoCache;
import com.threathunter.config.CommonDynamicConfig;
import com.threathunter.model.BaseEventMeta;
imp... |
package org.ywb.scgextend.common;
import com.google.common.base.Strings;
import lombok.Getter;
import java.io.Serializable;
import java.util.Objects;
import java.util.function.Supplier;
@Getter
public class ResultVO<T> implements Serializable {
/**
* 相应状态码{@link ResultCode}
*/
private String code;... |
public class RunThreads implements Runnable {
public static void main (String[] args) {
RunThreads runner = new RunThreads();
Thread alpha = new Thread(runner);
Thread beta = new Thread(runner);
alpha.setName("Alpha thread");
beta.setName("Beta thread");
alpha.start();
beta.start();
}
public void ... |
#!/bin/sh
python scripts/loaddb.py -s csvfiles -d postgresdb -p test/data/format2014.csv -u splqueryutils_test_postgres -w splqueryutils_test_postgres -b splqueryutils_test_postgres -v format_2014
|
import React from 'react'
import styled from 'styled-components'
const Container = styled.div`
position: relative;
padding: 32px 16px;
background: ${({ theme }) => theme.colors.primary};
`
const Title = styled.h1`
text-align: center;
position: relative;
font-size: 64px;
text-transform: uppercase;
colo... |
#!/usr/bin/env bash
###############################################################################
# Copyright 2017 The Apollo 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... |
from bs4 import BeautifulSoup
def extractFormData(html):
soup = BeautifulSoup(html, 'html.parser')
form = soup.find('form', id='data-form')
username_input = form.find('input', id='username')
password_input = form.find('input', id='password')
username = username_input['value'] if 'value' in use... |
/**
* Copyright 2014 Netflix, Inc.
*
* 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 ... |
var structarmnn_1_1_layer_type_of_impl_3_01_layer_type_1_1_transpose_01_4 =
[
[ "Type", "structarmnn_1_1_layer_type_of_impl_3_01_layer_type_1_1_transpose_01_4.xhtml#a00cf7c4d734f497092d8084da1c7d727", null ]
]; |
package com.mrh0.createaddition.blocks.base;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.Containers;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.context.BlockPlaceConte... |
#!/bin/sh
cpanm -f MogileFS::Server
cpanm MogileFS::Utils
cpanm DBD::mysql
mysql -u root -e 'create database if not exists mogilefs;'
mogdbsetup --yes --dbname=mogilefs --dbuser=root
mogstored -c ./mogilefs/mogstored.conf &
mogilefsd -c ./mogilefs/mogilefsd.conf &
mogadm --trackers=127.0.0.1:7001 host add localhost... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
# frozen_string_literal: true
module Demux
# Demux::Demuxer is the heart of pairing signals to apps.
# It's a base implementation of what needs to happen, but apps can
# provide their own custom demuxer that calls out to this one.
#
# For example a host application will likely want to process signals in a
... |
export class Quote {
public showDetails:boolean;
constructor (public name:string, public quote:string, public author:string, public upVote: number, public downVote: number, public postingDate:Date,){
this.showDetails;false;
}
} |
sunway_run_GFS_27km_ly.sh
|
'use babel';
'use strict';
describe('AMU Font Options', () => {
beforeEach(() => {
this.workspace = atom.views.getView(atom.workspace);
jasmine.attachToDOM(this.workspace);
waitsForPromise('Theme Activation', () => {
return atom.packages.activatePackage('learn-ide-material-ui')... |
<reponame>YourBrainEatsYou/adventofcode2021
import Challenge19 from './challenge-19';
import Challenge20 from './challenge-20';
export {
Challenge19,
Challenge20,
};
|
//
// LENTurnTablePreviewViewController.h
// TurnTable
//
// Created by 林南水 on 2019/7/18.
// Copyright © 2019 ledon. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface LENTurnTablePreviewViewController : UIViewController
@property (nonatomic, strong) LENTurnTableModel *model;
@p... |
#!/bin/bash
#!/bin/bash
echo "++++++++INIT++++++++++"
source /simulation/leader-follower/inputs/parameters/swarm.sh
source /opt/ros/kinetic/setup.bash
source ~/catkin_ws/devel/setup.bash
## Previous clean-up
rm -rf /root/src/Firmware/Tools/sitl_gazebo/models/f450-tmp-*
rm -f /root/src/Firmware/posix-configs/SITL/i... |
import { readFile } from 'fs';
import { log, warn, error } from '../log';
import { isNull, isArray } from '../util';
import { has } from '../util/objects';
let systems = {};
let commonSystem = null;
let premiumSystem = null;
let promises = [];
export class System {
constructor(system) {
this.code = system.code;... |
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string toUpperCase(string str) {
transform(str.begin(), str.end(), str.begin(), ::toupper);
return str;
}
int main() {
string inputString = "Hello, World!";
string outputString = toUpperCase(inputString);
cout... |
require 'spec_helper'
describe Travis::Settings::Model do
attr_reader :model_class
before do
@model_class = Class.new(described_class) do
attribute :name
attribute :loves_travis, :Boolean
attribute :height, Integer
attribute :awesome, :Boolean, default: true
attribute :secret, T... |
<filename>include/triumf/nmr/nuclei.hpp<gh_stars>0
#ifndef TRIUMF_NMR_NUCLEI_HPP
#define TRIUMF_NMR_NUCLEI_HPP
#include <boost/math/constants/constants.hpp>
#include <triumf/nmr/utilities.hpp>
// TRIUMF: Canada's particle accelerator centre
namespace triumf {
// nuclear magnetic resonance (NMR)
namespace nmr {
// ... |
from typing import List
def final_value_of_num(assignments: List[str]) -> int:
num = 0 # Initial value of num
for assignment in assignments:
exec(assignment) # Execute the assignment
return num |
#ifndef INCLUDED_MODEL_MND
#define INCLUDED_MODEL_MND
// mixed normal distribution used in MCMC simulation
// number of normal distributions
#define NUM_NORM_DISTRIBS 4
// min, max of mu
// only used in init_rand
#define MU_MIN -5
#define MU_MAX 5
// max difference of mu and mu_next
#define DMU_MAX 5
#include "../ran... |
from typing import Tuple
def finalPosition(commands: str) -> Tuple[int, int]:
x, y = 0, 0 # Initial position
for command in commands:
if command == 'U':
y += 1
elif command == 'D':
y -= 1
elif command == 'L':
x -= 1
elif command == 'R':
... |
<gh_stars>1-10
// Code generated by entc, DO NOT EDIT.
package network
const (
// Label holds the string label denoting the network type in the database.
Label = "network"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldIP holds the string denoting the ip field in the da... |
package mezz.jei.render;
import java.awt.Color;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.cli... |
/*
* Client to access to energy counters without superuser privileges
*
* This file is part of Yeppp! library and licensed under the New BSD license.
* See LICENSE.txt for the full text of the license.
* Author: rschoene
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netd... |
#!/bin/sh
# Exit immediately if a pipeline, which may consist of a single simple command,
# a list, or a compound command returns a non-zero status
set -e
NAV_HOME=${NAV_HOME:?undefined}
readonly NAV_VERSION=90d9a11
echo Patching NAV $NAV_VERSION at $NAV_HOME...
patch $NAV_HOME/ipdevpoll/neighbor.py /nav-a... |
#!/bin/bash
curl "http://tic-tac-toe.wdibos.com/" \
--include \
--request POST \
--data-urlencode ""
echo
|
<filename>src/components/Day.js
import React, { useContext } from "react";
import { CalendarContext, sameDay } from "../context/CalendarContext";
import { contrast } from "../utils/utils";
import Task from "./Task";
function Day({ day, date }) {
const { setTask, setDate } = useContext(CalendarContext);
const getS... |
<gh_stars>1-10
// @flow
const util = require('../util/util');
const browser = require('../util/browser');
const window = require('../util/window');
const {HTMLImageElement} = require('../util/window');
const DOM = require('../util/dom');
const ajax = require('../util/ajax');
const Style = require('../style/style');
c... |
package com.weather.app.email.service;
import com.weather.app.email.domain.EmailRequestStatus;
public interface EmailServiceRequest {
EmailRequestStatus sendEmailCommand(String toEmail,
String body);
}
|
<reponame>safXcode/Article-preview-component
const socials = document.querySelector(".open-share")
const shareBtn = document.getElementById("share")
const removeShareBtn = document.getElementById("remove-share")
const struggleArrow = document.getElementById("struggle")
shareBtn.addEventListener('click', () => {
so... |
<gh_stars>0
export interface MSignatures {
privateKey: string
publicKey: string
}
export class Signatures implements MSignatures{
privateKey: string;
publicKey: string;
constructor(privateKey: string, publicKey: string) {
this.privateKey = privateKey;
this.publicKey = pu... |
-- The extension requires that the pg_stat_statements DSO is loaded
-- via shared_preload_libraries. Luckily, this is only needed when
-- trying to read from the pg_stat_statements view. Extension
-- creation will succeed either way
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
|
import React from 'react';
import ProForm, { ProFormText } from '@ant-design/pro-form';
import { updateUserInfo } from '@/services/anew/user';
import { useModel } from 'umi';
import { message } from 'antd';
export type BaseFormProps = {
values?: API.UserInfo;
};
const BaseForm: React.FC<BaseFormProps> = (props) ... |
#!/bin/bash
FN="RnaSeqSampleSizeData_1.24.0.tar.gz"
URLS=(
"https://bioconductor.org/packages/3.13/data/experiment/src/contrib/RnaSeqSampleSizeData_1.24.0.tar.gz"
"https://bioarchive.galaxyproject.org/RnaSeqSampleSizeData_1.24.0.tar.gz"
"https://depot.galaxyproject.org/software/bioconductor-rnaseqsamplesizedata/b... |
#!/usr/bin/env bash
echo "preparing..."
export GCLOUD_PROJECT=$(gcloud config get-value project)
export INSTANCE_REGION=europe-west6
export INSTANCE_ZONE=europe-west6-a
export PROJECT_NAME=batchjob
export CLUSTER_NAME=${PROJECT_NAME}-cluster
export CONTAINER_NAME=${PROJECT_NAME}-container
echo "setup"
gcloud config s... |
#!/bin/bash -f
#*********************************************************************************************************
# Vivado (TM) v2021.1 (64-bit)
#
# Filename : design_reciever.sh
# Simulator : Synopsys Verilog Compiler Simulator
# Description : Simulation script for compiling, elaborating and verifying the... |
/*
* JaamSim Discrete Event Simulation
* Copyright (C) 2011 Ausenco Engineering Canada Inc.
* Copyright (C) 2018-2020 JaamSim Software Inc.
*
* 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... |
<reponame>au-research/igsn-metadata-portal
'use strict'
const gulp = require('gulp')
const purgecss = require('gulp-purgecss')
const uglifycss = require('gulp-uglifycss')
const watch = require('gulp-watch')
const environments = require('gulp-environments')
const production = environments.production
const browserify = r... |
<filename>Boggle game/SC101_Assignment5/boggle.py<gh_stars>0
"""
File: boggle.py
Name: Sophie
----------------------------------------
TODO: after key in 16 letters with correct formate, app will show possible voc whose letters is longer than 3 letters.
"""
# This is the file name of the dictionary txt file
# we will ... |
import { _utils } from 'react-data-grid';
const { getMixedTypeValueRetriever, isImmutableCollection } = _utils;
export const comparer = (a, b) => {
if (a > b) {
return 1;
}
if (a < b) {
return -1;
}
return 0;
};
const sortRows = (rows, sortColumn, sortDirection) => {
const retriever = getMixedTyp... |
dockerRun shell <<EOF
scan 'test_ns:test_table'
EOF
|
def rectangles_intersect(rect1, rect2):
# Check if the x and y coordinates of the two rectangles overlap
if rect1.x + rect1.width < rect2.x or rect2.x + rect2.width < rect1.x:
return False
if rect1.y + rect1.height < rect2.y or rect2.y + rect2.height < rect1.y:
return False
return True |
/*
* Tencent is pleased to support the open source community by making TKEStack available.
*
* Copyright (C) 2012-2019 Tencent. 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
... |
"""
Content-Based Recommendation System
"""
def generate_recommendation(users, content):
# Get the user interests
user_interests = [user['interests'] for user in users]
# Generate a dictionary mapping each interest to its associated content
content_by_interest = {}
for interest in user_interes... |
#!/usr/bin/env bash
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python ./scripts/action-recognition/train_recognizer.py \
--dataset kinetics400 \
--data-dir /home/ubuntu/third_disk/data/kinetics400/rawframes_train \
--val-data-dir /home/ubuntu/third_disk/data/kinetics400/rawframes_val \
--train-list /home/ubuntu... |
#!/bin/bash
set -e
mkdir -p bin/ 2>/dev/null
for GOOS in $OS; do
for GOARCH in $ARCH; do
arch="$GOOS-$GOARCH"
binary="terraform-provider-rke_v${CURRENT_VERSION}_x${PROTOCOL_VERSION}"
if [ "$GOOS" = "windows" ]; then
binary="${binary}.exe"
fi
echo "Building $binar... |
package kbasesearchengine.system;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Li... |
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run docs:build
# 进入生成的文件夹
cd docs/.vuepress/dist
# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# 如果发布到 https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
# 如果发布到 https... |
<reponame>acouvreur/skeleton-generator
package org.sklsft.generator.model.domain.database;
import java.util.ArrayList;
import java.util.List;
import org.sklsft.generator.model.domain.business.Property;
/**
* representation of a unique constraint<br/>
* Properties are willingly public because of their inte... |
<reponame>PinoEire/archi
package com.archimatetool.editor.ui.dialog;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "com.archimatetool.editor.ui.dialog.messages"; //$NON-NLS-1$
public static String AboutDialog_0;
public static String Abou... |
#include "global.h"
#include "Model.h"
#include "ModelTypes.h"
#include "RageMath.h"
#include "RageDisplay.h"
#include "RageUtil.h"
#include "RageTextureManager.h"
#include "XmlFile.h"
#include "RageFile.h"
#include "RageLog.h"
#include "ActorUtil.h"
#include "ModelManager.h"
#include "Foreach.h"
#include "LuaBinding.h... |
<filename>pecado-ims/pecado-ims-web/src/main/java/me/batizhao/ims/mapper/UserRoleMapper.java
package me.batizhao.ims.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.batizhao.ims.api.domain.UserRole;
import org.apache.ibatis.annotations.Mapper;
/**
* @author batizhao
* @since 2020-09-14
*/... |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
class StoragePass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
// Get a... |
package io.opensphere.myplaces.importer;
import java.awt.Color;
import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import io.opensphere.core.control.action.MenuOption;
import io.opensphere.core.export.ExportException;
impor... |
package com.example.wesense_wearos.networkClasses;
public class TCP_Client {
}
|
#!/bin/bash
export PATH=${PATH//cbmc-5190/cbmc-trunk-diffblue-control-synthesis}
export PATH=${PATH}:/users/pkesseli/software/cpp/cbmc/cbmc-trunk-diffblue-control-synthesis/src/cegis:/users/pkesseli/software/cpp/cbmc/cbmc-trunk-diffblue-control-synthesis-analyzer/src/goto-analyzer
benchmark_basedir='/users/pkesseli/so... |
<gh_stars>0
/// <reference types="jquery" />
export function Json(url: string, method: string, data: any): JQueryXHR {
// TODO does not work reliably: cache set to false for all controller actions by default (reason: ipad bug where function was httpGET originally and cached response was used for same function as ht... |
<gh_stars>0
from app import app
from flask import Blueprint, jsonify
from flask_swagger import swagger
from flask_swagger_ui import get_swaggerui_blueprint
SWAGGER_URL = "/api/docs"
API_URL = "http://localhost:5000/api/spec"
swag = Blueprint('swagger', __name__)
@swag.route("/spec")
def spec():
return jsonify(... |
#! /bin/sh
# Start up mongo-orchestration (a server to spawn mongodb clusters) and set up a cluster.
#
# Specify the following environment variables:
#
# MONGODB_VERSION: latest, 4.2, 4.0, 3.6
# TOPOLOGY: server, replica_set, sharded_cluster
# AUTH: auth, noauth
# AUTHSOURCE
# IPV4_ONLY: off, on
# SSL: openssl, darwins... |
<reponame>Mammut-FE/vscode-hive-languageservice
import {
Expr,
getPath,
ICol,
Keyword,
Node,
NodeType,
Program,
Select,
SubSelect,
TableName,
Use
} from '@mammut-fe/hive-parser';
import {
CompletionItem,
CompletionItemKind,
CompletionList,
InsertTextFormat,
... |
//
// Copyright 2020 IBM 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 ... |
<filename>src/EditLexers/stlProbes.c
#include "EditLexer.h"
#include "EditStyleX.h"
static KEYWORDLIST Keywords_Probes = { { "break","continue" } };
static EDITSTYLE Styles_Probes[] = {
EDITSTYLE_DEFAULT,
{ SCE_NMAPSP_COMMENT_CASE, NP2StyleX_TypeKeyword, L"fore:#0000FF" },
{ SCE_NMAPSP_COMMENT_CASE_CONTENT, NP2Sty... |
/*
* Copyright 2015 Textocat
*
* 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 la... |
public static boolean validateIp(String address) {
String[] nums = address.split("\\.");
if (nums.length != 4)
return false;
for (String num : nums) {
int n = Integer.parseInt(num);
if (n < 0 || n > 255)
return false;
}
return true;
} |
<reponame>yskszk63/cancel-workflow-run
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
"time"
"github.com/google/go-github/v35/github"
"github.com/labstack/echo/v4"
)
type testEnv struct {
env
conTemplate string
ghurl string
}... |
<filename>src/components/article-structure/horizontal-stack-display.ts
/**
* Signature/interface for a `HorizontalStackDisplay` object
* @see https://developer.apple.com/documentation/apple_news/horizontalstackdisplay
*/
export interface HorizontalStackDisplay {
type: "horizontal_stack";
}
|
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for USN-2857-2
#
# Security announcement date: 2016-01-05 00:00:00 UTC
# Script generation date: 2017-01-01 21:05:05 UTC
#
# Operating System: Ubuntu 14.04 LTS
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - linux-image-3.19.0-43-powerpc64-emb:... |
#!/bin/bash
cd ~/rlmolecule/redis_integration_example
# Use consistent redis settings
. ./redis.config
username=dduplyak
allocation=rlmolecule
# Submit sbatch script that will do actual work
jobid=$(sbatch --parsable -A ${allocation} -J ${job_tag} --export=job_tag="${job_tag}" test_jobscript.sbatch)
echo "Submitte... |
package reporter
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"sort"
"sync"
"time"
"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/types"
v1 "k8s.io/api/core/v1"
v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
"kubevirt.io/kubevirt/tests"
"kubevirt.io/client-go/kubecli"
"kubevirt.io/client-g... |
import { FromObservable } from './FromObservable';
export const /** @type {?} */ from = FromObservable.create;
|
#!/usr/bin/env bash
# Copyright 2018 The Knative 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 ... |
# Import the zipfile and os modules
import zipfile
import os
import time
# List of files within the Passwords folder
passwordfilesList = []
# Create a function that will allow users to set which password file they would like to use
def collectPasswords(file_to_use):
#Cracking animation loop just to make program lo... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for RHSA-2013:1754
#
# Security announcement date: 2013-11-21 05:56:19 UTC
# Script generation date: 2017-01-01 21:14:59 UTC
#
# Operating System: Red Hat 6
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - qemu-img-rhev.x86_64:0.12.1.2-2.415.el6... |
<gh_stars>0
export default {
elem: 'svg',
attrs: {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 32 32',
width: 24,
height: 24,
},
content: [
{
elem: 'path',
attrs: {
d:
'M2 28h28v2H2zM13.48 5.15l5.69 8.14.8 1.15 1.35-.36 4.52-1.21a2.13 2.13 0 0 1 1.12 0A1.... |
import RightTab from "./RightTab";
import LeftTab from "./LeftTab";
export { LeftTab, RightTab };
|
<filename>src/main/java/mekanism/client/model/MekanismModelCache.java
package mekanism.client.model;
import java.util.HashSet;
import java.util.Set;
import mekanism.common.Mekanism;
import mekanism.common.tile.qio.TileEntityQIODriveArray.DriveStatus;
import net.minecraftforge.client.event.ModelBakeEvent;
public class... |
Function avg(x, y)
avg = (x + y) / 2
End Function |
var asyncAdd = (a,b) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
if(typeof a === 'number' && typeof b === 'number') {
resolve(a + b);
} else {
reject('Invalid input. Input must be number.');
}
}, 1500);
});... |
// Copyright 2021 <NAME>
// Author: <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 by applicab... |
const { NotFoundException } = require('../../infra/exception');
module.exports = ({ batatinhaRepository }) => ({
execute: async ({ batatinha_header, batatinha_id }) => {
const foundBatatinha = await batatinhaRepository.get({ batatinha_header, batatinha_id });
if (!foundBatatinha)
throw new NotFoundExc... |
####################################################################
# 1. Test cosmic annotations
####################################################################
echo " cosmic.t01...\c"
echo "chr1 10378 10379 None
chr1 120612001 120612005 COSM674994,COSM132830
chr5 112175900 112175904 COSM33672,COSM27546,COSM14... |
import datetime
import secrets
from peewee import (
JOIN,
BigIntegerField,
BooleanField,
CharField,
DateField,
DateTimeField,
ForeignKeyField,
IntegerField,
TextField,
fn,
)
from playhouse.shortcuts import model_to_dict
from src.model import db
def get_exclude():
return [... |
#!/bin/bash
export GDOCK_PATH=$1
cd "$GDOCK_PATH" || exit
mkdir "$GDOCK_PATH"/src
cd "$GDOCK_PATH"/src || exit
# dcomplex
wget http://servers.sparks-lab.org/downloads/dcomplex2.tar.gz
tar zxfv dcomplex2.tar.gz
rm dcomplex2.tar.gz
cd "$GDOCK_PATH"/src/dcomplex_single_file || exit
sed -i "s|5400|54000|g" dcomplex.c
sed... |
class Source < ActiveRecord::Base
has_many :disease_source_variants
has_many :variants, through: :disease_source_variants
has_many :drug_interactions
end
|
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import java.util.Arrays;
import java.util.concurrent.ThreadLocalRandom;
@State(Scope.Benchmark... |
#!/bin/sh
RAM_ROOT=/tmp/root
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }
install_file() { # <file> [ <file> ... ]
for file in "$@"; do
dest="$RAM_ROOT/$file"
[ -f $file -a ! -f $dest ] && {
dir="$(dirname $dest)"
mkdir -p ... |
#!/usr/bin/env bash
# this should have effect globally, for all tests
# https://github.com/bats-core/bats-core/blob/master/docs/source/warnings/BW02.rst
bats_require_minimum_version 1.5.0
debug() {
echo 'exec 1<&-; exec 2<&-; exec 1>&3; exec 2>&1'
}
export -f debug
# redirects stdout and stderr to &3 otherwise t... |
from abc import ABC, abstractmethod
class DataStructure(ABC):
@abstractmethod
def snapshot(self):
raise NotImplementedError("snapshot method must be implemented")
class CustomDataStructure(DataStructure):
def __init__(self, data):
self.data = data
def snapshot(self):
return se... |
<reponame>chylex/Hardcore-Ender-Expansion
package chylex.hee.packets.client;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.Entity;
import chylex.hee.entity.fx.FXHandler;
import chylex.hee.entity.fx.FXType;
import chylex.hee.packets.AbstractClientPac... |
<filename>test-data/comp-changes/new/src/main/classNowCheckedException/ClassNowCheckedException.java
package main.classNowCheckedException;
public class ClassNowCheckedException extends Exception {
private static final long serialVersionUID = 1L;
}
|
/*
* Copyright 2011-2020 the original author or 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
import java.sql.SQLException;
public class BookManager {
// Resets the text fields for book information
public void reset(TextField textField_id, TextField textField_title, TextField textField_author, TextField textField_publisher, TextField textField_price) throws DaoException, SQLException {
// Imple... |
#!/bin/bash
## source first
source scripts/common_variables.sh
## config
outdir=${1:-"plots2D"}
plot="met_vs_time"
misc="empty"
## main loop
for input in "${inputs[@]}"
do
echo ${!input} | while read -r label infile insigfile sel varwgtmap
do
## make outfile text
outfile="${plot}_${label}"
## run script... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.