text stringlengths 1 1.05M |
|---|
#!/bin/bash
REPO_ROOT=`git rev-parse --show-toplevel`
pushd $REPO_ROOT
docker build -f docker/ci/Dockerfile -t banano-ci:latest .
popd
|
///<reference path='.\rule.ts' />
///<reference path='.\rulesEngine.ts' />
///<reference path='.\nodes.ts' />
///<reference path='..\compilation\conditionVisitor.ts' />
///<reference path='.\consequences\consequence.ts' />
module Treaty {
export module Rules {
export class RulesEngineBuilder {
... |
<html>
<head>
<title>Random Greeting</title>
</head>
<body>
<script>
let greetings = ["Hello!", "Hi!", "Good morning!", "Good afternoon!", "Good evening!"];
let index = Math.floor(Math.random() * greetings.length);
let greeting = greetings[index];
document.write(greeting);
</script>
</body>
</htm... |
#!/bin/bash
sleep 0.2
feh --bg-fill /home/brandon/.config/images/firefly.png
syndaemon -i 1 -KRd -t
synclient VertScrollDelta=-27 # Reverse synaptics natural scroll
|
echo "=== Acquiring datasets ==="
echo "---"
mkdir -p save
mkdir -p data
cd data
echo "- Downloading WikiText-2 (WT2)"
wget --quiet --continue https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-2-v1.zip
unzip -q wikitext-2-v1.zip
cd wikitext-2
mv wiki.train.tokens train.txt
mv wiki.valid.tokens valid.txt... |
import { writeFileSync } from "fs";
export const outputTestCase = (html: string, testFileDirPath: string) => {
const cheerio = require('cheerio');
const $ = cheerio.load(html);
const testCases = [];
$('pre', '.lang-ja').each((i, element) => {
if (i != 0) testCases.push($(element).text());
})
testCas... |
import {
GET_ERRORS_SIGNUP,
GET_ERRORS_SIGNIN,
} from "../../actions/authActions/types";
const initialState = { errorSignin: "", errorSignup: "" };
export default function (state = initialState, action) {
switch (action.type) {
case GET_ERRORS_SIGNIN:
return { ...state, errorSignin: action.payload };
... |
<gh_stars>0
import {useEffect} from 'react';
import {useRouteMatch, Route, Switch} from 'react-router-dom';
import {useDispatch, useSelector} from 'react-redux';
import {getChatsAction} from '../../store/chats';
import {healthAction} from '../../store/health';
import {Poll} from '../../util/poll';
import {Chats... |
#!/bin/bash
# Vars and respective defaults
export ACTION=${ACTION:="delete"}
export NAMESPACE=${NAMESPACE:="openshift-etcd"}
export LABEL_SELECTOR=${LABEL_SELECTOR:="''"}
export RUNS=${RUNS:=1}
export DELETE_COUNT=${DELETE_COUNT:=1}
export SLEEP=${SLEEP:=15}
export SCENARIO_TYPE=${SCENARIO_TYPE:=namespace_scenarios}
e... |
<filename>demo-dubbo/dubbo-provider/src/main/java/com/xkcoding/dubbo/provider/info/SpringBootDemoDubboProviderApplication.java
package com.xkcoding.dubbo.provider.info;
import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframewor... |
<gh_stars>1-10
module Chartr
include ActiveSupport
require "chart"
Dir["#{File.dirname(__FILE__)}/charts/**"].map do |chart|
require chart if chart =~ /.*?_chart.rb$/
end
end
|
package com.honyum.elevatorMan.net;
import com.honyum.elevatorMan.data.ContartInfo;
import com.honyum.elevatorMan.data.SignInfo;
import com.honyum.elevatorMan.net.base.Response;
import java.util.List;
public class SignInfoResponse extends Response {
public List<SignInfo> getBody() {
return body;
}
public void... |
package com.epul.oeuvre.domains;
import javax.persistence.*;
import java.util.Collection;
import java.util.Objects;
@Entity
@Table(name = "oeuvrevente", schema = "baseoeuvre", catalog = "")
public class EntityOeuvrevente {
private Integer idOeuvrevente;
private String titreOeuvrevente;
private String etat... |
<filename>vi/.vim/bundle/pencil/app/pencil-core/common/collectionSettingEditor.js
function CollectionSettingEditor(collection) {
this.collection = collection;
var definedGroups = collection.propertyGroups;
this.properties = {};
var strippedGroups = [];
for (var i in definedGroups) {
var g... |
<!DOCTYPE html>
<html>
<head>
<title>Form Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(function() {
$('#submitForm').click(function() {
var data = {
'name': $('#name').val(),
'email': $('#email').val(),
};
$.ajax({
... |
/* ElementPool.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 2.00
//
// Tag: Fundamental Mini
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//... |
#!/bin/bash
python train.py --gpu-id -1 \
--loss Proxy_Anchor \
--model googlenet_cgd \
--embedding-size 1024 \
--batch-size 120 \
--lr 1e-4 \
--dataset cub \
--warm 5 \
--bn-freeze 1 \
... |
<reponame>raulrozza/Gametask_Mobile<filename>src/modules/chooseGame/view/components/GameImage/index.tsx
import React from 'react';
import { Image, ImageStyle, StyleProp } from 'react-native';
interface GameImageProps {
url?: string;
style?: StyleProp<ImageStyle>;
}
const GameImage: React.FC<GameImageProps> = ({ u... |
<gh_stars>0
package com.twu.Actions;
import com.twu.Helpers.InputReader;
import com.twu.Helpers.Messages;
import com.twu.Helpers.Printer;
import com.twu.biblioteca.BibliotecaManager;
public class MovieCheckOut extends Command {
public MovieCheckOut(String name, Integer id, Printer printer, InputReader inputRead... |
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if ! which go > /dev/null; then
echo "golang needs to be installed"
exit 1
fi
BIN_DIR="$(pwd)/tmp/_output/bin"
mkdir -p ${BIN_DIR}
PROJECT_NAME="nginx-operator"
REPO_PATH="github.com/tsuru/nginx-operator"
BUILD_PATH="${REPO_PATH}/cmd/${PROJECT_NAME}... |
define(['io'], function(io) {
return function() {
var self = this;
var socket = io();
this.users;
this.send = function(msg) {
socket.emit('msg', msg);
return true;
};
this.getRooms = function() {
return rooms.getD... |
<filename>__tests__/splitwise.test.js
const { OAuth2 } = require('oauth');
const Splitwise = require('../src');
jest.mock('oauth');
describe('Splitwise', () => {
beforeEach(() => {
OAuth2.mockClear();
});
test('creates splitwise compatible parameters', () => {
expect(OAuth2).not.toHaveBeenCalled();
... |
#include <stdio.h>
int isDivisibleBy3(int number) {
while(number > 0) {
if (number < 3) {
return number == 0;
}
int digit = number % 10;
number /= 10;
number = number - 2*digit;
}
return number == 0;
}
int main()
{
int n = 9;
if(isDivisibleBy3(n))
printf("%d is divisibl... |
<filename>gulpfile.js
const gulp = require('gulp'),
tape = require('gulp-tape'),
tap_colorize = require('tap-colorize'),
nodemon = require('gulp-nodemon'),
sequence = require('gulp-sequence');
const rollup = require('rollup'),
buble = require('rollup-plugin-buble'),
commonjs = requi... |
#include <iostream>
#include <cstdlib>
#include <ctime>
int main() {
srand(static_cast<unsigned int>(time(0))); // Seed for random number generation
int randomNumber = (rand() % 100) + 1; // Generate random number between 1 and 100
int guess, attempts = 0;
do {
std::cout << "Enter your guess... |
#!/bin/bash
set -ex
# Source env.sh to read all the vars
source /root/main_env.sh
source /root/env.sh
source /root/common_run.sh
checks
# Substitute config with environment vars defined
envsubst < /root/cerberus/config/cerberus.yaml.template > /root/cerberus/config/config.yaml
# Run cerberus
cd /root/cerberus
pyth... |
def optimize_function(f, learning_rate, iterations):
weights = np.random.rand(f.shape[0])
for _ in range(iterations):
grads = estimate_gradient(f, weights)
weights -= learning_rate * grads
return weights |
#include "EditLexer.h"
#include "EditStyleX.h"
static KEYWORDLIST Keywords_SQL = {{
//++Autogenerated -- start of section automatically generated
"abort abs absent absolute access accessible according account acos action active ada add admin after against aggregate "
"algorithm alias all allocate also alter always "
"... |
const commonPaths = require("./common-paths");
const webpack = require("webpack");
let devConfig = {};
devConfig.prod = require("../dev.env");
const config = {
mode: "development",
output: {
sourceMapFilename: "[name].js.map",
},
devtool: "eval-source-map",
devServer: {
contentBase: commonPaths.outpu... |
#!/usr/bin/env bash
TAG="${TRAVIS_TAG:-${TRAVIS_COMMIT}}"
if [ "${1}" == "install" ]; then
! docker pull viderum/ckan-cloud-operator:latest && echo Failed to pull image && exit 1
! docker pull viderum/ckan-cloud-operator:jnlp-latest && echo Failed to pull jnlp image && exit 1
echo Great Success! && exit 0... |
<reponame>suryanshsoni/iwt<filename>web/config.js
var sohagApp = angular.module('SohagApp',['ngRoute']);
sohagApp.config(function($routeProvider, $locationProvider) {
console.log('in config ');
/*$locationProvider.html5Mode(true);
$locationProvider.hashPrefix("!"); //Support for hasbangs url (SEO)
*/
$routeP... |
/*
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead
Use lookaheads in the pwRegex to match passwords that are greater than
5 characters long, do not begin with numbers, and have two consecutive digits.
(1) Your regex should use two posit... |
<reponame>cnlcnn/wallpaper
package com.example.cnlcnn.utils;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/*
* 项目名: WallPaper
* 创建者: LiChuang
* 创建时间: 2017/5/6
* 描述: 封装扫描本地文件夹中的图片,用于获取下载的图片和添加的本地图片
*/
public class ScanLocalPicture {
//根据自己的需求读取SDCard中的资源图片的路径
private S... |
<reponame>Xianghar/concrete5
/* jshint unused:vars, undef:true, node:true */
module.exports = function(grunt, config, parameters, kind, setSkipped, done) {
var path = require('path'), exec = require('child_process').exec;
var fixPathSeparator;
if (path.sep === '/') {
fixPathSeparator = functio... |
<gh_stars>0
'use strict';
var alphanumericREGEXP = /^[a-zA-Z0-9\s]+$/;
var multiSpaceREGEXP = /\s{2,}/;
var numericREGEXP = /^[0-9]+$/;
app.service('validationService', function() {
var self = this;
/* Required Validation */
this.required = function(x) {
var y;
if (t... |
package org.javers.repository.mongo;
import static org.javers.common.string.Strings.isNonEmpty;
import com.mongodb.client.MongoDatabase;
import org.javers.core.AbstractContainerBuilder;
import org.javers.repository.mongo.pico.JaversMongoModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Mo... |
<filename>AndroidNanoDegreeProjectCapstone/Phase2/app/src/main/java/io/github/marcelbraghetto/dailydeviations/features/application/MainApp.java<gh_stars>0
package io.github.marcelbraghetto.dailydeviations.features.application;
import android.app.Activity;
import android.app.Application;
import android.support.annotati... |
/*
* 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 ... |
<gh_stars>10-100
@org.springframework.lang.NonNullApi
package org.moduliths.moments;
|
/*******************************************************************************
* Copyright 2015 InfinitiesSoft Solutions 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
*
* ... |
<filename>src/SonosPlayer.tsx
import {
BooleanCharacteristic,
Component,
NumberCharacteristic,
PlatformAccessory,
PlatformAccessoryConfiguration,
Service,
useContext,
useHomebridgeApi,
useLogger,
} from "@credding/homebridge-jsx";
import { Categories } from "homebridge";
import { SonosApiContext } fro... |
import { ERowStatus } from '../../typings/enums'
import { IGridRowMeta } from '../../typings/interfaces'
import { IRowOperationFactory } from '../../typings/interfaces/grid-row-operation-factory.interface'
import { GridImplementationFactory } from '../../typings/interfaces/implementations/grid-implementation.factory'
i... |
/**
* The core structure of a QnA item
*/
export interface QnABaseItem {
/**
* Time when the review was first created
*/
createdDate: Date;
/**
* Unique identifier of a QnA item
*/
id: number;
/**
* Get status of item
*/
status: QnAItemStatus;
... |
#pragma once
#include "stdafx.h"
namespace memory
{
static uintptr_t find_signature(const char* module, const char* pattern_, const char* mask) {
const auto compare = [](const uint8_t * data, const uint8_t * pattern, const char* mask_) {
for (; *mask_; ++mask_, ++data, ++pattern)
if (*mask_ == 'x' && *data !... |
import tensorflow as tf
from tensorflow.keras.layers import Dense
# Create the model
model = tf.keras.Sequential([
Dense(128, kernel_initializer='glorot_normal', activation='relu'),
Dense(128, kernel_initializer='glorot_normal', activation='relu'),
Dense(128, kernel_initializer='glorot_normal', activation=... |
package gov.cms.bfd.pipeline.rda.grpc;
import static org.junit.jupiter.api.Assertions.assertEquals;
import gov.cms.bfd.pipeline.rda.grpc.source.GrpcRdaSource;
import gov.cms.bfd.pipeline.sharedutils.IdHasher;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
... |
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2010 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... |
#!/usr/bin/env bash
# Set the root directory
chainlink_dir=/root/.chainlink
mkdir $chainlink_dir
# AWS CLI Configuration
mkdir /root/.aws/
printf "[profile host]\nrole_arn = ${host_role}\nsource_profile = default\n\n[default]\nregion=${region}\noutput=json" >> /root/.aws/config
# Install Docker
yum update... |
<filename>generators/angular/index.js
'use strict';
var fs = require('fs');
var path = require('path');
var util = require('util');
var wiredep = require('wiredep');
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var lodash = require('underscore.string');
var html ... |
#!/bin/bash
# The intent of this script is upload produced performance results to BenchView in a CI context.
# There is no support for running this script in a dev environment.
if [ -z "$perfWorkingDirectory" ]; then
echo EnvVar perfWorkingDirectory should be set; exiting...
exit 1
fi
if [ -z "$configurati... |
<reponame>premss79/zignaly-webapp<filename>src/components/Forms/ProviderSettingsForm/ToggleTextarea/index.js
export { default } from "./ToggleTextarea.js";
|
<?php
function addContact($name, $email) {
$servername = "localhost";
$username = "DBUSERNAME";
$password = "DBPASSWORD";
$dbname = "DATABASENAME";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
... |
import testing
from testing import divert_nexus,restore_nexus
from testing import failed,FailedTest
from testing import value_eq,object_eq,text_eq
def clear_all_sims():
from gamess import Gamess
Gamess.ericfmt = None
testing.clear_all_sims()
#end def clear_all_sims
def get_gamess_sim(type='rhf'):
... |
nano _ex3.txt
chmod ugo-x _ex3.txt
ls -l _ex3.txt >> ex3.txt
chmod g-rwx _ex3.txt
chmod uo=rwx _ex3.txt
ls -l _ex3.txt >> ex3.txt
chmod g=u _ex3.txt
ls -l _ex3.txt >> ex3.txt
|
# simplecov
require 'simplecov'
SimpleCov.start
|
#!/bin/bash -f
# Vivado (TM) v2016.4 (64-bit)
#
# Filename : c_addsub_0.sh
# Simulator : Aldec Riviera-PRO Simulator
# Description : Simulation script for compiling, elaborating and verifying the project source files.
# The script will automatically create the design libraries sub-directories in the ... |
set -eo nounset
cd /sources
test -f libgudev-231.tar.xz || \
wget --no-check-certificate \
http://ftp.gnome.org/pub/gnome/sources/libgudev/231/libgudev-231.tar.xz
rm -rf libgudev-231
tar xf libgudev-231.tar.xz
pushd libgudev-231
./configure --prefix=/usr --disable-umockdev &&
make
make install
popd
rm -rf libgu... |
import * as zjson from "../../zjson"
import {ZngClass} from "../ts_types"
export class Primitive implements ZngClass<null | string> {
constructor(readonly type: zjson.Primitive, readonly value: string | null) {}
isSet() {
return this.value !== null
}
toString() {
return this.value || ""
}
getTyp... |
import os
def count_images(count_images_in_folder):
number_of_images = []
path, dirs, files = next(os.walk(count_images_in_folder))
num_classes = len(dirs)
for i in files:
if i.endswith('.jpg'):
number_of_images.append(1)
for i in dirs:
subfolder_path = os... |
npm install serverless-dotenv-plugin --save |
import React from "react"
import { PortraitWrapper } from "./portrait.styles"
import Image from "../image/image"
const Portrait = () => {
return (
<PortraitWrapper>
<Image />
</PortraitWrapper>
)
}
export default Portrait
|
#! /usr/bin/env bash
# Ugly query-replace to add the Entrypoint css and navigation to
# Haddock-generated HTML.
sed -i \
-e 's@<link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" />@\n<link href="/static/css/ibm-plex.css" rel="stylesheet" />\n<link rel="stylesheet" type="text/css" href="/static/cs... |
#!/bin/sh
export PATH=$PWD/toolchain/gcc-linaro-5.1-2015.08-x86_64_arm-linux-gnueabi/bin:$PATH
arm-linux-gnueabi-gcc -Wall -shared -g -fPIC -o inject.o inject.c && arm-linux-gnueabi-strip inject.o
|
<filename>lc1110_delete_nodes_and_return_forest.py
"""Leetcode 1110. Delete Nodes And Return Forest
Medium
URL: https://leetcode.com/problems/delete-nodes-and-return-forest/
Given the root of a binary tree, each node in the tree has a distinct value.
After deleting all nodes with a value in to_delete, we are left wi... |
import yaml
def parse_configuration_file(file_path):
with open(file_path, 'r') as file:
config_data = yaml.safe_load(file)
services = config_data.get('services', [])
parsed_data = {}
for service in services:
service_name = list(service.keys())[0]
endpoints = ... |
<gh_stars>1-10
T = [ -10, -8, 0, 1, 2, 5, -2, -4 ]
T.sort()
print("A menor temperatura registrada foi de: %d" % T[0] + "\nSendo a maior: %d" % T[len(T) - 1]) |
/**
* Copyright 2014 isandlaTech
*
* 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... |
<reponame>reshmakh/medplum
import { Resource } from '@medplum/core';
export function evalFhirPath(resource: Resource, expression: string): any[] {
return new FhirPath(expression).eval(resource);
}
export class FhirPath {
private readonly original: string;
private readonly components: string[][];
constructor(... |
pub(crate) const REMOTE_ATTR_PARAM_NAME: &str = "remote";
pub(crate) const CREATE_ISSUE_LINK: &str = "https://github.com/myelin-ai/mockiato/issues/new";
fn generate_new_issue_url(remote_attr_name: &str) -> String {
format!("{}?{}={}", CREATE_ISSUE_LINK, REMOTE_ATTR_PARAM_NAME, remote_attr_name)
} |
import datetime as dt
def first_sunday_of_august(year: int) -> dt.date:
weekday_of_august_first = dt.date(year, 8, 1).isocalendar()[2]
missing_days = 7 - weekday_of_august_first
return dt.date(year, 8, 1 + missing_days)
def next_festa_major(date: dt.date) -> dt.date:
next_year = date.year + 1
next... |
<reponame>CodingMankk/16-BRVAHDemo
package com.oztaking.www.a16_brvahdemo.MyLoadMoreDemo;
import java.util.List;
/***********************************************
* 文 件 名:
* 创 建 人: OzTaking
* 功 能:下拉刷新请求数据回调接口
* 创建日期:
* 修改时间:
* 修改备注:
***********************************************/
public interface Request... |
package de.bitbrain.braingdx.tmx;
import de.bitbrain.braingdx.event.GameEventRouter;
import de.bitbrain.braingdx.world.GameObject;
public class TiledMapInfoExtractor implements GameEventRouter.GameEventInfoExtractor {
@Override
public boolean isSticky(GameObject object) {
return object.getOrSetAttribute(... |
'use strict';
/**
* Module dependencies.
*/
var path = require('path'),
mongoose = require('mongoose'),
File = mongoose.model('File'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')),
multer = require('multer'),
config = require(path.resolve('./config/conf... |
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# This file is part of the xPack distribution.
# (https://xpack.github.io)
# Copyright (c) 2020 Liviu Ionescu.
#
# Permission to use, copy, modify, and/or distribute this software
# for any purpose is hereby granted, ... |
import { ASTRoot as ConstraintAST, Node as ConstraintNode } from '../trees/constraint';
import {
Node as ExprNode,
TypedBinaryOpNode,
TypedFunctionInvocationNode,
TypedNode as TypedExprNode,
TypedNumberNode,
TypedStringLiteralNode,
TypedVariableNode,
VariableNode as ExprVariableNode,
} from '../trees/expression... |
<reponame>chenshun00/datasource-starter
package io.github.chenshun00.multi.datasource.transactional.support;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.NamedThreadLocal;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
... |
//Google Maps
var mlat = 0;
var mlon = 0;
var asn = null;
function initMap() {
var location = {
lat: mlat,
lng: mlon
};
var map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.MapTypeId.map,
zoom: 13,
center: location,
disableDe... |
<gh_stars>0
package jdbc0625;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class Test02_SelectCount {
public static void main(String[] args) {
/*
* sungjuk 테이블의 전체 행갯수를 출력하시오
*/
String url="jdbc:oracle:thin:@localhost:1521... |
#!/bin/bash
#set -x
usage() {
echo "Usage: $0 [options] <script.sh> [listOfMachines.txt ...]" 1>&2
echo "" 1>&2
echo "Options:" 1>&2
echo " -U, --user Use a user other than root" 1>&2
echo " -q, --quick Quick mode, don't ask questions" 1>&2
echo " -s, --ssh Force use of SS... |
export const determinePrepay = creditLimit => creditLimit === 0;
|
struct Inner: Decodable {
let property1: String
let property2: Int
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.property1 = try container.decode(String.self, forKey: .property1)
self.property2 = try container.decode(Int.se... |
#!/bin/bash
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Is meant to be run in the build directory.
readonly SCRIPT_ROOT="$(cd $(dirname ${BASH_SOURCE[0]} ) && pwd)"
readonly DATA_DIR="$SCRIPT_ROOT/tes... |
package pl.edu.agh.panda5.stages;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.scenes.scene2d.Stage;
import pl.edu.agh.panda5.Panda5;
import pl.edu.agh.panda5.utils.ScoreSerializer;
import java.util.List;
import java.util.stream.Collectors;
public class MenuStage extends Stage {
private Panda5 game;
... |
<reponame>Arwaabdelrahem/RestaurantApi-nestjs<gh_stars>0
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { InjectModel } from '@nestjs/mongoose';
import { PassportStrategy } from '@nestjs/passport';
import { Model } from 'mongoose';
import { Ext... |
#!/bin/bash
echo "Building momenton-server service docker image"
cd momenton-server
sudo docker build . -t golra03/momentonserver:latest -t golra03/momentonserver:v1.1
echo "pushing momenton-client service docker image to the Docker hub"
sudo docker push golra03/momentonserver:latest
sudo docker push golra03/momenton... |
#!/bin/sh
#$ -cwd
#$ -l s_gpu=1
#$ -l h_rt=24:00:00
# ==============================================================================
# Copyright (c) 2020, Yamagishi Laboratory, National Institute of Informatics
# Author: Erica Cooper (ecooper@nii.ac.jp)
# All rights reserved.
# =========================================... |
#!/bin/bash
watch -n2 rl_list_mcast_sockets.sh
|
#!/bin/bash
# Execute clusterGenes command, suppress error output
clusterGenes 2> /dev/null
# Check the exit status of the command
if [[ "$?" == 255 ]]; then
# Perform specific action if exit status is 255
echo "ClusterGenes command exited with status 255"
# Add your specific action here
fi |
package Find_Pivot_Index;
public class Solution {
public int pivotIndex(int[] nums) {
if (nums == null || nums.length == 0) {
return -1;
}
/**
* Compute the whole sum then judge if the current sum is half of the whole sum
* 38ms
*/
int sum = 0... |
<gh_stars>0
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distri... |
import cv2
from pathlib import Path
class FaceDetector:
def __init__(self):
self.faces_detected = 0
def process_images(self, image_files: list, output_file: str) -> int:
"""
Process a list of images, detect faces, and save the detected faces as separate files.
Args:
- ... |
<reponame>IBMDecisionOptimization/OPL-jdbc-data-source<filename>src/main/java/com/ibm/opl/customdatasource/JdbcWriter.java
package com.ibm.opl.customdatasource;
import ilog.concert.IloException;
import ilog.concert.IloTuple;
import ilog.opl.IloOplElement;
import ilog.opl.IloOplElementDefinition;
import ilog.opl.IloOpl... |
my_list = [1, 2, 3, 4, 5]
total = sum(my_list)
print("Sum of all elements in given list:", total) |
#!/bin/bash
# Copyright (c) Stanford University, The Regents of the University of
# California, and others.
#
# All Rights Reserved.
#
# See Copyright-SimVascular.txt for additional details.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated... |
#!/bin/bash
# Color codes for bash output
BLUE='\e[36m'
GREEN='\e[32m'
RED='\e[31m'
YELLOW='\e[33m'
CLEAR='\e[39m'
# Handle MacOS being incapable of tr, grep, and others
export LC_ALL=C
#----DEFAULTS----#
# Generate a 5-digit random cluster identifier for resource tagging purposes
RANDOM_IDENTIFIER=$(head /dev/urand... |
<reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
<gh_stars>0
package weixin.guanjia.core.util;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.Jedis;
import weixin.liuliangbao.util.RedisConnectionPoolFactory;
/**
* Created by GuoLiang on 2016/5/11 18:35.
*/
public class RedisUtil {
... |
#!/bin/bash
#PBS -N bin_label_and_evaluate
#PBS -l nodes=2:ppn=8
#PBS -l walltime=999999:00:00
export PATH=/home1/jialh/tools/miniconda3/bin:$PATH
sample=$1
workdir=$2
method=$3
assembler=$4
configdir=${workdir}/configs
echo "begin to deal with ${sample}"
if [ -s ${configdir}/${sample}_config.yaml ] && [ ! -s ${wor... |
package com.seatgeek.placesautocomplete.model;
public final class PlaceGeometry {
public final PlaceLocation location;
public PlaceGeometry(final PlaceLocation location) {
this.location = location;
}
}
|
package cn.st.factory;
import cn.st.dao.UserDao;
import cn.st.dao.impl.UserDaoImpl;
/**
* @description:
* @author: st
* @create: 2021-01-30 17:05
**/
public class StaticFactory {
public static UserDao getUserDao(){
return new UserDaoImpl();
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.