text
stringlengths
1
1.05M
#!/bin/bash # 実行例: repo_update.sh ~/android/aicp # 実行時の引数が正しいかチェック if [ $# -lt 1 ]; then echo "指定された引数は$#個です。" 1>&2 echo "仕様: $CMDNAME [ビルドディレクトリの絶対パス]" 1>&2 exit 1 fi builddir=$1 cd $builddir # repo sync echo "* Syncing repo" repo sync -j8 -c -f --force-sync --no-clone-bundle echo -e "\n" # Sony echo "* Updat...
/** * @namespace altspace */ /** * The altspace component makes A-Frame apps compatible with AltspaceVR. * * **Note**: If you use the `embedded` A-Frame component on your scene, you must include it *before* the `altspace` component, or your app will silently fail. * @mixin altspace * @memberof altspace * @property {bo...
CREATE TABLE [dbo].[StateCode] ( [ID] INT IDENTITY (1, 1) NOT NULL, [Value] VARCHAR (20) NULL, CONSTRAINT [PK_StateCode] PRIMARY KEY CLUSTERED ([ID] ASC) );
#!/bin/bash # Copyright 2018 The gRPC 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 agree...
import Router from '@koa/router'; // import service from './service'; const router = new Router({ prefix: '/realtime-data' }); router.post('/', async ctx => { ctx.body = {}; }); export default router;
#!/bin/sh set -x BUILD_JOBS=${BUILD_JOBS:-$(nproc)} BUILD_TYPE=${BUILD_TYPE:-Release} UPDATE_SOURCES=${UPDATE_SOURCES:-clean} WITH_OMZ_DEMO=${WITH_OMZ_DEMO:-ON} DEV_HOME=`pwd` OPENCV_HOME=$DEV_HOME/opencv OPENVINO_HOME=$DEV_HOME/openvino OPENVINO_CONTRIB=$DEV_HOME/openvino_contrib ARM_PLUGIN_HOME=$OPENVINO_CONTRIB/m...
# 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...
<reponame>wxsdl123/BatKeeping class ProtocolsController < ApplicationController # GET /protocols # GET /protocols.xml def index if params[:ids] @protocols = Protocol.find(params[:ids],:order => 'number') else @protocols = Protocol.current end respond_to do |format| format.html #...
package site.kason.tempera.util; import kalang.ast.ExprNode; import site.kason.klex.OffsetRange; /** * * @author <NAME> */ public class OffsetUtil { public static OffsetRange getOffsetOfExprNode(ExprNode expr){ kalang.compiler.OffsetRange os = expr.offset; return new OffsetRange(os.startOf...
#!/usr/bin/env bash # # Downloads and runs the latest stake-o-matic binary # solana_version=edge curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.0.0/install/panoptes-install-init.sh \ | sh -s - $solana_version \ --no-modify-path \ --data-dir ./panoptes-install \ --config ....
#!/bin/bash if [ "$#" -ne 2 ]; then echo "Usage: $0 <log_file> <error_code>" exit 1 fi log_file=$1 error_code=$2 if [ ! -f "$log_file" ]; then echo "Error: Log file not found" exit 1 fi error_count=$(grep -c "error code: $error_code" "$log_file") echo "Occurrences of error code $error_code: $error_c...
var searchData= [ ['eepromdata_101',['eepromData',['../class_device_name_helper_e_e_p_r_o_m.html#a9ffb38d00b78422b47b2a53797078127',1,'DeviceNameHelperEEPROM']]], ['eepromstart_102',['eepromStart',['../class_device_name_helper_e_e_p_r_o_m.html#afc26df6b84daff822f2dda23bcd3466a',1,'DeviceNameHelperEEPROM']]] ];
# export http_proxy=username:password@proxy-server-ip:8080 # export https_proxy=username:password@proxy-server-ip:8082 # export ftp_proxy=username:password@proxy-server-ip:8080 export http_proxy=http://58.220.95.9:80/ export https_proxy=http://58.220.95.9:80/
#!/bin/bash source "$(dirname "$0")/functions.sh" pp "create symbolic links" if [ -n "${WINDIR-}" ]; then { echo "skipped, because windows" echo "please use ... wscript setup.wsf" } | pcat exit 0 fi files=( .gitignore .inputrc .tigrc ) for fn in "${files[@]}"; do src="$PWD/${fn}" dst="$HOME...
import abc from typing import Iterable from apitest.model_maps import APIMetadata, EndPoint class APIImporter(metaclass=abc.ABCMeta): @property @abc.abstractmethod def metadata(self) -> APIMetadata: raise NotImplementedError() @property @abc.abstractmethod def end_points(self) -> It...
<filename>client/src/routes/Content/route.js import { Description as DescriptionIcon } from "@material-ui/icons"; import Root from "./Root"; const route = { sequence: 50, name: "Content", label: "Content", short: "Content", path: "/content", exact: true, component: Root, icon: DescriptionIcon, user: ...
<filename>Lib/site-packages/PyQt5/examples/widgets/spinboxes.py<gh_stars>1-10 #!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights res...
package io.scalajs.npm.winston package transports import scala.scalajs.js import scala.scalajs.js.annotation.JSBracketAccess /** * Winston Transports collection * @author <EMAIL> */ @js.native trait Transports extends js.Object { ///////////////////////////////////////////////////////////////////////////////...
#!/bin/bash #set -e Uri=$1 HANAUSR=$2 HANAPWD=$3 HANASID=$4 HANANUMBER=$5 HANAVERS=$6 OS=$7 vmSize=$8 echo $1 >> /tmp/parameter.txt echo $2 >> /tmp/parameter.txt echo $3 >> /tmp/parameter.txt echo $4 >> /tmp/parameter.txt echo $5 >> /tmp/parameter.txt echo $6 >> /tmp/parameter.txt echo $7 >> /tmp/pa...
#!/bin/sh name=$1 while read line do echo -n "$line " echo -n "$line" | wc -m done < $name
def createArray(n): res = [] for i in range(0, n): res.append(i) return res
package org.zalando.intellij.swagger.validator.field; import com.google.common.collect.ImmutableSet; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.psi.PsiElement; import java.util.List; import java.util.Set; import org.zalando.intellij.swagger.completion.field.model.common.Field; impor...
<reponame>intelrug/nestjs-bunnycdn import { DynamicModule, Global, Module, Provider, Type } from '@nestjs/common'; import { BunnyCDNOptions } from '@intelrug/bunnycdn'; import { createBunnyCDNConnection, getBunnyCDNConnectionToken, getBunnyCDNOptionsToken, } from './bunnycdn.utils'; import { BunnyCDNAsyncOptions,...
import http from 'http'; import cors from 'cors' import express, {Request, Response, Router} from 'express'; import {Config} from "./config"; import {Routes} from "../../infraestructure/handler/router/init"; import {Signature} from "./signature"; function index(req: Request, res: Response) { res.json({ ...
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U pip3 freeze > requirements.txt find requirements.txt -type f -exec sed -i "" "s/==/>=/g" {} \; # Do a package upgrade pip install -r requirements.txt --upgrade
package cn.alumik.parsetree.parser; import cn.alumik.parsetree.symbol.AbstractSymbol; import cn.alumik.parsetree.symbol.AbstractTerminalSymbol; public class Item { private int mDot = 0; private final Production mProduction; private final AbstractTerminalSymbol mLookAhead; public Item(Production pr...
<filename>src/icons/svg/order.js import React from 'react'; export default class Warning extends React.Component { render(){ const { width, height, color } = this.props; return ( <svg width={width} height={height} viewBox="0 0 140 140" version="1.1" > <g id="Page-1" stroke="none" strokeWid...
#!/usr/bin/env bash # vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2019-10-01 17:18:03 +0100 (Tue, 01 Oct 2019) # # https://github.com/harisekhon/bash-tools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn and optionally sen...
package com.desafio.surittec.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework...
cat /etc/issue
import random import string def main(size): chars = string.ascii_letters + string.digits + '!@#$ç%&*-+' rand = random.SystemRandom() print(''.join(rand.choice(chars) for i in range(size))) if __name__ == '__main__': i = 0 size = input('White size for password: ') main(int(size)) while i ...
package mybatis.test; import mybatis.bean.RewardOrder; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.junit.Before; import org.junit.Test; import java.io.IOExc...
package fr.syncrase.ecosyst.aop.crawlers.service.aujardin; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import fr.syncrase.ecosyst.domain.Plante; public class ...
package com.telenav.osv.manager.network; import android.content.Context; import android.os.Handler; import android.os.HandlerThread; import android.os.Process; import com.android.volley.ExecutorDelivery; import com.android.volley.Network; import com.android.volley.Request; import com.android.volley.RequestQueue; impo...
<reponame>vanhullc/onAir import { ActionReducerMap } from '@ngrx/store'; import { UserState, userInitialState } from './user/user.model'; import { UsersState, usersInitialState } from './users/users.model'; import { RadioState, radioInitialState } from './radio/radio.model'; import { RadiosState, radiosInitialState } f...
package com.my.blog.website.service.impl; import com.github.pagehelper.PageHelper; import com.my.blog.website.dao.MetaVoMapper; import com.my.blog.website.modal.Vo.CategoryVo; import com.my.blog.website.service.CategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.s...
<filename>src/example-components/MarketingPricingTables/MarketingPricingTables5/index.js import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Grid, Container, Card, Button } from '@material-ui/core'; export default function LivePreviewExample() { return ( <> ...
<reponame>marionFlx/community module.exports = { chainWebpack: config => { // fork-ts-checker is sadly ignoring the Vue shim // and throws incorrect errors // we disable it as it is just a nice to have to speed up the build config.plugins.delete('fork-ts-checker'); config.module .rule('ts') ...
#! /usr/bin/env python3 # -*-coding:UTF-8 -*- # @Time : 2019/01/04 16:19:54 # @Author : che # @Email : <EMAIL> import argparse parser = argparse.ArgumentParser(description='Search some files') parser.add_argument(dest='filenames', metavar='filename', nargs='*') parser.add_argument('-p', '--pat', metavar='patt...
<gh_stars>0 package proptics.internal /** @tparam S the source of a [[proptics.Prism_]] * @tparam T the modified source of a [[proptics.Prism_]] * @tparam A the focus of a [[proptics.Prism_]] */ private[proptics] trait PrismFunctions[S, T, A] { def viewOrModify(s: S): Either[T, A] }
"""Tests for predictions To run tests: pytest . These tests depend on a postgres db. Either you can specify the URL of an empty db with TEST_DATABASE_URL, or you can let this script delete (if exists) and create a db called postgres:///predictionstest. """ import os import pytest import datetime import subproc...
<gh_stars>1-10 package br.com.swconsultoria.nfe.util; import br.com.swconsultoria.nfe.Assinar; import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe; import br.com.swconsultoria.nfe.dom.Evento; import br.com.swconsultoria.nfe.dom.enuns.AssinaturaEnum; import br.com.swconsultoria.nfe.dom.enuns.EventosEnum; import br.com...
<filename>lang/py/cookbook/v2/source/cb2_5_4_sol_1.py class hist(dict): def add(self, item, increment=1): ''' add 'increment' to the entry for 'item' ''' self[item] = increment + self.get(item, 0) def counts(self, reverse=False): ''' return list of keys sorted by corresponding values '''...
import { gql } from '@apollo/client'; import { RATE_LIMIT } from './fragment'; export const GET_RATE_LIMIT = gql` ${RATE_LIMIT} query { ...RateLimit } `;
def convertToCapitalize(sentence) words = sentence.split() capitalize = [word.capitalize() for word in words] return " ".join(capitalize)
#!/bin/bash -f #********************************************************************************************************* # Vivado (TM) v2019.2 (64-bit) # # Filename : mb_design.sh # Simulator : Xilinx Vivado Simulator # Description : Simulation script for compiling, elaborating and verifying the project source fi...
package stores import ( "context" ) type Reader interface { Read(ctx context.Context, records chan<- Record) error }
#!/bin/bash # Archived program command-line for experiment # Copyright 2016 Xiang Zhang # # Usage: bash {this_file} [additional_options] set -x; set -e; th main.lua -driver_location models/ifeng/charbag -train_data_file data/ifeng/topic/train_charbag.t7b -test_data_file data/ifeng/topic/test_charbag.t7b "$@";
# # Initializes Oh My Zsh. # # Authors: # Robby Russell <robby@planetargon.com> # Sorin Ionescu <sorin.ionescu@gmail.com> # # Check for the minimum supported version. min_zsh_version='4.3.10' if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then print "omz: old shell detected, minimum required:...
<filename>src/main/java/com/alipay/api/domain/PaytoolRefundResultDetail.java package com.alipay.api.domain; import java.util.Date; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 支付工具退款结果...
package io.renrenapi.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * * * @author wcf * @email <EMAIL> * @date 2019-08-01 16:57:05 */ @Data @TableName("tb_House") pub...
addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0.4.0")
<filename>sources/Engine/Modules/Audio/AudioSystem.cpp #include "precompiled.h" #pragma hdrstop #include "AudioSystem.h" #include <utility> #include <spdlog/spdlog.h> #include "Modules/Graphics/GraphicsSystem/TransformComponent.h" #include "Exceptions/exceptions.h" #include "ALDebug.h" AudioSystem::AudioSystem(std...
#include <iostream> #include <cmath> class Shape { public: virtual double area() const = 0; virtual double perimeter() const = 0; }; class Rectangle : public Shape { private: double width, height; public: Rectangle(double w, double h) : width(w), height(h) {} double area() const override { ...
class HTMLParser: def __init__(self): self.depth = 0 self.maxdepth = 0 def start(self, tag): """ Updates the depth when an opening tag is encountered. Args: tag (str): The name of the opening tag. Returns: None """ self.depth += ...
<reponame>ReCursia/Sonic<filename>core/src/com/studentsteam/sonic/screens/SaveScreen.java package com.studentsteam.sonic.screens; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.Screen; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx...
import React, { useState } from 'react'; import { Flair } from '@clowdr-app/clowdr-db-schema/build/DataLayer'; import "./FlairInput.scss"; import FlairChip from '../../Profile/FlairChip/FlairChip'; import useSafeAsync from '../../../hooks/useSafeAsync'; import useConference from '../../../hooks/useConference'; import u...
import React from 'react'; import s from './index.scss'; interface Props { msgCount?: number; isMsg?: boolean; } const Placehold: React.FC<Props> = ({ msgCount, isMsg }) => { return ( <> {msgCount ? ( <div className={s.hasMag}> {msgCount}条{isMsg ? '留言' : '评论'} </div> )...
#!/bin/sh #p=$(dirname $_) #echo "$p" #path=$(dirname $0) #path=${path/\./$(pwd)} #echo $path p=. if [ ! -d "lib" ]; then mkdir "lib" fi if [ ! -d "lib/linux" ]; then mkdir "lib/linux" fi if [ ! -d "lib/linux/Debug" ]; then mkdir "lib/linux/Debug" fi if [ ! -d "lib/linux/Release" ]; then mkdir "lib/linux/Release" ...
package iptree32 // !!!DON'T EDIT!!! Generated by infobloxopen/go-trees/etc from <name>tree{{.bits}} with etc -s uint32 -d uintX.yaml -t ./<name>tree\{\{.bits\}\} import ( "fmt" "net" "strings" "testing" ) func TestInsertNet(t *testing.T) { r := NewTree() newR := r.InsertNet(nil, 1) if newR != r { t.Errorf...
#!/usr/bin/env bash ################################################################################ # 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 A...
<filename>samples/keyvault/keyvault-examples.ts import { DefaultAzureCredential } from "@azure/identity"; import { KeyVaultManagementClient, VaultAccessPolicyParameters, VaultCreateOrUpdateParameters, VaultPatchParameters, } from "@azure/arm-keyvault"; const subscriptionId = process.env.subscriptionId; const c...
/* * Copyright 2021 HM Revenue & Customs * * 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 a...
def throttle_controller_step(self, cte, sample_time): throttle = 0 brake = 0 if linear_velocity == 0 and current_velocity < 0.1: throttle = 0 brake = 400 elif throttle < 0.1 and cte < 0: throttle = 0 decel = max(cte, self.decel_limit) brake = abs(decel) * sel...
<gh_stars>1-10 # -*- coding: utf-8 -*- """Batch generator definition.""" import cv2 import numpy as np class ImageBatchGenerator(object): """Batch generator for training on general images.""" def __init__(self, input_files, batch_size, height, width, channel=3, shuffle=False, flip_h=False):...
package test; import java.util.Calendar; import java.util.Date; import util.DateUtil; import util.StringUtil; public class Test { public static final int SECONDS_PER_YEAR = 60 * 60 * 24 * 365; public static final int SECONDS_PER_MONTH = 60 * 60 * 24 * 30; public static void main(String[] args) { ...
import React from 'react'; import { Switch, Route } from 'react-router-dom'; import ItemsContainer from './ItemsContainer'; import About from '../components/About' import NotFound from '../components/NotFound' import PrinciplesContainer from './PrinciplesContainer' export default function MainContainer({language}) { ...
class DataProcessor: def __init__(self, path): self.path = path self.data = self.load_data() def load_data(self): with open(self.path) as f: data = json.load(f) return data def process_data(self): results = [] for d in self.data: ...
<gh_stars>0 import * as mongoose from 'mongoose'; export const UserSchema=new mongoose.Schema({ name:String, gender:String, email: { type:String, unique:true }, phone: { type:Number, unique:true }, from:String, To:String, seatnumber:Number })
<filename>vst3sdk/public.sdk/samples/vst/mda-vst3/source/mdaThruZeroController.cpp /* * mdaThruZeroController.cpp * mda-vst3 * * Created by <NAME> on 6/14/08. * * mda VST Plug-ins * * Copyright (c) 2008 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this softw...
/* * Copyright 2019 Wultra s.r.o. * * 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...
<filename>src/project/enums/LoginResult.java package project.enums; public enum LoginResult { SUCCESS, FAILED_BY_CREDENTIALS, FAILED_BY_NETWORK, FAILED_BY_UNEXPECTED_ERROR; }
<reponame>risq/emaproject-mobile /** * Created by jerek0 on 02/04/2015. */ let $ = require('jquery'); let uiManager = require('./UIManager'); function init() { // fix scroll header $('header .bg2').height($(window).height() + 60); $('.dimension .content .dimensionLauncher').on('click', uiManager.goToD...
<gh_stars>1-10 const { ServiceBroker } = require("moleculer"); const Swagger = require("../src/swagger.mixin"); describe("Create a Swagger service without settings", () => { const broker = new ServiceBroker({ transporter: "Fake", nodeID: "node-1", logger: false, }); const SwaggerService = { name...
#!/bin/bash dieharder -d 15 -g 22 -S 538031746
import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; import java.util.Queue; import java.util.LinkedList; class Producer implements Runnable { // ... (same as in the problem description) public void run() { while (true) { consumer_lock.lock(); ...
#!/bin/bash BLACK="\033[0;30m" RED="\033[0;31m" GREEN="\033[0;32m" YELLOW="\033[0;33m" BLUE="\033[0;34m" MAGENTA="\033[0;35m" CYAN="\033[0;36m" DEFAULT="\033[0;37m" DARK_GRAY="\033[1;30m" FG_RED="\033[1;31m" FG_GREEN="\033[1;32m" FG_YELLOW="\033[1;33m" FG_BLUE="\033[1;34m" FG_MAGENTA="\033[1;35m" FG_CYAN="\033[1;36m" ...
<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.refresh = void 0; var refresh = { "viewBox": "0 0 512 512", "children": [{ "name": "path", "attribs": { "d": "M256,0C114.609,0,0,114.609,0,256s114.609,256,256,256s256-114.609,256-256S397.391,0,256,0z...
#!/bin/bash # Copyright 2018 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. # This script tests that a build with multiple versions of the Mundane crate in # the same build graph works properly. It perform...
def factorial(n): # Base case: if n is 1 or 0, return 1 if n <= 1: return 1 # Recursive case: calculate the factorial of n-1 and multiply it by n return n * factorial(n-1)
public class Fruit { private String name; private int quantity; public Fruit(String name, int quantity) { this.name = name; this.quantity = quantity; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public int getQuantity() { return this.quantit...
class RouteItem: def __init__(self, namespace, host, path, openapi_ui): self.namespace = namespace self.host = host self.path = path self.openapi_ui = openapi_ui class RouteManager: routes = {} @classmethod def load_kube_config(cls): # Implement the logic to loa...
<filename>bitly/kgs/spec/services/hash_service/finder_spec.rb # frozen_string_literal: true require_relative '../spec_helper' describe HashService::Finder do end
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. # echo "This script was generated under a different operating system." echo "Please update the PATH and LD_LIBRARY_PATH variables below, before executing this script" exit if [ -z "$...
def remove_duplicates(ls): result = [] for e in ls: if e not in result: result.append(e) return list(set(result))
<reponame>bytecodeio/migration_tool<gh_stars>0 // /* tslint:disable */ // /* // * The MIT License (MIT) // * // * Copyright (c) 2020 Looker Data Sciences, Inc. // * // * Permission is hereby granted, free of charge, to any person obtaining a copy // * of this software and associated documentation files (the "So...
(function () { angular .module('dashboardModule',[]) .controller('dashboardCtrl',dashboardCtrl); function dashboardCtrl($rootScope) { console.log('we are at dashboard'); } })();
def fibonacci(n): ''' Calculates fibonacci sequence for n number of terms. ''' if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2)
<reponame>francisuloko/todo-list /** * @jest-environment jsdom */ import MockStorage from '../src/__mocks__/local-storage.js'; import MockDOM from '../src/__mocks__/DOM.js'; describe('Update task completion', () => { const temp = [ { description: 'Sample 1', completed: false, index: 0, }...
#!/bin/sh function header(){ echo `date +[%F:%T]` } function message(){ echo "`header` $1" } datestring=`date +%F_%T` basedir=/home/guest/Documents/Eclipse tar cf /home/guest/Documents/Backups/backup$datestring.tar.gz $basedir --exclude="$basedir/.metadata" --exclude="$basedir/Testing" message "Backup successful, fil...
#!/bin/bash # Generates configurations for 1 node. # We can't pack several nodes without having `--home` flag working # so reducing nodes count to 1 for now and creating follow up ticket. set -euox pipefail # sed in macos requires extra argument if [[ "$OSTYPE" == "linux-gnu"* ]]; then sed_extension='' elif [[...
#!/bin/bash i=$1 if [ "$i" = "clean" ] then echo "Deleting all object files and binaries..." rm *.o rm *.elf rm *.bin rm *.*~ exit fi if [ "$i" = "" ] then echo "The source files have been built..." echo -e "To copy files to sdcard \n Use: ./build.sh flash" else echo "Action requested: $i" echo "Building ...
#!/bin/bash find data -iname "*.png" -type f -delete find data -iname "*.json" -type f -delete
<filename>src/components/Card/index.js<gh_stars>1-10 import styled from 'styled-components'; import { breakpoints, colors, sizes } from '../../styles/variables'; const Card = styled.div` position: relative; display: inline-flex; align-items: center; justify-content: center; width: ${({ width }) => width || ...
<filename>src/com/horowitz/mickey/trainScanner/TrainManagementWindow.java package com.horowitz.mickey.trainScanner; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import java.io.File; import...
import tensorflow as tf def generate_random_tensor(batch_size, feature_num): return tf.random.normal(shape=[batch_size, feature_num + 1])
<filename>tfc_web/bikes/urls.py from django.conf.urls import url from bikes.views import current_bikes urlpatterns = [ url(r'^current-bikes', current_bikes, name='current-bikes'), ]
def generate_sql(tableName, user_id, first_name, last_name, age, city): query = f"""SELECT * FROM {tableName} WHERE 1=1""" if user_id: query += f""" and user_id = {user_id}""" if first_name: query += f""" and first_name = '{first_name}'""" if last_name: query += f""" and last_nam...
<reponame>prasanthbendra/ng-2 'use strict'; var helpers = require('../helpers'); var operators = ['+', '-', '/', '*', '%', '<', '>', '==', '!=', '<=', '>=']; /** * Determine a relational operator based on the operator node * * @param {Object} node - The operator node * @returns {string} Returns a relational oper...
import java.io.IOException; import java.nio.file.attribute.BasicFileAttributes; public class CustomFile implements BasicFileAttributes { private String fileName; // other file attributes public CustomFile(String fileName) { this.fileName = fileName; // initialize other file attributes ...