text stringlengths 1 1.05M |
|---|
<filename>node_modules/@reactivex/rxjs/dist/amd/util/errorObject.js<gh_stars>1-10
define(["require", "exports"], function (require, exports) {
"use strict";
// typeof any so that it we don't have to cast when comparing a result to the error object
exports.errorObject = { e: {} };
});
//# sourceMappingURL=er... |
/**
*
* @author <NAME>
* @matricola: 560049
* @project Word Quizzle
* @A.A 2019 - 2020 [UNIPI]
*
*/
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.DefaultListModel;
import javax.s... |
#!/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 ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lice... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.moon = void 0;
var moon = {
"viewBox": "0 0 20 20",
"children": [{
"name": "path",
"attribs": {
"d": "M13.719,1.8c0.686,0.385,1.332,0.867,1.916,1.449c3.42,3.422,3.42,8.966,0,12.386c-3.42,3.42-8.965,3.42-12.386,0\r\... |
import sublime
import sublime_plugin
import json
from os.path import dirname, realpath, join, splitext, basename
try:
# Python 2
from node_bridge import node_bridge
except:
from .node_bridge import node_bridge
def get_setting(view, key):
settings = view.settings().get('Stylus Supremacy')
if settings is None:
s... |
from sklearn.cluster import KMeans
# Define the data matrix X
X = get_item_data()
# Cluster items into n groups
kmeans = KMeans(n_clusters=n).fit(X)
labels = kmeans.labels_
# Group similar items
for item_id, label in zip(item_ids, labels):
set_category(item_id, label) |
#!/bin/bash
mkdir -p /etc/origin/master/
touch /etc/origin/master/htpasswd
## Default variables to use
[ ! -d openshift-ansible ] && git clone https://github.com/openshift/openshift-ansible.git -b release-3.11 --depth=1
ansible-playbook -i inventory.ini openshift-ansible/playbooks/prerequisites.yml
ansible-playbook -... |
<reponame>Mirmik/crow
/** @file */
#ifndef CROW_BROCKER_TCP_SUBSCRIBER_H
#define CROW_BROCKER_TCP_SUBSCRIBER_H
#include <map>
#include <nos/inet/tcp_socket.h>
#include <string>
#include "subscriber.h"
namespace crowker_implementation
{
class tcp_subscriber : public subscriber
{
public:
nos::i... |
<gh_stars>1-10
import { Controller } from "stimulus"
export default class extends Controller {
observer!: MutationObserver
initialize() {
this.observer = new MutationObserver(this.refreshArticles)
}
connect() {
this.element.setAttribute("role", "feed")
this.refreshArticles()
this.observer.obs... |
package com.firoz.mymvpboilerplate.executor;
import com.firoz.mymvpboilerplate.interactor.AbstractInteractor;
/**
* Created by firoz on 1/4/17.
*/
public interface Execution {
/**
* This executor is responsible for running interactors on background threads.
*/
interface MyBackExecutor {
... |
<filename>src/main/java/de/lmu/cis/ocrd/ml/features/NamedFeature.java
package de.lmu.cis.ocrd.ml.features;
abstract class NamedFeature extends BaseFeatureImplementation {
private static final long serialVersionUID = -4851942231267570448L;
private final String name;
NamedFeature(String name) {
this.name = name;
... |
<reponame>wl04/HackerRank-solutions
// Solution
class MyCalculator implements AdvancedArithmetic {
public int divisor_sum(int num) {
if (num == 1) {
return 1;
}
else {
int sum = 1 + num; // Any number can be devided by 1 and by the number itself
... |
g++49 -O3 -fomit-frame-pointer -c test_timing.cpp
gcc49 -O3 -fomit-frame-pointer -o libco.o -c ../libco.c
g++49 -O3 -fomit-frame-pointer -o test_timing libco.o test_timing.o
rm -f *.o
|
<reponame>Accessible-Concepts/scrumlr.io
import {useLocation} from "react-router";
import {useLayoutEffect} from "react";
const ScrollToTop = () => {
const location = useLocation();
useLayoutEffect(() => {
// scroll to top on route change
window.scrollTo(0, 0);
}, [location.pathname]);
return null;
}... |
import React from "react";
import { Link } from "@reach/router";
import styled from "react-emotion";
import colors from "../colors";
const Header = styled("header")`
background-color: ${colors.background};
position: sticky;
top: 0;
z-index: 10;
`;
const NavBar = () => (
<Header>
<Link to="/">SITE HEADER... |
#!/bin/bash
if git diff origin/master -- mars | grep -q "old mode"; then
echo "Unexpected file mode changed. You may call"
echo " git config core.fileMode false"
echo "before committing to the repo."
git diff origin/master -- mars | grep -B 2 -A 2 "old mode"
exit 1
fi
|
#!/usr/bin/env sh
# generated from catkin/cmake/template/setup.sh.in
# Sets various environment variables and sources additional environment hooks.
# It tries it's best to undo changes from a previously sourced setup file before.
# Supported command line options:
# --extend: skips the undoing of changes from a previou... |
<gh_stars>1-10
package malte0811.controlengineering.logic.schematic.client;
import com.mojang.blaze3d.vertex.PoseStack;
import malte0811.controlengineering.logic.schematic.Schematic;
import malte0811.controlengineering.logic.schematic.SchematicNet;
import malte0811.controlengineering.logic.schematic.symbol.*;
import m... |
#!/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 ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lice... |
#!/bin/bash
function usage() {
echo "Usage: "$0" <ip> <start> <end>"
if [ -n "$1" ] ; then
echo "Error: "$1"!"
fi
exit
}
if ! [ $# -eq 3 ] ; then
usage
fi
ip=$1
start=$2
end=$3
n=0
for i in $(seq $start $end); do
tmp=`nmap -sP $ip"."$i | grep -B 1 'Host is up' |grep 'scan report' |cut -d ' ... |
# Source this file to prepare a mac for running scripts
hash greadlink 2>/dev/null || { echo >&2 "Required tool greadlink is not installed, please run 'brew install coreutils'"; exit 1; }
hash gfind 2>/dev/null || { echo >&2 "Required tool gfind is not installed, please run 'brew install findutils'"; exit 1; }
hash gse... |
#! /bin/bash
set -euxo pipefail
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
pushd "$SCRIPT_DIR"
az extension add --upgrade --yes --name connectedk8s
az extension add --upgrade --yes --name k8s-extension
az extension add --upgrade --yes --name customlocation
az provider register ... |
<filename>javascript-version/bot/commands/moderation/slowmode.js
const Discord = require('discord.js');
const client = new Discord.Client();
module.exports = {
category: 'Moderation',
aliases: [''],
minArgs: 1,
maxArgs: -1,
expectedArgs: 'please enter a time in minutes',
description: 'changes slowmode o... |
#!/bin/bash
BM="$1"
pushd ../
./streamlined_experiment.py --hs arquinn-QV15174.dift-pg0.apt.emulab.net -p Br@nf0rd123 -t $BM --sf server_config.first.1 --nr 1 --offset 0 --sc --ec /experiment.config.1 --only_seq &>run.test.$BM.0.1&
sleep 2
./streamlined_experiment.py --hs arquinn-QV15174.dift-pg0.apt.emulab.net -p B... |
<filename>lib-arch-app-initializer/src/main/java/ltd/dolink/arch/initializer/ApplicationOwner.java<gh_stars>0
package ltd.dolink.arch.initializer;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
import androidx.lifecycle.Lifecycle;
impor... |
name = input("Enter your name:")
print("Welcome to my program " + name + "!") |
package io.opensphere.wfs.state;
import io.opensphere.core.Toolbox;
import io.opensphere.core.modulestate.AbstractModuleStateController;
import io.opensphere.server.toolbox.ServerToolbox;
import io.opensphere.server.toolbox.WFSLayerConfigurationManager;
import io.opensphere.wfs.state.activate.WFSDataTypeBuilder;... |
for (int i = 0; i < n; i++) {
int j = i;
while (j < n) {
sum += a[i][j] * b[j];
j++;
}
} |
<filename>js/menu.js<gh_stars>1-10
let menuBtn = document.getElementById("menu-toggle");
let menuContainer = document.getElementById("menu-container");
let menuIsOpen = false;
function showMenu() {
if(document.body.clientWidth > 1480) {
menuContainer.style.display = "none";
menuContainer.style.top = "-100%";
me... |
<gh_stars>1-10
package com.duy.imageoverlay.data;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.net.Uri;
import android.os.AsyncTask;
import and... |
# -*- encoding: utf-8 -*-
# stub: backports 3.18.2 ruby lib
Gem::Specification.new do |s|
s.name = "backports".freeze
s.version = "3.18.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "bug_tracker_uri" => "https://github.com/marc... |
import React from 'react';
const MealDashboard = () => (
<div className="diary">
<div className="nutrient-titles">
<div className="calories">Calories</div>
<div className="calcium">Calcium</div>
<div className="iron">Iron</div>
<div className="protein">Prote... |
class Movie < ApplicationRecord
belongs_to :genre
has_many :reviews, dependent: :destroy
has_many :users, through: :reviews
accepts_nested_attributes_for :genre
validates :title, presence: true
validates :synopsis, length: { in: 20..300}
validates :year, numericality: { greater_than: 1890 }
before_va... |
import {
init,
classModule,
propsModule,
styleModule,
eventListenersModule,
h,
} from "snabbdom";
// diff 算法核心函数
const patch = init([
// Init patch function with chosen modules
classModule, // makes it easy to toggle classes
propsModule, // for setting properties on DOM elements
styleModule, // ha... |
<filename>scripts/changeScanner/getChanges.js
const { exec } = require('shelljs');
const getChanges = () => {
const execute = exec(`git diff --name-only latest ./packages`, {
silent: true,
}).stdout;
const changedFiles = execute.split('\n').filter(Boolean);
const changedPackages = {};
changedFiles.for... |
<filename>tests/afqmc/Ne_cc-pvdz/scf/scf.py
#! /usr/bin/env python3
import sys
import os
from pyscf import gto, scf, tools
import numpy
mol = gto.Mole(atom=[['Ne', (0,0,0)]],
basis='cc-pvdz',
unit='Angstrom',
verbose=4)
mol.build()
mf = scf.RHF(mol)
mf.chkfile = 'neon.chk.h5'
mf.ke... |
#!/bin/bash
#SBATCH --time=24:00:00
#SBATCH --nodes=1 --ntasks-per-node=2 --cpus-per-task=2
#SBATCH --gres=gpu:1
#SBATCH --partition=gpu
#SBATCH --mem=80G
DATASET=$1
CLASS=$2
module load Julia/1.5.1-linux-x86_64
module load Python/3.8.2-GCCcore-9.3.0
julia ./fAnoGAN_one_class.jl $DATASET $CLASS
|
#!/bin/bash
set -e
source $(dirname $0)/common.sh
repository=$(pwd)/distribution-repository
pushd git-repo > /dev/null
run_maven -f spring-boot-tests/spring-boot-smoke-tests/pom.xml clean install -U -Dfull -Drepository=file://${repository} -Duser.name=concourse
popd > /dev/null
|
<reponame>azjezz/waffle<gh_stars>1-10
<?hh // strict
namespace Waffle\Container;
use type Waffle\Container\Exception\ContainerException;
use type Waffle\Contract\Container\ContainerInterface;
trait ContainerAwareTrait
{
require implements ContainerAwareInterface;
protected ?ContainerInterface $container;
... |
#include<stdio.h>
void main() {
int m[3][3], t[3][3], i, j;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("Enter the m[%d][%d] element : ",i,j);
scanf("%d",&m[i][j]);
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
t[j][i] = m[i][j];
}
}
printf("\nThe transpose of the matrix is: \n");
for(i=0;... |
class BankAccount:
total_transactions = 0
def __init__(self):
self.balance = 0
def deposit(self, amount):
self.balance += amount
BankAccount.total_transactions += 1
def withdraw(self, amount):
if self.balance >= amount:
self.balance -= amount
Ba... |
import multer from "multer";
import FileConstants from "../constants/file.constants";
import { generateFileName } from "../utils/file.utils";
const storage = multer.diskStorage({
destination: `${FileConstants.BASE_DIR}`,
filename: function (req: any, file: any, cb: any) {
cb(null, generateFileName(file));
}... |
#!/bin/bash
# Script to sync the dotfiles
. sudov.sh
. functions.sh
# Get rsync
pinstall rsync
# Sync up dotfiles
rsync -avh --no-perms ../dotfiles ~
|
def simulate_vehicle_movement(axle_spacing, total_axles, direction):
# Initialize the current axle location as 0
current_loc = 0
final_locations = []
# Simulate the movement of each axle based on the direction
for axle_num in range(1, total_axles + 1):
current_loc = mlob.move_axle_loc(axle_... |
package io.github.tehstoneman.cashcraft;
import java.util.Random;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import io.github.tehstoneman.cashcraft.api.CashCraftAPI;
import io.github.tehstoneman.cashcraft.common.item.CashCraftItemGroup;
import io.github.tehstoneman.cashcraft.... |
<filename>src/steering_wheel_shield.cpp
#include "steering_wheel_shield.h"
#include "steering_wheel_definitions.h"
namespace steering_wheel_shield {
inline void set_csx() { GPIOC_PSOR = CSX_MASK; }
inline void clr_csx() { GPIOC_PCOR = CSX_MASK; }
inline void set_dcx() { GPIOC_PSOR = DCX_MASK; }
inlin... |
#!/bin/bash
if [ -z "$SGXLKL_ROOT" ]; then
echo "ERROR: 'SGXLKL_ROOT' is undefined. Please export SGXLKL_ROOT=<SGX-LKL-OE> source code repository"
exit 1
fi
if [ -z "$SGXLKL_PREFIX" ]; then
echo "ERROR: 'SGXLKL_PREFIX' is undefined. Please export SGXLKL_PREFIX=<install-prefix>"
exit 1
fi
if [ -z "$SGXL... |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, <NAME... |
#pragma once
#define MAX_BONE_INFLUENCE 4
#include "TNAH/Core/Core.h"
#include "TNAH/Core/Timestep.h"
#include "TNAH/Renderer/VertexArray.h"
#include "TNAH/Renderer/RenderingBuffers.h"
#include "TNAH/Renderer/Shader.h"
#include "TNAH/Renderer/Material.h"
#include "Animation.h"
#include "BoneInfo.h"
#pragma warning(pu... |
# Copyright (c) 2020 ETH Zurich
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
source $SPACK_ROOT/share/spack/setup-env.sh
export CRAYPE_LINK_TYPE=dynamic
export APPS_ROOT="/app... |
#!/usr/bin/env bash
docker-compose up -d --build
echo "Install composer"
docker exec automaintenancetracker_web_1 composer install
echo "Install npm package for angular"
docker exec automaintenancetracker_web_1 npm install --prefix ./resources/auto-app/
echo "Build prod mode"
docker exec automaintenancetracker_web_1 n... |
<reponame>ChristopherChudzicki/mathbox
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS206: Consider reworking classes to avoid initClass
* Full docs: ... |
// PrimeNumber.php
use Symfony\Component\Validator\Constraint;
/**
* @Annotation
*/
class PrimeNumber extends Constraint
{
public $message = 'The number {{ value }} is not a prime number.';
public function validatedBy()
{
return PrimeNumberValidator::class;
}
}
// PrimeNumberValidator.p... |
<reponame>dcoloma/gaia
'use strict';
var CustomLogoPath = {
poweron: {
video: '/resources/power/carrier_power_on.mp4',
image: '/resources/power/carrier_power_on.png'
},
poweroff: {
video: '/resources/power/carrier_power_off.mp4',
image: '/resources/power/carrier_power_off.png'
}
};
// Function... |
import React, { Component } from 'react';
import styled from 'styled-components';
import { FaChevronRight } from 'react-icons/fa';
import axios from 'axios';
import NumberFormat from 'react-number-format';
import Graph from './Graph';
import Rank from './Rank';
const ActiveContainer = styled.div`
flex: 35;
width: ... |
class FlaggedEmails:
def __init__(self):
self.flagged_emails = []
def add_email(self, email):
self.flagged_emails.append(email)
def unflag_all(self):
while self.flagged_emails:
self.flagged_emails.pop() |
<filename>packages/vite-app-ts/src/components/Shared/OwnerMark.tsx<gh_stars>1-10
import { UserOutlined } from '@ant-design/icons';
import React, { FC } from 'react';
import { primaryColor } from '~~/styles/styles';
const OwnerMark: FC = () => (
<UserOutlined
style={{
color: primaryColor,
// backgroun... |
#!/bin/bash
# yum update
# yum upgrade -y
# 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
# 关闭 selinux
setenforce 0
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/selinux/config |
<reponame>domenic/mojo
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Invokes gperf for the GN build. The first argument is the path to gperf.
# TODO(brettw) this can be removed once the run_executable ... |
import os
def construct_connection_string(engine: str, name: str, user: str) -> str:
# Assuming the password is not provided as an input parameter for security reasons
# Construct the database connection string without including the password
connection_string = f"{engine}://{user}@<host>:<port>/{name}"
... |
/*
Bemærk: Modulet er kun konsolbaseret.
*/
// Inkluderer mit eget modul, der er lokaliseret i 'node_modules'
var myModule = require('mymodule');
// Kalder metoden fra mit modul på variablen 'myModule'
myModule.konverterValuta(10); // Her er det 10 DKK, der bliver omregnet til EURO. |
#!/usr/bin/env bash
# basset -o errexit
# set -o pipefail
# todo: turn on after #1295
# set -o nounset
# This entrypoint is used to play nicely with the current cookiecutter configuration.
# Since docker-compose relies heavily on environment variables itself for configuration, we'd have to define multiple
# environ... |
function isPalindrome(inputStr) {
// Store the reverse of the input string.
reversedStr = inputStr.split('').reverse().join('');
// Compare the reversed string with the input string.
return inputStr === reversedStr;
}
console.log(isPalindrome("racecar")); // prints true |
import React from 'react';
export function ShortcutItem(props) {
const { clickHandler, letter, label } = props;
return (
<a href="#"
className="btn btn-primary btn-sm"
role="button"
onClick={e => {
e.preventDefault();
return clickHandler(label);
}}>
<span cla... |
#!/bin/bash
# tdnn_lstm_1l is same as tdnn_lstm_1b, but with the per-frame dropout
# added with location 4 in LSTM layer, see paper:
# http://www.danielpovey.com/files/2017_interspeech_dropout.pdf
# ./local/chain/compare_wer_general.sh tdnn_lstm_1b_ld5_sp tdnn_lstm_1l_ld5_sp
# System tdnn_lstm_1b_ld5_s... |
wget --no-parent http://data.sdss3.org/sas/dr10/apogee/spectro/redux/r3/s3/a3/v304/4259/aspcapStar-v304-2M03403073+2429143.fits
wget --no-parent http://data.sdss3.org/sas/dr10/apogee/spectro/redux/r3/s3/a3/v304/4259/aspcapStar-v304-2M03405126+2335544.fits
wget --no-parent http://data.sdss3.org/sas/dr10/apogee/spectro... |
use std::fs::File;
use std::io::{BufRead, BufReader};
fn parse_file(file_path: &str) -> Result<(Vec<(i32, i32)>, Vec<(usize, usize)>), String> {
let file = File::open(file_path).map_err(|e| format!("Error opening file: {}", e))?;
let reader = BufReader::new(file);
let mut points = Vec::new();
let mut ... |
#!/usr/bin/env bash
#
# Copyright (c) Dell Inc., or its subsidiaries. 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
... |
<reponame>difo23/heroeapp
import React from 'react'
import { HeroList } from '../heroes/HeroList'
export const MarvelScreen = () => {
return (
<div>
<h1>Marvel Screen</h1>
<hr />
<HeroList publisher="Marvel Comics" />
</div>
)
}
|
import { Component, OnInit } from "@angular/core";
import { NgRedux, select } from "@angular-redux/store";
import { Observable } from "rxjs";
import * as NotificationActions from "@actions/notification-container.actions";
import { AppState } from "@store/app.state";
import { NotificationContainer } from "@interfaces/no... |
import h5py
import os
def loadWeightsPartial(model, weights_path, n_layers):
f = h5py.File(weights_path)
for k in range(f.attrs['nb_layers']):
if k >= n_layers:
break
g = f['layer_{}'.format(k)]
weights = [g['param_{}'.format(p)] for p in range(g.attrs['nb_params'])]
... |
import java.util.List;
class TestRunner {
void runTests(List<TestCase> testCases) {
for (TestCase testCase : testCases) {
try {
testCase.runTest();
} catch (AssertionError e) {
System.out.println("Test failed: " + testCase.name);
retur... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var ListNode_1 = __importDefault(require("./ListNode"));
var root = new ListNode_1.default(1);
root.Inse... |
#! /bin/bash
timestamp="$(date +'%Y%m%d-%H%M%S')"
db="stitchv${timestamp}SET4.db"
dbzip="stitchv${timestamp}SET4db.zip"
log="log${timestamp}.txt"
#keep track of current time
curr_time=$(date +%s)
echo $(date) > $log
sbt stitcher/"runMain ncats.stitcher.impl.SRSJsonEntityFactory $db \"name=G-SRS, July 2018\" cache=da... |
const cheerio = require('cheerio');
const path = require('path');
const childProcess = require('child_process');
const fs = require('fs');
const mockReadFileSync = jest.spyOn(fs, 'readFileSync');
const mockExec = jest.spyOn(childProcess, 'exec').mockImplementation(() => ({
stdin: { write: jest.fn() },
on: jest.fn(... |
#!/bin/bash
set -e
set -x
gvt restore
rm -rf vendor/k8s.io/apiextensions-apiserver/vendor/k8s.io/apiserver/pkg/util/feature/
appname="sidecar-injector"
rm -rf $appname
BUILD_PATH=$(cd $(dirname $0);pwd)
echo $BUILD_PATH
cd $BUILD_PATH
CGO_ENABLED=0 GO_EXTLINK_ENABLED=0 go build --ldflags '-s -w -extldflags "-stat... |
package wire
import (
"testing"
)
func TestTreeBaseReq_Encoding(t *testing.T) {
treeBaseReq := &TreeBaseReq{
Name: "testname.",
}
testMessageEncoding(t, "tree_base_req", treeBaseReq, &TreeBaseReq{})
}
|
<reponame>jayjfadd/yahoo-fantasy-custom<filename>app/util/fantasysports/lib/framework/fantasy.js
var Q = require("q"),
_ = require("underscore"),
FantasyRequest = require("./fantasyRequest");
function FantasySports(auth) {
this.defaults = {
apiRoot: "http://fantasysports.yahooapis.com/fantasy/v2/"
... |
<filename>src/main/java/com/filippov/data/validation/tool/controller/validation/InputValidator.java
/*
* Copyright 2018-2020 the original author or 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 obtai... |
var AppListener = require('../lib/AppManager').AppListener;
var util = require('util');
util.inherits(MyAppListener, AppListener);
function MyAppListener(){
this.priority = 1;
}
MyAppListener.prototype.onStart = function(next){
console.log("My App Start ");
console.log(this);
next();
};
var singleton... |
#!/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin
. pip-deps/bin/activate
pip install nose
pip install coverage
pip install pylint
pip install jinja2==2.6
pip install sphinx
pip install sphinx_bootstrap_theme
pip install webob
pip install virtual_env/libs/mysql-connector
pip install sqlalchemy
pip install mock
p... |
<filename>src/main/java/com/atico/erp/core/ui/components/GridSecondaryText.java
package com.atico.erp.core.ui.components;
import com.vaadin.flow.component.html.Span;
public class GridSecondaryText extends Span {
public GridSecondaryText(String text) {
super(text);
getStyle().set("font-size", "var... |
#!/bin/sh
DIR="$( cd "$(dirname "$0")" && pwd )"
source $DIR/sample-env.sh
# check for ~/.smac-running-env and then check that
# processes are running before doing this. Then the
# expose ports stuff in the readme should work
SMAC_OPTS="-DtempMiniDir=/smac-tmp"
SMAC_OPTS="${SMAC_OPTS} -DinstanceName=${ACCUMULO_INST... |
#!/bin/bash
cd `dirname $0`
npm run serve
|
//
// HierarchyScrollView.h
// TreeViewer
//
// Created by <NAME> on 1/11/15.
// Copyright (c) 2015 Inova. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TreeViewer.h"
@interface HierarchyScrollView : UIScrollView
// init the scroll view that contains the treeview.
- (id)initWithFrame:(CGRect)frame and... |
# Use powerline
USE_POWERLINE="true"
export GPG_TTY=$(tty)
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
source /usr/share/zsh/manjaro-zsh-prompt
fi
|
<reponame>beverloo/draw
const browsers = [
'> 1%',
'last 3 versions',
'ios > 8',
'not ie < 10',
];
const node = 'current';
const getCommonConfig = (targets = {}) => [
[
'@babel/env',
{
targets,
useBuiltIns: 'usage',
corejs: {
version: 2,
},
}
],
'@babel/react',... |
<filename>5-websites/lambda-prep/_Resources/Precourse-master/Precourse-master/Lesson04-JS-I/homework/homework.js<gh_stars>0
//In these first 6 questions, replace `null` with the answer
//create a string variable, it can contain anything
const newString = null ;
//create a number variable, it an be any number
const ne... |
#!/bin/bash
# Define the public IP address of the VM
vm1a_public_ip="192.168.1.100" # Replace with the actual public IP address
# Execute the SSH command to establish a connection to the VM
outputSSH=$(ssh -o BatchMode=yes -o ConnectTimeout=5 user@$vm1a_public_ip echo "SSH connection successful" 2> /dev/null)
# Pri... |
import shutil
from os import path
def copy_file(source_path, destination_dir):
try:
# Check if the source file exists
if not path.exists(source_path):
print("Source file does not exist.")
return
# Check if the destination directory exists
if not path.exists(... |
import UIKit
class ViewManager {
private let parentView: UIView
init(parentView: UIView) {
self.parentView = parentView
}
func addView(view: UIView, withConstraints: Bool) {
parentView.addSubview(view)
if withConstraints {
view.translatesAutoresizingMaskInt... |
# Create a neural network model with 2 hidden layers of 10 neurons each
model = tf.keras.Sequential([
tf.keras.layers.Input(shape=(2,)),
tf.keras.layers.Dense(10, activation='relu'),
tf.keras.layers.Dense(10, activation='relu'),
tf.keras.layers.Dense(3, activation='softmax')
]) |
describe Fastlane::Actions::CarthageCacheFtpsAction do
describe '#run' do
it 'prints a message' do
expect(true)
end
end
end
|
<filename>homeassistant/components/gpslogger/device_tracker.py
"""
Support for the GPSLogger platform.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.gpslogger/
"""
import logging
from homeassistant.components.device_tracker import DOMAIN... |
<reponame>Alex-Diez/java-tdd-Katas
package kata.joins;
import org.apache.commons.lang3.tuple.ImmutableTriple;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.lang3.tuple.Triple;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Coll... |
<filename>js/mixins/program.js
import Program from '../components/Program.vue';
export default {
props: ['id', 'options'],
components: {
Program
},
} |
def total_cost(items, prices, quantities):
cost = 0
for item, price, quantity in zip(items, prices, quantities):
cost += price * quantity
return cost
clothes_price = 26.30
clothes_quantity = 5
shoes_price = 33.45
shoes_quantity = 3
items = ['clothes', 'shoes']
prices = [clothes_price, shoes_price]... |
/*
* MIT License
*
* Copyright (c) 2021 <NAME>
*
* 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, copy, mod... |
<filename>open-sphere-plugins/wms/src/main/java/io/opensphere/wms/sld/event/SldChangeListener.java
package io.opensphere.wms.sld.event;
/**
* Styled layer descriptor change listener.
*
* @see SldChangeEvent
*/
public interface SldChangeListener
{
/**
* Invoked when sld is created.
*
... |
<reponame>chlds/util
/* **** Notes
Display events.
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_display_events_r_r(time_t(*prev),cals_event_t(*argp))) {
auto cals_event_t *ev;
auto struct tm *tp;
auto signed char *b;
auto time_t t;
auto signed i,r;
auto signed short wk,d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.