text
stringlengths
1
1.05M
DEV_PACKAGES=" git build-essential curl emacs24-nox htop nmon slurm tcpdump unzip vim " ESSENTIAL_PACKAGES=" ntp nfs-common " sudo apt-get update sudo apt-get -y install $ESSENTIAL_PACKAGES $DEV_PACKAGES
#!/bin/sh if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then updates_arch=0 fi if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then # if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then # if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then # if ! updates_aur=$(trizen -Su --aur --quiet | wc ...
/******************************************************************************* * Copyright (c) 2018-07-03 @author <a href="mailto:<EMAIL>"><NAME></a>. * All rights reserved. * * Contributors: * <a href="mailto:<EMAIL>"><NAME></a> - initial API and implementation. * Auto Generate By foreveross.com Quick Deli...
#!/bin/bash # # # 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 writing, software # dis...
import java.util.*; import java.lang.*; public class escape{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); double vp=sc.nextDouble(); double vd=sc.nextDouble(); double t=sc.nextDouble(); double f=sc.nextDouble(); double c=sc.nextDouble(); double p=vp*t; ...
<reponame>VladimirHumeniuk/keystone import { css } from 'glamor'; import React, { PropTypes } from 'react'; import octicons from './octicons'; import colors from './colors'; import sizes from './sizes'; import classes from './styles'; // FIXME static octicon classes leaning on Elemental to avoid duplicate // font and...
#!/bin/sh set -e set -u set -o pipefail 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 script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_P...
<filename>db/migrate/20170930163035_add_deposit_info_to_proposals.rb class AddDepositInfoToProposals < ActiveRecord::Migration[5.0] def change add_column :proposals, :deposit_id, :string add_column :proposals, :deposit_paid, :boolean add_column :proposals, :deposit_paid_on, :date end end
import React from 'react'; const Arm = () => { return ( <svg className="arm" x="0px" y="0px" width="140px" height="200px" viewBox="0 0 40 100"> <line fill="none" stroke="#000000" strokeMiterlimit="10" x1="11.415" y1="15.61" x2="8.69" y2="66.685"/> <line fill="none" stroke="#000000" strokeMiterlimit="...
<reponame>holwech/robogamer export enum Mode { Sim, Real, } export default class Options{ public static readonly default = new Options("./localTeam.js", "./opponents/random.js", Mode.Sim); public constructor( public readonly red: string, public readonly blue: string, public rea...
from collections import Counter arr = [1, 1, 2, 3, 4, 1] arr_dict = dict(Counter(arr))
package app.services; public class SearchParams { private String name; private String genre; private Integer fromYear; private Integer toYear; public Integer getFromYear() { return fromYear; } public void setFromYear(Integer fromYear) { this.fromYear = fromYear; } public String getGenre()...
export type Data = { beds: number city: string country: string maxGuests: number photo: string rating: number superHost: boolean title: string type: string }
#!/usr/bin/env bash # Copyright (c) 2020-2021 Eli Aloni a.k.a elix22. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
from .code import Code from .commands import Commands from .environment import Environment from .labels import Labels from .registers import Registers from .types import Types from .vars import Vars from .config import ASM_COMMANDS_SEPARATOR class Compiler: entry_point_label = '_main' exit_interrupt = 0x80 ...
<reponame>ErVincit/meetbox-server const { Pool } = require("pg"); const pool = new Pool({ connectionString: process.env.DATABASE_URL, ssl: true }); pool.on("error", (error) => console.error("Error:", error)); // NOTE: pg-cursor per leggere grandi quantità di informazioni module.exports = pool;
#!/usr/bin/env bash ################################################################################# # Parameters ################################################################################# # The rootfs image file ROOTFS_IMAGE=$PWD/images/web-server-rootfs.ext4 # Temporary mount folder MOUNT_FOLDER=/tmp/micro...
package webapp.controller; import org.noear.solon.annotation.Controller; import org.noear.solon.annotation.Inject; import org.noear.solon.annotation.Mapping; import org.noear.solon.data.annotation.Tran; import webapp.dso.service.App2Service; import webapp.dso.service.AppService; /** * 多数据源事务演示 * */ @Mapping("/tran2...
/* * Copyright (c) 2020. The Kathra 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 ...
<filename>Back-End/SiteService/SITE/Model.go package main import ( "net/http" ) //Routing model type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc } type Routes []Route //Response messaging type Response struct { State State `json:"state"` Code ...
#!/bin/bash algo="RS HC SA" CC="0500000" dir_pre="test_2_2/MCTS_" dir_post="_2_" sub="elab" # Create `elab` dirs and copy txt files into them # for C in $CC # do # for a in $algo # do # dir=${dir_pre}${a}${dir_post}${C} # mkdir ${dir}/${sub} # cp ${dir}/*txt ${dir}/${sub} # done # ...
<reponame>smagill/opensphere-desktop package io.opensphere.mantle.crust; import java.awt.Color; import java.util.function.Consumer; import io.opensphere.core.Toolbox; import io.opensphere.core.event.DynamicService; import io.opensphere.core.geometry.renderproperties.DefaultTileRenderProperties; import io.opensphere.c...
<filename>bootstrapped/ideal/runtime/texts/text_visitor.java // Autogenerated from runtime/texts/text_visitor.i package ideal.runtime.texts; import ideal.library.elements.*; import ideal.library.texts.*; import ideal.runtime.elements.*; import ideal.library.channels.output; public abstract class text_visitor<result_...
# # Defines tmux aliases and provides for auto launching it at start-up. # # Authors: # Sorin Ionescu <sorin.ionescu@gmail.com> # Colin Hebert <hebert.colin@gmail.com> # Georges Discry <georges@discry.be> # Xavier Cambar <xcambar@gmail.com> # # Return if requirements are not found. if (( ! $+commands[tmux] ));...
<filename>commands/log_writer.go package commands import ( "io" "strings" ) type LogWriter struct { writer io.Writer offset int64 } func NewLogWriter(writer io.Writer) *LogWriter { return &LogWriter{ writer: writer, } } func (lw *LogWriter) Flush(logs string) error { reader := strings.NewReader(logs) _, ...
#!/usr/bin/env bash set -e # Get all server logs export CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL="trace" CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . $CURDIR/../shell_config.sh cur_name=$(basename "${BASH_SOURCE[0]}") server_logs_file=${CLICKHOUSE_TMP}/$cur_name"_server.logs" server_logs="--server_logs_file=$s...
#!/bin/bash #SBATCH --account=def-dkulic #SBATCH --mem=8000M # memory per node #SBATCH --time=23:00:00 # time (DD-HH:MM) #SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_RoboschoolInvertedPendulumSwingup-v1_doule_ddpg_hardcopy_action_noise_seed2_run4_%N-%j.out # %N for ...
import React, { createRef, ChangeEvent } from "react"; import { Spinner } from "../components/shared/Spinner"; import { Navbar } from "../components/ui/Navbar"; import Image from "next/image"; import { useMeQuery, useUpdateProfileMutation } from "../generated/graphql"; import { Form, Formik } from "formik"; import { Bu...
#!/bin/bash # Copyright 2017 The Openstack-Helm 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 require...
#!/bin/sh # This fallback is for the cmake build, which won't have an FBCODE_DIR # environment variable, and runs this from the runtime subdir. DIR="$( cd "$( dirname "$0" )" && pwd )" if [ x"$FBCODE_DIR" = x"" ] ; then FBCODE_DIR="$DIR/../.." INSTALL_DIR="$FBCODE_DIR/hphp/runtime" fi SCRIPT=$FBCODE_DIR/hphp/...
#!/bin/bash # Pass the host name if [ ! -z "$1" ]; then host=$1 # Use the stack name env variable elif [ ! -z "$STACK_ID" ]; then host=$STACK_ID echo "$host" else echo 'usage: install.sh host_name' exit 1 fi sed -i -e "s/myhost/$host/g" apache/kibana.conf apt-get install apache2-utils supervisor ...
#!/bin/sh ################################################################################ # benchmarks/chaining/run.sh # # Part of Project Thrill - http://project-thrill.org # # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ###############################################################...
#!/usr/bin/env bash # Copyright (C) 2013 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU General Pu...
import time sentence = "Hello World" while True: print(sentence) time.sleep(10)
<gh_stars>0 package io.cattle.platform.inator.launchconfig.impl; import io.cattle.platform.core.constants.InstanceConstants; import io.cattle.platform.core.model.VolumeTemplate; import io.cattle.platform.inator.Unit; import io.cattle.platform.inator.UnitRef; import io.cattle.platform.inator.factory.InatorServices; imp...
(self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_pages_Admin_ClientProject_index_vue"],{ /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/layouts/Admin/Layout.vue?vue&type=script&lang=js...
import re def parse_requirements(cron_string): requirements = cron_string.split() # Split the cron string by spaces to extract individual requirements return requirements # Test cases cron_string_1 = "CHECKHOURS0-6 CHECKMINUTES0-30 WEEKDAYS MINNUM10 MAXNUM50 LOOKBACKSECONDS1800" cron_string_2 = "CHECKHOURS8-...
#!/bin/bash XSD2PGSCHEMA=../extlibs/xsd2pgschema.jar if [ ! -e $XSD2PGSCHEMA ] ; then ( cd ..; ./scripts/update_extlibs.sh ) fi XML_SCHEMA=wwpdb_validation_v6.00.xsd DB_SCHEMA=wwpdb_validation_v6.00.sql java -classpath ../extlibs/xsd2pgschema.jar xsd2pgschema --xsd $XML_SCHEMA --ddl $DB_SCHEMA echo Generated: $DB...
def post(self, request, *args, **kwargs): """ Marks a membership as declined. In addition deletes now unnecessary information. :param request: HTTP request object containing the data to process :param uuid: share_right_id (assuming this parameter is required for processing) :param args: additional ...
<filename>src/len.js const callable = require('./callable') const enumerate = require('./enumerate') module.exports = object => { if (callable(object.__len__)) { return object.__len__() } // E.g. built-in 'Array' if (typeof(object.length) === 'number') { return object.length } ...
<gh_stars>1-10 package io.github.vampirestudios.obsidian.api.obsidian.enchantments; import net.minecraft.entity.EntityGroup; public class AttackDamage { public int level = 1; public String entity_group; public float attack_damage; public EntityGroup getEntityGroup() { return switch (entity_g...
<reponame>ArcanjoQueiroz/keycloak-authentication-service<gh_stars>1-10 import axios from 'axios'; const authServerBaseUrl = process.env.AUTH_SERVER_BASE_URL || 'http://localhost:9999/auth'; const realm = process.env.REALM || 'test'; const clientId = process.env.CLIENT_ID || 'test'; const clientSecret = process.env.CLI...
import React from 'react' import Routes from './routes' import GlobalStyles from './global/styles.global' const App = () => ( <> <GlobalStyles /> <Routes /> </> ) export default App
def remove_duplicates(my_list): # create a new list uniques = [] # iterate over the list and add the elements that are not present in uniques list for element in my_list: if element not in uniques: uniques.append(element) return uniques
<reponame>smagill/opensphere-desktop /** * Package for the WMS URL builder. */ package io.opensphere.wms.util;
<reponame>parkingomat/namecheap<filename>types/typedefs/users/index.js<gh_stars>1-10 export {} /* typal types/api/users/get-pricing.xml noSuppress */ /** * @typedef {_namecheap.GetPricing} GetPricing Options to get pricing info. https://www.namecheap.com/support/api/methods/users/get-pricing.aspx */ /** * @typedef {...
<filename>v1x1/orm/accountEx.go package orm import ( "errors" ) func AddFav( id, pid int64 ) (*AccountEx, error) { a := &AccountEx{} has, e := engine_account.Table("account_ex").Where("account_id = ?",id).Get(a) if e != nil { return nil, e } else if !has { return nil, errors.New("account not found") } if a...
/* * 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 ma...
<filename>elasta-composer/src/main/java/jpatest/models/Ac.java package jpatest.models; import javax.persistence.*; /** * Created by Jango on 10/2/2016. */ @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public class Ac extends Employee { @OneToOne(cascade = CascadeType.ALL) private Area area; ...
<reponame>liamdawson/DIM<filename>src/app/search/search-filters.ts<gh_stars>0 import _ from 'lodash'; import idx from 'idx'; import { compareBy, chainComparator, reverseComparator } from '../comparators'; import { DimItem, D1Item, D2Item } from '../inventory/item-types'; import { DimStore } from '../inventory/store-ty...
package dev.webfx.kit.mapper.peers.javafxgraphics.markers; import javafx.beans.property.DoubleProperty; /** * @author <NAME> */ public interface HasMinHeightProperty { DoubleProperty minHeightProperty(); default void setMinHeight(Number minHeight) { minHeightProperty().setValue(minHeight); } default Do...
<filename>Objective-Gems/KSMemoryPool.c // // KSMemoryPool.c // #include "KSMemoryPool.h" void ksmempool_init(KSMemoryPool* pool, void* memory, unsigned int size, unsigned int chunkSize) { pool->memory = memory; pool->chunkSize = chunkSize; ...
package mock; import com.linkedin.data.schema.RecordDataSchema; import com.linkedin.data.template.RecordTemplate; import com.linkedin.metadata.models.AspectSpec; import com.linkedin.metadata.models.RelationshipFieldSpec; import com.linkedin.metadata.models.SearchScoreFieldSpec; import com.linkedin.metadata.models.Sear...
<reponame>tangem/tangem-web<filename>src/components/Home/SectionFaq/index.js<gh_stars>0 import React, {useEffect, useRef, useState} from 'react' import classNames from 'classnames' import styles from './faq.module.scss' import {t} from "i18next"; const Accordion = ({ head, body }) => { const [isActive, setIsActive]...
#!/usr/bin/bash # # error.sh.in - error variable definitions for makepkg # # Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.org> # Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of...
#!/bin/bash LAB_HOME=${LAB_HOME:-`pwd`} source $LAB_HOME/install/funcs.sh docker_compose="sudo docker-compose -f docker-compose-registry-proxy.yml" function registry-proxy::init { insecure_registries=($(get_insecure_registries)) my_registry=${insecure_registries[0]} if ensure_os_linux && [ ! -f /etc/docker/dae...
//! Map particle mass, momentum and inertia to nodes template <unsigned Tdim> void mpm::Particle<Tdim>::map_mass_momentum_inertia_to_nodes() noexcept { // Map mass and momentum to nodes this->map_mass_momentum_to_nodes(); // Map inertia to nodes for (unsigned i = 0; i < nodes_.size(); ++i) { nodes_[i]->upd...
#!/bin/sh sqlplus $1 @04_transform_row_concepts.sql sqlplus $1 @04_load_concepts.sql sqlplus $1 @04_transform_row_relations.sql sqlplus $1 @04_load_relations.sql sqlplus $1 @04_transform_row_maps.sql sqlplus $1 @04_load_maps.sql
#ifndef TOKENIZER_H #define TOKENIZER_H #define MAX_TOK_LEN 4096 #define MAX_UNGETC 8 #include <stdint.h> #include <stddef.h> #include <stdio.h> struct tokenizer_getc_buf { int buf[MAX_UNGETC]; size_t cnt, buffered; }; enum markertype { MT_SINGLELINE_COMMENT_START = 0, MT_MULTILINE_COMMENT_START = 1, MT_MULTIL...
function getRemainder(num1, num2) { return num1 % num2; } const result = getRemainder(8, 4); console.log(result);
template <typename TRet> void processValue(void* val, size_t bytes, std::vector<TRet>& result) { if (bytes) { result.push_back(*(TRet*)&val); } }
class EventEmitter { constructor() { this.queue = {} //可触发多次的事件 this.onceQueue = {} //只能触发一次的事件 } on(event, fn) { //监听事件,可以触发多次 if (!this.queue[event]) this.queue[event] = [] this.queue[event].push(fn) } once(event, fn) { //监听事件,只能触发一次 if (!this.onceQueue[event]) { th...
<gh_stars>10-100 from twitterbot.services.twitter_bot_names_service import TwitterBotNamesService from twitterbot.services.twitter_bot_responses_service import TwitterBotResponsesService from twitterbot.services.twitter_bot_tweets_service import TwitterBotTweetsService from twitterbot.utils.log import bot_log class T...
import { createStore, combineReducers, compose, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import reducers from './reducers'; const rootReducer = combineReducers(reducers); let composeEnhancers = compose; export default createStore( rootReducer, composeEnhancers(applyMiddleware(thunk)) );
import json import threading from queue import Queue, Empty try: from queue import SimpleQueue except ImportError: # Python 3.6 lacks SimpleQueue SimpleQueue = Queue import click import dns.resolver import dns.inet from .dsscanner import do_cds_scan def resolve_dns_and_cds(domain): try: ip_addre...
<reponame>LarsBehrenberg/e-wallet import React, { Component } from 'react'; import { Container, InputAdornment, Button, TextField } from '@material-ui/core'; import { Formik } from 'formik'; import * as Yup from 'yup'; import NameIcon from '@material-ui/icons/SupervisorAccount'; import LockIcon from '@materi...
module HandleEnrollmentEvent # Extract the changes to make to the members class ExtractMemberChanges include Interactor # Context Requires: # - enrollment_event_cv (Openhbx::Cv2::EnrollmentEvent) # Context Outputs: # - member_changes_collection (Array of HandleEnrollmentEvent::MemberChange) ...
#!/bin/bash SHADOWSOCKS_PORT=${SHADOWSOCKS_PORT:-"4433"} SHADOWSOCKS_PASSWORD=${SHADOWSOCKS_PASSWORD:-"asdewq123"} SHADOWSOCKS_CRYPTO=${SHADOWSOCKS_CRYPTO:-"chacha20"} OBFS_PORT=${OBFS_PORT:-"993"} OBFS_PROTOCOL=${OBFS_PROTOCOL:-"tls"} KCPTUN_PORT=${KCPTUN_PORT:-"533"} KCPTUN_MODE=${KCPTUN_MODE:-"fast"} KCPTUN_KEY=${K...
goog.require('browser_instruments.AnalogGauge'); goog.require('browser_instruments.AssignFromScale'); goog.require('goog.array'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.net.WebSocket'); goog.require('goog.net.WebSocket.MessageEvent'); /** * Main entry point into the client applicati...
def celsius_to_fahrenheit(celsius): '''Returns the temperature in Fahrenheit given the temperature in Celsius.''' return (celsius * 9/5) + 32
/* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable no-console */ import gulp from 'gulp'; import del from 'del'; import eslint from 'gulp-eslint'; import flow from 'gulp-flowtype'; import webpack from 'webpack-stream'; import webpackConfig from './webpack.config.babel'; const paths = { allSrcJs...
#!/bin/sh base='/Users/shahargino/Documents/ImageProcessing' default_args='--batch --imgEnhancementMode=2 --mode="no_police" --ROI="(10,250,1700,500)" --confidence_thr=0.1 --PreprocessZoomIn=1.3 --PlateWidthPaddingFactor=1.2 --PreprocessMorphKernel="(1,1)"' LPR_test() { res=`build/lpr -i $1 $default_args $3 | grep...
<gh_stars>1-10 // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: lorawan-stack/api/devicerepository.proto package ttnpb import ( context "context" fmt "fmt" _ "github.com/TheThingsIndustries/protoc-gen-go-json/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/gogo/prot...
#!/bin/bash # This script parses in the command line parameters from runCust, # maps them to the correct command line parameters for DispNet training script and launches that task # The last line of runCust should be: bash $CONFIG_FILE --data-dir $DATA_DIR --log-dir $LOG_DIR # Parse the command line parameters # tha...
<gh_stars>1-10 #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <syslog.h> #include <sys/socket.h> #include <sys/un.h> #include "logger.h" /* Forward declare functions not in header */ void logger_cleanup(void); /* Global variables */ char* logger_identifier = NULL; char* logger_socket = NULL; int ...
<filename>src/hotplug/AbstractHotplugMonitor.h #pragma once #include <list> #include <string> #include "hotplug/HotplugListener.h" #include "util/Loggable.h" namespace BeeeOn { class HotplugEvent; class AbstractHotplugMonitor : protected Loggable { public: void registerListener(HotplugListener::Ptr listener); pr...
/************************************************************************* * * CAUTION: DO NOT EDIT THIS FILE -- YOUR CHANGES WILL BE LOST! * * This file is generated by config.sh * *************************************************************************/ #define REALM_VERSION "0.92.2" #define REALM_INSTALL_P...
import TopicFeedHeader from './TopicFeedHeader' import connector from './TopicFeedHeader.connector' export default connector(TopicFeedHeader)
#!/bin/sh -e rm -rf build script/check.sh --ci-mode script/test.sh --ci-mode # TODO: Finish implementation, then uncomment. #script/docker/build.sh
package com.joyue.tech.gankio.ui; import android.content.Context; import android.util.Log; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONTokener; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import ja...
#include<iostream> #include<fstream> #include<vector> using namespace std; // The following function prints the lattice to file "output.ppm" void Print_lattice (const vector<int> vlat, const int &vlx, const int &vly, const int &vwidth, const int &vheight, const char* vfilename="output.ppm") { int i, j, k, l; int...
// +build !ignore_autogenerated /* Copyright The Kubernetes 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 l...
<reponame>sebamomann/dein-li-backend<gh_stars>0 export class User { sub: string; email_verified: boolean; name: string; preferred_username: string; given_name: string; family_name: string; email: string; }
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
//##################################################################### // Copyright 2004, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license // contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### #include ...
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. echo "ES6 named export:" # export function foo() { # ^ assert_ok "$FLOW" find-refs --global --json --pretty --stri...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-pad/7-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-pad/7-512+0+512-N-1 --do_eval --per_device_eval_batch_s...
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); //>>description: Utility methods for enabling and disabling user scaling (pinch zoom) //>>label: Zoom Handling //>>group: Utilities define( [ "jquery", "./core" ], function( jQuery ) { //>>excludeEnd("jqmBuildExclude"); (function( $ ) { var meta = $( "meta...
<reponame>dynamicbalaji/hack-for-pink-2020<filename>src/app/make-a-wish/make-a-wish.component.spec.ts import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MakeAWishComponent } from './make-a-wish.component'; describe('MakeAWishComponent', () => { let component: MakeAWishComponent; le...
<gh_stars>1-10 /** * */ package gui; import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.SimpleFormatter; import javax.swing.*; import logic.*; /** * @author krist *Wall to be drawn to the viewers eyes */ public cla...
<reponame>mili-confluent/redux-query // @flow import React from 'react'; type ReduxQueryContextValue = ?{ queriesSelector: (state: any, ...any) => any, }; const ReduxQueryContext = React.createContext<ReduxQueryContextValue>(null); export default ReduxQueryContext;
import numpy as np matrix = np.random.rand(3, 3) print(matrix)
#!/bin/sh alias uglify-js=$PWD/bin/uglifyjs UGLIFY_OPTIONS=$@ minify_in_situ() { ARGS="$UGLIFY_OPTIONS --validate --in-situ" DIRS="$1" echo '> uglify-js' $DIRS $UGLIFY_OPTIONS for i in `find $DIRS -type f -name '*.js'` do ARGS="$ARGS $i" done uglify-js $ARGS } rm -rf tmp/butternut...
const Odoo = require('../lib/index'); const odoo = new Odoo({ url: '<insert server URL>', port: '<insert server port default 80>', db: '<insert database name>', username: '<insert username>', password: '<insert password>' }); odoo.connect(function (err) { if (err) { return console.log(err); } ...
import React from 'react'; import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import HelloWorld from 'app/pages/HelloWorld'; const Routes = () => ( <Router> <Switch> <Route path="/" exact component={HelloWorld} /> </Switch> </Router> ); export default Routes;
function search(arr,val) { for (var i = 0; i < arr.length; i++) { if (arr[i] == val) { return i; } } return -1; } // call the search method var result = search([2, 3, 4, 5], 4); console.log(result);
<reponame>weltam/idylfin /** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.maths.lowlevelapi.datatypes.primitive; /** * Essentially just a wrapper for the many sparse matrix format types */ public abstract ...
<filename>tests/test_gmail_service.py #https://github.com/X/smithy-core/blob/master/smithy/core/tests/test_db.py #https://github.com/X/calc/blob/master/calc/tests/test_notifications.py #https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertIsInstance """ Tests for `mail_service.gmail_service`. """ i...
#!/usr/bin/env bash # Copyright Amazon.com Inc. or its affiliates. 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 # #...
package com.java.study.algorithm.zuo.dadvanced.advanced_class_06; /** * 回文最少分割数 * 【题目】 给定一个字符串str,返回把str全部切成回文子串的最小分割数。 【举例】 * str="ABA"。 * 不需要切割,str本身就是回文串,所以返回0。 * str="ACDCDCDAD"。 最少需要切2次变成3个回文子串,比如"A"、"CDCDC"和"DAD",所以返回2。 */ public class Code_05_PalindromeMinCut{ }