text
stringlengths
1
1.05M
#! /bin/sh # # To be used with Photon environment # pterm ./repeater.sh & pterm ./sendCmd.sh & pterm ./armrun.sh &
<reponame>javisantos/paseto const crypto = require('crypto') const { promisify } = require('util') const { PasetoNotSupported } = require('../errors') const randomBytes = require('../help/random_bytes') const generateKeyPair = promisify(crypto.generateKeyPair) const LOCAL_KEY_LENGTH = 32 const PUBLIC_KEY_ARGS = ['rs...
<filename>presentation/0/index.js import React from "react"; import { Heading, Slide, Text, Link, Image } from "spectacle"; import preloader from "spectacle/lib/utils/preloader"; const images = { logoTwitter: require("../../assets/logo-twitter.svg") }; preloader(images); export const Slide0 = ( <Slide>...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v7/services/campaign_draft_service.proto require 'google/ads/googleads/v7/enums/response_content_type_pb' require 'google/ads/googleads/v7/resources/campaign_draft_pb' require 'google/api/annotations_pb' require 'google/api/clien...
package com.smallcake.utils; import androidx.annotation.IntRange; import java.math.BigDecimal; /** * MyApplication -- com.smallcake.utils * Created by Small Cake on 2018/8/2 16:47. * * 多位小数的精确计算工具类 * 使用BigDecimal,但一定要用BigDecimal(String)构造器,而千万不要用BigDecimal(double)来构造 * (也不能将float或double型转换成String再来使用BigDeci...
#!/usr/bin/python # -*- coding: ascii -*- # Author: @harvie <NAME> # Date: 7 july 2018 __author__ = "@harvie <NAME>" #__email__ = "" __name__ = _("ClosePath") __version__ = "0.1" import math import os.path import re from CNC import CNC,Block,Segment from ToolsPage import Plugin from math import pi, sqrt, sin, cos,...
<gh_stars>1-10 // 11728. 배열 합치기 // 2021.06.08 // 정렬 #include<iostream> #include<set> using namespace std; int main() { int n, m; cin >> n >> m; multiset<int> s; for (int i = 0; i < n; i++) { int a; scanf("%d", &a); s.insert(a); } for (int i = 0; i < m; i++) { ...
SELECT * FROM movies ORDER BY release_date DESC LIMIT 10;
#!/bin/sh RET_CODE=0 test_posix_newline() { if [ ! -r "$1" ]; then echo "File $1 not found or not readable" 1>&2 RET_CODE=1 fi if grep -Iq . "$1" ; then final_char=$(tail -q -c 1 "$1") if [ "${final_char}" != "" ]; then echo "$1 has not POSIX trailing new line" 1>&2 RET_CODE=1 fi ...
<reponame>rainrambler/PoemStar package poemstar; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import javax.swing.DefaultListModel; import javax.swing.JFileChooser; import javax.swing.ListModel; import javax.swing.filechooser.FileFilter; import org.apache.com...
#!/bin/bash # Secure WireGuard server installer for Debian, Ubuntu, CentOS, Fedora and Arch Linux # https://github.com/angristan/wireguard-install RED='\033[0;31m' ORANGE='\033[0;33m' NC='\033[0m' function isRoot() { if [ "${EUID}" -ne 0 ]; then echo "You need to run this script as root" exit 1 fi } function ...
<gh_stars>0 package ddbt.tpcc.loadtest import ddbt.lib.util.ThreadInfo import java.io.FileInputStream import java.io.IOException import java.io.InputStream import java.nio.charset.Charset import java.text.DecimalFormat import java.util.{Date, Properties} import java.util.concurrent.ExecutorService import java.util.con...
#!/bin/sh SCRIPT="$0" while [ -h "$SCRIPT" ] ; do ls=`ls -ld "$SCRIPT"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then SCRIPT="$link" else SCRIPT=`dirname "$SCRIPT"`/"$link" fi done if [ ! -d "${APP_DIR}" ]; then APP_DIR=`dirname "$SCRIPT"`/.. APP_DIR=`cd "${APP_DI...
use std::collections::HashMap; use std::fs; fn lint_analysis(file_path: &str) -> Result<HashMap<String, HashMap<String, usize>>, String> { let content = match fs::read_to_string(file_path) { Ok(content) => content, Err(_) => return Err("Error reading file".to_string()), }; let mut result: ...
class Node: def __init__(self, data): self.data = data self.next = None # Linked list class class LinkedList: def __init__(self): self.head = None # Insert nodes in the linked list llist = LinkedList() llist.head = Node(1) second = Node(2) third = Node(3) # Link ...
<filename>src/app/date/subtractYears.ts /** * * @memberof module:Date * @function subtractYears * * @description Returns the date with the subtract of the years, by default the date is `new Date()` * * @param {!number} yearsToSubtract - The number of years to subtract * @param {Date} [date=new Date()] - The dat...
package mw import ( "fmt" "reflect" "strings" "syscall" ) // IP address family const ( V4AddrFamily AddrFamily = syscall.AF_INET V6AddrFamily AddrFamily = syscall.AF_INET6 ) // IP address lengths (bytes). const ( V4AddrLen = 4 V6AddrLen = 16 ) // IP address expressions var ( V4Any = V4(0, 0, 0, 0) V...
def find_common_elements(list1, list2): common_elements = [] i = 0 j = 0 while i < len(list1) and j < len(list2): if list1[i] == list2[j]: common_elements.append(list1[i]) i += 1 j += 1 elif list1[i] > list2[j]: j += 1 else: ...
def search2Dlist(list, item): row_index = None col_index = None for row in range(len(list)): for col in range(len(list[row])): if list[row][col] == item: row_index = row col_index = col if (row_index == None) and (col_index == None): retu...
<gh_stars>1-10 export const TILBAKE_I_ARBEID = 'TILBAKE_I_ARBEID'; export const TILBAKE_NAR = 'TILBAKE_NAR'; export const JOBBET_DU_GRADERT = 'JOBBET_DU_GRADERT'; export const JOBBET_DU_100_PROSENT = 'JOBBET_DU_100_PROSENT'; export const ANDRE_INNTEKTSKILDER = 'ANDRE_INNTEKTSKILDER'; export const HVOR_MANGE_TIMER = 'HV...
#!/bin/bash # turn on bash's job control set -m # run the API server in the background stacks serve -a 0.0.0.0:5000 & # edit the port in the nginx config sed -i -e 's/$PORT/'"$PORT"'/g' /etc/nginx/conf.d/default.conf # Run nginx and leave it running nginx -g 'daemon off;'
<filename>source/pages/_app.tsx if (process.env.NODE_ENV === 'development') { // Must use require here as import statements are only allowed // to exist at the top of a file. require('preact/debug'); } import { AppProps } from 'next/app'; import React from 'react'; import NoSSR from 'react-no-ssr'; import '../con...
<reponame>yash-srivastava/iot_subscriber package dbutils import ( _ "github.com/jinzhu/gorm/dialects/mysql" "github.com/jinzhu/gorm" "github.com/revel/revel" ) var( DBCONN *gorm.DB ) func InitDB(){ DBCONN = newClient() DBCONN.AutoMigrate(&Sgu{}, &Scu{}, &Attached_Schedules{}) } func newClient() *gorm.DB{ db, ...
<gh_stars>0 CREATE TABLE [auth].[Audits] ( [Id] INT NOT NULL identity(100000, 1), [Type] char(1) not null, [TableName] varchar(64) not null, [PrimaryKeyField] varchar(64) not null, [PrimaryKeyValue] int not null, [FieldName] varchar(64) not null, [OldValue] nvarchar(max) null, [NewValue] nvarchar(max) null, [...
#include <iostream> #include <string> #include <cmath> class Camera { public: // Constructor to initialize the camera with a given name Camera(const std::string& name) : name_(name), distance_(0.0f), fov_(90.0f), position_{0.0f, 0.0f, 0.0f}, orientation_{0.0f, 0.0f, 0.0f} {} // Method to set the distance ...
#!/bin/sh : ${OUT:?output file not specified} : ${PROJECT_ROOT:?project root not specified} : ${MODULE_ROOT:?module root not specified} : ${ADDITIONAL_ARGS=''} OUTPUT_DIR="$(cd "$(dirname "$OUT")" && pwd)" ABS_OUT="${OUTPUT_DIR}/$(basename "$OUT")" cd "${PROJECT_ROOT}" lsif-go --output "$ABS_OUT" --module-root "$MODU...
<gh_stars>0 /** * @param {number} x * @return {number} */ var mySqrt = function(x) { if (x <= 1) { return x } var h = 0 var l = 0 var r = x while (true) { h = Math.floor((l + r) / 2) const sq = h * h if (sq === x) { return h } if (sq < x) { ...
course := "progfun2" assignment := "quickcheck" assignmentInfo := AssignmentInfo( key = "<KEY>", itemId = "ML01L", premiumItemId = Some("DF4y7"), partId = "DZTNG", styleSheet = Some((_: File) / "scalastyle" / "scalastyle_config.xml") )
#!/bin/bash # # Start up daemon process to rebuild changed sources # # $Id: //depot/HotReloading/start_daemon.sh#33 $ # cd "$(dirname "$0")" if [ "$CONFIGURATION" = "Release" ]; then echo "error: You shouldn't be shipping HotReloading in your app!" exit 1 fi if [ -f "/tmp/injecting_storyboard.txt" ]; then ...
<filename>setup.py # Copyright 2020-present Kensho Technologies, LLC. import codecs import os from setuptools import find_packages, setup # single sourcing package version strategy taken from # https://packaging.python.org/guides/single-sourcing-package-version PACKAGE_NAME = "kwnlp_sql_parser" def read_file(fil...
#!/bin/bash # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. set -e wrapper="" if [[ "${RESTARTABLE}" == "yes" ]]; then wrapper="run-one-constantly" fi if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then # launched by JupyterHub, use single-user entrypoint exec /us...
#include "test.h" int main() { start(); }
import puppeteer from "puppeteer"; (async () => { const b = await puppeteer.launch({ headless: false, }); const p = await b.newPage(); await p.goto("https://example.com"); })();
const axios = require('axios'); const mongoose = require('mongoose'); mongoose.connect('mongodb://localhost:27017/test', {useNewUrlParser: true}); const dataSchema = new mongoose.Schema({ id: Number, username: String, data: Object }); const Data = mongoose.model('Data', dataSchema); axios.get('https:/...
#!/bin/sh # Copyright (c) Microsoft Corporation. # # 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 a...
<gh_stars>1-10 import R from 'ramda'; import { handleActions } from 'redux-actions'; import { insert, update, remove, insertWithUUID} from '@/Utils/StateHelper'; import { defaultCategories } from '../../constants/Categories'; import types from './types'; const createOrUpdateCategory = (props) => { const { id, ...
// This file is part of SWGANH which is released under the MIT license. // See file LICENSE or go to http://swganh.com/LICENSE #pragma once #include <cstdint> #include <string> #include "swganh/byte_buffer.h" #include "swganh_core/messages/obj_controller_message.h" namespace swganh { namespace messages { namespace c...
<reponame>roshancd/packplanner<gh_stars>1-10 package com.sample.packplan.util; /** * Constant values for pack planner application */ public final class Constant { private Constant() { // To restrict creating instances of the class } public static final String EMPTY_STRING = ""; public stati...
def cal_union(set1, set2): return set1 | set2 result = cal_union({1, 2, 3}, {3, 4, 5}) print(result)
module API { export interface IQuizQuestionsResponse { status: number; data: IQuizQuestion[]; } }
#!/usr/bin/env bash # Copyright 2017 Banco Bilbao Vizcaya Argentaria S.A. # # 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 requir...
import React from "react"; import ReactDOM from "react-dom"; import { createBrowserHistory } from "history"; import { Router, Route, Switch } from "react-router-dom"; import "assets/scss/material-kit-react.scss?v=1.9.0"; // pages for this product //import Components from "views/Components/Components.js"; import Landi...
<filename>js/controllers.js /* global _, angular, i18n */ 'use strict'; var controllers = angular.module('acs.controllers', []); controllers.controller('root', ['$scope', '$location', '$q', 'user', function($scope, $location, $q, user) { $scope.loaded = false; $scope.user = user; $scope.permissions = {};...
<reponame>slaufer/Prebid.js<filename>modules/iasBidAdapter.js import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; const BIDDER_CODE = 'ias'; const otherBidIds = []; function isBidRequestValid(bid) { const { pubId, adUnitPath } = bid.params; return !!(pubId...
<reponame>LauraBeatris/floripamais-strapi-api module.exports = { jwtSecret: process.env.JWT_SECRET || '45fa7028-627e-44f5-92be-f72482e73f63' };
#!/bin/bash echo "START" cd /root/portworx-setup/kubespray cat > wait_for_ssh.yml <<EOF --- - name: wait for connection to new VMs hosts: all tasks: - name: Wait for ssh wait_for: port: 22 host: '{{ (ansible_ssh_host|default(ansible_host))|default(inventory_hostname) }}' search_regex: Open...
<reponame>famod/qson<gh_stars>10-100 package io.quarkus.qson; public class QsonException extends RuntimeException { public QsonException() { } public QsonException(String message) { super(message); } public QsonException(String message, Throwable cause) { super(message, cause); ...
public class ZeroOneKnapsack_TopDown { public int knapsack(int[] profits, int[] weights, int capacity) { Integer[][] dp = new Integer[profits.length][capacity + 1]; return this.knapsackAux(dp, profits, weights, capacity, 0); }//end of method private int knapsackAux(Integer[][] dp, int[] profits, int[] weights...
<reponame>allancssio1/registrationTeacherAndStudents const { date, age, grade, modalidad, graduation } = require('../lib/utils') const db = require('../config/db') module.exports = { all (callback) { db.query(` SELECT * FROM teachers ORDER BY name ASC`, function (err, results) { i...
SELECT COUNT(*) AS 'Number of purchases', CustomerID, MONTH(Timestamp) AS 'Month of Purchase' FROM Orders GROUP BY CustomerID, MONTH(Timestamp);
import numpy as np def reshape_image_coordinates(image_size_x, image_size_y): # Calculate the total number of pixels in the image pixel_length = image_size_x * image_size_y # Generate a 1D array of image coordinates ranging from image_size_x - 1 to 0 u_coord = np.repeat(np.arange(image_size_x - 1,...
<gh_stars>0 import type Timeline from '../Timeline'; import type { Effect } from '../effects/Effect'; import Bus from '../Bus'; export interface ContainerProps { effects?: Effect[]; } export default abstract class Container { protected timeline: Timeline; public readonly bus: Bus; constructor({ effects = [],...
"""empty message Revision ID: <KEY> Revises: da366b325ea9 Create Date: 2020-09-30 18:14:38.190702 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = 'da366b325ea9' branch_labels = None depends_on = None def upgrade(): op.add_column('t...
#!/bin/sh ## Passed in from environment variables: # HOSTNAME= # PORT=8545 # NETWORK_ID=108 CLEAR_DATA_FILE_PATH="${VOLUME_PATH}/.clear_data_key_${CLEAR_DATA_KEY}" if [[ -n "$CLEAR_DATA_KEY" && ! -f "$CLEAR_DATA_FILE_PATH" ]]; then echo "Detected change in CLEAR_DATA_KEY. Purging data." rm -rf ${VOLUME_PATH}/* ...
package com.aqzscn.www.global.domain.co; import com.aqzscn.www.global.domain.dto.ReturnError; import lombok.Getter; import lombok.NonNull; import org.springframework.validation.ObjectError; import java.util.List; /** * 全局异常类 * * @author Godbobo * @date 2019/5/10. */ @Getter public class AppException extends Run...
<reponame>psema4/Atomic-OS<gh_stars>1-10 module("HxStream"); test("load", function() { var myStream = new HxStream(); ok(myStream instanceof HxStream, "new HxStream"); });
#!/bin/bash # # START: CONFIGURATION OPTIONS # # The below two paths should point to the data set root and ROS package package_source=~/catkin_ws/src/a2d2_to_ros data_root=~/data/a2d2 # Duration (in integer seconds) to record into a single bag file before splitting off a new one split_duration=7 # Relative location...
#!/bin/bash SCRIPTPATH=$( cd $(dirname $0) ; pwd -P ) BUILDPATH=${SCRIPTPATH}/build set -e set -o xtrace rm -rf "${BUILDPATH}" mkdir -p "${BUILDPATH}" javac "${SCRIPTPATH}/src/DrawingWindow.java" \ "${SCRIPTPATH}/src/ColorPalette.java" \ "${SCRIPTPATH}/src/ColorMap.java" \ -d "${BUILDPATH}" #jar ...
<reponame>janitha09/eve // Copyright (c) 2017-2018 Zededa, Inc. // SPDX-License-Identifier: Apache-2.0 // Common code to communicate to zedcloud package zedcloud import ( "crypto" "crypto/ecdsa" "crypto/tls" "crypto/x509" "encoding/asn1" "encoding/pem" "github.com/lf-edge/eve/pkg/pillar/cmd/tpmmgr" log "gith...
# AUTOGENERATED! DO NOT EDIT! File to edit: source_nbs/12_top.ipynb (unless otherwise specified). __all__ = ['empty_tensor_handling_loss', 'nan_loss_handling', 'create_dummy_if_empty', 'BaseTop', 'SequenceLabel', 'Classification', 'PreTrain', 'Seq2Seq', 'MultiLabelClassification', 'MaskLM'] # Cell import l...
import React from 'react'; import ReactDom from 'react-dom'; import ReactDomServer from 'react-dom/server'; import Swiper from '../../dist/react-swiper'; const App = React.createClass({ render() { var config = { slidesPerView: 1, paginationClickable: true, spaceBetween: ...
#!/bin/bash -f #********************************************************************************************************* # Vivado (TM) v2018.1 (64-bit) # # Filename : dist_mem_gen_0.sh # Simulator : Synopsys Verilog Compiler Simulator # Description : Simulation script for compiling, elaborating and verifying the ...
#!/bin/bash # Provision a node based on an injected "ic-bootstrap.tar" file. This script # is meant to be run as a prerequisite before launching orchestrator/replica. # # The configuration format is presently described here: # https://docs.google.com/document/d/1W2bDkq3xhNvQyWPIVSKpYuBzaa5d1QN-N4uiXByr2Qg/edit # # The...
docker run -it --init -p 1993:1993 deno-demo
#!/bin/bash # Make output directory for masks MASKDIR=$BASEDIR/data/outputs/masks mkdir -p $MASKDIR ####################################################################################################### # Structure mask processing # Download ABI structure masks at 50 um # Definitions: http://api.brain-map.org/api/v...
class Lock: def __init__(self): self._isLocked = False self._code = "" def lock(self): self._isLocked = True def unlock(self, code): if code == self._code: self._isLocked = False return True else: return False def...
<reponame>minuk8932/Algorithm_BaekJoon<gh_stars>1-10 import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.PriorityQueue; import java.util.StringTokenizer; public class Boj21062 { private static int[][] parent = new int[2][]; priva...
import React from "react"; import { Image, Pressable, Text, View } from "react-native"; import { streamingOnStyles as styles } from "../../Stylesheets/Styles"; export const StreamingOn = ({ isNetflix, gotoHomepage, isDisneyPlus, isPrimeVideo, }) => { return ( <View style={styles.streaming}> <Text s...
<gh_stars>0 import { ui } from "../ui/layaMaxUI"; import { insertCount } from "../utils/Count"; import { AppConfig } from "../AppConfig"; import { sharkAni } from "../utils/Common"; export default class DynamicWidget extends ui.item.appViewUI { private index: number = -1; private father: Laya.Sprite = null; ...
<filename>fwdmodel.cc<gh_stars>0 /* fwdmodel.cc - base class for generic forward models <NAME> and <NAME>, FMRIB Image Analysis Group & IBME QuBIc Group Copyright (C) 2007-2015 University of Oxford */ /* CCOPYRIGHT */ #include "fwdmodel.h" #include "easylog.h" #include "priors.h" #include "rundata.h" #include...
export const commonEnvironment = { production: true, application: { protocol: 'https', host: 'palindromo-web.herokuapp.com' }, api: { source: '/api', host: 'palindromo-api.herokuapp.com' } };
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; im...
VIM_MYSQL=`pwd` ln -sf ${VIM_MYSQL}/plugin/mysql_run /usr/local/bin/mysql_run
package com.wanshare.wscomponent.update.contract; import com.wanshare.wscomponent.update.model.VersionEntity; public class MainContract { public interface View{ void showVersion(VersionEntity version); } public interface Presenter{ void getVersion(Integer equipType); } }
#!/bin/sh # Integration Tests for Simple Menu Twimlet/Funlet # # Parameter: # $1 - URL of a deployed instance of the Simple Menu Twimlet/Funlet # # Uses: # * curl - transfer a URL # * xmllint - command line XML tool # url="$1" indentXml(){ xmllint --format - } # Join HTTP parameters with '&' # and save them i...
package bomberman.server; import java.util.Random; import bomberman.server.item.InterfaceItem; import bomberman.server.enemy.InterfaceEnemy; import bomberman.Constants; public class Map { // Atributos private int width; private int height; private int initialX; private int initialY; private Random r; private ...
<filename>misc/python/materialize/cli/mzconduct.py # Copyright Materialize, Inc. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Sou...
#!/usr/bin/env bash # local version: 1.1.0.0 @test "monteenth of May 2013" { #[[ $BATS_RUN_SKIPPED = true ]] || skip run bash meetup.sh 2013 5 teenth Monday [[ $status -eq 0 ]] [[ $output == "2013-05-13" ]] } @test "monteenth of August 2013" { [[ $BATS_RUN_SKIPPED = true ]] || skip run bash...
package memento; import java.util.ArrayList; import composite.Task; import setting.PointSetting; public final class Memento { private ArrayList<Task> saved = new ArrayList<Task>(); private PointSetting point; public Memento(PointSetting p, ArrayList<Task> taskList) { this.point = new PointSetting(p.getTo...
package edu.pdx.cs410J.seung2.client; import com.google.gwt.user.client.rpc.SerializationException; import com.google.gwt.user.client.rpc.SerializationStreamReader; import com.google.gwt.user.client.rpc.SerializationStreamWriter; import com.google.gwt.user.client.rpc.impl.ReflectionHelper; @SuppressWarnings("deprecat...
<filename>packages/cactus-api-client/src/main/typescript/default-consortium-provider.ts<gh_stars>1-10 import { Logger, LogLevelDesc, LoggerProvider, } from "@hyperledger/cactus-common"; import { Checks, IAsyncProvider } from "@hyperledger/cactus-common"; import { ConsortiumDatabase } from "@hyperledger/cactus-co...
#!/bin/bash set -e cd "`dirname "$0"`" #if [ ! -f app/config/parameters.yml ]; then # cp app/config/parameters.yml.dist app/config/parameters.yml #fi if [ ! -f composer.phar ]; then curl -s http://getcomposer.org/installer | php fi php composer.phar install rm -rf app/cache/* app/logs/* if [ "$1" == "--sym...
def compute_similarity(s1, s2): len1 = len(s1) len2 = len(s2) max_len = max(len1, len2) count = 0 for i in range(max_len): if i >= len1 or i >= len2: break if s1[i] == s2[i]: count += 1 return count / max_len
#!/bin/bash # # sub_rdtest_splits.sh # set -e coveragefile=/data/talkowski/Samples/common-mind/matrices/CMC.all.binCov.bed.gz medianfile=/data/talkowski/Samples/common-mind/matrices/CMC.all.binCov.median famfile=/data/talkowski/Samples/common-mind/ref/CMC.fam for batch in CMC; do for source in delly lumpy manta wh...
#pragma once #include "software/util/time/duration.h" #include "software/util/time/time.h" /** * A simple Timestamp class built around doubles. This Timestamp is intended to represent * the t_capture timestamps we receive from the SSL Vision system. These t_capture values * are monotonic (meaning they are always p...
<reponame>MarcosFernandez/gemtols-cnv /* * PROJECT: GEM-Tools library * FILE: gt_output_sam.h * DATE: 01/08/2012 * AUTHOR(S): <NAME> <<EMAIL>> * DESCRIPTION: // TODO */ #ifndef GT_OUTPUT_SAM_H_ #define GT_OUTPUT_SAM_H_ #include "gt_essentials.h" #include "gt_dna_string.h" #include "gt_dna_read.h" #include "gt_a...
package store import ( "fnd/log" "github.com/pkg/errors" "github.com/syndtr/goleveldb/leveldb" ) type TxCb func(tx *leveldb.Transaction) error var logger = log.WithModule("store") func Open(path string) (*leveldb.DB, error) { db, err := leveldb.OpenFile(path, nil) if err != nil { return nil, errors.Wrap(err,...
set -e COPIED_APP_PATH=/copied-app BUNDLE_DIR=/tmp/bundle-dir # Make sure copied folder doesn't cause any issues cp -R /app $COPIED_APP_PATH cd $COPIED_APP_PATH meteor build --directory $BUNDLE_DIR cd $BUNDLE_DIR/bundle/programs/server/ npm install mv $BUNDLE_DIR/bundle /built_app # Cleanup rm -rf $COPIED_APP_PAT...
/********************************* * import webpack plugins ********************************/ const path = require('path'); const fs = require('fs'); const webpack = require('webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const GasPlugin = require('gas-webpack-plugin'); const TerserPlugin = r...
<reponame>IslameN/c- #include "Person.h" #include "PersonBuilder.h" PersonBuilder Person::create() { return PersonBuilder{}; }
from flask import Flask, request, jsonify from flask_login import LoginManager, UserMixin, login_user from os import getenv from typing import Dict app = Flask(__name__) app.config["SECRET_KEY"] = getenv("SECRET_KEY", default="secret_key_example") login_manager = LoginManager(app) users: Dict[str, "User"] = {} clas...
<reponame>sporting-innovations/FuelSDK-Java<filename>src/test/java/com/exacttarget/fuelsdk/ETAssetTest.java<gh_stars>10-100 /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com...
import os import torch import pickle from tqdm import tqdm # project imports from networks import define_G, to_device from methods.scheduler import LearningRateScheduler class BaseMethod: def __init__(self, args, loader): self.args = args self._name = args.model_name self.device = args.d...
public static boolean isPalindrome(String str) { // Remove spaces and punctuation, and convert to lowercase String cleanStr = str.replaceAll("[^a-zA-Z0-9]", "").toLowerCase(); // Check if the clean string is a palindrome int left = 0; int right = cleanStr.length() - 1; while (left < right) ...
<gh_stars>0 /* Latvian locals for flatpickr */ import { CustomLocale } from "types/locale"; import { FlatpickrFn } from "types/instance"; const fp: FlatpickrFn = typeof window !== "undefined" && window.flatpickr !== undefined ? window.flatpickr : { l10ns: {}, } as FlatpickrFn; export const Lat...
def largest_smallest(array): smallest = array[0] largest = array[0] for element in array: if element > largest: largest = element elif element < smallest: smallest = element return (smallest, largest) largest_smallest([7, 9, 5, 4, 8, 1]) => (1, 9)
module.exports = { upload: function(o) { var t = getApp(); function r(e) { "function" == typeof o.start && o.start(e), t.core.uploadFile({ url: o.url || t.api.default.upload_image, filePath: e.path, name: o.name || "image", ...
import keras from keras.models import Sequential from keras.layers import Dense def construct_model(): model = Sequential() # Input layer with 2 input nodes model.add(Dense(2, activation = 'relu', input_dim = 2)) # Hidden layer model.add(Dense(4, activation = 'relu')) # Output layer model....
// Date: 2014-07-30 // SharpCoder // This file does the maths for our page. // It is highly scientific and based on university // level kerbal physics. OrbitalMaths = (function() { function getMass( size ) { if ( size == 0 ) return 3; else if ( size == 1 ) return 5; else if ( size == 2 ) return 15...
<filename>commands/Moderation/unban.js module.exports = ({ name: "unban", usage: "unban <user ID>", description: "Unbans the specified userID", category: "Moderation", code: `$title[Unbanned] $description[Successfully unbanned $userTag[$get[user]].] $addField[Reason:;$get[reason];no] $addField[Moder...