text
stringlengths
1
1.05M
import copy import json import os from datetime import datetime, timedelta import csv import pytz from django.db.models.functions import Lower from django.http.response import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from .forms import SiteForm from .models import Image, Site, Trans...
/** * */ package jframe.pay.alipay; import jframe.core.plugin.DefPlugin; /** * @author dzh * @date Aug 31, 2015 3:41:08 PM * @since 1.0 */ public class AlipayPlugin extends DefPlugin { }
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for DSA-2865-1 # # Security announcement date: 2014-02-20 00:00:00 UTC # Script generation date: 2017-01-01 21:06:50 UTC # # Operating System: Debian 7 (Wheezy) # Architecture: i386 # # Vulnerable packages fix on version: # - postgresql-9.1:9.1.12-0wheezy1 # # La...
<reponame>addcolouragency/craft_storefront<filename>node_modules/ts-toolbelt/out/List/Includes.d.ts import { Match } from '../Any/_Internal'; import { Includes as OIncludes } from '../Object/Includes'; import { ObjectOf } from './ObjectOf'; import { List } from './List'; /** * Check whether `L` has entries that match ...
#include "text.h" #include "utility.h" #include "iostream" using namespace std; void help() { string str = "\n" "uniqLines: keep lines with unique value in a given column \n" " - <NAME> (<EMAIL>)\n" "\n" "Usage: uniqLines -i input -o output -c column\n" "\n" "Options:\n" "\n" " -i ...
def dot_product(v1, v2): """Computes the dot product of two vectors.""" # check if the vector length are equal assert len(v1) == len(v2), "vectors are of different length" product = 0 for i in range(len(v1)): product += (v1[i] * v2[i]) return product if __name__ == '__main__':...
<reponame>lgoldstein/communitychest /* * */ package net.community.chest.math.compare; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.NoSuchElementException; import net.community.chest.math.NumbersFunction; import net.community.chest.math.f...
#! /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 ...
def calculate_interest_accrual(NT: float) -> float: NTIED = 1 NTOL = 2 if NT == NTIED: return round(0.05 * NT, 2) elif NT == NTOL: return round(0.03 * NT, 2) else: return round(0.02 * NT, 2)
<gh_stars>0 var localVideo; var localStream; var remoteVideo; var peerConnection; var socket; var recorder; var request; const peerConnectionConfig = { iceServers: [ { urls: "stun:stun.stunprotocol.org:3478" }, { urls: "stun:stun.l.google.com:19302" } ] }; (function(angular) { "use st...
#!/bin/bash -eux hive -e 'DROP DATABASE IF EXISTS pyhive_test_database' hive -e 'CREATE DATABASE pyhive_test_database' hive -e 'GRANT ALL ON DATABASE pyhive_test_database TO USER hadoop' hive -e 'CREATE TABLE pyhive_test_database.dummy_table (a INT)'
#!/bin/bash # Creates RPM or DEB repository for biniries from # $pre_repo_dir/$target/$box, signs it with keys # from ${gpg_keys_path} and puts signed repo to set -x export work_dir="MaxScale" echo "creating repository" echo "cleaning VM" ssh $sshopt "rm -rf dest; rm -rf src;" echo " creating dirs on VM" ssh $ssho...
class BankAccount: def __init__(self, ownerName, initialBalance): self.ownerName = ownerName self.balance = initialBalance def deposit(self, amount): self.balance += amount print('Deposit Successful! Now your total balance is {}'.format(self.balance)) def withdraw(se...
<filename>src/__mocks__/customers.js<gh_stars>0 import { v4 as uuid } from 'uuid'; export default [ { id: uuid(), address: { country: 'USA', state: '財務部', city: '財務長', street: '2849 Fulton Street' }, avatarUrl: '/static/images/avatars/avatar_3.png', createdAt: 155501640000...
#!/usr/bin/env bash # Description: Renders clusters YAML into different files for each spoke cluster set -o pipefail set -o nounset set -m create_kustomization() { # Loop for spokes # Prepare loop for spokes local cluster=${1} local spokenumber=${2} # Pregenerate kustomization.yaml and spoke clus...
package com.hebnu.cs.gd.dao; import com.hebnu.cs.gd.model.entity.SysPermission; import org.apache.ibatis.annotations.Param; import java.util.List; public interface SysPermissionMapper { //新增 public Long insert(SysPermission SysPermission); //更新 public void update(SysPermission SysPermission); /...
/* * @(#)uploader.js */ /* * Author: <NAME> * Created: 2015/08/28 * Description: The uploader module */ var Util = require('./utils.js'); var fs = require('fs'); var path = require('path'); var http = require('http'); var digestClient = require('http-digest-client'); var exec = require('child_process').exec; va...
package com.stylefeng.guns.rest.modular.cinema; import com.alibaba.dubbo.config.annotation.Reference; import com.baomidou.mybatisplus.plugins.Page; import com.stylefeng.guns.api.cinema.CinemaServiceApi; import com.stylefeng.guns.api.cinema.vo.*; import com.stylefeng.guns.api.order.OrderServiceAPI; import com.stylefeng...
package com.travelaudience.nexus.proxy; import io.vertx.core.Handler; import io.vertx.core.Vertx; import io.vertx.core.http.HttpClient; import io.vertx.core.http.HttpClientRequest; import io.vertx.core.http.HttpClientResponse; import io.vertx.core.http.HttpHeaders; import io.vertx.core.http.HttpMethod; import io.vertx...
<gh_stars>0 $(document).ready(function () { /* * SPARKLINE */ function sparklineBar(id, values, height, barWidth, barColor, barSpacing) { $('.'+id).sparkline(values, { type: 'bar', height: height, barWidth: barWidth, barColor: barColor, ...
<reponame>mindhivenz/meteor-base<filename>store/SubscriptionDocStore.js module.exports = require('./../dist/store/SubscriptionDocStore')
#!/usr/bin/env bash # Copyright (c) 2018 PaddlePaddle 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 # # Unl...
<reponame>MrPepperoni/Reaping2-1 #ifndef INCLUDED_MAP_PROPERTY_EDITOR_BASE_SYSTEM_H #define INCLUDED_MAP_PROPERTY_EDITOR_BASE_SYSTEM_H #include "platform/i_platform.h" #include "engine/system.h" #include "../../input/keyboard.h" #include "editor_hud_state.h" #include "editor_back_event.h" #include "../../engine/engine...
<filename>test/analysis/constraints_type_inference.ts import * as infer from '../../src/analysis/type_inference'; import TypeMap from '../../src/type_map'; import { ConstraintTypeUsage, TypeInfo, TypeUsage } from '../../src/type_map'; import { EnumNode, EqualityNode, GenderNode, IdentifierNode, IneqNode, Node,...
#!/bin/bash CONTENTDIR="content" BUILDDIR="build" FILENAME="index" ASSETSDIR="assets" download_csl() { mkdir "${ASSETSDIR}" -p wget -O "${ASSETSDIR}/citation-style.csl" \ "https://raw.githubusercontent.com/citation-style-language/styles/master/harvard-anglia-ruskin-university.csl" } pdf() { mkdir ...
package de.lmu.cis.ocrd.ml; import com.google.gson.Gson; import org.pmw.tinylog.Logger; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; public class LEProtocol implements Protocol { ...
#!/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...
package com.groupon.nakala; import com.groupon.nakala.core.WordSentiment; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * @author <EMAIL> */ public class WordSentimentTest { @Test public final void testPolarity() throws Exception { WordSentiment ws = WordSentiment.getInst...
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Oct 4 18:26:36 2019 @author: <NAME> This code solves the scheduling problem using a genetic algorithm. Implementation taken from pyeasyga As input this code receives: 1. T = number of jobs [integer] 2. ni = number of operations...
#!/usr/bin/env python3 import pandas as pd import numpy as np from helper import train_test_split def predict(row, weights): weighted_sum = weights[0] + np.dot(weights[1:], row[:-1]) return 1 if weighted_sum >= 0 else 0 def train_weights(train, learn_rate, epochs): weights = np.zeros_like(train[0]) ...
#!/usr/bin/env bash set -ue export IMG="r-py.sif" echo "Using Singularity image: ${IMG}" # ################# Verify R version (label) # version () { singularity inspect "${IMG}" | \ grep "R_Version" | \ awk '{print $2}' } singularity exec "$IMG" R -q -e "stopifnot(getRversion() == '$(version)')" WD="$P...
#!/bin/sh MODEL_SUFFIX="$1" DATA_SUFFIX="$2" DATASET_IM_DIR="/tmp/val2014" DATASET_ANN="val2014/person_keypoints_minival2014$DATA_SUFFIX.json" python code/eval_kpt_cpu.py \ --net "model/int8$MODEL_SUFFIX/model-nnapi.pb" \ --init_net "model/int8$MODEL_SUFFIX/model_init.pb" \ --dataset "coco_2014_minival$DAT...
/** * */ package org.ednovo.gooru.core.api.model; /** * @author parthi * */ public enum PartyType { USER("user"), ORGANIZATION("organization"), USERGROUP("userGroup"), NETWORK("network"); private String type; /** * */ PartyType(String type) { setType(type); } public String getType() { return ...
<gh_stars>1-10 /* * Copyright 2009-2012 The MyBatis Team * * 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 * * Unles...
#!/bin/bash # Copyright 2019 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 agre...
import makeActionCreator from "./creator" import { PHOTOS_REQUEST, PHOTOS_SUCCESS, PHOTOS_FAILURE, PHOTOIDS_SELECTED_BY_KEY_SET, PHOTOIDS_SELECTED_BY_KEY_REMOVE } from "./types" // Action Creators export const photosRequest = makeActionCreator( PHOTOS_REQUEST ) export const photosSuccess = makeActionCreator(...
/*************************************************************************** * Copyright (C) 2021 by <NAME>, <NAME> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of t...
rm -rf relax scf nscf bands database gw gw_conv bse bse_conv ip gw_bse relax.log scf.log nscf.log yambo_bse.log yambo_gw.log yambo.log p2y.log rt nscf-dg elphon work elphon.json bands phonons proj.in rt-dg
<reponame>ElreyB/candyhunt import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { Location } from '@angular/common'; import { Player } from '../player.model'; import { Storyline } from '../storyline.model'; import { STORYLINE } from '../mock-storyline'; import { PlayerServ...
#!/bin/bash set -e echo "> Test" GO111MODULE=on go test -race -mod=vendor $@ | grep -v 'no test files'
package com.zhiyi.onepay.util; import android.os.Handler; import android.os.Message; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import org.apach...
<gh_stars>0 var should = require('chai').should(), LinkedList = require('../'), list; describe('LinkedList', function() { describe('#unshift', function () { before(function () { var values = [[4, 5], { test: 3 }, null, '2', 1]; list = new LinkedL...
const path = require('path'); const fs = require('fs'); const { getNewDefaultNodeProcessor } = require('../utils/utils'); jest.mock('fs'); afterEach(() => fs.vol.reset()); test('includeFile replaces <include> with <div>', async () => { const indexPath = path.resolve('index.md'); const index = [ '# Index', ...
class TreeNode: def __init__(self, value=0, left=None, right=None): self.value = value self.left = left self.right = right class Solution: def findDiameter(self, root: TreeNode) -> int: self.diameter = 0 def getTreeHeight(node: TreeNode) -> int: if n...
import pandas as pd from sklearn.ensemble import RandomForestClassifier # create data wine_data = pd.read_csv('wine.csv') # set features features = ['alcohol', 'type', 'sulphates', 'pH', 'quality'] x_train = wine_data[features] y_train = wine_data['type'] # create model model = RandomForestClassifier(n_estimators=100...
#!/bin/sh sudo yum install -y openshift-ansible-playbooks
/** * @file * Handle preview functionality on smart segment form. */ (function ($, Drupal) { Drupal.behaviors.previewFieldBehavior = { attach: function (context, settings) { // Segment elements. var segments = $('.smart-content-segment-set-edit-form .smart-segments-preview'); segments.each(...
package db; public class Compiler { private static Compiler compiler; private static String compilationMSG = "Compiling..."; private Compiler() {} public static Compiler compile() { if (compiler == null) { compiler = new Compiler(); } return compiler; } pu...
#SAFARI="/Applications/Safari.app/Contents/MacOS/Safari" #exec "$SAFARI" $1 open -W -a Safari $1
/* * #%L * ImageJ software for multidimensional image processing and analysis. * %% * Copyright (C) 2009 - 2020 ImageJ developers. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of s...
<gh_stars>10-100 # frozen_string_literal: true require 'tempfile' # captures arbitrary io def capture(io) captured_io = Tempfile.new orig_stdout = io.dup io.reopen captured_io yield io.rewind captured_io.read ensure captured_io.unlink io.reopen orig_stdout end # captures $stdout # @example # ou...
#!/bin/bash # # Copyright (c) 2018-2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # set -e cidir=$(dirname "$0") source /etc/os-release || source /usr/lib/os-release source "${cidir}/lib.sh" TEST_CGROUPSV2="${TEST_CGROUPSV2:-false}" echo "Install chronic" sudo -E dnf -y install moreutils if [ "${TES...
<reponame>anedyalkov/JS-Applications function generatesMatrix(numberOfRows, numberOfCols) { let matrix = []; for (let row = 0; row < numberOfRows; row++) { matrix[row] = []; for (let col = 0; col < numberOfCols; col++) { matrix[row][col] = 0; } } let counter = 1; ...
<reponame>matthew-gerstman/code-surfer import { useDeck } from "mdx-deck"; import React from "react"; export function useNotes(notesElements) { const context = useDeck(); React.useEffect(() => { if (!context || !context.register) return; if (typeof context.index === "undefined") return; const notes = ...
#!/usr/bin/env bash # shellcheck disable=SC2091 ############################################################################### function cmd { printf "./avalanche-cli.sh admin memory-profile" ; } function check { local result="$1" ; local result_u ; result_u=$(printf '%s' "$result" | cut -d' ' -f3) ; ...
#!/bin/bash -e # Name: PyAnime4K setup script for ubuntu # Author: TianZerL - forked 2/26/22 with much thanks to the author if [ ! -z "$1" ]; then export INSTALLATION_PATH=$1 else export INSTALLATION_PATH="$HOME/pyanime4k_wheel/" fi TEMP="/tmp/pyanime4k" git clone https://github.com/TianZerL//pyanime4k.git $...
/* * Copyright 2009-2012 The MyBatis Team * * 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 requ...
import { BaseApi } from '../BaseAPI'; import { Application, Request, Response } from 'express'; export class CommonApi extends BaseApi { constructor() { super(); // Initialize any common API configurations here } register(express: Application): void { // Register routes using the p...
import * as React from "react"; import asc from "@app/AppStateContainer"; import { logout } from "@async/logout"; import { History } from "history"; import { Moment } from "moment"; import { Option } from "fp-ts/lib/Option"; import { Link } from "react-router-dom"; import {apBasePath} from "@paths/ap/_base" import {jp...
#!/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...
#!/bin/bash set -e # Run nginx nginx -g "daemon off;" & # Wait for kartotherian to be ready sleep 5 # Run expire tiles service ./expire.sh
from typing import Any, Dict, Generic, List, Tuple, TypeVar, Union from pydantic import BaseModel as PydanticBaseModel import uvicore from uvicore.contracts import Model as ModelInterface from uvicore.support.classes import hybridmethod from uvicore.support.dumper import dd, dump from uvicore.orm.fields import HasMa...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" # This protects against multiple targets copying the same framework dependency at the same time....
package dev.arkav.openoryx.net.packets.c2s; import dev.arkav.openoryx.net.data.Packet; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; @SuppressWarnings("ALL") public class KeyInfoRequestPacket implements Packet { @SuppressWarnings("WeakerAccess") public int itemType; pu...
INSERT INTO users (user_id, name, nickname, descrption, location, followers_count, tweets_count, creation_date, is_verified) SELECT DISTINCT user_id, name, nickname, descrpition, user_location, followers_count, ...
#!/bin/sh # Run the setup scripts # TODO: set a flag that will stop this script from running if already run SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") cd $SCRIPTPATH # Add Apache Ports and Domain Mappings (cd apache ; sh add-ports.sh) # Create tables (cd /vagrant/www/src/shrub/tools; echo YES | php ...
import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { FormBuilder, Validators } from '@angular/common'; @Component({ templateUrl: 'build/pages/contactus/contactus.html', }) export class ContactusPage { contactForm: any; constructor(private nav: NavController, fb: For...
#!/bin/bash # Prepare Kaldi cd kaldi/tools #make clean make -j ${cores} make -j ${cores} openfst ./extras/install_openblas.sh cd ../src # make clean (sometimes helpful after upgrading upstream?) ./configure --static --static-math=yes --static-fst=yes --use-cuda=no --openblas-root=../tools/OpenBLAS/install --fst-root=....
<reponame>e-money/bep3 package bep3 import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/e-money/bep3/module/types" ) // InitGenesis initializes the store state from a genesis state. func InitGenesis(ctx sdk.Context, keeper Keeper, accountKeeper types.AccountKeeper, gs GenesisState) { // Check if ...
// Java program to store the contact information public class Contact { // Declare variables String firstName; String lastName; String phoneNumber; String email; // Default constructor public Contact() { firstName = ""; lastName = ""; phoneNumber = ""; email = ""; } // Parameterized c...
import Taro from '../index.js' Taro.initNativeApi(Taro) describe('request', () => { beforeEach(() => { const fetch = jest.fn(() => { return new Promise((resolve, reject) => { resolve({ ok: true, status: 200, headers: {}, json: () => { return Prom...
#!/usr/bin/env bash SDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) && cd "$SDIR" || exit 1 source ./util.sh init_store register_features t0=${1:-$(perl -MTime::HiRes=time -E 'say int(time * 1000)')} oomcli push --entity-key 1 --group user-click --feature last_5_click_posts=1,2,3,4,5 --feature number_of_user_star...
# Buhos # https://github.com/clbustos/buhos # Copyright (c) 2016-2021, <NAME> # All rights reserved. # Licensed BSD 3-Clause License # See LICENSE file for more information # # @!group Screening and analysis of documents # Retrieve the interface to make decision on a document get '/decision/review/:review_id/user/:u...
<reponame>eddie4941/servicetalk /* * Copyright © 2021 Apple Inc. and the ServiceTalk project 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/license...
<reponame>QuentinQuero/among_us_irl-back 'use strict'; const gameSchema = require('../../schema/GameSchema'); const resetMissionList = require('./resetMissionList'); const resetPlayerList = require('./resetPlayerList'); const updateGameStatus = function (gameId) { console.log('Game service - updateGameStat...
#!/bin/bash sudo yum -y update echo "Install Java JDK 8" yum remove -y java yum install -y java-1.8.0-openjdk echo "Install Maven" yum install -y maven echo "Install git" yum install -y git echo "Install Docker engine" yum update -y yum install docker -y #sudo usermod -a -G docker jenkins #sudo service docker st...
#!/bin/bash GPIO_PIN=250 DEVICE='/dev/ttyS5' BAUD=230400 # Install PPS cd .. cd pps-gpio-modprobe make clean make sudo cp pps-gpio-modprobe.ko /lib/modules/$(uname -r)/kernel/drivers/pps/clients/ sudo depmod sudo sh -c 'echo "pps-gpio-modprobe" >> /etc/modules-load.d/10-pps-gpio-modprobe.conf' sudo sh -c "echo 'optio...
#!/bin/bash # Created with package:mono_repo v5.0.5 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") # then "flutter" is called instead of "pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { i...
#bart vec 0 0 1 0 v1 #bart vec 0 0 0 1 v2 #bart vec 0 1 1 1 v3 #bart join 1 v1 v2 v3 v #bart vec 0 0 1 1 v1 #bart vec 0 1 1 0 v2 #bart vec 0 0 1 0 v3 #bart join 1 v1 v2 v3 v #bart vec 0 1 1 1 0 1 v1 #bart vec 0 1 0 0 0 0 v2 #bart vec 0 0 0 0 1 1 v3 #bart vec 0 0 1 1 0 1 v4 #bart vec 0 1 0 1 0 1 v5 #bart join 1 v1...
function registerUser(userData, callback) { if (userData.username && userData.password) { // Simulate successful registration callback(true, 'Successfully registered'); } else { // Simulate failed registration due to invalid data callback(false, 'Invalid registration data'); } } // Example usage:...
#include "tickit.h" #include "taplib.h" #include "taplib-mockterm.h" int main(int argc, char *argv[]) { TickitTerm *tt = make_term(25, 80); TickitRenderBuffer *rb; rb = tickit_renderbuffer_new(10, 20); // Position { int line, col; tickit_renderbuffer_goto(rb, 2, 2); { tickit_renderbuffe...
<filename>Client/Seen-1.0.4-IM/Seen/app/src/main/java/com/a8plus1/seen/mainViewPagers/SearchFragment.java<gh_stars>1-10 package com.a8plus1.seen.mainViewPagers; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.GridLayout...
package milter import ( "bytes" "net" nettextproto "net/textproto" "reflect" "testing" "github.com/linanh/go-message/textproto" ) func init() { // HACK: claim to support v6 in server for tests serverProtocolVersion = 6 } type MockMilter struct { ConnResp Response ConnMod func(m *Modifier) ConnErr error...
<gh_stars>0 'use strict'; /** * Module dependencies */ var rawsPolicy = require('../policies/raws.server.policy'), raws = require('../controllers/raws.server.controller'); module.exports = function(app) { // Raws Routes app.route('/api/raws').all(rawsPolicy.isAllowed) .get(raws.list) .post(raws.create...
import { Request, Response } from "express"; import { RoomsManager } from "../rooms/RoomsManager"; export class RoomCodeResetHandler{ // required query string (super secure, of course) private static readonly secretAuthCode:string = process.env.API_SECRET || "lichKing33"; // rooms manager public stati...
package io.opensphere.core.control.ui.impl; import java.util.concurrent.Executor; import io.opensphere.core.control.ui.SharedComponentListener; import io.opensphere.core.util.ChangeSupport; import io.opensphere.core.util.WeakChangeSupport; /** * Support for notify interested parties when a shared component has been...
#!/bin/bash while [[ $# -gt 1 ]] do key="$1" case $key in -m|--model) MODEL="$2" shift # past argument ;; -h|--nodes_file) NODES_FILE="$2" shift # past argument ;; -r|--remote_dir) REMOTE_DIR="$2" shift # past argument ;; -n|--num_nodes) NUM_NODES="$2" shift...
from Old_robots import Text_Robots, Resumir, Write def start(): def inputTermo(): print() termo = input('Digite um termo para o Wikipedia: ') print() return termo def inputPrefixo(): prefixos = ['Quem e', 'O que e', 'A historia', 'Exit', ''] print('Escolha um:'...
<reponame>pedroalbanese/gostpass<filename>pkg/keepass/io_test.go // Copyright 2016 The Sandpass 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/lic...
<filename>03. Callback-Function/Calculator.Callback.js<gh_stars>0 // Addition Callback const addCallback = (a, b, c) => c(parseInt(a) + parseInt(b)); // Subtraction Callback const subCallback = (a, b, c) => c(parseInt(a) - parseInt(b)); // Multiplication Callback const multiCallback = (a, b, c) => c(parseInt(a) * par...
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 <NAME> All rights reserved. # """ """ #end_pymotw_header import urllib url = 'http://localhost:8080/~dhellmann/' print 'urlencode() :', urllib.urlencode({'url':url}) print 'quote() :', urllib.quote(url) print 'quote_plus():', urllib.quote_plus(url)
// Copyright 2020 The SQLFlow 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 required by applicab...
class MessagingConfig: def __init__(self, name): self.name = name def get_name(self): return self.name
<gh_stars>0 package org.rs2server.rs2.model.minigame.impl; import org.rs2server.rs2.model.GameObject; import org.rs2server.rs2.model.Location; import org.rs2server.rs2.model.event.ClickEventManager; import org.rs2server.rs2.model.event.EventListener; import org.rs2server.rs2.model.player.Player; import java.util.Arra...
import React from "react"; import { connect } from "react-redux"; import styled from "emotion/react"; import Title from "../misc/title"; import UserInfo from "./user-info"; import { getActiveCard } from "../../selectors/cards"; const HeaderLayout = styled.header` display: flex; justify-content: space-between; a...
<reponame>ParkerM/markdown-serve<gh_stars>10-100 var resolver = require('../lib/resolver'), path = require('path'); describe('resolver', function() { var rootDir = path.resolve(__dirname, 'fixture/'); it('should resolve "/"', function() { var file = resolver('/', rootDir); file.should.equ...
#! /bin/sh # Build and run Quarkus Docker container according to instructions in https://access.redhat.com/documentation/en-us/red_hat_build_of_quarkus/1.7/html-single/compiling_your_quarkus_applications_to_native_executables/index IMAGE_NAME=transactions # Build native executable ./mvnw package -Pnative -Dquarkus.na...
def sort_list(list_to_sort): """ Sort the given list """ sorted_list = sorted(list_to_sort) return sorted_list # Test my_list = [2, 3, 5, 8, 1, 6, 4] print(sort_list(my_list))
#!/bin/sh ########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2015 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may ...
#!/usr/bin/env bash echo "Installing MongoDB" echo "Adding Key Server" sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 echo "Adding List File" echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.lis...