text stringlengths 1 1.05M |
|---|
<reponame>nagalun/guimachi
#include "varints.hpp"
#include <string>
#include <stdexcept>
#include <algorithm>
u64 decodeUnsignedVarint(const u8 * const data, sz_t &decodedBytes, sz_t maxBytes) {
sz_t i = 0;
u64 decoded_value = 0;
sz_t shift_amount = 0;
do {
if (maxBytes-- == 0) {
throw std::length_error("Va... |
#!/bin/bash
source @sub_PREFIXDIR@/etc/extrae.sh
export EXTRAE_CONFIG_FILE=./extrae.xml
export LD_PRELOAD=${EXTRAE_HOME}/lib/libcudampitrace.so
#export LD_PRELOAD=${EXTRAE_HOME}/lib/libcudampitracef.so
export PYTHONPATH=@sub_PREFIXDIR@/libexec:$PYTHONPATH
## Run the desired program
$*
|
class SmokeTestsController < ApplicationController
before_filter :authorize, :except => [:index, :show]
layout "default", :only => :index
SMOKE_TESTS_OBJ_INCLUDES = [
:package_builders,
:config_modules
]
# GET /smoke_tests
# GET /smoke_tests.json
# GET /smoke_tests.xml
def index
@smoke_te... |
<reponame>akiyoshitomita/terraform-provider-velocloud<filename>velocloud/vcoclient/model_enterprise.go
package vcoclient
import (
"time"
)
type Enterprise struct {
Id int32 `json:"id,omitempty"`
Created time.Time `json:"created,omitempty"`
NetworkId int32 `json... |
<gh_stars>0
function valida_vacios(ids,mensajes)
{
var error=true;
$.each( ids, function( i, val ) {
$(val).parent(".input").parent().remove(".invalid");
var contenido=$(val).val();
if(contenido=='')
{
$(val).parent( ".input" ).addClass('state-error');
$(val).focus();
$(val).parent(".input").parent().a... |
class Node {
constructor(data, prev, next) {
this.data = data;
this.prev = prev;
this.next = next;
}
}
class Queue {
constructor() {
this.first = null;
this.last = null;
}
enqueue(data) {
const node = new Node(data, null);
if (this.first === null) {
this.first = node;
}
... |
<reponame>wpisen/trace<gh_stars>1-10
package com.wpisen.trace.agent.common.logger.log4j;
import org.apache.log4j.Level;
import com.wpisen.trace.agent.common.logger.Logger;
import com.wpisen.trace.agent.common.logger.support.FailsafeLogger;
public class Log4jLogger implements Logger {
private static final String FQ... |
<gh_stars>0
# Write your solution here
str = input("Please type in a string: ")
count = 0
while count< len(str):
print(str[len(str) - count-1])
count += 1 |
var { getAppConfig, frontType } = require("./utils/utils");
module.exports = {
chainWebpack: (config) => {
config.plugin("define").tap((args) => {
args[0]["process.env"] = {
...args[0],
VUE_APP_PORT: JSON.stringify(getAppConfig().port),
FRONT_TYPE: JSON.stringify(frontType)
};
... |
#include "mpiP.h"
/*
* COLLECTIVE
*/
FC_FUNC( mpi_barrier , MPI_BARRIER )(int *comm, int *ierror)
{
*ierror=MPI_Barrier( *comm );
}
int MPI_Barrier(MPI_Comm comm )
{
return(MPI_SUCCESS);
}
/*********/
FC_FUNC( mpi_bcast , MPI_BCAST )(void *buffer, int *count, int *datatype,
int *root, int *comm... |
<filename>app/src/main/java/com/example/veterineruygulamas/RestApi/ApiServ.java
package com.example.veterineruygulamas.RestApi;
import com.example.veterineruygulamas.Pojos.AsiPojo;
import com.example.veterineruygulamas.Pojos.DuyuruPojo;
import com.example.veterineruygulamas.Pojos.PetPojos;
import com.example.vete... |
<filename>src/main/java/resource/utils/JsonUtil.java
package resource.utils;
import com.fasterxml.jackson.databind.ObjectMapper;
import resource.AccountTransfer;
public class JsonUtil {
private static ObjectMapper mapper = new ObjectMapper();
public static String toJson(AccountTransfer transfer) throws Exce... |
<filename>tests/test_base_resnet.py
import os
import torch
import torchvision.transforms as transforms
import pytest
import pytorch_lightning as pl
import shutil
from pose_est_nets.utils.wrappers import predict_plot_test_epoch
from pose_est_nets.utils.io import set_or_open_folder, load_object
from typing import Optiona... |
<filename>setup.py
import setuptools
import os
# read content of README.md
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setuptools.setup(
name="pyapetnet",
use_scm_version={'fallback_version':'unkown'},
setup_requi... |
let algorithms = ["bubble", "insertion", "selection"];
// Create strategy pattern
const strategypattern = {
// Create actions
bubble: arr => {
for(let i=arr.length; i >=0; i--){
for(let j=0; j < i; j++){
if(arr[j] > arr[j+1]){
let temp = arr[j];
arr[j] = arr[j+1];
a... |
package com.yin.springboot.mybatis.server.service;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.yin.springboot.mybatis.domain.PmsProductCategory;
import com.yin.springboot.mybatis.mapper.PmsProductCategoryMapper;
import com.yin.springboot.mybatis.se... |
import React from 'react';
import {
useFonts,
Inter_100Thin,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_700Bold,
Inter_900Black,
} from '@expo-google-fonts/inter';
import { StackActions, useNavigation } from '@react-navigation/native';
import * as Molecules from '@components/molecules';
im... |
<reponame>yaoice/meliodas<filename>pkg/ipam/backend/neutron/mix_route_store.go<gh_stars>1-10
// Copyright 2015 CNI 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:/... |
def removeSpecifiedIndex(list, index):
# using list comprehension
new_list = [list[i] for i in range(len(list)) if i != index]
return new_list
list = ['Apple', 'Orange', 'Banana', 'Mango']
index = 2
print(removeSpecifiedIndex(list, index)) |
terraform init
terraform apply -auto-approve |
import React from 'react';
import {makeStyles} from "@material-ui/core/styles";
import CssBaseline from "@material-ui/core/CssBaseline";
import {Switch, Route} from "react-router-dom";
import {hot} from 'react-hot-loader'
import Navigation from 'components/Navigation';
import HomePage from 'components/Home';
import P... |
/*
* Copyright The Stargate 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 to ... |
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/l... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bus.management;
/**
*
* @author
*/
public class UserControlPanel extends javax.swing.JFrame {
/**
* Creates new ... |
<gh_stars>0
import { Injectable } from '@angular/core';
import { User, UserPreferences } from '@app/domain';
import { of } from 'rxjs';
import { UserManagementDetailService } from './user-management-detail.service';
@Injectable({ providedIn: 'root' })
export class StubUserManagementDetailService implements Partial<Use... |
#!/bin/bash
echo "Will push all LOCALLY EXISTING jdickey/hanami-1.2.0-base images to Docker Hub in 5 seconds"
echo "Hit Control-C *NOW* if this is not what you want!"
for i in 5 4 3 2 1; do
echo -n $i; echo -n '... '
sleep 1
done
for i in `docker image ls jdickey/hanami-1.2.0-base --format='{{.ID}}\t{{.Repository}}... |
'use strict'
const webpack = require('webpack')
const merge = require('webpack-merge')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const config = require('mpvue-packager/lib/config')
const utils = require('mpvue-packager/lib/utils')
const baseWebpackConfig = require('./webpack.base.conf')
m... |
<reponame>robinwyss/openkit-java
/**
* Copyright 2018-2020 Dynatrace 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... |
package org.purevalue.arbitrage.traderoom.exchange
import java.time.Instant
import java.util.UUID
import akka.actor.typed.scaladsl.{AbstractBehavior, ActorContext, Behaviors}
import akka.actor.typed.{ActorRef, Behavior}
import org.purevalue.arbitrage.Main.actorSystem
import org.purevalue.arbitrage.traderoom._
import ... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
#include "mainwindow.h"
#include <accounts/registeraccountwindow.h>
#include <accounts/loginwindow.h>
#include <accounts/user.h>
#include <KillCovid-19/killcovid-19window.h>
#include "Utils/Utils.h"
#include <iostream>
/**
* \file mainwindow.h
* \brief Implementation of the mainWindow.
* \author <NAME>
*/
mainWindow... |
# -*- coding: utf-8 -*-
# Copyright 2020 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... |
// Copyright (c) 2018 Northwestern Mutual.
//
// 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, copy, modify, merge, p... |
<gh_stars>1-10
import { types } from 'mobx-state-tree';
import Cookies from 'universal-cookie';
import { addLocaleData } from 'react-intl';
import en from 'react-intl/locale-data/en';
// Translated data
import localeData from '../../../i18n/build/data.json';
const DEFAULT_LANGUAGE = 'en';
const COOKIE_NAME = 'langua... |
<filename>zeus-spring/src/main/java/com/iterlife/zeus/spring/servlet/XServletContext.java
/**
*
*/
package com.iterlife.zeus.spring.servlet;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Set;
/**
* A context set defined by We... |
#! /bin/bash
for region in $(aws ec2 describe-regions | jq -r '.Regions[].RegionName')
do
instancesInfo=$(aws ec2 describe-instances --region $region | jq -r '.Reservations')
numReservations=$(echo $instancesInfo | jq '. | length')
for r in $(seq 0 $(( numReservations - 1 )))
do
numInstances=$(... |
def print_table(a, b, c):
print("Team | Score")
print("------------")
print("Team A | %d" % a)
print("Team B | %d" % b)
print("Team C | %d" % c)
print_table(4, 2, 3) |
<gh_stars>1-10
import torch
# import torchvision
import collections
import os
from PIL import Image
import cv2
from torch.utils import data
# HOME = os.environ['HOME']
def parse_model(model_path):
model_path = "./models/swin_large_patch4_window12_384_22kto1k.pth"
assert(os.path.exists(model_path))
x = t... |
<filename>src/app.service.ts<gh_stars>0
import { Injectable } from '@nestjs/common';
@Injectable()
export class AppService {
getHello(): string {
return 'Hello World!';
}
getMessage(data: string): string {
if (data == 'hello') {
return 'Hello from microservice'
} else if (data == 'bye'){
... |
#!/bin/bash
while read line; do
echo "$line"
if [[ -n $prev ]]; then
if [[ $prev -lt $line ]]; then
counter=$((counter+1))
fi
fi
prev=$line
done < "${1:-/dev/stdin}"
echo "counter: $counter" |
go run ./tools/genddragon.go > /tmp/auto_ddragon.go
echo ""
echo "Output to: /tmp/auto_ddragon.go"
echo "Overwrite command: cp /tmp/auto_ddragon.go riot/auto_ddragon.go"
echo "" |
alter table DDCSD_SCRIPT add column CATEGORY_ID varchar(36) ;
|
<gh_stars>1-10
from django.apps import AppConfig
class TagsConfig(AppConfig):
name = "hexa.tags"
label = "tags"
|
<?php
namespace jupingx\rtb\Normal;
/**
* OsType enum
*/
final class OsType
{
const UNKNOWN = 0;
const WINDOWS = 1;
const MAC = 2;
const LINUX = 3;
const ANDROID = 4;
const IOS = 5;
/**
* Get the name of the operating system based on the given type
*
* @param int $type The... |
function binarySearch(arr, target) {
let left = 0;
let right = arr.length - 1;
while (left <= right) {
let middle = Math.floor((left + right) / 2);
if (arr[middle] === target) {
return middle;
}
if (arr[middle] > target) {
right = middle - 1;
} else if (arr[middle] < target) {
... |
<reponame>MrPepperoni/Reaping2-1
#ifndef INCLUDED_CORE_PERF_TIMER_H
#define INCLUDED_CORE_PERF_TIMER_H
#include <boost/timer.hpp>
#include "platform/i_platform.h"
namespace perf {
class Timer_t
{
boost::timer mMeasurer;
double mPrevMeasurement;
public:
void Log( std::string const& ... |
package com.jsgygujun.code.flink.chapter05.util
/**
* 报警数据实体
* @author <EMAIL>
* @since 2020/8/20 2:30 下午
*/
case class Alert(message: String, timestamp: Long)
|
#!/bin/bash
# download from ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz
# yum install libX11 libX11-devel libXaw libXaw-devel libpng-devel libpng
set -x
set -e
. ${DOWNLOAD_TOOL} -u ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz
cd ${JARVIS_TMP}
tar -xvf ${JARVIS_DOWNLOAD}/ncview-2.1.7.tar.gz
cd ncvie... |
<gh_stars>0
insert into display_selection values (nextval('somsequence'),$1,$2,$3,
current_date,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,
$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,
$52,$53,$54,$55,$56,$57,$58,$59,$60,... |
#!/bin/bash
# LinuxGSM command_debug.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Runs the server without tmux and directly from the terminal.
commandname="DEBUG"
commandaction="Debuging"
functionselfname="$(basename "$(readlink -f "${BASH_... |
<reponame>MontealegreLuis/activity-feed
package com.montealegreluis.activityfeed;
import static com.montealegreluis.activityfeed.ExceptionContextFactory.contextFrom;
import com.montealegreluis.assertions.Assert;
import java.util.LinkedHashMap;
import java.util.Map;
import org.slf4j.event.Level;
public final class Ac... |
CREATE TABLE members (
id int(11) AUTO_INCREMENT PRIMARY KEY,
name varchar(255) NOT NULL,
email varchar(255) NOT NULL,
address varchar(255) NOT NULL
);
CREATE TABLE books (
id int(11) AUTO_INCREMENT PRIMARY KEY,
title varchar(255) NOT NULL,
author varchar(255) NOT NULL,
genre varchar(255) NOT NULL
);
... |
<reponame>lostmsu/RoboZZle-Droid
package com.team242.robozzle;
import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;
/**
* Created by lost on 10/26/2015.
*/
public class AboutActivi... |
#!/bin/bash
# Copyright hechain. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
make docker
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
for image in baseos peer orderer ccenv tools; do
for release in ${RELEASE} ${TWO_DIGIT_RELEASE}; do
docker tag ... |
const path = require('path');
const fs = require('fs');
// Extract languages from files available in /templates/src/translations/
module.exports = function() {
const translationsDir = path.join(__dirname, 'templates/src/translations');
const files = fs.readdirSync(translationsDir).filter(file => path.extname(file)... |
import config from 'config'
import path from 'path'
const dir = (arr, isAbsolute = false) => {
const p = isAbsolute ? path.resolve : path.join
let res = ''
arr.forEach((d) => {
res = p(res, d)
})
return res
}
/**
* 配列をディレクトリパスに変換
* @param {string[]} arr - ディレクトリの配列
* @return {string}
*/
export con... |
<filename>src/routes/api/index.js
const router = require('express').Router()
const usersRouter = require('./users.router')
router.use('/users', usersRouter)
module.exports = router
|
<filename>docs/cvs/classdroid_1_1_runtime_1_1_prototyping_1_1_sensors_1_1_rays_1_1_experimental_1_1_ray.js
var classdroid_1_1_runtime_1_1_prototyping_1_1_sensors_1_1_rays_1_1_experimental_1_1_ray =
[
[ "Perceive", "classdroid_1_1_runtime_1_1_prototyping_1_1_sensors_1_1_rays_1_1_experimental_1_1_ray.html#adaabd0e53b... |
#include "Config.h"
#include "BNetOldAuthLogon2.h"
namespace Packets
{
namespace BNet
{
bool BNetOldAuthLogon2::Pack()
{
_packet << result;
if(!reason.empty())
_packet << reason.c_str();
return true;
}
}
}
|
script_dir=$(dirname "$(readlink -f "$0")")
export KB_DEPLOYMENT_CONFIG=$script_dir/../deploy.cfg
WD=/kb/module/work
if [ -f $WD/token ]; then
cat $WD/token | xargs sh $script_dir/../bin/run_VariationImporter_async_job.sh $WD/input.json $WD/output.json
else
echo "File $WD/token doesn't exist, aborting."
exi... |
SLIDE_WINDOWS = 3
THRESHOLD = 10
f = open("input.txt", "r")
window = []
for i in range(SLIDE_WINDOWS):
window.append(int(f.readline()))
count = 0
for cur in f:
window_sum = sum(window)
if window_sum >= THRESHOLD:
count += 1
window.pop(0)
window.append(int(cur))
print(count) |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { deepMerge } from 'grommet/utils';
import { grommet, Box, FormField, TextArea, Grommet } from 'grommet';
var customFormFieldTheme = {
global: {
font: {
size: '13px'
},
input: {
weight: 400
}
},
formField: ... |
#!/bin/sh
set -e
set -u
set -o pipefail
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_P... |
<filename>toArray.js
var identity = require('./identity')
var each = require('./each')
module.exports = function toArray(obj, fn) {
if (!fn) { fn = identity }
var result = []
each(obj, function(val, key) {
result.push(fn(val, key))
})
return result
} |
import * as ss from "steelseries"
/**
* Rose gauge construction parameters
*
* @public
*/
export interface RoseParams {
/**
* Gauge size (px) - default: smaller dimension between `canvas.width` and `canvas.height`
*/
size?: number;
/** * Gauge upper title string - default: `""` */
titleString?: string;
... |
<reponame>cmosier270/suitesparse-java<filename>cholmod/src/main/java/ssjava/cholmod/SupernodalStrategy.java
package ssjava.cholmod;
/**
* Supernodal strategy
*/
public enum SupernodalStrategy
{
CHOLMOD_SIMPLICIAL,
CHOLMOD_AUTO,
CHOLMOD_SUPERNODAL
}
|
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.browser = browser;
var _system_js_hot_reloadJs = require('./system_js_hot_reload.js');
function browser(window, bs) {
(0, _system_js_hot_reloadJs.HotReload)();
}
'use strict';
Object.defineProperty(exports, '__esModule', {
va... |
#pragma once
// This file was created automatically, do not modify the contents of this file.
PRAGMA_DISABLE_DEPRECATION_WARNINGS
#include "CoreShell.h"
#include "ManageObject.h"
#include "TypeConvertor.h"
#include "Runtime/Engine/Classes/Components/PoseableMeshComponent.h"
#include "ManagePoseableMeshComponent.gene... |
//
// wrapper.cpp
// RoutemakingGUI
//
// Created by <NAME> on 7/27/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include <stdio.h>
#include <PathfinderController.h>
#include <pathfinding/LocalPathfinder.h>
#include <pathfinding/Astar.h>
Boat SimpleAISBoat(double lat, double lon, int trueHeading, floa... |
/** @module url */ /** for typedoc */
import {extend, bindFunctions, IInjectable, removeFrom} from "../common/common";
import {isFunction, isString, isDefined, isArray} from "../common/predicates";
import {UrlMatcher} from "./urlMatcher";
import {services, $InjectorLike, LocationServices} from "../common/coreservices";... |
#
# Copyright (c) 2016, Nimbix, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and ... |
import gql from 'graphql-tag';
export const getInstanceLogsQueryGql = gql`
query($id: String!) {
instance(id: $id) {
id
name
commandLogs {
id
description
createdAt
completedAt
failedAt
... |
<reponame>Crisreyda/AudioVisualCrowdCounting
import os
import numpy as np
import torch
import argparse
import time
from config import cfg
# args = argparse.ArgumentParser()
# args.add_argument('--net_name', type=str, default='', help='name of net')
# args.add_argument('--resume', type=int, default=0, help='whether to... |
#include<iostream>
#include<fstream>
#include<ctime>
#include<cstring>
#include<sstream>
using namespace std;
template <typename T>
string toString(T number){
stringstream ss;
ss <<number;
return ss.str();
}
void path_to_neighbor(double** arr,double** map, int const* coor, int const* bound,bool** visit... |
<gh_stars>0
# -*- coding: utf-8 -*-
miquire :core, 'environment', 'user', 'message', 'userlist', 'configloader', 'userconfig', 'service_keeper'
miquire :lib, "mikutwitter", 'reserver', 'delayer', 'instance_storage'
Thread.abort_on_exception = true
=begin rdoc
Twitter APIとmikutterプラグインのインターフェイス
=end
class Service
i... |
<filename>packages/coinstac-ui/app/render/components/data-discovery/data-discovery.styles.js
import { makeStyles } from '@material-ui/core/styles';
export default makeStyles(theme => ({
searchButton: {
marginTop: theme.spacing(2),
},
resultItem: {
marginBottom: theme.spacing(2),
},
firstSearchInfo: {... |
#!/bin/bash
set -e
if [ -n "$1" ]; then
MY_FILE=$1
stat ./lib/$MY_FILE > /dev/null 2>&1
flutter format ./lib/$MY_FILE
else
flutter format lib
flutter format test
fi
|
#!/bin/bash
mkdir -p $PREFIX/bin
make
cp rainbow $PREFIX/bin
cp select_all_rbcontig.pl $PREFIX/bin
cp select_best_rbcontig.pl $PREFIX/bin
cp select_sec_rbcontig.pl $PREFIX/bin
cp select_best_rbcontig_plus_read1.pl $PREFIX/bin
|
class Employee:
def __init__(self, name, age, salary):
self.name = name
self.age = age
self.salary = salary
class EmployeeDB:
def __init__(self):
self.db = []
def add_employee(self, employee):
self.db.append(employee)
def get_employee(self, name):
for e in self.db:
if e.name ... |
<filename>test_code/mnist_dpsgd_test_keras_vectorized.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from absl import flags
from absl import logging
import numpy as np
import tensorflow as tf
import pandas as pd
import tables
from ... |
const express = require('express')
const _ = require('lodash')
const Boom = require('boom')
const jwt = require('jsonwebtoken')
const yaml = require('js-yaml')
const logger = require('hw-logger')
const log = logger.log
const JsonValidator = require('../../services/json-validator')
const Store = require('../../services/... |
#!/bin/sh
#set -e
# Get minishift
MINISHIFT_VER=1.34.1
MINISHIFT_NAME="minishift-${MINISHIFT_VER}-linux-amd64"
wget https://github.com/minishift/minishift/releases/download/v${MINISHIFT_VER}/${MINISHIFT_NAME}.tgz
tar -xvzf ${MINISHIFT_NAME}.tgz
cd ${MINISHIFT_NAME}
# Get KVM driver
# https://docs.okd.io/latest/minish... |
#!/bin/bash
BRIDGE=br0
CONTAINER_NAMES=$(sudo docker ps -a --format {{.Names}})
for NAME in $CONTAINER_NAMES; do
sudo ovs-docker del-ports $BRIDGE $NAME
done
sudo docker kill $(sudo docker ps -a -q)
sudo ovs-ofctl -OOpenflow13 del-flows br0
|
#!/usr/bin/env bash
set +e
for ext in $(code --list-extensions); do
code --uninstall-extension "$ext"
done
code --list-extensions --show-versions
|
import KEYCODE from '../constants/_KEYCODE.es6';
import { PopupMenu } from './_Menu.es6';
/**
* @abstract
*/
class MenuItem {
constructor(domNode, menuObj) {
this.menu = menuObj;
this.domNode = domNode;
this.popupMenu = false;
this.isMenubarItem = false;
this.hasFocus = false;
this.hasHover... |
package com.java.simple;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("HELLO WORLD");
}
}
|
<reponame>MartinNeupauer/mongo<filename>src/third_party/wiredtiger/test/suite/test_alter01.py
#!/usr/bin/env python
#
# Public Domain 2014-2017 MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish... |
def is_leap_year(y:int)->bool:
return (y % 4 == 0 and y % 100 !=0) or y % 400 == 0
def get_last_date(y:int, m:int)->int:
if m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m == 10 or m == 12:
return 31
elif m == 2:
return 29 if is_leap_year(y) else 28
return 30
def is_date_overflo... |
/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.model.volatility.smile.fitting.sabr;
import java.util.Arrays;
import org.apache.commons.lang.ObjectUtils;
import com.opengamma.analytics... |
def run(input_list):
unique_elements = []
seen = set()
for num in input_list:
if num not in seen:
unique_elements.append(num)
seen.add(num)
return unique_elements |
<gh_stars>1-10
package dockerhub
const (
// APIURL dockerhub base url
APIURL = "https://hub.docker.com"
// APIVersion dockerhub API version
APIVersion = "v2"
// APILogin url
APILogin = "users/login"
// APIRepositories dockerhub repositories API
APIRepositories = "repositories"
// Category ...
Category = "doc... |
#!/usr/bin/env bash
go run rename/main.go |
<filename>webpack.config.js
/*
Copyright 2021 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 applicable l... |
<reponame>bowlofstew/blockchain-samples<filename>contracts/industry/LogisticsSplit.0.6/Common/common.go<gh_stars>100-1000
package Common;
import (
"encoding/json"
)
const BLSTATEKEY string = "BLSTATEKEY"
const CONTSTATEKEY string = "CONTSTATEKEY"
const BLSTATE string = "_STATE"
// const CONTHIST string = "_HIST" ... |
#!/bin/bash
# Copyright (c) 2013 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
if [ -d "$1" ]; then
cd "$1"
else
echo "Usage: $0 <datadir>" >&2
echo "Removes obsolete GleecBTC database files" >&... |
//
// Created by Zhukov on 2020/7/23.
//
#ifndef MODBUSMASTER_CHECKSUM_H
#define MODBUSMASTER_CHECKSUM_H
uint8_t checksum_lrc(uint8_t* data, uint16_t length);
uint16_t checksum_crc(uint8_t* data, uint16_t length);
#endif //MODBUSMASTER_CHECKSUM_H
|
<reponame>slipkinem/webpack-ts
import * as ext from 'vue-property-decorator'
import axios from 'axios'
// extending default vue instance with some more stuff
export class Vue extends ext.Vue {
static get http () {
return axios
}
get $http () {
return axios
}
}
export {
Inject,
Provide,
Model,
... |
'use strict';
let axios = require('axios');
let express = require('express');
let app = express();
let WIT_AI_TOKEN = process.env.WIT_AI_TOKEN;
let IFTTT_MAKER_KEY = process.env.IFTTT_MAKER_KEY;
app.get('/', function (req, res) {
// Now that we have the query,
// lets ask wit to parse it and return some helpful... |
<reponame>tdm1223/Algorithm<gh_stars>1-10
// TwoSum
// 2021.10.21
// Easy
class Solution
{
public:
vector<int> twoSum(vector<int>& nums, int target)
{
unordered_map<int, int> maps;
for (int i = 0; i < nums.size(); i++)
{
if (maps.find(target - nums[i]) != maps.end())
... |
<gh_stars>0
class TechDeals::Scraper
def self.scrape_items(url)
#Scrapes each item on selected page and returns the list of items as an array of objects
doc = Nokogiri::HTML(open("https://www.dealsource.tech#{url}"))
items = []
doc.css('div.summary-item').each{|item|
deal = TechDeals::Items.ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.