text stringlengths 1 1.05M |
|---|
<filename>app/src/main/java/com/navjacinthmathew/mvpdemo/adapter/EmployeeAdapter.java
package com.navjacinthmathew.mvpdemo.adapter;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.nav... |
import tensorflow as tf
from tensorflow.keras import layers
# Build the autoencoder model
input_layer = layers.Input(shape=(28, 28, 1))
# Encoding layers
encoder_layer_1 = layers.Conv2D(64 , (3,3), activation='relu', padding='SAME', strides=2)(input_layer)
encoder_layer_2 = layers.Conv2D(32 , (3,3), activation='relu'... |
#!/bin/bash
#
# Copyright (c) 2017, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
#
# All rights reserved.
#
# The Astrobee platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in complian... |
<filename>pkg/controller/mizar/builtins.pb.go
/*
Copyright 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... |
<filename>meetings/views.py
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.utils import timezone
from django.http import JsonResponse
from django.conf import settings
from .models import Att... |
<filename>gulpfile.js
/*global -$ */
'use strict';
// generated on 2016-01-04 using generator-modern-frontend 0.2.8
var fs = require('fs');
var path = require('path');
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var th... |
if [ ! -d vendor ]; then
mkdir vendor
fi
wget https://raw.github.com/gist/221634/2bc31f04b0ed0ef70daab68516c8d17ba0753f5e/SplClassLoader.php -O vendor/SplClassLoader.php
|
#!/bin/bash
output=$1
shift
i=1
for var in "$@"
do
if [[ -s $var ]] ; then
( head -q -n 1 $var ) > $output
break
fi
i=$[i+1]
done
if [ $i -le "$#" ]
then
( tail -q -n +2 $@ )>> $output
else
exit 5
fi
|
package java_8_in_action.stream_collector;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static java.util.stream.Collectors.toList;
import java_8_in_action.stream_collector.Dish.Type;
public class MiddleOperatorExmaple {
public static void main(String [] args) {
List<Dish> m... |
#!/bin/bash
#$ -S /bin/bash
#$ -N chiralDFT
#$ -l h_rt=168:00:00
#$ -q CLG6242deb384C,CLG6226Rdeb192D,CLG5218deb192D,CLG5218deb192Th,SLG6142deb384C
#$ -pe mpi8_debian 16
#$ -cwd
#$ -V
#$ -m be
module load GCC/7.2.0/OpenMPI/3.0.0
# given by SGE
HOSTFILE="${TMPDIR}/machines"
cd "${SGE_O_WORKDIR}" || { echo "cannot cd... |
set -u
set -e
./train.sh
./translate.sh word-vec vocab result
|
#Function to calculate the sum of the natural numbers
def sumOfNaturals(n):
#using Gauss formula
if n % 2 == 0:
sum = (n//2)*(n+1)
else:
sum = (n//2)*(n+1) + (n+1)//2
return sum |
package com.github.robindevilliers.welcometohell.wizard;
import com.github.robindevilliers.welcometohell.wizard.domain.RouteMappings;
import com.github.robindevilliers.welcometohell.wizard.domain.Rule;
import com.github.robindevilliers.welcometohell.wizard.domain.View;
import com.github.robindevilliers.welcometohell.w... |
#!/bin/bash
# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# 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
# t... |
def longest_common_substring(s1, s2):
"""
Find the longest common substring between two strings.
Args:
s1 (str): The first string.
s2 (str): The second string.
Returns:
str: The longest common substring between s1 and s2.
"""
m = [[0] * (1 + len(s2)) for i i... |
/*global define*/
define(function(require) {
var templateNode = require('tmpl!./settings_main.html'),
tngAccountItemNode = require('tmpl!./tng/account_item.html'),
common = require('mail_common'),
MailAPI = require('api'),
Cards = common.Cards;
/**
* Global settings, list of accounts.
*/
function Se... |
package dao;
public interface ClientDao {
}
|
name := "msgpack-rawparser"
version := "0.2.2"
scalaVersion := "2.10.6"
|
from django.urls import path
from django.conf.urls import url,include
from . import views
urlpatterns = [
path('',views.rankingView,name='ranking'),
path('.list',views.RankingList.as_view,name='rankingList')
] |
<reponame>StanislavMishin/external-courses
const number = 0;
function justNumber(num) {
if (num > 1000) {
console.log('ะะฐะฝะฝัะต ะฝะตะฒะตัะฝั');
return 'ะะฐะฝะฝัะต ะฝะตะฒะตัะฝั';
}
if (num === 1 || num === 0) {
return 'ะะต ะฟัะธัะธัะปัะตััั ะฝะธ ะบ ะฟัะพัััะผ, ะฝะธ ะบ ัะพััะฐะฒะฝัะผ ัะธัะปะฐะผ';
}
let checkbox = true;
for (let i = 2; ... |
/*
This file is part of the JitCat library.
Copyright (C) <NAME> 2019
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
*/
#include "jitcat/CatFunctionOrConstructor.h"
#include "jitcat/CatArgumentList.h"
#include "jitcat/CatBuiltInFunctionCall.h"
#include "jitcat/CatOp... |
<reponame>orhoj/concordium-desktop-wallet
import React from 'react';
import { AddAnonymityRevoker } from '~/utils/types';
import { fieldDisplays } from './CreateAddAnonymityRevoker';
import PublicKeyDetails from '~/components/ledger/PublicKeyDetails';
interface Props {
addAnonymityRevoker: AddAnonymityRevoker;
}
... |
<filename>user/forms/__init__.py
from .auth_forms import *
from .profile_form import *
|
#include <iostream>
int main(){
int num1,num2;
std::cin >> num1 >> num2;
int maxNum;
if(num1 > num2)
maxNum = num1;
else
maxNum = num2;
std::cout << maxNum << std::endl;
return 0;
} |
import React from 'react';
import { Progress } from 'algae-ui';
export default () => {
return (
<div className="progress-list">
<Progress percent={30} />
<Progress percent={50} />
<Progress percent={20} status="fail" />
<Progress percent={70} status="success" />
<Progress percent={5... |
#!/usr/bin/env bash
# Copyright 2020 Jian Wu
# License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
set -eu
# data
train_data=/home/jwu/doc/data/aishell_v2/AISHELL-2
valid_data=/home/jwu/doc/data/aishell_v2/AISHELL-2-Eval-Test
dataset="aishell_v2"
nj=4
stage=1
am_exp=1a
gpu="0,1,2,3"
seed=777
tensorboa... |
# import libraries
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
# load the digits dataset
digits = datasets.load_digits()
# create features and target
X = digits.data
y = digits.target
# split the data into ... |
<gh_stars>0
/*
* 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 com.curso.lambdas.interfaces;
/**
*
* @author Chema
* @param <Argumento>
* @param <Resultado>
*/
@FunctionalI... |
// 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, software
// distributed ... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-rare/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-rare/7-512+0+512-N-first-256 --do_eval --per_device_ev... |
//============================================================================
// Name : OneMillion.cpp
//
// Example of how floating point accuracy is related to precision
//
// ----------------------------------------------------------------------------------------------------
// ------------------------------... |
<gh_stars>1-10
// Code generated by entc, DO NOT EDIT.
package ent
import (
"fmt"
"strings"
"github.com/blushft/strana/modules/sink/reporter/store/ent/page"
"github.com/facebook/ent/dialect/sql"
)
// Page is the model entity for the Page schema.
type Page struct {
config `json:"-"`
// ID of the ent.
ID int `... |
<reponame>lsy26499/A_Week_Trip_server
import express from 'express';
import bestPlanList from '../controller/bestplanController/bestPlanList';
import bestPlan from '../controller/bestplanController/bestPlan';
const bestPlanRouter = express.Router();
bestPlanRouter.get('/', bestPlanList);
bestPlanRouter.get('/:num', ... |
#!/usr/bin/env bash
set -euo pipefail
build_dir=$PWD/build-$GOOS
mkdir -p build_dir
if [ -e "version/version" ]; then
version=$(cat version/version)
else
version="TESTVERSION"
fi
cd control-tower || exit 1
cp ../control-tower-ops/manifest.yml opsassets/assets/
cp -R ../control-tower-ops/ops opsassets/assets/
cp... |
_ban_bt_main() {
if [[ $ban_bt ]]; then
local _info="$greenๅทฒๅผๅฏ$none"
else
local _info="$redๅทฒๅ
ณ้ญ$none"
fi
_opt=''
while :; do
echo
echo -e "$yellow 1. $noneๅผๅฏ BT ๅฑ่ฝ"
echo
echo -e "$yellow 2. $noneๅ
ณ้ญ BT ๅฑ่ฝ"
echo
echo -e "ๅฝๅ BT ๅฑ่ฝ็ถๆ: $_info"
echo
read -p "$(echo -e "่ฏท้ๆฉ [${magenta}1-2$none]:")" _op... |
<reponame>ghsecuritylab/bk7231_rtt_sdk<gh_stars>10-100
/*
* File : rt_ota_flash_sfud_port.c
* COPYRIGHT (C) 2012-2018, Shanghai Real-Thread Technology Co., Ltd
*
* Change Logs:
* Date Author Notes
* 2018-01-26 armink the first version
*/
#include <rt_ota_flash_dev.h>
#ifdef RT_OT... |
<reponame>cpa-bayarea/pope-api
from . import api
from flask import jsonify
@api.route('/organizations', methods=['GET'])
def get_organizations():
"""
Recupera informaรงรตes sobre as organizaรงรตes
---
default: all
responses:
200:
description: Recupera os dados das organizaรงรตes
"""
... |
SET randomNumCounter = 0
SET randomNumGenerator = 0
WHILE randomNumCounter < 100
randomNumGenerator = random number generator
PRINT randomNumGenerator
ADD randomNumCounter by 1
END WHILE |
#!/bin/bash
cd /usr/share/grafana.homebrew
grafana-server -config /etc/grafana.homebrew/grafana.ini cfg:default.paths.data=/var/lib/grafana.homebrew 1>/var/log/grafana.homebrew.log 2>&1
|
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
public class SimpleContainer {
private Map<Class<?>, Object> beans = new HashMap<>();
public void register(Class<?> clazz) {
if (!beans.containsKe... |
#!/bin/sh
docker build --rm -t $DREPO .
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
docker push $DREPO |
def find_closest_to_average(input_array):
"""Find and return the one that is closest to the average of the array"""
avg = sum(input_array) / len(input_array)
min_diff = float('inf')
result = 0
for num in input_array:
diff = abs(num - avg)
if diff < min_diff:
min_diff = d... |
#!/bin/sh
SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRI... |
import bs4
from bs4 import BeautifulSoup
html = '''<table>
<tr>
<th>Name</th>
<th>Age</th>
<th>Location</th>
</tr>
<tr>
<td>Jane Doe</td>
<td>22</td>
<td>Paris</td>
</tr>
<tr>
<td>John Smith</td>
<td>25</td>
<td>London</td>
</tr>
</table>'''
soup = BeautifulSoup(html, '... |
#!/bin/bash
# Copyright 2015 Midokura SARL
#
# 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 ... |
<reponame>togiter/RRWallet
package com.renrenbit.rrwallet.service.push;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.Utils;
import com.renr... |
<filename>packages/bench/src/suites/fetch-global-data.ts<gh_stars>1-10
const query = `query globalData {
feature {
questionTranslation
subscription
signUp
discuss
mockInterview
contest
store
book
chinaProblemDiscuss
socialProviders
studentFooter
enableChannels
dange... |
package com.bjpowernode.crm.settings.dao;
import com.bjpowernode.crm.settings.domain.DictionaryValue;
import java.util.List;
public interface DictionaryValueDao {
int findCountByTypeCode(String code);
List<DictionaryValue> findAll();
}
|
import java.util.ArrayList;
public class BookLibrary {
private static ArrayList<Book> library = new ArrayList<>();
public static void addBook(Book book) {
library.add(book);
}
public static Book searchBook(String title) {
for (Book book : library) {
if (book.getTitle().equalsIgnoreCase(title)) {
return book;... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import os
from braket.jobs import save_job_result
from braket.jobs.metrics import log_metric
import json
import networkx as nx
# Load community detection specific library
from src.qbsolv_community import QbsolvCommun... |
<reponame>smagill/opensphere-desktop<gh_stars>10-100
/**
*
*/
package io.opensphere.core.common.shapefile;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Invoc... |
using System;
using System.Threading.Tasks;
namespace Outkeep.Grains.Tests.Fakes
{
public class FakeGrainLifecycle : IGrainLifecycle
{
public Task ActivateAsync()
{
// Simulate activation logic
Console.WriteLine("Grain activated");
return Task.CompletedTask;
... |
package com.shadowolfyt.zander.commands;
import com.shadowolfyt.zander.ZanderMain;
import com.shadowolfyt.zander.guis.WhitelistGUI;
import com.shadowolfyt.zander.guis.WhitelistListGUI;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.Sound;
import org.bukkit.com... |
#!/bin/sh
set -eu
docker run -t -d --rm \
-p 8501:8501 \
-p 8500:8500 \
--name text \
-v $(pwd)/saved_model/text:/models/text \
-e MODEL_NAME=text \
tensorflow/serving:2.3.0
|
// Function to generate success alert message and store it in the session
function generateSuccessAlert($message) {
Session::put('alert-success', $message);
}
// Modified code snippet to display the success alert message
@if (Session::has('alert-success'))
<div class="alert alert-success alert-dismissible" style="... |
<reponame>uk-gov-mirror/hmrc.trader-services-route-one
/*
* Copyright 2021 HM Revenue & Customs
*
* 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/L... |
<gh_stars>0
const Layout = () => import("/@/layout/index.vue");
const IFrame = () => import("/@/layout/frameView.vue");
const pptRouter = {
path: "/ppt",
component: Layout,
redirect: "/ppt/index",
meta: {
icon: "ppt",
title: "PPT",
i18n: false,
rank: 3
},
children: [
{
path: "/ppt... |
#!/bin/bash
dieharder -d 202 -g 208 -S 171451136
|
emulator -avd and100 -qemu &
|
<gh_stars>0
import React from 'react'
import Test from '../common/Test'
const Home = () => (
<div className="text-center">
<h1>This is Home View.</h1>
<Test />
</div>
)
export default Home
|
<filename>js/manage_news.js
function drawpage_sad_news(page){
search=$("#inf_search").val();
limit=$("#inf_limit").val();
redrawrs_admin_news(search,limit,page);
}
function drawsearch_news_qt(event,e){
limit=$("#inf_limit").val();
if(e.keyCode=='13'){
search= $(event).val();
redrawrs_admin_news(search,li... |
<filename>src/todo/Todo.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 todo;
import com.sun.glass.events.KeyEvent;
import java.awt.AWTException;
import java.aw... |
#!/bin/bash
echo "================================="
echo " Cytus II DB Build Tool V2.0 "
echo " A.R.C. Tech. "
echo "================================="
# clean
rm -rf ./res/export
rm -rf ./res/unitydata
rm -rf ./res/unitybundles
if [ ! $1 ]; then
echo "Version not defined!"
exit
fi
mkdir... |
interface DataTypes<T> {
data: T;
}
interface GenericIdentityFn<Type> {
<Type>(arg: Type): Type;
}
// here we basically define the type of the function
let myIdentity: GenericIdentityFn<number> = defineType;
// we can now pass anything to it
function defineType<T>(arg: T): T {
return arg;
}
// you can also ... |
#split -l 30 ../mir_seed_2_8.txt
path="/home/fux/fux/miRNASNP3/target/TargetScan/turn03"
find $path -name "x*" > track_files
cat track_files|while read file
do
briefname=`echo ${file:0-3}`
echo "nohup perl /home/fux/fux/miRNASNP3/TargetScan/targetscan_70.pl ${file} utr3.txt Targetscan_wildmir_result_03_${briefna... |
import {useLinkTo} from '@react-navigation/native';
import {Col, makeContainerStyles, Row} from '../../containers';
import {useAuthLabor} from '../../providers/auth-labor';
import {IcoMoon, Link, Text} from '../UI';
import {LinearGradientIcon} from '../LinearGradientIcon';
import {TouchableOpacity} from 'react-native';... |
<filename>src/components/search/styled.ts
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// โ Copyright (c) 2021 by the author of the React-weather project. All rights reserved. โ
// โ This owner-supplied source code has no limitations on the condition impos... |
<gh_stars>100-1000
package dev.webfx.kit.mapper.peers.javafxcontrols.gwt.html;
import elemental2.dom.HTMLElement;
import elemental2.dom.HTMLInputElement;
import dev.webfx.kit.mapper.peers.javafxgraphics.gwt.html.layoutmeasurable.HtmlLayoutMeasurable;
import dev.webfx.kit.mapper.peers.javafxgraphics.gwt.html.HtmlRegion... |
#include<bcli/bcli.hpp>
using namespace bc;
std::string help()
{
std::stringstream ss;
ss << "Custom help" << "\n";
ss << "-s short param" << "\n";
ss << "--long long param" << "\n";
ss << "-b, --both short and long" << "\n";
ss << "-f, --flag no param" << "\n";
return ss.str();
}
int main(int argc, ch... |
#shell script to see if there are tags which are not declared in root.lexc or if tags are misspelled
echo 'Are there tags not declared in root.lexc or misspelled?'
cat src/fst/affixes/*lexc src/fst/stems/*lexc |cut -d '!' -f1 |grep ' ;' | cut -d ':' -f1 |tr -s ' ' |sed 's/^ //' | cut -d ' ' -f1 |sed 's/+/ยข+/g' |sed '... |
package com.trackorjargh.apirestcontrolers;
import java.util.LinkedList;
import java.util.List;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;... |
#!/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... |
<gh_stars>0
#include "Etterna/Globals/global.h"
#include "Etterna/Models/Misc/Difficulty.h"
#include "Etterna/Models/Misc/GameInput.h"
#include "Etterna/FileTypes/MsdFile.h"
#include "Etterna/Models/NoteData/NoteData.h"
#include "NotesLoader.h"
#include "NotesLoaderDWI.h"
#include "Etterna/Singletons/PrefsManager.h"
#i... |
package jblocks;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import javax.imageio.ImageIO;
import org.apache.batik.dom.svg.SAXSVGDoc... |
<reponame>xcorail/OTB
/*
* Copyright (C) 2005-2017 by Centre National d'Etudes Spatiales (CNES)
*
* This file is licensed under MIT license:
*
* 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 So... |
# Yogo Data Management Toolkit
# Copyright (c) 2010 Montana State University
#
# License -> see license.txt
#
# FILE: preinitilizer.rb
#
#
require File.join(File.dirname(__FILE__), '..', 'lib', 'slash_path')
begin
require File.dirname(__FILE__) / '..' / :'.bundle' / :environment
rescue LoadError
# Fallback on doin... |
<filename>src/inlineParsers/html/captureInlineHTML.ts
import { exec } from 'utils'
import { INodeHTML, IParsed } from 'models'
const execInlineHTML = exec(/^(?:<(a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img))(?: *\S+=['"].*['"])*(?: *\/>... |
<filename>src/server/apiProxy.js
import request from 'request'
import { parse } from 'url'
const { API_HOST } = process.env
const apiHostname = parse(API_HOST).hostname
export default function apiProxy (req, res, next) {
if (!req.originalUrl.startsWith('/noo') &&
!req.originalUrl.startsWith('/admin/kue')) retur... |
#!/bin/bash
sleep 30
cd /opt/spaceinfo
git pull origin master
#feh --file list.txt -F -D 1 -z -Z
while [ 1 ]; do
echo "New loop started"
sudo fbi -T 1 -t 20 /opt/spaceinfo/imgs/*.jpg -a -noverbose -u
sleep 1800
git pull origin master
sudo killall fbi
done
|
var myArray = ["BUET", "CUET", "RUET", "KUET", "DUET", "BUTEX"];
console.log(myArray[1]); |
<reponame>secoya/hablar.js<gh_stars>0
import { builders as b } from 'ast-types';
import * as ASTTypes from 'ast-types/gen/kinds';
export default class Context {
public ctxExpr: ASTTypes.IdentifierKind = b.identifier('ctx');
public encodeIfStringExpr: ASTTypes.IdentifierKind = b.identifier('encodeIfString');
public ... |
# -*- coding: utf-8 -*-
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class ZeveraCom(MultiHoster):
__name__ = "ZeveraCom"
__type__ = "hoster"
__version__ = "0.25"
__pattern__ = r'http://(?:www\.)?zevera\.com/.+'
__description__ = """Zevera.com hoster plugin"... |
const path = require('path');
module.exports = {
Rule: require(path.join(__dirname, 'Rule')),
State: require(path.join(__dirname, 'State'))
};
|
# ----------------------------- kiwi common commands start ------------------------------
# ๆ่ก่พๅบๅๆฐ๏ผๆนไพฟไบบ็ผๆฅ็่ฟๅค็ๅๆฐ##
function WordsToLines()
{
# stdin๏ผๅฆๆๆฒกๆๅๆฐ๏ผๅ่ฏปๅๆ ๅ่พๅ
ฅ##
[ $# -eq 0 ] && cat /dev/stdin | sed 's/\s\s*/\n/g'
# args๏ผๅญๅจๅๆฐ๏ผ็ดๆฅๅค็ๅๆฐ##
[ $# -ne 0 ] && echo "$@" | sed 's/\s\s*/\n/g'
}
# ๅฝฉ่ฒ็catๅฝไปค๏ผๆนไพฟไบบ็ผๅบ... |
<reponame>istxing/kgo<filename>encrypt_test.go
package kgo
import (
"crypto/aes"
"fmt"
"strings"
"testing"
)
func TestBase64Encode(t *testing.T) {
str := []byte("This is an string to encod")
res := KEncr.Base64Encode(str)
if !strings.HasSuffix(res, "=") {
t.Error("Base64Encode fail")
return
}
}
func Benc... |
TERMUX_PKG_HOMEPAGE=https://www.libsdl.org/projects/SDL_image/
TERMUX_PKG_DESCRIPTION="A simple library to load images of various formats as SDL surfaces"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_VERSION=1.2.12
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https:... |
import android.location.Location;
import android.location.LocationManager;
import android.os.Bundle;
public class RestaurantFinderActivity extends AppCompatActivity {
private LocationManager locationManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setCo... |
import { ChannelId, UserId } from "../../types"
import { ChannelReadStateEntity } from "../../entity/ChannelReadState"
export interface IChannelReadStateQueryRepository {
find(channelId: ChannelId, userId: UserId): Promise<ChannelReadStateEntity | null>
}
|
#!/usr/bin/env bash
# The cleanup hook ensures these containers are removed when the script exits.
POSTGRES_CONTAINER=test-container
NET=localhost:8981
CURL_TEMPFILE=curl_out.txt
PIDFILE=testindexerpidfile
CONNECTION_STRING="host=localhost user=algorand password=algorand dbname=DB_NAME_HERE port=5434 sslmode=disable"... |
#!/bin/bash
#
#cat > input.txt << EOF
#Lorem Ipsum is simply dummy text of the printing and typesetting industry.
#Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown
#printer took a galley of type and scrambled it to make a type specimen book. It has survived not only
#five ce... |
<filename>sql/100-reaction.sql<gh_stars>0
DROP TABLE IF EXISTS reaction;
CREATE TABLE reaction (nr INTEGER PRIMARY KEY NOT NULL, namn VARCHAR(80)) ENGINE InnoDB;
-- INSERT INTO reaction(nr,namn) VALUES(1,"Joel");
-- INSERT INTO reaction(nr,namn) VALUES(2,"Jan");
-- INSERT INTO reaction(nr,namn) VALUES(3,"Jens");
|
const rx = require('rxjs');
const fileManager = require('./file-manager');
const blancComponent = {
'red': '',
'green': '',
'blue': '',
'alpha': '',
'hex': ''
}
module.exports = {
loadAssetJson
}
/**
* Assetใๅๅพใใ
*
* @param {*} path
* @returns
*/
function loadAssetJson(paths) {
retur... |
require 'test_helper'
class ETLDimensionsEventTest < ActiveSupport::TestCase
def setup
@network_event = NetworkEvent.new(
name: '<NAME>',
location: locations(:tuggle),
program: programs(:network_night)
)
@network_event.save!
Etl::Dimensions::Even... |
#!/bin/sh
wget -c -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > \
./china_ip_list.txt
./CIDR.sh < china_ip_list.txt > cnip-merge.txt
echo create china_routes hash:net family inet hashsize 2048 maxelem 9999... |
<reponame>Fryguy/manageiq-providers-scvmm<gh_stars>0
describe ManageIQ::Providers::Microsoft::InfraManager::Provision do
let(:vm_prov) do
FactoryGirl.create(
:miq_provision_microsoft,
:userid => @admin.userid,
:miq_request => @pr,
:source => @vm_template,
:request_type =... |
package com.example.Tests.Example2.Service;
import com.example.Tests.Example2.ApplicationConfig.Customer;
import java.io.IOException;
import java.util.List;
/**
* @author <NAME> on 18.29.5
*/
public interface CustomerService {
void addCustomer() throws IOException;
void editCustomer() throws IOException... |
#!/bin/sh
go run -race cassabon.go $@
|
#!/bin/bash
# DEFAULT VALUES
GPUIDS="0"
NAME="toyProblems_depthCompletion_GPU"
NV_GPU="$GPUIDS"
# Allows everybody to use your host x server
xhost +
# Run docker
nvidia-docker run -it --rm --shm-size 12G \
-p 5700:5700\
--name "$NAME""0" \
-v /home/olorin/nicolas/bnn:/root/ \
-v /medi... |
/**
* @ ้่ฟvuex-along - ๅฎ็ฐๆไน
ๅๅญๅจ
*/
import Vue from 'vue'
import Vuex from 'vuex'
import shopCarModule from './modules/shopCar'
import userModule from './modules/user'
import createVuexAlong from "vuex-along";
Vue.use(Vuex)
export default new Vuex.Store({
strict: process.env.NODE_ENV !== 'production',
modules: {
... |
#!/bin/bash
#=================================================
# Description: DIY script
# Lisence: MIT
# Author: Discuzamoy
#=================================================
# Modify default IP
# rm -rf package/litte/luci-app-smartdns
# git clone https://github.com/kenzok8/openwrt-packages.git package/openwrt-package... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.