text
stringlengths
1
1.05M
#!/bin/sh set -e ROOTDIR=dist BUNDLE=${ROOTDIR}/HLMN-Qt.app CODESIGN=codesign TEMPDIR=sign.temp TEMPLIST=${TEMPDIR}/signatures.txt OUT=signature.tar.gz if [ ! -n "$1" ]; then echo "usage: $0 <codesign args>" echo "example: $0 -s MyIdentity" exit 1 fi rm -rf ${TEMPDIR} ${TEMPLIST} mkdir -p ${TEMPDIR} ${CODESIG...
<reponame>dominicbarnes/virtual-element-assertions var assert = require('assert'); var element = require('virtual-element'); var assertions = require('..'); describe('node', function () { it('should be an object', function () { assert(assertions); assert.strictEqual(typeof assertions, 'object'); }); de...
#!/bin/bash # Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress] # # Deinterleaves a FASTQ file of paired reads into two FASTQ # files specified on the command line. Optionally GZip compresses the output # FASTQ files using pigz if the 3rd command line argument is the word "compress" # # Latest...
#!/usr/bin/env bash # ARG_OPTIONAL_BOOLEAN([ci],[],[Enable CI mode. Do not use tmux, but report exit code.]) # ARG_POSITIONAL_DOUBLEDASH([]) # ARG_LEFTOVERS([command]) # ARG_DEFAULTS_POS([]) # ARGBASH_GO() # needed because of Argbash --> m4_ignore([ ### START OF CODE GENERATED BY Argbash v2.10.0 one line above ### # A...
#include <iostream> #include <vector> using namespace std; // Function to check whether two numbers // can be added to get the target value bool isPossible(vector<int> arr1, vector<int> arr2, int target) { // Create two index variables to traverse // both arrays int i = 0, j = 0; while (i...
from imports import Resources, request from __main__ import app, db #resources-------------------------------------------------------# @app.route('/resources', methods=['POST']) def resources_post(): return Resources(db).post(request.json) @app.route('/resources', methods=['GET']) def resources_get(): return ...
PlaylistType = GraphQL::ObjectType.define do name "Playlist" field :id, types.ID, "Playlist id" field :name, types.String, "Playlist name" field :image, types.String, "Playlist cover image" field :plays, types.Int, "Times the playlist has been played" field :year, types.Int, "Year the playlist was created"...
#include "AgentServiceImp.h" #include "AgentServer.h" #include "PlayerBase.h" #include "WorkerOperateHelper.h" CAgentServiceImp::CAgentServiceImp( const std::string& strServerBind, const std::string& servantAddress, const std::string& serverName, uint16_t serverId, CreatePlayerMethod createPlayerMethod /*= NULL*...
package vehicle import ( "fmt" "strings" "time" "github.com/evcc-io/evcc/api" "github.com/evcc-io/evcc/util" "github.com/evcc-io/evcc/util/request" "github.com/evcc-io/evcc/vehicle/id" ) // https://github.com/TA2k/ioBroker.vw-connect // ID is an api.Vehicle implementation for ID cars type ID struct { *embed...
<reponame>khaled-11/Botai // Function to handle the Postbacks // const CryptoJS = require("crypto-js"), callSendAPI = require("../messenger/callSendAPI"), rp = require('request-promise'), getPages = require('../database/get_page'), witResolve = require("../wit/resolve"), updateSent = require("../database/update_sent_ev...
// // Pod.h // Pod // // Created by 张星宇 on 2017/1/8. // Copyright © 2017年 bestswifter. All rights reserved. // #import <Foundation/Foundation.h> @interface Pod : NSObject @end
package weixin.popular.bean.card.update; import java.util.HashMap; import java.util.Map; import com.alibaba.fastjson.annotation.JSONField; /** * 会员信息更新 * * @author zhongmin * */ public class UpdateMember extends AbstractUpdate { @JSONField(name = "code") private String code; @JSONField(...
package builder import ( "context" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/mholt/archiver" ) // StepExtractAndCopyImage creates filesystem on already partitioned image type StepExtractAndCopyImage struct...
package algorithm_400 import "strconv" func compress(chars []byte) int { if len(chars) < 2 { return len(chars) } var idx, i, j = 0, 0, 1 for j <= len(chars) { if j < len(chars) && chars[i] == chars[j] { j++ continue } if chars[idx] != chars[i] { chars[idx] = chars[i] } idx++ if j-i > 1 { ...
import React, { Component } from 'react'; import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap' import './ROM.css'; export class ROMCore extends Component { constructor(props) { super(props); this.handlesetupsubmit = this. handlesetupsubmit.bind(this); this.stat...
<filename>app/src/main/java/com/piercelbrooks/mlkit/common/BitmapUtils.java package com.piercelbrooks.mlkit.common; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.ImageFormat; import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.YuvImage;...
// Copyright 2016 The etcd 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 or agreed t...
package e100920.Server; import java.io.PrintWriter; import java.util.ArrayList; class Sender implements Runnable { // si occupa solamente di inviare al client le coppie di numeri private final ArrayList<Integer> numberList = new ArrayList<>(); private final PrintWriter output; public boolean interrupt...
from abc import ABC, abstractmethod from typing import List from src.domain.common.event.event import Event class EventPublisher(ABC): @abstractmethod def publish(self, events: List[Event]) -> None: pass
; define(function (require) { require('../services/queryPluginsManager'); require('../services/backendService'); var backendModel = require('../models/backend'); require('../ngModule').controller('BackendListController', function ($scope, backendService, queryPluginsManager, $modal) { $scope.lis...
<reponame>rasenplanscher/eslint-config-rp<filename>src/rules-configurations/eslint/semi.d.ts import { RuleConfiguration } from '../../../support/Rule' type Options = (("never") | { beforeStatementContinuationChars?: "always" | "any" | "never" })[] | (("always") | { omitLastInOneLineBlock?: boolean })[] type Configu...
/* * $Id$ * * Copyright (c) 2006 */ package com.horowitz.mickey; import java.io.Serializable; import org.apache.commons.lang.builder.CompareToBuilder; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; /** * * @author zhristov */ public class Pixel i...
#!/usr/bin/env bash # Copyright 2022 The Cockroach 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
<gh_stars>0 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <openssl/evp.h> #include "arg.h" #define MIN(x, y) ((x) < (y)) ? (x) : (y) #define MAX(x, y) ((x) > (y)) ? (x) : (y) struct range { size_t min, max; struct range * next; }; char * argv0; static char * separators = "\t"; static struct...
package simplenet; import java.io.IOException; import java.net.InetSocketAddress; import java.net.StandardSocketOptions; import java.nio.channels.AlreadyBoundException; import java.nio.channels.AsynchronousChannelGroup; import java.nio.channels.AsynchronousServerSocketChannel; import java.nio.channels.AsynchronousSock...
/*jshint node:true, white:true, undef:true, maxlen:100 */ var fs = require('fs'); exports.fixture = function (name) { return fs.readFileSync(__dirname + '/../unit/fixtures/' + name).toString(); };
<reponame>sergeytkachenko/siesta-template var AppDispatcher = require('../dispatchers/app.dispatcher'); var ArtworkConstants = require('../constants/artwork.constants'); // Define actions object var ArtWorkActions = { search: function (query) { AppDispatcher.handleViewAction({ actionType: Artw...
module Nomis class PrisonerAvailability include MemoryModel attribute :available, :boolean attribute :dates, :date_list end end
set -e cd $GOPATH/src/github.com/v3io/v3io-go echo Installing impi go get -u github.com/pavius/impi/cmd/impi echo Linting imports with impi $GOPATH/bin/impi \ --local github.com/v3io/v3io-go \ --scheme stdLocalThirdParty \ --skip=pkg/dataplane/schemas/node/common \ ./pkg/... echo Getting all package...
public static void swap(int[] arr, int index1, int index2) { int temp = arr[index1]; arr[index1] = arr[index2]; arr[index2] = temp; }
#!/bin/bash nx build $1 --skip-nx-cache rm -rf tmp/nx-e2e/proj/node_modules/@trafilea/$1/src mkdir -p tmp/nx-e2e/proj/node_modules/@trafilea/$1/src cp -r dist/packages/$1/src/* tmp/nx-e2e/proj/node_modules/@trafilea/$1/src
<filename>SDLSim/Graphics.hpp // // Graphics.hpp // walls3duino // // Created by <NAME> on 4/24/20. // Copyright © 2020 <NAME>. All rights reserved. // #ifndef Graphics_hpp #define Graphics_hpp #include <string> #include <cmath> #include <cstdint> #include <memory> #include "SDLHeader.hpp" #include "Vec2.hpp" //...
#!/usr/bin/env zsh git/is-available() >/dev/null 2>/dev/null { git/is-enabled && \git rev-parse --is-inside-work-tree } git/is-enabled() { return 0 } (( ${+gitrp_safeparms} == 1 )) || local -ar gitrp_safeparms=( --show-toplevel --git-dir --is-bare-repository --show-superproject-working-tree ) # NOTE:...
## # Proc(Ext) Test assert('Proc#source_location') do loc = Proc.new {}.source_location next true if loc.nil? assert_equal loc[0][-7, 7], 'proc.rb' assert_equal loc[1], 5 end assert('Proc#inspect') do ins = Proc.new{}.inspect assert_kind_of String, ins end assert('Proc#lambda?') do asse...
""" Utils for data-driven method """ import xml.etree.ElementTree as ET import cv2 import pandas as pd def save_image( img_filename, image, acc, model, score_thresh, top_left_crner, btm_right_crner): cv2.rectangle( image, top_left_crner, btm_right_crner, co...
/* * 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 ...
#!/usr/bin/env bash set -euo pipefail shopt -s nullglob scriptDir="$(dirname "$(readlink -f "$0")")" PATH=$scriptDir:$PATH cleanup() { set +e for container in $(extra-container list | grep ^test-); do extra-container destroy $container done set -e } trap "cleanup" EXIT reportError() { ec...
import { MovePoint, template_config_bullet} from "stg/entity/MovePoint"; import { Scheduler } from "stg/stage/Scheuler"; import * as Res from "stg/util/sprites"; import * as SRes from "stg/util/shaped_sprites"; import { EntityPool } from "stg/stage/EntityPool"; import { StageEntry } from "stg/stage/StageInit"; import {...
#!/bin/bash if [ ! command -v cmake &> /dev/null ] then echo "Could not find cmake. Make sure it is installed." exit fi if [ ! -d ".build" ] then mkdir .build fi cd .build cmake .. -G "Unix Makefiles"
#include <bits/stdc++.h> #define endl '\n' using namespace std; int main() { // ios::sync_with_stdio(false); // cin.tie(0); int k, n; cin>>k>>n; long long v[70]={0, 1}; for(int q=1; q<=n; q++){ for(int w=q; w>=1; w--){ v[w]+=v[w-1]; } if(q>=k+1){ for(int w=0; w<n-q; w++){ cout<<" "; } for(int ...
#!/bin/bash source /usr/local/zippy/venv/bin/activate python run.py
package flesch_test import ( "github.com/PaluMacil/flesch-index/flesch" "testing" ) func TestTypeOfRune(t *testing.T) { vowels := []string{"a", "e", "i", "o", "u", "A", "E", "I", "O", "U"} for _, vowel := range vowels { r := []rune(vowel)[0] if flesch.TypeOfRune(r) != flesch.RuneTypeVowel { t.Errorf("For %...
/** * 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...
<reponame>danxmc/domotica // Make connection let socket = io.connect(window.location.hostname + ':' + 80); /* Event emitters */ //Light emitter event $(".lightBtn").on('click', (e) => { e.preventDefault; let btn = e.target.id; console.log("boton: ", btn); let status; // Check if button is currently...
import torch import logging.config import math from math import floor from copy import deepcopy from six import string_types from .regime import Regime from .param_filter import FilterParameters from . import regularization import torch.nn as nn from torch.optim.lr_scheduler import _LRScheduler _OPTIMIZERS = {name: fu...
#!/bin/bash # # Copyright (c) 2015 Red Hat, Inc # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. set -ex # /* # * CONFIGURATION # */ # # You should set these opts: # # export OS_PROXY_URL="http://auth_proxy:9443" # ...
#! /bin/bash export REMOTE_USER=ssg export REMOTE_IP=100.64.176.19 export cinventory=demo_scenarios/common/common.yaml export playbook=owca/workloads/run_workloads.yaml ansible-playbook -l $REMOTE_IP -i $cinventory $playbook --tags=clean_jobs -v ansible -u $REMOTE_USER -b all -i $REMOTE_IP, -msystemd -a'name=owca sta...
docker exec -i schema-registry /usr/bin/kafka-avro-console-producer --topic ratings --broker-list broker:9092 --property value.schema="$(< src/main/avro/rating.avsc)"
package view import ( "time" ) const ( // ConfigFormatToml .. ConfigFormatToml = "toml" // ConfigFormatYaml .. ConfigFormatYaml = "yaml" // INI格式 ConfigFormatINI = "ini" // ConfigureUsedType .. ConfigureUsedTypeSupervisor = 1 ConfigureUsedTypeSystemd = 2 ) var ( // ConfigFormats Verified list ConfigF...
SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-littlemips" BIG_OUTPUT_FORMAT="elf32-bigmips" LITTLE_OUTPUT_FORMAT="elf32-littlemips" TEXT_START_ADDR=0x0400000 DATA_ADDR=0x10000000 MAXPAGESIZE=0x40000 NONPAGED_TEXT_START_ADDR=0x0400000 OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' OTHER_READWRITE_SECTIONS=' _gp = . + 0x8...
<filename>raspberrypi.js var five = require("raspi-io"); var Firebase = require("firebase"); var board = new five.Board(); var firebase = new Firebase("https://robots.firebaseio.com/robots"); board.on("ready", function() { var red = new five.Button(24); var blue = new five.Button(26); red.on("up", function () ...
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 根据外部订单号查询发票信息 * * @author <NAME> * @since 1.0, 2020-08-29 14:30:33 */ public class AlipayEbppInvoiceOrderQueryModel extends AlipayObject { private static final long serialVersi...
#!/usr/bin/env bash # Look in package.json's engines.node field for a semver range semver_range=$(cat $BUILD_DIR/package.json | $bp_dir/vendor/jq -r .engines.node) # Resolve node version using semver.io node_version=$(curl --silent --get --data-urlencode "range=${semver_range}" https://semver.io/node/resolve) # Reco...
#!/usr/bin/env bash # Copyright 2014 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 applica...
#!/bin/bash # Copyright 2019 The Volcano 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 or agr...
/* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
<reponame>teal-tigers/grace-shopper import React from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' import {Link} from 'react-router-dom' import {logout, clearCart} from '../store' import NavBar from 'react-bootstrap/Navbar' import Nav from 'react-bootstrap/Nav' import {FontAwesomeIcon}...
#!/usr/bin/env bash ## i2pd模组 i2pd moudle install_i2pd(){ set +e if [[ ${dist} == debian ]]; then wget -q -O - https://repo.i2pd.xyz/.help/add_repo | sudo bash -s - apt-get update apt-get install minissdpd -y #curl -LO https://github.com/PurpleI2P/i2pd/releases/download/2.39.0/i2pd_2.39.0-1bullseye1_amd64.deb #dp...
<gh_stars>0 var path = require('path'); var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var extractCSS = new ExtractTextPlugin('css/[name].min.css'); var autoprefixer = require('autoprefixer'); //tu dong fix css voi cac trinh duyet var _ = require('lodash'); var HtmlWeb...
#!/bin/sh convert logo64.png logo32.png logo16.png favicon.ico
#!/usr/bin/perl $string = "Hello, World!"; $shift = 3; $encrypted_string = ""; foreach $char (split //, $string) { $ascii_value = ord($char); if ($ascii_value >= 97 && $ascii_value <= 122) { # lowercase $encrypted_string .= chr(($ascii_value - 97 + $shift) % 26 + 97); } elsif ($ascii_value >= 65 && $ascii_...
<reponame>AmatanHead/collective-blog<filename>collective_blog/settings/dev_settings.py<gh_stars>0 """Development settings - unsuitable for production See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ """ from __future__ import unicode_literals print('\033[00;32mLoading development settings\033[0...
<gh_stars>10-100 package com.ramusthastudio.mymultilanguageapp; import android.content.Intent; import android.os.Bundle; import android.provider.Settings; import android.support.v7.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.widget.TextView; public class MainActivity ...
#!/usr/bin/env bash # This is for the arguments # -v is useful to run the same test multiple time without changing the shell script name. # Interactive is there as a reference for future implementation. Thanks to http://linuxcommand.org/ for the tips. play=0 version= while [ "$1" != "" ]; do case $1 in -v...
<reponame>LuChangliCN/medas-iot package com.foxconn.iot.controller; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.web.PageableDefault; i...
function wordCount(str){ let wordCounts = {}; for (let word of str.split(' ')) { if (wordCounts.hasOwnProperty(word)) { wordCounts[word]++ } else { wordCounts[word] = 1; } } return wordCounts; }
#!/usr/bin/env bash # Copyright (c) 2016 The Vendetta Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C set -e INPUTFILE="Xcode_7.3.1.dmg" HFSFILENAME="5.hfs" SDKDIR="Xcode.app/Contents/Developer/Pla...
class MyFrame extends JFrame { public MyFrame() { setSize(640, 480); setTitle("BrokenSwing"); } } public class BrokenSwing { private static void doStuff(MyFrame frame) { // BAD: Direct call to a Swing component after it has been realized frame.setTitle("Title"); } p...
<reponame>insad/jworkflow package net.jworkflow.sample04; import net.jworkflow.sample04.steps.*; import net.jworkflow.kernel.interfaces.*; public class ForeachWorkflow implements Workflow<MyData> { @Override public String getId() { return "foreach-sample"; } @Override public Class getDat...
def sort_strings(strings): return sorted(strings) if __name__ == '__main__': strings = ['Python', 'Java', 'C++', 'C#'] sorted_strings = sort_strings(strings) print(sorted_strings)
import PyPDF2 # open and read the pdf file file = open('document.pdf', 'rb') reader = PyPDF2.PdfFileReader(file) # read complete document for page in range(reader.numPages): print(reader.getPage(page).extractText()) file.close()
export function* helloSaga() { console.log('Hello Saga!') }
#!/bin/sh # Install nodejs, npm, and elasticdump sudo apt-get -y update sudo apt-get -y install nodejs sudo apt-get -y install npm sudo npm install elasticdump -g # create a symlink for nodejs sudo ln -s /usr/bin/nodejs /usr/bin/node # Install pip, virtualenv, setup python environment sudo apt-get -y install python-...
/* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
package com.createchance.imageeditor; import android.graphics.Bitmap; import android.graphics.SurfaceTexture; import android.opengl.GLES20; import com.createchance.imageeditor.gles.EglCore; import com.createchance.imageeditor.gles.WindowSurface; import com.createchance.imageeditor.utils.Logger; import com.createchanc...
#!/bin/bash DIR=$(dirname $0) FILE="$DIR/main.js" COMPILE_TO="bookmarklet.js" echo "Compiling " $FILE"..." echo -n "javascript:(function(){" > $COMPILE_TO curl --data-urlencod "js_code@$FILE" -d compilation_level=SIMPLE_OPTIMIZATIONS -d output_format=text -d output_info=compiled_code https://closure-compiler.appspot....
# frozen_string_literal: true RSpec.shared_examples_for 'a CurveHandler processor' do let(:handler) { described_class.new(curve) } context 'with an empty curve' do let(:curve) { [] } it 'is not valid' do expect(handler).not_to be_valid end it 'has an error message' do handler.valid? ...
#!/usr/bin/env bash set -euxo pipefail # Check tar is in PATH command -v jar source Version.txt OUTPUT_DIR="docs/javadoc" rm -rf ${OUTPUT_DIR} mkdir -p ${OUTPUT_DIR} ARCHIVE=$(find "temp_java/ortools-java/target" -iname "ortools-java-${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}.*-javadoc.jar") (cd ${OUTPUT_DIR} && jar -xvf ...
import * as DebugHelpers from '../index'; beforeEach(() => { jest.spyOn(console, 'log'); }); afterEach(() => { jest.clearAllMocks(); }); describe('DebugHelpers', () => { describe('delog', () => { it('should log body of request in debug mode', () => { const body = 'Hello Snappmarket!'; process.en...
<filename>scr/consts-author.web.js<gh_stars>1-10 ////////////////////////////////////////////////////////////BUYER const _buyPostNum='_buyPostNum'; const _buyDone='_buyDone'; const _buyTpe='_buyTpe'; const _buyVol='_buyVol'; const _buyNum='_buyNum'; ////////////////////////////////////////////////////////////SELL...
#!/bin/bash export DISPLAY=:0.0 wallpaperdir="$HOME/Pictures/Wallpapers" randompic=$(find $wallpaperdir -maxdepth 1 -type f | shuf -n1) echo $randompic feh --bg-scale "$randompic" datetime=$(date -u) echo $datetime
#!/usr/bin/env bash ### Default Parameters Set within subjectService ## # SERVER='localhost:8888' # Retry Connection Interval: 5 sec # get commandline args - process the -h help arg args=("${@}") for i in ${!args[@]}; do if [[ ${args[i]} = "-h" ]]; then echo "USAGE: $0 [-s <server>] [-u <username>] [-p <passwor...
import copy import sys sys.path.append('SetsClustering') from multiprocessing import Process ,Manager import numpy as np import LinearProgrammingInTheDarkClassVersion as LPD from multiprocessing import Pool from jgrapht.algorithms.shortestpaths import johnson_allpairs import jgrapht from SetsClustering import ...
#!/bin/sh export $(echo $(cat /tmp/.env | sed 's/#.*//g'| xargs)) docker exec -i ${APP_NAME}-php bash -c "git reset --hard" docker exec -i ${APP_NAME}-php bash -c "git pull origin master"
<gh_stars>10-100 package io.dronefleet.mavlink; import java.util.List; /** * Serves as an index of a Mavlink dialect. */ public interface MavlinkDialect { /** * Returns the name of this dialect. The returned name is a lower-case version of the * XML filename without the {@code .xml} extension. *...
<reponame>nokia/jspy /* * Copyright 2015 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see licence.txt file for details. */ package spyAgent; import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; public class CompMouseL...
package it.feio.android.omninotes.utils; import java.util.List; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; public class IntentChecker { /** * Checks intent and features availability * * @param ctx * @param ...
<reponame>tactilenews/100eyes # frozen_string_literal: true require 'rspec/expectations' RSpec::Matchers.define :have_current_user do |user| match do |response| current_user(response).present? && current_user(response) == user end description do "have current user #{user&.id}" end failure_message_...
#!/bin/bash #PBS -l pmem=1gb #PBS -l nodes=1 #PBS -l walltime=2:00:00 if [ -e "/etc/profile.d/modules.sh" ]; then source /etc/profile.d/modules.sh module load matlab fi echo "Starting Matlab..." matlab -singleCompThread -r "jobmgr.qsub.job('$job_name')" # Rely on the memoise framework to save the result rm -...
""" Test Stts Services class """ import unittest from flask_sqlalchemy import get_state from app.main.service.stats_service import * from app.test.base import BaseTestCase class TestStatsServices(BaseTestCase): def test_stats_serivces_create_new_stats(self): """ [ Test checks if creation stats process co...
<gh_stars>0 module.exports = function check(str, bracketsConfig) { for (let i = str.length; i >= 0; i--) { for (let j=0; j< bracketsConfig.length; j++) { let bracket = bracketsConfig[j].join('') if (str.includes(bracket)) { str = str.replace(bracket, '') } } } return str === '' ? ...
import matplotlib.pyplot as plt from matplotlib import cm from numpy import exp, sin, sqrt from numpy import linspace, zeros, array, meshgrid from numpy.random import multivariate_normal as mvn from numpy.random import normal, random, seed from inference.gp import GpRegressor seed(4) """ Code demonstrating the use o...
import { createRouter, createWebHashHistory } from 'vue-router' import HomeView from '../views/HomeView.vue' import VideosView from '../views/VideosView.vue' const routes = [ { path: '/', name: 'home', component: HomeView }, { path: '/videos', name: 'videos', component: VideosView }, ] ...
<gh_stars>0 $( ".btnListadoServicios" ).click(function() { var nombreServicio = $(this).attr("nombre"); MostrarServicio(nombreServicio); }); function MostrarServicio(nombreServicio) { var nombreDiv = ObtenerNombreDivServicio(nombreServicio); productosBuscado=false; OcultarServicios(); Activ...
package com.devculture.tools.AppleSalesReporter.Data; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Date; import com.devculture.util.DateConverter; public class ReportFilter implements Serializable { /** variables **/ private static final long...
package spring_data.ex_spring_data_intro.utils; import spring_data.ex_spring_data_intro.entities.Author; public interface RandomAuthorUtil { Author getRandom(); }
const strings = ["hello", "world", "foo", "bar"] for (let i = 0; i < strings.length; i++) { console.log(strings[i]); }
python transformers/examples/language-modeling/run_language_modeling.py --model_type gpt2 --tokenizer_name model-configs/1536-config --config_name model-configs/1536-config/config.json --train_data_file ../data/wikitext-103-raw/wiki.train.raw --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir train-o...
<reponame>Zhuravld/Portfolio<filename>GamesRL/pirate-passage/game_spec_validator.py<gh_stars>0 from utils import AdjacencyList, points_adjacent, value_is_integer class ValidationSummary: """Not yet used. Summarizes all diagnostic strings from GameSpecValidator into a single object. Access overall severit...
class SocketIOError(Exception): pass class ConnectionError(SocketIOError): pass class ConnectionRefusedError(ConnectionError): """Connection refused exception. This exception can be raised from a connect handler when the connection is not accepted. The positional arguments provided with the exc...