text stringlengths 1 1.05M |
|---|
#!/bin/bash
# Erstellt WebExpress
export PATH=$PATH:/usr/share/dotnet-sdk/
export DOTNET_ROOT=/usr/share/dotnet-sdk/
dotnet build --configuration Release
#dotnet publish
|
<gh_stars>1-10
Ext.define('Scalr.ui.FarmRoleEditorTab.Scripting', {
extend: 'Scalr.ui.FarmRoleEditorTab',
tabTitle: 'Orchestration',
itemId: 'scripting',
layout: 'fit',
tabData: null,
getDefaultValues: function (record) {
record.set('scripting', []);
return {};
},
bef... |
#!/bin/bash
# Copyright 2019 Google LLC
#
# 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 ... |
ELLIPSIS_VERSION=1.19.11
|
#!/bin/bash
/opt/bin/generate_config > /opt/selenium/config.json
if [ ! -e /opt/selenium/config.json ]; then
echo No Selenium Node configuration file, the node-base image is not intended to be run directly. 1>&2
exit 1
fi
# In the long term the idea is to remove $HUB_PORT_4444_TCP_ADDR and $HUB_PORT_4444_TCP_POR... |
#! /bin/bash
diff -rq . /Users/csev/dev/sakai-scripts/trunk/basiclti/tsugi-util | grep '.java differ$' | awk '{ print "diff ", $2, $4 }'
|
# Function to reverse each word
def word_reverse(s) :
# Splitting each word
words = s.split()
rev_str = ""
for word in words:
# Reversing each word
rev_str += word[::-1] + " "
return rev_str |
<reponame>kll5h/ShinetechOA
CREATE TABLE GROUP_TYPE(
ID BIGINT NOT NULL,
NAME VARCHAR(50),
TENANT_ID VARCHAR(64),
CONSTRAINT PK_GROUP_TYPE PRIMARY KEY(ID)
) ENGINE=INNODB CHARSET=UTF8;
|
import React, {Component} from 'react';
import './Footer.less';
class Footer extends Component{
render(){
return (
<div className="site-footer">
<div className="site-footer__inner">
Le Foot
</div>
</div>
)
}
}
export def... |
public class StairwayToHeaven {
// Assuming 'n' is not below 1
private int stairwayToHeaven(int n){
// Initializing ways array
int[] ways = new int[n + 1];
ways[0] = 1;
ways[1] = 1;
for(int i = 2; i <= n; i++){
ways[i] =... |
#!/bin/sh -ex
echo "running cloudrunfastapi-postgres"
docker run --rm --name=cloudrunfastapi-postgres -d -p 5432:5432 \
-e POSTGRES_USER=cloud \
-e POSTGRES_PASSWORD=run \
-e POSTGRES_HOST_AUTH_METHOD=password \
-e POSTGRES_DB=cloudrunfastapi \
postgres:10.5
|
<gh_stars>100-1000
package com.wyp.materialqqlite.qqclient.protocol.protocoldata;
import org.json.JSONObject;
public class UploadCustomFaceResult {
public int m_nRetCode;
public String m_strRemoteFileName;
public void reset() {
m_nRetCode = 0;
m_strRemoteFileName = "";
}
public boolean parse(byte[] bytDa... |
#!/bin/bash
set -ex
source "/tmp/venv/bin/activate"
DIR=$(dirname $0)
# confirm python version
python --version
FRAMEWORK="${CIRCLE_JOB}"
if [[ "${CIRCLE_JOB}" =~ (.*)-py((2|3)\.?[0-9]?\.?[0-9]?) ]]; then
FRAMEWORK=${BASH_REMATCH[1]}
fi
case ${FRAMEWORK} in
PYTORCH)
sh ${DIR}/tests/test_pytorch.sh
;;... |
<filename>tests/cmd_app_touch/touch/src/log/Logger.js
//<feature logger>
/**
* @class Ext.Logger
* Logs messages to help with debugging.
*
* ## Example
*
* Ext.Logger.deprecate('This method is no longer supported.');
*
* @singleton
*/
(function() {
var Logger = Ext.define('Ext.log.Logger', {
extend: '... |
/*
* MIT License
*
* Copyright (c) 2021 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, mod... |
//
// KtMainTableViewDataSource.h
// KtTableView
//
// Created by bestswifter on 16/4/13.
// Copyright © 2016年 zxy. All rights reserved.
//
#import "KtTableViewDataSource.h"
@interface KtMainTableViewDataSource : KtTableViewDataSource
@end
|
<filename>RRTS/HttpUnit/httpunit-1.7/src/com/meterware/httpunit/dom/HTMLSelectElementImpl.java
package com.meterware.httpunit.dom;
/********************************************************************************************************************
* $Id: HTMLSelectElementImpl.java 902 2008-04-04 19:12:18Z wolfgang_fa... |
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.editor.diagram.commands;
import com.archimatetool.editor.model.commands.EObjectFeatureCommand;
import com.archimat... |
<filename>lib/ruby/truffle/mri/cgi/util.rb
require_relative '../../stdlib/cgi/util'
|
<reponame>m-nakagawa/sample
/*
* 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 ... |
USER=`whoami`
LINE=`cat /home/${USER}/.mbox.line`
MSG=`mail -f -p | tail -n +${LINE} | tail -n +2`
JSON="{ \"text\": \"$MSG\" }"
RES=`curl -s -X POST -H 'Content-Type: application/json' -d "$JSON" $SLACK_WEBHOOK_API_URL`
#echo $RES
mail -f -p | wc -l > /home/${USER}/.mbox.line
|
termux_step_create_pacman_package() {
local TERMUX_PKG_INSTALLSIZE
TERMUX_PKG_INSTALLSIZE=$(du -bs . | cut -f 1)
# From here on TERMUX_ARCH is set to "all" if TERMUX_PKG_PLATFORM_INDEPENDENT is set by the package
[ "$TERMUX_PKG_PLATFORM_INDEPENDENT" = "true" ] && TERMUX_ARCH=any
# Configuring the selection of a ... |
import math
def solve_quadratic(a, b, c):
# calculate discriminant
d = (b**2) - (4*a*c)
# find two solutions
sol1 = (-b-math.sqrt(d))/(2*a)
sol2 = (-b+math.sqrt(d))/(2*a)
return sol1, sol2 |
package istu.bacs.background.combined;
import istu.bacs.background.combined.db.SubmissionService;
import istu.bacs.db.submission.Submission;
import istu.bacs.db.submission.Verdict;
import istu.bacs.externalapi.ExternalApi;
import istu.bacs.rabbit.QueueName;
import istu.bacs.rabbit.RabbitService;
import lombok.extern.s... |
#!/usr/bin/env bash
##############
# Install deps
##############
# Ubuntu
apt-get update
apt-get install python-pip jq -y
#####################
# Amazon Linux (RHEL) - NAT instances
yum update
yum install python-pip jq -y
#####################
pip install --upgrade awscli
##############
cat <<"EOF" > /home/${ssh_u... |
<reponame>JimBae/pythonTips<filename>04_map_filter_reduce.py
import os
import sys
#* map
#* filter
#-----------
# * map
#-----------
# map 은 입력 리스트의 모든 항목에 함수를 적용한다.
#
# map(function_to_apply, list_of_inputs)
# without map
itemList = [1,2,3,4,5]
resultList = []
for each in itemList:
resultList.append(each**2)
pr... |
<gh_stars>0
import request from '@/utils/request'
const BASE_API_6 = process.env.VUE_APP_BASE_API_6// yunw
const BASE_API_3 = process.env.VUE_APP_BASE_API_3// wuming
const BASE_API_4 = process.env.VUE_APP_BASE_API_4 // lixianzhao
// 云台控制
export function ptz(params) {
return request({
url: '/video/ptz/ptz',
... |
package com.firoz.mymvpboilerplate.presenter;
import com.firoz.mymvpboilerplate.IConnections;
import com.firoz.mymvpboilerplate.interactor.MainInteractor;
/**
* Created by firoz on 1/4/17.
*/
public class MainPresenter implements IConnections.MyPresenter, IConnections.Callback {
private IConnections.MyView vi... |
package org.glamey.training.codes.tree;
import java.util.LinkedList;
import java.util.Queue;
/**
* 给定两个二叉树,想象当你将它们中的一个覆盖到另一个上时,两个二叉树的一些节点便会重叠。
* <p>
* 你需要将他们合并为一个新的二叉树。合并的规则是如果两个节点重叠,那么将他们的值相加作为节点合并后的新值,否则不为 NULL 的节点将直接作为新二叉树的节点。
* <p>
* 示例 1:
* <p>
* 输入:
* Tree 1 Tree 2
* 1 ... |
source_sh ${srcdir}/emulparams/elf64_ia64.sh
TEXT_START_ADDR="0x2000000000000000"
unset DATA_ADDR
unset SMALL_DATA_CTOR
unset SMALL_DATA_DTOR
source_sh ${srcdir}/emulparams/elf_fbsd.sh
|
#!/usr/bin/env bash
cd ../..
git push
|
<reponame>OS2World/LIB-GRAPHICS-The_Mesa_3D_Graphics_Library<filename>src/MesaDLL/accum.cpp<gh_stars>0
/* $Id: accum.c,v 1.39 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 4.1
*
* Copyright (C) 1999-2002 <NAME> All Rights Reserved.
*
* Permission is hereby granted, free of cha... |
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
with open("requirements.txt", 'r') as f:
install_requires = [line.strip() for line in f.readlines()]
setuptools.setup(
name="qualg",
version="0.1.0",
author="<NAME>",
author_email="<EMAIL>",
description="Symbo... |
const _ = require("lodash");
const jwt = require("jsonwebtoken");
const config = require("../utils/logchimpConfig")();
/**
* Generate JWT token
*
* @param {*} data
* @param {*} payload
*
* @returns {string} JWT token
*/
const createToken = (data, payload) => {
const secretKey = config.server.secretKey;
const... |
#include <iostream>
#include <vector>
#include <string>
class SnapshotManager {
public:
void takeSnapshot(const std::vector<std::pair<int, int>>& nets) {
// Format the snapshot according to the specified "interface"
std::string snapshot = formatSnapshot(nets);
// Store or process t... |
<reponame>slai11/mahjong<gh_stars>1-10
package main
import "fmt"
// Move represents what the user will send to the server
type Move struct {
Player `json:"player"`
Action `json:"action"`
Tile int `json:"tile"`
TurnNumber int `json:"turn_number"`
}
type LastWinningHand struct {
Player `json:"p... |
import os
import sys
import requests
import zipfile
import io
# Check if Python 3 is installed
if sys.version_info[0] < 3:
print("Python 3 is required to run this script.")
sys.exit(1)
# Check if kind is already installed
if os.system("kind version") == 0:
print("kind is already installed.")
sys.exit(... |
<reponame>aaronoe/space_launch_manifest
package com.aaronoe.android.spacelaunchmanifest.Launches.MainLaunches;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.support.design.widget.FloatingActionButton;
import android.view.LayoutInflater;
import android.view.View;
imp... |
<gh_stars>0
/*
Copyright 2019 The Ceph-CSI 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 law or agreed to in... |
#!/system/bin/sh
# Copyright (c) 2012-2013, 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# ... |
<reponame>PhotogramProject/front-end
import {ToastrService} from '../../services/toastr/toastr.service';
import {AuthService} from '../../services/auth/auth.service';
import {DataService} from '../../services/data/data.service';
import {MapService} from '../../services/map/map.service';
import {JourneyService} from '..... |
public class ArmstrongNumbers {
public static boolean isArmstrongNumber(int num) {
int originalNum, remainder, result = 0;
originalNum = num;
while (originalNum != 0)
{
remainder = originalNum % 10;
result = result + (remainder * remainder * remainder);
originalNum = originalNum/10;
}
retur... |
package cucumber.runtime.groovy;
import cucumber.runtime.io.ResourceLoader;
import org.codehaus.groovy.runtime.MethodClosure;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static org.junit.Assert.assertEq... |
<gh_stars>100-1000
// Copyright 2018 Red Hat.
//
// 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 ... |
;(() => {
defineColor()
let R = document.querySelector('#redRange')
let G = document.querySelector('#greenRange')
let B = document.querySelector('#blueRange')
R.addEventListener('input', defineColor)
G.addEventListener('input', defineColor)
B.addEventListener('input', defineColor)
})()
fu... |
Select course_ID
from university.section
where (semester = 'Fall' and year = '2009')
union
select course_ID
from university.section
where (semester = 'Spring' and year = '2010'); |
#!/bin/bash
set -eux
cleanup () {
if [[ -n "${outdir:-}" ]] ; then
rm -rf $outdir
fi
}
trap cleanup EXIT
outdir=$(mktemp -d gearman.XXXXXXXX)
export TMPDIR=$outdir
outfile=$(mktemp -t gearman.ab.XXXXXXXX)
outfile2=$(mktemp -t gearman.zz.XXXXXXXX)
infile=$(mktemp -t gearman.ab.in.XXXXXXXX)
infile2=$(mkt... |
<filename>TrafficFlowClassification/data/dataLoader.py
'''
@Author: <NAME>
@Date: 2021-01-07 11:06:49
@Description: 用来加载 Pytorch 训练所需要的数据
@LastEditTime: 2021-02-06 19:53:20
'''
import torch
import numpy as np
from TrafficFlowClassification.TrafficLog.setLog import logger
def data_loader(pcap_file, statistic_file, la... |
package me.eirinimitsopoulou.bakingapp.Utils;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
/**
* Created by eirinimitsopoulou on 30/05/2018.
*/
pub... |
<filename>src/lib/tools.h<gh_stars>1-10
/*
* tools.h
*
* Created on: Dec 15, 2017
* by: <NAME>
*
* This file implements some utility functions
*/
#ifndef SRC_LIB_TOOLS_H_
#define SRC_LIB_TOOLS_H_
#include <sys/time.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#inc... |
import { getRootElement, settled } from '@ember/test-helpers';
import { assert } from '@ember/debug';
import MediumEditor from 'medium-editor';
const EMBER_MEDIUM_EDITOR_SELECTOR = '.ember-medium-editor__container';
function nextTickPromise() {
return new Promise((resolve) => {
setTimeout(resolve);
});
}
exp... |
<reponame>NCC-AI/ncc
from .image import random_colors, apply_mask
from .palette import palettes
|
import json
import os
import re
import socket
import sys
from codecs import encode, decode
from . import shared
dir_path = os.path.dirname(os.path.realpath(__file__))
tlds = None
dble_ext_str = "chirurgiens-dentistes.fr,in-addr.arpa,uk.net,za.org,mod.uk,org.za,za.com,de.com,us.com,hk.org,co.ca," \
"a... |
#!/usr/bin/env bash
set -e
set -o pipefail
SCRIPT_DIR=$(dirname $0)
TAGS="1.1.0-pg11 1.1.1-pg11 1.2.0-pg11 1.2.1-pg11 1.2.2-pg11"
TEST_VERSION="v2"
TAGS=$TAGS TEST_VERSION=$TEST_VERSION bash ${SCRIPT_DIR}/test_updates.sh
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
exit $EXIT_CODE
fi
TAGS="1.3.0-pg11 1.3.1-pg11 1... |
# Importing Libraries
import numpy as np
import pandas as pd
# Importing dataset
fruits_dataset = pd.read_csv("fruits.csv")
X = fruits_dataset.iloc[:, :10].values
y = fruits_dataset.iloc[:, 10].values
# Splitting the dataset into training and testing set
from sklearn.model_selection import train_test_split
X_tr... |
# Copyright 2017, AppDynamics LLC and its affiliates
#
# 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 ag... |
// Criar um objeto Postagem de blog que vai contem as seguintes propriedades
// postagem
/*
titulo
mensagem
autor
vizualisações
comentarios
(autor, mensagem)
estaAoVivo
*/
let postagem = {
titulo: 'a',
mensagem: 'b',
autor: 'c',
vizualisacoes: 10,
comentarios: [
{ autor: 'a', mensag... |
<filename>open-sphere-base/mantle/src/main/java/io/opensphere/mantle/mp/event/impl/RootMapAnnotationPointGroupRemovedEvent.java<gh_stars>10-100
package io.opensphere.mantle.mp.event.impl;
import io.opensphere.mantle.mp.AbstractMapAnnotationPointGroupChangeEvent;
import io.opensphere.mantle.mp.MutableMapAnnotationPo... |
SELECT Name, SUM(Sales) AS TotalSales
FROM Products
WHERE Year = 2018
GROUP BY Name
ORDER BY TotalSales DESC
LIMIT 10; |
print("========== Example 1 ==========")
team_members = ["Carlos", "Antonio", "Daniel", "Dominika", "Michael"]
print(team_members)
team_members.append(input("Enter new member: "))
print(team_members)
for state in team_members:
print("Team member: " + state)
print("========== Example 2 ==========")
even_numbers ... |
#!/bin/sh
cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .
make -j4
cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
make -j4
|
<reponame>pipern/Trans-hadoop-release-HDP-2.6.0.3-8
/**
* 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... |
#!/usr/bin/env bash
source ~/ENV/bin/activate
cd ~/MultiModesPreferenceEstimation
python tune_parameters.py --data-dir data/netflix/ --save-path netflix/tuning_general/mmp-part91.csv --parameters config/netflix/mmp-part91.yml
|
<reponame>sjdodge123/interstellar-online
var express = require('express')
, http = require('http');
var app = express();
var path = require('path');
app.use(express.static(path.join(__dirname, 'public')));
var server = http.createServer(app);
var io = require('socket.io').listen(server);
var objects = require("./pub... |
package org.multibit.hd.ui.views.wizards.language_settings;
import com.google.common.base.Optional;
import org.multibit.hd.ui.views.wizards.AbstractWizard;
import org.multibit.hd.ui.views.wizards.AbstractWizardPanelView;
import java.util.Map;
/**
* <p>Wizard to provide the following to UI for "edit contact" wizard:... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.u1F4B4 = void 0;
var u1F4B4 = {
"viewBox": "0 0 2600 2760.837",
"children": [{
"name": "path",
"attribs": {
"d": "M2373 764q25 0 42 17t17 42v1192q0 25-17 42t-42 17H226q-23 0-41-17t-18-42V823q0-25 18-42t41-17h2147zm... |
public class MyClass {
private boolean bReset;
private Object Opl;
private Object Opr1;
public boolean ProcessAndCheck(boolean check, String agentType, boolean clear, String method, String property) {
bReset |= ((SomeClass) Opl).ResetMembers(check, agentType, clear, method, property);
r... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
package mindustry.core;
import java.util.Iterator;
import arc.ApplicationListener;
import arc.Events;
import arc.ai.GdxAI;
import arc.ai.msg.MessageManager;
import arc.util.Time;
import arc.util.Tmp;
import mindustry.annotations.Annotations.Loc;
import mindustry.annotations.Annotations.Remote;
import mindustry.conten... |
<gh_stars>1-10
package net.runelite.api;
/**
* @author Kris | 10/12/2021
*/
public interface MoveSpeed {
byte speed();
}
|
#!/bin/sh
set -o errexit
set -o nounset
IFS=$(printf '\n\t')
INFO="INFO: [$(basename "$0")] "
echo "$INFO" "Booting in ${SC_BOOT_MODE} mode ..."
echo "$INFO" "User :$(id "$(whoami)")"
echo "$INFO" "Workdir : $(pwd)"
#
# DEVELOPMENT MODE
#
# - prints environ info
# - installs requirements in mounted volume
#
if [ "$... |
<reponame>Marmelatze/docker-controller<gh_stars>1-10
package de.schub.marathon_scaler.Customer;
import com.google.gson.Gson;
import de.schub.marathon_scaler.Monitoring.MarathonMonitor;
import mesosphere.marathon.client.model.v2.App;
import mesosphere.marathon.client.model.v2.Group;
import java.util.HashMap;
import ja... |
import asyncio
import logging
async def delete_table(table_name):
# Simulate table deletion by awaiting a coroutine
await asyncio.sleep(1)
if table_name == "error_table":
raise ValueError("Table deletion failed")
return 100 # Simulated number of rows deleted
async def delete_tables(table_name... |
// Generated by script, don't edit it please.
import createSvgIcon from '../../createSvgIcon';
import HandORightSvg from '@rsuite/icon-font/lib/legacy/HandORight';
const HandORight = createSvgIcon({
as: HandORightSvg,
ariaLabel: 'hand o right',
category: 'legacy',
displayName: 'HandORight'
});
export default ... |
package io.opensphere.wps.ui.detail.bbpicker;
import java.awt.Dialog;
import java.awt.EventQueue;
import java.awt.Window;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringPro... |
termux_step_start_build() {
TERMUX_STANDALONE_TOOLCHAIN="$TERMUX_COMMON_CACHEDIR/android-r${TERMUX_NDK_VERSION}-api-${TERMUX_PKG_API_LEVEL}"
# Bump the below version if a change is made in toolchain setup to ensure
# that everyone gets an updated toolchain:
TERMUX_STANDALONE_TOOLCHAIN+="-v4"
# shellcheck source=/... |
Template.Storages.events({
'click #addStorage': function (event) {
event.preventDefault();
Session.set('storageInScope', {});
$("#createStorage input").val('');
$('#storageCreateModal').modal('show');
},
'click tbody > tr': function (event) {
event.preventDefault();
var dataTable = $(event.... |
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { LoginModel, newUser, passwordChange, Token } from '../Structures/structures';
@Injectable({
providedIn: 'root'
})
export class LoginService {
constructor(private http: HttpCli... |
#!/bin/bash
# Start Consul in dev mode with UI.
# The `advertise` address will default to the IP address assigned to the `enp0s8` interface.
# DNS interface is available on port 53 (default DNS port) so we can reference it from `/etc/resolv.conf`
sudo consul agent \
-dev \
-ui \
--data-dir=/opt/consul \
--adv... |
package impl
import (
"fmt"
"reflect"
"strings"
sqldb "github.com/domonda/go-sqldb"
)
// Insert a new row into table using the values.
func Insert(conn sqldb.Connection, table, argFmt string, values sqldb.Values) error {
if len(values) == 0 {
return fmt.Errorf("Insert into table %s: no values", table)
}
na... |
//此模块:获取平台属性的数据模块
import request from '@/utils/request'
//获取一级分类数据 url:/admin/product/getCategory1 请求方式:get
export const reqCategory1List = () => request({ url: '/admin/product/getCategory1', method: 'get' })
//获取二级分类数据 url:/admin/product/getCategory2/{category1Id} 请求方式:get
export const reqCategory2List = (cat... |
#!/bin/bash
# TODO description.
# Author: Spencer M. Richards
# Autonomous Systems Lab (ASL), Stanford
# (GitHub: spenrich)
for seed in {0..9}
do
for M in 2 5 10 20 30 40 50
do
echo "seed = $seed, M = $M"
python test_all.py $seed $M
done
done
|
import numpy as np
def LinkProbability(A, D):
"""
Calculate the link probability based on the given inputs.
Args:
A: numpy array, matrix representing the links between points (expected to be in upper triangular form)
D: numpy array, matrix of distances between points
Returns:
p: numpy arr... |
import java.util.*;
import java.io.*;
import java.lang.*;
import org.apache.commons.math3.ml.classification.SVM;
public class ClassificationExample {
static double[][] trainingData = {{1.2, 5.1}, {2.4, 6.7},
{0.8, 3.7}, {1.1, 4.5}};
static double[] labels = {0, 1, 0, 1... |
Object-Oriented programming is a programming paradigm based around the concept of objects, which encapsulate data and functionality, and can be used to model real-world concepts. It involves understanding complex concepts such as classes, inheritance, overriding, polymorphism, and encapsulation. |
import styles from './index.module.css';
import Layout from './layout';
const logo = require('./assets/variant.svg');
const varianthuset = require('./assets/varianthuset.png');
export default function Home() {
return (
<Layout>
<Wrapper mode="purple" className={styles.page1}>
<Content mode="right_... |
<gh_stars>0
import config from 'config';
import {authHeader} from '../_helpers';
import axios from 'axios';
import api from './api';
export const toolService = {
getAll
}
function getAll() {
var auth = JSON.parse(localStorage.getItem('user'));
var conf = { headers: {
'Content-Type': 'application/... |
package csbufio
import (
"bufio"
"io"
"os"
)
type (
bufWriteCloser struct {
*bufio.Writer
c io.Closer
}
)
func OpenWriter(name string) (io.WriteCloser, error) {
f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE, 0665)
if err != nil {
return nil, err
}
return NewWriter(f), nil
}
// NewWriter is a io.W... |
#!/bin/bash
gcloud compute instances stop \
doughnut-app-instance doughnut-db-instance \
--zone us-east1-b
|
export const environment = {
production: true,
appVersion: require('../../package.json').version,
gaMeasurementId: 'G-B3JBT7SCC8'
};
|
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRO... |
<reponame>d2s/visual-vocabulary
function makeChart(data, stylename, media, plotpadding, frames, legAlign, yAlign, numberOfColumns, numberOfRows, xMin, xMax, yAxisHighlight, numTicksy, coloursOverride){
var titleYoffset = d3.select("#"+media+"Title").node().getBBox().height
var subtitleYoffset=d3.select("#"+media+... |
/**
* Copyright (c) <NAME>
* Copyright (c) 2015, PHOENIX
*
*
*
*/
var exec = require('cordova/exec'),
cordova = require('cordova');
var POWERPlugin = function () {
};
POWERPlugin.prototype.goBKModlule = function (successCallback, errorCallback,options) {
if (errorCallback == null) {
errorCa... |
import React, { Fragment } from 'react';
import { NavBar, Footer } from 'Component';
import { compose } from 'redux';
import { withStyles } from 'material-ui/styles';
import Markdown from 'react-markdown';
import styles from './styles';
import scoreSource from './score';
const defaultCover =
'https://encrypted-tbn... |
print(b"".replace(b"a", b"b"))
print(b"aaa".replace(b"a", b"b", 0))
print(b"aaa".replace(b"a", b"b", -5))
print(b"asdfasdf".replace(b"a", b"b"))
print(b"aabbaabbaabbaa".replace(b"aa", b"cc", 3))
print(b"a".replace(b"aa", b"bb"))
print(b"testingtesting".replace(b"ing", b""))
print(b"testINGtesting".replace(b"ing", b"ING... |
#! /bin/bash
# Copyright 2019 Nokia
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writ... |
#!/bin/sh
set -exu # Strict shell (w/o -o pipefail)
if [ "${TRAVIS_JDK_VERSION}" = "openjdk11" ] && [ "${TNT_VERSION}" = "2.2" ]; then
mvn coveralls:report -DrepoToken=${COVERALLS_TOKEN}
fi
|
<filename>cmd/core/runner/concurrency.go<gh_stars>0
/*
Copyright (c) Facebook, Inc. and its affiliates.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
*/
package runner
import (
"context"
"time"
"github.com/pinter... |
<reponame>Codernauti/Sweetie<filename>app/src/main/java/com/codernauti/sweetie/actions/ActionVM.java
package com.codernauti.sweetie.actions;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import com.codernauti.sweetie.model.ActionFB;
import com.codernauti.sweetie.utils.DataMaker;
im... |
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.