text stringlengths 1 1.05M |
|---|
PYTHON=/zfsauton3/home/bpatra/miniconda3/bin/python3.6
${PYTHON} -m ccm_model.codl_main --config_file training_configs/ccm_crf_features_bert_codl/ner_type_attr.jsonnet --base_dir ./trained_model_outputs/ccm_crf_features_bert_codl --devices 0 --start_index 35 --end_index 70
|
TERMUX_PKG_HOMEPAGE=https://marlam.de/msmtp/
TERMUX_PKG_DESCRIPTION="Lightweight SMTP client"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=1.8.10
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://marlam.de/msmtp/releases/msmtp-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=caba7f39d19df7a31782fe7336dd640c61ea33b92f987bd... |
package controllers
import (
"crud-rest-api-golang/common"
"crud-rest-api-golang/models"
"crud-rest-api-golang/serializers"
"crud-rest-api-golang/validator"
"errors"
"fmt"
"net/http"
"strconv"
"github.com/gin-gonic/gin"
)
func ArticleCreate(c *gin.Context) {
articleModelValidator := validator.NewArticleMode... |
<gh_stars>0
/*
* MIT License
*
* Copyright (c) 2018 <NAME> (Falkreon) and contributors
*
* 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 limitati... |
import logging
import os
import boto3
import requests
# Set up logging for botocore library to debug level
logging.getLogger('botocore').setLevel(logging.DEBUG)
# Constants
SITE = 'http://www.python.org/'
CW_NAMESPACE = 'ProfilerPythonDemo'
S3_BUCKET = os.environ['S3_BUCKET']
# Function to collect performance data f... |
import random
import os
import tensorflow.compat.v1 as tf
import tempfile
import twremat
def splice_op(op, input_map, control_inputs=None):
g = op.graph
node_def = tf.NodeDef()
node_def.CopyFrom(op.node_def)
node_def.name = g.unique_name(op.name + '_copy')
inputs = [input_map.get(x, x) for x in op... |
SELECT MAX(marks) FROM Student WHERE marks NOT IN (SELECT MAX(marks) FROM Student) |
<html>
<head>
<title>Books</title>
</head>
<body>
<h2>All Books</h2>
<ul>
<?php
// Connect to the DB
include 'connect_sql.php';
// Get all book titles
$query = "SELECT title FROM books";
$res... |
#!/bin/bash
#
# Usage:
# $ create_django_project_run_env <appname>
source ./common_funcs.sh
check_root
# conventional values that we'll use throughout the script
APPNAME=$1
DOMAINNAME=$2
PYTHON_VERSION=$3
# check appname was supplied as argument
if [ "$APPNAME" == "" ] || [ "$DOMAINNAME" == "" ]; then
echo "Usage:... |
#!/usr/bin/env bash
# Copyright 2021 The Crossplane 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... |
docker rm -f $(docker ps -a | grep "zentao-kpi*" | awk '{print $1}')
docker pull registry.cn-shenzhen.aliyuncs.com/kuaima/zentao-kpi:latest
docker run -d --name="zentao-kpi" -m 2G -e JAVA_OPS="-Xms512m -Xmx2024m" -e PROFILES="--spring.profiles.active=verify " -p 5200:5200 registry.cn-shenzhen.aliyuncs.com/kuaima/zent... |
#!/bin/bash -l
# ==============================================================================
# SUMMARY
# ==============================================================================
# Daily files to 1971-2000 to 2070-2099 signals and scaled signals for water temperature
# =====================================... |
import numpy as np
# define input matrix
matrix = np.array([[1.0, 2.0, 3.0],
[2.0, 4.0, 6.0],
[3.0, 6.0, 9.0]])
# calculate column means
means = matrix.mean(axis=0)
# calculate column standard deviations
std = matrix.std(axis=0)
# normalize matrix
normalized_matrix = (matrix - ... |
import scipy.optimize
# define the objective function
def obj_func(x):
return -x + 5
# define the constraint function
def constraints(x):
g1 = x - 3
g2 = 8 - x
return (g1, g2)
# solve the optimization problem
opt = scipy.optimize.minimize(obj_func,
x0=0,
... |
#!/usr/bin/env python3
import queries
import colorama
import colors
def main():
colorama.init()
print(colors.bold_color + "MongoDB Schema Performance app by @mkennedy")
print(colors.subdue_color + 'https://github.com/mikeckennedy/mongodb_schema_design_mannheim')
print()
queries.run()
if __nam... |
<reponame>lananh265/social-network
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.u26AA = void 0;
var u26AA = {
"viewBox": "0 0 2600 2760.837",
"children": [{
"name": "path",
"attribs": {
"d": "M1465 1566.5q-69 68.5-165 68.5t-165-68.5-69-165.5q0-96 69-165t165-6... |
// background.js
function blockWebsites(details) {
const url = new URL(details.url);
let block = false;
// list of websites that should be blocked
// (replace with real websites)
const blockedWebsites = ['example.com', 'another-example.com'];
blockedWebsites.forEach(website => {
if (url.hostname.includ... |
import { IWalletOutput } from "./IWalletOutput";
export interface IWalletAddressOutput {
/**
* The address.
*/
address: string;
/**
* The outputs.
*/
outputs: IWalletOutput[];
}
|
#include <string>
class cluster_info {
private:
std::string cluster_name;
int num_nodes;
double total_memory_capacity;
public:
// Constructor to initialize the cluster information with default values
cluster_info() : cluster_name("DefaultCluster"), num_nodes(0), total_memory_capacity(0.0) {}
... |
#!/bin/bash
set -e
# Load configuration for current environment.
if [ -f .env ]; then
source .env
else
echo "Missing .env file!"
exit 1
fi
HOST=${1:-$LINODE_HOST}
USER=${2:-$LINODE_USER}
BASEDIR=$(dirname "$0")
DEPLOYIGNORE=$BASEDIR/.deployignore
BUILD_DIR="./wp/"
if [ -z $HOST ] || [ -z $USER ]; then
echo... |
/* ---------------------------------------------------------------------------
//
// CodeFinder
//
// Copyright (C) 2020 Instituto de Telecomunicações (www.it.pt)
// Copyright (C) 2020 Universidade da Beira Interior (www.ubi.pt)
//
// This program is free software: you can redistribute it and/or modify
// it under ... |
<filename>app/controllers/subscriptions_controller.rb
class SubscriptionsController < ApplicationController
before_action(:authenticate_user!)
def create
new_favourite = Subscription.create(
user: current_user,
category: Category.find(params[:id])
).save()
redirect_back(fallback_location: fo... |
/// <reference types="cypress" />
describe('BTC2x-FLI', () => {
before(() => {
cy.visit('http://localhost:3000/btcfli')
})
context('Product Header', () => {
it('should show product symbol', () => {
cy.get('[data-cy=token-symbol]').should('contain', 'BTC2x-FLI')
})
it('should show product n... |
#!/bin/sh
set -eux
IS_CONTAINER=${IS_CONTAINER:-false}
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-docker}"
if [ "${IS_CONTAINER}" != "false" ]; then
export XDG_CACHE_HOME=/tmp/.cache
mkdir /tmp/unit
cp -r . /tmp/unit
cp -r /usr/local/kubebuilder/bin /tmp/unit/hack/tools
cd /tmp/unit
make test
else
"${CONT... |
#!/bin/bash
# run-shellcheck
#
# CIS Debian Hardening
#
#
# 5.2.15 Ensure only strong Key Exchange algorithms are used (Scored)
#
set -e # One error, it's over
set -u # One variable unset, it's over
# shellcheck disable=2034
HARDENING_LEVEL=2
# shellcheck disable=2034
DESCRIPTION="Checking key exchange ciphers."
P... |
package helpers
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"time"
"github.com/codeskyblue/kexec"
"github.com/go-logr/logr"
"github.com/pkg/errors"
"github.com/epinio/epinio/helpers/termui"
)
type ExternalFuncWithString func() (output string, err error)
type ExternalFunc func() (err error)
f... |
package io.snyk.plugin.datamodel
import io.circe.derivation.{deriveDecoder, deriveEncoder}
import io.circe.{Decoder, Encoder, JsonObject, ObjectEncoder}
import cats.syntax.functor._
import io.circe.derivation._
import io.circe.syntax._
case class Semver(vulnerable: Seq[String])
case class MavenModuleName(
groupId... |
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
var imgPath = '/path/to/some/img.png';
// connect to mongo
mongoose.connect('localhost', 'testing_storeImg');
// example schema
var schema = new Sche... |
<reponame>Stylite-Y/XArm-Simulation<gh_stars>0
import os
import numpy as np
from numpy.core.fromnumeric import ptp
import raisimpy as raisim
import time
raisim.World.setLicenseFile(os.path.dirname(os.path.abspath(__file__)) + "/activation.raisim")
# LISM_urdf_file = os.path.dirname(os.path.abspath(__file__)) + "/urdf/... |
<reponame>rochaa/crud-auth-api-nestjs<filename>src/modules/adm/accounts/accounts.service.ts
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { Md5 } from "md5-typescript";
import { AuthService } from '../../../shared/auth/auth.service';
import { Guid } from 'guid-typescript';
import { UsersSer... |
package borip
import (
"encoding/binary"
"errors"
"net"
)
const (
defaultBufferSize = 256 * 1024
packetHeaderSize = 4
)
var ErrShortPacket = errors.New("borip: short packet")
const (
FlagNone = 0x00
FlagHardwareOverrun = 0x01 // Used at hardware interface
FlagNetworkOverrun = 0x02 // Used at cl... |
apt-get -y update
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
apt-get install -y nodejs
npm install --global gulp-cli
cd /vagrant
npm install
|
<gh_stars>0
import { matchUpFormatCode } from '..';
const validFormats = [
{
name: 'Standard Match',
format: 'SET3-S:6/TB7',
obj: {
bestOf: 3,
setFormat: { setTo: 6, tiebreakAt: 6, tiebreakFormat: { tiebreakTo: 7 } }
}
},
{
name: 'Short Sets',
format: 'SET3-S:4/TB7',
obj: ... |
[ -z "${MULLE_VIRTUAL_ROOT}" -o -z "${MULLE_UNAME}" ] && \
echo "Your script needs to setup MULLE_VIRTUAL_ROOT \
and MULLE_UNAME properly" >&2 && exit 1
MULLE_ENV_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/.mulle-env/share"
MULLE_ENV_ETC_DIR="${MULLE_VIRTUAL_ROOT}/.mulle-env/etc"
# Top/down order of inclusion. Left overrid... |
/*
* Bin.java
*
* Created on March 9, 2007, 9:05 PM
*
* From "Multiprocessor Synchronization and Concurrent Data Structures",
* by <NAME> and <NAME>.
* Copyright 2007 Elsevier Inc. All rights reserved.
*/
package tamp.ch15.priority.priority;
import java.util.ArrayList;
import java.util.List;
/**
* Simple bi... |
#!/bin/sh -l
LERNA_VERSION=$(grep -m1 version lerna.json | awk -F: '{ print $2 }' | sed 's/[", ]//g')
echo ::set-output name=lerna-version::$LERNA_VERSION
|
import { SparqlQueryResult, SparqlQueryRecord, SparqlUri, SparqlLiteral, SparqlBlankNode, SparqlVariableBindingValue } from "./sparql-models";
import { Observable } from "rxjs";
import { InjectionToken } from "@angular/core";
export interface ISparqlQueryStatus {
// undefined indicates the user hasn't executed any... |
from typing import List
def calculateFrequency(t: str) -> List[int]:
sequences = ["TTT", "TTH", "THH", "HHT", "HTT", "HTH", "HHH"]
frequency = [0] * 7
for i in range(len(t) - 2):
current_sequence = t[i:i+3]
if current_sequence in sequences:
index = sequences.index(current_seque... |
#!/bin/bash
if [[ $target_platform =~ linux.* ]] || [[ $target_platform == win-32 ]] || [[ $target_platform == win-64 ]] || [[ $target_platform == osx-64 ]]; then
export DISABLE_AUTOBREW=1
$R CMD INSTALL --build .
else
mkdir -p $PREFIX/lib/R/library/xaringan
mv * $PREFIX/lib/R/library/xaringan
if [[ $target_p... |
#!/bin/bash
# Copyright 2017 The Openstack-Helm 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 require... |
<filename>dev-app/routes/components/timeline/theming/index.ts
/*
Copyright 2020, Verizon Media
Licensed under the terms of the MIT license. See the LICENSE file in the project root for license terms.
*/
export class TimelineBlockThemeProperties {
public timelineBlockThemeCols = [
{
_class: 'mon... |
<reponame>MarcelBraghetto/AndroidNanoDegree2016
package com.lilarcor.popularmovies.framework.movies.data.contentprovider;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.datab... |
<filename>src/app/models/swagger/swagger.response.ts
import { Schema } from './swagger.models';
/**
* Represent all existing responses in the API definition
*/
export interface SwaggerResponse {
/** response code (200, 204, 401, ...) */
[ref: string]: {
/** description like Data Returned, Data Not Found, ... */
... |
from random import randint
name = "file"
def gerar_arquivo_aleatorio(nome, quantidade):
with open(name + "-{}".format(quantidade), "w+") as file:
for i in range(quantidade):
file.write("%d," % (randint(-quantidade + 1, quantidade)))
gerar_arquivo_aleatorio(name, 1000)
gerar_arquivo_aleatorio(... |
#!/usr/bin/env bash
mv Bolts.Android/bin/Release/*.nupkg LocalRepository
mv Couchbase.Lite.Android/bin/Release/*.nupkg LocalRepository
mv Couchbase.Lite.Android.Custom/bin/Release/*.nupkg LocalRepository
mv Couchbase.Lite.Android.ForestDB/bin/Release/*.nupkg LocalRepository
mv Couchbase.Lite.Java.Core/bin/Release/*.nu... |
#!/bin/bash
#$-m abe
#$-M yding4@nd.edu
#$-q gpu # specify the queue
#$-l gpu_card=4
#$-N aida_xml_from_end2end_neural
export PATH=/afs/crc.nd.edu/user/y/yding4/.conda/envs/e2e_EL_evaluate/bin:$PATH
export LD_LIBRARY_PATH=/afs/crc.nd.edu/user/y/yding4/.conda/envs/e2e_EL_evaluate/lib:$LD_LIBRARY_PATH
CODE=/scratch365... |
import numpy as np
def random_image_augmentation(x, height_shift_range, width_shift_range):
h, w = x.shape[0], x.shape[1]
if height_shift_range:
tx = np.random.uniform(-height_shift_range, height_shift_range) * h
else:
tx = 0
if width_shift_range:
ty = np.random.uniform(-width_s... |
package net.synqg.qg.nlg.qgtemplates;
import lombok.experimental.Accessors;
import net.synqg.qg.nlp.labels.NamedEntityType;
import net.synqg.qg.service.QaPair;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author viswa
*/
@Accessors(fluent = true)
public interface QgTemplate {
... |
import { getRepository, Repository } from 'typeorm';
import IUsersUpdateRepository from '@modules/users/Repositories/IUpdateUsersRepository';
import IUpdateUserDTO from '@modules/users/dtos/IUpdateUsersDTO';
import User from '@modules/users/infra/typeorm/models/UsersUpdate';
class UserUpdateRepository implements IUse... |
#!/bin/bash
#runstuff
CLEARDB="cd contriboard-populator/ && fab clear_database"
APIVERSION="cd /home/vagrant/teamboard-api/ && echo Api version: >> /home/vagrant/stats/version.txt && git describe >> /home/vagrant/stats/version.txt"
IOVERSION="cd /home/vagrant/teamboard-io/ && echo IO version: >> /home/vagrant/stats/ve... |
/*
* Class and functions to provide communication with the Veles Web API
* server over websocket.
*
* Copyright (C) 2019 The Veles Core developers
* Author: <NAME>
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published b... |
console.time('Time taken');
var app = require('./app');
const path = require('path');
var config = require(path.join(__dirname, '../configuration', 'config.json'));
const chalk = require('chalk');
// create server of app
var server = app.listen(config.serverPort);
console.timeEnd('Time taken');
console.log(`SCTK rele... |
#!/usr/bin/env bash
set -o pipefail
declare -i errors=0
GREEN="\033[0;32m"
YELLOW="\e[0;33m"
RED="\033[0;31m"
NOCOL="\033[0m"
trap ctrl_c INT
function ctrl_c() {
printf "${YELLOW}Existing due to interrupt!${NOCOL}\n"
exit
}
testcases=()
if [ "$1" == "--tests" ]
then
IFS=','; testcases=( $2 )
shift
... |
class Resource:
def __init__(self, name, type, address, phone, latitude, longitude, description):
self.name = name
self.type = type
self.address = address
self.phone = phone
self.latitude = latitude
self.longitude = longitude
self.description = description
... |
<gh_stars>0
# _*_ coding: utf-8 _*_
"""
Created by lr on 2019/09/03.
「pay接口」只能用户访问,CMS管理员不能反问
"""
from app.libs.redprint import RedPrint
from app.libs.token_auth import auth
from app.service.pay import Pay as PayService
from app.validators.params import IDMustBePositiveInt
__author__ = 'lr'
api = RedPrint(name='p... |
<filename>test/concat_hars_test.js
var hars = require('../helpers/hars');
exports.hars = {
'parse and concat': function (test) {
var har = hars(['test/data/har1.js', 'test/data/har2.js']);
test.equal(har.log.entries.length, 6);
test.equal(har.log.entries[2], 3);
test.done();
}... |
<reponame>jiawei397/deno-oak-nest
// deno-lint-ignore-file no-explicit-any
import { Constructor } from "../../../src/interfaces/type.interface.ts";
import { schedulerRegistry } from "./scheduler.registry.ts";
export function Cron(cronTime: string): MethodDecorator {
return function (
target: InstanceType<Constru... |
#!/bin/bash
set -eux
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
cd $BUILD_BINARIESDIRECTORY
git clone https://github.com/openvpn/openvpn
cd openvpn
autoreconf -iv
./configure > build.log 2>&1 || (cat build.log && exit 1)
make > build.log 2>&1 || (cat build.log && exit 1)
echo test > /tmp/auth.txt... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.13-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.2.0.6213
-- -----------------------------------------------... |
#!/bin/bash -x
#####################################################################
# SUMMARY: Train a quantized marian model
# AUTHOR: afaji
#####################################################################
# Exit on error
set -e
PREFIX=quantized-log4bit
# Remove old artifacts and create working directory
rm ... |
def print_combinations(arr)
arr.combination(3).to_a.each { |x| puts x.inspect }
end
print_combinations([1,2,3]) |
<gh_stars>0
#include <iostream>
#include <ctime>
#include "alkohole.h"
#include "towar.h"
using namespace std;
int main()
{
//srand(unsigned(time(0)));
srand(0);
cout << endl;
cout << "*********************** ETAP 1 (1 pkt) *********************** " << endl << endl;
Wino w1("<NAME>", 42.90, 2013, rodzaj_wina::... |
package utils
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestIsValidLabel(t *testing.T) {
testCases := []struct {
desc string
name string
expectedErr error
}{
{
desc: "valid",
name: "value",
expectedErr: nil,
},
{
desc: "invali... |
from flask import Blueprint, render_template, request, redirect, flash, url_for
from app import db
import models
bp = Blueprint('api', __name__, url_prefix='/api')
@bp.route('/api')
def api():
return "WIP, I'll put sth there one day"
|
import React from 'react';
import { RouteHandler } from 'react-router';
import Header from 'components/Header'
export default React.createClass({
render () {
return (
<div className="container">
<Header />
<RouteHandler />
</div>
);
}
});
|
# First, build go1.4 using gcc, then use that go to build go>1.4
mkdir go-bootstrap && pushd $_
BOOTSTRAP_TARBALL=go1.4-bootstrap-20170531.tar.gz
# https://storage.googleapis.com/golang/go1.4-bootstrap-20170531.tar.gz.sha256
BOOTSTRAP_TARBALL_CHECKSUM=49f806f66762077861b7de7081f586995940772d29d4c45068c134441a743fa2
c... |
#!/bin/bash
# This script parses in the command line parameters from runCust,
# maps them to the correct command line parameters for DispNet training script and launches that task
# The last line of runCust should be: bash $CONFIG_FILE --data-dir $DATA_DIR --log-dir $LOG_DIR
# Parse the command line parameters
# tha... |
<gh_stars>1-10
import numpy as np
def funcy(a1,a2,a1m,a2m):
m=(sum(a1*a2)-len(a1)*a1m*a2m)/(sum(a1**2)-len(a1)*(a1m**2))
c=a2m-(m*a1m)
return(m,c)
def errorid(a2,slop,inter):
ycap=(slop*a1)+inter
s=np.sqrt((sum((a2-ycap)**2))/len(a2))
return(s,ycap)
a1=np.array([4,9,10,14,4,7,12,22,1,17])
a2=... |
'use strict';
const config = require('../config/config');
const mongo = require('../common/middleware/mongo').mongo;
const Factory = require('../common/classes/factory');
const {Payment} = require('../common/classes/payment.class');
const {UsersList} = require('../common/classes/users-list.class');
const {TariffsList... |
<gh_stars>0
const DrawCard = require('../../../drawcard.js');
class FireAndBlood extends DrawCard {
setupCardAbilities() {
this.action({
title: 'Shuffle card from dead pile back into deck',
phase: 'challenge',
target: {
cardCondition: card => card.control... |
import {getResource} from '../services/requests'; // Функция для получения данных с сервера
import calc from './calc';
import changeFormDetails from './changeFormDetails';
const createOrderData = (details) => {
getResource('assets/db.json')
.then(res => createData(res.order))
.catch(error ... |
import React from 'react';
import IconButton from '@material-ui/core/IconButton';
import CancelIcon from '@material-ui/icons/Cancel';
import CheckCircleIcon from '@material-ui/icons/CheckCircle';
const confirmationType = {
retry: 'Creating new deployment...',
abort: 'Aborting...'
};
export default class Confirm ... |
#!/bin/bash
# This script installs all the libraries to be used by Compiler Explorer
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${SCRIPT_DIR}/common.inc
ARG1="$1"
install_nightly() {
if [[ "$ARG1" = "nightly" ]]; then
return 0
else
return 1
fi
}
if install_nightly; ... |
package cn.cerc.jbean.other;
import cn.cerc.jbean.core.Application;
public class SystemTable {
// 帐套资料表
public static final String getBookInfo = "OurInfo";
// 帐套参数档
public static final String getBookOptions = "VineOptions";
// 应用菜单表
public static final String getAppMenus = "SysFormDef";
//... |
<reponame>aloizo03/MotioNet-Android
package com.example.motionet;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.os.Build;
import android.util.Log;
import android.widget.ProgressBar;
import androidx.annotation.RequiresApi;
import org.opencv.android.Util... |
<reponame>streamglider/streamglider
//
// FeedsReader.h
// StreamGlider
//
// Created by <NAME> on 17/08/2011.
// Copyright 2011 StreamGlider, Inc. All rights reserved.
//
// This program is free software if used non-commercially: you can redistribute it and/or modify
// it under the terms of the BSD 4 Clause Lic... |
<reponame>chylex/Hardcore-Ender-Expansion
package chylex.hee.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.item.ItemStack;
import chylex.hee.gui.helpers.Co... |
<gh_stars>0
package ch.raiffeisen.openbank.offer.controller.api;
import java.util.Date;
import org.springframework.hateoas.ResourceSupport;
import org.springframework.hateoas.core.Relation;
import ch.raiffeisen.openbank.common.controller.api.Amount;
import ch.raiffeisen.openbank.common.controller.api.Fee;
import ch.... |
#!/bin/bash
# For Mac
if [ $(command uname) == "Darwin" ]; then
if ! [ -x "$(command -v greadlink)" ]; then
brew install coreutils
fi
BIN_PATH=$(greadlink -f "$0")
ROOT_DIR=$(dirname $(dirname $(dirname $(dirname $BIN_PATH))))
# For Linux
else
BIN_PATH=$(readlink -f "$0")
ROOT_DIR=$(dirname $(dirname $(dirnam... |
import config from './config'
var hljs = require('highlight.js')
var path = require('path');
// 配置表
export default {
mode: 'universal',
server: {
host: config.host, // default: localhost
port: config.port // 服务端口
},
/*
** Headers of the page
*/
head: {
title: 'umy-ui开发文档 - 为开发者准备的基于 Vue 2.0 的桌... |
<gh_stars>1-10
from sidekick import lazy
import arcade
from .base import GameWindow
class HasScrollingCameraMixin(GameWindow):
"""
A basic game window that has a scrolling camera.
"""
#: The ratio of movement for background/foreground.
#: ratio = 0 => no move, ratio = 1 => sync with the foregrou... |
<reponame>vaniot-s/sentry<filename>src/sentry/static/sentry/app/views/settings/components/tag.tsx
import React from 'react';
import styled from '@emotion/styled';
import InlineSvg from 'app/components/inlineSvg';
import {Theme} from 'app/utils/theme';
import space from 'app/styles/space';
type Props = React.HTMLAttri... |
<reponame>jamiels/askde
package controllers.askde;
import javax.inject.Inject;
import com.amazon.speech.json.SpeechletRequestEnvelope;
import com.amazon.speech.speechlet.IntentRequest;
import com.amazon.speech.speechlet.LaunchRequest;
import com.amazon.speech.speechlet.SessionEndedRequest;
import com.amazon.speech.sp... |
import './lesson-12.scss';
const widgets = document.querySelectorAll('.lighter');
// function expression
const lighter = (htmlElement) => {
const lighters = htmlElement.querySelectorAll('.light');
const btnToggle = htmlElement.querySelector('.btn-toggle');
let isEnabled = btnToggle.classList.contains('active');
... |
//
// Copyright (c) 2017 <NAME> (<EMAIL>)
// Copyright (c) 2015 <NAME>
//
// 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... |
<reponame>Abhigyan001/games_info
class ArticlesController < ApplicationController
before_action :require_user
def new
@article = Article.new
@categories = Category.all
end
def create
@article = current_user.articles.build(article_params)
if @article.save
@article.categories << Category.... |
#include "thread_util.h"
#include <sstream>
#include <string>
#include <unistd.h>
using namespace std;
pthread_mutex_t GetterThread::mutex = PTHREAD_MUTEX_INITIALIZER;
void * GetterThread::GetMessage(void * p)
{
GetterThread * getter = (GetterThread*)(p);
stringstream inputStream;
char s = fgetc(getter->str... |
import React, {useState, useEffect} from 'react';
const App = () => {
const [data, setData] = useState(null);
const [text, setText] = useState('');
useEffect(() => {
const savedData = localStorage.getItem('data');
if (savedData) {
setData(JSON.parse(savedData));
}
}, []);
const handleChan... |
struct Product {
name: String,
stock_quantity: u32,
}
struct Inventory {
products: Vec<Product>,
}
impl Inventory {
// Add a new product to the inventory
fn add_product(&mut self, name: String, stock_quantity: u32) {
self.products.push(Product { name, stock_quantity });
}
// Remov... |
import gql from 'graphql-tag';
export default gql`
query getSubscription {
subscription {
isActive
}
}
`; |
import React from 'react';
import Input from '../src/components/Input';
class TestInput extends React.Component {
static displayName = "@TestInput";
render() {
return (
<Input
success={true}
>
</Input>
);
}
}
const _styles = {
};
expo... |
#include <immintrin.h>
void matrix_multiply_simd(const double* A, const double* B, double* C, int m, int n, int p) {
for (int i = 0; i < m; ++i) {
for (int j = 0; j < p; ++j) {
__m256d sum_avx2 = _mm256_setzero_pd(); // Initialize the sum for AVX2
__m512d sum_avx512 = _mm512_setzer... |
#!/bin/bash
# Copyright 2022 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 law ... |
<gh_stars>1-10
INSERT INTO previous_document (name_en, name) VALUES
(
'Junior Specialist Diploma ; E16 067991;dated from 30/06/ 2016; issued by : College of Electronic Devices of Ivano-Frankivsk National Technical University Oil and Gas',
'Диплом молодшого спеціаліста ; E16 067991; 30.06.2016; Ким видано:Ко... |
// Copyright (C) MongoDB, Inc. 2017-present.
//
// 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
package command
import (
"context"
"github.com... |
/ *
* Logic Circuit to check if a binary number is even or odd.
*
* Outputs:
* D1: True if number is even.
* D2: True if number is odd.
*/
Xor(a=in[0],b=in[1],c=in1);
Xor(d=in[2],e=in[3],f=in2);
Xor(g=in1,h=in2,out[0]=D1);
Xnor(i=in1,j=in2,out[1]=D2); |
function add(a, b) {
return a + b;
}
function subtract(a, b) {
return a - b;
}
function multiply(a, b) {
return a * b;
}
function divide(a, b) {
return a / b;
}
function calculator(a, operator, b) {
switch(operator) {
case '+':
return add(a, b);
case '-':
return subtract(a, b);
case '*':
return multi... |
#!/bin/bash
set -e
NETRC_CREDS="./_netrc"
RUNTIME_TOOL="./send_runtime"
SUDO_PHRASE=${RUNTIME_PHRASE}
RPC_ADDR="rpc.dev.azero.dev"
WS_ADDR="ws.dev.azero.dev"
echo -n $(date +"%d-%b-%y %T") " Checking runtime version on devnet: "
OLD_VER=$(curl -sS -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0",... |
#=================================================
# SET ALL CONSTANTS
#=================================================
app=$YNH_APP_INSTANCE_NAME
dbname=$app
dbuser=$app
final_path="/opt/$app"
DATADIR="/home/$app"
REPO_PATH="$DATADIR/repositories"
DATA_PATH="$DATADIR/data"
# Detect the system architecture to downl... |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.