text stringlengths 1 1.05M |
|---|
func sumOfEvenNumbers(in array: [Int]) -> Int {
var sum = 0
for number in array {
if number % 2 == 0 {
sum += number
}
}
return sum
} |
<gh_stars>10-100
/* jshint unused: true, undef: true */
/* global window, document, localStorage, $, $each, setTimeout, screen, clearInterval */
window.addEventListener('load', init, false);
function init() {
if (localStorage.popupHeight) document.body.style.height = localStorage.popupHeight + 'px';
if (local... |
/*
* main.cpp
*
* Created on: 1 Nov 2015
* Author: Patrick
*/
#include <iostream>
#define SCOPE_ERROR(A, B, C) A B C
namespace {
char const foolit[] = SCOPE_ERROR("A", "B", "C");
char const fooled[] = SCOPE_ERROR("A", "B", "C");
char const * const foolit_ptr = SCOPE_ERROR("A", "B", "C");
... |
def get_channel_choice_to(channels):
# Function to convert variables to string format
vars_to_string = lambda c_id, local_bal, remote_bal, graphic: f"{c_id} - {local_bal} - {remote_bal} - {graphic}"
# Generate choices based on the given channels
choices = [{'name': vars_to_string(c['channel_id'], c['lo... |
ORIGIN=${ORIGIN:-origin}
version=$(git fetch --tags "${ORIGIN}" &>/dev/null | git -c "versionsort.prereleasesuffix=-beta" tag -l --sort=version:refname | tail -n1 | cut -c 2-)
echo "$version" |
#!/bin/bash
# -*- coding: utf-8 -*-
#
# Python dev environment tools.
#
# This script should be sourced to use.
#
# This file is generated by cookiecutter-pygitrepo 0.0.2: https://github.com/MacHu-GWU/cookiecutter-pygitrepo/tree/0.0.2
if [ -n "${BASH_SOURCE}" ]
then
dir_here="$( cd "$( dirname "${BASH_SOURCE[0]}" ... |
#!/usr/bin/env bash
#
# Copyright (c) 2018-2020 The Matilda Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C.UTF-8
if [[ $HOST = *-mingw32 ]]; then
BEGIN_FOLD wrap-wine
# Generate all binaries, ... |
source "${0:h}/external/git-flow/git-flow-completion.zsh"
|
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-shuffled-N/model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-shuffled-N/512+0+512-STWS-1 --do_eval --per_device... |
#!/bin/bash
echo "BUILD make"
cp make/config.mk .
echo "USE_CUDA=0" >> config.mk
echo "USE_CUDNN=0" >> config.mk
echo "USE_BLAS=openblas" >> config.mk
echo "ADD_CFLAGS += -I/usr/include/openblas" >>config.mk
echo "GTEST_PATH=/usr/local/gtest" >> config.mk
echo 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONF... |
#!/bin/bash
set -e
PKG=$1
PKG_LIST=$(go list ${PKG}/... | grep -v /vendor/)
go test -short ${PKG_LIST}
|
<filename>TafangGame/app/src/main/java/com/bn/tag/Shell.java
package com.bn.tag;
import java.util.List;
import java.util.Vector;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import static com.bn.tag.Constant.*;
public class Shell {
GameView gameView;
... |
package cn.leancloud;
import cn.leancloud.callback.SaveCallback;
import cn.leancloud.convertor.ObserverBuilder;
import cn.leancloud.json.JSON;
import cn.leancloud.json.JSONObject;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import java.util.Map;
... |
function findLongestString(strList) {
let longestStr = '';
strList.forEach(str => {
if (str.length > longestStr.length) {
longestStr = str;
}
})
return longestStr;
}
let longestWord = findLongestString(['javascript', 'python', 'ruby']);
console.log(longestWord); // Output: 'javascript' |
<filename>load_config.py<gh_stars>0
import hjson
config = hjson.load(open("./conf/config.hjson", encoding='utf-8'))
|
SELECT o.*
FROM Orders o
INNER JOIN OrderItems i
ON o.order_id = i.order_id
GROUP BY o.order_id
HAVING SUM(i.price) > 100; |
export { default } from "./PositionSettingsForm";
|
#!/bin/bash
#
# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wit... |
<gh_stars>0
import sys, os
import CORBA, Fortune, Fortune__POA
FORTUNE_PATH = "/usr/games/fortune"
class CookieServer_i(Fortune__POA.CookieServer):
def get_cookie(self):
pipe = os.popen(FORTUNE_PATH)
cookie = pipe.read()
if pipe.close():
# An error occurred with the pipe
... |
import * as uuid from 'uuid';
import Store from '../store.js';
import Painter from '../Painter.js';
jest.mock('uuid');
jest.mock('../Painter.js');
describe('test store.js', () => {
const mockMessages = {
'1': {
id: '1',
message: 'mock-message-1',
time: 10,
},
'2': {
id: '2',
... |
#!/bin/sh
sh -c "echo $(ls -la) && cd $WORKING_DIRECTORY && echo $(ls -la) && pipenv $*"
|
const Firestore = require('@firestore').Firestore
exports.getAllPartyData = (req, res) => {
console.log('party: ', req.params.party)
const db = new Firestore()
const party = req.params.party
db.PoliticalParty()
.where('name', '==', party)
.select()
.then((snapshot) => {
if (snapshot.empty) {
... |
#!/usr/bin/env bash
# Copyright 2015 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
package interpreter
import "errors"
import msg "github.com/filecoin-project/specs/systems/filecoin_vm/message"
import addr "github.com/filecoin-project/specs/systems/filecoin_vm/actor/address"
import actor "github.com/filecoin-project/specs/systems/filecoin_vm/actor"
import st "github.com/filecoin-project/specs/system... |
/**
* @fileOverview Math for a simple robot simulation
* @author <NAME> <<EMAIL>>
* @version 0.1
*/
define([ 'exports', 'robertaLogic.constants' ], function(exports, CONSTANTS) {
/**
* exports helper for calculations in ORsimulation
*
* @namespace
*/
/**
* Convert from degree to ... |
import express from 'express';
import ExpressRateLimit from 'express-rate-limit';
import http, {Server} from 'http';
import Redis from 'ioredis';
import ms from 'ms';
import ExpressRateLimitIORedisStore from '../../src';
const limiter = ExpressRateLimit({
store: new ExpressRateLimitIORedisStore({
client: new Red... |
def merge(arr1, arr2, n1, n2):
arr3 = [None] * (n1 + n2)
i = 0
j = 0
k = 0
# Traverse both array
while i < n1 and j < n2:
# Check if current element of first
# array is smaller than current element
# of second array. If yes, store first
# array elemen... |
<reponame>daylmer/SpectralLibrary<gh_stars>0
/*
The left most peak is monoisotopic
Isotopes being present in the spectra are really useful to determine charge state
Relative difference in intensity between two charge states of something with the same mass to charge is
another factor in being confident you have identi... |
define([
'underscore',
'backbone'
],
function(_, Backbone){
var TodoItem = Backbone.Model.extend({
initialize: function() {
},
url: function(){
return this.id ? '/todos/' + this.id : '/todos/';
}
});
return TodoItem;
}
); |
define((require, exports, module) => {
return () => {
return {
logId: null,
party_no: null,
enemy_id: null,
enemy_name: null,
enemy_level: null,
rank: null,
mvp: null,
now: null
}
}
}) |
def longestPalindromeSubstring(string):
currentLongest = [0,1]
for i in range(1,len(string)):
odd = getLongestPalindromeFrom(string,i-1,i+1)
even = getLongestPalindromeFrom(string,i-1,i)
longest = max(odd, even, key = lambda x: x[1] - x[0])
currentLongest = max(longest, currentLongest, key = lambda ... |
#!/usr/bin/env bash
set -x
set -e
set -u
HERE="$(cd $(dirname $0) && pwd)"
. ${HERE}/buildbot_functions.sh
ROOT=`pwd`
PLATFORM=`uname`
export PATH="/usr/local/bin:$PATH"
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON"
clobber
# Stage 1
build_stage1_clang_at_r... |
package org.multibit.hd.ui.views.wizards.lab_settings;
import com.google.common.base.Optional;
import net.miginfocom.swing.MigLayout;
import org.multibit.hd.core.config.Configuration;
import org.multibit.hd.core.config.Configurations;
import org.multibit.hd.ui.events.view.ViewEvents;
import org.multibit.hd.ui.language... |
APPNAME="HelloAnalytics-JS"
# options
buildexternalsfromsource=
usage(){
cat << EOF
usage: $0 [options]
Build C/C++ code for $APPNAME using Android NDK
OPTIONS:
-s Build externals from source
-h this help
EOF
}
while getopts "sh" OPTION; do
case "$OPTION" in
s)
buildexternalsfromsource=1
;;
h)
usage
exit 0
;;
esa... |
'use strict';
const assert = require('chai').assert;
const emailSeed = require('../../../src/seed/email');
describe('seed/email.js', () => {
it('should be string', () => {
assert.isString(emailSeed());
});
it('should be diff', () => {
assert.notStrictEqual(emailSeed(), emailSeed());
... |
# Coloured Man Pages!
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
# source custom colors:
eval $(dircolors -b ${HOME}/.c... |
<reponame>prasanthi21/neighborhood-map<filename>src/components/App.js
import React, {Component} from 'react';
import LocationList from './LocationList';
class App extends Component {
/**
* Constructor
*/
constructor(props) {
super(props);
this.state = {
'alllocations': [
... |
#!/bin/bash
# SPDX-License-Identifier: ISC
#
# IBFT 2.0 with permissions IBFT2 w/ setup script.
# 4 node setup
# besu is built using `gradlew installDist
#
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
BESU_PATH="${SCRIPTPATH}/besu/build/install/besu"
NETWORK="${SCRIPTPATH}/IBFT-NETWORK"
NODE_COUNT='4'
#Create n... |
#include <iostream>
class ImagePieceManager {
private:
double mImageHeight{0};
double mImagePieceWidth{0};
double mImagePieceHeight{0};
double mPieceXPosition{0};
double mPieceYPosition{0};
public:
void setImageHeight(double height) {
mImageHeight = height;
}
void setImagePiec... |
total=0
while read -r line; do
if [[ $line == START* ]]
then
date=$(echo $line | cut -c 8-)
start=$(date -j -f "%a %b %e %H:%M:%S %Z %Y" "$date" +%s)
elif [[ $line == STOP* ]]
then
date=$(echo $line | cut -c 7-)
stop=$(date -j -f "%a %b %e %H:%M:%S %Z %Y" "$date" +%s)
... |
#!/bin/sh
MYSELF=`which "$0" 2>/dev/null`
[ $? -gt 0 -a -f "$0" ] && MYSELF="./$0"
java=java
if test -n "$JAVA_HOME"; then
java="$JAVA_HOME/bin/java"
fi
#java_args=-Dlog4j.configurationFile=log4j2.xml
exec "$java" $java_args -jar $MYSELF "$@"
exit 1
|
H7.Rect = H7.Node.extend({
type: "Rect",
// 初始化
ctor: function (width, height) {
this.width = width;
this.height = height;
this.fillStyle = "";
},
render: function (ctx) {
var pos = this.getPos();
if (this.fillStyle) {
ctx.fillStyle = this.fillS... |
# initialize autocomplete here, otherwise functions won't be loaded
autoload -U compinit
compinit
compdef hub=git
|
#!/usr/bin/env bash
set -xe
MATCH_FILE="spdkcli_nvmf.test"
SPDKCLI_BRANCH="/nvmf"
testdir=$(readlink -f $(dirname $0))
. $testdir/common.sh
. $testdir/../nvmf/common.sh
timing_enter spdkcli_nvmf
trap 'on_error_exit; revert_soft_roce' ERR
rdma_device_init
timing_enter run_spdk_tgt
run_spdk_tgt
timing_exit run_spdk_tg... |
/*
* Harness feature flag service client apis
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
* Contact: <EMAIL>
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech)... |
<reponame>sankalpana/AdventOfCode2021
package tech.houssemnasri;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class Part1 {
public static void run(String inp... |
#!/bin/bash
set -ev
cd /build/build-cross
make -j 2 all
export CTEST_OUTPUT_ON_FAILURE=TRUE
ctest -j 2
make install
|
import React from 'react';
import { ContentLink } from 'components/Link';
export default class LinkNode extends React.Component {
render() {
const { href, children } = this.props;
return <ContentLink href={href}>{children}</ContentLink>;
}
}
|
/*
* This file is part of Pwxe, a PHP extension to stop execution
* of writable files.
*
* Author: <NAME> <<EMAIL>>
*/
#ifndef PHP_PWXE_H
#define PHP_PWXE_H 1
#define PHP_PWXE_VERSION "0.1"
#define PHP_PWXE_EXTNAME "PWXE"
extern void pwxe_zend_init(TSRMLS_D);
extern void pwxe_zend_shutdown(TSRMLS_D);
PHP_MINI... |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, select } from '@storybook/addon-knobs';
import SplitButton from '../SplitButton';
import OverflowMenuItem from '../OverflowMenuItem';
const sizes = {
Default: 'defa... |
#!/bin/bash
set -euo pipefail
cacert=/usr/share/logstash/config/ca/ca.crt
# Wait for ca file to exist before we continue. If the ca file doesn't exist then something went wrong.
while [ ! -f $cacert ]
do
echo
echo 'Wait for ca file ❗️'
echo
sleep 2
done
ls -l $cacert
es_url=https://elasticsearch:92... |
<gh_stars>0
import React from 'react';
import facebookicon from '../../../public/images/facebook.png';
import twittericon from '../../../public/images/twitter.png';
import linkedinicon from '../../../public/images/linkedin.png';
import instagramicon from '../../../public/images/instagram.png';
class Footer extends Rea... |
package io.opensphere.core.util.swing.input.model;
import java.util.EventListener;
/**
* Defines an object which listens for PropertyChangeEvents.
*/
@FunctionalInterface
public interface PropertyChangeListener extends EventListener
{
/**
* Invoked when the target of the listener has changed its state.
... |
<filename>Plugins/flibbles/relink/js/relinkoperations/text/wikitext/wikilink.js
/*\
module-type: relinkwikitextrule
Handles CamelCase links
WikiLink
but not:
~WikiLink
\*/
var utils = require("./utils.js");
exports.name = "wikilink";
exports.report = function(text, callback, options) {
var title = this.match[0... |
<reponame>phetsims/dot<gh_stars>1-10
// Copyright 2016-2021, University of Colorado Boulder
/**
* A numeric range with a required default value.
*
* @author <NAME> (PixelZoom, Inc.)
* @author <NAME> (PhET Interactive Simulations)
*/
import Range from './Range.js';
import dot from './dot.js';
class RangeWithValu... |
#!/bin/bash
set -e
cwd=$(pwd)
cd $(dirname "$0")/..
source .travis/sanitize.sh
sanitize deploy
. quark-travis/bin/activate
if [[ -f ~/.nvm/nvm.sh ]]; then
. ~/.nvm/nvm.sh
fi
set -x
npm install travis-after-all
if $(npm bin)/travis-after-all ; then
SUCCESS="$?"
echo "All tests in matrix passed, checki... |
<filename>pytest-svn/setup.py<gh_stars>100-1000
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from setuptools import setup
from common_setup import common_setup
classifiers = [
'License :: OSI Approved :: MIT License',
'Development Status :: 5 - Production/Stable',
'Topi... |
package com.yoavfranco.wikigame.adapters;
import android.app.Activity;
import android.support.v7.widget.RecyclerView;
import android.text.format.DateUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation... |
<filename>src/main/java/com/github/chen0040/leetcode/day15/package-info.java
/**
* Created by xschen on 10/8/2017.
*/
package com.github.chen0040.leetcode.day15;
|
#!/bin/bash
IMAGE=nscrypt
if [ "$1" != "" ] ; then
IMAGE=$1
fi
IMAGEDIR=$HOME/volumes/$IMAGE
mkdir -p $IMAGEDIR
pushd $IMAGEDIR
if [ ! -e $IMAGEDIR/home ] ; then
# This will fail on docker < 1.8
id=$($SUDO docker create $IMAGE)
$SUDO docker cp $id:/home - | tar xf -
$SUDO docker rm -v $id
fi
if [ ! -e $IMAGEDI... |
. /vagrant/config/setup.env
/u01/app/21.3.0.0/grid/gridSetup.sh -silent -executeConfigTools \
-responseFile /u01/app/21.3.0.0/grid/install/response/gridsetup.rsp \
INVENTORY_LOCATION=/u01/app/oraInventory \
SELECTED_LANGUAGES=en,en_GB \
oracle.install.option=CRS_CONFIG \
ORACLE_BASE=/u01/app/grid \
... |
import { Injectable, InternalServerErrorException } from '@nestjs/common';
import { AccountService } from '../accounts/accounts.service';
import { AuthService } from '../auth/auth.service';
@Injectable()
export class WithdrawService {
private userEmail: string;
constructor(
private readonly accountService: Acc... |
<reponame>nawazkhan/calendso<gh_stars>0
/*
Warnings:
- You are about to drop the column `smartContractAddress` on the `EventType` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "EventType" DROP COLUMN IF EXISTS "smartContractAddress";
-- AlterTable
ALTER TABLE "users" ADD COLUMN "ve... |
const defaultState = {
user: {
firstname: '',
lastname: '',
email: '',
number: '',
password: '',
},
fetching: false,
fetched: false,
error: null
}
const registrationReducer = (state = defaultState, action)=>{
switch(action.type){
case "FETCH_REG_PEN... |
import React, { useState } from 'react';
import { Container, LogoBar, Options, Footer } from './styles';
import iconStarctron from '../../assets/icon-starctron.png';
import { Link } from 'react-router-dom';
import { FiGrid, FiLayers, FiLogOut, FiBook, FiCalendar, FiMessageSquare, FiAlignLeft } from 'react-icons/fi';
im... |
<reponame>Ranger-X/anycable
# frozen_string_literal: true
require "anycable/rpc/handlers/connect"
require "anycable/rpc/handlers/disconnect"
require "anycable/rpc/handlers/command"
module AnyCable
module RPC
# Generic RPC handler
class Handler
include Handlers::Connect
include Handlers::Disconne... |
def get_value(dict, key):
try:
return dict[key]
except:
return None
def set_value(dict, key, value):
try:
dict[key] = value
except:
print("Error setting value") |
<reponame>wangxy1994/mydevkit<filename>exoskeleton/src/main/java/com/wangxy/exoskeleton/risk/util/BigDecimalUtil.java<gh_stars>0
package com.wangxy.exoskeleton.risk.util;
import java.math.BigDecimal;
/********************************************
* 文件名称: BigDecimalUtil.java
* 系统名称: 资金风险管理系统
* 模块名称:
* 软件版权:
* 功能... |
import tensorflow as tf
from tensorflow.keras.datasets import mnist
import matplotlib.pyplot as plt
(x_train, y_train), (x_test, y_test) = mnist.load_data()
# Reshape the dataset
x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)
x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)
# Normalize
x_train = x_trai... |
<gh_stars>0
import {
Component, OnInit, AfterViewInit,
ChangeDetectionStrategy, ChangeDetectorRef
} from '@angular/core';
import { Title, Meta } from '@angular/platform-browser';
import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTableDataSource } from '@angular/material/table';
import { Downlo... |
#
# Defines Homebrew aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
# Qi Zhang <singularitti@outlook.com>
#
# Return if requirements are not found.
if ! [[ "${OSTYPE}" =~ (darwin|linux)* ]]; then
return 1
fi
#
# Aliases
#
# Homebrew
alias brewc='brew cleanup'
alias brewC='brew cleanup --force'
... |
# frozen_string_literal: true
class RenameUsersToContributors < ActiveRecord::Migration[6.0]
def change
rename_table :users, :contributors
end
end
|
public int MaxConsecutiveStates(State targetState)
{
int maxConsecutive = 0;
int currentConsecutive = 0;
foreach (State state in states)
{
if (state == targetState)
{
currentConsecutive++;
maxConsecutive = Math.Max(maxConsecutive, currentConsecutive);
}
... |
// Manipulate --js UpdateSODIUM D:\CIOS\Scripts\Softwares\Update-SODIUM.js
var url = "www.libsodium.org" ;
var filename = "G:/Temp/sodium.html" ;
var lastest = "G:/Temp/sodium-download.html" ;
var timeout = 60 * 1000 ;
... |
<filename>client/src/components/store/BrandContainer.tsx
import React from 'react';
import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Checkbox from '@material-ui/core/Checkbox';
interface Props {
brands: Array<string>
brandCheckbox: a... |
<reponame>Aukbit/pluto
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: examples/dist/user_backend/proto/user.proto
package user
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress ... |
<reponame>bblack16/block-stack-query
require_relative 'sqlite'
module BlockStack
class Query
module Adapters
class MySQL < SQLite
def self.classes
['Sequel::Mysql2::Dataset']
end
def self.type
:mysql
end
protected
def _match_to_s(exp)
... |
const addNewBookButton = document.querySelector('button.newBook');
let content = '';
const bookCard = (book, index) => `
<div id="book-${index}" class="col-md-4 mt-2">
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title" id="itemName">${book.title}</h5>
... |
<filename>pecado-gateway/src/test/java/me/batizhao/gateway/api/GatewayApiTest.java
package me.batizhao.gateway.api;
import me.batizhao.common.core.util.ResultEnum;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;
/**
* @author batizhao
* @since 2020-04-24
**/
public class GatewayApiTes... |
<reponame>yoloho/enhanced-dao<gh_stars>1-10
package com.yoloho.enhanced.data.dao.impl;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.Log... |
TCP (Transmission Control Protocol) is a connection-oriented protocol that uses acknowledgments and retransmissions to ensure positive delivery of the data. It creates a reliable, ordered two-way communication between two nodes that remain connected until the transmission is complete. UDP (User Datagram Protocol) is a ... |
#!/bin/sh
# Note: Arguments to this script
# 1: string - S3 bucket for your backup save files (required)
# 2: true|false - whether to use Satisfactory Experimental build (optional, default false)
S3_SAVE_BUCKET=$1
USE_EXPERIMENTAL_BUILD=${2-false}
# install steamcmd: https://developer.valvesoftware.com/wiki/Steam... |
INSERT INTO PLM_CONFIG(ID,CODE,NAME) VALUES(1,'default','默认配置');
INSERT INTO PLM_STEP(ID,CODE,NAME,ACTION,PRIORITY,CONFIG_ID) VALUES(1,'request','需求池','none',1,1);
INSERT INTO PLM_STEP(ID,CODE,NAME,ACTION,PRIORITY,CONFIG_ID) VALUES(2,'preDev','准备开发','none',2,1);
INSERT INTO PLM_STEP(ID,CODE,NAME,ACTION,PRIORITY,... |
<reponame>Duncannn/DataProject<filename>Python/scraper.py
# Yahoo Finance scraper by <NAME>
import os
import sys
import csv
import codecs
import cStringIO
import errno
from pattern.web import URL, DOM, plaintext
# ----------------------------------------------------------------------------------------
TARGET_URL = "... |
#! /bin/bash
set -e
if [ "${OUTPUT_DIR}" = "" ] || [ ! -d ${OUTPUT_DIR} ]; then exit 1; fi
cd ${OUTPUT_DIR}/usr/bin
echo ""
iter=0
while (( iter < ${#PROGS[@]} )); do
UT_CMD=$(eval echo '${PROGS['${iter}']}')
UT_PROG=$(echo ${UT_CMD}|cut -d' ' -f1)
echo "[${iter}] RUNNING '${UT_CMD}' with '${UT_PROG}'"... |
var tests_2main_8cpp =
[
[ "CATCH_CONFIG_MAIN", "tests_2main_8cpp.html#a656eb5868e824d59f489f910db438420", null ],
[ "Simulate", "tests_2main_8cpp.html#a177b86d04626c7a07e91a2a5087d40d8", null ],
[ "TEST_CASE", "tests_2main_8cpp.html#a1162bbc505e36e62eef48fc16aed2fde", null ]
]; |
<reponame>seqcode/multimds<filename>scripts/sup15.py
from multimds import data_tools as dt
import numpy as np
from multimds import compartment_analysis as ca
from sklearn import svm
from multimds import linear_algebra as la
from mayavi import mlab
from multimds import multimds as mm
path1 = "hic_data/GM12878_combined_... |
import Account from "@/api/account";
import Prs from "@/api/prs";
export {
Account,
Prs
} |
import makeGamesRepository from 'shared/domain/repositories/factories/makeGamesRepository';
import CreateGameService from '../CreateGameService';
export default function makeCreateGameService(): CreateGameService {
const gamesRepository = makeGamesRepository();
const createGame = new CreateGameService(gamesReposit... |
package org.om.core.impl.session;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import junit.framework.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.om.core.api.mapping.registry.MappingRegistry;
import org.om.c... |
#!/bin/bash
git remote add heroku https://git.heroku.com/fathomless-inlet-82408.git
wget https://cli-assets.heroku.com/branches/stable/heroku-linux-amd64.tar.gz
sudo mkdir -p /usr/local/lib /usr/local/bin
sudo tar -xvzf heroku-linux-amd64.tar.gz -C /usr/local/lib
sudo ln -s /usr/local/lib/heroku/bin/heroku /usr/local/b... |
#!/bin/bash
# Copyright 2014 The Kubernetes 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 require... |
<reponame>gcusnieux/jooby<filename>modules/jooby-scanner/src/test/java/app/ns/GuiceModule.java
package app.ns;
import com.google.inject.Binder;
import com.google.inject.Module;
public class GuiceModule implements Module {
@Override
public void configure(final Binder binder) {
binder.bind(GuiceModule.class);
... |
FLAGS="-fPIC -shared -s -O1"
LIBS="-lGLESv2 -lEGL -lOpenSLES -lm -landroid -llog"
NDK_ROOT="/home/buildbot/android/android-ndk-r22/toolchains/llvm/prebuilt/linux-x86_64/bin"
TOOLS_ROOT="/home/buildbot/android/sdk/build-tools/26.0.0"
SDK_ROOT="/home/buildbot/android/sdk/platforms/android-26"
cd /home/buildbot/client/sr... |
package HexaGhost;
import Model.Cell;
public interface HGStrategy {
public Cell play();
}
|
import React from "react";
import "./fotter.css";
import logofotter from "./logo.png";
import instagramlogo from "./instagramlogo.png";
import { Link } from "react-router-dom";
const Fotter = () => (
<div className="footer">
<div className="main_container">
<Link className="logo" to="/">
... |
#!/bin/bash
#/* ****************************************************
# * FileName: gmsg.sh
# * Author : ghostwwl
# * Date : 2015
# * Note : message output for posix shell
# * ***************************************************/
function color_msg ()
{
black='\033[0m'
boldblack='\033[1;0m'
red='\033[31m'
... |
#!/usr/bin/env bats
# Copyright 2016 tsuru authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
setup() {
rm -rf /home/application/ruby
rm -rf /home/application/current && mkdir /home/application/current
chown ubuntu /home/appl... |
#!/bin/sh
set -euf
build() {
docker-compose build --force-rm
}
mmock() {
docker-compose up --remove-orphans -d mock
}
run() {
docker-compose up --force-recreate --remove-orphans --exit-code-from gandalf gandalf
}
down() {
docker-compose down -v --remove-orphans
docker-compose rm -svf
}
cleanup() {
down
expo... |
<reponame>jogoes/caradverts
package repository.jooq
import java.sql.Date
import java.time.LocalDate
import org.scalatest.{FlatSpec, Matchers}
class SqlDateToLocalDateConverterSpec extends FlatSpec with Matchers {
private val converter = new SqlDateToLocalDateConverter
"SqlDateToLocalDateConverter" should "conv... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.