text stringlengths 1 1.05M |
|---|
package com.createchance.imageeditor.shaders;
import android.opengl.GLES20;
import android.util.Log;
/**
* ${DESC}
*
* @author createchance
* @date 2018/11/17
*/
public class DenoiseFragmentShader extends AbstractShader {
private static final String TAG = "DenoiseFragmentShader";
private final String FR... |
#! /bin/sh
# $Id: genconfig.sh,v 1.79 2015/06/09 15:33:50 nanard Exp $
# miniupnp daemon
# http://miniupnp.free.fr or http://miniupnp.tuxfamily.org/
# (c) 2006-2015 Thomas Bernard
# This software is subject to the conditions detailed in the
# LICENCE file provided within the distribution
for argv; do
case "$argv" in
... |
<reponame>rovedit/Fort-Candle<gh_stars>0
#pragma once
#include <typed-geometry/types/objects/aabb.hh>
#include <typed-geometry/types/objects/box.hh>
#include <typed-geometry/types/objects/capsule.hh>
#include <typed-geometry/types/objects/cylinder.hh>
#include <typed-geometry/types/objects/ellipse.hh>
#include <typed-... |
#!/bin/bash
#SBATCH --job-name=pca_1
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=168:00:00
#SBATCH --mem=250gb
#SBATCH --partition=benson,tmp_anvil,batch
module load anaconda
# conda activate statsmodels
conda activate pca_env
Rscript logistic_pca_clustering_program_newport.R
conda deactivate
|
# some code from https://github.com/ming71/toolbox/blob/master/rotation/order_points.py
import os
import math
import cv2
import numpy as np
# this function is confined to rectangle
# clockwise, write by ming71
def order_points(pts):
# sort the points based on their x-coordinates
xSorted = pts[np.argsort(pts[... |
<reponame>SeekinG-K/fund-analysis-parent<gh_stars>0
/**************************************************************************/
/* */
/* Copyright (c) 2019 XunceTech Company */
/* 深圳迅策科技有限公司版权所有 ... |
#!/bin/bash
#
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# 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 t... |
########################
# Intall NodeJS
#
# user:root
# path:/opt
#
########################
#!/bin/sh
cd /opt
# check node install
if which node 2>/dev/null; then
echo "node exists!"
else
# install node dependency
yum install -y gcc gcc-c++ make
# Download node source tar gz
wget https://nodejs.org/... |
sudo update-rc.d throne defaults
sudo update-rc.d throne enable
|
from geist.backends.windows import get_all_windows
coldharbour_window_finder = LocationFinderFilter(
lambda loc: loc.window.title.startswith(u'HOMECARE Domiciliary Care'),
WindowFinder()
)
class _WindowLocation(Location):
"""
Adds window to Location object
"""
def __... |
import React, {useState} from 'react';
const Calculator = () => {
const [num1, setNum1] = useState(0);
const [num2, setNum2] = useState(0);
const [operation, setOperation] = useState('add');
const [result, setResult] = useState(0);
const handleOperation = (e) => {
setOperation(e.target.value);
};
const calcu... |
#!/bin/sh
# The MIT License (MIT)
#
# Copyright (c) 2017 Eficode Oy
#
# 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, c... |
#!/bin/bash
#SBATCH --job-name=W4F_TEST_US_INIT_W4AO
#SBATCH --cluster=invest
#SBATCH --partition=lchong
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --mem=16g
#SBATCH --time=24:00:00
#SBATCH --mail-user=dty7@pitt.edu
#SBATCH --mail-type=END,FAIL
#SBATCH --output=slurm_init.out
#SBATCH --error=slurm_init.err... |
#include <math.h>
#include <assert.h>
#include "bam.h"
#include "bam_maqcns.h"
#include "ksort.h"
#include "kaln.h"
KSORT_INIT_GENERIC(uint32_t)
#define INDEL_WINDOW_SIZE 50
#define INDEL_EXT_DEP 0.9
typedef struct __bmc_aux_t {
int max;
uint32_t *info;
} bmc_aux_t;
typedef struct {
float esum[4], fsum[4];
uint3... |
/*
* Range.java
*
* Copyright (c) 2015 <NAME>
* Released under the MIT license.
* https://github.com/npedotnet/NPESDK_GWT/blob/master/LICENSE
*
* English document
* https://github.com/npedotnet/NPESDK_GWT/blob/master/README.md
*
* Japanese document
* http://3dtech.jp/wiki/index.php?NPESDK_GWT
*
*/
pack... |
//
// Created by ooooo on 2020/1/20.
//
#ifndef CPP_0744__SOLUTION2_H_
#define CPP_0744__SOLUTION2_H_
#include <iostream>
#include <vector>
using namespace std;
/**
* loop
*/
class Solution {
public:
char nextGreatestLetter(vector<char> &letters, char target) {
for (auto c: letters) {
if (c > target)... |
<reponame>zzhdhz/chatroom
package com.client.window;
import com.client.ClientMain;
import com.client.listener.ChatListener;
import javax.swing.*;
import java.awt.*;
/**
* Created by form on 2017-07-20.
*/
public class RoomWindow {
public void open(){
WindowController.dispose();
JFrame frame = ... |
<reponame>m-wrona/hevicado<filename>fe/gulpfile.js
// IMPORT PLUGINS (just regular node modules)
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
jscs = require('gulp-jscs'),
karma = require('karma').server,
usemin = require('gulp-usemin'),
uglify = require('gulp-uglify'),
minifyCss ... |
<filename>build/esm/shaders/glsl/surface.position.normal.js
export default /* glsl */ `uniform vec4 mapSize;
uniform vec4 geometryResolution;
uniform vec4 geometryClip;
attribute vec4 position4;
attribute vec2 surface;
// External
vec3 getPosition(vec4 xyzw, float canonical);
void getSurfaceGeometry(vec4 xyzw, float ... |
package com.mc.user.service.impl;
import com.mc.common.model.SysMenu;
import com.mc.common.service.impl.SuperServiceImpl;
import com.mc.user.mapper.SysRoleMenuMapper;
import com.mc.user.model.SysRoleMenu;
import com.mc.user.service.ISysRoleMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stere... |
module Kernel
def silence_stdout_if(cond, &run)
silence_stream_if(cond, STDOUT, &run)
end
def silence_stderr_if(cond, &run)
silence_stream_if(cond, STDERR, &run)
end
def silence_stream_if(cond, stream, &run)
if cond
silence_stream(stream, &run)
else
run.call
end
end
def ... |
func processResponseError(_ error: ResponseError) -> Foundation.HTTPURLResponse {
switch error {
case .badResponse(_, _, let rsp):
return rsp as! Foundation.HTTPURLResponse
case .stringEncoding(_, _, let rsp):
return rsp as! Foundation.HTTPURLResponse
}
} |
<reponame>jameseden1/lorawan-stack
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: lorawan-stack/api/applicationserver_packages.proto
package ttnpb
import (
context "context"
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/go... |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# 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 requi... |
<filename>routes/views/groupProduct.js
var keystone = require('keystone');
var GroupProduct = keystone.list('GroupProduct');
exports = module.exports = function (req, res) {
var view = new keystone.View(req, res);
var locals = res.locals;
locals.section = 'groupPrduct';
locals.GroupProduct = [];
view.... |
<gh_stars>1-10
Ext.define('GeekFlicks.view.Movies', {
extend: 'Ext.grid.Panel',
id: "movies_editor",
alias: 'widget.movieseditor',
store: 'Movies',
initComponent: function () {
//note: store removed
this.columns = [{
header: 'Title',
dataIndex: 'title',
... |
#!/bin/bash
# Тестирование реальных сервисов
server=127.0.0.1:11211
driver=memcache
x_chi() {
PYTHONPATH=. bin/chi -D $driver -S $server $*
}
x_chi set t:k1 -d Привет!
x_chi get t:k1
x_chi keys "t:*"
x_chi erase "t:*"
echo "Ключ удалён"
x_chi get t:k1
x_chi remove t:k1
x_chi get t:k1
|
// Copyright 2021 arcadium.dev <<EMAIL>>
//
// 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 ag... |
clear
source ./lawenv2/bin/activate
pip install --editable .
export FLASK_APP=BDLawsViz
export FLASK_DEBUG=true
python -m flask run
deactivate lawenv2
|
#!/bin/sh
git log --pretty --summary HEAD master . | git2cl | sed 's/\*\s\:\s//' | sed 's/\<\(.*\)\(@\)\(.*\)/\1[at]\3/'
|
if [[ "$TRAVIS_TAG" == v* ]]; then
export CHANNEL="main"
else
export CHANNEL="dev"
fi
echo "Uploading to $CHANNEL"
anaconda -t $ANACONDA_TOKEN upload --force --user csdms --channel $CHANNEL $HOME/miniconda/conda-bld/**/basic-modeling-interface*bz2
echo "Done."
|
<gh_stars>0
/********************************************************************************
Copyright (C) 2013 <NAME> <<EMAIL>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 ... |
#!/bin/bash
#colors vars
LBLUE='\033[1;34m'
LRED='\033[1;31m'
LGREEN='\033[1;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NONE='\033[0m'
PURPLE='\033[1;35m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
#
var=1000
end(){
echo -e "\n${NONE}[${LGREEN}${int}${NONE}] Selected"
read -r -p "$(tput setaf 7)Press Enter t... |
#!/bin/bash
set -euo pipefail
TMP_DIR=$(mktemp -d /tmp/bsp-layout-install.XXXXX);
## Clone to local directory
if [[ ! "$1" == "local" ]]; then
git clone https://github.com/phenax/bsp-layout.git $TMP_DIR;
cd $TMP_DIR;
fi
sudo make install || exit 1;
# Check for dependencies
for dep in bc bspc; do
!(which $dep ... |
#!/usr/bin/env bash
API_KEY=$(node test/end-to-end/commands/get-controller-api-key.js)
echo "CONTROLLER API KEY--------------> ${API_KEY}"
node test/end-to-end/fixtures/${fixture}/server.js --name=${service_name} --hostName=${service_host_name} --port=${service_port} --path=${domapic_path} --controller=http://${cont... |
#!/bin/sh
# ref: http://apr.apache.org/download.cgi?Preferred=http%3A%2F%2Fftp.twaren.net%2FUnix%2FWeb%2Fapache%2F
URL_APR_UTIL='http://ftp.twaren.net/Unix/Web/apache//apr/apr-util-1.6.1.tar.gz'
BASENAME='/usr/bin/basename'
MAKE='/usr/bin/make'
RM='/bin/rm'
SED='/bin/sed'
TAR='/bin/tar'
WGET='/usr/bin/wget'
# ------... |
set -e
source "${BASH_SOURCE%/*}/utils/exists.sh"
found=$(commandExists "git")
if [ "$found" -eq 0 ]; then
echo "git is not available"
exit
else
current="\*"
master="master"
echo "Looking for local merged branches..."
filtered=$(git branch --merged | egrep -v "(^$current|$master)" || true)
... |
cd openwrt/bin/targets/*/*
mkdir ssrp
# plugin list in ../../../packages/mipsel_24kc
pkglist="base/shadowsocksr-libev-alt_*.ipk base/pdnsd-alt_*.ipk base/microsocks_*.ipk base/dns2socks_*.ipk base/shadowsocksr-libev-ssr-local_*.ipk base/simple-obfs_*.ipk base/tcping_*.ipk base/v2ray-plugin_*.ipk base/xray_*.ipk base/t... |
def toUpperCase(str) {
return str.toUpperCase();
}
str = "hello world!";
console.log(toUpperCase(str)); |
<filename>frontend/web/mixer/js/visualizer.js<gh_stars>10-100
// Visualizer stuff here
var analyser1;
var analyserCanvas1;
var rafID = null;
function cancelVisualizerUpdates() {
window.webkitCancelAnimationFrame( rafID );
}
function updateAnalyser( analyserNode, drawContext ) {
var SPACER_WIDTH = 3;
var BA... |
brew --version
brew update
brew list
$ brew install wget |
<filename>src/maltreatment_nlp/patterns.py
import re
hit_pat = r'hit|attack|struck|beat|punch'
_family = (
r'((his|her|their|(pt|patient|client)\W?s?|mom\W?s?|dad\W?s?)\W*)?'
r'((older|younger|elder|bio|biological|adopted|adoptive)\W*)?'
r'((step|ex)\W*)*'
r'('
r'father|dad|brother|bro|mom|mother|s... |
add_lunch_combo aim_kuntao-userdebug
|
<reponame>XiongAmao/webapp-scaffold
/**
* vw 适配方案
* 参考: https://www.j4ml.com/t/27847
*/
const postcssConfig = [
require('postcss-import')(),
/**
* browsersList在package.json中设置即可
*/
require('autoprefixer')(),
/**
* 可以用于绘制固定比例的容器
*/
require('postcss-aspect-ratio-mini')(),
/**
* 解决移动端1px线变粗的问... |
#!/bin/bash
build() {
export INLINE_RUNTIME_CHUNK=false
export GENERATE_SOURCEMAP=false
yarn build
}
build |
<filename>player/src/main/java/fr/unice/polytech/si3/qgl/soyouz/classes/marineland/entities/Reef.java<gh_stars>0
package fr.unice.polytech.si3.qgl.soyouz.classes.marineland.entities;
public class Reef extends ShapedEntity implements Entity, Collidable
{
@Override
public boolean equals(Object obj)
{
... |
<reponame>eshork/go-mongoid
package mongoid
import (
"mongoid/log"
"reflect"
"go.mongodb.org/mongo-driver/bson"
)
// makeDocument creates a new object of type docType, populated with the given srcDoc
func makeDocument(docType *ModelType, srcDoc bson.M) IDocumentBase {
log.Trace("makeDocument()")
typeRef := refl... |
<reponame>warlock2207/warlock
/**
* Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng)
* <p>
* 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
* <p>
* http://www.apa... |
sudo mount -o remount,rw / && sudo sed -i 's/NODE_OPTIONS=--max_old_space_size=512/NODE_OPTIONS=--max_old_space_size=256/g' /lib/systemd/system/nodered.service
sudo systemctl daemon-reload
|
import { getModelForClass, mapProp, prop } from '../../src/typegoose';
export class SideNote {
@prop()
public content: string;
@prop()
public link?: string;
}
enum ProjectValue {
WORKING = 'working',
UNDERDEVELOPMENT = 'underdevelopment',
BROKEN = 'broken'
}
class InternetUser {
@mapProp({ of: Strin... |
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
# Read the data
df = pd.read_csv('customer_reviews.csv')
# Preprocess the data
X = df['review']
y = df['label']
... |
/*
* 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")... |
#!/bin/bash
BASEDIR=$PWD
CPPOPTS="-fPIC -std=c++11 -Wall -I /usr/local/include"
LDOPTS="-L /usr/local/lib"
cd thrift
thrift -gen erl -gen cpp tproxy.thrift
cd $BASEDIR
cd tproxy
if [ -e ./rel/tproxy/bin/tproxy ]; then
./rel/tproxy/bin/tproxy stop
fi
rm -rf rel
mkdir -p rel
./rebar compile
cd rel
../rebar create-nod... |
#!/bin/bash
#
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh
set -e
if [ "$BUILD_LIBCUML" == "1" ]; then
CUDA_REL=${CUDA_VERSION%.*}
export UPLOADFILE=`conda build conda/recipes/libcuml -c conda-forge -c numba -c conda-forge/... |
<gh_stars>0
package util
import (
"encoding/json"
"path/filepath"
"github.com/flosch/pongo2"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
)
var (
inited bool
loader *pongo2.LocalFilesystemLoader
pageSet *pongo2.TemplateSet
)
type TemplateContext map[string]interface{}
func RenderHTMLTemplate... |
#!/usr/bin/env bats
@test "Validate status code for varnish" {
run curl -s -o /dev/null -w "%{http_code}" localhost:6081
[[ $output = "503" ]]
} |
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights res... |
<filename>packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopyButton.test.tsx
import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ClipboardCopyButton } from '../ClipboardCopyButton';
const props = {
id... |
#!/bin/bash
## Bash Script to deploy an F5 ARM template into Azure, using azure cli 1.0 ##
## Example Command: ./deploy_via_bash.sh --adminUsername azureuser --authenticationType password --adminPasswordOrKey <value> --dnsLabel <value> --instanceName f5vm01 --numberOfExternalIps 1 --instanceType Standard_DS3_v2 --imag... |
<filename>application/screens/PostDetails.js
import React, {Component} from 'react';
import { NavigationActions } from 'react-navigation';
import { Container, Header, Content, List, ListItem, Thumbnail, Text, Left, Body, Right, Button, Tab, Tabs } from 'native-base';
import { ImageBackground, Dimensions, View, Touchab... |
<reponame>Doan-NV/realworld
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { Tag } from '../entity/tag.entity';
@Injectable()
export class TagsService {
constructor(
@InjectRepository(Tag)
private readonly tagRepos... |
#!/bin/bash -eux
{
./main runsearchtests models/v53-140-5x64.txt.gz false false 0 false | tee tests/results/runSearchTests-iNCHW-cNCHW.txt
./main runsearchtests models/v53-140-5x64.txt.gz true false 0 false | tee tests/results/runSearchTests-iNHWC-cNCHW.txt
./main runsearchtests models/v53-140-5x64.txt.gz true true 0 f... |
from setuptools import setup
setup(
name='event-bus',
version='1.0.4',
packages=['event_bus'],
url='https://github.com/summer-wu/event-bus',
license='MIT',
author='Your Name',
author_email='your_email@example.com',
description='A simple python event bus.',
download_url='https://gith... |
<reponame>huangbin082/Bin
package com.leetcode;
import org.testng.annotations.Test;
public class Solution_424Test {
@Test
public void testCharacterReplacement() {
Solution_424 solution_424 = new Solution_424();
System.out.println(solution_424.characterReplacement("KRSCDCSONAJNHLBMDQGIFCPEKPOH... |
$(document).ready(function() {
$('.scrollTo').click( function() {
var page = $(this).attr('href');
var speed = 1200;
$('html, body').animate( { scrollTop: $(page).offset().top }, speed );
return false;
});
});
|
# frozen_string_literal: true
require 'test_helper'
require 'fileutils'
require 'find'
require 'shellwords'
class SprocketsRailsTest < Minitest::Test
def test_sprockets_digest_asset_refs
root = 'test/dummy_rails'
compiled = Dir.chdir root do
silence_stderr_if !ENV['VERBOSE'] do
Bundler.with_o... |
<gh_stars>0
import { coerce } from '../bytes.js'
import * as Digest from './digest.js'
export const code = 0x0
export const name = 'identity'
/**
* @param {Uint8Array} input
* @returns {Digest.Digest<typeof code, number>}
*/
export const digest = (input) => Digest.create(code, coerce(input))
/** @type {import('./... |
<reponame>schroedtert/jpsreport-python
import logging
logger = logging.getLogger("JPSreport")
FORMAT = "[%(asctime)s] [%(levelname)s]: %(message)s"
logging.basicConfig(format=FORMAT)
def log_debug(msg, **kwargs):
logger.debug(msg, **kwargs)
def log_info(msg, **kwargs):
logger.info(msg, **kwargs)
def log_... |
DROP TABLE B_IM_CHAT CASCADE CONSTRAINTS
/
DROP TABLE B_IM_MESSAGE CASCADE CONSTRAINTS
/
DROP TABLE B_IM_RELATION CASCADE CONSTRAINTS
/
DROP TABLE B_IM_RECENT CASCADE CONSTRAINTS
/
DROP SEQUENCE SQ_B_IM_CHAT
/
DROP SEQUENCE SQ_B_IM_MESSAGE
/
DROP SEQUENCE SQ_B_IM_RELATION
/
DROP SEQUENCE SQ_B_IM_RECENT
/ |
from tqdm import tqdm
def apply_with_progress_bar(desc=None):
def decorator(key_func):
def func_wrapper(iterable):
pbar = tqdm(total=len(iterable), desc=desc)
for obj in iterable:
pbar.update()
key_func(obj)
pbar.close()
return fu... |
#!/usr/bin/env bats
load helpers
function setup() {
teardown_busybox
setup_busybox
}
function teardown() {
teardown_busybox
}
@test "events --stats" {
# run busybox detached
runc run -d --console /dev/pts/ptmx test_busybox
[ "$status" -eq 0 ]
# check state
wait_for_container 15 1 test_busybox
# ... |
#!/bin/bash
## config
iofilename=${1:-"met_vs_time.root"}
xbin_boundary=${2:-"3"}
ybin_boundary=${3:-"200"}
blind_data=${4:-1}
signif_dump=${5:-"tmp_dump.txt"}
## run macro
root -l -b -q dumpSignificanceABCD.C\(\"${iofilename}\",\"${xbin_boundary}\",\"${ybin_boundary}\",${blind_data},\"${signif_dump}\"\)
## Final me... |
SELECT salaries.salary
FROM salaries
ORDER BY salaries.salary DESC
LIMIT 3; |
#!/usr/bin/env bash
set -e
scriptdir=$(dirname ${BASH_SOURCE[0]})
pushd "$scriptdir"
mkdir -p ../ios/Exponent/Generated/
node_modules/.bin/gulp generate-dynamic-macros --platform ios --buildConstantsPath ../ios/Exponent/Supporting/EXBuildConstants.plist --infoPlistPath ../ios/Exponent/Supporting --expoKitPath ..
nod... |
<gh_stars>1-10
import request from '@/utils/request'
// 获取购物车列表
export function huoQuGouWuCheList(query) {
return request({
url: '/cart/list',
method: 'get',
params:query
})
}
// 移出购物车
export function yiChuGouWuChe(query) {
return request({
url: '/cart/del?cartId='+query.cartId,
method: 'ge... |
export JAVA_HOME=${JAVA_HOME:-/c/jdk}
export PATH=${JAVA_HOME}/bin:${PATH}
choco install jdk8 -params 'installdir=c:\\jdk' -y |
class AccountsController < ApplicationController
respond_to :html
before_action :prepare
def prepare
if params[:budget_id]
@budget = current_user.budgets.where(id: params[:budget_id]).first
add_crumb 'Budgets', budgets_path
add_crumb @budget.name, budget_path(@budget)
add_crumb 'Accou... |
package com.sach.reflections.service;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
public class DiFactory {
private Map<String, Object> beans;
public DiFactory(URL url) throws Exception {
beans = new HashMap<>... |
#!/bin/bash
# This script reapplies an GCC header fix to the limits.h header so that the fixed header
# recurse down to the real libc limits.h.
#
# This script is needed because the code, in the GCC code base, that applies this patch
# checks for a already-installed libc installed limits.h header, but due to the order... |
<gh_stars>0
package de.patrick246.dhbw.cg.learnopengl.renderable;
import de.patrick246.dhbw.cg.learnopengl.Material;
import de.patrick246.dhbw.cg.learnopengl.RenderPass;
import de.patrick246.dhbw.cg.learnopengl.opengl.Shader;
import de.patrick246.dhbw.cg.learnopengl.opengl.Vao;
import org.joml.Matrix4f;
import org.jom... |
# rpm fusion
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo rpm --import https://raw.githubusercontent.com/UnitedRPMs/unitedrpms/m... |
module.exports = function(config){
config.set({
basePath : './',
files : [
'public/bower_components/angular/angular.js',
'public/bower_components/angular-route/angular-route.js',
'public/bower_components/angular-sanitize/angular-sanitize.js',
'public/bower_components/angular... |
function fibonacci(n) {
if (n <= 1) return n;
let fnMinus2 = 0;
let fnMinus1 = 1;
let fn = 1;
for (let i = 2; i <= n; i++) {
fn = fnMinus2 + fnMinus1;
fnMinus2 = fnMinus1;
fnMinus1 = fn;
}
return fn;
} |
#!/bin/bash
parent_path=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd -P)
cd "${parent_path}"
EXPERIMENTS_DIR="./experiments"
mkdir -p ${EXPERIMENTS_DIR}
FEATURES_DIR="./data/features/"
mkdir -p ${FEATURES_DIR}
LYMPH_DATA="./data/lymphography.data"
LYMPH_DATA_FEATURES="${FEATURES_DIR}/lymphography.data.features"
declare... |
#! /bin/bash
bucket=_replace_with_your_bucket_name_
for file in od4es.json network.json seed.json data-nodes.json master-nodes.json client-nodes.json; do
echo "Sending $file"
aws s3 rm s3://$bucket/$file
aws s3 cp $file s3://$bucket/$file
done |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
#!/bin/bash
# Abort if an error is encountered or on undefined variables
set -eu
# Download MIRP sources
git clone https://github.com/MolSSI/MIRP.git
# Build dependencies in a separate directory
mkdir mirp_deps
cd mirp_deps
bash ../MIRP/build_scripts/build_deps.sh native
cd ../
# mirp_deps directory should now con... |
var _;
_ = Int16Array.length;
_ = Int16Array.name;
_ = Int16Array.prototype;
_ = Int16Array.BYTES_PER_ELEMENT;
|
/* eslint arrow-body-style: ["error", "as-needed"] */
import { sykepengesoknadstatuser } from '@navikt/digisyfo-npm';
import { selectSoknaderData } from '../../../sykepengesoknad/data/soknader/soknaderSelectors';
const { NY, FREMTIDIG } = sykepengesoknadstatuser;
const selectSlice = state => state.sykepengesoknader;
... |
<gh_stars>0
module DashboardHelper
# Take the hash necessary for the line graph and replace 200 with 'Successful'
# and anything else with 'Failed' and return newly constructed hash
def sanitise_hash_for_line_graph(hash)
new_hash = {}
hash.map { |k,v|
n = k[0] == 200 ? 'Successful' : 'Failed'
... |
#!/usr/bin/env bash
DEBIAN_FRONTEND=noninteractive apt-get -q -y install zfsutils-linux
/sbin/modprobe zfs
zpool create -f subutai /dev/mapper/main-zfs
zfs create -o mountpoint="/var/lib/lxc" subutai/fs
zpool set autoexpand=on subutai
DEBIAN_FRONTEND=noninteractive apt-get -q -y install lxc dirmngr
apt-key adv -... |
#!/usr/bin/env python3
import os
import sys
import numpy as np
from .tagcode import tagcode_to_unicode
def samples_from_gnt(f):
header_size = 10
# read samples from f until no bytes remaining
while True:
header = np.fromfile(f, dtype='uint8', count=header_size)
if not header.size: break... |
#!/bin/csh
set EQ = $1
set DATADIR = $2
set PLOTDIR = $3
set C_DIR = $4
set SHELL_DIR = $5
set PHASE = $6
set work_dir = $DATADIR/${EQ}
set SRCDIR = $SHELL_DIR
set script_name = c01.preprocess_of_${PHASE}_for_$EQ
echo "---> preprocess for EWF for $EQ PHASE:$PHASE "
set INFILE = $work_dir/INFILE_${PHASE}
set event_... |
#!/usr/bin/env bash
cd $GITHUB_WORKSPACE
COMMIT_ID=$(cat $GITHUB_EVENT_PATH | jq -r '.pull_request.head.sha')
echo "COMMIT ID: $COMMIT_ID"
PR_BODY=$(cat "$GITHUB_EVENT_PATH" | jq -r .pull_request.body)
if [[ "$PR_BODY" == *"[do-not-scan]"* ]]; then
echo "[do-not-scan] found in PR description. Skipping PHPCS scan.... |
#!/bin/bash
source etc/hosts.cfg
for var in $(grep -o "HOSTS_.*=" etc/hosts.cfg|sed 's/=//g'); do
eval qtd="\${#${var}[@]}"
for((i=0;$i<${qtd};i++)); do
eval echo \${${var}[$i]}
done
done
|
from .CFactory import CFactory
from .CNetwork import CNetwork |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.superscript2 = void 0;
var superscript2 = {
"viewBox": "0 0 16 16",
"children": [{
"name": "path",
"attribs": {
"fill": "#000000",
"d": "M3.032 13l0.9-3h4.137l0.9 3h1.775l-3-10h-3.488l-3 10h1.776zM5.432 5h1.1... |
class Location < ActiveRecord::Base
has_many :variants, inverse_of: :location
#attempt to cast both chromosomes to integers
#if either fails, that's the later chromosome as it wasn't a number
#otherwise compare int to into or string to string
#if still even, compare starting locations
def <=>(other)
cm... |
#!/bin/bash
# (c) Artur.Klauser@computer.org
#
# This script installs support for building multi-architecture docker images
# with docker buildx on CI/CD pipelines like Github Actions or Travis. It is
# assumed that you start of with a fresh VM every time you run this and have to
# install everything necessary to suppo... |
#! /usr/bin/env bats
#
# Author: Bert Van Vreckem <bert.vanvreckem@gmail.com>
#
# Test a Vsftpd server
#
# Variables
#
sut_ip=172.16.0.11 # IP of the System Under Test
admin_user=hilmi # User with admin privileges
admin_password=hilmiemrebayat
testfile="tst${RANDOM}"
# Useful return codes
# FTP
ftp_pathname... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.