text
stringlengths
1
1.05M
# This script performs bootstrap installation of upip package manager from PyPI # All the other packages can be installed using it. saved="$PWD" if [ "$1" = "" ]; then dest=~/.micropython/lib/ else dest="$1" fi if [ -z "$TMPDIR" ]; then cd /tmp else cd $TMPDIR fi # Remove any stale old version rm -r...
def addArrays(arr1, arr2): if len(arr1) != len(arr2): raise ValueError("Arrays length do not match") res = [] for i in range(len(arr1)): res.append(arr1[i] + arr2[i]) return res
#!/usr/bin/env bash #echo 'shutdown -P now' > /tmp/shutdown.sh; echo '{{user `ssh_password`}}'|sudo -S sh '/tmp/shutdown.sh' sudo /usr/sbin/shutdown -P now #ssh -tt aemdesign@$(hostname) sudo shutdown -P now
import React from 'react'; import { Router, Route, Switch } from 'dva/router'; import FruitRoute from './routes/Fruit/Fruit'; import FruitFormRoute from './routes/Fruit/FruitForm'; function RouterConfig({ history }) { return ( <Router history={history}> <Switch> <Route path="/" exact component={Fruit...
clear && cat closures.go && go run closures.go
def intersection(arr1, arr2): i, j = 0, 0 intersection = [] while i < len(arr1) and j < len(arr2): if arr1[i] == arr2[j]: intersection.append(arr1[i]) i+=1 j+=1 elif arr1[i] < arr2[j]: i+=1 else: j+=1 return intersect...
#!/bin/bash # Usage: # ./experiments/scripts/faster_rcnn_end2end.sh GPU NET DATASET [options args to {train,test}_net.py] # DATASET is either pascal_voc or coco. # # Example: # ./experiments/scripts/faster_rcnn_end2end.sh 0 VGG_CNN_M_1024 pascal_voc \ # --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400, 500, 600, 7...
# encoding: utf-8 require_relative '../spec_helper' describe "API" do subject { SCB::API } let(:api) { api_with_test_config(SCB::API.new) } let(:base_url) { "http://api.test/name/v0/lang/db" } let(:expected_uri) { URI.parse "#{base_url}/endpoint" } let(:fake_http_post) { # With UTF8 BO...
<reponame>kv-zuiwanyuan/kudu // Copyright 2015 Cloudera, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
<filename>open-sphere-base/core/src/main/java/io/opensphere/core/data/DataRegistryImpl.java package io.opensphere.core.data; import java.io.NotSerializableException; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java...
package calc /** * Which of these statements are truths and which are lies? * * 1. Statement 2 and Statement 5 are either both truths or both lies. * 2. Statement 3 and Statement 5 are either both truths or both lies. * 3. Exactly two of the statements are truths. * 4. Statement 1 and Statement 2 are eithe...
// written by <NAME> 2008 - 2014 // this work is public domain. the code is undocumented, scruffy, untested, and should generally not be used for anything important. // i do not offer support, so don't ask. to be used for inspiration :) #include "animator.hpp" #include "managers/usereventmanager.hpp" #include "manage...
# Run MPC Controller cd ./build ./mpc
<reponame>lgoldstein/communitychest /* * */ package net.community.apps.tools.svn.wc; import java.io.File; import java.io.FileFilter; import javax.swing.filechooser.FileSystemView; import javax.swing.table.TableCellRenderer; import net.community.apps.tools.svn.resources.DefaultResourcesAnchor; import net.community...
pkg_name=shield-proxy pkg_origin=core pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" pkg_description="Proxy package for the Shield backup and restore tool" pkg_license=('Apache-2.0') pkg_version=0.10.8 pkg_svc_user=root pkg_svc_group="${pkg_svc_user}" pkg_upstream_url="" pkg_deps=( core/nginx core/ope...
<reponame>houjianping/my_base<filename>base_library/src/main/java/com/androidapp/mvp/MvpPresenter.java package com.androidapp.mvp; public interface MvpPresenter<View,Model> { // 绑定View控件 void attachView(View view); // 绑定Model void attachModel(Model model); // 注销View控件 void deta...
<gh_stars>0 package helper import ( "errors" "fmt" "strings" "testing" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) func TestError(t *testing.T) { errorMessage := "sentinel error" input := errors.New(errorMessage) inputGRPCCode := codes.Unauthentica...
#pragma once #include "Renderer2D.h" #include "Mathman.h" #include "GraphNode.h" #include <vector> #include "Heap.h" #include "Renderer2D.h" #define GRID_WIDTH 50 #define GRID_HEIGHT 50 #define CELL_SIZE 15 #define CELL_PADDING 2 #define COST_SIDE 10 #define COST_DIAG 14 class Pathfinder { public: Pathfinder(); ~P...
/* * Copyright (c) 2019-2021. <NAME> and others. * https://github.com/mfvanek/pg-index-health * * This file is a part of "pg-index-health" - a Java library for * analyzing and maintaining indexes health in PostgreSQL databases. * * Licensed under the Apache License 2.0 */ package io.github.mfvanek.pg.settings;...
def gradient_descent(x0, learning_rate, max_iterations, objective_function): xks = [x0] it = 0 while it < max_iterations: xk = xks[-1] gradient = (objective_function(xk + 0.0001) - objective_function(xk)) / 0.0001 # Approximate gradient xk -= learning_rate * gradient xks.app...
<gh_stars>1-10 import kmeans.Centroide; import kmeans.Elemento; import kmeans.Kmeans; import java.util.Arrays; import java.util.List; public class KmeansToStringConverter { public static final String convert(Kmeans kmeans) { return kmeans.getAgrupamentos() .entrySet() .stre...
#!/bin/sh do_generate() { cd "$(dirname "$0")" protoc --version protoc -I=. --python_out=orwell/messages common.proto controller.proto robot.proto server-game.proto server-web.proto } do_generate
$(document).ready(function(){ $("#nav-icon").click(function (e) { $(this).toggleClass("open"), $("div.menu-wrap").toggleClass("active") }); $('#mycarousel').slick({ scroll: 1 }); $('.league-table-nav').slick({ slidesToShow: 2, slidesToScroll:...
import React from 'react'; import {Link} from 'gatsby'; import classNames from 'classnames'; import styles from './HeaderLink.module.scss'; export default class HeaderLink extends React.Component { componentDidMount() { if (this.props.isActive) { this.scrollIntoView(); } } scro...
import axios from "../axios"; interface Issue { ruleId: string; position: string; name: string; detail: string; ruleType: string; severity: string; fullName: string; source: string; } interface IssuePosition { startLine: number; startColumn: number; endLine: number; endColumn: number; } expor...
<filename>lib/toyrobot/cli.rb module Toyrobot class CLI def initialize(filename) @filename = filename @table = Table.new @simulation = Simulation.new(@table) @command = Command.new end def run File.open(@filename, 'r').each { |line| run_command line } end private ...
import { APYData } from "./types"; export interface SetBankAPY { chainId: number; address: string; apys: APYData[]; }
def all_caps(words): for word in words: for char in word: if char.islower(): return False return True print(all_caps(words))
def convertToSpecificFormat(matrix): formatted_rows = [f"[{', '.join(map(str, row))}]" for row in matrix] return ';'.join(formatted_rows)
/* * 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 may ...
<filename>funds/variable.js var x = 2; var y = {name: 'Amin'}; var w = y; console.log(w === y); // true console.log(y.name === w.name); // true y.name = 'Tom'; console.log(w.name); // 'Tom'
if (( ! $+commands[fzf] )); then echo "Installing fzf" brew install fzf fi [[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.zsh" 2> /dev/null source "/usr/local/opt/fzf/shell/key-bindings.zsh" # export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev...
<gh_stars>0 'use strict'; const should = require('chai').should(); // eslint-disable-line const pathFn = require('path'); const fs = require('fs'); const rewire = require('rewire'); describe('spawn', () => { const spawn = require('../../lib/spawn'); const CacheStream = require('../../lib/cache_stream'); const f...
#!/bin/bash BASE=$(dirname $(dirname $(dirname $(readlink -f ${0})))) mkdir -p ${BASE}/source/data/netmhcpan-2.8a cd ${BASE}/source/data/netmhcpan-2.8a wget http://www.cbs.dtu.dk/services/NetMHCpan-2.8/data.tar.gz
#!/bin/sh rm -rf vendor/ && govendor init && govendor add +e # don't vendor commonly used interfaces rm -rf vendor/dgruber/drmaa2interface
package main import ( "errors" "fmt" "github.com/ops-class/test161" "os" "os/exec" "regexp" "strconv" "strings" ) type gitRepo struct { dir string remoteName string remoteRef string remoteURL string localRef string remoteUpdated bool gitSSHCommand string } var minGitVersion =...
#ifndef DYNAMIC_ARRAY_H #define DYNAMIC_ARRAY_H template <typename Type> class DynamicArray { private: Type* m_data; size_t m_size; public: DynamicArray() : m_data(nullptr), m_size(0) { } ~DynamicArray() { delete [] m_data; } void append(Type newData) { int newDataSize = m_size + 1...
<reponame>EricEntropy/SnkrReleases2021 # frozen_string_literal: true require 'pry' require 'nokogiri' require 'open-uri' require 'net/http' require 'json' require_relative "UpcomingSnkrReleases/version" require_relative './UpcomingSnkrReleases/Snkr.rb' require_relative './UpcomingSnkrReleases/Get_API_Data.rb' require_...
package com.md.appuserconnect.core.services.internal; import java.io.IOException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONException; import com.google.appengine.api.users.User; import com.google.appengine...
<reponame>siklu/mina-sshd /* * 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 ...
<gh_stars>100-1000 export { default as Tooltip } from "./Tooltip.svelte";
<reponame>Binotto/angular<filename>packages/core/src/render3/instructions/class_map_interpolation.ts /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {getLVie...
#! /bin/sh -e # tup - A file-based build system # # Copyright (C) 2010-2018 Mike Shal <marfey@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distribu...
def swap(arr, a, b): temp = arr[a] arr[a] = arr[b] arr[b] = temp
#!/bin/sh cd $(dirname $0) pandoc --from markdown --to latex --output user_guide.tex ../../README.md # Removes "doc/report" path from figures sed -i s/doc\\/report\\///g user_guide.tex # Convert links to footnotes sed -i "s/\\\\href{\\([^}]*\\)}{\\([^}]*\\)}/\2\\\\footnote{\\\\url{\1}}/" user_guide.tex pandoc --f...
<gh_stars>0 # Require gems require 'rubygems' require 'bundler/setup' Bundler.require(:default) # Require libraries require 'set' require 'benchmark' # Require all ruby files Dir["#{File.dirname(__FILE__)}/app/*.rb"].each { |f| require f } include SuperMedian include QuickSort puts '=== SuperMedian Algorithm Analysi...
<gh_stars>100-1000 // Copyright 2015 CoreOS, 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 ...
#!/bin/bash # # patent_lim: Linguistically informed masking for representation learning in the patent domain # # Copyright (c) Siemens AG, 2020 # # SPDX-License-Identifier: Apache-2.0 # source ./bert_env8/bin/activate export BERT_BASE_DIR=/home/ubuntu/PycharmProjects/patent/bert runList='667 668 669 670 672 673 674' fo...
#!/bin/bash #Require sudo if [ $EUID != 0 ]; then sudo "$0" "$@" exit $? fi echo "removing service..." systemctl stop x11vnc.service systemctl disable x11vnc.service echo "done" echo "removing x11vnc password file /etc/x11vnc.passwd" rm /etc/x11vnc.passwd echo "done" echo "removing service from /lib/systemd...
#!/usr/bin/bash python Setup.py build_ext --inplace
ssh ubuntu@192.168.23.17 cd MSc_Research_Providers git pull origin master exit ssh ubuntu@192.168.23.11 cd MSc_Research_Providers git pull origin master exit ssh ubuntu@192.168.23.21 cd MSc_Research_Providers git pull origin master exit ssh ubuntu@192.168.23.13 cd MSc_Research_Providers git pull origin master exit
const Person = require("../artifact/Person.js"); const Comparator = {}; const personLabel = (person) => { let answer; if (person.middle) { answer = `${person.last}, ${person.first} ${person.middle}`; } else { answer = `${person.last}, ${person.first}`; } return answer; }; const trimTitle = (item)...
#! /bin/bash -x #$ -cwd #$ -V ## $1 is file containing patterns ## $2 is the file to search for i in `cat $1`; do command="grep -w -c '$i' $2" out=$(eval $command) echo $i"\t"$out done;
package db import ( "testing" "github.com/go-pg/pg/v10" "github.com/speedandfunction-russ/dev-toolkit/pkg/repository" "github.com/stretchr/testify/assert" ) func testRepository(repo repository.Repository) error { return nil } func TestRepository(t *testing.T) { assert := assert.New(t) t.Run("repository inte...
package edu.jluzh.test_layuimini.mapper; import edu.jluzh.test_layuimini.bean.Car; import edu.jluzh.test_layuimini.bean.CarImg; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * @description: * @author: icecool * @date: Created in 2021/5/26 19:23 * @version: * @modified By: */ @Mapper p...
function std_dev = standard_deviation (values) mu = mean(values); dev_squared = (values - mu) .^2; std_dev = sqrt(mean(dev_squared)); end
<reponame>wpisen/trace<filename>trace-service/trace-service-start/src/main/java/com/wpisen/trace/server/service/ProjectSystemManage.java package com.wpisen.trace.server.service; import java.util.List; import com.wpisen.trace.server.service.entity.ClientSessionVo; /** * * 项目系统管理 * Created by wpisen on 17/6/26. */...
<reponame>chird/meteoJS /** * @module meteoJS/events */ /** * Listen for a certain type of event * * @abstract * @param {string} listener - Event type. * @param {callback} callback - Listener function. * @param {mixed} [thisArg] - Objekt für this beim Ausführen von callback. * @returns {number} Listener func...
#!/bin/bash ## Copyright (c) 2021 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ SCRIPT_DIR=$(dirname $0) IMAGE_NAME=db-log-exporter IMAGE_VERSION=0.1 echo DOCKER_REGISTRY is $DOCKER_REGISTRY if [ -z "$DOCKER_REGISTRY" ]; then...
def fibonacci(n): a = 0 b = 1 if n < 0: print("Incorrect input") elif n == 0: return a elif n == 1: return b else: for i in range(2,n+1): c = a + b a = b b = c return b # Driver Program print(fibonacci(n))
#!/usr/bin/env bash set -ex echo Installing driver dependencies curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list sudo apt-get update ACCEPT_EULA=Y sudo apt-get install -qy msodbc...
#!/bin/bash # # Jobscript for launching dcmip2012 test2-0 on a mac running Darwin # # usage: ./jobscript-... EXEC=../../../test_execs/preqx-nlev30-interp/preqx-nlev30-interp # set name of executable openmpiexec -n 6 $EXEC < ./namelist-lowres.nl # launch simulation
#!/bin/sh cd "$(dirname "$0")" groovy logs.groovy plain
#!/bin/bash medusa-dev --set-path-to-repo . cd integration-tests/api medusa-dev --force-install --scan-once yarn test
<gh_stars>1-10 ------------------------------------------------------------------------------- -- dict type ------------------------------------------------------------------------------- CREATE TABLE DICT_TYPE( ID BIGINT NOT NULL, NAME VARCHAR(200), TYPE VARCHAR(200), DESCN VARCHAR(200), ...
import icon from './src/Icon' export const Icon = icon export default { install(vue) { vue.component(icon.name, icon) } }
#!/usr/bin/env bash kubectl delete job --all flekszible generate --print -t namefilter:include=test-runner -t run:args="bin/spark-shell --jars /opt/ozonefs/hadoop-ozone-filesystem-hadoop3.jar --packages io.delta:delta-core_2.12:0.7.0 --conf spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension --conf spark.sql...
#!/bin/sh set -e set -u export KUBE_NAMESPACE=prometheus export KUBE_CLUSTER=k8s-cluster export GCP_REGION=australia-southeast1-a export GCP_PROJECT=servicemeshlab export DATA_DIR=/prometheus/ export DATA_VOLUME=prometheus-storage-volume export SIDECAR_IMAGE_TAG=0.5.2 usage() { echo -e "Usage: $0 <deployment|state...
# on Fedora28 as root if [ "$#" -ne 1 ]; then echo "Usage: $0 <master IP>" exit 1 fi set -ex MASTER_IP=$1 # install and enable docker dnf update -y dnf install -y docker systemctl enable docker && systemctl start docker # permanently disable selinux setenforce 0 sed -i 's/^SELINUX=.*/SELINUX=permissive/' /...
#!/bin/bash -e ################################################################################ ## File: aws.sh ## Desc: Installs the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI ################################################################################ # Source the helpers for use with t...
module load conda2/4.2.13 source activate /n/groups/lsp/cycif/cycif_pipeline/ python /n/groups/lsp/cycif/CyCif_Manager/O2/CyCif_Pipeline_O2_v1.py $1 conda deactivate
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ****************************************************************************/ // Copyright (c) 2014-2019, The Monero Project // // All rights reserved. /...
const express = require('express'); const router = express.Router(); // create the contacts array let contacts = [ {id: 1, name: 'John Doe', phone: '123-456-7890'}, {id: 2, name: 'Jane Doe', phone: '098-765-4321'} ]; let contactId = 3; // get all contacts router.get('/', (req, res) => { res.json(contacts); }); //...
#include <stdio.h> #include <iostream> using namespace std; //{P == n >= 100000 } void casoDePrueba() { //Aqui has de escribir tu codigo int n; cin >> n; if(n <= 100000 && n >=0 ){ int v[100000]; for(int i = 0; i < n; i++) cin >> v[i]; int iz = 0; //indice izq int dc = 0; //indice dcha int ma...
#!/bin/bash mkdir -p build cd build if [ -f /bin/cmake3 ]; then cmake3 .. else cmake .. fi make echo "" echo "Binary is written in ./build" echo ""
#!/usr/bin/env sh # SPDX-License-Identifier: MIT confidence="" case "$BANDIT_CONFIDENCE" in "HIGH") confidence="-iii" ;; "MEDIUM") confidence="-ii" ;; "LOW") confidence="-i" esac severity="" case "$BANDIT_SEVERITY" in "HIGH") severity="-lll" ;; "MEDIUM...
#!/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...
<gh_stars>0 package com.packtpub.springrest.booking; import com.packtpub.springrest.DateRange; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import javax.validation.Valid; import javax.validation.constraints.Min; import javax.validation.constraints.NotNu...
cd src python main.py ctdet --exp_id bdd_resdcn18_224 --arch resdcn_18 --dataset bdd --batch_size 18 --lr 1e-4 --lr_step 90 --gpus 0 --num_workers 8 --input_res 224 --num_epochs 140 --save_all --resume cd ..
<gh_stars>1000+ import { createOvermind } from "overmind"; import { createHook } from "overmind-react"; export const useApp = createHook(); export const overmind = createOvermind( { state: { newItemName: "", items: ["nacho", "burrito", "hotdog"] }, actions: { setNewItemName({ state }, ...
public class BinaryTree { Node root; public int getMaxDFS(Node node) { if (node == null) return 0; int maxLeft = getMaxDFS(node.left); int maxRight = getMaxDFS(node.right); return Math.max(maxLeft, maxRight); } class Node { Node left; Node right; int val; public Node(int val) { this.val = val; } } ...
from typing import Any class SerializationConfig: def __init__(self): self.format = "json" # Default serialization format def set_format(self, format: str): self.format = format def get_format(self) -> str: return self.format def serialize(self, data: Any) -> bytes: ...
#!/usr/bin/env bash # Test block processing by hooking up indexer to preconfigured block datasets. set -e # This script only works when CWD is 'test' rootdir=`dirname $0` pushd $rootdir > /dev/null pwd source common.sh trap cleanup EXIT start_postgres ############### ## RUN TESTS ## ############### # Test 1 print...
<reponame>adarshjv20/Mutation-Testing package core.shape_interface; import core.Model; import java.awt.event.MouseEvent; /** * * @author <NAME> */ public class FillInterface extends ActionInterface { public FillInterface(Model model) { this.model = model; } @Override protected voi...
#!/bin/bash # Library of file-indexing functions # see: shiftup # Returns the index number string in a string. # Indexes can be prefixed with '0'. # param1: string with a index. function get_index { local path=$1 index=$(echo $path | tr -d '[:alpha:][:punct:]') echo "$index" } # param: path - filename function ...
#!/bin/sh set -e -x PYTHON=${PYTHON:=python} $PYTHON -mperf timeit -s'from gevent import spawn; from gevent.hub import xrange; g = spawn(lambda: 5); l = lambda: 5' 'for _ in xrange(1000): g.link(l)' $PYTHON -mperf timeit -s'from gevent import spawn; from gevent.hub import xrange; g = spawn(lambda: 5); l = lambda *arg...
if [ -z "$ROOT" ]; then echo "ROOT must be set to the root of the end-to-end tests" >&2 exit 1 fi if [ -n "$MACHINE_READABLE" ]; then LINE_END="\n" else LINE_END="\r" fi step () { echo "==== $@" } initialize_cluster () { for namespace in $(kubectl get namespaces | egrep -v '^(NAME|kube-)' | a...
<filename>app/src/main/java/com/flea/android/fleaandroid/activities/EventListActivity.java package com.flea.android.fleaandroid.activities; import android.os.Bundle; import com.flea.android.fleaandroid.R; import com.flea.android.fleaandroid.utils.BaseActivity; public class EventListActivity extends BaseActivity { ...
package org.hisp.dhis.dataadmin.action.statistics; /* * Copyright (c) 2004-2012, University of Oslo * 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 r...
The maximum contiguous sub-array problem is a task of finding the sub-array with the largest sum, in an array of integers. The basic idea is to divide the array into two sub-arrays. One sub-array contains the maximum contiguous sub-array ending at the current element, while the other sub-array contains the array from t...
#!/bin/bash # This has to be a separate file from scripts/make.sh so it can be called # before menuconfig. (It's called again from scripts/make.sh just to be sure.) mkdir -p generated source configure probecc() { ${CROSS_COMPILE}${CC} $CFLAGS -xc -o /dev/null $1 - } # Probe for a single config symbol with a "co...
<filename>src/wizards/bay.ts<gh_stars>0 import { html, TemplateResult } from 'lit-html'; import { get, translate } from 'lit-translate'; import { updateNamingAction } from '../editors/substation/foundation.js'; import { createElement, EditorAction, getReference, getValue, Wizard, WizardActor, WizardInput...
package com.yingnuo.web.servlet.admin.handle; import com.google.gson.Gson; import com.yingnuo.domain.User; import com.yingnuo.domain.VipRule; import com.yingnuo.service.UserService; import com.yingnuo.service.VipRuleService; import javax.security.auth.login.LoginException; import javax.servlet.ServletException; impor...
var itemNo = 0; var key; // var recentKey; var uniqueIdentifier; var jsonData; var availableProducts = []; var colors = []; var monoStyles = []; var symbols = []; // Initialize Firebase var config = { apiKey: "<KEY>", authDomain: "jhd-quick-order-form.firebaseapp.com", database...
import json import websockets class WSServer: def __init__(self, logger): self.logger = logger async def send_message(self, websocket, message_dict): self.logger.debug(f"WSServer: Send to : {websocket} " + json.dumps(message_dict)) await websocket.send(json.dumps(message_dict))
<!DOCTYPE html> <html> <head> <title>Digital Clock</title> <style> #clock { font-size: 50px; font-weight: bold; color: #0066ff; } </style> </head> <body> <div id="clock"></div> <script> function showTime(){ var date = new Date(); var h ...
def find_combinations(a, b, c): result = [] for i in range(len(a)): for j in range(len(b)): for k in range(len(c)): result.append([a[i], b[j], c[k]]) return result
<reponame>jamesmart77/csv-to-google-calendar<gh_stars>0 const csv = require('csvtojson'); const data = require("./volunteers"); async function parseCsv() { let events = []; const csvFilePath = './data.csv' await csv() .fromFile(csvFilePath) .on('data',(data)=>{ //data is a buf...
#!/bin/bash set -euxo pipefail DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" VERSION=1.18.4 mkdir -p $DIR/../deploy/linux cp $DIR/../integrations.json $DIR/../src/Datadog.Trace.ClrProfiler.Native/bin/Debug/x64/ cp $DIR/../createLogPath.sh $DIR/../src/Datadog.Trace.ClrProfiler.Native/bin/Debug/x64...
<reponame>KotlinSpringBoot/demo_springboot_with_mybatis package com.easy.springboot.demo_springboot_with_mybatis.model; import java.util.Date; public class Article { private Long id; private Date gmtCreate; private Date gmtModify; private Integer isDeleted; public Long getId() { return...