text stringlengths 1 1.05M |
|---|
/** @module ecs/raw/emitter/Emitter */
import { initFromConfig } from "/scripts/util/config.js"
export default class Emitter {
static defaultCreate = () => null
static defaultTimer = null
static defaultEnabled = true
constructor(config = {}) {
initFromConfig(this, config, Emitter, "create", "tim... |
<filename>backend/tests/wallet_tests/services/system/test_sync_until_specific_version.py
from tests.wallet_tests.services.system.utils import (
check_balance,
add_incoming_transaction_to_blockchain,
add_outgoing_transaction_to_blockchain,
check_number_of_transactions,
)
from tests.wallet_tests.services.... |
package io.opensphere.controlpanels.layers.groupby;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import io.opensphere.core.util.collections.New;
import io.opensphere.mantle.data.DataGroupInfo;
import io.opensphere.mantle.data.DataTypeInfo;
import io... |
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/rxlabz/dev/tools/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/rxlabz/dev/projects/audioplayer2/audioplayer/audioplayer"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_FRAMEWORK_DIR=/Users/rxlabz/dev/tools/... |
-- --------------------------------------------------------
-- 主机: 192.168.215.70
-- 服务器版本: 5.5.18 - MySQL Community Server (GPL)
-- 服务器操作系统: Win32
-- HeidiSQL 版本: 9.3.0.4984
-- -------------------------------------------------------... |
<gh_stars>10-100
package com.telenav.osv.upload.operation;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.util.Consumer;
import androidx.core.util.Pair;
import com.telenav.osv.common.event.SimpleEventBus;
import com.telenav.osv.data.score.model.... |
package com.infamous.zod.storage.repository.impl;
import com.infamous.framework.persistence.DataStoreManager;
import com.infamous.framework.persistence.dao.AbstractDAO;
import com.infamous.framework.persistence.dao.EntityDAO;
import com.infamous.zod.storage.model.StorageFile;
import com.infamous.zod.storage.model.Stor... |
<reponame>axinc-ai/kaggle-facial-keypoints
import torch
import sys
from torch.autograd import Variable
def torch2onnx(filename, image_size):
try:
model = torch.load(filename, map_location={"cuda:0": "cpu"})
except IOError:
print("Could not find " + filename)
sys.exit(0)
model.trai... |
#!/usr/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
rm -rf ClassyVision
git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision || exit
git reset --hard 478... |
<gh_stars>1-10
// Generated by script, don't edit it please.
import createSvgIcon from '../../createSvgIcon';
import CloneSvg from '@rsuite/icon-font/lib/legacy/Clone';
const Clone = createSvgIcon({
as: CloneSvg,
ariaLabel: 'clone',
category: 'legacy',
displayName: 'Clone'
});
export default Clone;
|
<gh_stars>1-10
#include "include/quick_scanner/quick_scanner_plugin.h"
// This must be included before many other Windows headers.
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Devices.Enumeration.h>
#include <winrt/Windows.Devices.... |
/* TODO(davedash): Clean this up, it's copied straight from Remora */
var collections = {};
/**
* These members need to be set on the collections object:
* subscribe_url
* unsubscribe_url
* adding_text
* removing_text
* add_text
* remove_text
*
* Optional:
* adding_img
* removing_img
* re... |
package io.opensphere.hud.glswing;
import java.awt.AWTEvent;
import java.awt.Container;
import java.awt.Toolkit;
import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import io.opensphere.core.control.ui.InternalCo... |
# Copyright 2021, The TensorFlow Federated 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 o... |
import { Component, Input } from '@angular/core';
import { SpotifyService } from '../../../services/spotify.service';
import { AuthService } from '../../../services/auth.service';
import { User } from '../../../models/user.model';
@Component({
selector: 'link-spotify-form',
template: `
<div *ngIf="!linkedToSpo... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 30 Gru 2017, 13:35
-- Wersja serwera: 10.1.21-MariaDB
-- Wersja PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
import json
from tqdm import tqdm
from torch.utils.tensorboard import SummaryWriter
def write_loss_to_tensorboard(log_file_path: str):
tb_writer = SummaryWriter() # Initialize TensorBoard writer
with open(log_file_path, 'r') as file:
lines = file.readlines()
for epoch, line in tqdm(enumerate(l... |
<reponame>Richienb/p-tap<gh_stars>0
'use strict';
const pTap = tapHandler => async value => {
await tapHandler(value);
return value;
};
module.exports = pTap;
// TODO: Remove this for the next major release
module.exports.default = pTap;
module.exports.catch = tapHandler => async error => {
await tapHandler(error... |
const { logger } = require('@vtfk/logger')
const withTokenAuth = require('../lib/token-auth')
const { getStudent } = require('../lib/api/students')
const { getTeachers } = require('../lib/api/teachers')
const repackTeacher = require('../lib/repack-teacher')
const returnStudents = async function (context, req) {
... |
package com.wix.sms.bulksms.model
/**
* Response status codes.
* @see <a href="http://developer.bulksms.com/eapi/submission/send_sms/#returns">Returns</a>
*/
object StatusCodes {
/** A normal message submission, with no error encountered so far. */
val inProgress = "0"
val scheduled = "1"
val inte... |
/**
*
* RoadMap
*
*/
import React from 'react';
// import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
class RoadMap extends React.Component { // eslint-disable-line react/prefer-stateless-function
constructor(props){
super(props);
this.... |
#!/bin/sh
# author: snikons
set -e
function build {
echo "building..."
exec > _build.log
exec 2>&1
./build.sh
}
function unit_tests {
echo "running unit tests..."
bin/packet-analyzer-unit-tests
}
function system_tests {
echo "running system tests..."
for pcap_file in test/data/*.pcap; do
echo "... |
#!/usr/bin/env bash
YW=`echo "\033[33m"`
BL=`echo "\033[36m"`
RD=`echo "\033[01;31m"`
CM='\xE2\x9C\x94\033'
GN=`echo "\033[1;92m"`
CL=`echo "\033[m"`
while true; do
read -p "This will create a New Zigbee2MQTT LXC. Proceed(y/n)?" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Ple... |
def calculate_sum(numbers):
return sum(numbers) |
package me.illuminator3.aar;
import org.bukkit.command.CommandExecutor;
public class Utils
{
public static double cut(double value, int precision)
{
String s = Double.toString(value);
return Double.parseDouble(s.substring(0, s.indexOf(".") + precision + 1));
}
public static CommandEx... |
<reponame>rovedit/Fort-Candle
#pragma once
#include <array>
#include <memory>
#include <string>
#include <glow/common/shared.hh>
#include <glow/fwd.hh>
#include <glow/std140.hh>
#include "../../fwd.hh"
#include "../../lights/Light.hh"
#include "../RenderStage.hh"
#include "../StageCamera.hh"
namespace glow
{
namesp... |
const path = require('path')
const fs = require('fs')
const webpack = require('webpack')
const WebpackBar = require('webpackbar')
const ESLintPlugin = require('eslint-webpack-plugin')
const HTMLWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const environme... |
@RestController
@RequestMapping("/items")
public class ItemsController {
@Autowired
private ItemsRepository itemsRepository;
@GetMapping
public List<Item> list() {
return itemsRepository.findAll();
}
@PostMapping
public Item create(@RequestBody Item item) {
return itemsRepository.save(item);
... |
list = [3, 6, 9, 12, 15]
sum = list[0] + list[-1]
print("The sum is: ", sum) |
/*tslint:disable:no-unused-variable */
import { Injectable, ReflectiveInjector } from '@angular/core';
import { async, inject, TestBed } from '@angular/core/testing';
import { AngularFireDatabase } from 'angularfire2/database';
import { Subject } from 'rxjs/Rx';
import { AfoListObservable } from './afo-list-observable... |
<reponame>winton/a_b_server<gh_stars>1-10
require File.expand_path('../../gems', __FILE__)
ABServer::Gems.require(:console)
$:.unshift File.dirname(__FILE__) + '/../'
require 'boot/application'
require 'boot/sinatra'
require 'boot/active_wrapper'
require 'boot/delayed_job'
require 'boot/model'
require 'boot/job' |
<gh_stars>10-100
/*
* DSFML - The Simple and Fast Multimedia Library for D
*
* Copyright (c) 2013 - 2018 <NAME> (<EMAIL>)
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the
* use of this software.
*
* Pe... |
#!/bin/bash
CLIENT_NAME=$1
if [[ -z "$CLIENT_NAME" ]]; then
CLIENT_NAME='0'
fi
echo "client name is: $CLIENT_NAME"
cd tls
# Client key
openssl ecparam \
-genkey \
-name secp384r1 \
-out client_$CLIENT_NAME.key
# Client cert
openssl req \
-new \
-key client_$CLIENT_NAME.key \
-subj "/O=Y... |
(function() {
'use strict';
angular
.module('app.station')
.controller('StationDataGroupsCtrl', StationDataGroupsCtrl);
StationDataGroupsCtrl.$inject = [
'_station', '_groupList', '_groups'
];
function StationDataGroupsCtrl(_station, _groupList, _groups) {... |
package br.com.agateownz.foodsocial.modules.user.service;
import br.com.agateownz.foodsocial.modules.user.model.UserFollower;
import br.com.agateownz.foodsocial.modules.user.model.UserFollowerId;
import br.com.agateownz.foodsocial.modules.user.model.UserFollowing;
import br.com.agateownz.foodsocial.modules.user.model.... |
def construct_factor_graph(edges, fmap, factor_index, vid, var_map, fmp_index, feature_id, features, variables):
def binary_edge(edge_index, factor_index, var1_index, var2_index):
# Implementation of binary_edge function is assumed to be provided elsewhere
pass
edges.append(binary_edge(len(edge... |
<filename>title/arm9/source/graphics/graphics.cpp
/*-----------------------------------------------------------------
Copyright (C) 2015
<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 by the Free Software Foundation; ei... |
#!/bin/bash
msg "customizing ssh daemon configuration"
cat << EOF >> /etc/ssh/sshd_config
# Setup for Docker PANDA user.
Match User $DOCKER_USER
X11Forwarding no
AllowTcpForwarding no
AllowStreamLocalForwarding no
ForceCommand $PANDA_PATH/bin/recvmssh.sh
#StrictHostKeyChecking no
# Setup for root.
Match User roo... |
<reponame>Sahanovskyi/Econsave<filename>domain/src/main/java/com/gw/domain/repository/Repository.java<gh_stars>1-10
package com.gw.domain.repository;
import com.gw.domain.model.DecisionItem;
import com.gw.domain.model.PrivatBank.PrivatBankClient;
import com.gw.domain.model.TransactionItem;
import java.util.List;
im... |
<reponame>muthukumaravel7/armnn
var _test_input_output_layer_visitor_8cpp =
[
[ "BOOST_AUTO_TEST_CASE", "_test_input_output_layer_visitor_8cpp.xhtml#ad3d9cbf26cb5894fd6d9169dbe743417", null ],
[ "BOOST_AUTO_TEST_CASE", "_test_input_output_layer_visitor_8cpp.xhtml#ac7ce83f024515592cffac13ae5220f1e", null ],
... |
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="broker.ts"/>
/// <reference path="active-state.ts"/>
/// <reference path="backtest.ts"/>
/// <reference path="config.ts"/>
/// <reference path="fair-value.ts"/>
/// <reference path="interfaces.ts"/>
/// <re... |
class RestrictionListType < ActiveModel::Type::Value
def cast(value)
value.map { |restriction| RestrictionType.new.cast(restriction) }.freeze
end
end
|
#!/bin/bash
set -e
# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part ... |
#!/bin/sh
# Build and install the IPL documentation
# Assumes you're running this from the unidoc source directory
UBASE=$(realpath ../..)
if [ -z "${htmldir}" ]; then
htmldir=${UBASE}/doc
fi
SBASE=${UBASE}/ipl
TBASE=${htmldir}/ipl-api
DIRS="procs gprocs mprocs progs gprogs mprogs"
# SDIRS and LDIRS are comma-sepa... |
StartTest(function(t) {
t.testBrowser(function (t) {
document.body.innerHTML = '<input id="input" type="text" maxlength="8" />';
var input = document.getElementById('input');
t.chain(
{
type : '1234567890',
target : input
... |
import { combineReducers } from 'redux';
import apiInfo from './apiInfo';
import loginInfo from './loginInfo.js';
import driversInfo from './driversInfo';
import ridersInfo from './ridersInfo';
import matchesInfo from './matchesInfo';
import matchesOtherDriverInfo from './matchesOtherDriverInfo';
import uploadInfo from... |
<gh_stars>1-10
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <drivers/timer/system_timer.h>
#include <sys_clock.h>
#include <spinlock.h>
#include <arch/arm/cortex_m/cmsis.h>
void z_arm_exc_exit(void);
#define COUNTER_MAX 0x00ffffff
#define TIMER_STOPPED 0xff000000
... |
#!/bin/sh
# Run this script to generate the configure script and other files that will
# be included in the distribution. These files are not checked in because they
# are automatically generated.
set -e
# Check that we're being run from the right directory.
if test ! -f src/google/protobuf/stubs/common.h; then
c... |
<reponame>jntakpe/bbl-msa<filename>notification-service/src/main/java/com/sopra/bbl/msa/notifications/client/ProfileClient.java
package com.sopra.bbl.msa.notifications.client;
import com.sopra.bbl.msa.notifications.dto.ProfileNotificationDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.sprin... |
################################################################################
### Head: luaenv
##
export LUAENV_ROOT="$HOME/.luaenv"
export PATH="$LUAENV_ROOT/bin:$PATH"
eval "$(luaenv init -)"
##
### Tail: luaenv
################################################################################
|
#!/bin/bash
echo "Shutting down separate units!"
rlwrap $1/syn -f2 $1/machines/test01/ShutdownMachine.clp
tmux kill-session -t test01_xu
#TODO: put in code to delete the frontend connection
rm -rf /tmp/machines/test01
|
import Debug from "debug";
import { Address, BalanceUpdate, CreateSwapPayload, LoanDetails, Status, Trade, Txid, WalletStatus } from "./models";
Debug.enable("*");
const debug = Debug("wasmProxy");
export async function walletStatus(name: string): Promise<WalletStatus> {
const { wallet_status } = await import("./... |
const isUnique = ( str ) => {
const strSet = new Set();
for ( let i = 0; i < str.length; i++ ) {
if ( strSet.has( str[ i ] ) ) return false;
strSet.add( str[ i ] );
}
return true;
};
console.log( isUnique( 'abcdhijklmnopqrstuv' ) ); // true
console.log( isUnique( 'abcdefga' ) ); // false
|
class MultiplicationTable {
// function to print table
def printTable(n: Int){
for (i <- 1 to 10){
println(n + " * " + i + " = " + n*i)
}
}
// main function
def main(args: Array[String]): Unit = {
println("Table of 6:")
printTable(6)
}
} |
#!/bin/sh
set -e
UNSIGNED=$1
SIGNATURE=$2
ARCH=x86_64
ROOTDIR=dist
BUNDLE=${ROOTDIR}/Akik-Qt.app
TEMPDIR=signed.temp
OUTDIR=signed-app
if [ -z "$UNSIGNED" ]; then
echo "usage: $0 <unsigned app> <signature>"
exit 1
fi
if [ -z "$SIGNATURE" ]; then
echo "usage: $0 <unsigned app> <signature>"
exit 1
fi
rm -rf $... |
package kbasesearchengine.system;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.uti... |
# this file can be used by developers to run all tests localy before travis
# it must be called from the root directory
# TODO not working
#python3 gelato/core/tests/test_calculus.py
python3 gelato/core/tests/test_derivatives.py
python3 gelato/core/tests/test_space.py
python3 gelato/core/tests/test_expr_1d.py
python3... |
#!/bin/bash
if [ -z "$CONFIG" ]
then
export CONFIG=Debug
fi
if [ -z $IOS_SDK_VERSION ]; then
IOS_SDK_VERSION="13.1"
fi
DEFAULT_OUTPUT=../../libs/ios$IOS_SDK_VERSION-$CONFIG
#--------------------------------------------------
#
# Canonicalize relative paths to absolute paths
#
if [ -z "$OUTPUT_DIR" ]
then
m... |
#!/bin/bash
# mcfly - Shell history search
# https://github.com/cantino/mcfly
set -euo pipefail
wget -O /tmp/mcfly.tar.gz "$( \
curl -s 'https://api.github.com/repos/cantino/mcfly/releases/latest' \
| jq -r '.assets | .[] | .browser_download_url | select(endswith("x86_64-unknown-linux-gnu.tar.gz"))'\
)"
mkdir... |
package org.trenkmann.restsample.controller;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import lombok.S... |
from rest_framework import serializers
class DurationField(serializers.IntegerField):
pass
|
<reponame>shirou/VSNowm
import * as vscode from "vscode";
import * as path from "path";
import { FileItem } from "../utils";
export class NoteTreeItem extends vscode.TreeItem {
public filePath: string;
public ctime: number;
public mtime: number;
public permissions?: vscode.FilePermission;
public size: number... |
<gh_stars>10-100
import com.mittudev.ipc.Connection;
import com.mittudev.ipc.Message;
import com.mittudev.ipc.ConnectionCallback;
import java.lang.Thread;
class Callback implements ConnectionCallback{
public int recived = 0;
public void onMessage(Message msg){
System.out.println(new String(msg.getData()));
reciv... |
package de.ids_mannheim.korap.web;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.UniformInterfaceException;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
import com.sun.jersey.... |
#!/usr/bin/env bats
setup() {
[ ! -z $LC_ALL ] && export LC_ALL="en_US.UTF-8"
utils=$(cd $BATS_TEST_DIRNAME/..; pwd)/utils
tmpdir=$(mktemp -d testXXXXXX)
cat << EOF > $tmpdir/test1.json
{"utts": {"uttid1": [{"feat": "aaa.ark:123", "text": "あ い"}]}}
EOF
cat << EOF > $tmpdir/test2.json
{"utts": {"u... |
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import Home from './containers/Home';
import registerServiceWorker from './registerServiceWorker';
import configureStore from './store';
import './styles/css/fonts/stylesheet.css';
import './styles/css/reset... |
<reponame>tactilenews/100eyes
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe RequestRow::RequestRow, type: :component do
subject { render_inline(described_class.new(**params)) }
let(:the_request) { create(:request) }
let(:params) { { request: the_request } }
it { should have_css('.Reque... |
import tkinter as tk
import tkinter.font as tkFont
import tkinter.ttk as ttk
import pymysql.cursors
connection = pymysql.connect(
host='milogert.com',
user='milo',
passwd='<PASSWORD>',
db='personal',
charset='utf8mb4',
cursorclass=pymysql.cursors.DictCursor
)
def calculate(*args):
try:
... |
<gh_stars>0
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _... |
/**
* Validates the input value based on the specified length constraints.
* @param {Object} options - The options for validation.
* @param {string} options.value - The input value to be validated.
* @param {number} options.minLength - The minimum length allowed for the input value.
* @param {number} options.maxLe... |
class Student:
def __init__(self, student_id):
self.student_id = student_id
self.grades = {}
def set_grade(self, subject, grade):
self.grades[subject] = grade
def get_grade(self, subject):
return self.grades[subject]
def get_average_grade(self):
total = sum(sel... |
#!/bin/bash
/setup-ssh.sh
rm -rf /root/.ssh/*
cp /work/example_cluster/ssh_config /root/.ssh/config
ssh-keygen -f /root/.ssh/id_rsa -N ''
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/*
/usr/sbin/sshd
# This is a hack because we're not creating a real package which would... |
import { Configuration } from '../config/configuration';
import createRemoteJWKSet from 'jose/jwks/remote';
import { NextFunction, Request, Response } from 'express';
import jwtVerify, { GetKeyFunction, JWSHeaderParameters } from 'jose/jwt/verify';
import { constants } from 'http2';
import { FlattenedJWSInput, JWTVerif... |
const months = [
null,
"january",
"february",
"march",
"april",
"may",
"june",
"july",
"august",
"september",
"october",
"november",
"december",
];
export function convertDateToParams(original: string) {
const splitDate = original.split("-");
const monthIndex = Number(splitDate[0]);
con... |
def find_longest_palindrome_substring(s):
max_length = 0
longest_palindrome = ""
for i in range(len(s)):
for j in range(i, len(s)):
substring = s[i:j+1]
if is_palindrome(substring):
if len(substring) > max_length:
max_length = len(substring... |
#!/bin/bash
################################################################################
# ____ ____ ____ ____ ____
# ||G |||i |||t |||t |||y ||
# ||__|||__|||__|||__|||__||
# |/__\|/__\|/__\|/__\|/__\|
#
# Gitty -- A GitHub client in Bash
#
# Copyright (c) 2014-20 Robert... |
#!/usr/bin/env bash
set -ex
# NOTE: the port is hardcoded, for kubectl
# doesn't currently support templating.
ME=$(basename $0)
DIR=$(dirname "$(readlink -f $0)")
echo $DIR
USAGE_EXAMPLE="$ME --docker-user mario --user-email mario.mario@bros.com"
REGISTRY="localhost:5000"
function usage {
BOLD=$(tput bold)
... |
'use strict';
var servicesModule = require('./_index.js');
/**
* @ngInject
*/
function TweetsService($q, $http, $resource, AppSettings, AuthService) {
// var url = AppSettings.oauthProxyUrl.split('/')[0] + '/' + AppSettings.oauthProxyUrl.split('/')[1] + '/' + AppSettings.oauthProxyUrl.split('/')[2];
// re... |
package collections
import (
"fmt"
"math"
"sort"
"strings"
)
type ListInterface struct {
Collection []interface{}
SortFunc func(i, j int) bool
}
func (list *ListInterface) Shift() interface{} {
old := (*list).Collection
n := len(old)
if n == 0 {
return ""
}
x := old[0:1][0]
(*list).Collection = old[1... |
function sum() {
let total = 0;
for (let i = 0; i < arguments.length; i++) {
total += arguments[i];
}
return total;
}
console.log(sum(1, 2, 3, 4));
// 10 |
public class ImageParameters {
public int mCoverHeight, mCoverWidth;
public int mPreviewHeight, mPreviewWidth;
public boolean mIsPortrait;
public int mDisplayOrientation;
public int mLayoutOrientation;
public ImageParameters(Parcel in) {
mIsPortrait = (in.readByte() == 1);
mDisp... |
<filename>core/src/mindustry/world/CachedTile.java
package mindustry.world;
import mindustry.entities.type.TileEntity;
import mindustry.game.Team;
import mindustry.world.modules.*;
/**
* A tile which does not trigger change events and whose entity types are cached.
* Prevents garbage when loading previews.
*/
publ... |
#!/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 ... |
<filename>app/src/main/java/com/example/myshoppingmall/ProductImagesAdapter.java
package com.example.myshoppingmall;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.viewpager.widget.PagerAdapter;
import com.bumptech.glide.G... |
<filename>sources/Engine/Modules/Graphics/GraphicsSystem/EnvironmentRenderingSystem.cpp
#include "precompiled.h"
#pragma hdrstop
#include "EnvironmentRenderingSystem.h"
#include <utility>
#include "Modules/ECS/ECS.h"
EnvironmentComponent::EnvironmentComponent() = default;
void EnvironmentComponent::setEnvironmentM... |
<reponame>Cristianasg/system<filename>application/assets/js/pages.js
var pages = {
} |
<filename>app/src/main/java/com/tanmay/biisit/myMusic/MyMusicFragment.java<gh_stars>1-10
package com.tanmay.biisit.myMusic;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.... |
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import LoadBookPanel, {Props} from '../../src/renderer/components/LoadBookPanel';
import {createAppState, createBookState} from "../utils/testUtils";
describe('<LoadBookPanel/>', () => {
it('renders correctly', () => {
const ... |
SELECT *
FROM users
WHERE last_name LIKE 'B%'
AND age BETWEEN 18 AND 25; |
class Table:
def __init__(self, columns, rows):
self.columns = columns
self.rows = rows
def get_column_values(self, column_name):
column_idx = None
for idx, column in enumerate(self.columns):
if column == column_name:
column_idx = idx
... |
#!/bin/sh
aclocal && \
autoheader && \
autoconf && \
automake --foreign --force-missing --add-missing --copy
rm -rf autom4te.cache
|
const MongoClient = require('mongodb').MongoClient;
const uri = "<MongoDB connection string>";
const client = new MongoClient(uri, { useNewUrlParser: true });
client.connect(err => {
const collection = client.db("test").collection("devices");
collection.find({}).toArray(function(err, result) {
if (err) throw... |
ls testing/test.norg | entr -r -c ghcid -T "test"
|
#!/bin/bash
clear_gql_file_path="/api-data/00-clear-api-data.gql"
populate_general_gql_file_path="/api-data/01-populate-api-data-general.gql"
populate_openshift_gql_file_path="/api-data/02-populate-api-data-openshift.gql"
populate_kubernetes_gql_file_path="/api-data/03-populate-api-data-kubernetes.gql"
populate_contro... |
HPARAMS_STR+="z_entropy_loss=true," |
<filename>metadata-io/src/test/java/com/linkedin/metadata/search/elasticsearch/indexbuilder/MappingsBuilderTest.java
package com.linkedin.metadata.search.elasticsearch.indexbuilder;
import com.google.common.collect.ImmutableMap;
import com.linkedin.metadata.TestEntitySpecBuilder;
import java.util.Map;
import org.testn... |
import styled from "styled-components";
import type { ContainerProps } from "./Container.types";
const ContainerMarkup: React.FC<ContainerProps> = (props) => (
<div className={`overflow-hidden mx-auto wpmax-100 ${props.className}`}>
{props.children}
</div>
);
const Container: React.FC<ContainerProps> = styled(Con... |
<reponame>leongaban/redux-saga-exchange<gh_stars>1-10
import * as R from 'ramda';
import { IDependencies } from 'shared/types/app';
import { call, put, takeLatest, select, all, fork } from 'redux-saga/effects';
import { stopSubmit } from 'redux-form';
import { delay } from 'redux-saga';
import getErrorMsg,
{
isApiEr... |
<filename>open-sphere-plugins/arcgis/src/main/java/io/opensphere/arcgis2/esri/EsriPictureFillSymbol.java
package io.opensphere.arcgis2.esri;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonMethod;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* <p>
* Picture fi... |
<reponame>nabeelkhan/Oracle-DBA-Life<filename>Scripts_extra/index_partitioned.sql
set echo off
set feedback off
set linesize 512
prompt
prompt All Partitioned Indexes in Database
prompt
break on INDEX_OWNER skip 1 on TABLE_NAME on INDEX_NAME
SELECT IP.INDEX_OWNER, IX.TABLE_OWNER || '.' || IX.TABLE_NAME "OWNER.TABLE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.