text stringlengths 1 1.05M |
|---|
<reponame>mjburling/beneficiary-fhir-data
package gov.cms.bfd.server.war.stu3.providers;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.params.provider.Ar... |
<filename>fslks/datasets/summarization/medlineplus_reviews.py
"""
Module to create MedlinePlus PubMed review summarization tensorflow dataset.
"""
import os
import json
import tensorflow as tf
import tensorflow_datasets.public_api as tfds
_DESCRIPTION = """The MedlinePlus multi-document review summarization dataset,... |
class ModelConverter {
getTransactionModels(transactions) {
// Implement the logic to convert transactions to models
// For example:
const models = transactions.map(transaction => {
return {
// Convert transaction data to model format
// Example:
nonce: transaction.nonce,
... |
#!/usr/bin/env bash
set -euo pipefail
echo "Running tests on node $CIRCLE_NODE_INDEX of $CIRCLE_NODE_TOTAL"
if [ -z "$SERVER_TEST_TO_RUN" ]; then
echo 'Please specify $SERVER_TEST_TO_RUN'
exit 1
else
echo "Running test $SERVER_TEST_TO_RUN"
fi
### Functions
stop_services() {
echo "killing and waiting for spawned... |
<!DOCTYPE html>
<html>
<head>
<title>Cards with Text Fields</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="c... |
#!/bin/bash
# This script forwards BOOKSTORE v1 port 14001 to localhost port 8084.
backend="${1:-bookstore}"
BOOKSTOREv1_LOCAL_PORT="${BOOKSTOREv1_LOCAL_PORT:-8084}"
POD="$(kubectl get pods --selector app="$backend" -n bookstore --no-headers | grep 'Running' | awk 'NR==1{print $1}')"
kubectl port-forward "$POD" -n ... |
#!/bin/bash
set -e
set -o pipefail
ERRORS=()
# find all executables and run `shellcheck`
for f in $(find . -type f -not -iwholename '*.git*' | sort -u); do
if file "$f" | grep --quiet shell; then
{
shellcheck "$f" && echo "[OK]: sucessfully linted $f"
} || {
# add to errors
ERRORS+=("$f")
... |
#!/bin/sh
find . -name "*" | wc -l | tr -d " "
|
<reponame>turoDog/LearningPython
import re
content = 'http://weibo.com/comment/KEraCN'
result1 = re.match('http.*?comment(.*?)',content)
result2 = re.match('http.*?comment(.*)',content)
print('result1',result1.group(1))
print('result2',result2.group(1))
|
docker run -dit -v /home/siwei/movie:/Users/siwei/torrent/
|
#!/bin/bash -l
# Ensure we fail the job if any steps fail
set -ex -o pipefail
echo "---> edgex-publish-docs.sh"
# Required Parameters
# <NEXUS_URL>: URL of Nexus server. Eg: https://nexus.edgexfoundry.org
# <NEXUS_PATH>: Path on nexus logs repo to place the logs. Eg:
# snapshots/branc... |
<gh_stars>100-1000
//#region IMPORTS
import type Pose from '../../armature/Pose';
import type { IKChain, IKLink } from "../rigs/IKChain";
import type { ISolver } from './support/ISolver';
import { QuatUtil, Transform, Vec3Util } from '../../maths';
import C... |
<filename>Scripts/js/cmds/make-file-name-pretty/helpers/show-rejected.js
const { chalk } = require('../../../helpers');
/**
*
* @param {Array<import('../helpers/file').File>} files
*
* @return {void}
*/
function showRejected(files) {
if (files.length === 0) {
return;
}
console.log(chalk.red('Rejected Files... |
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 ... |
<!DOCTYPE html>
<html>
<head>
<title>Divs</title>
</head>
<body>
<div>Hello</div>
<div>World</div>
<div>!</div>
</body>
</html> |
#pragma once
#include <list>
#include <Poco/Mutex.h>
#include <Poco/SharedPtr.h>
#include <Poco/Timespan.h>
#include <Poco/URI.h>
#include <Poco/DOM/Node.h>
#include <Poco/DOM/NodeIterator.h>
#include "core/PollableDevice.h"
#include "model/DeviceID.h"
#include "model/ModuleID.h"
#include "model/ModuleType.h"
#inclu... |
PATH="$PATH:/usr/local/bin"
APP_NAME="petclinic"
APP_REPO_NAME="clarusway-repo/petclinic-app-qa"
APP_STACK_NAME="james-petclinic-App-QA-2"
CFN_KEYPAIR="james-petclinic-qa.key"
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
AWS_REGION="us-east-1"
ECR_REGISTRY="${AWS_ACCOUNT_ID}.dkr.ecr.${AWS... |
<gh_stars>0
import { Avatar, Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, makeStyles } from "@material-ui/core";
import React from "react";
import { ErrorOutline, Info} from "@material-ui/icons";
import { useAppState } from "../../providers/AppStateProvider";
const useStyles = makeStyl... |
#!/bin/bash
# Render score animations for an experiment
if test -z "$1"
then
echo "Usage: render_score_animations_genderless experiment_name1 experiment_name2 ..."
exit
fi
for dataset in "dev" "eval"
do
python3 plot.py \
average-metrics \
bulk_scores/asv_${dataset}/ \
bulk_scores/c... |
<gh_stars>0
var bcrypt = require('bcryptjs'),
path = require('path'),
Q = require('q');
//===============DBS=================
var User = require('../models/index').User;
//used in local-signup strategy
exports.localReg = function(username, password) {
var deferred = Q.defer();
User.findOne({
u... |
#!/usr/bin/env bash
# Copyright 2018 The MACE 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 requi... |
import colors from '../settings/colors';
import styles from '../settings/styles';
export default {
root: {
width: '80%',
maxWidth: '350px',
margin: '0 auto',
backgroundColor: colors.white,
borderRadius: '4px',
boxSizing: 'border-box',
overflow: 'hidden',
boxShadow: styles.depthShadows... |
<reponame>muthukumaravel7/armnn<gh_stars>0
var classarmnn_1_1optimizations_1_1_move_transpose_up_impl =
[
[ "MoveTransposeUpImpl", "classarmnn_1_1optimizations_1_1_move_transpose_up_impl.xhtml#a742678831654006eaaf7fceee1ca27eb", null ],
[ "~MoveTransposeUpImpl", "classarmnn_1_1optimizations_1_1_move_transpose_u... |
# Copyright Ⓒ 2020 "Sberbank Real Estate Center" Limited Liability Company.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to... |
class SoC:
def __init__(self):
self.connections = []
def connect(self, source, destination):
self.connections.append((source, destination))
def print_verilog(self, include_descendants=False):
verilog_code = "// Verilog code for the SoC design\n"
for source, destination in s... |
# Create variables for all models used by the tutorials to make
# it easier to reference them with short names
# check for variable set by setupvars.sh in the SDK, need it to find models
: ${InferenceEngine_DIR:?"Must source the setupvars.sh in the SDK to set InferenceEngine_DIR"}
parent_path=$( cd "$(dirname "${BA... |
<filename>libs/desktop/shared/ui/src/lib/antd/Drawer/index.ts
import Drawer from 'antd/es/drawer'
import 'antd/es/drawer/style/css'
export { Drawer }
|
package org.ekstep.analytics.api.util
import java.sql.{ResultSet, Timestamp}
import java.util.Date
import com.google.common.collect.Table
import org.ekstep.analytics.api.BaseSpec
import org.ekstep.analytics.framework.util.HTTPClient
import org.mockito.ArgumentMatchers
import org.mockito.Mockito._
class TestCacheUtil... |
<filename>src/utils/checkSrsStage.js
// 0 -> 1 : Apprentice
// 4 -> 5 : Guru
// 6 -> 7 : Master
// 7 -> 8 : Enlightened
// 8 -> 9 : Burned
import {
APPRENTICE,
GURU,
MASTER,
ENLIGHTENED,
BURNED,
} from 'src/common/constants';
export default (current, next) => {
if (current === 0 && next === 1) return APPR... |
#!/usr/bin/env bash
# Script to browserify without Grunt - usually the Grunt build is used to
# browserify and build everything.
# This script assumes that browserify is installed globally. If that is not the
# case, one could also use the command
# node_modules/grunt-browserify/node_modules/browserify/bin/cmd.js
# i... |
git submodule init
git submodule update
cd scripts
sh clean.sh;
sh copyshaders.sh;
sh configure.sh;
sh build.sh;
sh run.sh; |
#!/usr/bin/env bash
#create user for cerere database
mongo -u ${MONGO_INITDB_ROOT_USERNAME} -p ${MONGO_INITDB_ROOT_PASSWORD} --eval "db = db.getSiblingDB('admin'); db.createUser({user:\"cerere\", pwd:\"cerere\", roles:[{ role: \"root\", db: \"admin\" }, {role:\"dbOwner\", db:\"cerere\"}, {role: \"readWrite\", db: \"ce... |
function multiply($x, $y){
$result = $x * $y;
return $result;
} |
<reponame>mr-zwets/cashscript-playground-1<filename>src/components/Header.tsx
import React from 'react'
interface Props {}
const Header: React.FC<Props> = () => {
return (
<header style={{
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
color: 'black',
paddi... |
/*
File: SutConfig.java ; This file is part of Twister.
Version: 3.003
Copyright (C) 2012-2013 , Luxoft
Authors: <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.... |
#include <random>
template <typename T>
class UniformRealDistribution {
public:
UniformRealDistribution(T min, T max) : distribution_(min, max) {
random_engine_.seed(std::random_device()());
}
T generate() {
return distribution_(random_engine_);
}
private:
std::uniform_real_distri... |
package no.helgeby.gamedev.engine;
import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
public class Environment... |
CREATE TABLE `products`
(
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`price` DECIMAL(10,2) NOT NULL,
PRIMARY KEY (`id`)
); |
<gh_stars>1-10
package org.egovframe.rte.fdl.xml.ehcache;
import java.io.File;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Resource;
import org.jdom2.Attribute;
impo... |
# DO NOT INCLUDE SENSITIVE DATA IN THIS FILE!
# E.G. TO STORE SECRETS USE THE _overrides.sh:
# copy _parameters.sh to _overrides.sh
# and modify the _overrides.sh.
# DO NOT COMMIT THE _overrides.sh FILE!
# Should the script execute `az login`? Possible values: YES, NO.
LOGIN="yes"
# Name of a location where to create... |
#!/bin/sh
rm ../src/js_natives.h
python ../tools/js2c.py \
../src/js_natives.h \
../lib/cinder.js \
../lib/path.js \
../lib/util.js \
../lib/module.js \
../lib/fs.js \
../lib/vm.js \
../lib/assert.js \
../lib/timers... |
<reponame>xcorail/OTB
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('angularfire2'), require('firebase/database')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/c... |
<reponame>tliron/knap
package knap
// Kubernetes API group name (must have a ".")
const GroupName = "knap.github.com"
|
import React from "react";
import HomeComapanySearchFilter from "Components/HomeComapanySearchFilter";
import Img from "react-cool-img";
export default function HomepageCompanyJumbotron({
keywords,
searchDataByTitle,
jobSekkerRecentJobsForCompanyAPI,
searchByLocation,
searchByKeyword,
searchByRange,
titl... |
#!/bin/sh
#
# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the F... |
import { Record, List, Map } from 'immutable';
const ModelWorker = new Record({
status: 'ready',
error: null,
duration: 0,
rate: 0,
filename: '',
});
const ModelMetrics = new Record({
bytes_in: { total: 0, mean: 0 },
bytes_out: { total: 0, mean: 0 },
duration: 0,
earliest: '',
end: '',
errors: n... |
// Copyright 2010, 2011 The Apache Software Foundation
//
// 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 React from "react";
import ReactDOM from "react-dom";
import itemSelector from "./shared";
import "./runner.scss";
function getScene(fn) {
fetch("/scene", { credentials: "same-origin", cache: "no-cache" })
.then(response => {
return response.json();
})
.then(
... |
<filename>webfx-kit/webfx-kit-javafxbase-emul/src/main/java/com/sun/javafx/event/BasicEventDispatcher.java
package com.sun.javafx.event;
import javafx.event.Event;
import javafx.event.EventDispatchChain;
import javafx.event.EventDispatcher;
/**
* Event dispatcher which introduces event dispatch phase specific method... |
#!/bin/bash
# This is a simple Oracle database test script that will connect to SID with USERNAME & PASSWORD and time how long a simple query will take.
# The query provided is "select * from dual", but you can put whatever you want here.
SID=""
USERNAME=""
PASSWORD=""
# Source your own oracle environment here:
. /o... |
<gh_stars>1-10
/* GENERATED FILE */
import { html, svg, define } from "hybrids";
const PhWarning = {
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
render: ({ color, size, weight, mirrored }) => html`
<svg
xmlns="http://www.w3.org/2000/svg"
width="${size}"
heigh... |
def countPairs(a, b, c):
count = 0
for x in range(0, c + 1):
for y in range(0, c + 1):
if a * x + b * y == c:
count += 1
return count
a = 2
b = 2
c = 4
print(countPairs(a, b, c)) |
<filename>ruby/spec/ruby/core/enumerator/lazy/shared/select.rb
# -*- encoding: us-ascii -*-
require File.expand_path('../../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/classes', __FILE__)
describe :enumerator_lazy_select, shared: true do
before :each do
@yieldsmixed = EnumeratorLaz... |
<gh_stars>0
export {decodeXML} from "https://raw.githubusercontent.com/DenoBRComunitty/entities/master/mod.ts"
export {assertEquals} from "https://deno.land/std/testing/asserts.ts"; |
package config
import (
"fmt"
"testing"
"github.com/xuperchain/xupercore/kernel/mock"
)
func TestLoadP2PConf(t *testing.T) {
cfg, err := LoadP2PConf(mock.GetNetConfPathForTest())
if err != nil {
t.Fatal(err)
}
fmt.Println(cfg)
}
|
package main.methodAbstractNowDefault;
public interface IMethodAbstractNowDefaultSub extends IMethodAbstractNowDefault {
}
|
export const ROOT_PATH = 'http://52.51.111.248:3000'
export const BASE_URL = `${ROOT_PATH}/api/v1`
export const USER = `${BASE_URL}/user`
export const USER_CARD = `${BASE_URL}/user/card`
export const JOIN_REQUEST = `${USER}/join-request`
export const CHANGE_PASSWORD = `${<PASSWORD>`
export const REGISTRATION = `... |
<filename>src/html/buildFakeMarkup.js
import generateTagByKey from './generateTagByKey';
/**
* Build markup from template and replace data with placeholders (tokens).
*
* @memberOf module:html
* @name buildFakeMarkup
* @param {Set.<string>} tokens - Set of tokens used for replacing of real data passed to markup.
... |
package org.rs2server.rs2.util;
/**
* A simple class used to benchmark time.
*
* @author <NAME>
*/
public class Benchmark {
/** The start time. */
private long startTime;
private long duration = 0;
/**
* Starts the benchmark.
*/
public void start() {
startTime = System.currentTimeMillis();
... |
import React, { Component, } from 'react';
import { Link, withRouter, } from 'react-router-dom';
import { Item, ListWrapper, MoreB, None, } from './style';
import { Wrapper, } from '../../style';
class List extends Component {
constructor(props) {
super(props);
this.state = {
'list': [],
'page':... |
<gh_stars>1-10
package de.ids_mannheim.korap.web.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.text.ParseException;
import java.ut... |
cargo build --release --target arm-none-eabi
arm-none-eabi-as -o obj/init.o src/init.s
arm-none-eabi-ld --gc-sections -O -nostdlib obj/init.o -L target/arm-none-eabi/release -l kernel -s -L /usr/lib/gcc/arm-none-eabi/5.2.1/armv6-m -lgcc -o elf/kernel.elf -T strontium.ld &&
arm-none-eabi-objcopy elf/kernel.elf -O bina... |
"""
Implement a function that finds the coordinates of a given point in a Triangle
"""
# This function finds the coordinates of a point P in a triangle ABC
def find_point_in_triangle(A, B, C, P):
# Find the area of the triangle ABC
area_ABC = abs(A[0]*(B[1] - C[1]) + B[0]*(C[1] - A[1]) + C[0]*(A[1] - B[1]))/2
... |
#!/bin/bash
cd /usr/local/bin/enopush/
java -jar EnoPush.jar & |
def second_min(arr):
# Check for cases when array contains
# less than two elements
if len(arr) < 2:
print("Second minimum element doesnot exist")
return
# Initialize two minimum variables
min1 = min2 = float('inf')
# Iterate over given array
for x in arr:
... |
#!/bin/bash
export LIBGL_DEBUG=verbose
#export LIBGL_ALWAYS_INDIRECT="1"
#export LIBGL_ALWAYS_SOFTWARE="1"
#LIBGL_SHOW_FPS
SELFDIR=`dirname "$0"`
SELFDIR=`cd "$SELFDIR" && pwd`
# cd "$SELFDIR"
glxgears -fullscreen -info >> /tmp/bm_glxgears.log 2>&1
### The following 2 tests fail under VirtualBox with G... |
package com.imooc.scala.stream.transformation
import java.{lang, util}
import org.apache.flink.streaming.api.collector.selector.OutputSelector
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
/**
* 根据规则把一个数据流切分为多个数据流
* 注意:split只能分一次流,切分出来的流不能继续切分
* split需要和select配合使用,选择切分后的流
* 应用场景:将一份数据流切分... |
package string_handle;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author minchoba
* 백준 5361번: 전투 드로이드 가격
*
* @see https://www.acmicpc.net/problem/5361/
*
*/
public class Boj5361{
private static final char NEW_LINE = '\n';
private static ... |
<gh_stars>1-10
function repeatedString(s, n) {
let base = Math.ceil(n / s.length);
s = s.split('');
let repeat = s.length * base;
let subtract = n - repeat;
let found = s.filter((x) => x == 'a'); // a's found in s argument
let total = found.length * base; // total a's found overall with overflow
let remove = s.... |
module.exports = function(grunt) {
'use strict'
var s3 = require('s3');
var fs = require('fs');
var ProgressBar = require('progressbar').ProgressBar;
grunt.registerTask('release-windows-distributable', 'Releases the distributable for Windows', function() {
var buildOptions, done;
buildOptions = gru... |
#!/bin/bash -eu
#
# Copyright 2018 The Outline 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 la... |
<filename>__tests__/util/md5.js
/* global expect:false, test:false */
const md5 = require("../../src/util/md5");
test("it can generate md5 hash", () => {
const hash = md5("foo");
expect(hash).toBe("acbd18db4cc2f85cedef654fccc4a4d8");
});
|
#!/usr/bin/env bash
# Uploads a new version of d8 CIPD package
set -e
set -x
if [ -z "$1" ]; then
echo "Usage: update.sh version"
exit 1
fi
version=$1
major=$(echo "$version" | cut -d'.' -f1)
minor=$(echo "$version" | cut -d'.' -f2)
patch=$(echo "$version" | cut -d'.' -f3)
tmpdir=$(mktemp -d)
cleanup() {
rm -r... |
import https from 'https';
import download from 'download';
/**
* Downloads a json file from github. Parses the json and return the template url corresponding to @param name. If key is not found in object, the default template is returned.
* The advantage is we don't have to host and maintain a separate backend. The... |
# Import necessary libraries
import pandas as pd
# define dataset
data = pd.read_csv('dataset.csv')
# Generate a report
report = pd.DataFrame(data.describe())
print(report) |
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation 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:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... |
// @Author : Lik
// @Time : 2020/10/19
package main
import (
"encoding/json"
"flag"
"log"
"time"
)
type ZyBaseRequest struct {
AppId string `json:"appId"`
Data interface{} `json:"data"`
Timestamp string `json:"timestamp"`
Sign string `json:"sign"`
Source string
}
const (
... |
def get_combinations(arr):
combinations = []
for i in range(len(arr) + 1):
for j in range(i + 1, len(arr) + 1):
for k in range(j + 1, len(arr)+1):
combinations.append(arr[i:j] + arr[j:k])
return combinations
result = get_combinations([1, 2, 3])
print(result) |
/**
* Module dependencies.
*/
// commented out by npm-component: var query = require('tower-query');
// commented out by npm-component: var each = require('part-async-series');
/**
* Save and invoke `fn(err)`.
*
* Events:
*
* - `save` on updates and saves
* - `saving` pre-update or save, after validation
... |
def AverageArray(arr):
sum = 0
for data in arr:
sum += data
return sum/len(arr)
# Driver Code
arr = [1, 2, 3, 4, 5]
print(AverageArray(arr)) |
function generateHeadline(faker) {
const headline = `Loadflux: ${faker.lorem.sentence(5)} @ ${new Date().toLocaleString()} - updated`;
return headline;
} |
#!/bin/bash
set -ex
if test ! -s osu018_stdcells.lib; then
wget --continue -O osu018_stdcells.lib.part http://vlsiarch.ecen.okstate.edu/flows/MOSIS_SCMOS/`
`latest/cadence/lib/tsmc018/signalstorm/osu018_stdcells.lib
mv osu018_stdcells.lib.part osu018_stdcells.lib
fi
yosys -p 'synth -top picorv32; dfflibmap -libert... |
alias reload!='. ~/.zshrc'
alias emacs='/usr/local/bin/emacs'
alias emacsclient='/usr/local/bin/emacsclient'
|
def slice(operation_name, array, axes, start, end):
if operation_name == "slice_1d" and len(axes) == 1:
axis = axes[0]
sliced_array = array[start[axis]:end[axis]]
return sliced_array
else:
raise ValueError("Unsupported operation or invalid number of axes for slicing.") |
package br.com.guestcontrol.server.core.crud;
import java.io.Serializable;
import java.util.List;
public interface CrudService<T, ID extends Serializable> {
List<T> findAll();
T findById(ID id);
T save(T entity) throws Exception;
void delete(ID id);
void delete(T entity);
}
|
<reponame>Urtzik/frontend<filename>src/panels/config/core/ha-config-network.ts
import "@material/mwc-button/mwc-button";
import {
css,
CSSResultGroup,
html,
LitElement,
PropertyValues,
TemplateResult,
} from "lit";
import { customElement, property, state } from "lit/decorators";
import { isComponentLoaded }... |
package org.telegram.telegrambots.api.methods.send;
import java.io.File;
import java.io.InputStream;
import javax.ws.rs.Path;
import org.telegram.telegrambots.api.objects.replykeyboard.ReplyKeyboard;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import l... |
def sortAsc(arr):
for i in range(0, len(arr)-1):
# Find the minimum element in remaining
# unsorted array
min_idx = i
for j in range(i+1, len(arr)):
if arr[min_idx] > arr[j]:
min_idx = j
# Swap the found minimum eleme... |
#! /usr/bin/env bash
set -e
if [ $# -ne 2 ]; then
echo "usage: $0 <external repo path> <file to store commit in>"
exit 1
fi
repo_dir=$1
hash_file=$2
repo_base=$(basename $repo_dir)
file_base=$(basename $hash_file)
if [ ! -d "$repo_dir" ]; then
echo "External repo does not exist: $repo_dir"
exit 1
f... |
#!/bin/bash
mkdir build
cd build
## because qmake.
ln -s ${CXX} ${PREFIX}/bin/g++ || true
ln -s ${CXX} ${PREFIX}/bin/gcc || true
qmake \
PREFIX=$PREFIX \
QMAKE_CC=${CC} \
QMAKE_CXX=${CXX} \
QMAKE_LINK=${CXX} \
QMAKE_RANLIB=${RANLIB} \
QMAKE_OBJDUMP=${OBJDUMP} \
QMAKE_STRIP=${STRIP} \
... |
<reponame>chronicweirdo/reader
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// COMIC ↓
class Comic {
constructor(id, title, size) {
this.id = id
this.title = title
this.size = size
this.lastPageChange = Date.now()
... |
<reponame>insufficientchocolate/diplomat
package data
type SimpleConfiguration struct {
Preprocessors []Preprocessor `navigate:"preprocessors"`
Outputs []Output `navigate:"outputs"`
}
func (s SimpleConfiguration) GetPreprocessors() []Preprocessor {
return s.Preprocessors
}
func (s SimpleConfiguration) GetOu... |
export { default as CategoryPostCard } from './CategoryPostCard';
export { default as CategoryPostsSearch } from './CategoryPostsSearch';
export { default as CategoryPostsSort } from './CategoryPostsSort';
|
#!/bin/bash
#SBATCH --job-name=ppta_ptmcmc_ms_dip_cpl_fixslope_set_3_1_ephem_0
#SBATCH --output=/fred/oz002/bgoncharov/correlated_noise_logs/ppta_ptmcmc_ms_dip_cpl_fixslope_set_3_1_ephem_0_%A_%a.out
#SBATCH --ntasks=4
#SBATCH --time=2-0
#SBATCH --mem-per-cpu=2G
#SBATCH --tmp=4G
#SBATCH --array=0
pyv="$(python -c 'impo... |
<filename>blackboxopt/evaluation.py<gh_stars>1-10
# Copyright (c) 2020 - for information on the respective copyright owner
# see the NOTICE file and/or the repository https://github.com/boschresearch/blackboxopt
#
# SPDX-License-Identifier: Apache-2.0
import json
from copy import deepcopy
from dataclasses import asdic... |
#!/bin/bash
dieharder -d 4 -g 17 -S 814581641
|
<reponame>ch1huizong/learning<filename>lang/py/cookbook/v2/source/cb2_9_6_sol_1.py
import candygram as cg
class ExampleThread(object):
"""A thread-class with just a single counter value and a stop flag."""
def __init__(self):
""" Initialize the counter to 0, the running-flag to True. """
self.va... |
sc_web_path=../../sc-web/client
append_line()
{
if grep -Fxq "$3" $1
then
# code if found
echo -en "Link to " $blue"$2"$rst "already exists in " $blue"$1"$rst "\n"
else
# code if not found
echo -en "Append '" $green"$2"$rst "' -> " $green"$1"$rst "\n"
echo $3 >> $1
... |
<filename>app/dist/js/enums/dias-da-semana.js<gh_stars>0
export var DiasDaSemana;
(function (DiasDaSemana) {
DiasDaSemana[DiasDaSemana["DOMINGO"] = 0] = "DOMINGO";
DiasDaSemana[DiasDaSemana["SEGUNDA"] = 1] = "SEGUNDA";
DiasDaSemana[DiasDaSemana["TERCA"] = 2] = "TERCA";
DiasDaSemana[DiasDaSemana["QUARTA"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.