text stringlengths 1 1.05M |
|---|
<gh_stars>1-10
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.heartBroken = void 0;
var heartBroken = {
"viewBox": "0 0 16 16",
"children": [{
"name": "path",
"attribs": {
"fill": "#000000",
"d": "M11.8 1c2.318 0 4.2 1.882 4.2 4.2 0 4.566-4.935 5.982-8 10... |
package main
import (
"YouComic-Nano/config"
"YouComic-Nano/datasource"
"YouComic-Nano/debug"
"YouComic-Nano/generate"
"YouComic-Nano/router"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"os"
)
func main() {
var err error
// debug mode
debugMode := len(os.Getenv("DEBUG")) != 0
rootPath := "./"
... |
#!/bin/sh
#
# This file was produced by running the Configure script. It holds all the
# definitions figured out by Configure. Should you modify one of these values,
# do not forget to propagate your changes by running "Configure -der". You may
# instead choose to run each of the .SH files by yourself, or "Configure -S... |
#!/bin/bash
if [ "$#" -lt 2 ];
then
echo "Usage: <nworkers> <path_in_HDFS> [param=val]"
exit -1
fi
# put the local training file to HDFS
hadoop fs -rm -r -f $2/mushroom.fm.model
hadoop fs -put ../data/agaricus.txt.train $2/data
hadoop fs -put ../data/agaricus.txt.test $2/data
# submit to hadoop
../../dmlc-core/tra... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.filing = void 0;
var filing = {
"viewBox": "0 0 512 512",
"children": [{
"name": "g",
"attribs": {},
"children": [{
"name": "path",
"attribs": {
"d": "M381,128.6H132.1c-12.1,0-19.5,0-19.5,20.4v28.... |
#!/bin/bash
# This script tests the basic behavior of record-minmax
#
# HOW TO USE
#
# ./test_record_minmax.sh <path/to/test.config> <path/to/work_dir> <TEST 1> <TEST 2> ...
# test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE2CIRCLE_PATH}
# work_dir : build directory of quantization-value-test (ex: build/compiler/q... |
export default function(html) {
var script = '\nif (html) html.innerHTML = `' + html.replace(/`/g, '\\`').replace(/\${/g, '\\${') + '`;\n\n';
script += `
const scripts = [...html.getElementsByTagName('script')];
var hasUnknownType = false;
for (var idx in scripts) {
const script = scripts[idx]... |
<filename>20_debugging/01_debugging.py<gh_stars>0
#!/usr/bin/python3
'''
Atencao
A maioria dos codigos desse arquivo estao comentados pois os mesmos geram
exececoes para executados utilizado o atalho no Code de Ctrl+Alt+N
'''
'''
Podemos gerar nossas próprias execocoes pno codigo
Gerar uma excecao e uma maneira de di... |
import { getRepository } from 'typeorm';
import AppError from '@shared/errors/AppError';
import Group from '@modules/groups/infra/typeorm/models/Group';
import ICreateGroupRepository from '../repositories/groups'
import {inject,injectable} from 'tsyringe';
interface Request {
type: string;
description: string;
c... |
console.log('app launched') |
<gh_stars>1-10
#pragma once
#include "AutoGC.h"
#define accuracy double
#define arrtype accuracy *
#define create_arrayp(size, ...) new accuracy[size]{__VA_ARGS__}
#define Matrixp Matrix *
#define create_matrixp(...) new Matrix( __VA_ARGS__ )
#define Vectorp Vector *
#define create_verctorp(...) new Vector( __VA_ARGS_... |
/* CS261- Assignment 1 - Q. 0*/
/* Name: <NAME>
* Date: 07/01/2018
* Solution description:
*
* 1. In the main() function, declare an integer, x. Then assign it to a random integer value in
* the interval [0, 10]. Then print the value and address (using the address of operator) of x.
*
* 2. In fooA(int * iptr) ... |
<filename>test/misc/parse_datetime_test.rb<gh_stars>100-1000
require 'test_helper'
require 'active_scaffold_config_mock'
class DateTimeModel < ActiveRecord::Base
include ActiveScaffold::ActiveRecordPermissions::ModelUserAccess::Model
def self.columns
@columns ||= [ColumnMock.new('id', '', 'int(11)'), ColumnMoc... |
import React, { useState } from 'react';
import {
Grid,
InputAdornment,
Dialog,
Button,
TextField
} from '@material-ui/core';
import MailOutlineTwoToneIcon from '@material-ui/icons/MailOutlineTwoTone';
import people2 from '../../../assets/images/stock-photos/people-1.jpg';
import people1 from '../../../ass... |
<reponame>eSCT/oppfin
package com.searchbox.engine.es;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.elasticsearch.action.search.MultiSearchResponse;
import org.elasticsearch.action.search.SearchRequestBuilder;
import com.searchbox.core.dm.Collection;
import com.s... |
SELECT *
FROM customers
ORDER BY date_of_birth DESC
LIMIT 1; |
// wrapping_sub.rs
pub fn wrapping_sub(a: i32, b: i32) -> i32 {
a.wrapping_sub(b)
} |
<reponame>weltam/idylfin
/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.credit.schedulegeneration;
import java.util.NavigableSet;
import java.util.Set;
import java.util.TreeSet;
import... |
// import IDistantVOBase from '../../IDistantVOBase';
// export default interface ICheckPointDep extends IDistantVOBase {
// checkpoint_id: number;
// dependson_id: number;
// } |
#!/bin/bash
set -e
function retry() {
for i in {1..10}; do
sleep 1
if "$@"; then
return 0
fi
echo "retry"
done
return $?
}
export VAULT_ADDR=http://172.30.0.13:8200
export VAULT_TOKEN=cybozu
# wait for preparation of vault
retry curl ${VAULT_ADDR}/v1/sys/health
res=$(curl ${VAULT_ADDR}/v... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.fhwa.c2cri.ntcip2306v109.operations;
import org.fhwa.c2cri.ntcip2306v109.messaging.NTCIP2306Message;
/**
* The listener interface for receiving operation events.
* The class that is interested in proces... |
class Genre < ApplicationRecord
has_many :movies, dependent: :destroy
validates :name, presence: true, uniqueness: true
before_validation :titlecase
private
def titlecase
self.name = self.name.titleize
end
end
|
<filename>apps/invoiceservice-go/main.go
//go:generate go run $GOPATH/src/github.com/TIBCOSoftware/flogo-lib/flogo/gen/gen.go $GOPATH
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strconv"
"github.com/TIBCOSoftware/flogo-contrib/activity/log"
"github.com/TIBCOSoftware/flogo-contrib/a... |
import subprocess
# Command to create VXLAN interface
create_vxlan_cmd = "sudo ip link add vxlan0 type vxlan id 42 dstport 4789 dev eth0"
# Command to maintain bridge FDB
bridge_fdb_cmd = "sudo bridge fdb append 00:00:00:00:00:00 dev vxlan0 dst 192.168.8.101"
# Execute commands using subprocess
try:
subprocess.r... |
#!/bin/bash
mkdir -p raw_tlc_data
createdb nyc-ecommerce-analysis
psql nyc-ecommerce-analysis -c "CREATE EXTENSION IF NOT EXISTS postgis;"
shp2pgsql -s 102718:4326 -I shapefiles/taxi_zones/taxi_zones.shp | psql -d nyc-ecommerce-analysis
shp2pgsql -s 102718:4326 -I shapefiles/nyct2010_20d/nyct2010.prj | psql -d nyc-e... |
MININIX_PKG_HOMEPAGE=https://sourceware.org/libffi/
MININIX_PKG_DESCRIPTION="Library providing a portable, high level programming interface to various calling conventions"
MININIX_PKG_VERSION=3.2.1
MININIX_PKG_REVISION=2
MININIX_PKG_SRCURL=ftp://sourceware.org/pub/libffi/libffi-${MININIX_PKG_VERSION}.tar.gz
MININIX_PKG... |
var elixir = require('laravel-elixir');
var paths={
'chartsjs':'./node_modules/chart.js/Chart.js'
}
elixir(function(mix) {
mix.sass('app.scss')
.scripts(['components/*.js','app.js'],'public/js/all.js')
.scripts([paths.chartsjs],'public/js/charts.js');
});
|
// --------------------------------------------------------- //
// HOME-NODE - Sorts the coherent transactions //
// --------------------------------------------------------- //
#ifndef _ACE_HOME_H_
#define _ACE_HOME_H_
#include "systemc.h"
#include "nvhls_connections.h"
#include "../include/ace.h"
#in... |
<gh_stars>100-1000
// ==UserScript==
// @name Amazon-RefreshNoBot
// @include https://www.amazon.com/*
// @include http://localhost:800*
// @version v2.0
// @description This aint bot, its RefreshNoBot
// @author <NAME>
// @grant window.close
// @grant GM_setValue
// @grant GM_get... |
<gh_stars>0
package org.rs2server.rs2.model.npc.pc;
import org.rs2server.rs2.model.player.Player;
import org.rs2server.rs2.model.player.pc.PestControlInstance;
import org.rs2server.rs2.tickable.StoppingTick;
/**
* A tick that enables a {@link PestControlPortal} to be attacked.
* Each player in the {@link PestContro... |
#!/bin/bash
for filename in ./data/simulated/n-*; do
[ -e "$filename" ] || continue
DATASET=$(basename ${filename})
echo "dataset: ${DATASET}"
echo ""
docker run \
-v "$(pwd)/data":/data \
-v "$(pwd)/python/random_cluster":/usr/app/random_cluster \
clustering/random_cluster \
--data /data \... |
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xwalk/runtime/renderer/xwalk_content_renderer_client.h"
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#inclu... |
<reponame>andibateeq/mm-module
var should = require('should');
var helper = require('../helper');
var validate = require('mm-models').validator.core;
var generateCode = require('../../src/utils/code-generator');
var manager;
function getData() {
var Account = require('mm-models').core.Account;
var account = ne... |
<gh_stars>1-10
#pragma once
#include <SplayLibrary/Core/types.hpp>
#include <SplayLibrary/Core/Framebuffer.hpp>
namespace spl
{
class DefaultFramebuffer : public Framebuffer
{
public:
DefaultFramebuffer() = delete;
DefaultFramebuffer(const DefaultFramebuffer& framebuffer) = delete;
DefaultF... |
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ActivityGroup, type: :model do
describe 'validations' do
subject { described_class.new }
it { is_expected.to validate_presence_of(:project) }
it { is_expected.to validate_presence_of(:duration) }
it { is_expected.to validate_presen... |
export { default } from 'ember-medium-editor/components/me-toolbar';
|
<filename>docs/html/search/enumvalues_11.js<gh_stars>1-10
var searchData=
[
['unknown',['unknown',['../class_smol_dock_1_1_amino_acid.html#a08692b12e7f53812c5258bd8b805875daad921d60486366258809553a3db49a4a',1,'SmolDock::AminoAcid::unknown()'],['../class_smol_dock_1_1_atom.html#a57e9a532fd04e1846c0d83edebb9fd41aad921d... |
<gh_stars>1-10
/*
*
*/
package net.community.apps.common;
import java.awt.Component;
import org.w3c.dom.Element;
import net.community.chest.ui.helpers.XmlDocumentComponentInitializer;
/**
* <P>Copyright 2009 as per GPLv2</P>
*
* @author <NAME>.
* @since Aug 5, 2009 11:12:02 AM
*/
public interface BaseMainCom... |
class ProbabilityProcessor:
def __init__(self, application_type, parameters):
self.param = {'application': application_type, 'params': parameters}
def process_probabilities(self, raw_probabilities):
if self.param['application'] == 'binary':
probability_of_one = raw_probabilities
... |
use std::collections::BTreeMap;
struct Specification {
type_: fn() -> Type,
config: fn() -> Config,
}
struct Type {
to_string: fn() -> String,
}
struct Config {
env: fn() -> Option<BTreeMap<String, String>>,
}
fn process_environment(spec: Specification) -> BTreeMap<String, String> {
let type_str... |
#!/bin/bash
set -o errexit -o pipefail
if [[ ${target_platform} =~ linux.* ]] || [[ ${target_platform} == win-32 ]] || [[ ${target_platform} == win-64 ]] || [[ ${target_platform} == osx-64 ]]; then
export DISABLE_AUTOBREW=1
${R} CMD INSTALL --build .
else
mkdir -p "${PREFIX}"/lib/R/library/DOT
mv ./* "${PREFIX}... |
# Copyright 2021 ISP RAS
#
# 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 writing, sof... |
/*!
* Module dependencies.
*/
var util = require('util'),
utils = require('keystone-utils'),
super_ = require('../field');
/**
* TextArray FieldType Constructor
* @extends Field
* @api public
*/
function textarray(list, path, options) {
this._nativeType = [String];
this._underscoreMethods = ['crop'];
tex... |
<filename>packages/hyphenated/src/parseText.js
const whiteSpaceRegex = /\s|\u0085/u;
const separatorRegex = /(?!['@_])[\s\p{P}]/u;
const getSpacesAndFragments = text => {
const fragments = [];
let fragment = '';
let space = '';
const addFragment = () => {
if (fragment.length > 0) {
fragments.push(fra... |
import { Injectable, EventEmitter } from '@angular/core';
@Injectable()
export class NavbarService {
static changeEvent = new EventEmitter();
static setSearch(data: any) {
console.log('setSearch');
this.changeEvent.emit({search: data});
}
}
|
<gh_stars>1-10
import { Container } from 'inversify';
import TYPES from './types';
import IConfig from './config/interface';
import NconfImpl from './config/nconf/impl';
import ILogger from './logger/i-logger';
import ConsoleLogger from './logger/console-logger';
import IAssignmentService from './service/assignment/int... |
require 'pronto'
require_relative 'clang_tidy/diagnostic'
require_relative 'clang_tidy/offence'
require_relative 'clang_tidy/parser'
Diagnostic = ::Pronto::ClangTidy::Diagnostic
Offence = ::Pronto::ClangTidy::Offence
Parser = ::Pronto::ClangTidy::Parser
module Pronto
class ClangTidyRunner < Runner
def run
... |
package slice
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestAddRemove1(t *testing.T) {
s := []string{}
s = AddUnique(s, "hello")
require.Equal(t, []string{"hello"}, s)
s = AddUnique(s, "hello")
require.Equal(t, []string{"hello"}, s)
s = AddUnique(s, "there")
require.Equal(t, []stri... |
import {prisma} from "../../../../database/prismaClient"
interface IUpdateEndDate {
id_delivery: string
id_deliveryman: string
}
export class UpdateEndDateUseCase {
async execute({id_delivery, id_deliveryman}: IUpdateEndDate){
const result = await prisma.deliveries.updateMany({
where: {
id: i... |
<filename>bin/superhero/fs/index.js
const fs = require('fs')
class Fs
{
/**
* @param {string} wd Working directory
* @param {string} cli Command line interface
*/
constructor(wd, cli)
{
this.wd = wd
this.cli = cli
}
mkdir(dir)
{
this.cli.write(' Creating path: ' + dir, 'green')
... |
import { TIME_SUB, TIME_U_DAY, TIME_U_HOUR, TIME_U_MICRO, TIME_U_MIN, TIME_U_MS, TIME_U_SEC } from '../unit'
import Base from './Base'
export default class Time extends Base {
#idx = {}
constructor () {
super(TIME_SUB)
this.#idx = {
micro: super.index(TIME_U_MICRO),
ms: super.index(TIME_U_MS)... |
"use strict";
var crypto = require('crypto');
var wsse = require('wsse');
var validPasswordTypes = ['PasswordDigest', 'PasswordText'];
function WSSecurity(username, password, options) {
options = options || {};
this._username = username;
this._password = password;
this._token = wsse({
username: username,... |
<filename>Utilities/VisItBridge/avt/Pipeline/Sources/avtOriginatingSource.h
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* All rights res... |
<gh_stars>10-100
import numpy as np
def getTransFromRp(R,p):
T = np.vstack((np.hstack((R, np.array([[p[0]],[p[1]],[p[2]]]))), np.array([0,0,0,1])))
return T
def getRotationRoll(theta):
R = np.array([[1,0,0], [0,np.cos(theta),-np.sin(theta)],[0,np.sin(theta),np.cos(theta)]])
return R
def getRotationP... |
#!/bin/bash
pass=$1
log_setup=$HOME/ubuntu-setup.log
projects=$HOME/projects
cd
chmod +x install-apps-snap.sh
./install-apps-snap.sh $pass
#backup do log no syslog do linux
logger -p user.info -t "setup-apps" -f $log_setup
|
/* GENERATED FILE */
import { html, svg, define } from "hybrids";
const PhLaptop = {
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
render: ({ color, size, weight, mirrored }) => html`
<svg
xmlns="http://www.w3.org/2000/svg"
width="${size}"
height="${size}"
... |
def pred(email):
emails = email.split('\n')
x_list = []
y_list = []
for email in emails:
features = extract_features(email)
x_list.append(features)
if is_spam(email):
y_list.append(1)
else:
y_list.append(0)
x = np.array(x_list)
y... |
<filename>speed-typer/source_ui/result_window.py
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resultWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you kno... |
<filename>.eslintrc.js
module.exports = {
env: { browser: true, es6: true, node: true },
extends: [
'eslint:recommended',
'plugin:nuxt/recommended',
'plugin:vue/recommended'
],
}
|
#!/bin/bash
source ../../setup/setenv.sh
echo "Enter your password for the Apigee Enterprise organization $org, followed by [ENTER]:"
read -s password
curl -X POST -H "Content-type:text/xml" -d @paginationCache.xml https://api.enterprise.apigee.com/v1/o/$org/environments/$env/caches -u $username:$password
echo Dep... |
<reponame>erraa/aciexporter
package aci
import "encoding/json"
type FaultInst struct {
ImData []IMDATA `json:"imdata"`
TotalCount string `json:"totalCount"`
}
func (faultinst *FaultInst) UnmarshalJson(data []byte) error {
err := json.Unmarshal(data, &faultinst)
if err != nil {
return err
}
return nil
}... |
<gh_stars>1-10
import os
import signal
import argparse
import sys
import subprocess
import shlex
import Queue as Queue
from threading import Thread
from time import sleep
import logging
logging.basicConfig()
logger = logging.getLogger(__name__)
STOP=False
SUBPROCESS_FAILED_EXIT=1
def run_subprocess(
command, tool... |
#!/bin/sh
# Jason Filice
# jfilice@csumb.edu
# Technology Support Services in IT
# California State University, Monterey Bay
# https://csumb.edu/it
# This script downloads and installs the current "Download for IT Admin" Zoom Client for Meetings from zoom.us.
# Run it with no arguments.
#
# For best results, copy... |
const express = require("express");
const router = express.Router();
// API Routing
const users = require('./api/users');
const posts = require('./api/posts');
router.get('/', (req, res) => {
res.json({
msg: 'In routes.js!!'
});
});
router.use('/users', users);
router.use('/posts', posts);
module.exports = ... |
export function incToNanoAmount(amount, decimals) {
return Number(amount) * (10 ** (Number.parseInt(decimals) || 0));
}
export function incToUIAmount(amount, decimals) {
return Number.parseFloat(amount) / (10 ** (Number.parseInt(decimals) || 0));
}
|
#!/bin/bash
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-ST/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-ST/1024+0+512-N-VB-ADJ-first-256 --do_eval --per_devic... |
const bcrypt = require("bcrypt");
const jwt = require("jsonwebtoken");
const User = require("../model/user");
module.exports.adminLogin = async (req, res) => {
const { username, password } = req.body;
if (!username || !password) {
return res
.status(400)
.json({ success: false, message: "Missing U... |
from abc import ABC, abstractmethod
# Base Test class with abstract doTest method
class Test(ABC):
@abstractmethod
def doTest(self):
pass
# Subclass for testing the Shape module
class TestShape(Test):
def doTest(self):
# Implement tests for the Shape module
pass
# Subclass for tes... |
<filename>cours/ensg-asi-2015/src/gulpfile.js
var gulp = require('gulp'),
connect = require('gulp-connect'),
watch = require('gulp-watch'),
less = require('gulp-less'),
minifyCSS = require('gulp-minify-css'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
clean = require('gulp-clean'),
... |
<reponame>fmitra/authenticator-client<gh_stars>0
import { h } from 'preact';
import { Header } from '@authenticator/ui/components';
const ContactHeader = (): JSX.Element => (
<Header
title={
<span class='title'>Add Address</span>
}
subtitle={
<span class='subtitle'>Add your new phone number o... |
#!/usr/bin/env python3
# This program is a basic calculator that can take in two values and an operator
# The corresponding operations when the operator input is given
operations = {
"+": lambda x, y: x + y,
"-": lambda x, y: x - y,
"*": lambda x, y: x * y,
"/": lambda x, y: x / y
}
# Take in the v... |
import fs from 'fs-extra';
import Logger from '../utils/logger.utils';
class Clear {
static async clearFolder(name: string): Promise<void> {
return new Promise((resolve, reject) => {
Logger.showClear(`./${name}`);
fs.emptyDir(`./${name}`)
.then(() => {
Logger.showSuccess(`./${name... |
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/lib/init.sh"
os::log::stacktrace::install
trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete tem... |
/*
* Generated by @medplum/generator
* Do not edit manually.
*/
import { CodeableConcept } from './CodeableConcept';
import { Extension } from './Extension';
import { Identifier } from './Identifier';
import { Meta } from './Meta';
import { Money } from './Money';
import { Narrative } from './Narrative';
import { P... |
import PdfList from './index'
import renderer from 'react-test-renderer'
describe('PdfList', () => {
test('renders correctly', () => {
const tree = renderer.create(<PdfList />).toJSON()
expect(tree).toEqual(expect.any(Object))
expect(tree).toMatchSnapshot()
})
})
|
#!/usr/bin/env python3
from mirobot import Mirobot
with Mirobot() as m:
m.home_simultaneous()
|
/*
* Copyright 2017-present Open Networking Foundation
*
* 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 applicabl... |
#!/bin/bash
# Require env
# GITHUB_TOKEN
# GITHUB_EVENT_PATH=/tmp/abc.json
# GITHUB_REPOSITORY=ibuler/koko
generate_create_pr_data()
{
cat <<EOF
{
"title": "${PR_TITLE}",
"body": "${PR_BODY}",
"head": "${PR_HEAD}",
"base": "${PR_BASE}"
}
EOF
}
# 当push了 PR Request分支(分支名称 pr@${TO_BRANCH}@other)
on_push_pr_bra... |
<?hh
namespace Waffle\Tests\Container\ServiceProvider;
use type Facebook\HackTest\HackTest;
use type Waffle\Container\Container;
use type Waffle\Container\Exception\ContainerException;
use type Waffle\Tests\Container\Asset\FakeServiceProvider;
use type Waffle\Container\ServiceProvider\ServiceProviderAggregate;
use fu... |
#!/usr/bin/env bash
if [ -z "$1" ]; then
exit 1;
fi
failed_cmd="$1"
# Environment variables should be loaded under all conditions.
if [ -z "${TWLIGHT_HOME}" ]
then
exit 1
fi
# Report failed command via email.
echo "$failed_cmd failed. Please check the logs." | mail -a "From: Wikipedia Library Card Platform ... |
import React from 'react';
import styles from './styles.css';
import Breadcrumb from './breadcrumb';
import MyPrototype from './myPrototype';
import Examples from './examples';
const Dashboard = ({
createNewPrototype,
uploadPrototypeImage,
pushToast,
dashboard,
clonePrototype,
retrieveDashboard,
retriev... |
from typing import List
def temperature_analysis(temperatures: List[int], threshold: int) -> str:
count_exceeding_threshold = sum(1 for temp in temperatures if temp > threshold)
if count_exceeding_threshold > 100:
return 'Steam'
elif 50 <= count_exceeding_threshold <= 100:
return 'High'
... |
for key in list(item.keys()):
bcalias = source['alias']
lc = 0
if key in ['name', 'sources', 'schema', 'photometry']:
# Perform operations based on the keys |
#!/bin/bash
set -euo pipefail
# Bazel uses `-debug-prefix-map` to strip the bazel build directory from the
# paths embedded in debug info. This means the debug info contains _project
# relative_ paths instead of Bazel absolute paths.
#
# However, Xcode sets breakpoints via _project absolute_ paths, which are not
# t... |
<filename>App/src/main/java/com/honyum/elevatorMan/receiver/JPushMsgReceiver.java
package com.honyum.elevatorMan.receiver;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.... |
/*
* CPAchecker is a tool for configurable software verification.
* This file is part of CPAchecker.
*
* Copyright (C) 2007-2018 <NAME>
* 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... |
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {UtilityService} from '../utility/utility.service';
@Injectable()
export class ServerService {
serverURL = this.util.getServerUrl().local;
constructor(private http: Ht... |
<reponame>tdm1223/Algorithm
// 9488. The n Days of Christmas
// 2021.09.05
// 수학
#include<iostream>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
unsigned long long n;
while (1)
{
cin >> n;
if (n == 0)
{
... |
import requests
from bs4 import BeautifulSoup
def retrieve_data(url):
webpage_text = requests.get(url).text
webpage_soup = BeautifulSoup(webpage_text, 'html.parser')
data = webpage_soup.find_all('div', {'class': 'data'})
return data |
source $stdenv/setup
set -o pipefail
objects=($objects)
symlinks=($symlinks)
suffices=($suffices)
mkdir root
# Needed for splash_helper, which gets run before init.
mkdir root/dev
mkdir root/sys
mkdir root/proc
for ((n = 0; n < ${#objects[*]}; n++)); do
object=${objects[$n]}
symlink=${symlinks[$n]}
su... |
// Copyright (c) 2022 <NAME>. All Rights Reserved.
// https://github.com/cinar/indicatorts
import { deepStrictEqual } from 'assert';
import { mmax } from './mmax';
describe('Moving Max', () => {
it('should be able to compute max', () => {
const values = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
const expected = [10,... |
<reponame>littlemole/MTL<filename>examples/helloworld/helloworld/id.cpp
#include "framework.h"
static void load_resource_ids()
{
mtl::gui().add({
{ 2, "IDC_MYICON" },
{ 101, "IDD_HELLOWORLD_DIALOG" },
{ 102, "IDS_APP_TITLE" },
{ 103, "IDD_ABOUTBOX" },
{ 104, "IDM_AB... |
<reponame>sarvgraphic/client
myApp.controllerProvider.register('headerController', function($document, $scope, userService,$stateParams,$location){
$scope.isRequired = function( val ) {
return !validate.isEmpty(val);
};
$scope.emailExist = function(val){
return new Promise(function(resol... |
require_relative '../spec_helper'
RSpec.describe FastXML do
def conv_to_io(hash)
fh = StringIO.new
FastXML.hash2xml(hash, output: fh)
fh.string
end
it 'has a version number' do
expect(FastXML::VERSION).not_to be nil
end
describe '#configure' do
%i[output method root version encoding utf... |
package model;
import java.util.Objects;
import org.apache.commons.validator.routines.EmailValidator;
public class Companion {
public static int TAM_MAX_CPF = 14;
public static int TAM_MAX_RG = 15;
public static int TAM_MAX_NAME = 50;
public static int TAM_MAX_SEX = 10;
public static int TAM_MAX_... |
<gh_stars>0
#ifndef _MR_GL_FRAMEBUFFER_H_
#define _MR_GL_FRAMEBUFFER_H_
#include <vector>
#include <mobrend/framebuffer.h>
#include <mobrend/opengl/texture.h>
namespace mr
{
class GlFramebuffer : public Framebuffer
{
public:
struct GlAttachment
{
union
{
unsigned int renderObj... |
#!/bin/bash
SERVICE=chapolin
# RABBITMQ
echo "export RABBIT_URL=\"amqp://$RABBITMQ_DEFAULT_USER:$RABBITMQ_DEFAULT_PASS@rabbitmq:$RABBITMQ_PORT\"" > /etc/profile.d/rabbit.sh
echo "export RABBIT_MANAGEMENT_LOGIN=$RABBITMQ_DEFAULT_USER" >> /etc/profile.d/rabbit.sh
echo "export RABBIT_MANAGEMENT_PASSWORD=$RABBITMQ_DEFAU... |
module load cmake/3
module load aocc/3.2
module load python/3.9
. venv/bin/activate
export CC=clang
export CXX=clang++
# only required for 'python setup.py develop'
# because `pip install -e .` doesn't seem to use these vars...?
export LDSHARED="$CC -L$(python3-config --prefix)/lib -shared"
export LDCXXSHARED="$CXX ... |
SELECT (@rownum:=@rownum+1) AS row_number, t.*
FROM table_name t, (SELECT @rownum:=0) r |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.