text stringlengths 1 1.05M |
|---|
#!/bin/sh
# This calls the pre-push git hook local to the repo
git_dir=$(git rev-parse --git-dir)
if [ -f "$git_dir/hooks/pre-push" ]; then
set -e
"$git_dir/hooks/pre-push" "$@"
set +e
fi |
#!/bin/sh
python translator.py --cpp-header-dir ../include --capi-header-dir ../include/capi --cpptoc-global-impl ../libcef_dll/libcef_dll.cc --ctocpp-global-impl ../libcef_dll/wrapper/libcef_dll_wrapper.cc --cpptoc-dir ../libcef_dll/cpptoc --ctocpp-dir ../libcef_dll/ctocpp --gypi-file ../cef_paths.gypi
|
const { Router } = require("express");
const { useAdmin } = require("../middlewares/auth");
const {
createCause,
deleteCause,
updateCause,
} = require("../controllers/cause");
const { Cause } = require("../models/Cause");
const router = Router();
const getAddCause = async (_req, res) => {
res.render("admin/add... |
<reponame>syntaxltd/DroidLocation
package ax.synt.droidlocation;
import android.app.IntentService;
import android.content.Intent;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.os.Bundle;
import android.os.ResultReceiver;
import android.text.TextUtil... |
#!/bin/bash
wget -nc ftp://Contours_IRIS_ext:ao6Phu5ohJ4jaeji@ftp3.ign.fr/CONTOURS-IRIS_2-1__SHP__FRA_2020-01-01.7z
if [ ! -d CONTOURS-IRIS_2-1__SHP__FRA_2020-01-01 ];then
7z x CONTOURS-IRIS_2-1__SHP__FRA_2020-01-01.7z -aos
fi
|
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Objects CARS</h2>
<p id="mobil"></p>
<script>
// Create an object:
const car = {type:"Avanza", model:"2000", color:"red"};
// Display some data from the object:
document.getElementById("mobil").innerHTML = "The car type is " + car.type;
</script>
</body>
</html>
|
<gh_stars>0
import * as assert from "assert";
import * as Rx from "rxjs/Rx";
import * as gw2shinies from "./gw2shinies";
import * as data from "./gw2shinies.spec.data.json";
import checkObservable from "./helperspec";
describe("remoteservices/gw2shinies", () => {
const fetchFunction = (url: string) =>
url ... |
function zigzag(a) {
let maxStreak = 0;
let currStreak = 0;
a.forEach((num, i, arr) => {
currStreak += 1;
if (num === arr[i + 1] || arr[i + 1] === undefined) {
maxStreak = maxStreak > currStreak ? maxStreak : currStreak;
currStreak = 0;
} else if (
!(num > arr[i - 1] && num > arr[i... |
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
#Load dataset
data = pd.read_csv('dataset.csv')
# Create features and target
X = data.drop('subscribe', axis=1)
y = data['subscri... |
import { RankingDataSet } from "@app/interface";
export interface State {
originDataSet: RankingDataSet;
displayDataSet: RankingDataSet;
}
export const DEFAULT_STATE: State = {
originDataSet: {
list: [],
},
displayDataSet: {
list: [],
},
};
|
import numpy as np
# Generate a 3D array
x = np.zeros((2, 3, 2))
# Print the array
print(x) |
import { DEFAULT_STUN_RTC_CONFIG } from '../../../../../api/peer/config'
import { Graph } from '../../../../../Class/Graph'
import { Config } from '../../../../../Class/Unit/Config'
import { $makeUnitRemoteRef } from '../../../../../client/makeUnitRemoteRef'
import { RemoteRef } from '../../../../../client/RemoteRef'
i... |
<reponame>zhangfeng0415/Zakker
package com.zte.zakker.main.entity;
/**
* Description: <主频道类型><br>
* Author: mxdl<br>
* Date: 2018/12/12<br>
* Version: V1.0.0<br>
* Update: <br>
*/
public enum MainChannel {
NEWS(0,"NEWS"), FIND(1,"FIND"), AUTOMATION(2,"AUTOMATION"), ME(3,"ME");
public ... |
def is_valid_tags(s):
s = s.strip("<>")
if s != "":
return True
else:
return False |
pkg_name=erlang
pkg_origin=core
pkg_version=18.3
pkg_dirname=otp_src_${pkg_version}
pkg_license=('erlang')
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_source=http://www.erlang.org/download/otp_src_${pkg_version}.tar.gz
pkg_filename=otp_src_${pkg_version}.tar.gz
pkg_shasum=fdab8129a1cb935db09f1832e3... |
/*
* JBoss, Home of Professional Open Source.
* Copyright 2016, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* unde... |
#!/bin/sh
# ** AUTO GENERATED **
# 2.2.5 Ensure DHCP Server is not installed (Automated)
rpm -q dhcp | grep -E "package dhcp is not installed" || exit $1
|
/* basic frontend user-auth control */
/* based on resourceCode */
export default {
config: [
{
key: 'customer',
title: '',
resourceCode: '',
path: '',
children: []
}
]
}
|
#!/bin/bash
rm *-light.svg
for file in *.svg; do
fname=$(basename $file .svg)
sed 's/currentColor/white/g' $file > "$fname-light.svg"
done
|
#!/bin/bash
# Runs a single srb init test from gems/sorbet/test/snapshot/{partial,total}/*
# --- begin runfiles.bash initialization v2 ---
# Copy-pasted from the Bazel Bash runfiles library v2.
set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash
# shellcheck disable=SC1090
source "${RUNFILES_DIR:-/dev/n... |
#!/bin/bash
SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT")
# --- Script Init ---
set -e
set -o pipefail
mkdir -p log
rm -R -f log/*
# --- Setup run dirs ---
find output/* ! -name '*summary-info*' -exec rm -R -f {} +
mkdir output/full_correlation/
rm -R -f fifo/*
mkdir fifo/full_correlation/
rm -R -f work/*
... |
mkdir -p releases
rm releases/*
PROGRAM_NAME="upduck"
GOOS=windows go build -o "releases/$PROGRAM_NAME-windows.exe"
GOOS=linux go build -o "releases/$PROGRAM_NAME-linux"
GOOS=linux GOARCH=arm GOARM=5 go build -o "releases/$PROGRAM_NAME-raspberrypi-armv5"
GOOS=linux GOARCH=arm GOARM=6 go build -o "releases/$PROGRAM_... |
<filename>src/src/main/java/com/cogentinfo/abc_insurance/model/Address.java<gh_stars>0
package com.cogentinfo.abc_insurance.model;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.UUID;
@Entity
public class Address... |
// import App from 'next/app'
import Router from "next/router";
import withGA from "next-ga";
import '../css/base.css'
import { LanguageProvider } from '../components/LanguageSelector'
function MyApp({ Component, pageProps }) {
return (
<LanguageProvider>
<Component {...pageProps} />
</LanguageProvider... |
#!/bin/bash
# https://www.linode.com/docs/security/securing-your-server/
adduser dev
adduser dev sudo
mkdir /home/dev/.ssh
cp authorized_keys /home/dev/.ssh/authorized_keys
# Now check that password loging with ssh is allowd, otherwise enable for the following operation:
# Now locally use
# ssh-copy-id dev@<ip>
#... |
<gh_stars>10-100
// 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
// "L... |
from typing import List, Tuple
import math
def getCameraDistances(camera_name: str, ps: List[Tuple[int, int]]) -> List[float]:
focal_length = 50
image_width = 100
image_height = 75
distances = []
for x, y in ps:
angle = math.atan2(image_width / 2 - x, focal_length) # Calculate the angle u... |
#
for i in tranalyze trcombine trconvert trdelabel trdelete trdot trfold trfoldlit trformat trgen trgroup trinsert trjson trkleene trmove trparse trprint trrename trreplace trrr trrup trsplit trsponge trst trstrip trtext trtokens trtree trull trunfold trungroup trwdog trxgrep trxml trxml2
do
dotnet tool install -g $i
... |
<gh_stars>1-10
package me.xiddy.jrequests;
import okhttp3.Response;
import java.io.IOException;
public class JSession {
public JSession() {}
public JResponse request(String method, String url) throws IOException {
// Make new request
JRequest request = new JRequest(method, url, null, null, null, null);
//... |
import {
BufferAttribute,
BufferGeometry,
DynamicDrawUsage,
Color,
Group,
MeshPhongMaterial,
NormalBlending,
DoubleSide,
LineBasicMaterial,
ShaderMaterial,
LineSegments,
Points,
Mesh,
Vector3,
AdditiveBlending,
} from 'three'
import { cellColors } from './colorGenerators'
import { pointsVe... |
<reponame>supanadit/restsuite
package com.supanadit.restsuite.panel.sse;
import com.here.oksse.OkSse;
import com.here.oksse.ServerSentEvent;
import com.supanadit.restsuite.component.input.InputSseURL;
import net.miginfocom.swing.MigLayout;
import okhttp3.Request;
import okhttp3.Response;
import javax.swing.*;
public... |
CUDA_VISIBLE_DEVICES=2
spec='python driver.py --dataset kiba --hyper_param_search
--max_iter 38 --evaluate_freq 3 --patience 3 --model tf_regression
--early_stopping --prot_desc_path davis_data/prot_desc.csv --no_concord
--prot_desc_path metz_data/prot_desc.csv --prot_desc_path KIBA_data/prot_desc.csv
--prot_d... |
import numpy as np
def calculate_convex_hull_area(points):
def get_convex_hull_barycenter(s, pts):
# Implementation of get_convex_hull_barycenter function is not provided
pass
# Assuming the existence of coverU, coverV, coverUV, Fbats, pts, BLACK, filtration_from_bats, and TextMobject
# C... |
. prep-MATE
echo -e ""
echo -e "\033[1;33mInstalling xrdp and tightvncserver\033[0m"
sudo apt-get install -y xrdp tightvncserver
echo -e ""
echo -e "\033[1;33mConfiguring xrdp to use MATE instead of Cinnamon\033[0m"
sudo sed -i 's:^. /etc/X11/Xsession:#. /etc/X11/Xsession\nmate-session:' /etc/xrdp/startwm.sh
touch .X... |
<gh_stars>0
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: steammessages.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise u... |
<gh_stars>0
import { Fragment } from "react";
import { APYUpdater } from "state/apy/updater";
import { BankUpdater } from "state/banks/updater";
import { MulticallUpdater } from "state/multicall/updater";
import { PriceUpdater } from "state/prices/updater";
import { SupplyUpdater } from "state/supply/updater";
import {... |
/*
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
*
* 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 ... |
<reponame>Doogie13/postman<gh_stars>100-1000
package me.srgantmoomoo.postman.client.module.modules.pvp;
import org.lwjgl.input.Keyboard;
import me.srgantmoomoo.postman.client.module.Category;
import me.srgantmoomoo.postman.client.module.Module;
public class SmartHotbar extends Module {
public SmartHotbar() {
su... |
<gh_stars>0
/**
* 导出声明
*/
const context = {};
module.exports = (obj) => {
Object.assign(context, obj);
return {
name: 'i18n_list',
method: 'GET',
path: '/i18n',
middleware: listRoute
};
};
/**
* 列表查询接口
* @param {object} ctx
*/
async function listRoute(ctx) {
// 当... |
package main
import "testing"
func TestNewUser(t *testing.T) {
user := NewUser("my_test_name")
if user.Name != "my_test_name" {
t.Fail()
}
if len(user.PubKeys) != 0 {
t.Fail()
}
}
func TestSetPubKeys(t *testing.T) {
user := NewUser("my_test_name")
beforeUpdate := user.UpdatedAt
user.SetPubKeys([]string{
... |
import base64
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
def decrypt_data(algo, b64data, encryption_key, utf8):
if algo != 'AES':
raise ValueError('unsupported algorithm: %s' % algo)
encrypted = base64.b64de... |
<gh_stars>0
const Util = require('../../util/MitUtil.js');
module.exports = {
name: 'someone',
description: 'Elije un usuario aleatorio .w.',
aliases: ['something', 'randompick', 'person'],
usage: '',
cooldown: 2,
args: 0,
catergory: 'Utilidad',
async execute(client, message, args) {
try {
co... |
def binary_search(array, x):
# Initial values for start, middle and end
start = 0
end = len(array) - 1
while start <= end:
# Middle point calculation
mid = (start + end) // 2
# Check if x is present at mid
if array[mid] < x:
start = mid + 1
... |
#!/bin/bash
# Split lines in a text file
# Copyright 2017 Xiang Zhang
#
# Usage: bash split_lines.sh [lines] [input] [output_prefix]
#
# Note: .txt postfix will be automatically added.
set -x;
set -e;
split -d -a 1 --additional-suffix=.txt -l $1 $2 $3;
|
<filename>snippety/src/main/java/com/fueled/snippety/span/TextIndentSpan.java
package com.fueled.snippety.span;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.text.Layout;
import android.text.TextPaint;
import android.text.style.LeadingMarginSpan;
/**
... |
#!/usr/bin/env bash
set -eux
# Template custom configuration script -- add your own commands to customise
# the new box. Keep in mind that you can't use dnf and only selected file system
# locations are writable.
|
<gh_stars>1-10
package com.bustiblelemons.cthulhator.character.persistance;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.v4.util.LruCache;
import com.bustiblelemons.cthulhator.character.characteristics.logic.C... |
package com.dev.base.mvp.model;
import com.dev.base.app.constant.UrlConstants;
import com.dev.base.mvp.model.http.DownloadApiService;
import com.dev.base.mvp.model.imodel.IDownloadModel;
import com.ljy.devring.DevRing;
import io.reactivex.Observable;
/**
* author: ljy
* date: 2018/3/23
* description: 下载文件的mod... |
import { Document, Types } from 'mongoose';
import { UserDocument } from './user.interface';
export interface ITask {
user: Types.ObjectId | UserDocument,
body: string,
completed: boolean
}
export interface TaskDocument extends ITask, Document {}
|
/**
* Created by WareBare on 05/13/2019.
*/
module.exports = {
tplContent: {},
content_: function($contentType){
let url = `https://api.github.com/repos/WareBare/WanezGD_Tools/releases`;
// <span class=\"Link\" title=\"Opens link in Browser on click.\" onclick=\"require(... |
#! /bin/bash
set -e
echo "-----------------------------------------------"
echo "Current directory: $(pwd)"
echo "Python executable: ${PY_EXE}"
echo "-----------------------------------------------"
# {{{ clean up
rm -Rf .env
rm -Rf build
find . -name '*.pyc' -delete
# }}}
git submodule update --init --recursive
... |
def classify_int(x):
if x < 0:
return 'negative'
elif x == 0:
return 'zero'
elif x > 0:
return 'positive' |
#include <stdio.h>
int main(void) {
int n = 10;
int sum = n * (n + 1) / 2;
printf("Sum of the first %d natural numbers is %d\n", n, sum);
return 0;
} |
<reponame>m-nakagawa/sample
/*
* 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 ... |
import { apiTestRegion } from './regions';
function createTestNodeBalancer(id) {
return {
label: `nodebalancer-${id}`,
region: apiTestRegion,
status: 'new_active',
updated: '2017-03-06T22:00:48',
created: '2017-03-03T18:08:44',
hostname: 'nb-1-1-1-1.newark.nodebalancer.linode.com',
id: 23... |
package room
import (
"PZ_GameServer/common/random_name"
"PZ_GameServer/common/util"
"PZ_GameServer/model"
"PZ_GameServer/protocol/pb"
"PZ_GameServer/sdk"
"PZ_GameServer/server/game/room/ningbo"
"PZ_GameServer/server/game/room/pinshi"
"PZ_GameServer/server/game/room/srddz"
"PZ_GameServer/server/game/room/xian... |
<gh_stars>1-10
package com.mc.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
/**
* [DefaultPasswordConfig 密码工具类]
*
* @author likai
* @version 1.0
* @da... |
#!/usr/bin/env bash
#SBATCH --job-name=da-cst-im-roi_cs6-HP-WIDER
#SBATCH -o gypsum/logs/%j_cs6-HP-WIDER.txt
#SBATCH -e gypsum/errs/%j_cs6-HP-WIDER.txt
#SBATCH -p 1080ti-long
#SBATCH --gres=gpu:4
#SBATCH --mem=60000
##SBATCH --cpus-per-task=4
##SBATCH --mem-per-cpu=4096
# starts from WIDER pre-trained model
# trial... |
python3 setup.py install --single-version-externally-managed --record=record.txt # Python command to install the script.
|
<reponame>JustinDFuller/purchase-saving-planner<gh_stars>1-10
import * as uuid from "uuid";
import * as Notifications from "notifications";
import { getterSetters } from "object/getterSetters";
import * as Purchases from "./purchases";
const defaults = {
id: uuid.v4(),
email: "",
saved: 0,
frequency: "Every ... |
#!/usr/bin/env sh
#
# Ping Identity DevOps - Docker Build Hooks
#
#- This hook runs through the followig phases:
#-
${VERBOSE} && set -x
# shellcheck source=../../pingcommon/hooks/pingcommon.lib.sh
. "${HOOKS_DIR}/pingcommon.lib.sh"
_pinFile="${SECRETS_DIR}/.autogen-truststore.pin"
# _storeFile="${STAGING_DIR}/autogen... |
<gh_stars>0
#! /usr/bin/env python3
# -*-coding:UTF-8 -*-
# @Time : 2019/01/04 16:44:26
# @Author : che
# @Email : <EMAIL>
import getpass
def svc_login(user, passwd):
return True
user = getpass.getuser()
passwd = getpass.getpass()
if svc_login(user, passwd):
print('Yay!')
else:
print('Boo!')
|
'use strict';
// LOWER INCOMPLETE GAMMA SERIES //
/**
* FUNCTION: lower_incomplete_gamma_series( a1, z1 )
* Creates a function to evaluate a series expansion of the incomplete gamma function.
*
* @param {Number} a1 - function parameter
* @param {Number} z1 - function parameter
* @returns {Function} series function
*/... |
package context
type Config interface {
Get(string) interface{}
Set(string,interface{}) error
}
var dic map[string]interface {}
func Get(key string) interface{} {
return dic[key]
}
func Set(key string,value interface{}) error{
if dic == nil {
dic = make(map[string]interface{})
}
dic[key]=value
return nil
} |
<filename>train.py
import torch
import torch.nn.functional as F
import torch.nn as nn
import numpy as np
import time
from tqdm import tqdm
from graphwriter import *
from utlis import *
from opts import *
import os
import sys
sys.path.append('./pycocoevalcap')
from pycocoevalcap.bleu.bleu import Bleu
from pycocoevalcap... |
#!/bin/bash
APPNAME=<%= appName %>
CLIENTSIZE=<%= nginxClientUploadLimit %>
APP_PATH=/opt/$APPNAME
BUNDLE_PATH=$APP_PATH/current
ENV_FILE=$APP_PATH/config/env.list
PORT=<%= port %>
BIND=<%= bind %>
NGINX_PROXY_VERSION="0.8.0"
LETS_ENCRYPT_VERSION="v1.13.1"
APP_IMAGE=<%- imagePrefix %><%= appName.toLowerCase() %>
IMAGE... |
<filename>src/App.js
import React, { useState, useEffect } from "react";
import CryptoCard from "./components/CryptoCard";
export default function App() {
const [data, setData] = useState(null);
useEffect(() => {
fetch("https://api.coinstats.app/public/v1/coins?skip=0&limit=3")
.then((response) => {
... |
<gh_stars>0
from typing import List
from pydantic import BaseModel
# 먼 지도
class AreaList(BaseModel):
areaCode: int
lat: float
long: float
businessCount: int
class MapFarSchema(BaseModel):
focusLat: float
focusLong: float
areaList: List[AreaList]
# 가까운 지도
class MapCloseSchema(BaseModel... |
<filename>src/js/lib/fullImgSroll.js
/**
* Created by Administrator on 2016/6/30.
*/
(function ($){
var FullScroll=function(dom,options){
this.$dom=$(dom);
this.init(options);
};
FullScroll.prototype={
constructor:FullScroll,
index:0,
clearId:null,
defaults:... |
import factory.fuzzy
from factory.django import DjangoModelFactory
from ..cases.factories import CaseFactory
from ..channels.factories import ChannelFactory
from ..generic.factories import (
AbstractTimestampUserFactory,
FuzzyDateTimeFromNow,
FuzzyTrueOrFalse,
)
from ..institutions.factories import Institu... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {PropType} from 'protocol';
import {deeplySerializeSelectedProperties} from './state-serializer';
const QUER... |
<filename>nohttp/src/main/java/io/spring/nohttp/file/HttpReplacerProcessor.java<gh_stars>100-1000
/*
* Copyright 2002-2019 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 o... |
<reponame>ferki/curator
from .utils import *
def show(object_list):
"""
Helper method called by the CLI.
:arg client: The Elasticsearch client connection
:arg object_list: A list of indices or snapshots to show
:rtype: bool
"""
for obj in ensure_list(object_list):
print('{0}'.forma... |
<filename>test/lib/reportError.spec.js
'use strict'
/* global describe, it */
const expect = require('unexpected').clone()
const proxyquire = require('proxyquire').noPreserveCache()
const caches = require('../../lib/caches')
let lastError
const reportError = proxyquire('../../lib/reportError', {
'./globals': {
... |
#!/bin/bash
while getopts :i:o:d: flag; do
case $flag in
i) input=$OPTARG;;
o) out_dir=$OPTARG;;
d) home_dir=$OPTARG;;
esac
done
#create output directory
mkdir -p $out_dir/mlplasmids_output
#clone mlplasmids
mkdir -p $home_dir/tools
if [[ ! -d $home_dir/tools/mlplasm... |
<filename>data-structures/src/main/java/com/github/bael/csprogram/AnalyzeEqualsViolationDemo.java
package com.github.bael.csprogram;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
* Проверка нарушения условия равенства переменных
*/
public class AnalyzeEqualsViolationDemo {... |
// @flow
import * as React from 'react';
import {
MosaicWindow as RMMosaicWindow,
MosaicWithoutDragDropContext,
getLeaves,
} from 'react-mosaic-component';
import CloseButton from './CloseButton';
import ThemeConsumer from '../Theme/ThemeConsumer';
// EditorMosaic default styling:
import 'react-mosaic-component/... |
#! /bin/bash
../src/qbsolv -i qubos/factoring.qubo -m -T 21 $1
../src/qbsolv -i qubos/factoring.qubo -m -T 21 -r 98796 $1
../src/qbsolv -i qubos/factoring.qubo -m -T 21 -r 12345678 $1
|
<reponame>Dnpypy/java-oop
package academy.devonline.java.home_section001_classes.dyna_array;
public class HomeDynaArrayVer2 {
int[] result = new int[5];
int count;
public int[] getResult() {
return result;
}
public void setResult(int[] result) {
this.result = result;
}
pu... |
/**
* Creates different opacity variants for provided color
*
* @param color CSS Variable name without double dash
*/
const withOpacity = (color) => {
return Array.from({ length: 9 }).reduce(
(prev, _cur, i) => ({
...prev,
[(i + 1) * 10]: `var(--${color}-${(i + 1) * 10})`,
}),
{}
);
};
... |
#! /bin/sh
# This file can be modified by user to provide local path or afs path to
# different platofrm or version of HepMC, Pythia8, MC-Tester and ROOT.
# Safeguard test if running with /afs paths.
if test ! -d /afs/cern.ch/sw/lcg; then
echo ""
echo "This script is for use on CERN server only."
echo ""
exit 0
f... |
#!/bin/sh
tcpdump -x -vvv -r ping.pcap | less
|
<reponame>neoguru/axboot-origin<filename>ax-boot-admin/src/main/java/com/chequer/axboot/admin/domain/sample/parent/ParentSample.java<gh_stars>100-1000
package com.chequer.axboot.admin.domain.sample.parent;
import com.chequer.axboot.admin.domain.SimpleJpaModel;
import com.chequer.axboot.core.annotations.ColumnPosition;... |
/*
* Copyright [2018] [<NAME>]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
<gh_stars>1-10
require 'spec_helper'
describe HTTP::Response do
describe 'headers' do
let(:body) { double(:body) }
let(:headers) { {'Content-Type' => 'text/plain'} }
subject(:response) { HTTP::Response.new(200, '1.1', headers, body) }
it 'exposes header fields for easy access' do
expect(respo... |
# Load data
import pandas as pd
df = pd.read_csv('data.csv')
# Extract features and target
X = df.drop('price', axis=1).values
y = df['price'].values
# Split into train and test
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=... |
jQuery('.numbersOnly').keyup(function () {this.value = this.value.replace(/[^0-9\.]/g, '');});
$(document).ready(function(){
$('.datepickerr').datepicker({"setDate": new Date(),"autoclose": true,"format": "dd/mm/yyyy",todayHighlight: true});
setTimeout(function(){ $("#flashmsg").hide(); }, 7000);
$("#chk_secon... |
/**
* Created by henryleu on 9/6/16.
*/
const ApiDef = require('./api');
const apis = [];
const apiBaseUrl = 'https://api.netease.im/nimserver/team';
const teamApis = {
createTeam: 'create',
deleteTeam: 'remove',
updateTeam: 'update',
queryTeams: 'query',
addTeamMember: 'add',
removeTeamMember... |
#!/bin/bash
PGPASSWORD="password"
#Download the data here
wget https://github.com/CrunchyData/crunchy-demo-data/releases/download/V0.6.5.1/crunchy-demo-fire.dump.sql.gz
###### Ucomment for cloud or new database
#createdb -h 52.167.136.70 -U postgres -p 5432 fire
# Create the extension here
###### Ucomment for cloud ... |
<filename>src/require.js
const path = require('path');
const fs = require('fs');
module.exports.folder = (dir, exclude = [], result = {}, recursive = true) => {
let stat, field, names = fs.readdirSync(dir);
for (let name of names) {
stat = fs.statSync(`${dir}/${name}`);
if (stat.isDirectory() &... |
#!/bin/bash
#
# Copyright 2012 Google Inc. All Rights Reserved.
# Author: kwinter@google.com (Kevin Winter)
#
# Runs both bug "unit" tests as well integration tests.
# Expects pickles to work.
BASE_DIR=$1
LIB=$2
MAX_VER=$3
BUGS_DIR="tests/adspygoogle/$LIB/bugs"
INTEGRATION_TEST_DIR="tests/adspygoogle/$LIB/$MAX_VER/"
... |
import React from 'react';
const SearchForm = ({ inputCheck }) => (
<form className="search-form">
<input
onChange={inputCheck}
type="text"
autoComplete="off"
placeholder="Search images..."
/>
</form>
);
export default SearchForm;
|
package io.opensphere.featureactions.editor.ui;
import java.awt.Component;
import javafx.scene.Node;
import javafx.scene.control.ListView;
import javafx.scene.layout.BorderPane;
import io.opensphere.core.Toolbox;
import io.opensphere.featureactions.editor.model.SimpleFeatureAction;
import io.opensphere.fea... |
#!/usr/bin/env sh
# Copyright 2018 First Rust Competition Developers.
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or d... |
define(['./scroll_module'], function(scrollModule) {
var scroll;
scroll = new scrollModule();
function isHidden(element) {
return (element.offsetParent === null)
}
function filterEvents(query) {
var i, j, len, len1, event, events, results, results1;
events = document.getElementsByClassName('l... |
package testpb
import (
"testing"
"google.golang.org/protobuf/reflect/protoreflect"
)
func getFastType() (fastReflectionType protoreflect.MessageType) {
return (&A{}).ProtoReflect().Type()
}
func getSlowType() protoreflect.MessageType {
return (&A{}).slowProtoReflect().Type()
}
func Benchmark_MessageType_New_F... |
alter table sessions add hash_code bigint;
|
<reponame>ministryofjustice/prison-visits-2
class Cancellation < ApplicationRecord
class Reason
include ActiveModel::Model
attr_accessor :explanation, :id, :label
end
end
|
export CODE_TRANSFORMER_DATA_PATH=/scratch1/08401/ywen/data/code-transformer
export CODE_TRANSFORMER_BINARY_PATH=/scratch1/08401/ywen/code/code-transformer/sub_modules
export CODE_TRANSFORMER_MODELS_PATH=/scratch1/08401/ywen/code/code-transformer/models
export CODE_TRANSFORMER_LOGS_PATH=/scratch1/08401/ywen/code/code-t... |
#!/bin/sh
echo "Uninstalling ..."
systemctl --user stop gesture_improvements_gesture_daemon.service
rm -v ~/.config/systemd/user/gesture_improvements_gesture_daemon.service
rm -v ~/.local/bin/gesture_improvements_gesture_daemon
echo "Uninstalled ..."
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.