text stringlengths 1 1.05M |
|---|
#! /bin/bash
# Copyright 2016 Vimal Manohar
# Apache 2.0.
cmd=run.pl
nj=4
frame_shift=0.01
frame_overlap=0.015
. utils/parse_options.sh
if [ $# -ne 1 ]; then
echo "This script writes a file utt2num_frames with the "
echo "number of frames in each utterance as measured based on the "
echo "duration of the ut... |
<filename>server/models/user/index.js
const getUser = require('./getUser')
const updateUser = require('./updateUser')
const updatePassword = require('./updatePassword')
const updateProfileImage = require('./updateProfileImage')
module.exports = {
getUser,
updateUser,
updatePassword,
updateProfileImage,
}
|
/*
* Copyright (C) 2012 Sony Mobile Communications AB
*
* This file is part of ApkAnalyser.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LIC... |
<reponame>houwenbiao/BaseProject<filename>utils/src/main/java/com/qtimes/utils/android/NullUtil.java<gh_stars>0
package com.qtimes.utils.android;
import android.text.TextUtils;
import android.util.Log;
import com.qtimes.utils.BuildConfig;
/**
* 专门检测是否为空的util
* 检测到Null会在log中打印出来,并提示相应的行数
* 请及时解决。
* author: liuta... |
gunicorn -w 4 -b 172.19.189.121:5003 --access-logfile ./logs/log magnet:app
|
<filename>examples/dsg-ssr/src/pages/index.js
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
const Index = () => (
<Layout>
<header>
<h1>Examples</h1>
<p>
For the examples explanation, take a look at{" "}
<a href="https://github.com/K... |
#!/usr/bin/env bash
python3 -m pip install --upgrade setuptools wheel
python3 setup.py sdist bdist_wheel
python3 -m pip install --upgrade twine
twine upload dist/*
|
#!/bin/bash
#Zalo ai challenge complete training run
#check data availablity and get if required
python3 utils/get_data.py --data=./data --data_src=https://dl.challenge.zalo.ai/landmark/train_val2018.zip
#train
python3 finetune.py --data=./data/TrainVal/ --mode=train_then_finetune --net=nasnetmobile --dense_layers=1 --... |
# frontend from terminal
function frontend() {
# get the open command
local open_cmd
if [[ $(uname -s) == 'Darwin' ]]; then
open_cmd='open'
else
open_cmd='xdg-open'
fi
# no keyword provided, simply show how call methods
if [[ $# -le 1 ]]; then
echo "Please provide a search-content and a sea... |
#!/bin/sh
make -C /Users/lbajo/ros2_mod_ws/build/trajectory_msgs -f /Users/lbajo/ros2_mod_ws/build/trajectory_msgs/CMakeScripts/trajectory_msgs__rosidl_typesupport_introspection_cpp_cmakeRulesBuildPhase.make$CONFIGURATION all
|
<filename>src/utils/index.ts<gh_stars>0
export { default as runNetworkQuery } from './networkQueryRunner';
|
<gh_stars>1-10
from xml.dom.minidom import parseString
from . import TestReader
from reader.importer.Perseus import PerseusTextImporter
from reader.utils.work_helpers import get_work_page_info
from reader.models import WorkAlias
class TestWorkHelpers(TestReader):
def setUp(self):
self.importer = Perse... |
<reponame>m-wrona/hevicado
'use strict';
describe('calendar-base-spec:', function () {
//prepare module for testing
beforeEach(angular.mock.module('chronos'));
describe('CalendarCtrl-spec:', function () {
var ctrlScope;
var mockCalendarService, mockUsersService;
var mockUiNotific... |
#!/bin/bash
./build.sh && \
./push.sh && \
./deploy.sh
|
package ddbt.lib.store
import scala.reflect._
import ddbt.Utils.ind
import scala.collection.mutable.HashMap
class Container[E<:Entry]()(implicit cE:ClassTag[E])
|
func testExample() {
// Test case 1: Factorial of 0 should be 1
XCTAssertEqual(factorial(0), 1, "Factorial of 0 should be 1")
// Test case 2: Factorial of 1 should be 1
XCTAssertEqual(factorial(1), 1, "Factorial of 1 should be 1")
// Test case 3: Factorial of 5 should be 120
XCTAssertE... |
<reponame>Olalaye/MegEngine
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "A... |
<filename>src/patches/gooseupdate.js
import { join } from 'path';
import Inquirer from 'inquirer';
import replaceInFile from '../lib/replaceInFile.js';
export default async ({ asarExtractPath }) => {
let { branch } = await Inquirer.prompt([
{
type: 'checkbox',
name: 'branch',
message: 'Goos... |
def search_elem(my_list1, my_list2, elem):
for list in [my_list1, my_list2]:
found = False
for val in list:
if val == elem:
found = True
break
if found:
return True
return False
found = search_elem(my_list1, my_list2, elem)
print(f... |
#include "File.h"
#include "../Container/AsciiString.h"
#include "../OSDefine.h"
#include <cassert>
#include <cstdlib>
#include <cstdio>
#include <cwchar>
#if defined(OSUnix)
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <libgen.h>
#define FileRemoveA remove
#define FileRemoveW(string) remo... |
package edu.unitn.pbam.androidproject.model.dao;
import android.database.Cursor;
import edu.unitn.pbam.androidproject.model.DList;
import edu.unitn.pbam.androidproject.model.DList.Type;
public interface DListDao extends ModelDao<DList> {
public Cursor getByType(Type t);
}
|
<gh_stars>1-10
/**
* Copyright 2020 The AMP HTML 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
*
*... |
#!/bin/bash
function DecryptString() {
echo "${1}" | /usr/bin/openssl enc -aes256 -d -a -A -S "${2}" -k "${3}"
}
EncryptedString="U2FsdGVkX1+1nTgI0CtcIWeucYoiUzsRzEiQKmbBKDQ="
Salt="b59d3808d02b5c21"
Passphrase="21899c3d8247dce72ad190d9"
jamfpro_username="jamfproadmin"
jamfpro_password=$(DecryptString "${EncryptedSt... |
#!/bin/bash
# The arguments that are passed by Jenkins system
TEST_ARG=""
JDK_VERSION="8"
TASK_NAME=""
LOG_LEVEL=""
BRANCH="default"
JEREPO=""
JEREVISION=0
JEREVISIONARG=""
HGPATH=""
PRE=""
# Jenkins VM and Test VM
JENKINSVMIP="slc04ark"
JENKINSVMUSERNAME="jenkins"
JENKINSVM="${JENKINSVMUSERNAME}@${JENKINSVMIP}"
TEST... |
import { meta, route, val } from "plumier"
export class User {
/**
* Property need to have at least one decorator for type conversion to work
* use @meta.property() for that
*/
@meta.property()
email: string
@meta.property()
name: string
/**
* Data type array need to spec... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the Apache Licens... |
import { ISerialisable } from '../../serialisation/interfaces/ISerialisable';
export interface IValidatable extends ISerialisable {
readonly isValid: boolean;
readonly errorMessages: string[];
validate(): Promise<boolean>;
}
|
python /scratch/sz2257/sgan/scripts/train_basketball_teampos.py \
--dataset_name '01.04.2016.TOR.at.CLE-partial' \
--dataset_dir /scratch/sz2257/basketball-partial \
--delim tab \
--d_type 'local' \
--pred_len 8 \
--encoder_h_dim_g 32 \
--encoder_h_dim_d 64 \
--decoder_h_dim 32 \
--embedding_dim 16 \... |
#!/bin/bash
set -x
REMOTE=$1
PR_HEAD_SHA=$2
PR_BASE_SHA=$3
git init .
git config remote.origin.url $REMOTE
git fetch --tags --progress $REMOTE +refs/heads/*:refs/remotes/origin/*
git checkout --force "${3}"
git merge ${2}
git submodule update --init --recursive --jobs=6
|
import jwt from "jsonwebtoken";
import jwkToPem from "jwk-to-pem";
import fetch from "node-fetch";
import util from "util";
import { SecurityContext, SecurityIdentity } from "@webiny/api-security/types";
import Error from "@webiny/error";
import { ContextPlugin } from "@webiny/handler/plugins/ContextPlugin";
const veri... |
SELECT AVG(Salary)
FROM Employees
WHERE Department = 'Marketing' |
<reponame>3Xpl0it3r/loki-operator<gh_stars>1-10
package loki_test
import (
crfakeclients "github.com/l0calh0st/loki-operator/pkg/client/clientset/versioned/fake"
crinformers "github.com/l0calh0st/loki-operator/pkg/client/informers/externalversions"
"github.com/l0calh0st/loki-operator/pkg/controller"
"github.com/l0... |
import React from 'react';
import { WhatWeDoStyle, RotatedText, Hr, MainContent, RotatedTextContainer, WhatWeDoContainerStyle } from './WhatWeDo.style';
import { PrimaryText, PrimaryBriefText } from 'sections/LandingScreenSection/LandingScreenSection.style';
import ArrowIcon from 'components/ArrowIcon/ArrowIcon';
impor... |
#include "headers/drawIssue.h"
void prepareWindow()
{
SDL_RenderClear(gameTools.renderer);
if(!state.endGame)
loadBackground();
}
void presentWindow()
{
SDL_RenderPresent(gameTools.renderer);
}
void blit(SDL_Texture *texture, int xPos, int yPos , int w , int h)
{
SDL_Rect dest;
dest.x... |
package com.netcracker.ncstore.controller;
import com.netcracker.ncstore.dto.request.OrderGetRequest;
import com.netcracker.ncstore.dto.request.OrderInfoGetRequest;
import com.netcracker.ncstore.dto.response.OrderGetResponse;
import com.netcracker.ncstore.dto.response.OrderInfoResponse;
import com.netcracker.ncstore.s... |
<gh_stars>1-10
package mindustry.world.meta.values;
import arc.scene.ui.layout.Table;
import arc.util.Strings;
import mindustry.world.meta.StatValue;
public class StringValue implements StatValue{
private final String value;
public StringValue(String value, Object... args){
this.value = Strings.forma... |
# This shell script executes Slurm jobs for thresholding
# predictions of convolutional
# neural network with adaptive threshold on BirdVox-70k full audio
# with logmelspec input.
# Augmentation kind: all.
# Test unit: unit05.
# Trial ID: 9.
sbatch 045_aug-all_test-unit05_predict-unit05_trial-9.sbatch
sbatch 045_aug-a... |
<reponame>xfyre/tapestry-5<gh_stars>0
// 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... |
<filename>runescape-api/src/main/java/net/runelite/rs/api/RSObjectComposition.java
package net.runelite.rs.api;
import net.runelite.api.ObjectComposition;
import net.runelite.mapping.Import;
public interface RSObjectComposition extends ObjectComposition
{
@Import("id")
@Override
int getId();
@Import("name")
@Ov... |
class ApplicationController < ActionController::Base
protect_from_forgery
respond_to :html
end
|
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ContentController extends Controller
{
public function showOffer(){
return view('Frontend.Layouts.User.offerFront');
}
public function showBlog1(){
return view('Frontend.Layouts.User.offerBlog1');
}
public ... |
<filename>allrichstore/Tools/QBClass/QBViewClass/CustomCell/IconAndTitleCell.h
//
// IconAndTitleCell.h
// MeiYiQuan
//
// Created by 任强宾 on 16/10/5.
// Copyright © 2016年 任强宾. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface IconAndTitleCell : UITableViewCell
- (void)configCellIconName:(NSString *)icon... |
#!/bin/sh
# quit on errors:
set -o errexit
# quit on unbound symbols:
set -o nounset
DIR=`dirname "$0"`
cd $DIR
export FLASK_APP=app.py
# Create the database
flask db init
flask db create
flask fixtures loans
|
if [ ! -d /usr/local/app/tars/app_log ]; then
mkdir -p /data/log/tars
mkdir -p /usr/local/app/tars
mkdir -p /data/tars/app_log
ln -s /data/tars/app_log /usr/local/app/tars/app_log
fi
if [ ! -d /usr/local/app/tars/remote_app_log ]; then
mkdir -p /data/tars/remote_app_log
ln -s /data/tars/remote... |
import React, { FC, useState } from 'react';
import { AiOutlineClose, FiCircle } from 'react-icons/all';
import { Board } from '../../components';
import UseGameState from '../useGameState';
import {
Container,
ContainerPlay,
ContainerTitle,
TitleMain,
ContainerRocket,
ContainerFields,
Co... |
package test.bootstrap.boot;
import org.junit.Test;
import com.wpisen.trace.agent.bootstrap.DevelopBootMain;
import java.lang.instrument.Instrumentation;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.io.File;
public class DevelopBootMainTest ... |
<reponame>mariokyprianou/React-Native
/*
* Jira Ticket:
* Created Date: Tue, 27th Apr 2021, 08:35:32 am
* Author: <NAME>
* Email: <EMAIL>
* Copyright (c) 2021 The Distance
*/
import React from 'react';
import {View} from 'react-native';
import {ScaleHook} from 'react-native-design-to-component';
import useTheme ... |
<gh_stars>0
count = 3
# Case with booleans
case
when count == 0
puts "nobody"
when count ==1
puts "1 person"
when (2..5).include?(count)
puts "several people"
else
puts "many people"
end
# Case with comparisons
case count
when 0
puts "nobody"
when 1
puts "1 person"
when 2..5
puts "several people"
else
... |
<reponame>sackio/fstk
'use strict';
var FSTK = require('../lib/fstk.js')
, Belt = require('jsbelt')
, FS = require('fs')
, OS = require('os')
, Path = require('path')
, Async = require('async')
, _ = require('underscore')
, Child_Process = require('child_process')
, Winston = require('winston')
;
var ... |
// Code generated by ogen, DO NOT EDIT.
package api
import (
"bytes"
"context"
"fmt"
"io"
"math"
"math/bits"
"net"
"net/http"
"net/url"
"regexp"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/go-faster/errors"
"github.com/go-faster/jx"
"github.com/google/uuid"
"github.com/ogen-go/ogen/conv"
... |
# 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
if [[ $OS == 'LINUX' ]]
then
alias pbcopy='xsel --cl... |
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
function check_err() {
if [ $1 -ne 0 ]; then
echo -e "${RED}=========\nFailed\n=========${NC}"
exit 1;
fi
echo -e "${GREEN}===========\nSuccess!!!\n===========${NC}"
}
echo "Installing MongoDB"
echo "Step 1. Add repo"
sudo apt-key adv --keyserver hkp:... |
"""
Parse the following html string and print the text between the h3 tags.
"""
import bs4
html_string = "<h3>This is an example</h3><p>This is some text</p>"
soup = bs4.BeautifulSoup(html_string, 'html.parser')
h3_tag = soup.find('h3')
if h3_tag:
print(h3_tag.text) |
package uk.gov.companieshouse.ocrapiconsumer.request;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import uk.gov.companieshouse.logging.Logger;
import... |
function countOccurrences(arr) {
let count = {};
arr.forEach(num => {
if (count[num]) {
count[num]++;
} else {
count[num] = 1;
}
});
return count;
} |
package Controller;
import Model.Computer;
import Model.FileDownload;
import Model.FileSeed;
import Model.FileShare;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import org.apache.commons.codec.digest.DigestUtils;
import util.Constant;
import java.io.File;
import java.io.RandomAccessFile;
impo... |
import sqlite3
from sqlite3 import Error
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
def create_new_db(db_file):
""" create a database connection to an SQLite database """
conn=None
try:
conn=sqlite3.connect(db_file)
print(sqlite3.version)
except Excepti... |
<filename>MyNotesApp/app/src/main/java/com/ramusthastudio/mynotesapp/MainActivity.java
package com.ramusthastudio.mynotesapp;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.database.Cursor;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.design.widge... |
#!/bin/bash -e
managed_distribs="jessie wheezy centos6 archlinux"
usage() {
echo "$*
usage: $(basename $0) [-d] [-v] [-h] [test1 test2 ...]
or: $(basename $0) -q
-d : activates debug mode
-v : gets verbose (mainly outputs docker outputs)
-q : query the list of managed distributions
... |
sleep 2
sudo supervisorctl restart smart-scripts
sleep 3
sudo chmod 777 /home/config/smart-scripts.sock
sudo service nginx restart
|
using System.Collections.Generic;
using System.Threading.Tasks;
public static class CollectionExtensions
{
public static void RemoveWithLock<T>(this ICollection<T> collection, T item, AsyncReaderWriterLock rwLock)
{
using (rwLock.WriterLock())
{
collection.Remove(item);
}
... |
// Define the OrePricesState enum
const OrePricesState = {
SET: 'set',
NOT_SET: 'not_set'
};
class OrePriceManager {
constructor() {
this.orePricesState = OrePricesState.NOT_SET;
}
setOrePrices(prices) {
if (this.validatePrices(prices)) {
this.orePricesState = OrePricesState.SET;
console... |
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
const Button = styled.div`
align-self: center;
justify-self: flex-end;
amp-social-share {
align-items: center;
background: none;
border: 1px solid var(--c_7);
border-radius: 8px;
box-sizing: b... |
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
rm -rf temp/build_test
mkdir temp/build_test
cmake -S test -B temp/build_test -G Xcode \
-DCMAKE_TOO... |
<reponame>d-ashe/go-scrt-events
package types
import (
b64 "encoding/base64"
"strconv"
"encoding/json"
"github.com/sirupsen/logrus"
)
//WsResponse is used to unmarshall JSONRPC responses
type WsResponse struct {
JSONRPC string `json:"jsonrpc"`
ID int `json:"id"`
RespResult json.RawMessage `json:"result"`
... |
#!/bin/bash
DIR=$1
if [ -z "$1" ]
then
echo "please supply directory where backup resides"
exit 1
fi
echo "***********************************"
echo "* ELYSIAN RESTORE *"
echo "***********************************"
echo ""
echo "Restore database from backup/$DIR"
echo ""
docker-compose exec db ... |
<gh_stars>0
package acceptance.shellMarket;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
@Listeners(ListenersClass.class)
public class DeleteNews extends WebDriverSetting{
@Test
public void t... |
<gh_stars>1-10
const path = require('path')
const webpack = require('webpack')
const StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = {
target: 'webworker',
entry: './src/index.ts',
output: {
filena... |
def minibatches(data, minibatchSize):
x_batch, y_batch = [], []
for i in range(0, len(data), minibatchSize):
batch = data[i:i + minibatchSize]
x_batch.append([item[0] for item in batch]) # Extract input sequences
y_batch.append([item[1] for item in batch]) # Extract labels
return x... |
import React from 'react'
const Page404 = () => {
return(
<main>
404
</main>
)
}
export default Page404 |
<reponame>housnberg/taskana
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SimpleChange } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SharedModule } from 'app/shared/shared.module';
import { PaginationComponent } from './pagination.component';
import... |
#! /bin/bash
echo "branch=$CI_COMMIT_REF_NAME"
dotnet nuget add source "$SDK_NUGETS_URL" -n "M5x SDK Nugets" -u "$LOGATRON_CID_USR" -p "$LOGATRON_CID_PWD" --store-password-in-clear-text
dotnet nuget add source "$LOGATRON_NUGETS_URL" -n "Logatron Nugets" -u "$LOGATRON_CID_USR" -p "$LOGATRON_CID_PWD" --store-password-in... |
<reponame>johnlarusic/lebus<gh_stars>1-10
import lebus
import logging
import threading
import time
import argparse
import os
import sys
import json
DEFAULT_IMG_FILE = "sched.png"
# Import configuration file
with open('lebus_config.json') as f:
data = json.load(f)
p_api_key = data['api_key']
p_refresh_rate = data... |
import platform
from . import client
from . import orm
from . import proxy
VERSION = platform.python_version_tuple()
if VERSION[0] != "3" or VERSION[1] < "6":
raise RuntimeError(f"version {platform.python_version()} < 3.6")
__all__ = [client, orm, proxy]
|
#!/usr/bin/env bash
set -e
set -x
while IFS=, read -r EKSTANSYON_FULL VESYON
do
IFS=.
read -r PUBLISHER EKSTANSYON <<< ${EKSTANSYON_FULL}
n=0
wait_time=1
until [ "$n" -ge 10 ]
do
curl "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${PUBLISHER}/vsextensions/${EKSTANSYON}/${VESY... |
<filename>core/src/main/java/cucumber/runtime/xstream/ComplexTypeWriter.java
package cucumber.runtime.xstream;
import cucumber.runtime.table.CamelCaseStringConverter;
import java.util.ArrayList;
import java.util.List;
import static java.util.Arrays.asList;
public class ComplexTypeWriter extends CellWriter {
pri... |
#!/bin/bash
./configure --prefix=/usr \
--build=$SHED_NATIVE_TARGET \
--disable-static && \
make -j $SHED_NUMJOBS && \
make DESTDIR="$SHED_FAKEROOT" install |
<reponame>jvega190/yoast-plugin
/* External dependencies */
import React, { Component } from "react";
import styled from "styled-components";
import PropTypes from "prop-types";
/* Yoast dependencies */
import { colors } from "../../style-guide";
/* Internal dependencies */
import {
handleImage,
FACEBOOK_IMAGE_SIZE... |
fish_path = '/usr/local/bin/fish'
directory "#{node[:xdg_config_home]}/fish" do
user node[:user]
end
execute "echo #{fish_path} | sudo tee -a /etc/shells" do
not_if "grep #{fish_path} /etc/shells"
end
execute "chsh -s #{fish_path}" do
not_if { `dscl localhost -read Local/Default/Users/#{node[:user]} UserShell`... |
/*
* Copyright (c) 2004-2009, University of Oslo
* 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 ... |
<reponame>xerocross/xerocross.factor<gh_stars>0
import Vue from "vue";
import PrimeFactorsWidget from "./components/prime-factors-widget.vue";
const myWorker = new Worker("/js/get-factor-worker.js");
new Vue({
el : "#factor-primes",
components : {
PrimeFactorsWidget
},
render : function (creat... |
public void addLootModifier(Entity internal, String name, String weapon, boolean matchDamage) {
internal.addLootModifier(name, (entity, source, damageSource) -> {
if (source instanceof PlayerEntity) {
ItemStack weaponStack = ((PlayerEntity) source).getMainHandStack();
if (weaponStack... |
#! /bin/bash
#SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res_run2/run_rexi_fd_par_m0512_t001_n0128_r1820_a1.txt
###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_... |
#!/bin/bash
mkdir build
cd build
cmake -Wno-dev -GXcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-DPNG_ARM_NEON_OPT=0 -std=c++11" -DCMAKE_C_FLAGS="-DPNG_ARM_NEON_OPT=0" -DCMAKE_CXX_COMPILER_WORKS=1 -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_THREAD_LIBS_INIT="-lpthread" -DCMAKE_USE_PTHREADS_INIT=1 -DCMAKE_OSX_ARCHITECTURES... |
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { DeleteResult, Repository, UpdateResult } from 'typeorm';
import { Category } from './category.entity';
@Injectable()
export class CategoryService {
constructor(
@InjectRepository(Category)
private reado... |
#!/bin/bash
set -eo pipefail
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
serverImage="$1"
# Use a client image with curl for testing
clientImage='buildpack-deps:buster-curl'
# ensure the clientImage is ready and available
if ! docker image inspect "$clientImage" &> /dev/null; then
docker pull "$clientImage" > ... |
#!/bin/bash
# Description: It contains methods to change file modes or Access Control Lists of files.
# Author: Luciano Sampaio
# Date: 20-Dec-2020
getCurrentFileMode() {
stat -f %A $1
}
changeFileMode() {
#$1 - Options
#$2 - New Mode
#$3 - Path
currentMode=$(getCurrentFileMode $3)
if [ $... |
from enum import Enum
import math
class Metric(Enum):
EUCLIDEAN = 0
MANHATTAN = 1
HAMMING = 2
L2 = 3
class DistanceCalculator:
def __init__(self, metric):
self.metric = metric
def calculate_distance(self, point1, point2):
x1, y1 = point1
x2, y2 = point2
if sel... |
/*******************************************************************************
* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to d... |
export PATH=$PATH:/opt/intelFPGA_pro/20.2/modelsim_ase/linuxaloem/
cd ../bin
rm -rf msim
make XLEN=64 SIM=vivado
|
/**
* Created by msi on 19/07/2017.
*/
import Router from 'express'
let router = Router()
const db = require('../pgp')
const blog = require('../model/blog')
router.get('/get-cate-sidebar', (req, res, next) => {
blog
.selectCate()
.then(data => {
res.status(200).json(data)
})
.catch(error => ... |
7z x Bosphorus_1920x1080_120fps_420_8bit_YUV_Y4M.7z
tar -xf rav1e-v0.3.0.tar.gz
cd rav1e-0.3.0
cargo build --bin rav1e --release -j $NUM_CPU_PHYSICAL_CORES
echo $? > ~/install-exit-status
cd ~
echo "#!/bin/sh
cd rav1e-0.3.0
./target/release/rav1e ../Bosphorus_1920x1080_120fps_420_8bit_YUV.y4m --threads \$NUM_CPU_CORES... |
#!/bin/bash
# Helper library for other bash-based tests.
set -e
banner() {
echo
echo "# $1"
}
fail() {
echo "$1" >&2
exit 1
}
dfm() {
echo "\$ dfm" "$@"
command dfm "$@"
}
|
ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Blogger.run({
"source" => "blog-11-22-2015.xml",
"no-blogger-info" => true, # not to leave blogger-URL info (id and old URL) in the front matter
"replace-internal-link" => true, # replace internal links using the post_url li... |
#!/bin/bash
# Run https://github.com/huggingface/transformers/blob/master/examples/tensorflow/language-modeling/run_clm.py on CSC puhti
#SBATCH --account=project_2004600
#SBATCH --partition=gputest
#SBATCH --time=00:15:00
#SBATCH --mem=64G
#SBATCH --nodes=2
#SBATCH --gres=gpu:v100:4
#SBATCH --output=logs/%j.out
#SBAT... |
const taskUpgrade = require('task.Upgrade')
const taskHarvest = require('task.Harvest')
const taskTransfer = require('task.Transfer')
const taskPickup = require('task.Pickup')
const taskBuild = require('task.Build')
const taskRepair = require('task.Repair')
const taskTravel = require('task.Travel')
const taskDefend = r... |
package me_wedding.repository;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import me_wedding.model.Transaction;
import me_wedding.repository... |
import { Observable, throwError, timer } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { RetryStrategyConfig } from '../model';
import { Logger } from '../util';
export const retryStrategy$ = (cfg: RetryStrategyConfig) => (attempts: Observable<any>) => {
return attempts.pipe(
mergeMap((error, i)... |
import mock
import time
from shakenfist.constants import GiB
from shakenfist import exceptions
from shakenfist import scheduler
from shakenfist.tests import base
from shakenfist.tests.mock_etcd import MockEtcd
from shakenfist.config import SFConfig
fake_config = SFConfig(
NODE_NAME='node01',
SCHEDULER_CACHE_... |
import * as React from 'react';
import { useRemoteData, WithRemoteData } from 'use-remote-data';
var i = 0;
const freshData = (): Promise<number> =>
new Promise((resolve) => {
i += 1;
setTimeout(() => resolve(i), 1000);
});
export const Component: React.FC = () => {
const [autoRefresh, set... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.