text stringlengths 1 1.05M |
|---|
function where(){ COUNT=0; while [ `where_arg $1~$COUNT | wc -w` == 0 ]; do let COUNT=COUNT+1; done; echo "$1 is ahead of "; where_arg $1~$COUNT; echo "by $COUNT commits";};function where_arg(){ git log $@ --decorate -1 | head -n1 | cut -d ' ' -f3- ;}
|
#!/bin/bash
if [[ $1 == "tilux" ]]; then
source ./tools/catch
python3 -c "from tools.logos import Logo; Logo('Openssl Decryption');"
fi
sleep 1
read -p "What file do you want to decrypt? " f
if [[ $1 == "tilux" ]]; then catch_empty $f; fi
read -p "What is the filename you wish to have after decryption? " fl
if [[... |
<reponame>tlemane/bcli<gh_stars>0
#include <bcli/bcli.hpp>
using namespace bc;
int main(int argc, char* argv[])
{
Parser<0> cli("ex04",
"ex04 desc",
"v0.0.1",
"<NAME>");
param_t p = cli.add_param("-p/--param", "param help");
// ok: 04_bcli_deps_bans -p 110 -d... |
package com.aveng.wapp.service.mapper;
import org.mapstruct.Mapper;
import com.aveng.wapp.domain.DiffEntity;
import com.aveng.wapp.service.dto.Diff;
/**
* @author apaydin
*/
@Mapper(componentModel = "spring")
public interface DiffMapper {
DiffEntity map(Diff diff);
Diff map(DiffEntity diffEntity);
}
|
#!/bin/bash
sleep 6s
./doyo-routersvr --id=1 --topic=DoyoRouterSvr --conf=../conf/conf.json --logpath=../log --consulhealthcheckaddr=192.168.68.228:7002
|
import React, {useState, useEffect } from 'react';
import { StyleSheet, Text, View } from 'react-native';
const App = () => {
const [location, setLocation] = useState(null);
useEffect(() => {
const getLocation = async () =>{
let { status } = await Location.requestPermissionsAsync();
if (status !==... |
#!/bin/bash
# $1: phrase to find
# $2: phrase to replace $1
sed -i 's/\<'$1'\>/'$2'/' $(grep -lwr --include="*.asm" --exclude-dir="crowdmap" --exclude-dir="utils" --exclude-dir=".git" --exclude-dir="animatedgifs" --exclude-dir="patch" $1)
|
import { Morphable } from './morphable'
export class MorphableTransform
implements Morphable<MorphableTransform.Array, MorphableTransform.Array>
{
scaleX: number
scaleY: number
shear: number
rotate: number
translateX: number
translateY: number
originX: number
originY: number
fromArray(arr: Morphab... |
#Function to output message to StdErr
function echo_stderr()
{
echo "$@" >&2
}
#Function to display usage message
function usage()
{
echo_stderr "./aadIntegration.sh <wlsUserName> <wlsPassword> <wlsDomainName> <wlsLDAPProviderName> <addsServerHost> <aadsPortNumber> <wlsLDAPPrincipal> <wlsLDAPPrincipalPassword> <... |
def extract(array, value):
for item in array:
if item[-1] == value:
return item
return None
array = [['a', 1], ['b', 2], ['c', 3], ['d', 4], ['e', 5]]
value = 3
extract(array, value) => ['c', 3] |
#include <iostream>
#include <string>
using namespace std;
int main()
{
string dna_seq = "ATTACG";
int pos = 0;
string found = "";
while (pos < dna_seq.length())
{
int found_at = -1;
for (int i = 0; i < dna_seq.length(); i++)
{
if (dna_seq[i] == dna_seq[pos])... |
import clean
|
<reponame>Slaying-Gitcoin/graphology<gh_stars>0
/**
* Graphology DAG Unit Tests
* ==========================
*/
const {DirectedGraph} = require('graphology');
const path = require('graphology-generators/classic/path');
const assert = require('assert');
const hasCycle = require('./has-cycle.js');
const willCreateCycl... |
#!/usr/bin/env bash
#=============================================================
# https://github.com/cornjosh/Aminer
# A script that help you install miner software XMRIG on Android device
# Version: 1.0
# Author: cornjosh
# Blog: https://linkyou.top
#=============================================================
US... |
import random
import time
HOSTNAME = ['defence-first.rs', 'defence-first.de', 'defence-first.ru']
HOSTIP = ['172.16.17.32', '192.168.127.12', '172.16.58.3']
SOURCEIP = ['192.168.3.11', '192.168.127.12', '172.16.58.3', '172.16.58.3', '172.16.17.32']
USERNAMES = ['user1', 'user2', 'user3', 'user4', 'user5']
FACILITY = [... |
// backend/graphqlexp-app/src/usecase/profile/mod.rs
pub(crate) mod registration {
pub struct UserProfile {
pub username: String,
pub email: String,
pub password: String,
}
impl UserProfile {
pub fn new(username: String, email: String, password: String) -> Self {
... |
import numpy as np
import heapq
class PrioritizedReplayBuffer:
def __init__(self, max_size, alpha, beta_initial, epsilon):
self.max_size = max_size
self.alpha = alpha
self.beta = beta_initial
self.epsilon = epsilon
self.buffer = []
self.priorities = np.zeros(max_size... |
// Modifications copyright 2020 Caf.js Labs and contributors
/*!
Copyright 2013 Hewlett-Packard Development Company, L.P.
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/... |
<filename>src/app.js
import React from 'react';
import ReactDOM from 'react-dom';
import AppRouter from './routers/AppRouter';
import configureStore from './store/configureStore';
import { Provider } from 'react-redux';
import { setLibraryFilter, setFloorFilter, setTextFilter } from './actions/filters';
import fetchR... |
'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
if (typeof document !== 'undefined') {
if (document.contains) {
return document.contains;
}
if (document.body && document.body.contains) {
try {
if (typeof document.body.contains.call(document, '... |
<reponame>mambocab/homebrew-versions<gh_stars>0
class OpenofficeFr < Cask
version '4.0.1'
sha256 'e8d61fe93acf484c564ddc44638f314cdaa2c6e99d6a055386df9d9e3d0e6e6d'
url 'http://downloads.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/fr/Apache_OpenOffice_4.0.1_MacOS_x86_install_fr.dmg'
homepage 'ht... |
#! /bin/bash
## KALLISTO PROCESSING SCRIPT
## David R. Hill
## -----------------------------------------------------------------------------
## Setup variables
## start time
DT1=$(date '+%d/%m/%Y %H:%M:%S')
## location of genome index file on Spence lab server
INDEX=/data/genomes/Homo_sapiens.GRCh38.rel79.cdna.all.idx
... |
<gh_stars>1-10
package wire
import (
"fnd/crypto"
"io"
)
type PeerReq struct {
HashCacher
}
var _ Message = (*PeerReq)(nil)
func (p *PeerReq) MsgType() MessageType {
return MessageTypePeerReq
}
func (p *PeerReq) Equals(other Message) bool {
_, ok := other.(*PeerReq)
return ok
}
func (p *PeerReq) Encode(w io... |
using System;
using System.Net;
namespace DownloadText
{
class Program
{
static void Main(string[] args)
{
try
{
using (WebClient client = new WebClient())
{
string text = client.DownloadString("https://example.com/text.txt");
Console.WriteLine(text);
}
}
catch (Exception e)
... |
<filename>test.py
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: test.py
Description :
Author : JHao
date: 2017/3/7
-------------------------------------------------
Change Activity:
2017/3/7:
---------------------------... |
<gh_stars>0
#ifndef LIBSPEC_H
#define LIBSPEC_H
#if defined(_WIN32)
#ifndef APIENTRY
#if defined(__MINGW32__) || defined(__CYGWIN__)
#define APIENTRY __stdcall
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
#define APIENTRY __stdcall
... |
<gh_stars>0
import pytest
from bst import BST as bst
from fizz_buzz_tree import fizz_buzz_tree
def test_returns_correct(full_bst):
assert fizz_buzz_tree(full_bst) == ['fizz', 'buzz', 8, 'fizzbuzz', 'fizzbuzz', 'fizz', 1, 'fizz']
|
import React from 'react';
import {
Switch,
Route,
useRouteMatch
} from "react-router-dom";
import Page from '../../../components/Page';
import RightTitle from '../../../components/RightTitle';
import List from '../../../components/Board/List';
import CreatePage from './CreatePage';
import EditPage from './Edit... |
mkdir -p dist
if [[ `uname -s` == "Darwin" ]]; then
echo "system is macos"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-w' -o dist/delay-queue-linux-64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-w' -o dist/delay-queue-win-64
go build -ldflags '-w' -o dist/delay-queue-macos-... |
import random
class DiceGame:
def __init__(self):
self.total_score = 0
self.dice_rolled = False
def roll_dice(self):
if not self.dice_rolled:
self.dice_rolled = True
return random.randint(1, 6)
else:
return None
def play_game(self):
... |
<filename>51.test/src/Tab.js
class Tab {
constructor(options) {
let { id, button, panel } = options;
let tab = this.tab = document.getElementById(id);
let buttons = this.buttons = Array.from(tab.querySelectorAll('.' + button));
let panels = this.panels = Array.from(tab.querySelectorA... |
#!/bin/sh
export JENKINS_HOME=/var/lib/jenkins
export CONFIG_PATH=${JENKINS_HOME}/config.xml
export OPENSHIFT_API_URL=https://openshift.default.svc.cluster.local
export KUBE_SA_DIR=/run/secrets/kubernetes.io/serviceaccount
export KUBE_CA=${KUBE_SA_DIR}/ca.crt
export AUTH_TOKEN=${KUBE_SA_DIR}/token
export JENKINS_PASSW... |
#!/usr/bin/env bash
set -e
NEW_VERSION=$(git describe --tags --abbrev=0 | awk -F. '{OFS="."; $NF+=1; print $0}')
echo Creating $NEW_VERSION...
git tag -m "release ${NEW_VERSION}" -a "$NEW_VERSION"
echo
read -p "Do you want to release the new version? [y/N] " -n 1 -r
echo # (optional) move to a new line
if [[ ! ... |
clear() {
$(which clear) || tput clear
}
cl() {
clear
ls
}
|
class Tree:
def __init__(self, values):
self.values = values
def find_sum_idx(self, idx):
if idx < 0 or idx >= len(self.values):
return -1 # Index out of bounds
current_sum = 0
for i in range(idx + 1):
current_sum += self.values[i]
if curren... |
# Documentation:
# https://docs.docker.com/engine/reference/commandline/build/
docker build -t gns3server:test .
|
import { styled, media } from '../../../styles';
export const Container = styled.header`
display: flex;
`;
export const Logo = styled.img`
display: none;
${media.medium`
display: block;
max-height: 5rem;
width: auto;
height: auto;
`}
`;
export const UserSession = styled.div`
flex-grow: 1;
... |
// main texts
export const TITLE_TXT = 'Diagnosis Mapper'
export const TITLE_TXT_DIAG = 'ISIC-designated-diagnosis'
export const TITLE_TXT_FULL = 'ISIC-Designated Diagnosis Mapper'
export const TITLE_TXT_MINI = 'IDDx'
export const TITLE_TXT_SUBTITLE = 'Consensus Survey'
// hot-keys
export const HK_MARK_BLOCK_AS_CORREC... |
import re
class BaseQueries:
# Base class for queries
class TrecQueries(BaseQueries):
def __init__(self, trec_queries):
self.trec_queries = trec_queries
def process_query(self, query):
result = {'description': None, 'narrative': None}
for pattern, key in self.trec_queries.items():... |
CREATE TABLE customers (
id INTEGER,
name VARCHAR(50),
age INTEGER
); |
//
// Common212HeaderView.h
// pairearch_WLY
//
// Created by Leo on 2017/3/10.
// Copyright © 2017年 Leo. All rights reserved.
//
#import <UIKit/UIKit.h>
@class DetailCommonModel;
@interface Common212HeaderView : UITableViewHeaderFooterView
@property (weak, nonatomic) IBOutlet UILabel *getTimeLabel;
@property (w... |
#include "gomoku/core/board.h"
namespace gomoku {
constexpr PlayerMap<int> kPlayerOffset{0, 1};
bool Board::Inside(Eigen::Vector2i position) {
return position.x() >= 0 && position.x() < kWidth &&
position.y() >= 0 && position.y() < kHeight;
}
Player Board::StoneAt(Eigen::Vector2i position) const {
DCHE... |
#! /usr/bin/env bash
##
# Copyright (c) 2019-2020 Ryan Parman <https://ryanparman.com>
# License: MIT <https://opensource.org/licenses/MIT>
#
# Assumes GNU tools instead of BSD tools: <https://flwd.dk/31ELAKJ>
# Also: brew install mp4v2
#
# Written to be easy to adapt into a macOS Automator action.
#
# find /path/to/s... |
#!/usr/bin/env bash
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
SELECT birthday,
YEAR(NOW()) - YEAR(birthday) AS age
FROM users
WHERE registration_date BETWEEN DATE_SUB(NOW(), INTERVAL 1 MONTH) AND NOW(); |
<gh_stars>0
require('ts-node').register({
project: './e2e/tsconfig.e2e.json'
});
|
const requestLogger = (req, res, next) => {
const now = new Date();
const day = `${now.getUTCFullYear()}-${
now.getUTCMonth()+1
}-${now.getUTCDate()}`;
// log request to database
req.logger.log({ day, requestCount: 1 });
next();
};
module.exports = requestLogger; |
/*
* 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 "License"); you may ... |
export const config = {
secrets: {
jwt: '<PASSWORD>'
},
dbUrl: `mongodb+srv://${process.env.MONGO_USER}:${process.env.MONGO_PASSWORD}@<EMAIL>/${process.env.MONGO_DB}?retryWrites=true&w=majority`
}
|
/////////////////////////////////////////////////////////////////////////////
// Name: src/qt/apptraits.cpp
// Author: <NAME>, <NAME>, <NAME>
// Copyright: (c) 2010 wxWidgets dev team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For co... |
package restauthserver;
import restauthshared.dto.LoginResultDto;
import restauthshared.dto.RegistrationResultDto;
import fontysmultipurposelibrary.communication.rest.dto.BaseResultDto;
import fontysmultipurposelibrary.serialization.ISerializer;
import fontysmultipurposelibrary.serialization.SerializationProvider;
pu... |
#!/bin/bash
set -e
set -u
set -o pipefail
readonly ROOT_DIR="$(cd "$(dirname "${0}")/.." && pwd)"
readonly BIN_DIR="${ROOT_DIR}/.bin"
readonly BUILD_DIR="${ROOT_DIR}/build"
# shellcheck source=SCRIPTDIR/.util/tools.sh
source "${ROOT_DIR}/scripts/.util/tools.sh"
# shellcheck source=SCRIPTDIR/.util/print.sh
source "$... |
#!/bin/bash
curl -k --request POST --data '{"PK_Master":"1","gpsLatittude":10, "gpsLongtitude":10}' https://localhost/register
echo ""
sleep 3
curl -k --request POST --data '{"PK_Master":"2","gpsLatittude":60, "gpsLongtitude":0}' https://localhost/register
echo ""
sleep 3
curl -k --request POST --data '{"PK_Master":"3"... |
<reponame>JimBae/pythonTips<filename>05_set.py
import os
import sys
# set datastructure
#aSet = {''}
#print(type(aSet)) # set
someList = ['a', 'a', 'b', 'c', 'd', 'e', 'e']
someSet = set(someList)
print(someSet)
# brute force version
duplicateList = []
for value in someList:
if someList.count(value) > 1:
... |
#!/usr/bin/env bash
source ./.build-scripts/sources/slack.sh
ACTOR=${GITHUB_ACTOR}
SLACK_CHANNEL='#cloud-native-directory'
github_workspace=${GITHUB_WORKSPACE:-.}
step_scripts=${github_workspace}/.github/steps/deploy
function print_help {
cat <<EOF
Use: get_slack_notification.sh [--debug --help]
Options:
... |
#!/bin/bash
set -ex
# Default parameters for nightly builds to be sourced both by build_cron.sh and
# by the build_docker.sh and wheel/build_wheel.sh scripts.
echo "nightly_defaults.sh at $(pwd) starting at $(date) on $(uname -a) with pid $$"
# NIGHTLIES_FOLDER
# N.B. this is also defined in cron_start.sh
# An ar... |
docker exec elk curl -XDELETE http://localhost:9200/filebeat-*/
|
<filename>AdoptionApplication/src/userinterface/ParentRegister.java
/*
* 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 userinterface;
import Business.Directory.Counsellor;
impor... |
#!/usr/bin/env bash
add_rw_mark() {
printf "#{?client_readonly,#[bg=colour9] R ,#[fg=colour0,bg=colour10] RW }"
}
add_sessions_list() {
tmux list-sessions -F "#{session_name}:#{session_attached}" | \
while read line; do
attached=${line##*:};
line=${line/$/};
line=${line%%:*};
if [[ "${attached}"... |
#!/usr/bin/env bats
# Tests dont run on linux properly, something to do with set -u
# See: https://github.com/sstephenson/bats/issues/171
BATS_TEST_SKIPPED=0
#BATS_ERROR_STACK_TRACE=()
setup() {
# Source in ecs-deploy
. "ecs-deploy"
}
@test "check that usage() returns string and exits with status code 20" {... |
public func listRobotApplicationsPaginator(
_ input: ListRobotApplicationsRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (ListRobotApplicationsResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void> {
func listApplicationsPagin... |
#!/usr/bin/env bats
setup() {
BATS_TMPDIR=`mktemp --directory`
}
teardown() {
rm -rf "$BATS_TMPDIR"
}
@test "Your server code compiles" {
cd src
rm -f echoserver/EchoServer.class
run javac echoserver/EchoServer.java
cd ..
[ "$status" -eq 0 ]
}
@test "Your server starts successfully" {
cd src
java ... |
import urllib
import urllib.parse
import urllib.request
import ssl
# Proovl SMS API settings www.proovl.com / for Python 3 send SMS
user = "*****" # change ***** to your Proovl user ID
token = "*****" # change ***** to your Proovl token
from_n = "*****" # change ***** to your Proovl SMS number
to = "*****... |
<gh_stars>0
import * as tslib_1 from "tslib";
import { Gain } from "../../core/context/Gain";
import { connect, ToneAudioNode } from "../../core/context/ToneAudioNode";
import { optionsFromArguments } from "../../core/util/Defaults";
import { readOnly } from "../../core/util/Interface";
import { GainToAudio } from "../... |
// Rubro.php
class Rubro {
public function getRubros() {
// Assuming database connection is established
// Perform query to retrieve rubros from the database
$queryResult = $this->db->query("SELECT * FROM rubros");
$rubros = array();
foreach ($queryResult->result() a... |
#include "llvm/IR/LLVMContext.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/RegionPass.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Assembly/PrintModule... |
#!/bin/bash
#SBATCH --account=def-dkulic
#SBATCH --mem=8000M # memory per node
#SBATCH --time=23:00:00 # time (DD-HH:MM)
#SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_RoboschoolInvertedPendulum-v1_doule_ddpg_hardcopy_action_noise_seed5_run3_%N-%j.out # %N for node na... |
<filename>src/main/java/com/plugra/tracker/interfaces/Tracker.java<gh_stars>0
package com.plugra.tracker.interfaces;
public interface Tracker {
// begin logging tracked data from username
public void startTracking(String username, String type);
}
|
from django.db import models
class User(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(unique=True)
registration_date = models.DateTimeField(auto_now_add=True)
class Post(models.Model):
content = models.TextField()
user = models.ForeignKey(User, on_delete=models.C... |
<filename>pagefetch_project/populate_pagefetch.py
#!/usr/bin/env python
"""
=============================
Author: mtbvc <<EMAIL>>
Date: 04/07/2013
Last revision: 27/10/2013
Requires:
---------
"""
from django.core.management import setup_environ
from pagefetch_project import settings
setup_environ(settings)
from pa... |
package io.github.tdhd.robakka.behaviours
import io.github.tdhd.robakka._
import io.github.tdhd.robakka.Agent.MoveCommand
case object FollowPlantBehaviour extends BaseBehaviour {
def act(entity: World.AgentEntity, worldState: World.StateContainer) = {
val plants = BehaviourHelpers.entities2MoveCommand(entity, ... |
import React from 'react';
import { Box } from 'grommet';
import { Avatar } from '../Avatar';
export default {
title: 'controls/Avatar',
component: Avatar,
};
export var main = function () { return (React.createElement(Box, { basis: 'medium', align: 'center' },
React.createElement(Avatar, { image: '//v2.gro... |
<filename>src/main/resources/dbmigrate/hsql/user/V1_5_0_1__account_info.sql<gh_stars>1000+
-------------------------------------------------------------------------------
-- account info
-------------------------------------------------------------------------------
CREATE TABLE ACCOUNT_INFO(
ID BIGINT... |
# vim: set ts=4 sw=4 et:
[ -n "$VIRTUALIZATION" ] && return 0
if [ -x /usr/lib/systemd/systemd-udevd ]; then
_udevd=/usr/lib/systemd/systemd-udevd
elif [ -x /sbin/udevd -o -x /bin/udevd -o -x /usr/sbin/udevd ]; then
_udevd=udevd
else
msg_warn "cannot find udevd!"
fi
if [ -n "${_udevd}" ]; then
msg "S... |
#!/bin/bash
# Current directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
PROJECT_ROOT=$( cd "$( dirname "${DIR}/../.." )" && pwd )
# Make modules available for import in Python
export PYTHONPATH=$PROJECT_ROOT:$PYTHONPATH
# Clean results
$DIR/clean.sh
# Generate datasets and get results for dataset-sim... |
import pulsar as psr
def load_ref_system():
""" Returns d-galactose as found in the IQMol fragment library.
All credit to https://github.com/nutjunkie/IQmol
"""
return psr.make_system("""
C 2.9711 -1.0371 0.0910
C 1.8817 0.0283 -0.1809
C 0.465... |
/**
* Demo Layout Cover
*/
import React from 'react';
import { Short } from '@demo/includes/SampleContent';
import { Cover, Container } from '@components/Layout';
const LayoutCover = () => (
<div className="d-layout">
<Container fluid="both">
<h1>Cover Demo</h1>
<div className="d-block bg--primary ... |
#!/bin/bash
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
<gh_stars>1-10
package org.opentaps.base.constants;
/*
* Copyright (c) Open Source Strategies, Inc.
*
* Opentaps is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or... |
export class Locations {
constructor(
public id: number,
// public location?: string
public city?: string,
public state?: string
)
{}} |
<gh_stars>1-10
angular.module('ngTimeBlocks', [])
/**
* TimeBlocks directive
*/
.directive('visTimeblocks', function () {
'use strict';
return {
restrict: 'EA',
transclude: false,
scope: {
data: '=',
options: '=',
events: '='
}... |
#!/usr/bin/env bash
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc
docker volume rm $(docker volume ls -qf dangling=true)
|
# Import necessary libraries
import numpy as np
import scipy
import matplotlib.pyplot as plt
import glob, os, sys, time
from read_Lbl import lbl_Parse
from read_Aux import aux_Parse
from read_Anc import anc_Parse
from read_Chirp import open_Chirp
from plotting import rgram
from read_EDR import EDR_Parse, sci_Decompress... |
<filename>src/locales/arabic.js
module.exports = {
GLOBAL: {
EVERYONE: "Everyone",
NOT_SPECIFIED: "غير محدد",
PROVIDE_ARGS: "من فضلك ادخل المتغير",
ERROR: "حدث خطأ ما",
NAME: "الاسم",
NOT_AN_OPTION: "{option} ليس خيارا صحيح ",
SUCCESS: "تم",
REASON: "السبب",
URL: "URLعنوان ",
N... |
package de.rieckpil.blog.boundary;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import de.rieckpil.blog.control.CustomerService;
import ... |
<gh_stars>10-100
/*
* Copyright (c) 1989, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that... |
#!/bin/sh
docker build -t comum/proxy-inline-test:test -f Dockerfile.test .
|
<reponame>Thalenus/proyectowebGantz<filename>server.js
/**
* Created by Tomás on 17-04-2018.
*/
'use strict';
const mongoose = require('mongoose');
const app = require('./app');
const port = process.env.PORT || 8000;
mongoose.Promise = global.Promise;
mongoose.connect('mongodb://@localhost:27017/portalweb', {useMo... |
<filename>vendor/dist/bundle.js
webpackJsonp([0],{
/***/ 23:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _message = __webpack_require__(11);
var _platzi = __webpack_require__(12);
var _platzi2 = _interopRequireDefault(_platzi);
var _teachers = __webpack_require__(13);
var _teachers... |
<reponame>manvelmk/caesarCipher<filename>caesar cipher/src/CaesarCipher.java<gh_stars>0
import java.util.Scanner;
public class CaesarCipher{
public static void main(String[] args)
{
String message, offset, output;
Scanner input = new Scanner(System.in);
int offset_length;
System.out.println(... |
<reponame>spade69/ADT-Algorithm
import java.util.*;
/*
* 二分查找!
* Return the index
*NotFound : -1
* */
public class BinSearch{
public int BinarySearch(int[] Table,int k){
int left,right,mid;
left=0;
right=Table.length-1;
while(left<=right){
mid=(left+right)/2;
... |
<filename>src/org/sosy_lab/cpachecker/util/ltl/formulas/BooleanConstant.java
/*
* 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");
* ... |
<reponame>LucestDail/JavascriptStudy
var arr1 = [undefined, 1];
var arr2 = [];
arr2[1] = 1;
console.log("arr1 : " + arr1);
console.log("arr2 : " + arr2);
console.log("arr1.forEach");
arr1.forEach(function (v, i) {
console.log(v, i);
});
console.log("arr2.forEach");
arr2.forEach(function (v, i) {
console.log(v,... |
<gh_stars>1-10
public class Leftshift {
public static void main(String args[])
{
byte x = 64;
int i;
byte y;
i = x << 2;
y = (byte) (x << 2);
System.out.print(i + " " + y);
}
}
|
#!/bin/bash
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed w... |
package refinedstorage.network;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml... |
/**
* The MIT License
* Copyright (c) 2014 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify,... |
tail -1|awk '
{
for(i=1;i<=NF;i++){
s+=$i
}
ave=int(s/NF)
if(s%NF!=0){
print -1
}else if(ave==0){
print 0
}else{
s=0
ans=0
k=0
for(i=1;i<=NF;i++){
s+=$i
k+=ave
if(s==k){
ans+=(k/ave-1)
k=0;s=0
}
}
if(s!=0){
print -1
}else{... |
#!/bin/bash
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# 修改openwrt登陆地址,把下面的192.168.2.2修改成你想要的就可以了
sed -i 's/192.168.1.1/192.168.99.100/g' package/base-files/files/bin/config_generate
# 修改主机名字,把OpenWrt-123修改你喜欢的就行(不能纯数字或者使用中文)
sed -i '/uci commit system/i\uci set system.@system[0].hostname='OpenWrt-Neo2''... |
package operate
import (
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/util/gconv"
"github.com/xinjiayu/SimServerUnicom/app/model/analyse"
"github.com/xinjiayu/SimServerUnicom/app... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.