text stringlengths 1 1.05M |
|---|
package game.backend.level;
import game.backend.GameState;
public class Level1 extends Level {
private static int REQUIRED_SCORE = 5000;
private static int MAX_MOVES = 20;
@Override
protected GameState newState() {
return new Level1State(REQUIRED_SCORE, MAX_MOVES);
}
private class Level1S... |
import re
def extractElementNames(htmlCode, section):
start_tag = f"<{section}"
end_tag = f"</{section}>"
section_start = htmlCode.find(start_tag)
section_end = htmlCode.find(end_tag, section_start) + len(end_tag)
section_html = htmlCode[section_start:section_end]
element_names = re.findall(r'... |
/*
* Copyright 2019 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License").
See License in the project root for license information.
*/
package com.linkedin.kafka.clients.producer;
import com.linkedin.kafka.clients.common.ClusterDescriptor;
import com.linkedin.kafka.clients.common.ClusterGroupDescr... |
<gh_stars>1-10
#include <string.h>
#include "usb_common.h"
#include "usbd.h"
#include "usbd_hid.h"
struct uhid_t
{
struct usbd_t *h; /* usbd handle */
struct usbd_hid_callback_t *cb;
uint8_t out_buf[64];
uint8_t keyboard_in_buf[8];
uint8_t mouse_in_buf[4];
};
static struct uhid_t hid... |
<reponame>Decipher/druxt.js<gh_stars>10-100
export default () => ({
// Main menu items.
menu: [{
component: "NuxtLink",
text: "Home",
icon: "home",
props: { to: "/" },
children: [],
},
{
component: "NuxtLink",
text: "Modules",
icon: "modules",
props: { to: "/modules" },
c... |
#include "../../crypto/symhacks.h"
|
#!/usr/bin/env bash
VERSION=$1
BUILD_DATE=$2
NAMESPACE=$3
PUSH_IMAGE="${4:-false}"
BROWSER=$5
TAG_VERSION=${VERSION}-${BUILD_DATE}
function short_version() {
local __long_version=$1
local __version_split=( ${__long_version//./ } )
echo "${__version_split[0]}.${__version_split[1]}"
}
echo "Tagging image... |
<gh_stars>0
from rest_framework import serializers
from mysign_app.models import Company, DoorDevice, User
class CompanySerializer(serializers.ModelSerializer):
class Meta:
model = Company
fields = ['name', 'email', 'phone_number', 'id']
class DoorDeviceSerializer(serializers.ModelSerializer):
... |
import re
def count_syllables(word):
pattern = r'[aeiouy]+'
return len(re.findall(pattern, word))
print(count_syllables('syllable')) # 3
print(count_syllables('balloons')) # 2 |
#!/bin/sh
# SUMMARY: Check that a partition on a GPT partitioned disk can be extended
# LABELS:
# REPEAT:
set -ex
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
NAME_CREATE=create-gpt
NAME_EXTEND=extend-gpt
DISK=disk.img
clean_up() {
rm -rf ${NAME_CREATE}-* ${NAME... |
def capitalize_words(string):
words = string.split(' ')
capitalized_words = [word.capitalize() for word in words]
return ' '.join(capitalized_words)
print(capitalize_words('enter the dragon')) |
var db = require("./db_config");
db.connect(function(err) {
if (err) throw err;
let sql = `CREATE TABLE mahasiswa
(
id int NOT NULL AUTO_INCREMENT,
name VARCHAR(255),
nrp VARCHAR(255),
jurusan VARCHAR(255),
angkatan VARCHAR(255),
foto LONGBLOB,
PRIMAR... |
#!/usr/bin/env bats
@test "when the command is run without specifing a pod it returns an error" {
run ./kubectl-capture
[ "$status" -eq 1 ]
}
|
@app.route('/data', methods=['GET'])
def get_data():
data = {
'key1': 'value1',
'key2': 'value2',
'key3': 'value3'
}
return jsonify(data) |
#!/bin/bash
set -e
cd $(dirname $0)
if [[ "$1" = "" ]]
then
echo "Usage: update-all.sh tzdb-release-number"
echo "e.g. update-all.sh 2013h"
exit 1
fi
./update-master.sh $1
rm -rf tmp-gcs
rm -rf tmp-nuget
mkdir tmp-gcs
mkdir tmp-nuget
for version in 2.4 3.0
do
echo "Updating ${version}"
./update-${versi... |
#!ic-repl -r http://localhost:8000
// service address
import S = "rwlgt-iiaaa-aaaaa-aaaaa-cai";
identity Alice;
call S.test ();
assert _ != (null : opt null);
|
# -*- encoding: binary -*-
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/urandom', __FILE__)
ruby_version_is "2.5" do
describe "Random.urandom" do
it_behaves_like :random_urandom, :urandom
end
end
|
package io.stargate.web.docsapi.service.query.condition.impl;
import static org.assertj.core.api.Assertions.assertThat;
import io.stargate.db.datastore.Row;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.Parame... |
package org.usfirst.frc.team2706.robot.vision;
import java.util.function.Supplier;
import org.usfirst.frc.team2706.robot.JoystickMap;
import org.usfirst.frc.team2706.robot.LoggedCommand;
import org.usfirst.frc.team2706.robot.Robot;
import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.N... |
<gh_stars>10-100
/**
* GDAL utilities.
*/
package io.opensphere.core.util.gdal;
|
<reponame>vconerd/unsplashit<filename>src/store/modules/SelectionData.js
export const namespaced = true;
export const state = {
selected: []
};
export const getters = {
getSelectedItemPosition: state => id => {
return state.selected.findIndex(elem => elem.id === id);
}
};
export const mutations = {
SELEC... |
<reponame>rzf45/98fmplayer
static const uint16_t window[8192] = {
5242, 5242, 5242, 5242, 5243, 5243, 5243, 5243,
5243, 5243, 5243, 5243, 5244, 5244, 5244, 5244,
5245, 5245, 5245, 5246, 5246, 5246, 5247, 5247,
5247, 5248, 5248, 5249, 5249, 5250, 5250, 5251,
5251, 5252, 5253,... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package minersinstrument.cryptographic;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author PKopychenko
... |
#!/bin/bash
if [ $PY3K -eq 1 ]; then
2to3 -w -n build/test/RBT_HOME/check_test.py
fi
export C_INCLUDE_PATH=${PREFIX}/include
export CPP_INCLUDE_PATH=${PREFIX}/include
export CPLUS_INCLUDE_PATH=${PREFIX}/include
export CXX_INCLUDE_PATH=${PREFIX}/include
export LIBRARY_PATH=${PREFIX}/lib
cd build/
make linux-g++-64... |
import { Platform } from '@angular/cdk/platform';
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
EventEmitter,
Input,
OnChanges,
OnDestroy,
Output,
ViewEncapsulation
} from '@angular/core';
import { Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
... |
<script>
import axios from 'axios';
export default {
data() {
return {
city: 'London',
temperature: '',
description: ''
};
},
created() {
this.getWeatherInfo();
},
methods: {
async getWeatherInfo() {
const response = await axios({
method: 'get',
url: https://api.openweathermap.org/data/2.5/weather?q=${t... |
#!/bin/sh
for i in {10..14}
do
echo "Download Chapter ${i}"
mkdir "chapter${i}-contributors"
curl \
"http://www.climatechange2013.org/contributors/chapter/chapter-${i}" \
> "chapter${i}-contributors"/"chapter-${i}.html"
cat << EOF > "chapter0${i}-contributors"/meta.txt
Year: 2014
Title: Chapter ${i}
URL... |
<filename>delta/deltaModel.js
function DeltaModel(e, f, re, rf) {
// Calculates angle theta1 (for YZ-pane)
function calcAngleYZ(x0, y0, z0) {
var y1 = -0.5 * 0.57735 * f; // f/2 * tan(30 degrees)
y0 -= 0.5 * 0.57735 * e; // Shift center to edge of effector
// z = a + b*y
var a = (x0 * x0 + y0 * y0... |
import styled from '@xstyled/styled-components'
import { shouldForwardProp } from '@welcome-ui/system'
export const Box = styled.box.withConfig({ shouldForwardProp })``
|
from typing import List
from importlib import import_module
from types import ModuleType
def import_modules(module_names: List[str]) -> List[ModuleType]:
base_package = 'package'
imported_modules = []
for module_name in module_names:
try:
module = import_module(f"{base_package}.{module_... |
<gh_stars>1-10
package com.darian.eurekaclosedsource;
import lombok.Data;
/***
*
*
* @author <a href="mailto:<EMAIL>">Darian</a>
* @date 2020/5/25 23:13
*/
@Data
public class User {
private String name = "darian";
}
|
#!/bin/sh
#==============================================================================
# ______ _ _ _
# | ____(_) | | |
# | |__ _| | ___ ___ _ _ ___| |_ ___ _ __ ___
# | __| | | |/ _ \ / __| | | / __| __/ _ \ '_ ` _ \
# | | | | | __/ \__ \ |_| \__ \ || __/ |... |
#!/bin/bash
set -e
TARGET=$1
OUTPUT_PATH=$2
if [[ -z "$TARGET" ]] || [[ -z "$OUTPUT_PATH" ]]; then
echo "usage: compile.sh [target] [output path]"
exit 1
fi
if [[ -f $HOME/.cargo/env ]]; then
source $HOME/.cargo/env
fi
SCRIPT_DIR=$(dirname "$0")
SCRIPT_DIR=`cd $SCRIPT_DIR;pwd`
mkdir -p $(dirname $OUTPUT... |
#!/bin/bash
# Copyright (c) 2021 Red Hat, Inc.
# Copyright Contributors to the Open Cluster Management project
set -o errexit
set -o nounset
########################
# include the magic
########################
. ../../demo-magic.sh
# hide the evidence
clear
pe 'kubectl get managedclusters'
pe 'kubectl label man... |
<reponame>AaltoIIC/OSEMA
"""Loop measurement and control often data is sent to server"""
def measure(i2c):
print("measure continuous")
measure_loop(i2c)
class Measure:
def __init__(self, i2c):
self.client = MQTTClient(str(SENSOR_ID), BROKER_URL, user=USER, password=<PASSWORD>, port=BROKER_PORT)
... |
#!/bin/sh
# Directives
#PBS -N scf_fast_freq_diff_2.5e4
#PBS -W group_list=yetiastro
#PBS -l nodes=1:ppn=1,walltime=8:00:00,mem=8gb
#PBS -M amp2217@columbia.edu
#PBS -m abe
#PBS -V
# Set output and error directories
#PBS -o localhost:/vega/astro/users/amp2217/pbs_output
#PBS -e localhost:/vega/astro/users/amp2217/pbs... |
import { assert } from "chai";
import { utilsNull } from "";
describe("null : method is", () => {
it("is : true", () => {
assert.isTrue(utilsNull.is(null), "is(null) === true");
});
it("is : false", () => {
assert.isFalse(utilsNull.is([]), "is([]) === false");
assert.isFalse(utilsNull.is([1, 2, 3]), ... |
/*
* Amazon FreeRTOS MQTT Remote HVAC Demo V1.0.0
*/
/**
* @file aws_remote_hvac.c
* @brief
*
* ----
*
*/
/* Standard includes. */
#include "string.h"
#include "stdio.h"
/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "message_buffer.h"
/* MQTT includes. */
#include ... |
def sum_squares(a,b):
return a*a + b*b
result = sum_squares(3,7)
print(result) |
function pageCount(n, p) {
let point;
let ans = 0;
let temp = n - p;
if (n % 2 == 0) {
tempPt = Math.floor(n / 2);
if (tempPt % 2 == 0) {
point = tempPt - 0.5;
} else {
point = temp + 0.5;
}
} else {
point = n / 2;
}
if (point > p) {
ans = Math.floor(p / 2);
} else {... |
<filename>internal/oprf/oprf.go
// SPDX-License-Identifier: MIT
//
// Copyright (C) 2021 <NAME>. All Rights Reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree or at
// https://spdx.org/licenses/MIT.html
// Package oprf implements th... |
MATLAB="/usr/local/MATLAB/R2018b"
Arch=glnxa64
ENTRYPOINT=mexFunction
MAPFILE=$ENTRYPOINT'.map'
PREFDIR="/home/hadi/.matlab/R2018b"
OPTSFILE_NAME="./setEnv.sh"
. $OPTSFILE_NAME
COMPILER=$CC
. $OPTSFILE_NAME
echo "# Make settings for sprdmpF60" > sprdmpF60_mex.mki
echo "CC=$CC" >> sprdmpF60_mex.mki
echo "CFLAGS=$CFLAGS"... |
/*
Copyright (C) 2004-2008 Grame
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the h... |
rm -rf /home/sji15/public_html/blog /home/sji15/public_html/static /home/sji15/public_html/tags /home/sji15/public_html/_next
cd /home/sji15/public_html/
unzip out.zip |
<gh_stars>1-10
/*-------------------------------------------------------------------------
*
* erand48.c
*
* This file supplies versions of erand48(), lrand48(), and srand48()
* for machines that lack them. (These are all the members of the drand48
* family that Postgres currently requires. We name the fi... |
package ml.littlebulb.presto.kudu.properties;
import java.util.List;
public class PartitionDesign {
private List<HashPartitionDefinition> hash;
private RangePartitionDefinition range;
public List<HashPartitionDefinition> getHash() {
return hash;
}
public void setHash(List<HashPartitionDe... |
#!/bin/sh
sudo pacman --noconfirm -S go go-tools
|
DELETE FROM table
WHERE number IN
(
SELECT number FROM
(
SELECT MIN(id) as id, number
FROM table
GROUP BY number
) as t1
)
AND
id NOT IN
(
SELECT MIN(id)
FROM table
GROUP BY number
) |
package io.opensphere.core.units.duration;
import java.math.BigDecimal;
import java.math.RoundingMode;
import io.opensphere.core.units.InconvertibleUnits;
/**
* Base class for durations the use months for their reference units.
*/
public abstract class AbstractMonthBasedDuration extends Duration
{
... |
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import DevName from '../../../src/components/Search/Dev/DevName';
import { OPENSEA_DIRECT_LINK_PREFIX } from '../../../src/utils/DeveloperDaoConstants';
import testCommonLink from '../../utils/testCommons';
import {
ownedDe... |
#!/bin/bash
#====================================================================
# brew &zshrc setup
#====================================================================
# requirement: xcode
xcode-select --install
# brew install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mast... |
#!/bin/bash
##############################
WORK_DIR=/usr/src/app
NOTEBOOKS_DIR=$WORK_DIR/notebooks
##############################
usage() {
cat <<-EOF
Usage: $0 {build|boot}
EOF
exit 1
}
case "$1" in
# コンテナの作成
build)
docker image build --no-cache -t py36-jupyter .
;;
# 立ち上げ
... |
TERMUX_SUBPKG_DESCRIPTION="baz"
TERMUX_SUBPKG_INCLUDE="etc/baz"
|
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
src_repo="$(pwd)"
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
ver="1.0.50"
basedir=$(pwd);
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUIL... |
<filename>test/integration/playlist.api.tests.js
var assert = require('assert');
const util = require('util');
const request = require('request');
var { ADMIN_USER, cleanup, URL_PREFIX } = require('../fixtures.js');
var api = require('../api-client.js');
var { START_WITH_ENV_FILE } = process.env;
const { startOpenwhyd... |
def optimizeBST(root):
if (root == None):
return
optimizeBST(root.left)
optimizeBST(root.right)
if (root.left != None):
root.left.rightMost = findMax(root.left)
if (root.right != None):
root.right.leftMost = findMin(root.right)
def findMax(node):
if (node == N... |
<gh_stars>10-100
import * as scoreLogController from '../controllers/scoreLogController';
import * as actionDefinitionController from '../controllers/actionDefinitionController';
import * as userController from '../controllers/user';
import config from '../config/index';
import * as stationModels from '../models/statio... |
<filename>python-import/finders_and_loaders/ban_importer.py
# ban_importer.py
import sys
BANNED_MODULES = {"re"}
class BanFinder:
@classmethod
def find_spec(cls, name, path, target=None):
if name in BANNED_MODULES:
raise ModuleNotFoundError(f"{name!r} is banned")
sys.meta_path.insert(0... |
<gh_stars>1-10
const validModel = (model) => {
for (let property in model) {
if (model[property] === "" ||
model[property] === null) {
return {
field: String(property),
status: false
}
}
}
return {
field: "",
... |
class BooleanFlip:
def __init__(self, boolean_value):
self.boolean_value = boolean_value
def flip(self):
self.boolean_value = not self.boolean_value |
#!/usr/bin/env bash
# This script is inspired from **scikit-learn** implementation of continous test
# integration. This is meant to "install" all the packages required for installing
# trimpy.
# License: The MIT License (MIT)
set -e
sudo apt-get update -qq
sudo apt-get install build-essential -qq
if [[ "$DISTRIB" ... |
import log
def error(exception):
log.error(exception)
return {
'status': 'error',
'message' : exception.message
}
def success(msg, result = None):
log.debug(msg)
return {
'status' : 'ok',
'message' : msg,
'result' : result
}
def warning(msg):
log.warn(msg)
return ... |
#!/usr/bin/env bash
source scripts/npu_set_env.sh
device_id_list=0,1,2,3,4,5,6,7
currentDir=$(cd "$(dirname "$0")";pwd)/..
currtime=`date +%Y%m%d%H%M%S`
train_log_dir=${currentDir}/result/training_8p_job_${currtime}
mkdir -p ${train_log_dir}
cd ${train_log_dir}
echo "train log path is ${train_log_dir}"
python3.7 -u $... |
package options
import "github.com/pkg/term"
/* Term (original) */
func foo() {
t, err := term.Open("/dev/ttyUSB0")
// handle error
err = t.SetSpeed(115200)
// handle error
err = t.SetRaw()
// handle error
// ...
handle(err)
}
func handle(err error) {
}
/* Term (improved) */
func OpenTerm(dev string, opti... |
package core.framework.internal.http;
import core.framework.util.Maps;
import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.HttpUrl;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* @author neo
*/
public class CookieManager implements CookieJar {
... |
package technical
import (
"goalgotrade/core"
"goalgotrade/dataseries"
"sync"
"time"
)
type EventWindow interface {
OnNewValue(dateTime *time.Time, value interface{})
WindowSize() int
Values() []interface{}
IsWindowFull() bool
Value() interface{}
}
type baseEventWindow struct {
mu sync.Mutex
value... |
#! /bin/sh
if [ ! -d "$CC_APP_PATH" ] || [ ! -d "$CC_WEB_PATH" ]; then
echo "\n\nERROR: CC_APP_PATH or CC_WEB_PATH environment variable not properly set\n\n"
exit 1
fi
cp "$CC_APP_PATH/../MiscApps/TableEdit-Lite/TableEdit/faq.html" "$CC_WEB_PATH/corecode.io/tableedit_lite/faq.html"
cp "$CC_APP_PATH/../MiscApps/T... |
#!/bin/sh
cat <<EOF > service.rendered.json
{
"Name": "test-service",
"Tags": [
"Test Service"
],
"Address": "${POD_IP}",
"Port": 3002,
"Check": {
"Method": "GET",
"HTTP": "http://${POD_IP}:3002/apis/test/health",
"Interval": "1s"
}
}
EOF
curl \
--request PUT \
--data @service.re... |
<filename>simJoins/src/main/scala-2.11/SimJoins/DataStructure/Profile.scala
package SimJoins.DataStructure
import scala.collection.mutable
/**
* Represents a profile
* @author <NAME>
* @since 2016/07/12
*/
case class Profile(id: Long, attributes : mutable.MutableList[KeyValue] = new mutable.MutableList[KeyValu... |
# frozen_string_literal: true
require 'discourse_dev'
require 'rails'
require 'faker'
module DiscourseDev
class Record
DEFAULT_COUNT = 30.freeze
attr_reader :model, :type
def initialize(model, count = DEFAULT_COUNT)
@@initialized ||= begin
Faker::Discourse.unique.clear
RateLimite... |
import Promise from 'bluebird'
import exec from 'execa'
import path from 'path'
import { CLIEngine } from 'eslint'
import {
T,
assoc,
cond,
curry,
curryN,
endsWith,
evolve,
equals,
filter,
find,
length,
map,
merge,
objOf,
pipe,
pipeP,
pluck,
prop,
propEq,
split,
sum,
tap,
} f... |
/*
* Copyright (C) 2017 The Dagger 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 ag... |
export { BaseCtrl } from './base';
export { WordCtrl } from './word';
|
perl main.pl -f samples.fqpath.tsv -c configure.cfg -p Run.all.sh -t kallisto -o result
|
<gh_stars>1000+
// Copyright 2013, <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//+build windows plan9
package logging
import (
"fmt"
)
type Priority int
type SyslogBackend struct {
}
func NewSyslogBackend(prefix string) (b *... |
<filename>simple-copier/src/main/java/com/jiekey/converter/ToStringConverter.java
package com.jiekey.converter;
import com.jiekey.core.BeanField;
public class ToStringConverter implements Converter {
@Override
public Object convert(Object value, String format, BeanField field) {
if (value != null) ... |
import React from "react";
import LabLayout from "../../layouts/LabLayout";
const MultiColumn = () => {
return (
<LabLayout
background=""
title="CSS Explorations: Multicolumn"
description="Just like in newspapers"
article={true}
>
<main className="min-h-screen flex items-center ... |
#!/bin/bash
# docker run -it --rm --name gpu0-bot -v /home/mhilmiasyrofi/Documents/Bag-of-Tricks-for-AT/:/workspace/Bag-of-Tricks-for-AT/ --gpus '"device=0"' mhilmiasyrofi/advtraining
# Declare an array of string with type
# declare -a adv=("autoattack" "autopgd" "bim" "cw" "deepfool" "fgsm" "newtonfool" "pgd" "pix... |
package com.player.repo;
import com.player.db.model.Player;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface PlayerRepository extends CrudRepository<Player, String> {
}
|
/*******************************************************************************
* Copyright Searchbox - http://www.searchbox.com
*
* 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
*
* ... |
<gh_stars>0
class Morse:
_xlate = dict({
'a' : ['dit','dah'],
'b' : ['dah','dit','dit','dit'],
'c' : ['dah','dit','dah','dit'],
'd' : ['dah','dit','dit'],
'e' : ['dit'],
'f' : ['dit','dit','dah','dit'],
'g' : ['dah','dah','dit'],
'h' : ['dit','dit','di... |
const xmlrpc = require ("davexmlrpc");
const utils = require ("daveutils");
const davehttp = require ("davehttp");
const mail = require ("davemail");
const persists = require ("persists");
const fs = require ("fs");
var config = {
port: 1417,
flPostEnabled: true,
flLogToConsole: true,
flAllowAccessFromAnywhere: ... |
package Code.Util;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class DBUtil {
private ArrayList<String> arrayList = new ArrayList<String>();
private ArrayList<String> brrayList = new ArrayList<String>();
private ArrayList<String> crrayList = new... |
module WOZLLA.jsonx {
function emptyCallback(root:WOZLLA.GameObject, done:Function) {
done();
}
// reference: @src#asGameObject
export class JSONXBuilder {
public static Factory:Function;
public static create():JSONXBuilder {
if(JSONXBuilder.Factory) {
... |
const { describe, it } = require('eslint/lib/testers/event-generator-tester');
const { before, after } = require('mocha');
const expect = require('expect.js');
const sinon = require('sinon');
const request = require('supertest-as-promised');
const httpStatus = require('http-status');
const DroneService = require('../..... |
<filename>app/src/main/java/com/cjy/flb/manager/AppManager.java
package com.cjy.flb.manager;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.ComponentName;
import android.content.Context;
import java.util.ArrayList;
import jav... |
#!/bin/bash
#
# Copyright The Cryostat Authors
#
# The Universal Permissive License (UPL), Version 1.0
#
# Subject to the condition set forth below, permission is hereby granted to any
# person obtaining a copy of this software, associated documentation and/or data
# (collectively the "Software"), free of charge and u... |
// code splitting - module bundeling - lazy loading
console.log("new file with module bundeling...");
|
#!/usr/bin/env bats
load "../helpers"
setup_file() {
start_network
}
teardown_file() {
teardown_network
}
teardown() {
stop_connector
stop_gateway
}
@test "Can list channel history" {
background ${lnctl} connector
retry 5 1 curl_connector GetStatus
background ${lnctl} server
open_channel lnd1 lnd2... |
<filename>examples/dockercompose_project/microservice1/app.py
import os
from panini import app as panini_app
app = panini_app.App(
service_name="microservice1",
host="nats-server" if "HOSTNAME" in os.environ else "127.0.0.1",
port=4222,
app_strategy="asyncio",
)
log = app.logger
msg = {
"key1": "... |
<reponame>raghav-deepsource/realm-java
/*
* Copyright 2017 Realm Inc.
*
* 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... |
# 增加 luci-theme-argon
git clone https://github.com/jerrykuku/luci-theme-argon.git package/danxiaonuo/luci-theme-argon
# smartdns
svn co https://github.com/pymumu/smartdns/trunk/package/openwrt package/danxiaonuo/smartdns
svn co https://github.com/project-openwrt/openwrt/trunk/package/ntlf9t/luci-app-smartdns package/da... |
def sentiment_classification(word_list):
sentiment_words = {
'positive': ['happy', 'joyful'],
'negative': ['sad', 'angry']
}
result = []
for word in word_list:
if word in sentiment_words['positive']:
result.append(('positive', word))
elif word in sentiment_wo... |
#!/bin/bash
curl -s http://10.1.100.61:8000/api/v0.1/predictions \
-H "Content-Type: application/json" \
-d '{"data":{"ndarray":[[10.1, 0.37, 0.34, 2.4, 0.085, 5.0, 17.0, 0.99683, 3.17, 0.65, 10.6],[10.1, 0.37, 0.34, 2.4, 0.085, 5.0, 17.0, 0.99683, 3.17, 0.65, 10.6]]}}'
#curl -v "http://10.152.183.130/data-drift... |
<gh_stars>0
#include "comms.h"
/* opens pipe in Write only mode,
* this should freeze the program
* until message has been read */
void send_message(const char *pipe_name, char *msg, bool do_unlink) {
mkfifo(pipe_name, 0666);
int fifod = open(pipe_name, O_WRONLY);
int pm_size = buffer_size("%0*d%s", 7, getpid... |
<gh_stars>10-100
package io.opensphere.controlpanels.about;
import io.opensphere.core.Toolbox;
import io.opensphere.core.api.adapter.AbstractHUDFrameMenuItemPlugin;
/**
* The plug-in for the about user interface.
*/
public class AboutPlugin extends AbstractHUDFrameMenuItemPlugin
{
/**
* Instanti... |
require('./bootstrap');
import Vue from "vue";
import VModal from "vue-js-modal";
import VueGoodTablePlugin from "vue-good-table";
import "vue-good-table/dist/vue-good-table.css";
import router from "./router";
import VueRouter from "vue-router";
import Loading from "vue-loading-overlay";
import "vue-loading-overlay/d... |
<reponame>and1985129/digitalofficemobile<filename>www/controller/Login.controller.js
sap.ui.define([
"sap/ui/core/mvc/Controller", "sap/ui/model/json/JSONModel"
], function(Controller, JSONModel) {
"use strict";
return Controller.extend("sap.dm.controller.Login", {
onInit: function() {
var oComponent = this.g... |
function aggregateServicesData(servicesData) {
const aggregatedData = {};
servicesData.forEach(service => {
if (aggregatedData[service.type]) {
aggregatedData[service.type] = { ...aggregatedData[service.type], ...service.data };
} else {
aggregatedData[service.type] = service.data;
}
});
... |
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.