text
stringlengths
1
1.05M
/** * iniciar.js: * ---------- * Funcion principal que pone en funcionamiento el servidor * y sus dependencias (Base de datos, enrutadores y manejadores) * * Seccion # 1 * Redes de Computadoras I (CI-4835) * Universidad Simon Bolivar, 2016. */ //Dependencias var servidor = require("./servidor"); var rutas...
#!/bin/bash # Execute sudo bash ./deletetopo.sh # ----------------------- DELETE TOPOLOGY STEP -------------------------------- sudo ./sdntool bridge --delete --switchname ovs1 --bridgename br1 sudo ./sdntool bridge --delete --switchname ovs1 --bridgename br2
<reponame>NODistance/philosophy-xu // The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import MintUI from 'mint-ui' import 'mint-ui/lib/style.css' import ax...
package by.kam32ar.server.model; import java.io.File; import java.net.URL; import java.net.URLClassLoader; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Properties; import by.kam32ar.server.helper.AdvancedCo...
use std::fs; use std::io; use std::io::BufRead; use std::path::Path; #[derive(Debug, PartialEq)] pub enum Mode { Normal, Debug, } pub struct Config { pub mode: Mode, } fn parse_mode(mode_str: &str) -> Result<Mode, String> { match mode_str.trim() { "Normal" => Ok(Mode::Normal), "Debug"...
package com.codernauti.sweetie.geogift; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.LayoutInflater; import android.view.View; imp...
import java.text.SimpleDateFormat; import java.util.Date; public class Logger { private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); private LogLevel logLevel; public Logger(LogLevel logLevel) { this.logLevel = logLevel; } public void setLogL...
// Copyright 2020 Self Group Ltd. All Rights Reserved. import { v4 as uuidv4 } from 'uuid' import { QRCode, ErrorCorrectLevel, QRNumber, QRAlphaNum, QR8BitByte, QRKanji } from 'qrcode-generator-ts/js' import IdentityService from './identity-service' import Jwt from './jwt' import Messaging from './messagi...
#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems # # # # Licensed under the Apache License, Version 2.0 (the "License"); you ...
<filename>src/shared/modules/Mailer/vos/MailCategoryVO.ts import INamedVO from '../../../interfaces/INamedVO'; export default class MailCategoryVO implements INamedVO { public static API_TYPE_ID: string = "mail_category"; public id: number; public _type: string = MailCategoryVO.API_TYPE_ID; public ...
package com.prismacloud.service.impl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.stream.JsonReader; import com.prismacloud...
SELECT CONCAT(trigger_schema,'.',trigger_name) AS trigger_name, CONCAT_WS(' ',action_timing,event_manipulation, ' OF ',event_object_table) AS trigger_event, action_statement FROM information_schema.triggers;
# # Cookbook Name:: optuitive-gocd # Recipe:: server # # Copyright (c) 2017 The Authors, All Rights Reserved. include_recipe 'gocd::server'
#!/usr/bin/env bash ############################################################################### # SLURM Configurations #SBATCH -J Pendulum-v0/TRPO_aggregate #SBATCH -t 03:00:00 #SBATCH -n 1 #SBATCH -c 1 #SBATCH --mem-per-cpu=2000 #SBATCH -o /work/scratch/dt11kypo/logs/benchmark/Pendulum-v0/TRPO/%A.out #SBATCH -e /...
#!/bin/bash # Runs astyle with parameters which should be checked in a pre-commit hook astyle \ --style=otbs \ --indent=spaces=4 \ --convert-tabs \ --keep-one-line-statements \ --pad-header \ "$@"
#include "cpu_usage.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <sys/stat.h> extern int exitFlag; extern FILE * ofsCPU; typedef struct { unsigned int cpu_total; unsigned int cpu_usage; } CPU_USAGE; void TerminateCapture(int statu...
const db = require('./mainDB') const Specialty_pizza = { add: ( description, price ) => db.none( `INSERT INTO specialty_pizza ( description, price ) VALUES ( '${description}', '${price}' )` ), getAll: () => db.any( `SELECT * FROM specialty_pizza` ), getById: specialty_pizza_id => db.one( `SELECT * FROM specialt...
const express = require('express'); const sqlite3 = require('sqlite3').verbose(); const cors = require('cors'); const db = new sqlite3.Database('eat.db'); const app = express(); // CORS app.use(cors({ origin:['http://localhost:8080'], methods:['GET','POST'], credentials: true // enable set cookie })); // suppo...
<filename>src/CancerLocator.java import org.apache.commons.math3.linear.*; import org.apache.commons.math3.stat.descriptive.moment.Mean; import org.apache.commons.math3.util.CombinatoricsUtils; import org.apache.commons.math3.util.FastMath; import java.io.*; import java.text.DecimalFormat; import java.util.*; import j...
#!/usr/bin/env bash # This file was generated from an m4 template. # Generation date-time (ISO 8601): 2018-06-22T10:10+00:00 # Git repository URL: https://github.com/oleks/git-ready-to-deploy # Commit ID: 394c2b040558a890d33d996c402d6594d1e5dfc6 # Copyright (c) 2016-2018 Oleks <oleks@oleks.info> # # Permission is he...
import { HobbyDto } from './hobby.dto'; //The server sends a list of all hobbies when the client requests it export class HobbyListDto { hobbies: HobbyDto[]; }
$(function () { $("#tabs").tabs(); $("#radioset").buttonset(); $("#controlgroup").controlgroup(); $("#recorder-ui-on").click(function () { chrome.tabs.executeScript({ code: '$("#recorderDialog").show()' }); chrome.storage.local.set({ 'recorderUi': true ...
#!/usr/bin/env bash # Copyright 2019 Jetstack Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#!/bin/bash PID_DIR=/run java -cp "ecsJars/*:common/*" -Dio.netty.tryReflectionSetAccessible=true -Diip.pid.dir=$PID_DIR "de.iip_ecosphere.platform.support.LifecycleHandler\$WaitingStarter" $*
<reponame>muehleisen/OpenStudio /*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and...
<gh_stars>0 package com.bcopstein.negocio.factories; import com.bcopstein.negocio.entidades.ItemVenda; public interface IRestricoes { boolean temRestricao(ItemVenda[] itens); }
package interfaces import ( "fmt" "github.com/abesto/easyssh/target" ) type Discoverer interface { HasSetArgs fmt.Stringer Discover(input string) []target.Target } type HasSetArgs interface { SetArgs(args []interface{}) } type TargetFilter interface { HasSetArgs fmt.Stringer Filter(targets []target.Target...
<reponame>Ranger-X/anycable<gh_stars>1000+ # frozen_string_literal: true require "fileutils" require "spec_helper" describe "CLI require app", :cli do context "when no application provided" do it "prints error and exit" do run_cli do |cli| expect(cli).to have_output_line("Couldn't find an applicat...
#!/bin/bash service apache2 stop # rabbitmqctl stop # supervisorctl -c /etc/supervisord/supervisord.conf shutdown
<filename>blueprints/auth-migration/files/config/migrations/__filename__.js export async function up(knex) { await knex.schema.createTableIfNotExists('<%= table %>', function (<%= tableVar %>) { <%= tableVar %>.increments(); <%= tableVar %>.timestamps(); }); // Add the appropriate columns to the <%= tab...
class Package { constructor(public name: string, public version: string, public stars: number) {} } class PackageRegistry { private packages: Package[] = []; addPackage(name: string, version: string, stars: number) { this.packages.push(new Package(name, version, stars)); } removePackage(name: string) {...
from django import template import mistune register = template.Library() @register.filter def markdown(value): markdown_converter = mistune.Markdown() return markdown_converter(value)
/* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 * * I2C C++ unit tests * * This example code is in the Public Domain (or CC0 licensed, at your option.) * * Unless required by applicable law or agreed to in writing, this * software is...
if [[ -n $SSH_CONNECTION ]]; then export PS1='%m:%3~$(git_info_for_prompt)%# ' else export PS1='%3~$(git_info_for_prompt)%# ' fi export LSCOLORS="exfxcxdxbxegedabagacad" export CLICOLOR=true fpath=($ZSH/zsh/functions $fpath) autoload -U $ZSH/zsh/functions/*(:t) HISTFILE=~/.zsh_history HISTSIZE=10000 SAVEHIST=10...
#!/usr/bin/env bats # This file is used to test the installation and removal # of a Debian package. # WARNING: This testing file must be executed as root and can # dramatically change your system. It removes the 'elasticsearch' # user/group and also many directories. Do not execute this file # unless you know exactly...
<reponame>superJackiee/Laravel-TCL function archive(tanker) { console.log(tanker); $.ajax({ type: 'POST', url: base_url + '/tankers/archive', data: { _token: $("[name='_token']").val(), tanker_id: tanker }, success: function(response) { ...
<gh_stars>1-10 package com.benmu.framework.activity; import android.content.Context; import android.content.Intent; import android.net.http.SslError; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Log; import android.vie...
#!/usr/bin/env bash set -e # Fix ownership of output files finish() { # Fix ownership of output files user_id=$(stat -c '%u:%g' /data) chown -R ${user_id} /data } trap finish EXIT # gather time and memory statistics, save everything to log echo "/usr/bin/time -f '\\\\nDEBUG_MAX_MEM:%M\\\\nDEBUG_RUNTIME:%E...
<filename>sdk/src/main/java/com/iovation/launchkey/sdk/transport/domain/DirectoryV3DevicesPostRequest.java<gh_stars>0 /** * Copyright 2017 iovation, Inc. * <p> * Licensed under the MIT License. * You may not use this file except in compliance with the License. * A copy of the License is located in the "LICENSE.txt...
# Import libraries import numpy as np import matplotlib.pyplot as plt from PIL import Image from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers.convolutional import Conv2D, MaxPooling2D # Read image in the format of NumPy array img = np.array(Image.open(<image_url>...
function [A1,A2,A3,A4] = splitMatrix(Mtrx) % Split matrix A1 = Mtrx(1:2,1:2,1:2); A2 = Mtrx(1:2,1:2,3:4); A3 = Mtrx(3:4,1:2,1:2); A4 = Mtrx(3:4,1:2,3:4); end
import React from 'react' import styled from 'styled-components' const A = styled.a` color: white; &&:visited { color: white; } ` const StyledFooter = styled.footer` position: absolute; text-align: center; bottom: 20px; width: 100vw; ` const Footer = () => { return ( <StyledFooter> <p> ...
<filename>app/src/main/java/com/kp/twitterclient/models/DbUser.java package com.kp.twitterclient.models; import com.activeandroid.Model; import com.activeandroid.annotation.Column; import com.activeandroid.annotation.Table; import java.util.List; @Table(name = "USERS") public class DbUser extends Model { @Colum...
import React, { Fragment } from 'react' import Header from '../Header/Header' import Container from './Container' import SideNav from '../SideNav/SideNav' import Main from './Main' import styled from '@emotion/styled/macro' import bg from '../../assets/bg-page.png' const DefaultLayoutContainer = styled('nav')` ba...
<reponame>baade-org/eel package org.baade.eel.core.server; import io.netty.channel.ChannelInitializer; import io.netty.channel.socket.SocketChannel; /** * @author <a href="http://eel.baade.org">Baade Eel Project</a> * 2017/3/23. */ public interface ISocketServer extends IServer { public void setChanne...
SELECT * FROM Books WHERE date_published > DATEADD(year, -5, getdate());
def replace_letter(string, old_letter, new_letter): return string.replace(old_letter, new_letter) string = "Hello World" new_string = replace_letter(string, 'l', 'z') print(new_string)
from typing import List, Dict, Union from colour import Color def add_color(tweets: List[Dict[str, Union[str, float]]]) -> None: for tweet in tweets: sentiment_score = tweet["sentiment_score"] if sentiment_score < 0: color = Color("red").get_rgb() color = f"rgb({int(color[0]...
#!/bin/sh wd="$(dirname "$0")" : "${crt:=orchestrator.crt}" : "${ca_crt:=server.crt}" : "${key:=orchestrator.key}" : "${gen_crt_sh:=$wd/gen-certs.sh}" : "${oc2_url:=https://127.0.0.1:1512/oc2}" : "${request_id:=$(uuid || date +%s)}" if which jq >/dev/null;then _jq() { jq . "$@"; } else _jq() { cat "$@"; } fi tes...
/* * 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 agreed to ...
function processComponent(Component) { const ModifiedComponent = () => { return ( <Component.type {...Component.props}> {Component.props.children} </Component.type> ); }; const ButtonRenderer = ModifiedComponent().props.children.props.children; const ModifiedButtonRenderer = (Button...
<filename>middleman-core/lib/middleman-core/sitemap/extensions/redirects.rb require 'middleman-core/sitemap/resource' require 'middleman-core/contracts' module Middleman module Sitemap module Extensions # Manages the list of proxy configurations and manipulates the sitemap # to include new resources ...
#!/usr/bin/env bash set -eEuo pipefail cd `dirname $BASH_SOURCE`/.. pushd .. > /dev/null pwd rm -rf instana-serverless*.tgz rm -rf instana-aws-lambda*.tgz # Specify one of: # - BUILD_LAMBDAS_WITH=local # - BUILD_LAMBDAS_WITH=npm # - BUILD_LAMBDAS_WITH=layer # See ../README.md for details. # Note: ${BUILD_LAMBDAS_W...
import React from "react"; import { Typography, makeStyles } from "@material-ui/core"; const useStyles = makeStyles((theme) => ({ root: { position: "absolute", bottom: theme.spacing(2), left: 0, right: 0 // zIndex: 10000 }, button: { backgroundColor: theme.palette.primary.light, bord...
<reponame>simplebam/GlideDemo<gh_stars>1-10 package com.yueyue.glidedemo.module.chapter_5; import android.content.Context; import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.support.v4.widget.SwipeRefreshLayout; import android.widget.Button; import android.widget.ImageView; imp...
#!/bin/bash IPTABLES=/sbin/iptables IPTABLES_SAVE=/sbin/iptables-save $IPTABLES_SAVE > /usr/local/etc/iptables.last echo '配置默策略ACCEPT' $IPTABLES -P INPUT ACCEPT $IPTABLES -F INPUT echo '清空nat表' $IPTABLES -t nat -F $IPTABLES -t nat -X $IPTABLES -t nat -Z $IPTABLES -t mangle -F $IPTABLES -t mangle -X $IPTABLES -t ma...
import { parse as pathParse } from "path"; import { RestAnnotation } from "./ast"; function scanHeaders(text: string) { // Header name: https://tools.ietf.org/html/rfc2616#section-4.2 const headerRegex = /\[header (?<header>[^()<>@,;:\\"/[\]?={}\s\t]+): \{(?<name>\w+)\}\]/gu; const headers = new Map<string, str...
package io.github.marcelbraghetto.dailydeviations.features.collection.ui; import android.annotation.TargetApi; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.anno...
<reponame>bookmansoft/gamegold-wechat-server let facade = require('gamecloud') let { ReturnCode, NotifyType } = facade.const let rp = require('request-promise'); let qr = require('qr-image'); /** * 游戏的控制器 * Updated on 2018-11-19. */ class wallet extends facade.Control { /** * 创建钱包 * @param {*} user ...
def remove_duplicates(lst): return list(dict.fromkeys(lst)) result = remove_duplicates([1, 2, 2, 4, 5]) print(result)
class Node: def __init__(self, value): self.value = value self.next = None class LinkedList: def __init__(self): self.head = None def append(self, value): new_node = Node(value) if not self.head: self.head = new_node else: node = self...
/*************************************************************************** * Copyright (C) 2014 by <NAME> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms...
#!/bin/bash # NoobTaco Simple Post-install script # Install Wine sudo dpkg --add-architecture i386 && wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt-add-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main' && # Add Lutris repository sudo add-apt-rep...
#! /usr/bin/env bash # Copyright 2018 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 ...
<gh_stars>10-100 import { Disposable } from 'atom' import { BusySignalService } from 'atom-ide' import { AutoLanguageClient } from 'atom-languageclient' import { LanguageServerProcess } from 'atom-languageclient/build/lib//server-manager.js' import DatatipAdapter from 'atom-languageclient/build/lib/adapters/datatip-ada...
<filename>1.0.0a/src/jadalib/libsess-media.c #include "jada.h" #include "jada_internal.h" #include "jada_messages.h" #include "jada_events.h" DllExport JADA_Call __stdcall JADA_CallNew(char *szFile, int iLine, JADA_Connection connSelf) { int iRet; JADA_CallSelf *callPtr; JADA_ConnSelf *co...
<filename>migrations/versions/cf4d4d621167_.py """empty message Revision ID: cf4d4d621167 Revises: <PASSWORD> Create Date: 2021-03-15 11:23:22.889100 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cf4d4d621167' down_revision = '<PASSWORD>' branch_labels = Non...
#! /bin/dash export FLASK_ENV=development export FLASK_APP=memelinks.py flask run
#!/bin/bash if [ "$createdump" = "yes" ]; then echo "Creating dump to /data/share/ilias.tar.gz" /data/resources/base/createiliasdump.sh --target /data/share/ilias.tar.gz fi if [ "$restorefromdump" = "yes" ]; then echo "Restoring from /data/share/ilias.tar.gz" /data/resources/base/restoreilias.sh --src /data/share...
package com.shop.controller.cart; import com.shop.been.AjaxResult; import com.shop.model.cart.CartItem; import com.shop.model.cart.CartMerchant; import com.shop.model.merchant.Item; import com.shop.model.merchant.Merchant; import com.shop.service.cart.CartService; import org.springframework.beans.factory.annotation.Aut...
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * * 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 ...
#!/bin/sh if [ "x$CRONTAB" == "x" ]; then echo "Set environment variable CRONTAB" echo "Example: 0 3 * * * echo hi" sleep 10 exit 1 fi echo "$CRONTAB" >> /etc/crontabs/root cat /etc/crontabs/root exec crond -f
from typing import List def filterBrandStoreLinks(links: List[str]) -> List[str]: filtered_links = [link.split(": ")[1] for link in links if link.split(": ")[1]] return filtered_links # Test the function with the example input input_links = ["brandStoreLink: https://example.com", "brandStoreLink: ", "brandSto...
import React, {FC} from 'react'; import A from '@renderer/components/A'; import DetailPanel from '@renderer/components/DetailPanel'; import {Loader} from '@renderer/components/FormElements'; import {VALIDATOR_CONFIGS} from '@renderer/constants'; import {useNetworkConfigFetcher} from '@renderer/hooks'; import {Validato...
#!/bin/sh # Prepare to build the FTDI module for LT4 21.4 on the NVIDIA Jetson TK1 if [ $(id -u) != 0 ]; then echo "This script requires root permissions" echo "$ sudo "$0"" exit fi # Get the kernel source for LT4 21.4 cd /usr/src/ wget http://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/source/...
var express = require('express'); var path = require('path'); var app = new express(); app.use(express.static(__dirname)) app.use('*',function(req,res){ res.sendFile(path.resolve(__dirname,'index.html')) }) app.listen(8080); console.log('app is running at port 8080')
# # 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 not...
#!/bin/bash # # Configures the nanopub server via environment variables, and then starts it. # # Environment variables can be set before this script is run like this: # # $ export NPS_PUBLIC_URL=http://np.inn.ac/ # $ export NPS_ADMIN="John Doe <john@example.com>" # $ export NPS_COLLECT_NANOPUBS_ENABLED=true # # Go to ...
package processor import ( "fmt" "io/ioutil" "os" "testing" "github.com/Jeffail/benthos/v3/lib/log" "github.com/Jeffail/benthos/v3/lib/message" "github.com/Jeffail/benthos/v3/lib/metrics" "github.com/Jeffail/benthos/v3/lib/types" ) func TestJSONSchemaExternalSchemaCheck(t *testing.T) { schema := `{ "$id":...
<gh_stars>0 # Copyright 2016-present CERN – European Organization for Nuclear Research # # 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/licens...
#!/bin/bash VOLUME_HOME="/var/lib/mysql" sed -ri -e "s/^upload_max_filesize.*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" \ -e "s/^post_max_size.*/post_max_size = ${PHP_POST_MAX_SIZE}/" /etc/php5/apache2/php.ini if [[ ! -d $VOLUME_HOME/mysql ]]; then echo "=> An empty or uninitialized MySQL volume is d...
#!/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. T...
import { randomizedTest } from '../src/randomizedTest'; describe('randomizedTest', () => { randomizedTest('Without seed, no async', randomizer => { if(! randomizer) throw new Error(); }); randomizedTest('Without seed, async', (randomizer, done) => { if(! randomizer) throw new Error(); done(); }); });
public class ItemCooldownManager { private bool IsCooldown; private float cooldownDuration; private float cooldownInitTime; private Item ObservedItem; // Update is called once per frame public void Update() { if (IsCooldown && Time.time - cooldownInitTime >= cooldownDuration) ...
<reponame>Zwooosh/sebastiaanscheers.nl import { useState, useRef, useCallback } from 'react' import { useSafeLayoutEffect } from './useSafeLayoutEffect' export interface IUseImageProps { src?: string srcSet?: string sizes?: string onLoad?(event: Event): void onError?(error: string | Event): void ignoreFall...
<filename>examples/object-entrys/config-overrides.js const paths = require('react-scripts/config/paths'); const rewireEntry = require('react-app-rewire-entry'); paths.appAdminJs = paths.appSrc + '/admin.js'; const { rewireWebpackEntryConfig, rewireDevServerkEntryConfig, } = rewireEntry({ index: paths.appIndexJs,...
#!/bin/sh BASEDIR=$(dirname "$0") java -Xmx1024M -jar "$BASEDIR/../lib/vome.jar" --config "$BASEDIR/../etc/databases.xml"
#!/bin/bash # essentials sudo apt-get install --yes \ build-essential \ cmake \ curl \ direnv \ fish \ golang \ htop \ hub \ jq \ mosh \ neofetch \ neovim \ nodejs \ python-dev \ python-pip \ python3-dev \ python3-pip \ tmux \ wget \ xz-utils # neovim sudo update-alternatives --in...
#!/bin/bash exit 1; # This is a shell script, but it's recommended that you run the commands one by # one by copying and pasting into the shell. # Caution: some of the graph creation steps use quite a bit of memory, so you # should run this on a machine that has sufficient memory. . cmd.sh # Data prep #local/swbd_p...
<reponame>rafalcieslak/RGK /*#include "brdf.hpp" #include "glm.hpp" #include <glm/gtx/vector_angle.hpp> #include <glm/gtx/string_cast.hpp> #include "out.hpp" #include "utils.hpp" #include "LTC/ltc.hpp" #include "random_utils.hpp" std::tuple<glm::vec3, Spectrum> BRDF::GetRay(glm::vec3 normal, glm::vec3 inc, Spectrum ...
// https://codejam.withgoogle.com/2018/challenges/0000000000000130/dashboard/0000000000000524 #include <iomanip> #include <iostream> using namespace std; int main() { int t; cin >> t; for (int i = 1; i <= t; i++) { int d, n; cin >> d >> n; double m = -1; for (int j = 0; j < n; j++) { int k, s; cin >>...
def c2f(c): return (c * 9 / 5) + 32 celsius = [21, 12, -4] fahrenheit = [] for temp in celsius: fahrenheit.append(c2f(temp)) print(fahrenheit) # Output: [69.8, 53.6, 24.8]
#include <iostream> using namespace std; void print_sum(int a, int b, char operator_) { cout<< operator_ << a + b; } int main(){ print_sum(2,3,'+'); return 0; }
<gh_stars>0 package algorithms; public class FibonacciVariations { public static long calculateResult(int n) { if (n <= 1) { return n; } int previousLastNumber = 0; int lastNumber = 1; int tempNumber = 0; for (int i = 2; i <= n; i++) { tempNumber = lastNumber; lastNumber = lastNumber + previousLa...
import plotly.offline as py import plotly.graph_objs as go import pandas as pd # Read in the data data = pd.read_csv('AAPL_data.csv') # Create traces apple_trace = go.Scatter( x = data['date'], y = data['close'], name = 'Apple' ) # Create the layout layout = go.Layout( title = 'Apple Stock Price Tren...
const MODERN_ACTIVITY = 15; const HALF_LIFE_PERIOD = 5730; module.exports = function dateSample(sampleActivity) { //throw 'Not implemented'; let n if (typeof(sampleActivity) === 'string' && parseFloat(sampleActivity) > 0 && parseFloat(sampleActivity) < 15 && parseFloat(sampleActivity) !== NaN) { n = Math.c...
# |source| this file # # Utilities for working with EC2 instances # cloud_DefaultZone() { echo "us-east-1b" } cloud_RestartPreemptedInstances() { : # Not implemented } # AWS region is zone with the last character removed __cloud_GetRegion() { declare zone="$1" # AWS region is zone with the last character rem...
class Difference: def __init__(self, a, b): self.a = a self.b = b def calculate(self): if self.a > self.b: return self.a - self.b elif self.a < self.b: return self.b - self.a else: return self.a + self.b
#!/bin/sh rm -rf figures/* cd figures ../../genplot.py -i ../ResultsL2/cophir/res_K\=10.dat -o cophir_L2_dist -x 0~norm~Recall -y 1~log~ImprDistComp -l "none" -t "CoPhIR" ../../genplot.py -i ../ResultsL2/sift_texmex_base1m/res_K\=10.dat -o sift_L2_dist -x 0~norm~Recall -y 1~log~ImprDistComp -l "none" -t "SIFT" ../../ge...
mongo --host 192.168.99.100 --port <service_port>