text stringlengths 1 1.05M |
|---|
#!/bin/bash
##########################################################################
# This script prepares Virtualbox application to be installed
# @author César Rodríguez González
# @version 1.3.3, 2017-03-19
# @license MIT
##########################################################################
# Check if the s... |
declare module 'mxgraph' {
/**
* @class mxUndoManager
*
* Implements a command history. When changing the graph model, an
* {@link mxUndoableChange} object is created at the start of the transaction (when
* model.beginUpdate is called). All atomic changes are then added to this
* object until the la... |
#!/usr/bin/env bash
# save current working directory where the test related information is stored
cwd=$(pwd)
display_help() {
echo "Usage: $0 [-r]" >&2
echo
echo " -r, --report create line reports"
echo
exit 1
}
if [ "$1" == "-h" ] ; then
echo "Usage: `basename $0` [-h] [-r]"
exit 0... |
function intersection(arr1, arr2) {
let result = [];
for (let num of arr1) {
if (arr2.indexOf(num) > -1) {
result.push(num);
}
}
return result;
}
const arr1 = [3, 5, 2, 1, 8];
const arr2 = [3, 8, 5, 0];
console.log(intersection(arr1, arr2));
// Output: [3, 5, 8] |
public class EntryDataProcessor {
public EntryData createEntryData(EntryPacket entryPacket, EntryDataType entryDataType, int versionID, long expiration, boolean keepExpiration, boolean createXtnEntryInfo) {
EntryTypeDesc entryTypeDesc = entryPacket.getTypeDescriptor().getEntryTypeDesc(entryType);
in... |
#!/bin/bash
#
# Caffe training script
# Tomas Pfister 2015
if [ "$2" = "" ]; then
echo "$0 net_name gpu_id [snap_iter] [finetune:0/1]"
exit
fi
net=$1
gpu_id=$2
snap_iter=$3
finetune=$4
snap_dir="data/$net/snapshots"
snapfile="heatmap_train";
mkdir -p $snap_dir
if [ "$finetune" = "1" ]; then cmd="weights"; ext="caff... |
$LOAD_PATH.push File.expand_path('lib', __dir__)
# Maintain your gem's version:
require 'helena_administration/version'
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = 'helena_administration'
s.version = HelenaAdministration::VERSION
s.authors = ['<NAME>']... |
def parse_sentence(sentence):
tokens = nltk.word_tokenize(sentence)
tagged_tokens = nltk.pos_tag(tokens)
subject = None
predicate = None
for token, tag in tagged_tokens:
if tag == 'NN':
subject = token
elif tag == 'VBP':
predicate = token
return subject, predicate |
#!/bin/sh
FLASK_APP=hello.py flask run -h 0.0.0.0 -p 80
|
package de.htwg.se.durak.model.gameElementsComponent
/**
* Card with Unicode and String properties
*/
trait CardInterface {
/**
* Card rank
*
* @return Card rank
*/
val rank: Int
/**
* Card symbol
*
* @return Card symbol
*/
val symbol: Int
/**
* Rank as string
*
* @return... |
class Admin::ForumsController < Admin::BaseController
before_action :set_forum, only: [:show, :edit, :update]
def index
@forums = Forum.order(id: :desc).page(params[:page])
end
def show
end
def new
@forum = Forum.new
end
def create
@forum = Forum.new forum_params
if @forum.save
... |
#Training details
#HRNet_W32_C
python train.py \
--model=HRNet_W32_C \
--batch_size=256 \
--total_images=1281167 \
--class_dim=1000 \
--lr_strategy=piecewise_decay \
--lr=0.1 \
--num_epochs=120 \
--model_save_dir=output/ \
--l2_decay=1e-4
|
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Written by <NAME> (<EMAIL>)
# ------------------------------------------------------------------------------
from __future__ import absolute_... |
<filename>src/main/java/com/borunovv/Main.java
package com.borunovv;
import com.borunovv.http.HTTPSession;
import com.borunovv.ssl.SSLServer;
/**
* Entry point.
* <p>
* Start server on port 9096.
* You can check it via https://localhost:9096
* To stop the server gracefully visit this URL: https://localhost:9096/... |
package com.sun.javafx.scene;
import com.sun.javafx.event.BasicEventDispatcher;
import com.sun.javafx.event.CompositeEventDispatcher;
import com.sun.javafx.event.EventHandlerManager;
/**
* An {@code EventDispatcher} for {@code Scene}. It is formed by a chain
* of {@code KeyboardShortcutsHandler} followed by {@code ... |
SELECT MIN(price)
FROM products
WHERE category = 'Clothing'; |
#include <iostream>
#include <vector>
#include <memory>
#include <cstdlib>
#include <ctime>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GLFW/glfw3.h>
#include <ft2build.h>
#include "shaders.h"
#include "background.h"
#include "block.h"
#include "text.h"
FT_Library ftlib;
int main()
{
srand(time(NULL));
... |
Agent.create(name: "myMBP", token: "<KEY>")
Task.create(name: "ls root directory", script: "ls -al /")
|
package cmd
import (
"excelc/makers"
"excelc/parser"
"github.com/spf13/cobra"
)
var goCmd = &cobra.Command{
Use: "go <Input> <Output",
Short: "生成Go代码",
Args: cobra.ExactValidArgs(2),
Run: func(cmd *cobra.Command, args []string) {
parser.Build(new(makers.GoMaker), args[0], args[1])
},
}
func init() {
ge... |
#! @BASH@
# Copyright (C) 1999-2011, 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@gnu.org>, 1999.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as publ... |
#!/bin/bash
# Copyright 2019 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.
set -o errexit # exit when a command fails
set -o nounset # error when an undefined variable is referenced
set -o pipefail # error if the ... |
<reponame>a2441918/augur-project
import test from 'ava';
import React from 'react';
import {shallow, mount} from 'enzyme';
import {renderJSX, JSX} from 'jsx-test-helpers';
import ButtonContainer from '../components/reuse/ButtonContainer/ButtonContainer';
function FakeComponent() {}
test('renders children when passed... |
<reponame>ministryofjustice/prison-visits-2
require_relative 'concrete_slot_type'
class NormalisedConcreteSlotType < ConcreteSlotType
def cast(value)
Nomis::ApiSlotNormaliser.new(value).slot
end
end
|
. ./_env.sh
parentcontainertag=$containertag
containertag=$parentcontainertag-jgi
|
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-only-pad/7-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-only-pad/7-512+0+512-N-VB-IP-first-256 --do_eval -... |
# -*- coding:utf-8 -*-
'''
传输层包解析
'''
import dpkt
#定义包解析类
class TcpAnylast(object):
'''数据报文传输层分解'''
def __init__(self,packet):
'''初始化传输层数据'''
self.packet = packet
def getSrc(self):
'''返回源端口'''
return self.packet.sport
def getDst(self):
'''返回目的端口'''
r... |
#!/bin/bash
# This script is executed bt Gradle to start the React packager for Debug
# targets.
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${THIS_DIR}/../../node... |
#!/bin/bash
#
# Prisma Node.JS packages publish script
#
# Build Order
# prisma-client-lib
# prisma-generate-schema
# prisma-db-introspection
# prisma-yml
# prisma-cli-engine
# prisma-cli-core
# prisma-cli
set -e
set -x
#
# Normalize CIRCLE_BRANCH
#
if [[ -z "$CIRCLE_BRANCH" ]]; then
if [[ $CIRCLE_TAG == "*beta"... |
<filename>core/src/mindustry/entities/units/Statuses.java
package mindustry.entities.units;
import arc.struct.Bits;
import arc.struct.*;
import arc.graphics.*;
import arc.util.*;
import arc.util.pooling.*;
import mindustry.content.*;
import mindustry.ctype.ContentType;
import mindustry.entities.traits.*;
import mindus... |
import React, { useState, useEffect } from "react";
const App = () => {
const [data, setData] = useState(null);
useEffect(() => {
const fetchData = async () => {
// make a POST request to a JSON API
const response = await fetch('http://example.com/api/fetch-data', {
method: 'POST'
})... |
<gh_stars>1-10
package org.moskito.control.ui.action;
import net.anotheria.anoprise.mocking.MockFactory;
import net.anotheria.maf.action.ActionMapping;
import net.anotheria.maf.action.CommandRedirect;
import org.junit.Test;
import javax.servlet.http.HttpServletRequest;
import static org.junit.Assert.assertEquals;
/... |
<gh_stars>0
/**
* @ngdoc function
* @name foodCircle.controller:ErrorpageCtrl
* @description
* # ErrorpageCtrl
* Controller of the foodCircle
*/
/*global
angular
*/
(function () {
'use strict';
angular.module('foodCircle').controller('ErrorpageCtrl', ['$rootScope', '$state', '$stateParams', functio... |
#!/bin/bash
# shellcheck disable=SC1091
################################################################################
# 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
#
# https://www.ap... |
<reponame>JielingWang/ENGINE-backend
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = unpackXlsxFile;
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _stream = require('stream');
var _stream2 = _interopRequireDefault(_stream);
var _unzipper = re... |
#!/bin/bash
#SBATCH --gres=gpu:v100l:1
#SBATCH --cpus-per-task=4
#SBATCH --mem=32G
#SBATCH --time=2-12:00:00
#SBATCH --job-name=giraffe.carlaCars256.train
#SBATCH --output=/scratch/cchen795/slurm/%x-%j.out
#SBATCH --error=/scratch/cchen795/slurm/%x-%j.out
echo "load modules and Python environment"
source $HOME/scratch... |
<filename>public/assets/js/as/auth-frontend.js
function isValidEmail(mail) {
return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(mail);
}
$(document).ready(
function() {
$('body').on('keydown','.solo-numero',function (event){
if (event.keyCode == 13 || event.keyC... |
package io.github.vampirestudios.obsidian.api.obsidian.block;
import io.github.vampirestudios.obsidian.api.obsidian.BlockProperty;
import io.github.vampirestudios.obsidian.api.obsidian.DisplayInformation;
import io.github.vampirestudios.obsidian.api.obsidian.NameInformation;
import io.github.vampirestudios.obsidian.ap... |
<reponame>JamesParkinSonos/okta-auth-js
/*!
* Copyright (c) 2019-present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/l... |
#!/bin/bash
version=$(<../../version.txt)
brew update
brew cask upgrade
brew cask install packages
cp -a ../../SnipInsight.Forms.GTK/bin/Release/. "Release/Snip Insights.app/Contents/MacOS/"
rm -r build
mkdir build
/usr/local/bin/packagesbuild --package-version $version -v snipInsightInstaller.pkgproj > log.txt
mv "... |
#ifndef ZDBFS_INODE_H
#define ZDBFS_INODE_H
int zdbfs_inode_init(zdbfs_t *fs);
size_t zdbfs_inode_dirlist_id(const char *name);
void zdbfs_inode_dump(zdb_inode_t *inode);
size_t zdbfs_offset_to_block(off_t off);
size_t zdbfs_inode_dir_size(zdb_dir_t *dir);
size_t zdbfs_inode_file_size(zdb... |
<filename>App/app/src/main/java/com/crossover/mobiliza/app/data/local/AppDatabase.java
package com.crossover.mobiliza.app.data.local;
import android.content.Context;
import android.util.Log;
import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;
import androidx.room.TypeConverter... |
/*
*
*/
package net.community.chest.lang.math;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import net.community.chest.lang.StringUtil;
import net.community.chest.util.collectio... |
<gh_stars>0
#include <proc.h>
#include <scheduler.h>
void schedule(void) {
if(_current_proc->state == READY) { //current process ready to run
_current_proc->state = RUNNING;
proc_start(_current_proc);
return;
}
//current process is runing, switch to next one.
process_t* head_proc = _current_proc;
process_t... |
package kr.co.gardener.admin.service.user;
import java.util.List;
import kr.co.gardener.admin.model.other.Notice;
import kr.co.gardener.admin.model.other.list.NoticeList;
import kr.co.gardener.util.Pager;
public interface NoticeService {
List<Notice> list();
void add(Notice item);
Notice item(int noticeId);
... |
<reponame>cybertoothca/ember-cli-text-field-mixins
import { later } from '@ember/runloop';
import Mixin from '@ember/object/mixin';
/**
* When focus is placed in an `input[:text]` or `textarea` the text within is selected.
*/
export default Mixin.create({
/**
* If you override make sure to `this._super(...argu... |
#!/bin/bash
set -e
if [[ ! -f "/etc/os-release" ]]; then
echo "ERROR: can't determine OS type"
exit 1
fi
# read os-release infos
set +e; . /etc/os-release 2>/dev/null; set -e
if [[ "x$NAME" = "xDebian GNU/Linux" ]] && [[ -e "/etc/chip_build_info.txt" ]]; then
echo "INFO: OS Debian on C.H.I.P. computer detected."
e... |
package cyclops.pure.instances.control;
import static cyclops.container.control.Ior.narrowK;
import cyclops.function.higherkinded.DataWitness.ior;
import cyclops.function.higherkinded.Higher;
import cyclops.function.higherkinded.Higher2;
import cyclops.pure.arrow.Cokleisli;
import cyclops.pure.arrow.Kleisli;
import c... |
<reponame>AlexRogalskiy/serendipity
/*
const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
const mf = require("@angular-architects/module-federation/webpack");
const path = require("path");
const share = mf.share;
const sharedMappings = new mf.SharedMappings();
sharedMappings.regis... |
import random
import time
from dagster import Field, In, Out, Output, graph, op
@op(
ins={"chase_duration": In(int)},
out=Out(int),
config_schema={
"chase_size": Field(
int,
default_value=100000,
is_required=False,
description="How big should the po... |
<filename>src/js/components/old_todos.js
import React from "react"
import PropTypes from 'prop-types'
import muiThemeable from 'material-ui/styles/muiThemeable'
import {Link} from 'react-router'
import FlatButton from 'material-ui/FlatButton'
import ToDo from "../containers/todo"
const Timeline = ({muiTheme, params, t... |
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd $SCRIPTPATH
cd ../../../
. config.profile
# check the enviroment info
nvidia-smi
export PYTHONPATH="$PWD":$PYTHONPATH
${PYTHON} -m pip install yacs
${PYTHON} -m pip install torchcontrib
${PYTHON} -m pip install git+https://github.com... |
<reponame>useflyyer/robots
export { Extension, Group, Rule } from "./types";
export { PARSE, ParsedResult } from "./parse";
export { Pattern } from "./robots-txt-guard/patterns";
export { makeGuard as GUARD, GuardRule } from "./robots-txt-guard/guard";
|
<gh_stars>0
const _ = require('underscore');
const BaseStep = require('./basestep.js');
class BaseAbilityWindow extends BaseStep {
constructor(game, properties) {
super(game);
this.abilityChoices = [];
this.events = _.flatten([properties.event]);
this.abilityType = properties.abili... |
#!/bin/bash
# Copyright 2017 Pegah Ghahremani
# 2017-18 Vimal Manohar
# 2018 Hossein Hadian
# Apache 2.0
# This script generates examples for multilingual training of neural network
# using separate input egs dir per language as input.
# This scripts produces 3 sets of files --
# egs.*.sc... |
curl "http://localhost:8080/url/Proxy" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"shortURL": "https://m3o.one/u/ck6SGVkYp"
}' |
import statistics
data = [25, 28, 28, 27, 28, 25, 29]
std_dev = statistics.stdev(data)
print(std_dev) |
/**
* Copyright 2017 iovation, Inc.
* <p>
* Licensed under the MIT License.
* You may not use this file except in compliance with the License.
* A copy of the License is located in the "LICENSE.txt" file accompanying
* this file. This file is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF... |
import { K8sClientFactory } from './K8sClientFactory';
import { K8sServiceInfo } from '../types/K8sServiceInfo';
import { WebSocketLogger } from '../services/WebSocketLogger';
const fs = require('fs');
class Utils {
private static instance;
private wsLogger: WebSocketLogger;
private constructor() {... |
<gh_stars>0
/*
* Created Date: Thu, 6th May 2021, 16:33:41 pm
* Author: <NAME>
* Email: <EMAIL>
* Copyright (c) 2021 The Distance
*/
import gql from 'graphql-tag';
export default gql`
mutation($input: CompleteOnDemandWorkoutInput!) {
completeOnDemandWorkout(input: $input) {
success
}
}
`;
|
<filename>api/project/modules/geoprocessing/utils.py<gh_stars>0
import osmnx as ox
import networkx as nx
def gdf_to_nx(gdf_network):
# generate graph from GeoDataFrame of LineStrings
net = nx.Graph()
net.graph['crs'] = gdf_network.crs
fields = list(gdf_network.columns)
for _, row in gdf_network.it... |
public class DigitalClock {
private int hour;
private int minute;
private int second;
public DigitalClock(int h, int m, int s) {
this.hour = h;
this.minute = m;
this.second = s;
}
public int getHour(){
return this.hour;
}
public int getMinute(){
... |
public function one($db = null)
{
if ($db !== null) {
return parent::one($db);
} else {
// Assuming $defaultDb is the default database connection
return parent::one($defaultDb);
}
} |
<reponame>alamin-mahamud/e-commerce-go-api
package main
import (
"log"
"net/http"
)
func main() {
db, err := CreateConnection()
defer db.Close()
if err != nil {
log.Fatalf("Could not connect to DB: %v", err)
}
userRepo := &UserRepository{db}
tokenService := &TokenService{userRepo}
authService := &Service... |
#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT
os::test::junit::declare_suite_start "cmd/quota"
os::test::junit::declare_suite_start "cmd/quota/clusterquota"
os::cmd::expect_success 'oc new-project foo --as=deads'
os::cmd::expect_success 'oc label ... |
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017 The LineageOS Project
#
# 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/L... |
<reponame>groomsy/custom-font-loading-demo
//
// AppDelegate.h
// FontTest
//
// Created by <NAME> on 10/30/14.
// Copyright (c) 2014 GroomsyDev. All rights reserved.
//
@import UIKit;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
package org.opentele.server.dgks.monitoringdataset.version1_0_1.generated;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 2.6... |
<gh_stars>0
package com.java110.things.sip;
import com.java110.things.sip.codec.Frame;
import com.java110.things.sip.handler.UDPHandler;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.chann... |
<reponame>AkashBalani/AWS_CICD_Serverless
package com.csye6225.noteapp.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.csye6225.noteapp.model.UserEntity;
import com.csye6225.noteapp.repository.UserRepository;
@Service
public class... |
#!/bin/bash
source "/vagrant/scripts/common.sh"
echo "setup metrics"
cp -r /vagrant/metrics /usr/local
mkdir -p /vagrant/metrics/data |
package com.woolta.blog.repository;
import com.woolta.blog.domain.PostFile;
import org.springframework.data.repository.CrudRepository;
public interface PostFileRepository extends CrudRepository<PostFile, Integer> {
}
|
sentence = ''
for word in words:
sentence += word+' '
sentence = sentence[:-1] + '.'
print(sentence) |
TERMUX_PKG_HOMEPAGE=http://www.cityinthesky.co.uk/opensource/pdf2svg/
TERMUX_PKG_DESCRIPTION="A PDF to SVG converter"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.2.3
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/db9052/pdf2svg/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX... |
<gh_stars>1-10
import {
AbstractGrantType,
InvalidArgumentError,
InvalidRequestError,
InvalidTokenError,
} from 'oauth2-server';
import axios from 'axios';
const url = 'https://oauth2.googleapis.com/tokeninfo';
class GoogleGrantType extends AbstractGrantType {
constructor(options = {}) {
super(options);... |
<filename>pkg/scheduler/job.go
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE.txt file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (... |
<reponame>webmaeistro/vipps-developers
package vippsKeys;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class VIPPS_InitiatePaymentResponseJSON {
@SerializedName("orderId")
@Expose
private String orderId;
@SerializedName("url")
@Expose
private Strin... |
def compute(a,b):
return a + b
def func1():
result = compute(2,3)
print(result) |
from classes import Query, BaseQueryResolver
META = {
'__version__':"0.0.1",
'author':"Dev",
'author_email':"<EMAIL>",
'description':"This is an example for a QueryResolver"
}
class ExampleResolver(BaseQueryResolver):
def __init__(self):
super().__init__() # Does nothing atm
from s... |
#!/bin/bash
# prereq
python -m build --wheel src
name=$(cd src/dist; ls databrickscicd*.whl)
databricks fs mkdirs ${DATABRICKS_DBFS_PATH}
# setup
export DATABRICKS_LIBRARY_PATH=${DATABRICKS_DBFS_PATH}/${name}
databricks fs cp --overwrite src/dist/${name} ${DATABRICKS_DBFS_PATH}
databricks workspace import --overwrite... |
#!/bin/bash
cd ..
python3 webserv.py config.cfg &
PID=$!
cd -> /dev/null
sleep 1
curl -I 127.0.0.1:8070/ | grep '200 OK' | diff - index_status_expected.out
kill $PID
|
package com.sohu.tv.mq.cloud.service;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.sohu.tv.mq.cloud.bo.Cluster;
import com.sohu.tv.mq.cloud.bo.Topic;
impor... |
'''This job updates the minute-by-minute trading data for the whole stock universe.
'''
'''
Copyright (c) 2017, WinQuant Information and Technology Co. Ltd.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are me... |
~/arduino-cli/bin/arduino-cli compile --fqbn arduino:avr:mega motor_controller
OUT=$?
if [ $OUT -eq 0 ];then
~/arduino-cli/bin/arduino-cli upload -p /dev/ttyACM1 --fqbn arduino:avr:mega motor_controller -v
else
echo "****ERROR*****"
fi
|
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular';
strings = ["Hello", "World"];
concatenatedString = '';
constructor() {
this.concatenatedString = this.string... |
#!/usr/bin/env sh
# generated from catkin/python/catkin/environment_cache.py
# based on a snapshot of the environment before and after calling the setup script
# it emulates the modifications of the setup script without recurring computations
# new environment variables
# modified environment variables
export CMAKE_... |
def top_words(text):
words = text.split()
word_counts = {}
# count the words in the given text
for word in words:
if word in word_counts.keys():
word_counts[word] += 1
else:
word_counts[word] = 1
# sort the words by count in descending order
sorted_words = sorted(word_counts.items(), k... |
const noop = function () {}
const config = {
max: Infinity,
directionKey: 'direction',
isSingleMode: true,
isDebugger: false,
getHistoryStack: noop,
setHistoryStack: noop,
}
export default config
|
<gh_stars>0
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@a... |
import java.sql.Connection;
import java.sql.DriverManager;
public class DBHandler {
Connection dbConnection;
public DBHandler() {
try {
Class.forName("com.mysql.jdbc.Driver");
dbConnection = DriverManager.getConnection(url, userName, password);
} catch (Exception e) {
e.printStackTrace();
}
}
pu... |
'use strict';
class EyeBagsRemoval {
enable() {
bnb.scene.enableRecognizerFeature(bnb.FeatureID.EYE_BAGS);
return this
}
disable() {
bnb.scene.disableRecognizerFeature(bnb.FeatureID.EYE_BAGS);
return this
}
}
exports.EyeBagsRemoval = EyeBagsRemoval;
|
require 'rubygems'
begin
require 'pryx'
rescue Exception => e
# it would be cool but-:)
end
require 'fileutils'
require 'rubygems'
require 'test/unit'
require 'tempfile'
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'linux/lxc'
class Lin... |
<reponame>planetsolutions/pa-front<filename>src/app/objects-list/setup/setup-dialog.component.ts
import {Component, EventEmitter, Input, OnInit, ViewChild} from '@angular/core';
import {BsModalRef} from 'ngx-bootstrap';
import {ResultMasterPanelTabColumn} from '../../index';
import {DisplayTypes} from '../objects-list.... |
<filename>src/renderer/global.d.ts
declare module '*.scss' {
const content: { [className: string]: string };
export default content;
}
declare const __static: string;
declare const loadlive2d: any;
declare const Live2D: any;
|
<filename>options.js
function save_options(){
var delay = document.getElementById("delay").value;
var limit = document.getElementById("limit").value;
chrome.storage.sync.set({
attemptDelay: delay,
attemptLimit: limit
}, function(){
var status = document.getElementById("status");
status.textCont... |
#!/bin/bash
echo "Starting to exec"
VERSION=1.0.0.M1-`date +%Y%m%d_%H%M%S`-VERSION
MESSAGE="[Concourse CI] Bump to Next Version ($VERSION)"
cd out
echo "$(ls -al)"
cp -r ../version/. ./
echo "Bump to ${VERSION}"
echo "${VERSION}" > version
git config --global user.email "${GIT_EMAIL}"
git config --global user.nam... |
import {getTasksRelationalDataDictionary, getTasks} from '../selectors/tasks';
export const UPDATE_TASK = 'UPDATE_TASK';
function _updateTask(id, diff) {
return (dispatch) => {
dispatch({type: UPDATE_TASK, id, diff});
}
}
export const DELETE_TASK = 'DELETE_TASK';
function _deleteTask(id) {
return ... |
// import { Document }. from 'mongoose';
export interface Tasks{
id?:string,
title?:string
} |
<filename>src/handlers/add-todo.js<gh_stars>0
'use strict';
const addToDoHandler = (event) => {
//console.log('ik ook ik ook');
event.preventDefault();
// event delegation!
const target = event.target;
if (target.nodeName !== 'INPUT' ) {
return;
}
if(event.keyCode === 13){
// update st... |
#!/usr/bin/env bash
set -o pipefail # trace ERR through pipes
set -o errtrace # trace ERR through 'time command' and other functions
set -o errexit ## set -e : exit the script if any statement returns a non-true return value
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
... |
#!/bin/sh
#
# Vivado(TM)
# runme.sh: a Vivado-generated Runs Script for UNIX
# Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
#
if [ -z "$PATH" ]; then
PATH=/home/varun/tools/XilinX/Vitis/2020.2/bin:/home/varun/tools/XilinX/Vivado/2020.2/ids_lite/ISE/bin/lin64:/home/varun/tools/XilinX/Vivado/2020.2/bin
els... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.