text stringlengths 1 1.05M |
|---|
import Day05 from './day-05';
export default class Challenge10 extends Day05 {
solve(): number {
for (let coords of this.input) {
this.drawLine(coords[0], coords[1], false);
}
return this.countOverlaps();
}
}
|
<filename>persistency/p3/AlbumNummerDAO.java
package muziekDAO;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
public class AlbumNummerDAO extends BaseDao {
private ArrayList<AlbumNummer> selectAlbumNummer(String qu... |
<gh_stars>0
/**
* @author 冷暖自知
* @date 2020/4/15 15:22
* @version 1.0
* @Description
*/
import request from '@/utils/request'
export default {
getSubjectList() {
return request({
url: '/eduservice/edu-subject/list',
method: 'get'
})
}
}
|
package estimator
import (
"testing"
"time"
"sync"
"sync/atomic"
"github.com/jech/galene/rtptime"
)
func TestEstimator(t *testing.T) {
now := rtptime.Jiffies()
e := new(now, time.Second)
e.estimate(now)
e.Accumulate(42)
e.Accumulate(128)
e.estimate(now + rtptime.JiffiesPerSec)
rate, packetRate :=
e.es... |
package com.partyrgame.blackhandservice.model;
import lombok.Data;
@Data
public class BlackHandNumberOfPlayers {
private int monstersTotal;
private int blackHandTotal;
private int towniesTotal;
public BlackHandNumberOfPlayers() {
this.monstersTotal = 0;
this.blackHandTotal = 0;
this.towniesTotal ... |
#!/usr/bin/env bash
set -euxo pipefail
GO111MODULE=off go get -u github.com/elastic/go-licenser
go get -d -t ./...
go mod download
go mod verify
if go mod tidy ; then
if [ -z "$(git status --porcelain go.mod go.sum)" ] ; then
echo "Go module manifest has not changed."
else
echo "Go module man... |
#!/usr/bin/env bash
sudo apt-get --yes --force-yes install \
git make gcc numactl libnuma-dev \
libmemcached-dev zlib1g-dev memcached \
libmemcached-dev libmemcached-tools libpapi-dev
wget https://github.com/ivmai/libatomic_ops/releases/download/v7.4.6/libatomic_ops-7.4.6.tar.gz
tar xzvf libatomic_ops-7.4.6... |
package mcjty.incontrol;
import mcjty.incontrol.commands.*;
import mcjty.incontrol.rules.EntityModCache;
import mcjty.incontrol.rules.RulesManager;
import mcjty.incontrol.setup.IProxy;
import mcjty.incontrol.setup.ModSetup;
import mcjty.tools.cache.StructureCache;
import net.minecraftforge.fml.common.Mod;
import net.... |
class EmailTask extends Task {
public function process() {
echo "Processing email task";
}
}
class PrintTask extends Task {
public function process() {
echo "Processing print task";
} |
const Axe = require('axe');
const signale = require('signale');
// const safeStringify = require('fast-safe-stringify');
// const { WebClient } = require('@slack/web-api');
// const titleize = require('titleize');
const pino = require('pino')({
customLevels: {
log: 30
},
hooks: {
// <https://github.com/pi... |
#!/bin/bash
XVID_SRC="https://downloads.xvid.com/downloads/xvidcore-1.3.7.tar.gz"
ffbuild_enabled() {
[[ $VARIANT == gpl* ]] || return -1
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage"
}
ffbuild_dockerbuild() {
mkdir xvid
cd xvid
wget -O xvid.tar.gz ... |
<filename>deno/lib/iterable/toIterable.ts
export function* toIterable<T>(iter: Iterable<T>): Iterable<T> {
yield* iter;
}
|
<reponame>AnDamazio/book4u-api<filename>src/core/dtos/book.dto.ts
import {
IsNumber,
IsString,
IsNotEmpty,
IsNotEmptyObject,
IsObject,
ValidateNested,
IsArray,
IsEnum,
IsOptional,
IsDate,
} from "class-validator";
import { Type } from "class-transformer";
import { CreateAuthorDto } from "./author.dt... |
<reponame>jiaqiluo/kubernetes<gh_stars>10-100
/*
Copyright 2018 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 requir... |
/* Copyright (c) 2021 Skyward Experimental Rocketry
* Authors: <NAME>, <NAME>, <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 ... |
SELECT *
FROM customers
ORDER BY age DESC
LIMIT 10; |
#!/bin/bash
export RUNNER_ALLOW_RUNASROOT=1
export PATH=$PATH:/actions-runner
deregister_runner() {
echo "Caught SIGTERM. Deregistering runner"
_TOKEN=$(bash /token.sh)
RUNNER_TOKEN=$(echo "${_TOKEN}" | jq -r .token)
./config.sh remove --token "${RUNNER_TOKEN}"
exit
}
_RUNNER_NAME=${RUNNER_NAME:-${RUNNER_N... |
MININIX_PKG_HOMEPAGE=https://www.gnu.org/software/bc/
MININIX_PKG_DESCRIPTION="Arbitrary precision numeric processing language"
MININIX_PKG_VERSION=1.07.1
MININIX_PKG_SRCURL=https://mirrors.kernel.org/gnu/bc/bc-${MININIX_PKG_VERSION}.tar.gz
MININIX_PKG_SHA256=62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664c... |
#!/bin/sh
mvn exec:java -Dexec.mainClass="com.weisong.test.comm.impl.CHazelcastWebSocketProxy"
|
def triangleArea(a,b,c):
s = (a+b+c) / 2
area = (s*(s-a)*(s-b)*(s-c))**0.5
return area |
#!/bin/bash
sudo rfkill block bluetooth
sudo killall bluetoothd
sudo bluetoothd -C &
sudo rfkill unblock bluetooth
sudo sdptool add sp
|
import requests
from bs4 import BeautifulSoup
def scrape(htmlPage):
soup = BeautifulSoup(htmlPage, 'html.parser')
productList = []
for product in soup.find_all('div', class_='product'):
productName = product.h2.text
productPrice = product.div.text
productList.append({
'name': productName,
'price': pro... |
<reponame>WalterHu/DemonCat
package org.spongycastle.tls;
import org.spongycastle.tls.crypto.TlsCrypto;
class TlsClientContextImpl
extends AbstractTlsContext
implements TlsClientContext
{
TlsClientContextImpl(TlsCrypto crypto, SecurityParameters securityParameters)
{
super(crypto, securityPara... |
<reponame>bbhunter/ipv666<filename>ipv666/cmd/generate/generate.go<gh_stars>100-1000
package generate
import (
"github.com/spf13/cobra"
"strings"
)
func init() {
Cmd.AddCommand(blgenCmd)
Cmd.AddCommand(modelgenCmd)
Cmd.AddCommand(addrgenCmd)
}
var generateLongDesc = strings.TrimSpace(`
The generation utilities ... |
require 'spec_helper'
require 'rhc/commands/port_forward'
describe RHC::Commands::PortForward do
before(:each) do
RHC::Config.set_defaults
end
describe 'run' do
let(:arguments) { ['port-forward', '--noprompt', '--config', 'test.conf', '-l', 'test<EMAIL>', '-p', 'password', '--app', 'mockapp'] }
be... |
package subcmd
import (
"log"
"os"
"path/filepath"
"time"
"github.com/Shizuoka-Univ-dev/cvpn/api"
)
func Execute() {
cmd := NewRootCmd()
cmd.SetOutput(os.Stdout)
if err := cmd.Execute(); err != nil {
if err := saveLogs(); err != nil {
log.Fatal(err)
}
cmd.SetOutput(os.Stderr)
cmd.Println(err)
o... |
import random
import string
def gen_random_password():
chars = string.ascii_letters + string.digits
password = ''.join(random.choice(chars) for _ in range(8))
return password
print(gen_random_password()) |
import os
from pymongo import errors, MongoClient
db_pass = <PASSWORD>('DBPASS')
client = MongoClient(
f"mongodb+srv://yanhkawakami:{db_pass}@<EMAIL>.<EMAIL>.mongodb.<EMAIL>/")
class UserDao:
def __init__(self):
self.users_db = client['users']
self.login_col = self.users_db['login']
... |
~/Documents/projectsUtilities/glvis-3.4/./glvis -run vis_dsl_test.glvs -fn -40
|
<gh_stars>0
import React from "react";
import { createStackNavigator } from "@react-navigation/stack";
import PokedexScreen from "../screens/Pokedex";
import PokemonScreen from "../screens/Pokemon";
const Stack = createStackNavigator();
export default function PokedexNavigation() {
return (
<Stack.Navigator>
... |
class OperationManager:
def operation1(self):
print("Operation 1 performed")
def operation2(self):
print("Operation 2 performed")
def operation3(self):
print("Operation 3 performed")
def perform_operations(self, operations):
for op in operations:
getattr(se... |
<filename>springboot_memcached/src/main/java/com/oven/controller/DemoController.java
package com.oven.controller;
import com.oven.config.MemcachedRunner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Re... |
#!/bin/bash
# Copyright 2015 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 ... |
/* PicLens Lite: version 1.3.1 (14221)
* Copyright (c) 2008 Cooliris, Inc. All Rights Reserved.
*
* The JavaScript part of PicLens Lite (i.e., this file) is BSD licensed (see: http://lite.piclens.com/bsdlicense)
* This launcher includes and interacts with SWFObject (MIT), BrowserDetect (BSD Compatible), and Lyteb... |
<filename>controller.go
package weigo
/*MVC的C层,控制器类*/
/*
控制器基类,框架控制器,业务控制器需要继承
*/
import (
"html/template"
"io"
"net/http"
"strings"
)
//控制器类
type Controller struct {
Context *Context
data map[string]interface{}
}
//控制器初始化
func (controller *Controller) Init(context *Context) {
controller.Context = context
... |
'use strict';
class _gd_sandbox_project{
constructor(project_name, projectFolder = new _gd_sandbox_folder(project_name, "div") ){
if( !(typeof project_name == "string") )
throw new TypeError('typeof project_name == "string"');
if(!(projectFolder instanceof _gd_sandbox_folder)... |
CREATE TABLE [Retail].[SalesDetail] (
[InvoiceNo] UNIQUEIDENTIFIER NOT NULL,
[Description] NVARCHAR (100) NULL,
[Qty] INT NULL,
[Price] NUMERIC (18, 2) NULL,
[TotalValue] NUMERIC (18, 2) NULL,
[Discount] NUMERIC (18, 2) NULL,
[NetDisco... |
Vue.component('coupon',{
data(){
return{
code:'',
invalides:['notkoko','koko']
}
}, template:`<input type="text" :value="code" @input="updateCode($event.target.value)" ref="input">`,
methods:{
updateCode(code){
if(this.invalides... |
def CalculateDistanceMoved(speed, time):
distance = speed * time
return distance |
/////////////////////////////////////////////////////////////
// UserManagementService.java
// gooru-api
// Created by Gooru on 2014
// Copyright (c) 2014 Gooru. All rights reserved.
// http://www.goorulearning.org/
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and ... |
#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
rpc_server=/var/tmp/spdk-raid.sock
rpc_py="$rootdir/scripts/rpc.py -s $rpc_server"
tmp_file=/tmp/raidrandtest
source $rootdir/test/common/autotest_common.sh
source $testdir/nbd_common.sh
function raid_unmap_data_verify() {... |
#!/usr/bin/env bash
##
## Copyright (c) 2020 Hanson Robotics.
##
## This file is part of Hanson AI.
## See https://www.hansonrobotics.com/hanson-ai for further info.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtai... |
import { ExpansionPanelSummary } from '@material-ui/core'
import blue from '@material-ui/core/colors/blue'
import { makeStyles } from '@material-ui/core/styles'
import EditIcon from '@material-ui/icons/Edit'
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
import React from 'react'
// eslint-disable-next-lin... |
<filename>qutebrowser/greass monkey/duckduckgo.js
// ==UserScript==
// @name Duckduckgo custom CSS
// @namespace https://github.com/olmokramer
// @description Custom CSS for *.duckduckgo.com
// @include *.duckduckgo.com
// @include *duckduckgo.com
// @run-at document-start
// @version 2
// @au... |
class NginxMetrics:
def __init__(self):
self.metrics = {}
def add_metric(self, name, value):
if name in self.metrics:
self.metrics[name].append(value)
else:
self.metrics[name] = [value]
def get_metric(self, name):
return self.metrics.get(name, [None]... |
#!/bin/bash
#SBATCH --gres=gpu:2 # request GPU "generic resource"
#SBATCH --cpus-per-task=6 # maximum CPU cores per GPU request: 6 on Cedar, 16 on Graham.
#SBATCH --mem=15000M # memory per node
#SBATCH --time=0-06:00 # time (DD-HH:MM)
#SBATCH --output=scripts/caps_r/cifar10/train/o_train_BIM_ep1_it... |
<reponame>dennisdrew/mysharepal
/**
* Determines which screen / experience the app should route to, based on current user state, like:
*
* - Is logged in
* - Does belong to a ministry
* - Is a ministry admin
*
* Etc.
*/
import { ContactsStates } from './presentation/redux/Contacts'
import { MinistryMgmtStates... |
import employeeService from '../services/EmployeeService';
import Employee from '../models/Employee';
class EmployeeController {
create (req: any, res: any) {
const employee: Employee = req.body.employee;
employeeService.create(employee);
}
getAll (req: any, res: any) {
return emp... |
parallel --jobs 32 < ./results/exp_threads/run-1/lustre_5n_32t_6d_1000f_617m_5i/jobs/jobs_n0.txt
|
#!/bin/bash
for i in `find . -name "swagger.yaml" -type f`; do
echo "validating $i"
pipenv run openapi-spec-validator --schema 2.0 $i
done |
#!/bin/bash
tar -xf contour-detection-model.tar.gz
rm -f contour-detection-model.tar.gz |
<filename>tests/publish.test.js<gh_stars>1-10
'use strict';
process.env.QUEUE_LOG_PAYLOAD = 'true';
const tape = require('tape');
const queueLib = require('./../lib/index');
const config = require('./config');
const test_routes = { test1: 'test.test1', error_test: 'test.errorSync' };
const makeRouterWithHandler = ()... |
<filename>runescape-client/src/main/java/AbstractSocket.java
import java.io.IOException;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("li")
@Implements("AbstractSocket")
public ab... |
<reponame>lananh265/social-network<filename>node_modules/react-icons-kit/linea/basic_cards_diamonds.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.basic_cards_diamonds = void 0;
var basic_cards_diamonds = {
"viewBox": "0 0 64 64",
"children": [{
"name": "polygon",
... |
<gh_stars>0
export const api = () => null;
|
import java.io.File;
import java.io.IOException;
import opennlp.tools.doccat.DoccatModel;
import opennlp.tools.doccat.DocumentCategorizerME;
import opennlp.tools.doccat.DocumentSample;
import opennlp.tools.util.ObjectStream;
import opennlp.tools.util.ObjectStreamUtils;
import opennlp.tools.util.PlainTextByLineStream;... |
#!/usr/bin/env bash
set -e
if [ -n "$SKIP_TESTS" ]; then
exit 0
fi
# Windows doesn't run the NTLM tests properly (yet)
if [[ "$(uname -s)" == MINGW* ]]; then
SKIP_NTLM_TESTS=1
fi
SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
BUILD_DIR=$(pwd)
TMPDIR=${TMPDIR:-/tmp}... |
use physx_sys::{PxFoundation, PxAllocatorCallback, PxErrorCallback, PxDefaultErrorCallback, PxDefaultAllocator};
fn initialize_physx_foundation() -> Result<PxFoundation, String> {
unsafe {
let allocator = PxDefaultAllocator;
let error_callback = PxDefaultErrorCallback;
let foundation = PxFo... |
def square_numbers(numbers):
squares = []
for num in numbers:
squares.append(num ** 2)
return squares
# Create new array containing the squares
squares = square_numbers(numbers) |
<filename>modelci/app/experimental/endpoints/cv_tuner.py<gh_stars>100-1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Author: yuanmingleee
Email:
Date: 1/29/2021
"""
import torch
from fastapi import APIRouter
from modelci.experimental.model.model_structure import Structure, Operation
from modelci.hub.registra... |
<reponame>bike7/testingtasks
package pl.kasieksoft.addressbook.model;
public class GroupDataBuilder {
private int id = Integer.MAX_VALUE;
private String name;
private String header;
private String footer;
private GroupDataBuilder() {
}
public static GroupDataBuilder aGroupData() {
... |
<reponame>freerware/negotiator
/* Copyright 2020 Freerware
*
* 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 ap... |
<reponame>dogboydog/wanikani-cli
/* tslint:disable */
/* eslint-disable */
/**
* WaniKani
* WaniKani: The API
*
* OpenAPI spec version: 20170710.0
*
*
*/
/**
*
* @export
* @interface SummaryData
*/
export interface SummaryData {
/**
* Details about subjects available for lessons. See table below f... |
package io.github.marcelbraghetto.football.framework.providers.football.contracts;
import android.net.Uri;
import android.support.annotation.NonNull;
import java.util.List;
import io.github.marcelbraghetto.football.framework.providers.football.models.FootballGame;
/**
* Created by <NAME> on 6/12/15.
*
* Provider... |
OUTPUT_DIR="$(pwd)/vitis_run"
# name of the top function
TOP=kernel0
# choose the target device
PLATFORM=xilinx_u250_xdma_201830_2
#PLATFORM=xilinx_u280_xdma_201920_3
XO="$(pwd)/kernel0.xo"
# For different approaches see UG904-vivado-implementation
#STRATEGY="Default"
STRATEGY="EarlyBlockPlacement"
# remove th... |
import numpy as np
from itertools import combinations
def optimize_generator_placement(n, m, k):
adj_matrix = np.zeros((n, n)) # Initialize the adjacency matrix with zeros
# Populate the adjacency matrix with transmission costs (example values)
# Replace the following with actual transmission costs in th... |
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
const PAPYRUS_ENDPOINT = 'https://prebid.papyrus.global';
const PAPYRUS_CODE = 'papyrus';
export const spec = {
code: PAPYRUS_CODE,
/**
* Determines whether or not the given bid request is valid. Valid bi... |
<gh_stars>0
"""Constants for the Zeversolar Inverter local integration."""
from homeassistant.const import Platform
# Base component constants
NAME = "Zeversolar Local Integration"
DEVICE_NAME = "Zeversolar Inverter"
DEVICE_MODEL = "Universal Inverter Device"
MANUFACTURER_NAME = "Zeversolar"
ISSUE_URL = "https://gith... |
// filtering of operator list based on search term
(function() {
let lastSearch = null;
function makeSearchResultDraggable($elem) {
if ($elem.hasClass('drag-initialized')) {
return;
}
$elem.addClass('drag-initialized');
$elem.find('.draggable').draggable({
... |
package api
import (
"context"
internalHTTP "github.com/matrix-org/dendrite/internal/http"
"github.com/matrix-org/gomatrixserverlib"
"github.com/opentracing/opentracing-go"
)
const (
// RoomserverPerformJoinPath is the HTTP path for the PerformJoin API.
RoomserverPerformJoinPath = "/api/roomserver/performJoin"... |
#!/bin/bash
. cfg.sh
#
var=${1:?You have to provide an EDB text filename with no spaces as an argument}
# Creates a timestamp for the directory name
timestamp=$(date +%m%d%y-%H%M%S)
# Creates a folder with a name composed of the timestamp and the text file argument
mkdir $timestamp$1-tbe-noSpeaker
#
#
while IFS= read -... |
<reponame>tylerw1369/diverDriver
package ipccommon
import (
"bytes"
"errors"
"github.com/lunixbochs/struc"
"github.com/sigurn/crc8"
)
const (
IpcCmdNotification = 0x01 // S => C: Text messages to the client
IpcCmdResponse = 0x02 // S => C: Response to a IPC_CMD
IpcCmdError = 0x03 // S =... |
from sklearn.preprocessing import LabelEncoder
labelencoder = LabelEncoder()
x_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
# Encode the categorical features
x_train[:, 3] = labelencoder.fit_transform(x_train[:, 3].astype(str))
x_test[:, 3] = labelencoder.fit_transform(x_test... |
import sys
class VersionControlSystem:
def __init__(self):
self.staged_files = []
self.stashed_files = []
def add_files(self):
self.staged_files = ["file1", "file2", "file3"] # Simulating adding files to the staging area
print("Added all files to the staging area.")
def c... |
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .mixins import OpenMetricsScraperMixin
from ..base import AgentCheck
from ...errors import CheckException
class OpenMetricsBaseCheck(OpenMetricsScraperMixin, AgentCheck):
"""
OpenMetricsBaseCheck is... |
import '../../src/ext/array/to-set';
describe('Array.toSet', () => {
const testData = [
{ id: 3, name: 'Bob' },
{ id: 2, name: 'Char' },
{ id: 4, name: 'Alex' },
{ id: 1, name: 'Bob' },
];
it('key = id', () => {
// exercise
const actual = testData.toSet((item) => item.id);
// verify... |
#include <chrono>
#include <iostream>
#include <string>
#include <cstring> // memcpy
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#ifdef __clang__
// clang version 3.6.2 sets GNUC fields to version to 4.2.1
#define PRIVATE_OMP_H 40201
#else
// g++ (Ubuntu 5.2.1-22ubuntu2) ... |
<filename>heima-leadnews-model/src/main/java/com/heima/model/behavior/pojos/ApForwardBehavior.java<gh_stars>0
package com.heima.model.behavior.pojos;
import com.heima.model.annotation.IdEncrypt;
import lombok.Data;
import java.util.Date;
@Data
public class ApForwardBehavior {
private Long id;
@IdEn... |
#!/usr/bin/env bash
################################################################################
# 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. T... |
#! /bin/bash
#SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res_run3/run_rexi_fd_par_m0512_t014_n0128_r0014_a1.txt
###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_... |
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
<gh_stars>10-100
package server
import (
"github.com/go-kratos/kratos/v2/log"
"github.com/go-kratos/kratos/v2/middleware/logging"
"github.com/go-kratos/kratos/v2/middleware/metrics"
"github.com/go-kratos/kratos/v2/middleware/recovery"
"github.com/go-kratos/kratos/v2/middleware/tracing"
"github.com/go-kratos/krat... |
def find_cluster_center(matrix):
# initialize the cluster center to zeros
cluster_center = [0, 0]
# loop through the elements of the matrix
for point in matrix:
# add each element to the cluster center
cluster_center[0] += point[0]
cluster_center[1] += point[1]
# calculate th... |
FRAMEWORK=$1
BUILD_DIR="."
OUTPUT="${BUILD_DIR}/Debug-Universal"
framework=$FRAMEWORK
rm -rf "${OUTPUT}"
mkdir -p "${OUTPUT}"
cp -R "${BUILD_DIR}/Debug-iphoneos/${framework}.framework" "${OUTPUT}/"
lipo -create -output "${OUTPUT}/${framework}.framework/${framework}" "${BUILD_DIR}/Debug-iphoneos/${framework}.framewo... |
<reponame>Rhobal/objectify<gh_stars>0
package com.googlecode.objectify.impl;
import com.google.cloud.datastore.KeyValue;
import com.google.cloud.datastore.ListValue;
import com.google.cloud.datastore.NullValue;
import com.google.cloud.datastore.Value;
import com.googlecode.objectify.Key;
import com.googlecode.o... |
package cmu.xprize.comp_spelling;
import org.json.JSONObject;
import java.util.List;
import cmu.xprize.util.ILoadableObject;
import cmu.xprize.util.IScope;
import cmu.xprize.util.JSON_Helper;
/**
* Automatically generated w/ script by <NAME>.
*/
public class CSpelling_Data implements ILoadableObject{
// jso... |
#!/bin/bash
set -eux
if [ "x${1:-}" = x ]; then
echo "Missing version number" >&2
exit 1
fi
VERSION="$1"
cd "$(dirname "$0")/../.."
cp scripts/dist/pyinstaller_entrypoint.py scripts/dist/macos/macos.spec .
poetry install
scripts/update_translations.sh
rm -rf build dist
pyinstaller macos.spec
rm -rf dist/tagu... |
package org.hisp.dhis.aggregation.impl;
/*
* Copyright (c) 2004-2012, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the a... |
#!/bin/bash
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 ... |
<reponame>KaiVolland/geoext2<gh_stars>0
/*
* Copyright (c) 2008-2015 The Open Source Geospatial Foundation
*
* Published under the BSD license.
* See https://github.com/geoext/geoext2/blob/master/license.txt for the full
* text of the license.
*/
Ext.require([
'GeoExt.panel.Map',
'GeoExt.slider.Zoom',
... |
#!/usr/bin/env bash
cd ../
python build_videos.py ../../data/sthv1/rawframes/ ../../data/sthv1/videos/ --fps 12 --level 1 --start-idx 1 --filename-tmpl '%05d'
echo "Encode videos"
cd sthv1/
|
package cfg;
import java.awt.EventQueue;
import javax.swing.JButton;
import javax.swing.JFrame;
public class ConfigReaderMain {
private JFrame frame;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
ConfigReaderMain window = new ConfigReader... |
module.exports = [{
plugin: require('/Users/anjalidevakumar/portfolioweb2.0/node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),
options: {"plugins":[],"trackingId":"UA-XXXXXXXX-X","anonymize":true},
},{
plugin: require('/Users/anjalidevakumar/portfolioweb2.0/gatsby-browser.js'),
... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
#######################################################################################
# 请配置以下参数
COLMAP_FOLDER_PATH=/home/mm/ARWorkspace/colmap/
PROJECT_PATH=/data/largescene/C11_base/
SRC_PATH=$PROJECT_PATH/videos
DST_PATH=$PROJECT_PATH/images
SMALL_DST_PATH=$PROJECT_PATH/images_ds
INTERVAL=15
SHORT_SIZE=640
IMAGE_LI... |
class HashTable {
private int buckets;
private List<HashNode> nodes;
public HashTable(int buckets) {
this.buckets = buckets;
nodes = new ArrayList<HashNode>();
for (int i = 0; i < buckets; i++) {
nodes.add(new HashNode());
}
}
public void add(Str... |
if node['cloudless-box']['firewall'] != false
include_recipe 'iptables::default'
%w{http ssh}.each do |rule|
iptables_rule "#{rule}" do
source "firewall/#{rule}.erb"
action :enable
end
end
end
|
cd prices
cargo build
cp target/debug/prices ../executables/prices |
module Leafy
module Coder
Default = JSON
end
end
|
<gh_stars>0
//
// SAMControllerTool.h
// SamosWallet
//
// Created by zys on 2018/8/29.
// Copyright © 2018年 zys. All rights reserved.
//
/**
项目Controller相关的方法
*/
#import <Foundation/Foundation.h>
@interface SAMControllerTool : NSObject
/**
设置root vc:
1.第一次安装,显示蓝色管理钱包页(设置钱包密码弹窗)
2.创建或导入钱包后,第一次显示引导页
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.