text stringlengths 1 1.05M |
|---|
package stream
import (
"bytes"
"context"
"encoding/gob"
"fmt"
"net/http"
"github.com/google/zoekt"
"github.com/google/zoekt/query"
)
// NewClient returns a client which implements StreamSearch. If httpClient is
// nil, http.DefaultClient is used.
func NewClient(address string, httpClient *http.Client) *Clien... |
<reponame>Tri-stone/xupercore
package p2pv1
import (
xctx "github.com/xuperchain/xupercore/kernel/common/xcontext"
"testing"
"time"
"github.com/xuperchain/xupercore/kernel/mock"
nctx "github.com/xuperchain/xupercore/kernel/network/context"
"github.com/xuperchain/xupercore/kernel/network/p2p"
pb "github.com/xup... |
<reponame>smagill/opensphere-desktop<filename>open-sphere-plugins/infinity/src/main/java/io/opensphere/infinity/model/InfinitySettingsModel.java<gh_stars>10-100
package io.opensphere.infinity.model;
import javafx.application.Platform;
import javafx.beans.property.BooleanProperty;
import io.opensphere.core.prefer... |
<filename>polyfills/String/prototype/sup/tests.js
/* eslint-env mocha */
/* globals proclaim */
var hasStrictMode = (function () {
return this === null;
}).call(null);
var ifHasStrictModeIt = hasStrictMode ? it : it.skip;
it('is a function', function () {
proclaim.isFunction(String.prototype.sup);
});
it('has cor... |
<gh_stars>0
package pl.jacob_the_liar.tic_tac_toe.core;
public class TicTacToe {
private final int[][] WIN_ROW = {
{0, 1, 2}, {0, 4, 8}, {0, 3, 6}, {1, 4, 7},
{2, 4, 6}, {2, 5, 8}, {3, 4, 5}, {6, 7, 8}};
private Player[] board;
private Player currentPlayer;
p... |
public List<Box> getUseBoxes() {
List<Box> useBoxes = new ArrayList<>();
Set<Box> visited = new HashSet<>();
collectUseBoxes(this, useBoxes, visited);
return useBoxes;
}
private void collectUseBoxes(Box currentBox, List<Box> useBoxes, Set<Box> visited) {
if (currentBox == null || visited.contains(currentBox)... |
<reponame>Sherlock92/greentop
/**
* Copyright 2017 <NAME>. Distributed under the MIT license.
*/
#include "greentop/account/GetAffiliateRelationRequest.h"
namespace greentop {
namespace account {
GetAffiliateRelationRequest::GetAffiliateRelationRequest() {
}
GetAffiliateRelationRequest::GetAffiliateRelationReque... |
<reponame>saiichihashimoto/lint-my-app
#!/usr/bin/env node
/* istanbul ignore file */
import updateNotifier from 'update-notifier';
import { Command } from 'commander';
import pkg from '../package';
import lintMyAppFix from './lint-my-app-fix';
import lintMyAppLint from './lint-my-app-lint';
import lintMyAppStaged fr... |
#!/bin/bash
if [ $1 -gt $2 ] && [ $1 -gt $3 ]; then
echo $1
elif [ $2 -gt $3 ]; then
echo $2
else
echo $3
fi |
#!/bin/bash
#---------------------------------------------
# Accords Platform Installation Validity Check
#---------------------------------------------
verbose=1
level=
function success()
{
if [ -z "$verbose" ]; then
verbose=0
else
echo "--" $1 ": OK"
fi
}
function failure()
{
echo "-----------------------... |
import path from 'path';
import fs from 'fs';
import {serial as test} from 'ava';
import tempy from 'tempy';
import makeDir from 'make-dir';
import del from '.';
const processCwd = process.cwd();
function exists(t, files) {
for (const file of files) {
t.true(fs.existsSync(path.join(t.context.tmp, file)));
}
}
fu... |
use std::collections::HashMap;
fn parse_svg_macro(macro_invocation: &str) -> HashMap<String, String> {
let mut attributes_map = HashMap::new();
let start_index = macro_invocation.find("!(").unwrap();
let end_index = macro_invocation.rfind(")").unwrap();
let attributes_str = ¯o_invocation[start_in... |
#!/bin/bash
# Removing locally and from remote the branches alredy merged in master.
# Be carefull with reverted branches. Git branches --merged does not know about revert.
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
git branch --merged mast... |
#!/bin/bash
mkdir -p build
pushd build
cmake \
-DPKG_CONFIG_DISABLE_NODE=OFF \
-DPKG_CONFIG_DISABLE_NODE8=OFF \
-DPXSCENE_COMPILE_WARNINGS_AS_ERRORS=OFF \
-DPXCORE_COMPILE_WARNINGS_AS_ERRORS=OFF \
-DSUPPORT_NODE=ON \
-DSUPPORT_DUKTAPE=ON \
-DPXCORE_WAYLAND_DISPLAY_READ_EVENTS=OFF \
-DDISABLE_DEBUG_MODE... |
export type StateUpdater<S> = (state: S) => S;
export type StateSynchronizer<S> = (state: S, previousState: Readonly<S>) => S;
export interface ComposableStateSynchronizer<S, K extends keyof any = keyof S> {
/**
* The name of a piece of state that the synchronizer updates
*/
stateKey: K;
/**
* Names of... |
<filename>twilio-studio/functions/scrape-c4k-for-supporting-documents-processing-status.js
const SITE_URL = "https://www.ctcare4kids.com/provider-information/status/";
exports.handler = async function(context, event, callback) {
const webscraperPath = Runtime.getAssets()['/web-scraper.js'].path;
const WebScraper =... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package library.helper.ui.addbook;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXTextField;
import java.net.UR... |
<reponame>mk12/mycraft
/*
* Copyright (c) 2002-2008 LWJGL Project
* 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 above copyr... |
import os
def process_configuration(module: str, request_config: dict) -> str:
if module == "upload":
detect_utils.check_config(request_config, required_arguments=['file', 'param1', 'param2'])
if not os.path.isabs(request_config['file']):
request_config["file"] = os.path.join(file_utils... |
<filename>rover/core/servers/imu/miscImu/misc/angularVelocity.py
import json
import requests
from time import sleep
###### global variables for counter, slp(sleepTime), angle1, and angle2 ######
global i
i = 0
global slp
slp = 0.1
global ang1
ang1 = 0
global ang2
ang2 = 0
###### This function calulates the angul... |
#!/bin/bash
######################################
# Publish the seafile base image to docker
# registry. This script should only be called during a travis build trigger by a tag.
######################################
# Nerver use "set -x" or it would expose the docker credentials in the travis logs!
set -e
set -o p... |
import os
import threading
import time
from unittest import TestCase
from galaxy.util import bunch
from galaxy.jobs.runners import local
from galaxy.jobs import metrics
from galaxy import model
from tools_support import (
UsesApp,
UsesTools
)
class TestLocalJobRunner( TestCase, UsesApp, UsesTools ):
de... |
coverage run --source=$PYTHONPATH/lfucache --omit=$PYTHONPATH/lfucache/test/* all_tests.py
coverage report --omit=$PYTHONPATH/lfucache/test/* -m
|
<reponame>arwilczek90/Operation-Pyramid
package SelfDrivingCar;
/**
* Created by awilczek on 3/18/14.
*/
public class Seat {
private int recline; //angle position of seat. the higher, the more bent the user is
private int yPosition; // height, up/down position
private int xPosition; // forward/back po... |
#!/usr/bin/env bash
#export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.7.10-0.fc30.x86_64/
python preprocess/filter_unique.py \
--input_path data/raw-v1 \
--output_path data/unique-v1.jsonl \
--min_jaccard 0.5
python preprocess/add_references.py \
--input_path data/unique-v1.jsonl \
--output_pat... |
const MongoClient = require('mongodb').MongoClient;
// Initialize connection
const uri = "mongodb+srv://<username>:<password>@<cluster>/<database>";
const client = new MongoClient(uri, {
useNewUrlParser: true
});
// Connect to the database
client.connect(err => {
// Check for connection error
if (err) throw err;
... |
f2py --f77flags=-fcheck=all -c MoogStokesPy_Alpha.pyf MoogStokessilent.f -L/usr/lib64/atlas/ -llapack Begin.f Infile.f Getasci.f Nansi.f Getcount.f Synth.f Synspec.f Finish.f Opacit.f OpacHydrogen.f OpacHelium.f Opacmetals.f Opacscat.f Opaccouls.f Nearly.f Eqlib.f Partnew.f Cdcalc.f Jexpint.f Linlimit.f Prinfo.f Sunde... |
# frozen_string_literal: true
# Copyright 2020 Google LLC
#
# 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 applicabl... |
// Copyright 2018 <EMAIL>
//
// 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 in writ... |
<gh_stars>1-10
const yaml = require('js-yaml');
const fs = require('fs');
const getExpectationsList = (filePath) => {
try {
const doc = yaml.safeLoad(fs.readFileSync(filePath, 'utf8'));
return doc.expectations
} catch (e) {
console.log(e);
}
}
module.exports = { getExpecta... |
#!/usr/bin/env bash
#
# // SPDX-License-Identifier: BSD-3-CLAUSE
#
# (C) Copyright 2018, Xilinx, Inc.
#
#!/usr/bin/env bash
#!/usr/bin/env bash
tag=$1
mlsuite=`dirname $PWD`
#sudo \
docker run \
--name "anup_container" \
--rm \
--net=host \
--privileged=true \
-it \
-v /dev:/dev \
-v /opt/xilinx:/opt/x... |
#!/bin/bash
# Get a list of users
users=`cat /etc/passwd |cut -d: -f1`
echo "Admin users:"
# Loop over the users
for u in $users; do
# Check if the user is an admin
if id -u $u | grep -q "groups=.*\badmin\b"; then
echo "$u"
fi
done |
#!/usr/bin/env bash
REPO_NAME=${PWD##*/}
DEVICE_NAME="XDOT"
# Skip compiling and flash the existing binary. Use "previous" argument.
# ./flash.sh previous
if [ "$1" != "previous" ]; then
# Remove the previous build if any.
if [ -d ./BUILD ]; then
rm -r ./BUILD/*
echo "[INFO] Removed the previ... |
SELECT item_name, COUNT(*) AS num_purchases
FROM Purchases
WHERE purchase_date > (CURDATE() - 7)
GROUP BY item_name
ORDER BY num_purchases DESC
LIMIT 1; |
#!/usr/bin/env sh
if [ "$(id -u)" -eq 0 ]
then
service log2ram stop
systemctl disable log2ram
rm /etc/systemd/system/log2ram.service
rm /usr/local/bin/log2ram
rm /etc/log2ram.conf
rm /etc/cron.daily/log2ram
rm /etc/logrotate.d/log2ram
if [ -d /var/hdd.log ]; then
rm -r /var/hdd.log
fi
echo "Lo... |
const arr = [1, 2, 3, 4];
let total = arr.reduce((acc, currVal) => acc + currVal); |
<reponame>rafax/sourcegraph
package lsifstore
import (
"context"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/sourcegraph/sourcegraph/internal/database/dbtesting"
"github.com/sourcegraph/sourcegraph/internal/observation"
)
func TestDatabaseHover(t *testing.T) {
if testing.Short() {
t.Skip()
}
db :... |
<gh_stars>1-10
export const FETCH_START = 'isFetching'
export const FETCH_END = 'isFetched'
/* for room */
export const SET_ROOMS = 'setRooms'
export const ADD_ROOM = 'addRoom'
export const REMOVE_ROOM = 'removeRoom'
/* for user */
export const SET_USER = 'setUser'
/* for view */
export const TOGGLE_CREATE_ROOM_DIAL... |
<reponame>randoum/geocoder
# frozen_string_literal: true
require 'geocoder/lookups/base'
require 'geocoder/results/db_ip_com'
module Geocoder
module Lookup
class DbIpCom < Base
def name
'DB-IP.com'
end
def supported_protocols
%i[https http]
end
def required_api_ke... |
#!/bin/bash
#SBATCH -N 1
#SBATCH -p res-gpu-small
#SBATCH -c 4
#SBATCH -t 2-00:00
#SBATCH -x gpu[0-8]
#SBATCH --qos short
#SBATCH --job-name vqa2_mao-3_normonly-expanded-nc-pt7_default_METER
#SBATCH --mem 20G
#SBATCH --gres gpu:1
#SBATCH -o ../../../results/vqa2_mao-3_normonly-expanded-nc-pt7_default_METER.out
cd ../.... |
# When the current working directory changes, run a method that checks for a .env file, then sources it. Happy days.
autoload -U add-zsh-hook
load-local-conf() {
# check file exists, is regular file and is readable:
if [[ -f .env && -r .env ]]; then
source .env
fi
}
add-zsh-hook chpwd load-local-... |
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/* JOrbis
* Copyright (C) 2000 ymnk, JCraft,Inc.
*
* Written by: 2000 ymnk<<EMAIL>>
*
* Many thanks to
* Monty <<EMAIL>> and
* The XIPHOPHORUS Company http://www.xiph.org/ .
* JOrbis has been based on their awesome works, Vorbis codec.
*... |
require 'uri'
module EMRPC
# Pid is a abbreviation for "process id". Pid represents so-called lightweight process (like in Erlang OTP)
# Pids can be created, connected, disconnected, spawned, killed.
# When pid is created, it exists on its own.
# When someone connects to the pid, connection is established.
... |
import React from 'react';
import { createUseStyles } from 'react-jss';
const useStyles = createUseStyles({
heading: {
borderBottom: '1px solid var(--jp-border-color2)',
margin: 0,
padding: '24px 16px 8px 16px',
fontWeight: 'bold',
textAlign: 'start',
fontSize: '9pt',
textTransform: 'uppe... |
import datetime
import json
import time
import okex.futures_api as future
from common_helper import convert_tv2ok_resolution, convert_timestamp2ok
from config_helper import diamond
okex_cfg = diamond.get_exchange_auth('okex')
api_key = okex_cfg.get('api_key')
secret = okex_cfg.get('secret')
passphrase = okex_cfg.get(... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pauseCircleO = void 0;
var pauseCircleO = {
"viewBox": "0 0 1536 1792",
"children": [{
"name": "path",
"attribs": {
"d": "M768 128q209 0 385.5 103t279.5 279.5 103 385.5-103 385.5-279.5 279.5-385.5 103-385.5-103-279... |
<filename>impl/src/main/java/com/example/demo/model/SystemUser.java
package com.example.demo.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
impo... |
<reponame>lautr/slide-monitor-webapp<filename>js/app.js
const client = contentful.createClient({
// This is the space ID. A space is like a project folder in Contentful terms
space: config.contentful.space,
// This is the access token for this space. Normally you get both ID and the token in the Contentful web ap... |
def calculate_total_cost(prices, quantities):
total = 0
for price, quantity in zip(prices, quantities):
total += price * quantity
return total |
function checkAnagram(wordA, wordB){
wordA = wordA.replace(/\s/g, '').toLowerCase();
wordB = wordB.replace(/\s/g, '').toLowerCase();
if (wordA.length != wordB.length) return false;
const alphabet = "abcdefghijklmnopqrstuvwxyz";
for (let char of alphabet ){
if (wordA.split("").filter(a => a === char).lengt... |
<filename>src/bonespring/implicit_euler/SpringFloat.ts
import SpringBase from './SpringBase';
// implicit euler spring
class SpringFloat extends SpringBase {
// #region MAIN
vel = 0; // Velocity
val = 0; // Currvent Value
tar = 0; // Target Value
// #endregion //////////////////////////... |
#!/bin/sh
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# BEGIN environment bootstrap section
# Do not edit between here and END as this section should stay identical in all scripts
findpath () {
myname=${0}
mypath=${myname%/*}
myname=${myname##*/}... |
<reponame>SadashivBirajdar/RealmDagger2MVP<gh_stars>1-10
package sample.sadashiv.examplerealmmvp.application;
import android.app.Application;
import android.content.Context;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import sample.sadashiv.examplerealmmvp.di.component.ApplicationComponent;
import samp... |
docker-compose up proxy client |
<gh_stars>1-10
package com.github.ayltai.hknews.util;
import android.os.Build;
import org.junit.Assert;
import org.junit.Test;
import com.github.ayltai.hknews.UnitTest;
public final class DevUtilsTest extends UnitTest {
@Test
public void testIsLoggable() {
Assert.assertFalse(DevUtils.isLoggable());
... |
import { BaseBlockInterface } from '../block.interface';
import { FileObjectInterface } from '../common/file-object.interface';
export interface FileBlockInterface extends BaseBlockInterface {
file: FileObjectInterface;
}
|
/**
* The high score handler in the game
*
* Shows ten high scores with the name of the owner of the high score.
*/
/*global Vector */
/*global isIntersect */
function HighScore(canvas, status) {
this.canvas = canvas;
this.status = status;
this.isHoverOverStart = false;
this.isHoverOverCon... |
package integrationtests
import (
"context"
"fmt"
"testing"
diskv1 "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1"
"github.com/kubernetes-csi/csi-proxy/client/api/volume/v1"
diskv1client "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1"
v1client "github.com/kubernetes-csi/csi-proxy/client/gr... |
import os
from pymongo import MongoClient
DEFAULT_MONGODB_HOST = "mongodb://mongo:password@127.0.0.1:27017"
def create_client() -> MongoClient:
host = os.getenv("MONGODB_HOST", DEFAULT_MONGODB_HOST)
return MongoClient(host)
# Example usage
client = create_client()
db = client.test_database |
SELECT c.name, MAX(o.total)
FROM customers c
JOIN orders o ON o.customer_id = c.id
GROUP BY c.name |
import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator } from "@angular/material/paginator";
import { MatSort } from "@angular/material/sort";
import { DataTableDataSource } from "./data-table-datasource";
@Component({
selector: "app-data-table",
templateUrl: "./data-table.component.ht... |
from typing import List
import re
def extractAlertTypes(xmlString: str) -> List[str]:
alert_types = re.findall(r'<alert type="([^"]+)"', xmlString)
return alert_types |
<filename>index.js
var express = require('express')
var app = express()
app.get('/', function (req, res) {
var request = require('request');
request('http://www.google.com', function (error, response, body) {
// console.log('error:', error); // Print the error if one occurred
// console.log('statusCode:', respo... |
#!/bin/sh
do_bin_check()
{
which ${item} && test -x $(readlink -m $(which ${item}))
}
check_bin()
{
item="$1"
echo "${item}?"
do_bin_check || missing_items
}
check_exists()
{
item="$1"
echo "${item}?"
test -e "$item" || missing_items
}
do_common()
{
check_bin "aspell"
check_bin... |
package com.growingwiththeweb.sorting;
public class BubbleSortOptimised {
public static void sort(Integer[] array) {
int unsortedBelow = array.length;
while (unsortedBelow != 0) {
int lastSwap = 0;
for (int i = 1; i < unsortedBelow; i++) {
if (array[i - 1] > ... |
from flask import Flask
app = Flask(__name__)
app.config['SECRET_KEY'] = "<KEY>"
from weather_app import routes |
<gh_stars>0
package com.wagner.javaconfig;
import com.wagner.javaconfig.coach.Coach;
import com.wagner.javaconfig.config.ApplicationConfig;
import com.wagner.javaconfig.logging.LoggerConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import... |
package com.waflo.cooltimediaplattform.backend.service;
import com.waflo.cooltimediaplattform.backend.ResourceType;
import java.io.IOException;
import java.io.InputStream;
public interface IUploadService {
/**
* @param toUpload is the stream which should be saved
* @param filePath is a uniq... |
# Create a project
django-admin startproject MyProject
# Create an app
python manage.py startapp MyApp
# Create the 'User' model in 'models.py'
from django.db import models
class User(models.Model):
# User fields
name = models.CharField(max_length=255)
age = models.PositiveIntegerField()
de... |
package pkcs8_test
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"encoding/pem"
"fmt"
"testing"
"github.com/youmark/pkcs8"
)
const rsa2048 = `-----<KEY>
-----END PRIVATE KEY-----
`
const encryptedRSA2048aes = `-----BEGIN ENCRYPTED PRIVATE KEY-----
<KEY>
-----END ENCRYPTED PRIVATE KEY-... |
<filename>frontend/frontend.pqd.config.js
export const network = {
id: 'phuquocdog',
name: '<NAME>',
tokenSymbol: 'PQD',
tokenDecimals: 10,
ss58Format: 42,
coinGeckoDenom: 'phuquocdog',
//backendWs: 'ws://localhost:8082/v1/graphql',
//backendHttp: 'http://localhost:8082/v1/graphql',
nodeWs: 'wss://rpc... |
from wordpal import puzzicon
from collections import defaultdict
from typing import Dict, Tuple, List, Set, Iterable, Callable
import logging
import itertools
import sys
_log = logging.getLogger(__name__)
_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
_BLANKS = '?_.'
_GARBAGE = ' '
_DEFAULT_PENALTY = -50
_LETTER_SOULS = {
... |
#!/bin/bash
DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice7.0" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice")
FLAG=
OFFICE_HOME=
KKFILEVIEW_BIN_FOLDER=$(cd "$(dirname "$0")";pwd)
export KKFILEVIEW_BIN_FOLDER=$KKFILEVIEW_BIN_FOLDER
cd $KKFILEVIEW_BIN_FOLDER
echo "Using KKFILEVIEW_BIN_FOLDER $KKFILE... |
#!/bin/bash
# utilizzato per impostare le variabili d'ambiente utili
# durante il provisioning delle macchine
# prende in ingresso i parametri di configurazione forniti
# al suo lancio da Vagrantfile
STARTING_IP=$1
REGISTRY_DOMAIN=$2
SWARM_DOMAIN=$3
SWARM_NODE_PREFIX=$4
SWARM_NUM=$5
read IP_A IP_B IP_C IP_D <<<"${S... |
import tkinter as tk
from tkinter import ttk
# Create window
root = tk.Tk()
root.title("Health Monitor")
# Create label
ttk.Label(root, text = "Enter your vitals:").grid(row = 0, column = 0)
# Create Labels
ttk.Label(root, text = "Temperature :").grid(row = 1, column = 0)
ttk.Label(root, text = "Heart Rate... |
<filename>project/scripts/hdo_download.py
#!python
# This script is used to download completed (converted) video files back to the source machine
import os
import boto3
import json
import logging
from lock import lock_file_exists, make_lock_file, release_lock_file
from botocore.exceptions import ClientError
from dote... |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2009 <NAME> All rights reserved.
#
"""
"""
#end_pymotw_header
import robotparser
import urlparse
AGENT_NAME = 'PyMOTW'
URL_BASE = 'http://www.doughellmann.com/'
parser = robotparser.RobotFileParser()
parser.set_url(urlparse.urljoin(URL_BASE, 'robots.txt'))
par... |
<gh_stars>1-10
package kbasesearchengine.events.handler;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import com.google.common.base.Optional;
import kbasesearchengine.tools.Utils;
import us.kbase.common.service.UObject;
/** A data package loaded from a particular data source.
* @au... |
<filename>particlesystem/src/main/java/com/github/particlesystem/modifiers/ParticleModifier.java
package com.github.particlesystem.modifiers;
import com.github.particlesystem.Particle;
public interface ParticleModifier {
/**
* modifies the specific value of a particle given the current miliseconds
*
... |
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
install_ignition_unit() {
local unit=$1; shift
local target=${1:-complete}
inst_simple "$moddir/$unit" "$systemdsystemunitdir/$unit"
# note we `|| exit 1` here so we error out if e.... |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PARENT_DIR="$(dirname "$DIR")"
MAKEFILE_PATH=$PARENT_DIR/templates/linuxarmv6l/Makefile
cd ${DIR}/../../examples
for category in $(ls -1d *)
do
if [ $category != "addons" ] && [ $category != "ios" ] && [ $category != "android" ] && [[ -d $category ]]; the... |
import type { IResponseSending, IReponseContacts, IReponseAttendants, IReponseDepartment, IContactFilter } from '../../interfaces/index';
import { BaseProvider, IResultError } from '../BaseProvider';
import { ForWhoType, IProvider } from '../BaseProvider/IProvider';
import { ReqType } from './constants';
import type { ... |
#!/bin/sh
# Run this to generate configure and Makefile
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
(
cd $srcdir
die=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed."
echo "Download the appropriate package for your distribution,"
... |
<reponame>Guad/msfs2020-go
package simconnect
//go:generate go-bindata -pkg simconnect -o bindata.go -modtime 1 -prefix "../_vendor" "../_vendor/MSFS-SDK/SimConnect SDK/lib/SimConnect.dll"
// MSFS-SDK/SimConnect\ SDK/include/SimConnect.h
// MSFS-SDK/SimConnect\ SDK/lib/SimConnect.dll
// Everything is stubbed out on ... |
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d).
if [[ ! -z ${DEBUG} ]]
then
set ${DEBUG} # Activate the expand mode if DEBUG is anything but empty.
else
DEBUG=""
fi
set -o errexit # Ex... |
#!/bin/bash
#
# pre-req.sh - Pre configuração de servidor com Ansible
#
# Site : https://alejunio.cloud
# Autor : Alex Junio <contato@alejunio.cloud>
#
# ---------------------------------------------------------
# Esse script vai instalar tudo o que a stack precisa para
# executar o ansible e as tasks corr... |
import Foundation
struct Alarm: Codable {
let time: String
let label: String
// Add any other properties as needed
}
struct Alarms {
var list: [Alarm] = []
func localRead() {
if let jsonData = UserDefaults.standard.data(forKey: "alarms") {
do {
list = try JSOND... |
<reponame>NAVEENRH/FULL_STACK_TRAINING
import React from "react";
import { Route, Switch } from "react-router-dom";
import Container from "./components/Container";
import ErrorPage from "./components/ErrorPage";
import PrivateRoute from "./components/PrivateRoute";
import Login from "./containers/Login";
import Product... |
<filename>Godeps/_workspace/src/github.com/wellington/go-libsass/libs/func.go
package libs
// #include <stdlib.h>
// #include "sass_context.h"
//
// extern union Sass_Value* GoBridge( union Sass_Value* s_args, void* cookie);
//
// union Sass_Value* CallSassFunction( union Sass_Value* s_args, Sass_Function_Entry cb, st... |
#!/bin/bash
if [ -f /opt/topic-operator/custom-config/log4j2.properties ];
then
export JAVA_OPTS="${JAVA_OPTS} -Dlog4j2.configurationFile=file:/opt/topic-operator/custom-config/log4j2.properties"
fi
if [ "$STRIMZI_TLS_ENABLED" = "true" ]; then
# Generate temporary keystore password
export CERTS_STORE_PAS... |
# this script's home dir is trunk/installer/linux/X11
PRODUCT_NAME="ugene"
VERSION_MAJOR=`cat ../../../src/ugene_version.pri | grep 'UGENE_VER_MAJOR=' | awk -F'=' '{print $2}'`
VERSION_MINOR=`cat ../../../src/ugene_version.pri | grep 'UGENE_VER_MINOR=' | awk -F'=' '{print $2}'`
VERSION=`cat ../../../src/ugene_version... |
#!/usr/bin/env bash
# A script file to generate IntelliJ project from using the Intellij Pants Plugin.
# Note: for any modification in this file please modify ExportIntegrationTest#test_intellij_integration
# We don't want to include targets which are used in unit tests in our project so let's exclude them.
./pants e... |
#!/usr/bin/env bash
docker-compose run php bash |
<gh_stars>0
package com.jackson0714.passjava.question.service.impl;
import com.jackson0714.common.to.es.QuestionEsModel;
import com.jackson0714.common.utils.R;
import com.jackson0714.passjava.question.entity.TypeEntity;
import com.jackson0714.passjava.question.feign.SearchFeignService;
import com.jackson0714.passjava.... |
require 'csv'
module NetworkEventsHelper
def copy_network_events?
params[:network_event_ids].present?
end
def default_start_date
if params[:start_date].present?
params[:start_date]
else
Date.today
end
end
def default_end_date
if params[:end_date].present?
params[:e... |
// <NAME> Copyright (c) 2019
// New Beginnings - Capstone Project
// filename: f_userListDelete.c
#include "headers.h"
int userListDelete(struct userList* L, int p)
{
if (p) { printf("deleting user list..."); }
if (L->head == NULL)
{
if (p) { printf("no head, returning...\n"); }
... |
/*
*
*/
package net.community.apps.tools.adm.config;
import net.community.chest.dom.proxy.XmlProxyConvertible;
import net.community.chest.ui.helpers.table.EnumTableColumn;
import org.w3c.dom.Element;
/**
* <P>Copyright 2009 as per GPLv2</P>
*
* @author <NAME>.
* @since Oct 15, 2009 10:50:38 AM
*/
public class... |
<filename>src/default-stats-capture.d.ts
/**
* @license
* Copyright Google Inc. 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 { Capture } from './interfaces';
export declare const defaultStatsCap... |
<filename>src/lib/jssTheme.js
const theme = {
typography: {
fontFamily: {
serif: "'Playfair Display', serif",
sansSerif: "'Raleway', sans-serif",
serif2: 'Alegreya, serif',
sansSerif2: "'Alegreya Sans', sans-serif",
serif3: "'Bree Serif', serif",
},
},
colors: {
primary: ... |
package handlers
import (
"fmt"
"strings"
"time"
"github.com/Not-Cyrus/GoGuardian/utils"
"github.com/bwmarrin/discordgo"
)
func readAudits(s *discordgo.Session, guildID string, auditType int) string {
parsedData, configData := utils.FindConfig(guildID)
auditMap := make(map[string]string)
us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.