text stringlengths 1 1.05M |
|---|
from typing import List
def calculate_coverage_percentage(coverage_info: List[str]) -> float:
total_lines = len(coverage_info)
covered_lines = sum(1 for line in coverage_info if line.strip() and line.strip() != "#####")
coverage_percentage = (covered_lines / total_lines) * 100
return coverage_percentag... |
# frozen_string_literal: true
# Copyright 2021 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 applicabl... |
<filename>local/in/dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/api/DefaultMobileImportService.java
/*
* Copyright (c) 2004-2007, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the fo... |
module.exports = (sequelize, DataTypes) => {
const accountCode = sequelize.define('accountCode', {
accountCodeId: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
schemeCodeId: DataTypes.INTEGER,
lineDescription: DataTypes.STRING,
accountCodeAP: DataTypes.STRING,
accountCodeAR: ... |
<reponame>Polidea/SiriusObfuscator
//===-- CompilerDecl.h ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------... |
<reponame>gdnwxf/netty_stu
package org.xtwy.oldthriftrpc;
import org.apache.thrift.TProcessor;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TSimpleServer;
import org.apache.thrift.server.TThreadPoolServer;
import org.apache.thrift.transport... |
<filename>internal/testdata/lang_ru_decimal_float64.go
package testdata
//nolint:gochecknoglobals
// тесты для женского рода
var TestCaseLangRUDecimalFloat64GenderFemale = map[float64]string{
0.001: "ноль целых одна тысячная",
2.2: "две целых две десятых",
3.002: "три целых две тысячных",
... |
export class UpdateUserSeatPreference
{
sessionid : string;
seatcodes : string;
} |
<reponame>rrinat/CustomizableCalendar<gh_stars>100-1000
package com.molo17.customizablecalendar.library.presenter.interfeaces;
import com.molo17.customizablecalendar.library.interactors.ViewInjector;
import com.molo17.customizablecalendar.library.view.CustomizableCalendarView;
import java.util.List;
/**
* Created b... |
<reponame>tuckerbeauchamp/whatToWatch
export const ADD_FAVORITE = "ADD_FAVORITE";
export const REMOVE_FAVORITE = "REMOVE_FAVORITE";
|
package io.github.vampirestudios.obsidian.addon_modules;
import io.github.vampirestudios.obsidian.Obsidian;
import io.github.vampirestudios.obsidian.api.obsidian.AddonModule;
import io.github.vampirestudios.obsidian.api.obsidian.EntityModel;
import io.github.vampirestudios.obsidian.configPack.ObsidianAddon;
import io.... |
#!/usr/bin/env bash
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2020-12-04 17:10:48 +0000 (Fri, 04 Dec 2020)
#
# https://github.com/HariSekhon/bash-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally sen... |
<filename>ProxySever/src/main/java/com/efei/proxy/ProxyTransmitServer.java
package com.efei.proxy;
import com.Server;
import com.efei.proxy.channelHandler.HeartBeatServerHandler;
import com.efei.proxy.channelHandler.LoginChannelHandler;
import com.efei.proxy.channelHandler.ProxyReponseDataHandler;
import com.efei.prox... |
/*
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the License.
This program is distributed in the... |
<filename>libgraph/auxiliary.hh
#pragma once
#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <sstream>
#include <assert.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef int node_t;
typedef vector< vector<node_t> > neighbours_t;
typedef vect... |
def generateLinkedList(n):
head = Node(0)
prev = head
for i in range(1, n + 1):
node = Node(i)
prev.next = node
prev = node
return head |
<reponame>michaelsabo/DeviceAgent.iOS<filename>Server/PrivateHeaders/XCTAutomationSupport/XCTElementSortingTransformer.h<gh_stars>0
// class-dump results processed by bin/class-dump/dump.rb
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jul 30 2018 09:07:48).
//
// class-dump is Copyright (C... |
#!/bin/bash
if grep -q "^net.ipv4.ip_local_port_range" /etc/sysctl.conf; then
sed -i "s/^net.ipv4.ip_local_port_range.*/net.ipv4.ip_local_port_range = 34555 36888/" /etc/sysctl.conf
else
echo "net.ipv4.ip_local_port_range = 34555 36888" >> /etc/sysctl.conf
fi
sysctl -w net.ipv4.ip_local_port_range="34555 36888"
|
<filename>main.py
if __name__ == "__main__":
import pyfbx
print(dir(pyfbx)) |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
long sign_extend(long data, int width){
int shift = sizeof(long) * 8 - width;
return data << shift >> shift;
}
long sign_extend_safe(long data, int width){
if(width > 64 || width < 0){
exit(-1);
}
if(width == 64){
return data;
}
if((data >> (wid... |
import java.util.Random;
// Impose and apply a global ordering of picking up forks: N-1, ..., 2, 1, 0 to ensure that none of the
// philosophers will try to grab the same forks with the same hands
public class DiningPhilFixed1 {
private static int N = 5;
public static void main(String[] args) throws Exception... |
<reponame>tenebrousedge/ruby-packer
require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/common', __FILE__)
require File.expand_path('../closed', __FILE__)
describe :dir_path, shared: true do
it "returns the path that was supplied to .new or .open" do
dir = Dir.o... |
#!/bin/bash
#
# Candy Machine CLI - Automated Test
#
# To suppress prompts, you will need to set/export the following variables:
#
# ENV_URL="mainnet-beta"
# RPC="https://ssc-dao.genesysgo.net/"
# STORAGE="arweave-sol"
#
# ENV_URL="devnet"
# RPC="https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/"
# STORAGE="arweave"
#... |
package hackernews
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"strconv"
"time"
)
const (
baseURI = "https://hacker-news.firebaseio.com"
apiVersion = "v0"
defaultTimeout = 15 * time.Second
)
// New creates a new hackernews client using the given http client
// If no http clien... |
<filename>src/types.cpp
#include <string>
#include <math.h>
#include <iostream>
using namespace std;
#include "../include/node.h"
#include "../include/variables.hpp"
#include "../include/types.h"
#include "../include/usefull.h"
#include "../include/conversion.h"
#include "../include/types_check.h"
bool explicit_vari... |
<reponame>ibelem/wasm
#include<stdio.h>
int add(int a, int b){
return a + b;
}
int main()
{
printf("%d",add(1, 2));
} |
#include <iostream>
// Define a sample class for testing the SmartPointer
class Sample {
public:
void display() {
std::cout << "Sample class display function" << std::endl;
}
};
int main() {
// Create a raw pointer to a Sample object
Sample* rawPtr = new Sample();
// Create a SmartPointer... |
pub trait ConfigSetting {
const KEY: &'static str;
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct TmpPathDefaultSetting;
impl ConfigSetting for TmpPathDefaultSetting {
const KEY: &'static str = "tmp.path";
} |
#!/bin/bash
python setup.py sdist bdist_wheel
twine upload dist/*
|
<reponame>schinmayee/nimbus
//#####################################################################
// Copyright 2002-2006, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//##########... |
package main
import (
"fmt"
)
func isPalindrome(n int) bool {
var str []int
for n != 0 {
str = append(str, n%10)
n /= 10
}
for i, j := 0, len(str)-1; i < j; i, j = i+1, j-1 {
if str[i] != str[j] {
return false
}
}
return true
}
func biggestN(n int) int {
ret := 1
for i := 0; i < n; i++ {
ret *=... |
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
sh_ver="1.0.26"
filepath=$(cd "$(dirname "$0")"; pwd)
file=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
ssr_folder="/usr/local/shadowsocksr"
config_file="${ssr_folder}/config.json"
config_user_file="${ssr_folder}/user-... |
const graphql = require(`graphql`);
const { User, Topic, UserGroup, UserEvent, UserTopic } = require(`../db/models/index`);
const {
GraphQLObjectType, GraphQLSchema, GraphQLString, GraphQLID, GraphQLInt, GraphQLList
} = graphql;
const { UserType, UserTopicType, TopicType, GroupType, EventType } = require(`./types.j... |
<script>
// Set the dimensions of the canvas / graph
var margin = {top: 30, right: 20, bottom: 30, left: 50},
width = 600 - margin.left - margin.right,
height = 270 - margin.top - margin.bottom;
// Parse the data
var data = d3.csv.parse(`
Category,Value
X,200
Y,100
Z,50
`);
// Set the ranges
var x = d3.scale.ordin... |
package serenitylabs.tutorials.trains.search;
import java.time.LocalDate;
public enum DepartureDay {
today(0), tomorrow(1);
private int daysFromToday;
DepartureDay(int daysFromToday) {
this.daysFromToday = daysFromToday;
}
public int daysFromToday() {
return daysFromToday;
}... |
package com.bjdvt.platform.mapper;
import com.bjdvt.platform.model.PageGroup;
import com.bjdvt.platform.model.PageGroupExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PageGroupMapper {
int countByExample(PageGroupExample example);
int deleteByExample(PageGroupExam... |
package collections
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestValidateNameSearchInput(t *testing.T) {
Convey("ValidateNameSearchInput returns nil error for valid values", t, func() {
So(ValidateNameSearchInput(""), ShouldBeNil)
So(ValidateNameSearchInput("collection123"), Sho... |
from collections import deque
# Create weight matrix
W = [[0, 3, 2, 5, 0],
[3, 0, 2, 1, 2],
[2, 2, 0, 5, 2],
[5, 1, 5, 0, 4],
[0, 2, 2, 4, 0],
]
# start point
start = (2, 3)
# end point
destination = (5, 1)
# Number of Rows and Columns in W
rows = len(W)
cols = len(W[0])
# Create reached matrix to keep track of... |
(function () {
'use strict';
ApplicationConfiguration.registerModule('applicants'); // jshint ignore:line
})();
|
#!/bin/sh
set -eu
SRC=$GOPATH/src/github.com/weaveworks/go-checkpoint
# Mount the checkpoint repo:
# -v $(pwd):/go/src/github.com/weaveworks/checkpoint
# If we run make directly, any files created on the bind mount
# will have awkward ownership. So we switch to a user with the
# same user and group IDs as source ... |
A possible algorithm for searching for a pattern in a large text is to use the Boyer-Moore string search algorithm. This algorithm pre-processes the pattern and uses skip tables to efficiently search the text for a matching pattern. The algorithm uses the fact that when a mismatch occurs, the algorithm can skip positio... |
import React, { Component } from 'react'
import {InstantSearch,SearchBox,Hits} from 'react-instantsearch-dom';
import algoliasearch from 'algoliasearch';
const searchClient = algoliasearch(
'RWLA5PBM7X',
'fdd07da28a21136346512bb234e09fd9'
);
const hit = (props) => {
const {hit} = props;
console.log(pro... |
<filename>ods-main/src/main/java/cn/stylefeng/guns/onlineaccess/modular/entity/ProjectUser.java
package cn.stylefeng.guns.onlineaccess.modular.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lomb... |
#!/bin/bash
# $1 = test_name
# $2 = filename pattern for tested source files
function run_test {
set -e
if [[ ! -f test-coverage/coverage_$1_full ]]; then
cd test
B2_ARGS='sanitize=off asserts=off invariant-checks=off link=static deprecated-functions=off debug-iterators=off test-coverage=on picker-debugging=off... |
SELECT Title, Rating
FROM Books
ORDER BY Rating DESC
LIMIT 5; |
#!/usr/bin/env bash
export PGCERT=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURIVENDQWdXZ0F3SUJBZ0lVTDVnNnQxSG1OT3Q4T09xVVd5dVFaZVdzclVBd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0hqRWNNQm9HQTFVRUF3d1RTVUpOSUVOc2IzVmtJRVJoZEdGaVlYTmxjekFlRncweE9ERXhNakV4TVRRMwpNamRhRncweU9ERXhNVGd4TVRRM01qZGFNQjR4SERBYUJnTlZCQU1NRTBsQ1RTQkRiRzkxWkNCRV... |
require 'hyrax/preservation/service_environment'
namespace :services do
task :start, [:env] do |t, args|
env = args[:env] || 'development'
Hyrax::Preservation::ServiceEnvironment.new(env).start
end
end
|
require File.dirname(__FILE__) + '/../spec_helper'
def chfsize(cfg = {})
Eye::Checker.create(nil, {:type => :fsize, :every => 5.seconds,
:file => $logger_path, :times => 1}.merge(cfg))
end
describe "Eye::Checker::FileSize" do
describe "" do
subject{ chfsize }
it "get_value" do
subject.get_... |
<reponame>Divlo/programming-challenges
import readline from 'node:readline'
const numbers = []
const readlineInterface = readline.createInterface({
input: process.stdin,
output: process.stdout
})
readlineInterface.on('line', (value) => {
numbers.push(Number(value))
})
readlineInterface.on('close', solution)
fun... |
#!/bin/bash
#generate the version info from git
scripts/version.sh
#generate the grpc protobuffer file
#(cd grpc && make clean && make)
#(cd pushd && make clean && make)
#run go test first
#go test ./...
#build the pushd & connd
if [ "$1" = "pushd" ] || [ $# = 0 ]; then
echo building pushd/pushd
(cd push/bi... |
<reponame>effie-ms/eeflows
import React from 'react';
import PropTypes from 'prop-types';
export const SVGElementTimeSeriesType = ({ stroke, fill }) => (
<svg
className="recharts-surface"
width={20}
height={20}
viewBox="0 0 40 40"
version="1.1"
style={{
d... |
package com.example.batchforscience.aspect;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class PointCutDeclarations {
@Pointcut("execution(* com.example.batchforscience.listener.JobCompletionListener.beforeJob(*))")
public void beforeJob() {
}
@Point... |
module.exports = {
name: "ctopic",
description: "Update the channel topic",
category: "admin",
botPermissions: ["MANAGE_CHANNELS"],
memberPermissions: ["MANAGE_CHANNELS"],
async execute(bot, message, args) {
const lang = await bot.getGuildLang(message.guild.id);
let channel = message.mentions.channe... |
<gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AffectationsPartiellesDirecteur_component_1 = require("./AffectationsPartiellesDirecteur/AffectationsPartiellesDirecteur.component");
var List_PersonnelsDirecteur_component_1 = require("./List-PersonnelsDirecteur/List-Personnel... |
<filename>common/types_test.go
// Copyright 2020 Condensat Tech. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package common
import (
"testing"
)
func TestIssuanceInfo_IsValid_Mode(t *testing.T) {
t.Parallel()
type fields struct {
Mode ... |
<reponame>Prajwal-ctrl/30DaysOfJavaScript
function talk(){
var know = {
"Who are you" : "Hello, I am special bot for 30 Days of JavaScript",
"How are you" : "Good :)",
"What can I do for you" : "Please star this repository",
"How do I contribute" : "Please read Readme",
"ok" : "... |
import ctypes as ct
def simulate_bulk_transfer(handle, endpoint_in, buffer, READ_CAPACITY_LENGTH):
def err_exit(error_code):
# Placeholder for error handling logic
return f"Error: {error_code}"
size = ct.c_int()
r = usb.bulk_transfer(handle, endpoint_in, ct.cast(ct.pointer(buffer), ct.POIN... |
<filename>models/tasks.py
# -*- coding: utf-8 -*-
# =============================================================================
# Tasks to be callable async
# =============================================================================
tasks = {}
# -----------------------------------------------------------------... |
const pubsub = require('pubsub-js');
const muteStatus = new Map();
function registerModule(brunchModule) {
muteStatus.set(brunchModule.id, false);
}
function deregisterModules() {
muteStatus.clear();
}
function isMuted(brunchModule) {
return muteStatus.get(brunchModule.id);
}
function publish(brunchModule, t... |
<filename>code/iaas/model/src/main/java/io/cattle/platform/core/constants/InstanceLinkConstants.java
package io.cattle.platform.core.constants;
public class InstanceLinkConstants {
public static final String FIELD_INSTANCE_ID = "instanceId";
public static final String FIELD_PORTS = "ports";
public static ... |
const Page = require("./page");
/**
* sub page containing specific selectors and methods for a specific page
*/
class Menu extends Page {
/**
* define selectors using getter methods
*/
get menu() {
return $(".global-menu")
}
get authButton(){
return $(".login")
}
/**
* a... |
<reponame>pnkfb9/gem5_priority
/*
* Copyright (c) 2010-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a ... |
<reponame>MccreeFei/jframe
/**
*
*/
package jframe.pushy;
/**
* @author dzh
* @date Aug 29, 2015 2:18:51 PM
* @since 1.0
*/
public interface Fields {
public static final String KEY_IOS_AUTH = "ios.auth";
public static final String KEY_IOS_PASSWORD = "<PASSWORD>";
public static final String KEY_HOST = "host"... |
#!/bin/bash
# Filename:- gp_bash_functions.sh
# Status:- Released
# Author:- G L Coombe (Greenplum)
# Contact:- gcoombe@greenplum.com
# Release date:- March 2006
# Release stat:- Greenplum Internal
# Copyright (c) Metapa 2005. All Rights Reserved.
# Copy... |
import { SPIRType } from "../../common/SPIRType";
export class TextureFunctionBaseArguments
{
img: VariableID = 0;
imgtype: SPIRType;
is_fetch: boolean = false;
is_gather: boolean = false;
is_proj: boolean = false;
}
export class TextureFunctionNameArguments
{
// GCC 4.8 workarounds, it doesn'... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_flight_land_twotone = void 0;
var ic_flight_land_twotone = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0V0z",
"fill": "none"
},
"children": []
}, {
... |
#! /bin/bash
source ./version
docker push $IMAGE:$VERSION
|
#!/bin/bash
#sudo apt update
#sudo apt upgrade
#sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils
make clean
#make depend
CC='cc -fPIC' ./config --prefix=/usr/local/openssl1.0 --openssldir=/usr/local/openssl1.0/openssl -static no-shared enable-ec_nistp_64_gcc_128
make -j4
... |
function generateAdminPanelPage($header, $content, $email) {
$adminPanelPage = '</head>' . PHP_EOL;
$adminPanelPage .= '<body>' . PHP_EOL;
$adminPanelPage .= '<div id="layout">' . PHP_EOL;
$adminPanelPage .= $header . PHP_EOL;
$adminPanelPage .= $content . PHP_EOL;
$adminPanelPage .= '<div id="b... |
<reponame>yangx14488/mcmod_grave
package net.atcat.nanzhi.grave.com.item;
import net.atcat.nanzhi.grave.grave;
import net.minecraft.block.Block;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;... |
package prospector.routiduct;
public class RoutiductConstants {
public static final String MOD_NAME = "Routiduct";
public static final String MOD_ID = "routiduct";
public static final String PREFIX = "routiduct:";
public static final String MOD_VERSION = "@version@";
public static final String MINECRAFT_VERSIONS ... |
<filename>admin/vue2/element-admin-v3/node_modules/@antv/g2/esm/util/transform.js
import { ext } from '@antv/matrix-util';
var transform = ext.transform;
export { transform };
/**
* 对元素进行平移操作。
* @param element 进行变换的元素
* @param x x 方向位移
* @param y y 方向位移
*/
export function translate(element, x, y) {
var matrix ... |
module.exports = {
rootDir: "../",
testPathIgnorePatterns: ["node_modules", "config"],
transformIgnorePatterns: ["node_modules"],
setupFilesAfterEnv: ["<rootDir>/config/enzyme-conf.js"],
transform: { "^.+\\.js$": "<rootDir>/node_modules/babel-jest" },
automock: false,
collectCoverage: true,
collectCover... |
package org.bf2.cos.fleetshard.support.resources;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import org.bf2.cos.fleetshard.api.ResourceRef;
import org.bson.types.ObjectId;
import io.fabric8.kubernetes.api.Pluralize;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.k... |
package com.oven.vo;
import lombok.Data;
@Data
public class Article {
private Integer id;
private String author;
private String content;
}
|
#!/usr/bin/env bash
source /secrets.sh
ENVIRONMENT=run
if [[ $# -lt 2 ]]; then
echo usage: osism-$ENVIRONMENT ENVIRONMENT SERVICE [...]
exit 1
fi
environment=$1
shift
service=$1
shift
ANSIBLE_DIRECTORY=/ansible
CONFIGURATION_DIRECTORY=/opt/configuration
ENVIRONMENTS_DIRECTORY=$CONFIGURATION_DIRECTORY/envi... |
import { CoaError } from 'coa-error'
import { $, axios, Axios, _ } from 'coa-helper'
import { RedisCache } from 'coa-redis'
const BaseURL = 'https://apis.map.qq.com/ws'
export class CoaTencentLbsBin {
key: string
redisCache: RedisCache
cacheNsp = 'tencent-lbs'
constructor(key: string, redisCache: RedisCache)... |
#! /bin/sh
URI='http://docs.tms.tribune.com/tech/xml/schemas/tmsxtvd.xsd'
PREFIX='tmstvd'
rm -rf raw
mkdir -p raw
touch raw/__init__.py
pyxbgen \
-m "${PREFIX}" \
-u "${URI}" \
-r
if [ ! -f ${PREFIX}.py ] ; then
echo "from raw.${PREFIX} import *" > ${PREFIX}.py
fi
if [ ! -f tmsdatadirect_sample.xml ] ; th... |
#!/bin/sh
source database.conf
psql -U postgres -d $WASHING_SCHEDULER_DATABASE -f 'src/test/sql/populate.sql'
|
/*
* Copyright 2015 Textocat
*
* 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 la... |
<reponame>havocp/hwf<gh_stars>1-10
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file exc... |
<reponame>Sherlock92/greentop
/**
* Copyright 2017 <NAME>. Distributed under the MIT license.
*/
#include "greentop/sport/SetExposureLimitForMarketGroupResponse.h"
namespace greentop {
namespace sport {
SetExposureLimitForMarketGroupResponse::SetExposureLimitForMarketGroupResponse() {
}
SetExposureLimitForMarket... |
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';
import thunk from 'redux-thunk';
import articleList from './articleList';
import replyList from './replyList';
import articleDetail from './articleDetail';
import repl... |
<gh_stars>0
export { default as CONTACT } from './Contact';
export { default as EMAIL } from './Email';
export { default as NOTIFICATION } from './Notification';
export { default as SMS } from './Sms';
export { default as STORY_CHOICE } from './StoryChoice';
export { default as STORY_SCRIPT } from './StoryScript';
expo... |
<reponame>gcusnieux/jooby
package org.jooby.issues;
import org.jooby.test.ServerFeature;
import org.junit.Test;
public class Issue946 extends ServerFeature {
{
path("/946/api/some", () -> {
path("/:id", () -> {
get(req -> req.param("id").value());
get("/enabled", req -> req.param("id").v... |
#!/bin/bash
#$ -M dschiavazzi@nd.edu
#$ -m abe
#$ -pe smp 24
#$ -q long
#$ -N mri_rec
module load python/3.7.3
# Limit numpy to a single thread
export MKL_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OMP_NUM_THREADS=1
# Set Parameters
# Set Folders
KSPACEDIR="../"
RECDIR="./"
PATTERNDIR="../"
# Set Running P... |
public class Main {
public static void main(String[] args) {
String s = "abc";
for (int i = 0; i < s.length(); i++) {
for (int j = i; j < s.length(); j++) {
for (int k = j; k < s.length(); k++) {
System.out.println(s.charAt(i) + "" + s.charAt(j) + "" + s.charAt(k));
}
}
}
}
} |
function flattenMenu($menu) {
$flattenedMenu = array();
foreach ($menu as $key => $value) {
if (is_array($value)) {
$flattenedMenu = array_merge($flattenedMenu, flattenMenu($value));
} else {
$flattenedMenu[] = array("title" => $value["title"], "icon" => $value["icon"]);... |
// Tencent is pleased to support the open source community by making LuaPanda available.
// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of th... |
#!/bin/bash
cd ~/tsystem
apt=`command -v apt`
if [ "`uname`" != "Darwin" -a "$apt" != "" ]; then
./bin/add-apt-repo.sh
fi
./bin/package-install.sh
cd migration
files=($(ls))
for f in "${files[@]}"
do
if [ "`cat ../migrated.txt | grep $f`" = "" ]; then
echo "execute $f"
bash $f
echo $f >> ../migrate... |
import { SvgTemplates } from '../html-templates';
import AbstractView from './abstract-view';
const getTemplate = () => {
return `<div class="app-modals__profile-params-dialog">
<div class="app-modals__profile-params-dialog-controls">
<span id="profile-params-dialog-close" class="app-moda... |
<reponame>weily22/react_hooks
import UseEffectDemo from './UseEffectDemo';
import './UseEffectDemo.scss';
export default UseEffectDemo;
|
//Function to pre-populate selectors with values of existing
//row data on update page.
function attributeSelected(attribute, selected){
var selector = document.getElementById(attribute);
if(selected === null){
selector.value = 'null';
}
else{
selector.value = selected;
}
}; |
#!/bin/bash
function download_from_google_drive() {
COOKIE_FILE=$(mktemp)
CONFIRM_ID=$(curl -c $COOKIE_FILE -s -L "https://drive.google.com/uc?export=download&id=$2" | grep confirm | sed -e "s/^.*confirm=\(.*\)&id=.*$/\1/")
curl -b $COOKIE_FILE -L -o $1 "https://drive.google.com/uc?confirm=${CONFIRM_I... |
require 'hydra/file_characterization/exceptions'
require 'open3'
require 'active_support/core_ext/class/attribute'
module Hydra::FileCharacterization
class Characterizer
include Open3
class_attribute :tool_path
attr_reader :filename
def initialize(filename, tool_path = nil)
@filename = filena... |
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2021 <NAME> - www.xs-labs.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
... |
#!/usr/bin/env bash
# This script connects a node to mainnet
ROOT="$(realpath "$(dirname "$0")/../..")"
configuration="${ROOT}/configuration/cardano"
data_dir=mainnetsingle
mkdir -p "${data_dir}"
db_dir="${data_dir}/db/node"
mkdir -p "${db_dir}"
socket_dir="${data_dir}/socket"
mkdir -p "${socket_dir}"
# Launch a no... |
import java.util.*;
public class PrimeNumber {
public static void main(String[] args) {
int num = 6;
System.out.println("List of prime numbers till "+num+ " : ");
printPrimeNumbers(num);
}
public static void printPrimeNumbers(int num){
for (int i=2; i<=num; i++){
if(isPrime(i))
System.out.print(i+... |
<gh_stars>1-10
/*
* JCY
* 07/2007
* Derived Datatype functions for mpi-serial
*/
#include "type.h"
#include "mpiP.h"
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*
* NOTES: All MPI_ prefixed (public) functions operate
* using the integer handle for... |
import { requestsReducer } from 'redux-saga-requests';
import { AppState } from '../states';
import { createSelector } from 'reselect';
import GitUser from '../../models/GitUser';
import { FetchedData } from '../../models/FetchedData';
import { FetchActions } from '../actions/fetchActions';
// Reducer
export const gi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.