text stringlengths 1 1.05M |
|---|
declare function _default(directory: any): string[];
export default _default;
|
#! /bin/sh
set -e
# Smoke-test wt2447_join_main_table as part of running "make check".
if [ -n "$1" ]
then
# If the test binary is passed in manually.
test_bin=$1
else
# If $binary_dir isn't set, default to using the build directory
# this script resides under. Our CMake build will sync a copy of thi... |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2010... |
/**
* Classe de gestion de la page FAQ
*
* <pre>
* Elias 08/03/15 Création
* </pre>
* @author Elias
* @version 1.0
* @package default
*/
function Faq()
{
// ==== Constructeur ====
} // Faq
Faq.prototype = {
/**
* Traitements lancés en fin de chargement de la page
*/
ready: function()
... |
def normalize_dataset(data):
"""
Normalize dataset by subtracting mean and dividing by standard deviation
:param data: input dataset
:return: normalized dataset
"""
mean = np.mean(data, 0)
std = np.std(data, 0)
data_norm = (data - mean) / std
return data_norm |
#!/bin/bash
mkdir --mode=700 -p ~/.ssh ~/.gnupg
|
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p nix coreutils buildkite-agent
set -euo pipefail
cd `dirname $0`/..
echo "--- Build"
nix build .#benchmarks.cardano-wallet.latency -o bench-latency-shelley
# Note: the tracing will not work if program output is piped
# to another process (e.g. "tee").
# It says "Erro... |
<filename>curry.js
/**
* Converts an n-ary function
* f :: (t_1, t_2, ..., t_n) -> r
* To its equivalent curried form
* f :: t_1 -> t_2 -> ... -> t_n -> r
*/
const curry = (fn, ...args) => {
return (...rest) => {
return fn(...args, ...rest);
};
};
export { curry };
|
import dayjs from 'dayjs';
import dayjsDuration from 'dayjs/plugin/duration';
import React, { useEffect, useState } from 'react';
import { apis } from '../apis';
import { Button, LinkButton } from '../components/button';
import { CheckBox } from '../components/checkbox';
import { FOCUS_END_CLASS, FOCUS_START_CLASS } fr... |
#include <iostream>
#include <stack>
using namespace std;
int evaluatePostfix(string exp)
{
stack<int> s;
for (int i = 0; i < exp.length(); i++) {
if (isdigit(exp[i]))
s.push(exp[i] - '0');
else {
int val1 = s.top();
s.pop();
int val2 ... |
mylist = [1, 2, 3, 4, 5]
for item in mylist:
print(item) |
#!/bin/sh
home-manager switch
~/.emacs.d/bin/doom sync
|
import Layout from '@/views/layout/Layout';
const rolesRouter = {
path: '/roles',
component: Layout,
name: 'Roles',
redirect: '/roles/list',
meta: {
title: 'roles',
icon: 'lock',
permission: 'role.view'
},
children: [
{
path: 'create',
component: () => import('@/views/role/cre... |
const schema = {
"image": "",
"uploadDate": "",
"name": "",
"title": "",
"des": ""
}
const extend = {
createdAt: 'createdTs',
updateAt: 'updateTs'
}
const name = 'collage-image'
module.exports = {
schema,
extend,
name
} |
#!/bin/bash
# set -e
DEBUG=0
VERSION=1.0.0
# SDK_INSTALLATION = -1 = None
# SDK_INSTALLATION = 0 = Basic
# SDK_INSTALLATION = 1 = Full
# SDK_UPDATE = 0 = Force Installtion if exists and not --none
# SDK_UPDATE = 1 = Update if SDK exists
# NO_JAVA = 0 = With Java Installation
# NO_JAVA = 1 = Skip Java Installation
#... |
#!/bin/bash
. ./common.sh
kubectl patch configmap config-logging -n karpenter --patch '{"data":{"loglevel.controller":"debug"}}'
kubectl patch configmap config-logging -n karpenter --patch '{"data":{"loglevel.webhook":"debug"}}'
|
<gh_stars>10-100
'use strict';
/**
* A module for the router of the desktop application
*/
define("router", [
'angular',
'angularRoute',
'angularResource',
'angularTouch',
'app/home/view',
'app/events/eventsView',
'app/venues/venuesView',
'app/eventDetail/eventDetailView',
'app/ve... |
import * as NS from '../../namespace';
import { TwoFAType } from 'shared/types/models';
export function setRetriesAmount(amount: number): NS.ISetRetriesAmount {
return { type: 'PROTECTOR:SET_RETRIES_AMOUNT', payload: amount };
}
export function setProvider(payload: TwoFAType): NS.ISetProvider {
return { type: 'PR... |
#!/bin/bash
stage=0
train=true # set to false to disable the training-related scripts
# note: you probably only want to set --train false if you
# are using at least --stage 1.
decode=true # set to false to disable the decoding-related scripts.
. ./cmd.sh ## You'll want to change cmd.sh t... |
#!/bin/sh
set -e
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
echo test0 > file0
git add .
git commit -am file0
echo test1 > file1
git add .
git commit -am file1
|
import { SET_PROJECTS } from '../actions/types';
const initialState = {};
export default function (state = initialState, action: any) {
const { type, payload } = action;
switch (type) {
case SET_PROJECTS:
return { projects: payload };
default:
return state;
}
}
|
#!/usr/bin/env bash
echo "==> Consul (server)"
if [ ${enterprise} == 0 ]
then
echo "--> Fetching OSS binaries"
install_from_url "consul" "${consul_url}"
else
echo "--> Fetching enterprise binaries"
install_from_url "consul" "${consul_ent_url}"
fi
echo "--> Writing configuration"
sudo mkdir -p /mnt/consul
sudo mkdir -... |
#!/bin/bash
INLINING="-light-inline"
#INLINING="-inline-all -unroll"
# ACE bitslice
./usubac $INLINING -gen-bench -bits-per-reg 32 -B -no-sched -o nist/ace/usuba/bench/ace_ua_bitslice.c -arch std -no-share nist/ace/usuba/ua/ace_bitslice.ua
# ACE vslice
./usubac $INLINING -gen-bench -V -no-sched -o nist/ace/usuba/benc... |
<gh_stars>1-10
package com.flockinger.poppynotes.gateway.util;
import java.util.Base64;
import org.apache.commons.lang.ArrayUtils;
public class EncryptionUtils {
public static String encodeBase64(byte[] messageBytes) {
return Base64.getEncoder().encodeToString(messageBytes);
}
public static byte[] decodeBase... |
#!/bin/bash
# we can update table delete route and add new ones
aws ec2 delete-route --route-table-id rtb-11111111 --destination-cidr-block 10.0.0.0/16
aws ec2 create-route --route-table-id rtb-11111111 --destination-cidr-block 10.0.0.0/16 --vpc-peering-connection-id pcx-22222222
|
package com.alzhahir.cscapp;
import java.util.ArrayList;
public class FlightManager {
private String flightID;
private String flightDate;
private String flightTime;
private String flightDestination;
private String flightPrice;
private double totalPrice;
private String[] chosenFlight;
p... |
function fetchRandomSymbol() {
const apiEndpoint = 'https://api.iextrading.com/1.0/ref-data/symbols';
const symbolRequest = fetch(apiEndpoint)
.then(response => response.json())
.then((symbols) => {
return symbols[Math.floor(Math.random() * symbols.length)].symbol;
});
return symbolRequest;
} |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Stack;
public class Crane {
public static void main(String[] args) {
}
int[][] board;
List<Integer> cranePointer;
Stack<Integer> dollStack;
int count;
Crane(int[][] board) {
this.board =... |
<reponame>SpoonX/aurelia-view
export * from './aurelia-view-manager'; |
<filename>spec/services/carry_over_application_spec.rb
require 'rails_helper'
require 'services/duplicate_application_shared_examples'
RSpec.describe CarryOverApplication do
def original_application_form
@original_application_form ||= Timecop.travel(-1.day) do
application_form = create(
:completed_... |
<filename>src/main/java/org/olat/instantMessaging/manager/ChatLogHelper.java
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>... |
#!/bin/bash -e
PORT=5000
# Simulates
curl \
"http://localhost:${PORT}/health-check" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--compressed
echo "" |
json.array!(@variants) do |variant|
json.extract! variant, :id, :size, :pattern_id, :44, :54, :60, :bust, :waist, :hips
json.url variant_url(variant, format: :json)
end
|
var searchData=
[
['unittesthelper',['UnitTestHelper',['../class_smol_dock_1_1_molecule.html#a3cb039460aae8734c10a3588e1d670a2',1,'SmolDock::Molecule']]],
['unknown',['unknown',['../class_smol_dock_1_1_amino_acid.html#a08692b12e7f53812c5258bd8b805875daad921d60486366258809553a3db49a4a',1,'SmolDock::AminoAcid::unknow... |
<gh_stars>1-10
const soma = ((a, b) => {
return a + b;
});
const multiplicacao = ((a, b) => {
return a * b;
});
module.exports = {soma, multiplicacao};
|
class Tree:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
def max_depth(self):
if self is None:
return 0
else:
left_depth = self.left.max_depth() if self.left else 0
right_depth = self.right.max_depth... |
<filename>src/icons/legacy/FrownO.tsx
// Generated by script, don't edit it please.
import createSvgIcon from '../../createSvgIcon';
import FrownOSvg from '@rsuite/icon-font/lib/legacy/FrownO';
const FrownO = createSvgIcon({
as: FrownOSvg,
ariaLabel: 'frown o',
category: 'legacy',
displayName: 'FrownO'
});
ex... |
<gh_stars>0
#! /usr/bin/env python
# -*- coding:UTF-8 -*-
a = 37
def foo():
print("I'm foo and a is %s"% a)
def bar():
print("I'm bar and I'm calling foo")
foo()
class Spam(object):
def grok(self):
print("I'm Spam.grok")
|
using System;
using System.Collections.Generic;
using System.Linq;
public class MedianStars
{
public static int FindMedianStars(List<int> stars)
{
stars.Sort();
int n = stars.Count;
if (n % 2 == 0)
{
return (stars[n / 2 - 1] + stars[n / 2]) / 2;
}
els... |
#!/bin/bash
echo "THIS SCRIPT IS OBSOLETE AND INCLUDED BECAUSE OF AN ONGOING EXPERIMENT"
if [ "z${MAXNOISE}" = "z" ] ; then
MAXNOISE=3
echo Lacking environment variable MAXNOISE, using default value "${MAXNOISE} (percent)"
fi
# Perflock is preferred
PERFLOCK=`which perflock`
if [ "z${PERFLOCK}" = "z" -a `un... |
#!/usr/bin/env bash
echo "collecting coverage now..."
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info '/usr/bin/*' --output-file coverage.info # filter out system
lcov --remove coverage.info '/usr/lib/*' --output-file coverage.info # filter out system
lcov ... |
<gh_stars>1-10
import { SLIDES_SELECTOR } from '../utils/constants.js'
import { queryAll, createStyleSheet } from '../utils/util.js'
/**
* Setups up our presentation for printing/exporting to PDF.
*/
export default class Print {
constructor( Reveal ) {
this.Reveal = Reveal;
}
/**
* Configures the presenta... |
#!/bin/bash
TEST_DIR="$(cd "$(dirname "${0}")" && pwd)"
source "${TEST_DIR}/lib.sh"
copy_deploy
run -r master -e "${TEST_DIR}/test-inside-gk-deploy.sh" "Test basic deployment"
run -r master "${TEST_DIR}/test-inside-gk-deploy.sh" "Test basic deployment idempotence"
|
#!/bin/bash
# Set environment variables
PATH2SCRIPTS="/path/to/scripts"
MDDESCRIPTORS="/path/to/md_descriptors"
BASH_HYDRATION_CODE="${PATH2SCRIPTS}/extract_hydration_maps.sh"
BASH_HYDRATION_CODE_GMX_SELECT="${PATH2SCRIPTS}/extract_hydration_maps_with_gmx_select.sh"
PATH_SUBMISSIONS="${PATH2SCRIPTS}/submission_script... |
// Define the Transmitter interface
interface Transmitter {
boolean sendMessage(String message, String recipient);
String receiveMessage(String recipient);
}
// Implement the EmailTransmitter class
class EmailTransmitter implements Transmitter {
@Override
public boolean sendMessage(String message, Stri... |
import React, { useState } from 'react';
function App() {
const colors = ["red", "blue", "green", "purple", "pink"];
const [search, setSearch] = useState('');
const [filteredColors, setFilteredColors] = useState(colors);
const handleChange = event => {
setSearch(event.target.value);
const lowerCasedSearch = ... |
package cn.st.junit;
public class CalculatorTest {
public static void main(String[] args) {
Calculator c = new Calculator();
System.out.println(c.add(1, 3));
}
} |
def even_odd_lists(list_input):
even_list = []
odd_list = []
for element in list_input:
if element % 2 == 0:
even_list.append(element)
else:
odd_list.append(element)
print("Even list:", even_list)
print("Odd list:", odd_list)
li... |
CLOCK_THEME_PROMPT_COLOR=124
CWD_THEME_PROMPT_COLOR=111
HOST_THEME_PROMPT_COLOR=99
SCM_THEME_PROMPT_CLEAN_COLOR=4
SCM_THEME_PROMPT_STAGED_COLOR=2563
SCM_THEME_PROMPT_DIRTY_COLOR=2561
SCM_THEME_PROMPT_UNSTAGED_COLOR=209
USER_INFO_THEME_PROMPT_COLOR=126
GO_THEME_PROMPT_COLOR=19
POWERLINE_GO_COLOR=33
NODE_THEME_PROMPT_COL... |
<filename>webapp/model.py
import pandas as pd
from google.cloud import firestore
from google.cloud import bigquery
from datetime import datetime, timezone
def predicted_pointspread(teams):
try:
df = pd.DataFrame(teams, index=[0])
model = df['Model'][0]
client = bigquery.Client()
... |
<filename>service/frontend/src/components/select/index.tsx
import React, {
HTMLProps,
useState,
useRef,
useEffect,
MouseEvent,
KeyboardEvent,
} from "react";
import { Label } from "src/components/label";
import { useOutsideEventAwareness } from "src/hooks/use-outside-event-awareness";
import ... |
<reponame>raghav-deepsource/realm-java<gh_stars>1-10
/*
* Copyright 2016 Realm 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
*
*... |
#!/bin/bash
#
# Copyright 2021 The Kubeflow 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
import sys
import signal, functools
import os
def timeout(seconds, error_message="Timeout Error: the cmd 30s have not finished."):
def decorated(func):
result = ""
def _handle_timeout(signum, frame):
global result
result = error_message
os._exit(error_message)
... |
<filename>node_modules/spotify-web-api-node/examples/add-tracks-to-a-playlist.js
const SpotifyWebApi = require('../');
/**
* This example demonstrates adding tracks to a specified position in a playlist.
*
* Since authorization is required, this example retrieves an access token using the Authorization Code Grant f... |
#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE}")";
git pull origin master;
function setupZshUbuntu() {
# install ZSH if needed
if [ -z $(which zsh) ]; then
echo "Installing zsh";
sudo apt install -y zsh;
sudo chsh -s $(which zsh);
fi
# setup Oh-my-ZSH
if [ ! -d ~/.oh-my-zsh ]; then
echo "Installing ... |
<reponame>Luukvdm/doodleguesser<filename>DoodleGuesser/SocketGameServer/src/main/java/socketgameserver/messaging/messagehandlers/AddPointToPathMessageHandler.java
package socketgameserver.messaging.messagehandlers;
import socketgameserver.model.IGame;
import socketgameshared.messaging.messages.AddPointToPathMessage;
i... |
require "rails_helper"
RSpec.describe GlobalExportNotification, type: :mailer do
describe "notification_email" do
subject(:mail) { GlobalExportNotification.notification_email("<EMAIL>", "http://www.example.com/foo.csv") }
it "is sent from the no reply address" do
expect(mail.from).to eq ["<EMAIL>"]
... |
# 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 not u... |
<reponame>Annabelle1024/WYNewws
//
// UILabel+YJAddition.h
//
// Created by Annabelle on 16/5/28.
// Copyright © 2016年 annabelle. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UILabel (YJAddition)
/// 创建文本标签
///
/// @param text 文本
/// @param fontSize 字体大小
/// @param color 颜色
///
/// @return UI... |
#!/bin/bash
eval `resize`
UBUNTUISO_BIONIC='http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/mini.iso'
UBUNTUISO_XENIAL='http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/installer-amd64/current/images/netboot/mini.iso'
PROG_TITLE="AASAAM Ubuntu overssh instal... |
package io.flutter.plugins;
import android.app.Activity;
import android.content.Intent;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.MethodCall;
import io.flutter.pl... |
#!/bin/bash
# Wazuh Docker Copyright (C) 2020 Wazuh Inc. (License GPLv2)
set -e
el_url=${ELASTICSEARCH_URL}
if [[ ${ENABLED_XPACK} != "true" || "x${ELASTICSEARCH_USERNAME}" = "x" || "x${ELASTICSEARCH_PASSWORD}" = "x" ]]; then
auth=""
else
auth="--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"
fi
unt... |
#pragma once
#include <flowi_core/config.h>
#include <flowi_core/error.h>
#include <flowi_core/layout.h>
#include "command_buffer.h"
#include "flowi.h"
#include "handles.h"
#include "layout_private.h"
#include "primitives.h"
#include "simd.h"
#include "string_allocator.h"
#include "vertex_allocator.h"
#if defined(FL_... |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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 applicab... |
# -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Tests for MS object.
"""
import pytest
import os
import shutil
import numpy as np
from pyuvdata import UVData
from pyuvdata.uvdata.ms import MS
from pyuvdata.data import DATA_PATH
im... |
<filename>M7-Algorithms/01-swap-case/Unsolved/swap-case.js
// Write code to create a function takes a string and returns the string with all of the letter cases swapped
var swapCase = function(str) {
// turn string into array of letters
var newArr = str.split("")
// console.log(newArr)
// for loop to... |
#!/usr/heirloom/bin/sh
cd "`dirname "$0"`" || exit 1
_bashaspec_test_file="`pwd`/`basename "$0"`"
before_all() {
echo 'inside before_all'
false
}
after_all() {
echo 'inside after_all'
true
}
before_each() {
echo 'inside before_each'
true
}
after_each() {
echo 'inside after_each'
true
}
test_1() {
... |
<filename>dailymotion-sdk-api/src/main/java/fr/zebasto/dailymotion/sdk/api/dto/Video.java
package fr.zebasto.dailymotion.sdk.api.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import fr.zebasto.dailymotion.sdk.api.Entity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.la... |
#!/bin/bash
#SBATCH --account=def-dkulic
#SBATCH --mem=8000M # memory per node
#SBATCH --time=10:00:00 # time (DD-HH:MM)
#SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/discrete_MountainCar-v0_ddpg_softcopy_action_noise_seed3_run0_%N-%j.out # %N for node name, %j for jobID
modul... |
<gh_stars>0
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import enMessages from '@/locales/en'
import zhMessages from '@/locales/zh'
import jaMessages from '@/locales/ja'
import koMessages from '@/locales/ko'
Vue.use(VueI18n)
export default new VueI18n({
locale: 'zh',
fallbackLocale: 'en',
silentFallba... |
<filename>TX23Manipulations.h
#ifndef TX23manipulations_h
#define TX23manipulations_h
#include <LaCrosse_TX23.h>
class TX23manipulations{
public:
float metersToMiles(float speed);
float getMeterToMile();
void printTX23Data(LaCrosse_TX23 anemometer);
int getDir();
int getSpeed();
private:
... |
<reponame>escenic/TwelveMonkeys
/*
* Copyright (c) 2014, <NAME>
* 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 copyright
* ... |
#!/bin/bash
# vim: softtabstop=2 shiftwidth=2 expandtab
# shellcheck disable=SC1091
. /lib/dracut-lib.sh
# Source options detected at build time
# shellcheck disable=SC1091
[ -r /etc/zfsbootmenu.conf ] && source /etc/zfsbootmenu.conf
# shellcheck disable=SC2154
if [ -n "${embedded_kcl}" ]; then
mkdir -p /etc/cmdli... |
#!/bin/bash
# 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 License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
#!/bin/zsh
echo "Retrieve the metadata about the images"
python photography_meta.py
PHOTO_DIR=`jq -r '.folders.directory' "$OLI_LOCAL_DIR/photography/conf.json"`
echo $PHOTO_DIR
if [[ ! -d "$PHOTO_DIR" ]]
then
echo "$DIRECTORY with images does exists on the filesystem."
exit 1
fi
echo "Saving js from Elm code... |
#!/usr/bin/env bash
echo 'Starting ssh build script for nougat 7.1 (sdk 25)'
./scripts/build_ssh.sh scripts/config/ssh-25.config |
<reponame>deoncarlette/AutoMod
"""
auto_mod_cli.py
RTC: For voice communication
"""
# import os
# import sys
import logging
from .clubhouse import Clubhouse
class AudioClient:
AGORA_KEY = Clubhouse.AGORA_KEY
try:
import agorartc
logging.info("Imported agorartc")
RTC = agorartc.cre... |
#!/usr/bin/env bash
#
# 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 "Lice... |
function validateEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
}
let valid = validateEmail('test@example.com'); // returns true |
<filename>swexpertacademy.com/source/1873.cpp<gh_stars>1-10
// 1873. 상호의 배틀필드
// 2019.07.02
#include<iostream>
#include<string>
using namespace std;
// U D L R
int dx[4] = { -1, 1, 0, 0 };
int dy[4] = { 0, 0, -1, 1 };
char map[21][21];
char tank;
int xPos;
int yPos;
int h;
int w;
void move(int dir, int x, int y)
{
i... |
#!/bin/bash
export PATH=/n/home04/xiaoleliu/ChiLin/alvin/xiaoleliu_lab/marge2/phaseI_init/miniconda3/bin:$PATH
source activate lisa
mkdir -p logs/cluster
#snakemake --unlock
#parallel simple job
#snakemake -j 150 --cluster-config ../cluster.json --immediate-submit --cluster "sbatch --time={cluster.time} --mem={cluste... |
package tae.cosmetics.guiscreen.utilities;
import java.awt.Color;
import java.io.IOException;
import java.util.List;
import org.lwjgl.input.Keyboard;
import io.netty.buffer.Unpooled;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiUtilRenderCom... |
\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b |
import java.util.Scanner;
public class FruitSearch {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a list of fruits separated by a comma (i.e. apples, bananas, oranges): ");
String input = in.nextLine();
// Split ... |
#!/bin/sh
/bin/sleep 10
exec ./server
|
/**
* @license
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/IDuxFE/idux/blob/main/LICENSE
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
... |
<filename>packages/fractures-library/src/config/reset.ts
export const reset: string = `* {
margin: 0;
padding: 0;
}
*,
*:before,
*:after {
box-sizing: border-box;
}
html,
body {
position: relative;
}
html {
overflow-y: scroll;
}
a {
text-decoration: none;
}
ul,
ol {
list-style: none;
}
img { max-width: 100... |
import Minus from './minus.vue'
import Plus from './plus.vue'
import Tick from './tick.vue'
import Times from './times.vue'
import Time from './time.vue'
import Date from './date.vue'
import Datetime from './datetime.vue'
import Exclam from './exclam.vue'
import Caret from './caret.vue'
import Arrow from './arrow.vue'
... |
// XML layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText
a... |
<reponame>DinhLantstk789/codelibrary
package optimization;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.util.List;
public class GeneticAlgorithm extends JFrame {
Random rnd = new Random(1);
int n = rnd.nextInt(300) + 250;
int generation;
double[] x = new double[n];
dou... |
package sunset.gitcore.database;
import java.util.List;
public interface Client
{
void createTable(Class<?> cls) throws Exception;
void migrateTable(Class<?> cls) throws NotSupportedException;
void dropTable(Class<?> cls);
long insert(Object obj);
long insert(Object obj, String extra,... |
<reponame>otaviomad/react-native-iconly
import { G, Path } from 'react-native-svg';
import * as React from 'react';
import withIcon from '../../lib/withIcon';
type Props = {
opacity?: string;
color?: string;
secondaryColor?: string;
set?: string;
strokeWidth?: string | number;
};
const Chart = ({
color, s... |
package org.ednovo.gooru.core.api.model;
import java.io.Serializable;
public class OrganizationDomainAssoc extends OrganizationModel {
/**
*
*/
private static final long serialVersionUID = -2837330304486624576L;
private Idp domain;
public void setDomain(Idp domain) {
this.domain = domain;
}
public I... |
<filename>src/flux/reducers/comparisonreport.js
import C from '../actions/constants';
export default function (state = {}, action) {
switch (action.type) {
case C.FETCH_COMPARISON_REPORT:
if (action.payload && Array.isArray(action.payload)) {
let data_arr = []
a... |
#!/usr/bin/env bash
FZF_DEFAULT_OPTS=$(echo $FZF_DEFAULT_OPTS | sed -r -e '$a --header="select a key binding"')
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ "$TMUX_FZF_OPTIONS"x == ""x ]]; then
TARGET_ORIGIN=$(tmux list-keys | sed '1i [cancel]' | "$CURRENT_DIR/.fzf-tmux")
else
TARGET_ORIG... |
#!/usr/bin/env bash
# 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
# "Lice... |
# -*- coding: utf-8 -*-
from src.file_oper import copy_celeba
from src.util import faceFromDir
CELEBA_IDENTITY_FILE = "datasets/celeba/identity_CelebA.txt"
CELEBA_DATASET = "datasets/celeba/img_align_celeba"
MIDDLE_DIR = "datasets/celeba/celeba_identified"
OUT_DIR = "datasets/celeba_aligned_bleed"
copy_cele... |
def find_unique(str1, str2):
words1 = str1.split(' ')
words2 = str2.split(' ')
unique_words = []
for word1 in words1:
if word1 not in words2:
unique_words.append(word1)
for word2 in words2:
if word2 not in words1:
unique_words.append(word2)
return unique_words
unique_words = find_un... |
#!/bin/sh
set -e
image="${namespace:-minidocks}/perl"
versions="
5
latest
"
build() {
IFS=" "
docker buildx build $docker_opts -t "$image:$1" "$(dirname $0)"
}
case "$1" in
--versions) echo "$versions" | awk 'NF' | cut -d';' -f1;;
'') echo "$versions" | grep -v "^$" | while read -r version; do IFS=';... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.