text stringlengths 1 1.05M |
|---|
#!/bin/bash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0xd68fa50fea312927
sudo bash -c 'echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.2.list'
sudo apt update
sudo apt install -y mongodb-org
sudo systemctl start mongod
sudo... |
<filename>cmd/chart-to-order/main.go
/*
Copyright AppsCode Inc. and Contributors
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 a... |
import { uuidv4 } from "@andrewcaires/utils.js";
import { Response, Request, NextFunction } from "express";
import { existsSync } from "fs";
import mime from "mime-types";
import multer from "multer";
import { join } from "path";
import { Responses } from "../helpers/Responses";
import { API_UPLOAD_COUNT, API_UPLOAD_... |
#!/usr/bin/env bash
systemctl stop fuseki
systemctl stop marple
#general vars
echo ">>>> Updating Fuseki"
export TC_USER=fuseki
export TC_GROUP=fuseki
# set erb vars
# endpoint name for fuseki
export EP_NAME=core
export SVC=fuseki
export SVC_DESC="Jena-Fuseki Tomcat container"
export MARPLE_SVC=marple
export MARPLE_S... |
<gh_stars>0
import CardCluster3 from '../../components/CardCluster3';
function Design () {
return (
<CardCluster3 />
);
};
export default Design; |
_pdu() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${i}" in
pdu)
cmd="pdu"
;;
*)
... |
./bin/fabric-cli chaincode invoke --local-network=network2 --user=alice mychannel simpleasset GetMyWallet '[]'
./bin/fabric-cli chaincode invoke --local-network=network1 --user=alice mychannel simpleasset GetMyAssets '[]'
./bin/fabric-cli chaincode invoke --local-network=network2 --user=bob mychannel simpleasset GetMyW... |
#!/bin/bash
$PYTHON -m jcc \
--use_full_names \
--python orekit \
--version ${PKG_VERSION} \
--jar $SRC_DIR/orekit-10.0.jar \
--jar $SRC_DIR/hipparchus-core-1.5.jar \
--jar $SRC_DIR/hipparchus-filtering-1.5.jar \
--jar $SRC_DIR/hipparchus-fitting-1.5.jar \
--jar $SRC_DIR/hipparchus-geometry-1.5.jar \
--jar $SRC_DIR/hi... |
package cmd
import (
"bufio"
"bytes"
"gitee.com/ddkwork/libraryGo/stream"
"golang.org/x/text/encoding/simplifiedchinese"
"golang.org/x/text/transform"
"io"
"io/ioutil"
"os/exec"
"strings"
)
type charset string
const (
UTF8 = charset("UTF-8")
GB18030 = charset("GB18030")
)
type (
Interface interface {... |
class Employee:
def __init__(self, name, age, salary, job_title):
self.name = name
self.age = age
self.salary = salary
self.job_title = job_title
employee1 = Employee("John Smith", 25, 45000, "Software Engineer") |
<reponame>NekoOfTheAbyss/lala-discord<gh_stars>0
import Command from "../../structures/Command.js";
export default class LalaCommand extends Command {
constructor(client) {
super(client, {
name: "lala",
description: "General info about lala",
group: "misc",
});
}
async run(message, com... |
#!/bin/bash
export LIB_FILE_PREFIX="jansson"
export LIB_NAME="lib${LIB_FILE_PREFIX}"
export LIB_OUTPUT="${LIB_NAME}.a"
export LIB_VERSION="2.5"
export LIB_URL="http://www.digip.org/jansson/releases/${LIB_FILE_PREFIX}-${LIB_VERSION}.tar.gz"
./build-lib.sh
|
<reponame>TheDadi/polyfill-library<gh_stars>0
'setPrototypeOf' in Reflect |
#!/bin/bash
aptcmd()
{
echo "Debian like, apt-get commands"
#https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sh -c 'echo "deb [arch=amd... |
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
#
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh
set -e
# Setup 'gpuci_retry' for upload retries (results in 4 total attempts)
export GPUCI_RETRY_MAX=3
export GPUCI_RETRY_... |
function cylinderVolume(radius,height) {
return Math.PI * radius * radius * height;
}
let radius = 5;
let height = 10;
let volume = cylinderVolume(radius, height);
console.log('The volume of the cylinder is', volume); |
import { ComponentClass, connect, Dispatch, MapDispatchToProps, MapStateToProps } from 'react-redux';
import { State } from '../state';
import { screenModified } from '../actions';
import MapEditor from '../map-editor';
import { Action } from 'redux-actions';
const mapStateToProps: MapStateToProps<any, any, State> = (... |
<gh_stars>0
package com.amaljoyc.patterns.structural.facade;
/**
* Created by amaljoyc on 19.07.18.
*/
public class Main {
public static void main(String[] args) {
BankingService service = new BankingService();
service.createAccount(AccountType.CURRENT);
service.createAccount(AccountType... |
#include <gtest/gtest.h>
#include <bcli/bcli.hpp>
using namespace bc;
TEST(Parser, simple)
{
char* argv[] = {"cmd", "-p", "10", "pos1", "-t", "strvalue", "-f", "pos2", "pos3"};
int argc = sizeof(argv)/sizeof(char*);
{
Parser cli("test", "test", "test", "test");
cli.add_param("-p/--param", "help");
... |
class CustomError:
def __init__(self):
self.errorcode = {}
def add_error_code(self, code, description):
self.errorcode[code] = description
def raise_custom_error(self, code):
if code in self.errorcode:
raise Exception(self.errorcode[code])
else:
rais... |
#!/bin/bash
# Copyright 2020 FUJITSU LIMITED
#
# 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... |
<gh_stars>0
import { NbMenuItem } from '@nebular/theme';
export const MENU_ITEMSADM: NbMenuItem[] = [
{
title: 'Dashboard',
icon: 'nb-home',
link: '/pages/dashboard',
home: true,
},
{
title: 'Features',
group: true,
},
{
title: 'View Centre',
icon: 'nb-tables',
link: '/pag... |
#!/usr/bin/env bash
# Copyright 2013-2018 Fabian Groffen
#
# 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 l... |
cd build/linux-arm-debug/bin
scp goahead-test libgo.so root@192.168.3.100:/run/media/mmcblk0p1/goahead
|
<filename>packages/web/src/components/Post/PostForm/PostFormPage.tsx<gh_stars>0
import React, { FC, useContext, useState, useEffect } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import axios from 'axios';
import PostFormValues from 'types/PostFormValues';
import PopulatedPost from '@rddt/commo... |
<gh_stars>100-1000
"""
Code illustration: 1.01
Your first GUI application - the top level window
Tkinter GUI Application Development Blueprints
"""
import tkinter as tk
root = tk.Tk()
root.mainloop()
|
<reponame>khepherer/java_lleida_01_06_2017
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package handlers;
import java.util.Collections;
import java.util.Set;
import java.util.logg... |
<gh_stars>0
export const apiServer = '172.16.31.10'
export const apiPort = 8000
|
#! /usr/bin/env bash
# Copyright (c) 2018 Herbert Shen <ishbguy@hotmail.com> All Rights Reserved.
# Released under the terms of the MIT License.
export BACON_UTILS_ABS_SRC="$(readlink -f "${BASH_SOURCE[0]}")"
export BACON_UTILS_ABS_DIR="$(dirname "$BACON_UTILS_ABS_SRC")"
# global variable interfaces
declare -g BACON... |
<reponame>OSADP/C2C-RI
/*
Jameleon - An automation testing tool..
Copyright (C) 2003-2006 <NAME> (<EMAIL>)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
ve... |
import { Rooms, Messages } from '../../../../models';
import { authenticated } from '../../helpers/authenticated';
import schema from '../../schemas/messages/messages.graphqls';
const resolver = {
Query: {
messages: authenticated((root, args, { user }) => {
const messagesQuery = {};
const messagesOptions = {... |
#!/bin/bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]} " )" && pwd )
cd $DIR
#get number of lines of code in src directory that isn't external
find ../src -type f ! -name '.DS_Store' \
! -path '*/docs/*' \
| xargs wc -l
exit
|
<filename>open-sphere-base/core/src/test/java/io/opensphere/core/util/collections/petrifyable/PetrifyableTShortArrayListTest.java<gh_stars>10-100
package io.opensphere.core.util.collections.petrifyable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import org.junit.Assert;
... |
#!/bin/sh
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
rm -fr build && mkdir build
cd build
# By default LazyJIT is enabled, to disable it:
# cmake .. -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0
cmake .. -DWAMR_BUILD_JIT=1
make -j ${nproc}
cd .... |
#!/bin/bash
MY_MOUNT_DIR="/mnt"
for MY_PARTITION in `fdisk -l | grep -v swap | egrep -o /dev/sd.[0-9]+` ; do
mount | grep -q "^$MY_PARTITION"
if [ $? -eq 1 ] ; then
echo "Partition: ${MY_PARTITION}"
blkid -full $MY_PARTITION
if [ $? -eq 0 ] ; then
MOUNTPOINT=$MY_MOU... |
package collins.kent.tutor.arithmetic;
import java.util.Random;
import collins.kent.tutor.IFTutor;
import collins.kent.tutor.Problem;
import collins.kent.tutor.Meta;
@Meta(skill="Identify integer mod zero as an error")
public class IntegerModuloZeroProblem implements Problem {
Problem original;
@Override
public... |
<reponame>Kosmos-Community/desma
import React from 'react';
import { Card, Row, Text } from '@nextui-org/react';
import { IColor } from '../../interfaces/IDesign';
import { HiOutlinePlusCircle } from 'react-icons/hi';
const ColorCard = ({ hexCode, rgbCode }: IColor) => {
const isColorCard = Boolean(hexCode);
ret... |
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker run --rm -it --hostname lwip-jpeg-autorotate -v $DIR:/app -v $HOME/.gitconfig:/etc/gitconfig -v $HOME/.ssh/id_rsa:/etc/ssh/ssh_id_rsa -v $HOME/.ssh:/home/dev/.ssh -v $HOME/.npmrc:/home/dev/.npmrc -w /app -t toubiweb/docker-node-dev-tools:lts b... |
import React from "react"
import styled from 'styled-components'
const Section = styled.section`
padding-bottom:100px;
`
const Center = styled.div`
margin-left: auto;
margin-right: auto;
width: 600px;
max-width:90vw;
text-align:center;
`
const Title = styled.h2`
padding-bottom: 20px;
font-wei... |
// Function signature for networkConfigSet
async function networkConfigSet({ accountId, config }) {
try {
// Simulate network configuration update
// Replace this with actual network configuration update logic
console.log(`Updating network configuration for account ${accountId}...`);
... |
#!/bin/bash
source HOME_DIR_INSTALLATION/miniconda3/etc/profile.d/conda.sh
conda activate protoinfomax_env
cd ../src
# Evaluate ProtoInfoMax on sentiment classification K=100
python eval_imax.py -config ../config/config_sentiment -section test-run > ../eval/eval_imax_sentiment.txt
|
<reponame>lucas54neves/my-uri-solutions<gh_stars>0
funcionario = gets.to_i
horas = gets.to_i
valor = gets.to_f
salario = horas * valor
puts "NUMBER = #{funcionario}"
puts "SALARY = U$ %.2f" % salario |
######################################################################
### threads
sudo ps u -L -p ${PID}
### show threads, as if they were processes
# sudo ps u H -L -p ${PID}
######################################################################
### kill
sudo pkill -9 httpd
sudo pkill -9 java
sudo pkill --pidf... |
'use strict';
var literalizer = require('literalizer');
var promiseback = require('promiseback');
var STYLES = {
multi: '/**/',
none: null,
single: '//',
singleMulti: '///**/'
};
Object.freeze(STYLES);
var helpers = {
endsWithNewline: function (chunk) {
return chunk && (/\n+$/).test(chunk.val);
},
isComment... |
/*
* Copyright 2016 <EMAIL>
*
* 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 w... |
import speech_recognition as sr
import webbrowser
# Initialize the recognizer
r = sr.Recognizer()
# Create and initialize a list
lst = []
# Start the loop
while True:
# Listen for input
with sr.Microphone() as source:
print('Say something: ')
audio = r.listen(source)
# Recognize the inp... |
#!/usr/bin/env bats
# These tests setup containers required for backups to work and test functionality.
# Order of tests matter in this bats.
load "$BATS_TEST_DIRNAME/bats_functions.bash"
@test "Build required containers for backup tests" {
cd "$WORKING"
# NOTICE: Due to SSH server IP changing and no support fo... |
<reponame>mpberk/cse531-projects
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <pthread.h>
pthread_t start_thread(void *func, int *arg)
{
pthread_t thread_id;
int rc;
printf("In main: creating thread\n");
rc = pthread_create(&thread_id, NULL, func, arg);
if (rc){
... |
<gh_stars>1-10
import * as assert from 'assert';
import { HD } from '../src';
import { bip32 } from 'bitcoinjs-lib';
describe('HDWallet', function () {
it('From mnemonic and get first address', async () => {
let wallet = await HD.HDWallet.from('rookie message fee quarter dream shoulder frown lady best wisdom hur... |
#create training data at lower resolutions.
#to run this script, you need to have already run the main create training data scripts to generate the profiles etc.
#SliceDir="/data1/users/kwagstyl/bigbrain/Slice_Verification/"
#Slices="1066 2807 3300 3863 4366 4892 5431 1582 1600 4080"
#Slices="1066 2807 3300 3863 4366... |
public static TestObject createRandomObject() {
TestObject obj = new TestObject();
obj.value1 = ThreadLocalRandom.current().nextInt();
obj.value2 = ThreadLocalRandom.current().nextFloat();
obj.value3 = ThreadLocalRandom.current().nextBoolean();
return obj;
} |
#!/bin/bash
#当前路径,不需要修改
cur_path=`pwd`
#集合通信参数,不需要修改
export RANK_SIZE=1
export JOB_ID=10087
RANK_ID_START=0
# 数据集路径,保持为空,不需要修改
data_path=""
#设置默认日志级别,不需要修改
#export ASCEND_GLOBAL_LOG_LEVEL=3
#基础参数,需要模型审视修改
#网络名称,同目录名称
Network="EfficientNet-B3_ID0450_for_PyTorch"
#训练epoch
train_epochs=100
#训练batch_size
batch_size=... |
<reponame>alex-dorokhov/gdx-pay
package com.badlogic.gdx.pay.android.googleplay.testdata;
import com.badlogic.gdx.pay.PurchaseManagerConfig;
import static com.badlogic.gdx.pay.PurchaseManagerConfig.STORE_NAME_ANDROID_GOOGLE;
import static com.badlogic.gdx.pay.android.googleplay.testdata.OfferObjectMother.offerConsuma... |
<gh_stars>10-100
'use strict';
const AWS = require('aws-sdk');
const path = require('path');
const { updateLabels } = require('../lib/database');
const rekognition = new AWS.Rekognition();
/**
* Handles label request to Amazon Rekognition
* @param event
* @param context
* @param callback
* @returns {Promise.<T... |
#!/bin/bash
# OpenShift namespaced objects:
# oc get --raw /oapi/v1/ | python -c 'import json,sys ; resources = "\n".join([o["name"] for o in json.load(sys.stdin)["resources"] if o["namespaced"] and "create" in o["verbs"] and "delete" in o["verbs"] ]) ; print resources'
# Kubernetes namespaced objects:
# oc get --raw ... |
import { GET_ERRORS, CLEAR_ERRORS, } from '../actions/types';
const initialState = {};
export default function(state = initialState, action) {
switch(action.type) {
case GET_ERRORS:
return action.payload;
case CLEAR_ERRORS:
return {};
default:
return state;
}
}
/*
To take the stat... |
/**
* Copyright 2021 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
/* - Coeus web framework -------------------------
*
* Licensed under the Apache License, Version 2.0.
*
* Author: <NAME>
*/
package com.tzavellas.coeus.util.internal
import java.lang.reflect.{ Method, ParameterizedType, Modifier }
import com.tzavellas.coeus.FrameworkException
/**
* Various utility methods for... |
<reponame>aaawoyucheng/wayne
package base
import (
"fmt"
"strconv"
"strings"
"github.com/aaawoyucheng/wayne/src/backend/common"
"github.com/aaawoyucheng/wayne/src/backend/util/snaker"
)
type ParamBuilderController struct {
ResultHandlerController
}
func (c *ParamBuilderController) BuildQueryParam() *common.Qu... |
from selenium import webdriver
class WebInteraction:
def __init__(self, app):
self.app = app
def load_home_page(self):
wd = self.app.wd
if len(wd.find_elements_by_link_text("Last name")) > 0:
return
wd.find_element_by_link_text("home").click()
def select_by_ind... |
<reponame>fim/purefap
from django.conf.urls import patterns, include, url
from filebrowser.sites import site
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'purefap.views.home', name='home'),
# u... |
<reponame>tdm1223/Algorithm<filename>acmicpc.net/source/5575.cpp
// 5575. 타임 카드
// 2019.05.21
// 구현
#include<iostream>
using namespace std;
int main()
{
int h1, h2, m1, m2, s1, s2;
for (int i = 0; i < 3; i++)
{
// 출퇴근 시간 입력받음
cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2;
// 초->분->시간 순으로 차례대로 처리한다.
int s = s2 - ... |
<reponame>vfishv/DanmakuFlameMaster
package tv.cjump.ndkbitmap_armv7a;
public class Pragma {
}
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
// RUN: not %target-swift-frontend %s -parse
class MyClass { // Completed class declaration
func g() { // Added method declaration
// Method body
}
}
let d = MyClass() // Instantiating the class |
package io.dronefleet.mavlink.uavionix;
import io.dronefleet.mavlink.annotations.MavlinkEntryInfo;
import io.dronefleet.mavlink.annotations.MavlinkEnum;
/**
* Status flags for ADS-B transponder dynamic output
*/
@MavlinkEnum
public enum UavionixAdsbRfHealth {
/**
*
*/
@MavlinkEntryInfo(0)
U... |
/* jshint indent: 1 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('reason', {
recid: {
type: DataTypes.INTEGER,
allowNull: false,
field: 'RECID'
},
proptype: {
type: DataTypes.CHAR,
allowNull: false,
primaryKey: true,
field: 'PROPTYPE'
},
reasontype: {
... |
<gh_stars>0
#! /usr/bin/env python3
stddev = ( (1./(5.-1.)) * (
(0.60984565298-(-0.45298911858)**2) +
(0.61641291630-(-0.45481953564)**2) +
(1.35860151160-(-0.48066105923)**2) +
(0.78720769003-(-0.47316713469)**2) +
(0.56393677687-(-0.46204733302)**2)
)
)**0.5
print stddev
|
<reponame>chylex/Hardcore-Ender-Expansion
package chylex.hee.block;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecr... |
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
// create a reducer
const reducer = (state = {}, action) => {
switch (action.type) {
case 'setState':
return {...state, ...action.state};
default:
return state;
}
};
// create and export a store with redux a... |
import { browser, isDev } from '@/utils/env';
const url2userDefinedUrl: (host: string) => string = host => {
return host;
};
export type urlInfo = {
concernedProtocol: boolean;
protocol: string;
host?: string;
url?: string;
favIconUrl?: string;
displayName: string;
};
const vendors: Array<string> = ['c... |
try:
# code goes here
result = my_function()
except Exception as e:
# deal with errors
print("Error encountered: {}".format(e))
finally:
# execute this block of code regardless
print("Done!") |
package br.edu.ifpb.hefastos_android.activities.delete;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import an... |
package com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue;
import com.google.common.base.Preconditions;
import java.nio.ByteBuffer;
public class LimitedSelector implements KeySelector {
private final int limit;
private int count;
public LimitedSelector(int limit) {
Preconditions.check... |
package it.sad.sii.AndroidPassReminder;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* Created by mmutschl on 18/08/15.
*/
public class Reminder {
private long checktime;
private Strin... |
import { SaveParticipantRepository } from '@/data/protocols/db'
import { SaveParticipant, SaveParticipantParams } from '@/domain/usecases'
import { ParticipantModel } from '@/domain/models'
export class DbSaveParticipant implements SaveParticipant {
constructor (
private readonly saveParticipantRepository: SaveP... |
#!/bin/bash
input=""
for f in recipes/*.png; do
input+=","$f
done
echo ${input:1}
ktech ${input:1} --atlas ../mod_client/images/dsmmo_recipes.xml
|
/*
* File created on Mar 8, 2019
*
* Copyright (c) 2019 <NAME>, Jr
* and others as noted
*
* 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... |
#!/bin/bash
set -x
/sbin/ip netns add swns
/sbin/ip netns exec swns /sbin/ifconfig lo up
/sbin/ip netns add nonet
/sbin/ip netns exec nonet /sbin/ifconfig lo up
# Calculate the max interface available
default_max=7
# Reconfigure the ports.yaml
yaml_file=/etc/libreswitch/platform/Generic-x86/X86-64/ports.yaml
new_max=... |
import { RuleConfiguration } from '../../../support/Rule'
type Options = ({
before?: boolean
after?: boolean
})[]
type Configuration = RuleConfiguration<'comma-spacing', 'eslint', Options>
export default Configuration |
<gh_stars>0
const lijnColors = {"WI":"FFFFFF","TU":"0099AA","RZ":"FF88AA","OR":"EE8822","RO":"BB0022","PA":"991199","MA":"DD0077","LB":"AACCEE","GE":"FFCC11","GR":"229922","MU":"77CCAA","ZW":"000000","KA":"995511","BL":"1199DD","CR":"C5AA77","ZA":"FFCCAA","GD":"FFDD00","BD":"000099","BO":"771133","KI":"444411","DB":"00... |
# frozen_string_literal: true
# Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
export * from './create-composable-state-synchronizer';
export * from './compose-state-synchronizers';
export * from './create-state-synchronizer';
export * from './create-synchronized-state-updater';
export * from './types';
export * from './enhancements';
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
<gh_stars>10-100
// Package pic contains te code to be able to launch a picture service.
// A picture service will serve as a proxy for the image delivery underlying service and map a repository
// with it's associated star chart.
package pic
|
<gh_stars>0
#include "CpuTimer.hh"
|
clear
rm -rf ../force-app/main/generated
fmpp -S . -O ../force-app/main/generated
cd ..
sfdx force:source:push
cd templates |
<filename>appsec-v1/appsec.go
package appsec
import (
"bytes"
"encoding/json"
"fmt"
client "github.com/akamai/AkamaiOPEN-edgegrid-golang/client-v1"
"time"
)
type ActivationConfig struct {
ConfigID int `json:"configId"`
ConfigName string `json:"configName"`
ConfigVersion int ... |
#!/usr/bin/python3
"""Script for creating scaled L2 norm
"""
import torch.nn as nn
import torch
import torch.nn.functional as F
class ScaledL2Norm(nn.Module):
def __init__(self, in_channels, initial_scale):
super(ScaledL2Norm, self).__init__()
self.in_channels = in_channels
self.scale = nn... |
#!/usr/bin/env bash
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
dest_d="$HOME/.config/common-lisp/source-registry.conf.d/"
mkdir -p ${dest_d}
cp ${DIR}/jeannie.conf "${dest_d}"
|
#!/usr/bin/env bash
echo "┏━━━ 🧹 CLEAN: removing lib folder ━━━━━━━"
lerna run clean --stream
|
package leetCode;//给你链表的头结点 head ,请将其按 升序 排列并返回 排序后的链表 。
//
// 进阶:
//
//
// 你可以在 O(n log n) 时间复杂度和常数级空间复杂度下,对链表进行排序吗?
//
//
//
//
// 示例 1:
//
//
//输入:head = [4,2,1,3]
//输出:[1,2,3,4]
//
//
// 示例 2:
//
//
//输入:head = [-1,5,3,4,0]
//输出:[-1,0,3,4,5]
//
//
// 示例 3:
//
//
//输入:head = []
//输出:[]
//
//
//
//
// 提示:
//
//
// 链表... |
from bidso.utils import read_tsv
import plotly.graph_objects as go
from numpy import sign
from ..names import name
from ..read import load
from .surf import AXIS
def plot_brain_regions(parameters, ieeg_file, region_type):
"""
region_type can be one of:
'aparc.a2009s',
'aparc.DKTatlas',
'BA_exviv... |
module.exports = ['Femelle', 'Mâle'];
|
<reponame>SalvadorP/UdaciCards<filename>components/DeckDetails.js
import React, { Component } from "react";
import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
import { connect } from "react-redux";
import { StackNavigator } from "react-navigation";
import { lightGrey } from "../utils/colors";
impo... |
<filename>src/app/video-player/controls/captured-frame-list/operation-dialog/operation-dialog.component.ts
import {AfterViewInit, Component, ElementRef, ViewChild} from '@angular/core';
import {IMAGE_PROPERTY_NAME} from '../../../core/video-capture.service';
import {UIDialogRef} from 'altair-ui';
import {PersistStorage... |
#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) 2021 CERN & University of Surrey for the benefit of the
# BioDynaMo collaboration. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in ... |
import { Task } from '@prisma/client';
import { inject, injectable } from 'tsyringe';
import { GetTasksBySubjectIdDTO } from '../dtos/GetTasksBySubjecId.dto';
import { ITaskRepository } from '../repositories/ITaskRepository';
@injectable()
export class GetTasksBySubjectIdService {
constructor(
@inject('PrismaTas... |
<filename>test/net/networking_engine_unit.js
/**
* @license
* Copyright 2016 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... |
<gh_stars>0
const Post = require("../models/Post");
const APIFeatures = require("../utils/apiFeatures");
const ErrorResponse = require("../utils/errorResponse");
const asyncHandler = require("../middleware/async");
const cloudinary = require("../utils/cloudinary");
// Create new post => /api/v1/admin/post/new
expo... |
-- Roles and permissions for Digital banking users
select u.user_id, u.first_name||' '||u.middle_name||' '||u.last_name employee_name ,r.role_name,r.role_desc, p.permission_name from
usr_mgmt_user u, usr_mgmt_user_role_mapping rm, usr_mgmt_role r, usr_mgmt_role_permission rp, usr_mgmt_permission p
where rm.user_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.