text stringlengths 1 1.05M |
|---|
# Import necessary libraries
import nltk
from nltk.sentiment.vader import SentimentIntensityAnalyzer
# Initialize the sentiment analyzer
sentiment_analyzer = SentimentIntensityAnalyzer()
# Define a function for sentiment analysis
def sentiment_analyze(text):
score = sentiment_analyzer.polarity_scores(text)
... |
<reponame>lixinrongNokia/GeneralManagement<gh_stars>0
package com.gzwl.demo.controller.sys;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframewo... |
import { Component, Output, OnInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
import { FirebaseService } from '../../../shared/services/firebase/firebase.service';
@Component({
selector: 'ra-participants-selector',
host: { 'class': 'ng-animate' },
styles: [`
:host {
display: flex;
... |
package io.opensphere.core.appl;
import java.util.Collection;
import java.util.Map;
import java.util.ServiceLoader;
import java.util.concurrent.ConcurrentHashMap;
import io.opensphere.core.UnitsRegistry;
import io.opensphere.core.preferences.Preferences;
import io.opensphere.core.preferences.PreferencesRegis... |
"""
ORY Keto
Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. # noqa: E501
The version of the OpenAPI document: v0.7.0-alpha.1
Contact: <EMAIL>
Generated by: https://openapi-generator.tech
"... |
import flask
from flask import Flask, request, render_template
app = Flask(name)
@app.route('/user', methods=['GET', 'POST'])
def user():
if request.method == 'GET':
name = request.args.get('name')
return render_template('user.html', name=name)
else:
post_data = request.form
# Update or create user profile
... |
<filename>client/src/app/project/list/project-list.component.ts
import { Component, EventEmitter, OnInit } from '@angular/core';
import { Apollo } from 'apollo-angular';
import { NgxSpinnerService } from 'ngx-spinner';
import {
getProjectListQueryGql,
GetProjectListQueryInterface,
GetProjectListQueryProject... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{
path: '',
loadChildren: () =>
import('./pages/home/home.module').then(mod => mod.HomeModule),
pathMatch: 'full',
data: {
meta: [
{
name: 'descript... |
#!/bin/bash
# This shell script converts BigQuery .sql files into PostgreSQL .sql files.
# String replacements are necessary for some queries.
export REGEX_SCHEMA='s/`physionet-data.(mimic_core|mimic_icu|mimic_derived|mimic_hosp).(.+?)`/\1.\2/g'
# Note that these queries are very senstive to changes, e.g. adding white... |
<reponame>npmccallum/krb5-pake<filename>src/client.c<gh_stars>1-10
/*
* Copyright (c) 2015 Red Hat, Inc.
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribut... |
#!/usr/bin/env bash
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
/*
* 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... |
#!/usr/bin/env bash
RootPath=$(cd $(dirname $0)/..; pwd)
Version=`git describe --abbrev=0 --tags 2>/dev/null`
BranchName=`git rev-parse --abbrev-ref HEAD 2>/dev/null`
CommitID=`git rev-parse HEAD 2>/dev/null`
BuildTime=`date +%Y-%m-%d\ %H:%M`
SrcPath=${RootPath}/libsdk
case `uname` in
Linux)
TargetFile=${... |
#!/bin/bash
# This script is meant to be called by the "install" step defined in
# build.yml. The behavior of the script is controlled by environment
# variables defined in the build.yml in .github/workflows/.
set -e
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update -qq
sudo apt-get install -qq gfor... |
<filename>src/main/scala/com/craftinginterpreters/lox/Resolver.scala<gh_stars>1-10
package com.craftinginterpreters.lox
import scala.collection.mutable
object Resolver {
private sealed trait FunctionType
private case object NONE extends FunctionType
private case object FUNCTION extends FunctionType
private c... |
<reponame>thiagopnts/audio-to-text-telegram-bot
const TelegramBot = require('node-telegram-bot-api');
const Speech = require('@google-cloud/speech');
const get = require('lodash.get');
const path = require('path');
const ffmpeg = require('fluent-ffmpeg');
const fs = require('fs');
const TOKEN = process.env.TELEGRAM_BO... |
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
if [ -z "$1" ]; then
echo "missing path to iso"
exit 1
fi
if [ "$(whoami)" != "root" ]; then
echo "missing sudo"
exit 1
fi
storagegb=16
memgb=2
cpus=1
MB=$[1024*1024]
GB=$[1024*$MB]
dd if=/dev/zero of=storage.img bs=$[1*$GB] count=$storagegb
xhyve ... |
#!/bin/bash
# usage: ./countdown.sh 10
# check that exactly one argument was given
if [[ $# -ne 1 ]]; then
echo "Error: Must provide one argument."
exit 1
fi
# print the countdown
number=$1
while [[ $number -gt 0 ]]; do
echo $number
number=$(($number-1))
done
echo "0" |
package baselib.base2;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.graphics.ColorFilter;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.gr... |
<filename>src/containers/ap/ApGuestRegister.tsx
import * as React from "react";
import { setAPImage } from "../../util/set-bg-image";
import FactaArticleRegion from '@facta/FactaArticleRegion';
import FactaNotitleRegion from "@facta/FactaNotitleRegion";
import { History } from 'history'
import DateTriPicker, { DateTri... |
package org.jooby.internal;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.jooby.MediaType;
import org.jooby.Renderer;
import org.jooby.test.MockUnit;
import org.jooby.test... |
(function(){
console.log('activated');
var prettify = angular.module('prettify', []);
prettify.controller('TableController', function TableController($scope, $http){
$http.get('tables.json').success(function(data){
$scope.tables = data;
$scope.tblOrderField = "record_count";
});
});
prettify.controlle... |
class <%= class_name %>Observer < ActiveRecord::Observer
def after_create(<%= file_name %>)
<%= class_name %>Mailer.deliver_signup_notification(<%= file_name %>)
end
def after_save(<%= file_name %>)
<% if options[:include_activation] %>
<%= class_name %>Mailer.deliver_activation(<%= file_name %>) if <%... |
<gh_stars>0
# -*- coding: utf-8 -*-
import sys
__author__ = 'pawel'
from xml.dom.minidom import parse
# Create the minidom document
class XMLreader:
def __init__(self,file):
xml_file = open(file)
self.doc = parse(xml_file)
#Metoda sprawdzająca czy dany plik XML jest plikiem opisu płytki
... |
/**
* User.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
schema: true,
attributes: {
name: {
type: 'string',
required: true
},
title: {
... |
import pandas as pd
import matplotlib.pyplot as plt
import math
files = ["./csv_files/interval_point_1.csv", "./csv_files/interval_point_2.csv" , "./csv_files/interval_point_4.csv",
"./csv_files/interval_point_5.csv"]
acc = [0.1,0.2,0.4,0.5]
for index,file_name in enumerate(files):
df = pd.read_csv (file_name)
... |
package io.quarkus.qson.runtime;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks a method to be called back for Qson setup and initialization when running within
* Quarkus. This method must ... |
CREATE FUNCTION get_words(input_string VARCHAR(255))
RETURNS TABLE
AS RETURN
SELECT * FROM
(SELECT SPLIT_STR(TRIM(input_string), ' ', 0)) AS words(word); |
<reponame>Tolgahan20/Furthersoft
var fps = 60,
interval = 1000 / fps,
lastTime = (new Date()).getTime(),
currentTime = 0,
delta = 0;
var mouseX = 0,
mouseY = 0,
mouseRadius = 100,
mousePower = 10,
particleDensity = 4,
particleStiffness = 0.15,
particleOffset = 0,
particleFri... |
<reponame>hengxin/jepsen-in-java<filename>src/test/java/core/checker/util/PerfTest.java
package core.checker.util;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
class PerfTest {
@Test... |
#!/bin/bash
#
# Copyright 2021 Google 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 agreed t... |
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/server'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/server/tsconfig.json'
}
}
};
|
<filename>src/app/auth/updateuser/updateuser.component.ts
import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
import { FormGroup, FormControl, Validators } from "@angular/forms";
import { TextField } from 'tns-core-modules/ui/text-field';
import { RouterExtensions } from "nativescript-a... |
<filename>src/actionTypes.js
const LOGOUT = 'LOGOUT'
const LOGIN_START = 'LOGIN_START'
const LOGIN_END = 'LOGIN_END'
const READ_POSTS_START = 'READ_POSTS_START'
const READ_POSTS_END = 'READ_POSTS_END'
export {
LOGOUT,
LOGIN_START,
LOGIN_END,
READ_POSTS_START,
READ_POSTS_END
} |
package controllers
import play.api._
import play.api.mvc._
import play.api.Play.current
object Application extends Controller {
def index = Action {
Ok(views.html.index())
}
def echoSocket = WebSocket.acceptWithActor[String, String] { request => out =>
actors.EchoSocketActor.props(out)
}
} |
// Before testing this case, it is necessary to run testtool/prepare.sh
// for replacing MockStub module in fabric project
package token
import (
"errors"
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/kenmazsyma/soila/chaincode/peer"
"github... |
#!/bin/bash
#编译完毕之后,拷贝gonc文件到桌面
source "exportenv.sh"
OBJ_DIR="${OBJECT_FILE_DIR_normal}/${ARCHS}"
ME=$(whoami)
DESKTOP="/Users/${ME}/Desktop"
DEFAULT_OBJ_DIR="/Users/${ME}/Desktop/mmobjs"
rm -rf ${DEFAULT_OBJ_DIR}
mkdir ${DEFAULT_OBJ_DIR}
#cp -r ${OBJ_DIR} ${DEFAULT_OBJ_DIR}
find ${OBJ_DIR} -name "*.gcno" -exec cp... |
#!/bin/bash
python setup.py install
mkdir ROSCO/build
cd ROSCO/build
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} ..
make install |
<filename>sql/updates/Rel18/12552_01_mangos_item_enchantment_template.sql<gh_stars>0
ALTER TABLE db_version CHANGE COLUMN required_c12484_01_mangos_string required_c12552_01_mangos_item_enchantment_template bit;
ALTER TABLE item_enchantment_template MODIFY COLUMN entry mediumint(8) NOT NULL DEFAULT '0'; |
package com.example.laura.quiz;
public class Opciones {
private static int numPreg;
private static String difficulty;
public static int getNumPreg() {
return numPreg;
}
public static void setNumPreg(int numPreg) {
Opciones.numPreg = numPreg;
}
public static String getDif... |
<filename>test/bulk_insert_test.rb<gh_stars>1-10
require 'test_helper'
class BulkInsertTest < ActiveSupport::TestCase
test "bulk_insert without block should return worker" do
result = Testing.bulk_insert
assert_kind_of BulkInsert::Worker, result
end
test "bulk_insert with block should yield worker" do
... |
export DB2_DB=lubm
export DB2_HOST=localhost
export DB2_PORT=50002
export DB2_USER=db2inst1
export DB2_PASSWORD=db2admin
export DB2_SCHEMA=db2inst1
export DB_ENGINE=db2
|
#! /bin/bash
#
# Run tests that aren't ran on CI (yet)
#
# to run all no-ci tests
# $ (plotly.js) ./tasks/noci_test.sh
#
# to run jasmine no-ci tests
# $ (plotly.js) ./tasks/noci_test.sh jasmine
# to run image no-ci tests
# $ (plotly.js) ./tasks/noci_test.sh image
#
# -----------------------------------------------
E... |
<reponame>wnbx/snail
package com.acgist.snail.net.torrent.peer;
import java.nio.ByteBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.acgist.snail.config.PeerConfig.ExtensionType;
import com.acgist.snail.context.exception.NetException;
import com.acgist.snail.pojo.session.PeerSession;
/**
... |
/*jslint node:true*/
module.exports = function (sequelize, Datatypes) {
"use strict";
var Episode = sequelize.define("Episode",
{
ShowId:
{
type: Datatypes.INTEGER,
allowNull: false,
primaryKey: true,
model: "Shows",
key: "id",
onDelete: ... |
#! /bin/bash
function run () {
bash ./run.sh $@
let "all_errors += $?"
cat failed.txt >> failed_all.txt
}
set_store_features
echo "features: "
echo "STORE_STATEMENT_ANNOTATION = ${STORE_STATEMENT_ANNOTATION}"
echo "STORE_INDEXED_TIMES = ${STORE_INDEXED_TIMES}"
echo "STORE_INDEXED_EVENTS = ${STORE_INDEXED_EVENTS... |
The code snippet is a function that takes an array of strings as an argument. It loops through each string in the array and retrieves the first letter of the string. It then checks the result object for a key that is equal to the first letter. If there is a key that matches the retrieved letter, the associated value wi... |
#!/bin/bash
python -c 'import tensorflow as tf; print(tf.__version__)' # for Python 2
|
<reponame>bludnic/lisk-sdk
/*
* Copyright © 2020 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copi... |
<gh_stars>1-10
package model
func NewErrorOnlyIterator(err error) Iterator {
return &ErrorOnlyIterator{err}
}
type ErrorOnlyIterator struct {
err error
}
func (self *ErrorOnlyIterator) Next(resultRef interface{}) bool {
return false
}
func (self *ErrorOnlyIterator) Err() error {
return self.err
}
|
<reponame>tsmvision/spring-security-examples
package com.example.corespringsecurity.controller.user;
import com.example.corespringsecurity.domain.dto.AccountDto;
import com.example.corespringsecurity.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.password.Passwor... |
.upper-right {
position: fixed;
top: 0;
right: 0;
font-size: 12px;
color: #fff;
padding: 10px;
} |
<reponame>YoucanyoudoIcanido/newsBeijing
package com.example.zhongweikang.beijingnew.newsDetailPage;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import an... |
#!/bin/sh
# install_agent.sh
# create xbaydns user and generate the ssh key.
# Created by Razor <bg1tpt AT gmail.com> on 2008-03-24.
# Copyright (c) 2008 xBayDNS Team. All rights reserved.
USER="xbaydns"
GROUP="xbaydns"
UID=60190
GID=60190
OSTYPE="`uname`"
KEYBITS=2048
INSTALLPATH="/data0/xbaydns"
MASTER_PUB="ssh-rsa... |
/* THIS FILE AUTO-GENERATED FROM astra_plugin_service_delegate.hpp.lpp. DO NOT EDIT. */
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com]
// Copyright (c) 2015 Orbbec 3D
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lic... |
#!/bin/sh
echo "Updating files"
git pull
echo "Installing/Upgrading requirements"
pip install -U -r requirements.txt
echo "Setting env vars"
# enter you own variables here
# discord bot key
export KEY_DISCORD="YOUR_KEY"
# fnbr.co api key
export KEY_FNBR="YOUR_KEY"
# fortnite tracker network api key
export KEY_TRACK... |
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* 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 applica... |
func deleteLocalCounters(countersIds: [String], _ completion: (Result<Void, Error>) -> Void) {
guard let managedContext = CounterWorker.getManagedContext() else {
completion(.failure(AppError(id: .coreData)))
return
}
let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: Counte... |
arr = [[ 8, 1, 6],
[ 3, 5, 7],
[ 4, 9, 2]]
print("Following is a 3x3 matrix :")
# printing given matrix in 3x3 format
for i in range(0, 3):
for j in range(0, 3):
print(arr[i][j], end = " ")
print()
# calculating sum of matrix
total = 0
for i in range(0, 3):
total += arr[i][... |
<filename>src/planner/binder/query_node/bind_setop_node.cpp
#include "duckdb/parser/expression/columnref_expression.hpp"
#include "duckdb/parser/expression/constant_expression.hpp"
#include "duckdb/parser/expression_map.hpp"
#include "duckdb/parser/query_node/select_node.hpp"
#include "duckdb/parser/query_node/set_oper... |
<gh_stars>0
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import goloco_pb2 as goloco__pb2
class LocationServiceStub(object):
"""---------------Location service----------
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""... |
var num1 = 4;
var num2 = 5;
var num3 = 3;
// Find the maximum of the three numbers
var max = Math.max(num1, num2, num3);
// Print the max number
console.log('The maximum number is ' + max); |
<reponame>yamozha/discord-bots
import discord
import asyncio
from discord.ext import commands
import youtube_dl
import os, glob, sys, re
from youtube_search import YoutubeSearch
import TenGiphPy
from config import TOKEN
g = TenGiphPy.Giphy(token='token for giphy')# yes i accidentally leaked mine here but it has been r... |
<gh_stars>0
import React from 'react';
import { Grid, LinearProgress, Card } from '@material-ui/core';
export default function LivePreviewExample() {
return (
<>
<div className="mb-spacing-6">
<Grid container spacing={6}>
<Grid item md={6} xl={3}>
<Card className="p-3">
... |
#include <stdio.h>
// I apologize I know i did really bad on this lab it just broke and I couldt work on it any more.
int main(void) {
char p,q,r ;
int i = 0;int j = 0;int k = 0;
int input = 0;
printf( "truth table\n" );
printf( "P \t Q \t R \t | f (p,q,r)\n" );
printf( "--------------------------\n");
for (i... |
'use strict';
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('jit-grunt')(grunt);
grunt.initConfig({
/*less: {
options: {
plugins: [new (require('../less-plugin-lists'))()]
},
regression: {
expand: t... |
<reponame>hapramp/1Rramp-Android
package com.hapramp.views.post;
import android.content.Context;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import androi... |
<gh_stars>0
package com.myproject.framework.mvp.ui.feed;
import com.myproject.framework.mvp.ui.base.BaseView;
import com.myproject.framework.mvp.ui.base.MvpPresenter;
/**
* Created by Nhat on 12/13/17.
*/
public interface FeedMvpPresenter<V extends BaseView> extends MvpPresenter<V> {
}
|
#ifndef CROW_CONSTEXPR_HEXER_H
#define CROW_CONSTEXPR_HEXER_H
#include <array>
#include <crow/hexer.h>
#include <ctype.h>
#include <igris/util/hexascii.h>
namespace crow
{
template <size_t N>
constexpr std::pair<std::array<char, N>, int>
constexpr_hexer(const std::array<char, N> &arr)
{
std::a... |
<reponame>hamdouni/agoutidemo<filename>main.go
package main
import (
"log"
"net/http"
"strconv"
)
func StartApp(p int) {
a := ":" + strconv.Itoa(p)
log.Fatal(http.ListenAndServe(a, http.FileServer(http.Dir("./"))))
}
func main() {
// Simple static webserver:
StartApp(8888)
}
|
<reponame>Zurdge/react-bootstrap
import { mount } from 'enzyme';
import Form from '../src/Form';
import FormGroup from '../src/FormGroup';
describe('<Form>', () => {
it('should support custom `as`', () => {
mount(
<Form as="fieldset" className="my-form">
<FormGroup />
</Form>,
)
.a... |
#!/bin/sh
# 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... |
/*
Author: <NAME>
Controls:
Down: 2 | Rotate: R | Triangle: T | Leaf: M
Left: 4 | AntiRotate: E | Quad: Q | Quit: X
Right: 6 | ScaleUp: S | Polygon1: O |
Up: 8 | ScaleDown: D | Polygon2: P |
*/
#include <windows.h>
#incl... |
<reponame>navikt/nav-analytics<filename>src/versioning/signature.js
const rules = require('./rules');
const createChecksum = require('./create-checksum');
const os = require('os');
class Signature {
constructor() {
this.checksums = new Map();
}
add(what, rule) {
const checksum = createChecksum(what);
... |
#!/bin/bash
testrpc &
|
TERMUX_PKG_HOMEPAGE=https://mariadb.org
TERMUX_PKG_DESCRIPTION="A drop-in replacement for mysql server"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2:10.6.4
TERMUX_PKG_SRCURL=http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-${TERMUX_PKG_VERSION:2}/source/mariadb-${TERMUX_P... |
/*
* This file is part of inertia, licensed under the MIT License (MIT).
*
* Copyright (c) vectrix.space <https://vectrix.space/>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), t... |
#!/bin/sh
docker run \
--detach \
--hostname ${JENKINS_HOSTNAME:=`hostname -f`} \
--restart always \
--name ${JENKINS_CONTAINER_NAME:=jenkins} \
--publish ${JENKINS_HTTP_PORT:=8080}:8080 \
--publish ${JENKINS_SLAVE_PORT:=50000}:50000 \
--volume ${JENKINS_HOME_DIR:=/srv/jenkins}:/var/jenkins_home:Z \
dralog/jen... |
/*
* File: ServantServerRegister.cpp
* Author: <NAME>
*
* Created on 2010_9_6 PM 3:23
*/
#include "Log.h"
#include "NodeDefines.h"
#include "AppConfig.h"
#include "ServantServerRegister.h"
#include "ServantStubImp.h"
#include "ProcessStatus.h"
#include "ServantModule.h"
using namespace mdl;
using namespace evt;... |
<reponame>insad/jworkflow
package net.jworkflow.kernel.services.test;
import net.jworkflow.kernel.services.MemoryPersistenceService;
import net.jworkflow.kernel.services.abstractions.PersistenceServiceTest;
import org.junit.Test;
import net.jworkflow.kernel.interfaces.PersistenceService;
public class MemoryPersistence... |
"""
Generate a program using Python which collects environmental data from a list of cities and organizes it in a table.
"""
import requests
# API key for openweathermap
KEY = '123456789'
def get_weather_data(cities):
weather_data = []
for city in cities:
url = 'http://api.openweathermap.org/data/2.... |
// Copyright 2006, 2007, 2010, 2014 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... |
#!/bin/bash
. $(dirname "${BASH_SOURCE[0]}")/common.sh
DOCKER_RUN_ARGS="run --rm -i -e RUMP_VERBOSE=1 -e DEBUG=1 --runtime=runu-dev --net=none $DOCKER_RUN_ARGS_ARCH"
# prepare RUNU_AUX_DIR
create_runu_aux_dir
# update daemon.json
fold_start test.dockerd.0 "boot dockerd"
if [ $TRAVIS_OS_NAME = "linux" ] ; then
... |
from typing import List
def extract_unique_parameters(parameter_list: List[str]) -> List[str]:
unique_parameters = []
seen = set()
for param in parameter_list:
if param not in seen:
unique_parameters.append(param)
seen.add(param)
return unique_parameters |
#!/bin/bash -e
# VARIABLES PASSED FROM JENKINS:
#
#
#
SOURCE_FILE=$NAME-$VERSION.tar.gz
module load ci
echo $SOFT_DIR
echo $WORKSPACE
echo $SRC_DIR
echo $NAME
echo $VERSION
#module load gcc/4.8.2
if [[ ! -s $SRC_DIR/$SOURCE_FILE ]]
then
echo "getting the file from the web"
mkdir -p $SRC_DIR
wget http://... |
# frozen_string_literal: true
require_relative "../support/command_testing"
using CommandTesting
describe "bootsnap compatibility" do
it "works" do
skip if defined? JRUBY_VERSION
cache_path = File.join(__dir__, "fixtures", "bootsnap", "tmp")
if File.directory?(cache_path)
FileUtils.rm_rf(cache_p... |
<filename>src/components/Card/index.tsx
import styled from 'styled-components'
export const Card = styled.div`
display: flex;
flex-flow: column nowrap;
justify-content: flex-start;
overflow: hidden;
background: ${({ theme }) => theme.bg0};
box-shadow: ${({ theme }) => theme.boxShadow1};
border-radius: 15... |
<gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_chrome_reader_mode = void 0;
var ic_chrome_reader_mode = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M-74 29h48v48h-48V29zM0 0h24v24H0V0zm0 0h24v24H0V0z",
"fill"... |
# This is the custom theme template for gitprompt.sh
# These are the defaults from the "Default" theme
# You just need to override what you want to have changed
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="Custom"
Time12a="\$(date +%H:%M:%S)"
# PathShort="\w";
REMOTE_USER="\u" # Username
REMOTE_HO... |
import React, { Component } from 'react'
import TransitionGroup from 'react-transition-group/TransitionGroup'
import Transition from 'react-transition-group/Transition'
import sizeMe from 'react-sizeme'
import uuid from 'uuid'
import AngelElement from '../components/AngelElement.js'
import AngelExpanded from '../compo... |
<gh_stars>0
# Copyright (c) [2022] Huawei Technologies Co.,Ltd.ALL rights reserved.
# This program is licensed under Mulan PSL v2.
# You can use it according to the terms and conditions of the Mulan PSL v2.
# http://license.coscl.org.cn/MulanPSL2
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTI... |
<p>The quick brown fox jumped over the lazy dog.</p> |
<reponame>dailynodejs/ice-scripts<filename>packages/ice-plugin-dll/index.js
const webpack = require('webpack');
const path = require('path');
const buildDll = require('./lib/buildDll');
module.exports = async ({ chainWebpack, context, log }) => {
const { rootDir, command, pkg } = context;
// only active in dev mod... |
#!/bin/bash
./node_modules/protractor/bin/protractor tests/protractor_config.js |
#!/bin/bash
source tests/helpers.bash
function setUp(){
_make deploy_elasticsearch 1>/dev/null
_getProtocol 1>/dev/null
_elasticsearchHealth 1>/dev/null
}
function tearDown(){
_debug
_make undeploy_elasticsearch 1>/dev/null
}
function test_only_static_fields(){
description="[${BASHT_TEST_FILENAME##*/}]... |
#!/bin/bash
mkdir build
cd build
python_path=$(which python)
# Configure step
cmake -GNinja .. -DPYTHON_EXECUTABLE:FILEPATH=$python_path \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib
# Build step
ninja install
|
<reponame>janis-jenny/The-Jungle-Game
import Phaser from 'phaser';
import BootScene from './scenes/BootScene';
import PreloaderScene from './scenes/PreloaderScene';
import MainScene from './scenes/MainScene';
import GameOver from './scenes/GameOver';
import ScoreBoard from './scenes/ScoreBoard';
import './css/styleshee... |
#!/usr/bin/env bash
set -e
usage() {
echo "$0 <repo> <tag> [<release name>]" >&2;
}
if [ "$1" = "-h" -o "$1" = "--help" ]; then
usage
exit 1;
fi
if [ -z "$1" ]
then
REPO=$(git ls-remote --get-url origin | \
sed -u 's/git@//g; s/https:\/\///g; s/github.com\///g; s/\.git//g')
else
REPO=$1
fi
if [ -z "$2"... |
<reponame>agrista/playframework<filename>documentation/manual/javaGuide/main/global/code/javaguide/global/onerror/Global.java
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package javaguide.global.onerror;
import javaguide.global.views;
//#global
import play.*;
import play.mvc.*;
import pla... |
<gh_stars>10-100
/**
*
*/
package jframe.pay.http.handler;
import java.util.Map;
import io.netty.handler.codec.http.HttpHeaders;
import jframe.pay.domain.http.RspCode;
/**
* @author dzh
* @date Aug 15, 2014 7:42:11 PM
* @since 1.0
*/
public abstract class SafeHandler extends AbstractHandler {
/**
* ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.