text stringlengths 1 1.05M |
|---|
module load anaconda/2.1.0
module load bedtools/2.23.0
module load blasr/dev
module load freebayes/0.9.14
module load samtools/1.1
module load hdf5/1.8.13
module load netcdf/4.3.2
module load R/3.1.0
module load perl/5.14.2
module load RepeatMasker/3.3.0
module load mpc/0.8.2 gmp/5.0.2 gcc/4.9.1
|
javapath=`tail -n+1 phasing_settings | head -n1`;
gatk=`tail -n+2 phasing_settings | head -n1`;
picard=`tail -n+3 phasing_settings | head -n1`;
sequencing=`tail -n+4 phasing_settings | head -n1`;
numberofcores=`tail -n+7 phasing_settings | head -n1`;
sed -i 's/\?/N/g' reference.fa;
sed -i 's/-//g' reference.fa;
bwa in... |
'use strict';
function Location(city, geoData) {
// eslint-disable-next-line camelcase
this.search_query = city;
// eslint-disable-next-line camelcase
this.formatted_query = geoData.results[0].formatted_address;
this.latitude = geoData.results[0].geometry.location.lat;
this.longitude = geoData.results[0].g... |
<reponame>kenmoini/certificate-sentinel-operator
/*
Copyright 2021 Polyglot Systems.
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 ... |
int mapKeys(int customKeyCode, int[][] keyMappings) {
for (int[] mapping : keyMappings) {
if (mapping[0] == customKeyCode) {
return mapping[1];
}
}
return -1;
} |
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Framework;
using UnityEngine;
public class MonsterFactory : MonoBehaviour
{
private ITable monsterDatas;
public void InitializeMonsterFactory()
{
// Perform any necessary initialization, suc... |
MININIX_PKG_HOMEPAGE=https://github.com/cswl/tsu
MININIX_PKG_DESCRIPTION="A su wrapper for Mininix"
MININIX_PKG_VERSION=2.0
MININIX_PKG_PLATFORM_INDEPENDENT=yes
MININIX_PKG_SRCURL=https://github.com/cswl/tsu/archive/ce32547e7ca441ed449b12447539da959b889e95.zip
MININIX_PKG_SHA256=11c0b0c0b1c9acb64d354ce9b0348d3d950e06e2... |
#!/bin/sh
# User-controllable options
grub_modinfo_target_cpu=i386
grub_modinfo_platform=pc
grub_disk_cache_stats=0
grub_boot_time_stats=0
grub_have_font_source=1
# Autodetected config
grub_have_asm_uscore=0
grub_bss_start_symbol="__bss_start"
grub_end_symbol="end"
# Build environment
grub_target_cc='gcc-6'
grub_tar... |
var ctx = new AudioContext();
// サウンドファイルの取得
function getwav(name, callback) {
fetch(name).then(function(res) {
return res.arrayBuffer(); }).then(function(arr) {
ctx.decodeAudioData(arr, function(buf) {
callback(buf);
});
});
}
var kick, hat, snare, clap;
getwav("kick.wav", function(buf){kick = buf;... |
#!/bin/bash
function timed_echo () {
echo -e "$(date -u +'%F %T.%3N %Z'):\t${@}"
}
timed_echo "Entrypoint Script Started"
cd $PATH_TO_VOLUME
cargo install cargo-watch && cargo build &
if [ "$DATABASE" = "postgres" ]
then
timed_echo "Waiting for postgres..."
while ! nc -z $SQL_HOST $SQL_PORT; do
slee... |
#!/bin/sh
[ "$#" -ne 2 ] && echo 'usage: generate-at.sh <username> <password>' && exit 1
readonly username=$1
readonly password=$2
curl https://api.particle.io/oauth/token\
-u particle:particle\
-d grant_type=password\
-d username="$username"\
-d password="$password"
|
package com.digirati.taxman.rest.server.taxonomy.mapper;
import com.digirati.taxman.common.rdf.RdfModelException;
import com.digirati.taxman.common.rdf.RdfModelFactory;
import com.digirati.taxman.common.taxonomy.CollectionModel;
import com.digirati.taxman.common.taxonomy.ConceptModel;
import com.digirati.taxman.common... |
/*
* Copyright 2018 JBoss by Red Hat.
*
* 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 agr... |
var fs = require('fs');
var _ = require('underscore');
var entityApis = {};
var apiManagers = {};
var entityApiFiles = fs.readdirSync('./server/EntityApi');
_.each(entityApiFiles,function(entityApiFileName){
var apiName = entityApiFileName.substring(0,entityApiFileName.indexOf('Api'));
entityApis[apiName] = re... |
package demo._41.cache;
import javax.cache.annotation.CacheRemove;
import javax.cache.annotation.CacheResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
/**
* Created by nlabrot on 01/09/15.
*/
@Service
public class CacheableService {
private static... |
# COPYRIGHT_MAY_GO_HERE
# This script expects the following variables to be defined:
# IS_TRANSCRIPT = whether alignments were done against a cDNA reference.
# GROUPS_DEFINITION = description of the groups, in the format group-1=sample_i,sample_j/group-2=sample_k,..
# COMPARE_DEFINITION
# ANNOTATION_FILE = file descri... |
#!/bin/bash
if ! command -v curl &> /dev/null
then
echo "curl could not be found but is a pre-requisite for this script"
exit
fi
curl localhost:8080/list
|
<filename>qht-pay/src/main/java/com/julu/qht/mapper/StudentDao.java
package com.julu.qht.mapper;
import com.julu.qht.entity.Student;
import com.baomidou.mybatisplus.mapper.BaseMapper;
/**
* <p>
* 学生,1 Mapper 接口
* </p>
*
* @author qht
* @since 2018-11-29
*/
public interface StudentDao extends BaseMapper<Student... |
<reponame>JarredStanford/JarredStanford.github.io<filename>node_modules/grommet-controls/components/Card/StyledCard.js
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = r... |
#!/usr/bin/env bash
xp_dir=log/$1
seed=$2
nu=$3
pca=$4
mobiFall_normal=$5
mobiFall_outlier=$6
info_file=$7
mkdir $xp_dir;
# mobiFall training
python baseline_ocsvm.py --xp_dir $xp_dir --dataset mobiFall --loss OneClassSVM --seed $seed --kernel rbf --nu $nu \
--GridSearchCV 1 --out_frac 0 --unit_norm_used l1 --pc... |
class CustomEventLoop:
def __init__(self):
self._root = GUIFramework() # Replace GUIFramework with the actual GUI framework class
self.alive = True
def custom_update(self):
# Implement the custom_update method to update the GUI
# Example: Update the GUI components, handle user ... |
<reponame>jneterer/gatsby-tailwind-typescript-userbase
export interface IForm {
changed: boolean;
valid: boolean;
submitted: boolean;
} |
<filename>build/esm/primitives/types/transform/transform.js<gh_stars>1-10
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS103: Rewrite code to no longer... |
<reponame>millord/sanity-gatsby-back-front<gh_stars>1-10
import { merge } from "theme-ui"
import { BaseTheme } from "gatsby-theme-catalyst-core"
import { tailwind, baseColors } from "@theme-ui/preset-tailwind"
export default merge(BaseTheme, {
// Modifications to the base theme go here. This is an example changing c... |
"""Input formats
""" |
<filename>dev/_full/utils/control-handlers/live-validator-show-error-handler.ts
import debounce from 'debounce-wrapper';
import {defaultLiveErrorHandler} from '@error-handlers/live-validator-error-handler'
import {ValidatorErrorProps, HookProps, SetFormProps, FormProps} from "@common-types"
import {LiveValidatorShowE... |
/**
* Copyright (C) 2013 <EMAIL> (<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 applicable la... |
<reponame>PinoEire/archi
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.help.hints;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.Ex... |
import React, { Component } from 'react';
import { Navbar, NavbarBrand, Nav, NavbarToggler, Collapse, NavItem } from 'reactstrap';
import { BrowserRouter, NavLink } from 'react-router-dom';
import '../App.css'
import { Container, Row, Col,Card,CardImg} from 'reactstrap';
class Home extends Component{
constructor... |
import React from "react"
import Modal from "../state/Modal"
import SearchBar from "../state/SearchBar"
import ZQModal from "./ZQModal"
import logInto from "../test/helpers/loginTo"
import provide from "../test/helpers/provide"
test("renders with zq get command", async () => {
const {store} = await logInto("workspa... |
const equals = (entries = []) => {
if (entries.length === 0) {
return true;
}
return entries.every(e1 => entries.every(e2 => e2 === e1));
};
/**
*
* @type {{<K>(key: K) => <T>(entry:T, index: number) => T[K] }}
*/
const lens = key => (entry, index) => {
if (typeof key === 'function') {
return key(entry, ind... |
#pragma once
#include <vector>
#include <glow-extras/colors/color.hh>
#include "CameraController.hh"
#include "detail/MeshAttribute.hh"
#include "detail/config_structs_impl.hh"
#include "fwd.hh"
#include "renderables/GeometricRenderable.hh"
#include "traits.hh"
// view configuration
// is called from the variadic v... |
SELECT post_title, MAX(date_created)
FROM Posts
GROUP BY post_title
ORDER BY date_created DESC |
#!/usr/bin/env bash
set -ex
# Make sure git is installed
if [ -z "$(which git)" ] ; then
echo "Git is not installed. Quitting."
exit 1
fi
# Make sure hub is installed
if [ -z "$(which hub)" ] ; then
echo "Hub is not installed. Quitting."
exit 1
fi
# Fetch remote tags
git fetch --prune-tags --prune --tags
# Get... |
<filename>VersionInfoMaintain/src/com/versionmaintain/model/IgnoreFileTableModel.java
/*
* Copyright 2015 lixiaobo
*
* VersionUpgrade project licenses this file to you 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 o... |
<reponame>lucianbc/lucianbc.github.io
import React from 'react';
import { useStaticQuery, graphql } from "gatsby"
import "./experience.scss"
import imgUb from "../../assets/unibuc.png"
import imgGtl from "../../assets/gtl.jpeg"
import imgAmz from "../../assets/logo-amazon-square.jpg"
import Item from "./experienceIt... |
<filename>lib/beaker/version.rb
module Beaker
module Version
STRING = '2.27.0'
end
end
|
#! /bin/sh
. ${TOPDIR}/util/functions.sh
# Should be no answers.
n=$(jq_count eve.json 'select(.event_type == "dns") | select(.dns.type != "query")')
assert_eq 0 $n "only queries expected"
exit 0
|
package com.deskbill.view;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.J... |
<reponame>Skalwalker/NumberRecognition
import matplotlib.pyplot as plt
import numpy as np
import itertools
class Plot(object):
@staticmethod
def plot_confusion_matrix(cm, classes,
normalize=False,
title='Matriz de confusão',
... |
module X12
# Implements a segment containing fields or composites
class Segment < Base
attr_accessor :fields
# Parses this segment out of a string, puts the match into value,
# returns the rest of the string - nil if cannot parse.
#
# @param str [String]
# @return [nil]
def ... |
#!/bin/bash
export SCRIPT_LOCT=$( cd $( dirname $0 ); pwd )
cd $SCRIPT_LOCT/../..
mvn clean
docker build -t zenhub-api-mirror --file=resources/docker/Dockerfile .
|
#!/bin/bash
# 以Get请求为例
reqUrl="yourapi"
echo "request url is : $reqUrl"
resData=$(curl $reqUrl)
echo "get data : <$resData>"
parseJson(){
echo $1 | sed 's/.*'$2':\([^,}]*\).*/\1/'
}
# 假设返回的json数据有两个字段,分别为total和fail
total=$(parseJson $resData '"total"')
fail=$(parseJson $resData '"fail"')
# 对数据进行入mysql库
insertSql... |
The software will contain two components: a task database and a reminder system.
The task database will be used to store information about tasks such as title, description, due date and any other relevant information. The databse will be designed to make it easy to query the tasks and filter them based on certain crit... |
import flask
from collections import Counter
app = flask.Flask(__name__)
@app.route("/")
def index():
return """
<form action="/analyze" method="GET">
<textarea name="text">$text</textarea>
<input type="submit" value="Analyze">
</form>
"""
@app.route("/analyze/")
def analyze():
text = ... |
<gh_stars>0
# Copyright (c) 2012 Bingo Entreprenøren AS
# Copyright (c) 2012 Teknobingo Scandinavia AS
# Copyright (c) 2012 <NAME>
# Copyright (c) 2012 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to dea... |
#!/bin/bash -e
IMAGE="vcaca-ubuntu1604-analytics-ffmpeg"
VERSION="19.11"
DIR=$(dirname $(readlink -f "$0"))
. "${DIR}/../../../../script/build.sh"
|
<gh_stars>0
package test
import org.scalacheck._
import org.scalacheck.Prop.{forAll}
import org.scalacheck.Gen.{ choose, listOf, nonEmptyListOf, listOfN, oneOf }
import model._
object ExecutableSpec extends Properties("Executable") {
implicit lazy val arbOperation: Arbitrary[Operation] = Arbitrary(Generators.opera... |
var xyData = [
{"x": 0, "y": 1},
{"x": 0.11865740740740742, "y": 2},
{"x": 0.11887731481481482, "y": 3},
{"x": 1.1845949074074074, "y": 4},
{"x": 1.2361342592592592, "y": 5},
{"x": 1.2718402777777778, "y": 6},
{"x": 4.949074074074074, "y": 7},
{"x": 4.975763888888889, "y": 8},
{"x": 4.981296296296296,... |
<gh_stars>0
/**
* @license
* Copyright 2017 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.nanos.export',
name: 'CSVDriver',
implements: [ 'foam.nanos.export.ExportDriver' ],
documentation: 'Class for exporting data from a DAO to CSV',
... |
<reponame>matheusmunizsouza/quarkus-aws-poc<filename>src/main/java/com/matheus/aws/s3/resource/S3AsyncClientResource.java
package com.matheus.aws.s3.resource;
import com.matheus.aws.s3.model.FileObject;
import com.matheus.aws.s3.model.FormData;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import jav... |
<gh_stars>1-10
package de.lmu.cis.ocrd.ml.features;
import de.lmu.cis.ocrd.ml.OCRToken;
import java.util.Random;
// Classifies OCR tokens into one of two different classes:
// * true if the best ranked correction candidate equals the ground truth
// token (the correction will improve or at least... |
package com.github.hinsteny.commons.warp.io.xml;
import javax.xml.namespace.NamespaceContext;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
/**
* @author Hinsteny
* @version DelegatingXMLStreamWriter: DelegatingXMLStreamWriter 2019-05-10 09:39 All rights reserved.$
*/
public ... |
/*
* Copyright 2017 Wultra s.r.o.
*
* 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... |
class CustomTuple(tuple):
def __new__(cls, *args):
return tuple.__new__(cls, args)
def __repr__(self):
contents = [repr(elem) for elem in self]
return f"{self.__class__.__name__}<{', '.join(contents)}>"
def _create_getter(index):
def getter(self):
return self[in... |
/**
* The action configuration object
* @typedef {Object} ActionConfig
* @property {Function} service - Service used to obtain data
* @property {String} attr - The attribute of the state which will contain the data (if any)
* @property {String} [mutation] - Mutation to used to set data when it is not the defau... |
package com.comandulli.engine.panoramic.playback.media;
import android.content.Context;
import android.media.MediaPlayer;
import android.net.Uri;
import com.comandulli.engine.panoramic.playback.engine.exception.AssetNotFoundException;
import com.comandulli.engine.panoramic.playback.entity.playback.ChapterData;
impor... |
"""
Develop a Python code to generate the nth number in the Fibonacci series.
"""
def generate_fibonacci(n):
if n == 1 or n == 2:
return 1
else:
a = 1
b = 1
for i in range(2, n):
a, b = b, a + b
return b
if __name__ == '__main__':
n = 8
print(gen... |
<reponame>SethVandebrooke/HashBrown<filename>hashbrown.go
package main
import (
"bytes"
"encoding/binary"
"math"
"math/bits"
)
type MD5Operation = func(X, Y, Z uint32) uint32
// MD5Sum computes the MD5 hash of the input
func MD5Sum(message []byte) []byte {
var A uint32 = 0x76543210
var B uint32 = 0xfecdab98
... |
if [ "${INCLIBASS}" == "Y" ]; then
INCFRIBIDI="Y"
fi
|
#!/bin/bash
SUCCESS=0
E_NOARGS=65
if [[ -z "$1" ]]; then
echo "Usage: `basename $0` rpm-file"
exit $E_NOARGS
fi
{
echo
echo "Archive Description:"
rpm -qpl $1
echo
rpm -i --test $1
if [[ "$?" -eq "SUCCESS" ]]; then
echo "$1 can be installed."
else
echo "$1 cannot b... |
# grc overides for ls
# Made possible through contributions from generous benefactors like
# `brew install coreutils`
if $(gls &>/dev/null)
then
alias ls="gls -F --color"
alias l="gls -lAh --color"
alias ll="gls -l --color"
alias la='gls -A --color'
fi
alias atom="atom-beta"
|
package cim4j;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cim4j.PFVArControllerType2Dynamics;
import java.lang.ArrayIndexOutOfBoundsException;
import java.lang.IllegalArgumentException;
import cim4j.PU;
import cim4j.Simple_Float;
import cim4j.Boolean;
/*
The class represents IEE... |
import { Routes } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { LayoutComponent } from './layout/layout.component';
import { onBoardingComponent } from './layout/on-boarding/on-boarding.component';
import { AlertsComponent } from './alert/alerts.component';
import { IconsCo... |
#!/usr/bin/env bash
# Copyright 2017 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 applica... |
/*
* Copyright (c) Open Source Strategies, Inc.
*
* Opentaps is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Opentap... |
import sqlite3
conn = sqlite3.connect('database.db')
cursor = conn.cursor()
cursor.execute("SELECT CustomerID, FirstName, LastName FROM Customers WHERE Country = 'Germany'")
rows = cursor.fetchall()
conn.close()
# Output rows
for row in rows:
print(row[0], row[1], row[2]) |
function countPropertyOccurrences(evidences: Evidence[], propertyName: string): Record<string, number> {
const propertyCounts: Record<string, number> = {};
for (const evidence of evidences) {
const propertyValue = evidence[propertyName];
if (propertyCounts[propertyValue]) {
propertyCounts[propertyVal... |
#!/usr/bin/env bash
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
__init_tools_log=$__scriptpath/init-tools.log
__PACKAGES_DIR=$__scriptpath/packages
__TOOLRUNTIME_DIR=$__scriptpath/Tools
__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
__DOTNET_CMD=$__DOTNET_PATH/dotnet
if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SO... |
#!/usr/bin/env sh
# abort on errors
set -e
# build
npm run build
# navigate into the build output directory
cd dist
git init
git add -A
git commit -m 'deploy'
git push -f git@github.com:henriquepgomide/personality-big-five-ipip100.git master:gh-pages
cd -
|
<reponame>daniel-baf/magazine-app
package DB.DAOs.Magazine;
import DB.Domain.Magazine.Magazine;
import BackendUtilities.Parser;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
*
* @author jefemayoneso
*/
public class MagazineInsert {
private String SQL_INSERT_MAG = "INSERT INTO Magazine (... |
<reponame>Aissaoui-Ahmed/accents<gh_stars>1-10
import check from './check.js';
import remove from './remove.js';
import hasAccent from './hasAccent.js';
export {
check,
remove,
hasAccent,
};
|
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PathVar... |
#!/bin/bash
# Copyright 2017 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 ... |
#!/bin/bash
GITLAB_HOST="185.185.70.227"
docker run \
--detach \
--hostname $GITLAB_HOST \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://$GITLAB_HOST/'; gitlab_rails['gitlab_shell_ssh_port'] = 2222;" \
--publish 443:443 --publish 80:80 --publish 2222:22 --publish 5005:5005 \
--name gitlab \
--restart ... |
<reponame>PetukhovVictor/compiler2
from copy import copy
from .function import function as compile_function
def object_method_def(compiler, node):
new_node = copy(node)
new_node.name = "o%s!%s" % (compiler.environment.object_list[-1][0], node.name)
return compile_function(compiler, new_node)
|
<reponame>754340156/NQ_quanfu<gh_stars>1-10
//
// Mine_OrderCell.h
// allrichstore
//
// Created by zhaozhe on 16/11/7.
// Copyright © 2016年 allrich88. All rights reserved.
//
#import "BaseTableViewCell.h"
@interface Mine_OrderCell : BaseTableViewCell
/** titleName */
@property(nonatomic,copy) NSString * titleNam... |
<gh_stars>0
/*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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:/... |
<reponame>code-troopers/wicket-daterangepicker
package codetroopers.wicket.web.daterangepicker;
import org.apache.wicket.util.convert.IConverter;
import org.apache.wicket.util.convert.converter.DateConverter;
import java.util.Date;
import java.util.Locale;
/**
* @author cgatay
*/
public class DatePairConverter imple... |
import matplotlib.pyplot as plt
# Data to plot
fruits = ["Bananas", "Oranges", "Apples"]
amount = [5, 10, 2]
# Create a bar chart
plt.bar(fruits, amount)
plt.xlabel("Fruits", fontsize=10)
plt.ylabel("Amount", fontsize=10)
plt.title("Fruits Amount Bar Chart")
plt.show() |
#pragma once
#include "absl/time/clock.h"
#include "id.h"
#include "measurement.h"
#include <atomic>
#include <chrono>
#include <vector>
namespace spectator {
struct Meter {
public:
explicit Meter(Id id)
: id_{std::move(id)}, last_updated_{absl::GetCurrentTimeNanos()} {}
[[nodiscard]] const Id& MeterId() ... |
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-root',
template: '<h1>Response{{response}}</h1>'
})
export class AppComponent {
response: string;
http: HttpClient;
constructor(http: HttpClient) {
this.http = http;
this.makeRequest();
}
... |
const math = require('mathjs');
module.exports = {
add: function (x, y) {
return math.add(x,y);
},
subtract: function (x, y) {
return math.subtract(x,y);
},
multiply: function (x, y) {
return math.multiply(x,y);
},
divide: function (x, y) {
return math.divide... |
<reponame>kmhasan-class/spring2016ai
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bd.ac.seu.model;
import java.util.ArrayList;
import java.util.logging.Level;
import java.... |
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 Kirill 'kkm' Katsnelson
# TODO(kkm): This is not as user-customizable as it should have been.
# Versions that we install, may be overridden in etc/imaging/user_vars.inc.sh
nvidia_ver=418.87.01 # From the NVIDIA public bucket.
nvidia_bucket=gs://nvid... |
# Invoice A
items = [
{'name': 'Item 1', 'price': 150},
{'name': 'Item 2', 'price': 175},
{'name': 'Item 3', 'price': 200}
]
# Calculate total
total = 0
for item in items:
total += item['price']
# Create invoice
print('Invoice A')
print('=========')
for item in items:
print(f'{item["name"]:<10}: ${item["price"]:... |
import os
import shutil
def copy_file(source_path, destination_path):
if not os.path.exists(source_path):
raise FileNotFoundError(f"The source file '{source_path}' does not exist.")
destination_dir = os.path.dirname(destination_path)
if not os.path.exists(destination_dir):
os.makedirs(dest... |
response = "Hi there, I'm doing great! How about you?" |
<filename>src/utils/zencrepes/fetchConfig.ts
import { Config } from '../../global';
import esQueryData from '../es/esQueryData';
const fetchConfig = async (eClient: any, userConfig: Config) => {
const configData = await esQueryData(
eClient,
userConfig.elasticsearch.sysIndices.config,
{
fro... |
<gh_stars>0
------------------------------------------------------------------------------------------------------
--Stored procedures were auto-generated by LatticeSoft Stored Procedures Generator SPGen.NET v1.0
--Generated time: Sonntag, 28. März 2004, 13:35:43
--Web: http://www.latticesoft.com
--Email: mailto:<EMAIL... |
<filename>packages/automaton-with-gui/src/compat/v2types/V2FxSection.ts
/**
* Interface of a fx section.
*/
export interface V2FxSection {
/**
* Beginning time of the section.
*/
time: number;
/**
* Time length of the section.
*/
length: number;
/**
* Row of the section.
*/
row: number... |
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# Modify default IP... |
<filename>src/components/pages/state/state-links.js
import React from 'react'
import { Link } from 'gatsby'
import slug from '~utilities/slug'
import stateLinksStyle from './state-links.module.scss'
export default ({
twitter,
covid19Site,
covid19SiteSecondary,
stateName,
historicalSlug,
fathomGoal,
}) => {... |
<reponame>yisuoyanyudmj/RLs-1<gh_stars>1-10
#!/usr/bin/env python3
# encoding: utf-8
import importlib
from typing import Optional
from rls.common.config import Config
from rls.memories.replay_buffer import ReplayBuffer
from rls.utils.logging_utils import get_logger
logger = get_logger(__name__)
BufferDict = {
... |
<gh_stars>0
/**
* This hook deploys the built application to a remote device
*
* @copyright
* Copyright (c) 2017 by <NAME>. All Rights Reserved.
*/
'use strict';
// TODO:
// - Break winappdeploycmd stuff out into a seperate file
// - Add prompting for code in this hook
// - Figure out if logging is possible
// -... |
const fs = require('fs');
const dataFile = './data.txt';
fs.readFile(dataFile, (err, data) => {
if (err) throw err;
const path = parse_data(data.toString('utf8'));
const hexPath = build_hex_path(path);
console.log(hexPath[0], hexPath[hexPath.length - 1]);
console.log(HexDistance(hexPath[0], hexPat... |
#!/bin/bash
echo "Current time: $(date +%T)"
echo "Sleep 5s"
sleep 5
echo "Start purge cache"
curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/dist/style.css"
curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/dist/github-sync.umd.js"
curl "https://purge.jsdelivr.... |
<gh_stars>0
package main
import (
"testing"
"github.com/coreos/fleet/job"
"github.com/coreos/fleet/machine"
"github.com/coreos/fleet/registry"
"github.com/coreos/fleet/resource"
"github.com/coreos/fleet/unit"
)
func newFakeRegistryForSsh() registry.Registry {
machines := []machine.MachineState{
{"c31e44e1-f... |
package model
import (
"errors"
"fmt"
"strconv"
"strings"
"unicode"
"unicode/utf8"
)
func NewSlug(value string) *Slug {
s := new(Slug)
s.Set(value)
return s
}
type Slug string
func (self *Slug) Get() string {
return string(*self)
}
func (self *Slug) Set(value string) {
result := make([]byte, utf8.RuneC... |
<reponame>Boatdude55/staging-website<gh_stars>0
/**
* @fileoverview
*
* Page 1
*/
goog.provide('app.whatif.View');
goog.require('app.lib.structor.Structor');
goog.require('app.whatif.ViewHeroSection');
goog.require('app.whatif.ViewBudget');
goog.require('app.whatif.ViewPlan');
goog.require('app.whatif.ViewSave');... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.