text stringlengths 1 1.05M |
|---|
<gh_stars>0
/*
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups
Use capture groups in reRegex to match numbers that are repeated only three
times in a string, each separated by a space.
(01) Your regex should use the shorthand charac... |
class Pybind11 < Formula
desc "Seamless operability between C++11 and Python"
homepage "https://github.com/pybind/pybind11"
url "https://github.com/pybind/pybind11/archive/v2.6.1.tar.gz"
sha256 "cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a"
license "BSD-3-Clause"
bottle do
cellar :a... |
package postgres
import (
"hash/fnv"
"io"
)
const (
manifestAdvisoryLock = `SELECT pg_try_advisory_xact_lock($1);`
)
func crushkey(key string) int64 {
h := fnv.New64a()
io.WriteString(h, key)
return int64(h.Sum64())
}
|
#!/bin/sh
if [[ "$(whoami)" == "kristijan" ]]; then
REPO_DIR=/home/kristijan/phd/pose/learnable-triangulation-pytorch/
else
REPO_DIR=/home/dbojanic/pose/learnable-triangulation-pytorch/
fi
echo ${REPO_DIR}
docker run --rm --gpus all --name kbartol-triangulation -it \
-v ${REPO_DIR}:/learnable-triangulation/ learn... |
def sum(a, b):
result = a + b
print(result)
sum(10, 20) |
import { PresentationNode } from '@daign/2d-pipeline';
import { StyleSelectorChain } from '@daign/style-sheets';
import { TwoPointRectangle } from '@daign/2d-graphics';
import { TikzRenderer } from '../tikzRenderer';
import { TikzRenderModule } from '../tikzRenderModule';
export const twoPointRectangleModule = new Ti... |
#!/bin/sh
set -e
export LANG=C
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export TZ=America/New_York
OVERRIDE_SCRIPT="/etc/apache2/override.sh"
# update ClientID
if [ -z "$CLIENTID" ] ; then
export CLIENTID='none'
fi
# update ClientSecret
if [ -z "$CLIENTSECRET" ] ; then
exp... |
package com.kakaopay.dto;
import lombok.Data;
/**
* 결제 응답
*
* @author kjy
* @since Create : 2020. 4. 17.
* @version 1.0
*/
@Data
public class CardInfo {
private String cardNo;
private String extMmYy;
private String cvcNo;
public CardInfo(String cardInfoStr) {
String tempStr = (cardInfoStr);
Str... |
const element = require('../../index');
const {
storage,
blockchain,
primaryKeypair,
recoveryKeypair,
} = require('../__tests__/__fixtures__');
describe('operationsToTransaction', () => {
it('should batch and anchor operations to blockchain', async () => {
const encodedPayload = element.func.encodeJson(... |
#!/usr/bin/env python
# encoding: utf-8
"""
__init__.py
Created by <NAME> on 2010-12-23.
Copyright (c) 2010
"""
__author__ = '<NAME>'
__copyright__ = 'Copyright (c) 2011, <NAME>'
__credits__ = ['<NAME>', 'Brant Faircloth']
__license__ = 'http://www.opensource.org/licenses/BSD-3-Clause'
__version__ = '1.0'
__maintaine... |
<reponame>sadjy/devnet-wallet
import { Colors } from "./colors";
import { Base58 } from "./crypto/base58";
import { ED25519 } from "./crypto/ed25519";
import { IKeyPair } from "./models/IKeyPair";
import { ITransaction } from "./models/ITransaction";
/**
* Class to help with transactions.
*/
export class Transaction... |
from flask import Flask, render_template, request
import requests
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/search', methods=['POST'])
def search():
// Get the search query from the form
search_query = request.form['search-query']
// Make the API reques... |
import os
import numpy as np
dir = '/home/gzx/data/Dataset/image_caption/coco/x152_grid_320x500'
files = os.listdir(dir)
# for f in files:
# # print(f)
# # data = np.load(os.path.join(dir, f))['feat']
# # print(data.shape)
# # break
# np.savez(os.path.join('/home/gzx/data/Dataset/image_caption/coco/'... |
class Node:
def __init__(self, data):
self.data = data
self.next = None
def insert_node(head, value):
node = Node(value)
if head is None:
return node
temp = head
while temp.next:
temp = temp.next
temp.next = node
return head
head = Node(3)
head.next = N... |
package main;
import java.util.Scanner;
public class HeatWaterEnergy
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.print("Enter the amount of water in kilograms: ");
double waterWeightInKilograms = input.nextDouble();
System.out.print("Enter the initi... |
var ExampleBlock = function(config) {
this.container = config.container;
this.callbacks = config.callbacks || {};
this.codeblock = this.container.querySelector(".codeblock");
this.type = this.container.getAttribute("data-type");
this.fn = this.codeblock.getAttribute("data-fn");
this.autoexec = this.codeblo... |
package neutron
const LB_ROUND_ROBIN_ALGORITHM = "ROUND_ROBIN"
const LB_SOURCE_IP_ALGORITHM = "SOURCE_IP"
type OpenStackObject struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
}
type FixIP struct {
Subn... |
import java.util.List;
public class LargestNumber {
public static int getLargestNumber(List<Integer> list) {
int largest = Integer.MIN_VALUE;
for (int num : list) {
if (num > largest) {
largest = num;
}
}
return largest;
... |
#!/bin/sh
#SBATCH --nodes=7
#SBATCH --ntasks-per-node=20
#SBATCH --mem=64000
#SBATCH --time=23:59:00
source ~/.bashrc
time mpiexec nemo PS_S18d_f220_202006.yml -M -n
|
import pygame
import time, sys, random
from wordsearchGenerator import returnWordPuzzle
# Initialize the program.
pygame.init()
# Define initial variable values.
SIZE = 15
MARGIN = 40
WIN_WIDTH = MARGIN + SIZE*40 + MARGIN + MARGIN*2
WIN_HEIGHT = MARGIN + SIZE*40 + 50
notRunning = False
linesToDraw = []
wsArray, word... |
public int maxPathSum(int[][] triangle) {
for(int i=triangle.length-2; i>=0; i--) {
for(int j=0; j<=i; j++) {
triangle[i][j] += Math.max(triangle[i+1][j], triangle[i+1][j+1]);
}
}
return triangle[0][0];
} |
<gh_stars>1-10
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cassette = void 0;
var cassette = {
"viewBox": "0 0 64 64",
"children": [{
"name": "g",
"attribs": {
"id": "CASSETTE"
},
"children": [{
"name": "g",
"attribs": {},
"children... |
import fade from '../../internal/fade';
import colors from '../../settings/colors';
export default {
root: {
color: 'currentColor',
fontSize: '12px',
lineHeight: '12px',
textAlign: 'right',
padding: '0 0 0 10px',
opacity: '.75'
},
edited: {
marginRight: '4px'
},
image: {
paddi... |
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
# load the dataset
data = pd.read_csv("house_data.csv")
# create feature and target arrays
X = data[['sqft_living', 'sqft_lot', 'grade', 'bedrooms', 'bathrooms']]
y = data['price']
# create and fit the model
model = LinearReg... |
gcc /vagrant/mirai/reports/main.c -o reports
|
<reponame>mayankmanj/acl2<gh_stars>100-1000
#!/usr/bin/env ruby
# VL Verilog Toolkit
# Copyright (C) 2008-2014 Centaur Technology
#
# Contact:
# Centaur Technology Formal Verification Group
# 7600-C N. Capital of Texas Highway, Suite 300, Austin, TX 78731, USA.
# http://www.centtech.com/
#
# License: (An MIT/X11... |
/**
* Copyright 2014 isandlaTech
*
* 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... |
public class Boss{
public String weapon;
public int bossHealth;
public int damage;
public Boss(String weapon, int bossHealth, int damage){
this.weapon = weapon;
this.bossHealth = bossHealth;
this.damage = damage;
}
} |
#!/bin/bash
# (Creates python callable GRPC logic from the .proto file)
# You can run this script from anywhere,
# and it will generate the new files in the protobuf folder in this script's directory
THIS_SCRIPTS_DIR="`dirname \"$0\"`"
cd "$THIS_SCRIPTS_DIR" || (echo "Couldn't cd into $THIS_SCRIPTS_DIR" && exit)
pyt... |
#!/bin/sh
./gradlew --console plain --no-daemon -q tank-server:run
|
#!/bin/bash
# This will read in a .gfg format and convert it to the atoms/diameters in PDMS
cat ~/ranger_home/materials/PDMS/gfg/PDMS_1.gfg | sed -e "s/0.023000/0.023000\tWhite\tH/" \
| sed -e "s/0.198000/0.198000\tGray\tSi/" \
| sed -e "s/0.062000/0.062000\tBlack\tC/" \
| sed -e "s... |
SELECT SUM(quantity)
FROM orders
WHERE product = '<product_name>'
AND created_at >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) |
<gh_stars>0
module.exports = function(grunt) {
grunt.initConfig({
// Sets up the watch on the above tasks
watch: {
file: {
files: ['packages/**/*.coffee', 'packages/**/*.less', 'packages/**/*.css', 'packages/**/*.js'],
tasks: ['shell']
}... |
<filename>thread/2/main.c
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
//线程函数
void *test(void *ptr)
{
int i;
for(i=0;i<8;i++)
{
printf("the pthread running ,count: %d\n",i);
sleep(1);
}
}
int main(void)
{
pthread_t pId;
int i,ret;
//创建子... |
set -e -x
gcc \
-o wayland \
wayland.c \
-lwayland-client \
-lwayland-server \
-Wl,-Map=wayland.map
sudo mount -o remount,rw /
sudo cp wayland /usr/share/click/preinstalled/.click/users/@all/com.ubuntu.camera/camera-app
ls -l /usr/share/click/preinstalled/.click/users/@all/com.ubuntu.camera/camera... |
import java.io.{FileWriter, IOException}
import org.jsoup.select.Elements
import org.jsoup.{HttpStatusException, Jsoup}
import scala.text.Document
import scala.util.matching.Regex
import play.api.libs.json._
/**
* Fetches airport data from flightradar24.com.
* No access tokens needed.
*/
object FR24AirportDataScr... |
#!/usr/bin/env node
/*
* Copyright 2018 The Closure Compiler 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 re... |
def createFromXML(filename):
try:
# Initialize an empty dictionary to store the extracted parameters
params = dict()
# Import the necessary modules for XML parsing
import amanzi_xml.utils.io
import amanzi_xml.utils.search as search
# Parse the XML file and extract t... |
#!/bin/bash
set -eo pipefail
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
PROJECT_DIR=$1
shift
"$@" ./src/play/play \
w \
"${SCRIPT_DIR}/tiles.txt" \
"${PROJECT_DIR}/boards/scrabble.txt" \
--game=scrabble
|
package cn.lts.common.domain;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.time.LocalDateTime;
/**
* author: huanghaiping
* created on 16-7-13.
*/
public class BaseEntity extends Entity {
private static final long serialV... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-N-VB-fill/7-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-N-VB-fill/7-512+0+512-N-IP-1 --do_eval --per_devi... |
var l = window.location;
var url = 'ws://' + l.host + '/chat' + l.pathname;
var ws = new WebSocket(url);
function byId(id) {
return document.getElementById(id);
};
var out = byId('out');
var inp = byId('inp');
inp.onkeyup = function (e) {
if (e.ctrlKey && e.keyCode == 13) {
ws.send(inp.val... |
public class GkTuple<T> : IComparable
{
private T v;
public GkTuple(T value)
{
v = value;
}
public int CompareTo(object obj)
{
if (obj == null) return 1;
GkTuple<T> other = obj as GkTuple<T>;
if (other == null)
throw new ArgumentException("Object is... |
<gh_stars>0
/*
* Copyright © 2008-2011 <NAME>
* Copyright © 2010-2011 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this
* software and its documentation for any purpose is hereby granted
* without fee, provided that\n the above copyright notice appear in
* all copies and that both ... |
import React from 'react';
import logo from './logo.svg';
import Hi from './components/Hi';
import MediaCard from './components/MediaCard';
import Gate from './components/Gate';
import Room from './components/Room';
import Temp from './components/Temp';
import Reddit from './components/Reddit';
import './App.css';
fun... |
<filename>src/components/WorkOrder/AssignTechnicianFields.js
import React, { Component } from "react";
import Select from "react-select";
import { FIELDS } from "./formConfig";
import api from "../../queries/api";
export default class AssignTechnicianFields extends Component {
_isMounted = false;
constructor(prop... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_more = void 0;
var ic_more = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0z",
"fill": "none"
},
"children": []
}, {
"name": "path",
"attribs": {... |
#!/bin/bash
set -e
# usage: ./generate.sh [versions]
# ie: ./generate.sh
# to update all Dockerfiles in this directory
# or: ./generate.sh debian-jessie
# to only update debian-jessie/Dockerfile
# or: ./generate.sh debian-newversion
# to create a new folder and a Dockerfile within it
cd ... |
<reponame>madjake/node-mud-server
class GameMap {
constructor(width, height) {
this.width = width;
this.height = height;
this.map = {};
}
moveObject(obj, x, y) {
const oldHash = this.hashPoint(obj.x, obj.y);
const newHash = this.hashPoint(x, y);
if (oldHash === newHash) {
ret... |
class JwsToken {
protected?: string;
constructor(protected?: string) {
this.protected = protected;
}
validateAndExtractHeader(): string | null {
if (!this.protected) {
return null;
}
try {
const decodedHeader = base64urlDecode(this.protected);
if (typeof decodedHeader === 'o... |
#!/bin/sh
runFormula() {
echoColor "green" "Output global config template."
outputGlobalTemplate
}
outputGlobalTemplate(){
if [[ ! -s $VKPR_GLOBAL ]]; then
echoColor "red" "Doesnt have any values in global config file."
else
$VKPR_YQ eval $VKPR_GLOBAL
fi
}
|
import { Component, OnInit } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/auth';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { NgForm } from '@angular/forms';
import { auth } from 'firebase/app';
@Component({
selector: 'app-login... |
package edu.rosehulman.goistjt;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import java.io.IOException;
import java.util.Iterator;
public class JoinReducer extends Reducer<TaggedText, Text, Text, Text> {
@Override
protected void reduce(TaggedText key, Iterable<Text> values,... |
package org.apache.skywalking.testcase.undertow;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Copyright @ 2018/8/11
*
* @author cloudgc
*/
@SpringBootApplication
public class Application {
public static void main(String[] args) {... |
#!/bin/sh
# -----------------------------------------------------------------------------
#
# 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... |
<reponame>BearerPipelineTest/buf
// Copyright 2020-2022 Buf Technologies, 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
//
// ... |
<filename>vtStorManaged/RunTimeDll.cpp<gh_stars>1-10
/*
<License>
Copyright 2015 Virtium Technology
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
Unle... |
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
class PrintQueue {
private final Lock queueLock = new ReentrantLock();
public void printJob(String jobName) {
queueLock.lock();
try {
System.out.println("Printing " + jobName + "...");
... |
<filename>fastly/response_object_test.go
package fastly
import "testing"
func TestClient_ResponseObjects(t *testing.T) {
t.Parallel()
var err error
var tv *Version
record(t, "response_objects/version", func(c *Client) {
tv = testVersion(t, c)
})
// Create
var ro *ResponseObject
record(t, "response_objects... |
import tkinter as tk
from tkinter import ttk
def reset_body_position():
# Implement the logic to reset the robot's body position
pass
def egg_wave():
# Implement the logic for the wave Easter egg action
pass
def egg_shake():
# Implement the logic for the shake Easter egg action
pass
def egg_... |
def is_valid_parentheses(s: str) -> bool:
stack = []
mapping = {")": "(", "}": "{", "]": "["}
for char in s:
if char in mapping.values():
stack.append(char)
elif char in mapping:
if not stack or mapping[char] != stack.pop():
return False
return n... |
#!/bin/bash
# FPGA environment setup for oneAPI
# Check if we are on a supported OS
# We don't want to set up any FPGA environment variables in
# such cases because they can break non-FPGA targets as well
DISTRO=CentOS
DISTRO_STATUS=$?
RELEASE=8.1.1911
RELEASE_STATUS=$?
SUPPORTED_OS=0
if [ $DISTRO_STATUS == 0 ] && [ ... |
export const en = {
'redpackets': {
/**********
* Generic *
***********/
'red-packets': 'Red Packets',
'red-packet': 'Red Packet',
'view-all': 'View all',
'continue': 'Continue',
/*************
* Components *
**************/
'expired': 'Expired',
'few-minutes-left': "A... |
/**
* @description: XxxxReq为接口入参封装,XxxxVO为接口出参封装。
* 查询接口的入参,统一用XxxxCriteria
* @author: <EMAIL>
* @date: 2021/05/28
*/
package com.tuya.iot.suite.web.model; |
'use strict';
var allStores = [];
var hoursOfOperation = [
'6am',
'7am',
'8am',
'9am',
'10am',
'11am',
'12pm',
'1pm',
'2pm',
'3pm',
'4pm',
'5pm',
'6pm',
'7pm',
'8pm'
];
var totalCookiesByHour = [];
//initialize totalCookiesByHour array with zeros
for (let i = 0; i < hoursOfOperation.leng... |
import re
def keep_lazy_text(func):
# Assume this function is provided for use
pass
class NodeRenderer:
def __init__(self, nodelist):
# Initialize the class with the given list of nodes
self.nodelist = nodelist
def render(self, context):
# Implement the rendering logic accordi... |
import React, { useCallback, useMemo } from 'react';
import { TextField } from '@/components/core/Form';
import { Stack } from '@/components/UI/Stack';
import { useFocusIdx } from '@/hooks/useFocusIdx';
import { useBlock } from '@/hooks/useBlock';
import { BasicType } from '@/constants';
import { getParentByIdx } from ... |
<reponame>wuximing/dsshop
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ellipsisLabel = exports.testLabel = exports.getLabelLength = exports.getMaxLabelWidth = void 0;
var util_1 = require("@antv/util");
var text_1 = require("./text");
var ELLIPSIS_CODE = '\u2026';
var ELLIPSIS_CO... |
# basics
setopt AUTO_CD # if you type foo, and it isn't a command, and it is a directory in your cdpath, go there
# history
setopt APPEND_HISTORY # allow multiple terminal sessions to all append to one zsh command history
setopt EXTENDED_HISTORY # include more information about when the command was executed, etc
setop... |
<reponame>javifm86/hugo-site
// Colors for console.log messages
module.exports.COLORS = {
black: '\x1b[30m',
red: '\x1b[31m',
green: '\x1b[32m',
yellow: '\x1b[33m',
blue: '\x1b[34m',
magenta: '\x1b[35m',
cyan: '\x1b[36m',
white: '\x1b[37m'
};
/**
* Convert Windows backslash paths to sl... |
"""
Generate a set of C++ structures to represent a list of customers, each of which contains their name, address and phone numbers
"""
struct Customer {
string name;
string addr;
string phone;
};
std::vector<Customer> customers; |
<reponame>invinst/CPDB
from rest_framework import authentication
class SessionAuthentication(authentication.SessionAuthentication):
def enforce_csrf(self, request):
return
|
#!/bin/bash
sudo sed -i '/^#\sdeb-src /s/^#//' /etc/apt/sources.list
sudo apt-get -y build-dep linux linux-image-$(uname -r)
sudo apt-get install -y git vim dpkg-dev flex bison libncurses-dev \
gawk flex dwarves bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf fakeroot
|
#!/bin/bash
ENV=$1
NAMESPACE=$2
kubectl create configmap secondbaser-config-map --from-file=config/conf/$ENV.json -n $NAMESPACE |
package sharethis // import "github.com/otremblay/sharethis"
import (
"crypto/sha256"
"fmt"
"log"
"os"
"os/user"
"path/filepath"
"golang.org/x/crypto/ssh"
)
type FileReq struct {
Path string
ShareCount uint
Username string
Hostname string
ServerConn *ssh.ServerConn
fileurl string
httpport ... |
package main;
public class TwoNumbersCombinations
{
public static void main(String[] args)
{
final int MINIMUM_NUMBER = 1;
final int MAXIMUM_NUMBER = 7;
int totalCombinations = 0;
for (int firstNumber = MINIMUM_NUMBER; firstNumber < MAXIMUM_NUMBER; firstNumber++)
{
for (int secondNumber = firstN... |
(function() {
'use strict';
angular
.module('app.station')
.controller('StationSensorInfoDialogController', StationSensorInfoDialogController);
StationSensorInfoDialogController.$inject = ['$mdDialog', 'sensor', 'StationSensorsFactory'];
function StationSensorInfoDialo... |
<filename>OntoSeer/src/main/java/edu/stanford/bmir/protege/examples/menu/ToolsMenu1.java
package edu.stanford.bmir.protege.examples.menu;
import java.awt.event.ActionEvent;
import javax.swing.JOptionPane;
import org.protege.editor.owl.ui.action.ProtegeOWLAction;
public class ToolsMenu1 extends ProtegeOWLAction {
... |
/*******************************************************************************
* 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... |
#!/usr/bin/env bash
STATE=$(nmcli networking connectivity)
function tagMail {
echo "Running tag additions to tag new mail"
# # github
# notmuch tag +github -- from:notifications@github.com AND tag:new
# notmuch tag +github -- from:noreply@github.com AND tag:new
notmuch tag -inbox ... |
let item= []
$(document).ready(function () {
const urlNews = "https://www.jsonbulut.com/json/news.php";
const urlObjNews = {
ref:"51152bdc1f6fcae3e24bf21c819b02f6",
start:"0",
}
$.ajax({
type: "get",
url: urlNews,
data: urlObjNews,
dataType: "j... |
<reponame>Real-Currents/heroku-wp
/* global tinymce */
tinymce.PluginManager.add( 'ecwid', function( editor ) {
var toolbarActive = false;
function editStore( img ) {
ecwid_open_store_popup();
}
function removeImage( node ) {
var wrap;
if ( node.nodeName === 'DIV' && editor.dom.hasClass( node, 'ecwid-store... |
#!/bin/bash
echo "Starting entrypoint.sh ..."
echo "Installing dependencies"
composer install
echo "Generating app key"
php artisan key:generate
echo "Running migrations..."
php artisan migrate
echo "Starting PHP FPM"
php-fpm |
<reponame>abramenal/abramenal.com<gh_stars>0
export { default as Copyright } from './Copyright';
export { default as Footer } from './Footer';
export { default as Header } from './Header';
export { default as Icon } from './Icon';
|
#!/bin/sh
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
ex=ex13
dir=`basename \`pwd\``
keys=AbjRl************
if [ "$dir" = "vis" ]; then
dir=.
mesh=$ex.mesh
... |
#!/bin/bash
# Fetches latest files from github
repo="mudpi/mudpi-core"
branch="master"
mudpi_dir="/etc/mudpi"
webroot_dir="/var/www/html"
mudpi_user="www-data"
user=$(whoami)
function log_error() {
echo -e "\033[1;37;41mMudPi Install Error: $*\033[m"
exit 1
}
if [ ! -d "$mudpi_dir" ]; then
sudo mkdir -p $mudpi_dir... |
#!/usr/bin/env sh
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
nohup polybar topbar > /dev/null 2>&1 &
nohup polybar bottombar > /dev/null 2>&1 &
|
package pages
import (
"net/http"
"sync"
"io"
)
type Page struct {
Request *http.Request
Header http.Header
Cookies []*http.Cookie
Body []byte
item *PageItem
}
var (
pagePool = sync.Pool{
New: func() interface{} {
return &Page{
Cookies: make([]*http.Cookie, 0),
Body: make([]byte, 0),
item: ... |
#!/bin/bash
set -ex
export
# Enter temporary directory.
pushd /tmp
# Install Homebrew
curl --location --output install-brew.sh "https://raw.githubusercontent.com/Homebrew/install/master/install.sh"
bash install-brew.sh
rm install-brew.sh
# Install Node.
version=14.15.4
curl --location --output node.pkg "https://no... |
<filename>app/src/main/java/com/sreemenon/crypt/Lamp.java
package com.sreemenon.crypt;
import android.content.Context;
import android.util.Base64;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java... |
#!/bin/bash
cd ./Jar
java -jar Client.jar -cli
|
package io.opensphere.wms;
import java.util.Collection;
import java.util.HashMap;
import org.easymock.EasyMock;
import io.opensphere.core.AnimationManager;
import io.opensphere.core.PluginToolboxRegistry;
import io.opensphere.core.TimeManager;
import io.opensphere.core.Toolbox;
import io.opensphere.core.control.acti... |
package io.opensphere.mantle.data.geom.factory;
import java.util.Collection;
import java.util.Set;
import io.opensphere.core.geometry.Geometry;
import io.opensphere.core.geometry.renderproperties.RenderProperties;
import io.opensphere.mantle.data.DataTypeInfo;
/**
* The Interface RenderPropertyPool.
*/
... |
#!/bin/bash
#SBATCH --job-name FHH_SU2
#SBATCH --comment "FHH Model - QH Ferromagnetism"
#SBATCH --time=7-00:00:00
#SBATCH --mail-type=ALL
#SBATCH --mail-user=Mert.Kurttutan@physik.uni-muenchen.de
#SBATCH --chdir=/home/m/Mert.Kurttutan/Academia/Codes/Physics/Projects/qh_fm_01/codes/excs
#SBATCH --output=/project/th-scr... |
<reponame>jawa007/Spark-Test<gh_stars>0
package com.spark.itversity.example
import org.apache.spark.streaming.{ Seconds, StreamingContext }
import org.apache.spark.streaming.StreamingContext._
object WindowSparkStreaming {
def main(args: Array[String]) {
val ssc = new StreamingContext("local[2]", "Statefulwor... |
package main.support;
import org.deuce.transform.Exclude;
import adapters.*;
import main.support.*;
import java.util.ArrayList;
public class Factories {
// central list of factory classes for all supported data structures
public static final ArrayList<TreeFactory<Integer>> factories =
new Arr... |
<reponame>Boatdude55/staging-website
/**
* @fileoverview Closure Builder - Build tools
*
* @license Copyright 2015 Google 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... |
<gh_stars>1-10
import { OrderSerializer } from '../../../../shared/serializers/order-serializer';
import { RentalOrder } from '../entities/rental-order.entity';
import {
Injectable,
BadRequestException,
NotFoundException,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Rental... |
<reponame>GiantAxeWhy/skyline-vue
// Copyright 2021 99cloud
//
// 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 a... |
#!/bin/bash
PKG_NAME="ws-client"
QHOME=$PREFIX/q
mkdir -p $QHOME/packages/${PKG_NAME}
cp -r ${SRC_DIR}/*.q $QHOME/packages/${PKG_NAME}/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.