text stringlengths 1 1.05M |
|---|
/**
* @file main.cpp
* @author Christian (<EMAIL>)
*
* HASHCC is distributed under the MIT License (MIT); this file is part of.
*
* Copyright (c) 2008-2018 Christian (<EMAIL>)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files ... |
<html>
<head>
<title>Table with four columns</title>
</head>
<body>
<table>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
<th>Country</th>
</tr>
<!-- Add rows here -->
</table>
</body>
</html> |
kubectl create -f gate/svcs
kubectl create -f gate/rcs
|
# Resizes images to X, whose sizes is greater than X
SIZE=512; magick mogrify -resize "$SIZE>x$SIZE>" -format png -verbose -path ../images$SIZE *.png |
<reponame>dhval/dhval.github.io
define(['./ajax-loader.module', 'ajax-loader'], function (module, ajaxLoader) {
module.directive('ajaxLoader', function () {
return {
restrict: 'E',
replace: true,
scope: false,
template: ajaxLoader.templates.ajaxLoader
... |
<gh_stars>1-10
// we just take the idea of difference array. Whole code is same, it's just that we do two updates here :
// upd(l, val)
// upd(r + 1, -val)
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ll long long int
#define ld long double
using namespace st... |
<reponame>RainPoetry/mybatis-3
package com.cc.mybatis.executor;
/**
* @author chenchong
* @create 2021/2/5 8:23 下午
* @description Executor 的基础实现
* 封装了一层缓存在里面
*
*
* 模板方法
*
*
* Executor 解析的很透彻
* https://www.cnblogs.com/ZhuChangwu/p/11745562.html
*/
public class BaseExecutorDemo {
}
|
#!/bin/bash
source ../spec.sh
source ./module_spec.sh
# Let's get rid of ${DIR}/var/log/setup
rm -r ${DIR}/var/log/setup
rm ${DIR}/run/lock/pkgtools/ldconfig.lock
rmdir ${DIR}/run/lock/pkgtools
# Clean up dbus and grub
if [ "${INCMOD010XORG}" != "Y" ]; then
rm -f ${DIR}/usr/bin/dbus-launch
rm -f ${DIR}/usr/bin/g... |
#!/usr/bin/env bash
# shellcheck disable=SC2181
#
# Salt state for downloading, installing and configuring PBIS,
# then joining # the instance to Active Directory
#
#################################################################
PBISPKG="${1:-UNDEF}"
INSTPBISVERS="$(rpm --qf '%{version}\n' -qa pbis-open pbis-enterpri... |
<reponame>renovate-bot/java-optimization
/*
* Copyright 2020 Google LLC
*
* 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... |
<reponame>jbcarta/hackaton_galicia
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var schema = new Schema({
country: {type: String, required: true},
state: {type: String, required: true}
});
module.exports = mongoose.model('loc_states', schema);
|
package auth;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
public class cseAuthenticator extends Authenticator
{
private String username;
private String password;
public cseAuthenticator(String username, String password)
{
super();
... |
<filename>src/main/scala/qualification2016/b/RevengePancakes.scala
package qualification2016.b
import java.io.{BufferedReader, FileInputStream, InputStreamReader, PrintWriter}
/*
https://code.google.com/codejam/contest/6254486/dashboard#s=p1
*/
object RevengePancakes {
def main(args: Array[String]): Unit = {
... |
<reponame>saiive/whale
import { Database } from '@src/module.database/database'
import { Test } from '@nestjs/testing'
import { MemoryDatabaseModule } from '@src/module.database/provider.memory/module'
import { LevelDatabase } from '@src/module.database/provider.level/level.database'
import { ScriptActivityMapper, Scri... |
<reponame>oueya1479/OpenOLAT
/**
* <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>
* You may obtain a copy of the License at the
... |
<filename>lib/AdManager.ts
///<reference path='refs.ts'/>
module TDev.RT {
export module AdManager {
export var initialize = (el: HTMLElement) =>
{
el.setChildren([HTML.mkA('', Cloud.getServiceUrl() + '/help/advertisement', '_blank', 'Learn how to display Ads in your apps!')]);
... |
<reponame>leongaban/redux-saga-exchange
export { default as OperationHistory } from './OperationHistory/OperationHistory';
export { default as MOperationHistory } from './OperationHistory/mobile/MOperationHistory';
export { default as Header } from './Header/Header';
|
def generate_style_transfer_command(target: str, output_prefix: str, width: int, vgg_weights: str) -> str:
command = f"{target} {target} {target} " \
f"out/{output_prefix}-texturized/{output_prefix}-Bp " \
f"--analogy-layers='conv3_1,conv4_1' " \
f"--scales=3 --analogy-w=0 ... |
#!/bin/sh
set -e
ME=$(basename $0)
auto_envsubst() {
local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}"
local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}"
local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}"
local template defined_envs relative_path o... |
#!/bin/bash
echo ""
# see background_downloadBlockchain.md for info
# why there are two torrent files
## get basic info
source /home/admin/raspiblitz.info
# make sure rtorrent is available
sudo apt-get install rtorrent -y
echo ""
echo ""
echo "*** Torrent Files ***"
# torrent files that are available
# in director... |
<reponame>afshinsadeghi/DBPediaDownloder
import os
from time import sleep
import requests
querysub0 = 'https://linkeddata1.calcul.u-psud.fr/sparql?default-graph-uri=&query=construct%7B+%3Fs+%3Fp+%3Fo%7D+where+%7B+%0D%0Aselect+distinct+%3Fs+%3Fp+%3Fo+where+%7B%0D%0A%7B%0D%0A%3Fs1+++%3Chttp%3A%2F%2Fyago-knowledge.org%2F... |
def pourLiquid(num_arr, dep_tmp_set, pour_elev, global_set):
"""
Simulates pouring the specified amount of liquid into the containers indicated by dep_tmp_set.
Args:
num_arr: List representing the liquid levels in containers.
dep_tmp_set: Set of indices indicating the containers to be filled wi... |
<gh_stars>10-100
import React from 'react';
import Img, { Svg } from 'react-optimized-image';
const imageName = 'image';
export default () => (
<div>
<Svg src={require('./' + imageName + '.svg')} />
<Img src={require('./' + imageName + '.png')} webp />
</div>
);
|
#! /usr/bin/env bash
set -eu
# MLRMBO WORKFLOW
# Main entry point for mlrMBO workflow
# See README.md for more information
# Autodetect this workflow directory
export EMEWS_PROJECT_ROOT=$( cd $( dirname $0 )/.. ; /bin/pwd )
export WORKFLOWS_ROOT=$( cd $EMEWS_PROJECT_ROOT/.. ; /bin/pwd )
if [[ ! -d $EMEWS_PROJECT_ROOT... |
var searchData=
[
['file_5fgenerator_2ehpp_0',['file_generator.hpp',['../file__generator_8hpp.html',1,'']]]
];
|
const omit = require('lodash/omit');
const Repetition = require('../models/Repetition');
const EventsHelper = require('./events');
const { CompaniDate } = require('./dates/companiDates');
const { FIELDS_NOT_APPLICABLE_TO_REPETITION } = require('./constants');
exports.updateRepetitions = async (eventPayload, parentId) ... |
import { Test, TestingModule } from '@nestjs/testing';
import { AsistenciaService } from './asistencia.service';
describe('AsistenciaService', () => {
let service: AsistenciaService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [AsistenciaService],
... |
#!/bin/sh
# shellcheck disable=SC2103
export CC=/usr/bin/gcc-10 &&
export CXX=/usr/bin/g++-10 &&
cd imageMagick &&
cat im7.10.tar.* > im7.10-linux-source.tar &&
tar xvf im7.10-linux-source.tar &&
cd ImageMagick-7.0.10 &&
./configure --with-quantum-depth=8 --enable-hdri=no --with-x=no --with-utilities=no &&
sudo make ... |
<filename>forge/dist/core/Search.d.ts<gh_stars>0
import { NamedPlugin } from "./NamedPlugin";
import { IForgePipeline } from "./ForgeTransform";
export declare class Search {
private globalPlugins;
constructor(globalPlugins: Array<NamedPlugin>);
/**
* Find a plugin from the perspective of a Transform
... |
<gh_stars>100-1000
#pragma once
#include "Core/Assembler.h"
int runFromCommandLine(const std::vector<std::wstring>& arguments, ArmipsArguments settings = {});
|
parallel --jobs 6 < ./results/exp_iterations/run-4/lustre_4n_6t_6d_1000f_617m_5i/jobs/jobs_n2.txt
|
<filename>swagger/src/main/java/io/swagger/oas/annotations/Hidden.java
package io.swagger.oas.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(value={ElementType.METHOD,ElementType.TYP... |
from django.urls import path
#from .views import HomePageView
from . import views
urlpatterns = [
# path('',views.login,name='login'),
path('register/', views.register, name = 'register'),
path('home/', views.student, name='student'),
path('home/courses', views.courses, name='courses'),
path('home/show_assignm... |
import { CATEGORY_ID, PROVIDE_CATEGORY_ID, PROVIDE_USER_ID, USER_ID } from '@example/constants';
import { article, IArticle } from '@example/services/article';
import createSliceState from './common/createSliceState';
export default createSliceState({
name: 'templateList',
initialState: [] as IArticle[],
reducer... |
# ex: set sts=4 ts=4 sw=4 noet:
# -*- coding: utf-8 -*-
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##... |
"""Module to run a basic decision tree model
Author(s):
<NAME> (<EMAIL>)
<NAME> (<EMAIL>)
"""
import logging
import datetime
from sklearn.base import is_classifier
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import f1_score
from sklearn.metrics import recall_score
from sklearn.metric... |
#!/usr/bin/env bash
LOOP_NUM=15 #default=64; >=8,<=128
CACHE_SIZE=1k
SNAP_SIZE=512
#IMAGE_FILE_NUM=3
#IMAGE_FILE_SIZE=512
mkdir -p /root/blocks
echo "creating a cache device for this computer node ..."
dd if=/dev/zero of=/root/blocks/cache.blk bs=1M count=$CACHE_SIZE
losetup -d /dev/loop0
losetup /dev/loop0 /root... |
URL="http://dict.youdao.com/fsearch"
PARAMS="&keyfrom=mac.main&client=macdict&le=eng"
PHONETIC_TAG_REGEX="<[/]*phonetic-symbol>"
PHONETIC_REGEX="$PHONETIC_TAG_REGEX.*$PHONETIC_TAG_REGEX"
CONTENT_TAG_REGEX="<[/]*content>"
CONTENT_REGEX="$CONTENT_TAG_REGEX.*$CONTENT_TAG_REGEX"
TRANS_REGEX="<[/]*trans>.*<[/]*trans>"
PLACE... |
#include <stdlib.h>
#include <stdio.h>
typedef struct S {
char* name;
int age;
} S;
S* newS(char* name, int age) {
S* ret = malloc(sizeof(S));
ret->name = name;
ret->age = age;
return ret;
}
void showS(S* s) {
printf("s->name : %s\n", s->name);
printf("s->age : %d\n", s->age);
}
|
import java.util.Random;
public class RandomNumberExample {
public static void main(String[] args) {
Random random = new Random();
for (int i = 0; i < 10; i++) {
System.out.println(random.nextInt());
}
}
} |
<reponame>Taher-Ghaleb/counter_culture
class SimpleReview < Review
counter_culture :product
end
|
<reponame>goldstar0415/Expo-AR-Game<filename>client/src/components/ScoreBadge.js
// @flow
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { Image, Text, View } from 'react-native';
import Assets from '../Assets';
export default class ScoreBadge extends PureComponent {
static... |
#!/usr/bin/env bash
# Copyright 2021 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 applicab... |
<reponame>tomekb530/tbot
module.exports = client =>{
new client.Event("ready",()=>{
client.log("Logged in!")
})
} |
#!/usr/bin/env bash
DATA_DIR="../../../data/thumos14/"
if [[ ! -d "${DATA_DIR}" ]]; then
echo "${DATA_DIR} does not exist. Creating";
mkdir -p ${DATA_DIR}
fi
cd ${DATA_DIR}
wget https://storage.googleapis.com/thumos14_files/TH14_validation_set_mp4.zip
wget https://storage.googleapis.com/thumos14_files/TH14_Test... |
<reponame>chenzhe555/wit
import HttpRequest from 'mp-cz-request';
export default class WXRequest extends HttpRequest {
} |
<reponame>guilhermemcardoso/FruitMap<gh_stars>1-10
import React, {useState} from 'react';
import {Switch} from 'react-native';
import {primaryLight} from '~/themes/index';
const NotificationSwitch = () => {
const [value, setValue] = useState(true);
return (
<Switch
value={value}
onValueChange={setV... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_assistant = void 0;
var ic_assistant = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0z",
"fill": "none"
},
"children": []
}, {
"name": "path",
"a... |
<gh_stars>1-10
package com.cannolicatfish.rankine.entities.goals;
import com.cannolicatfish.rankine.init.RankineTags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.pattern.BlockStateMatcher;
import net.minecraft.entity.MobEntity;
... |
void swap (int *x, int *y)
{
int temp;
temp = *x;
*x = *y;
*y = temp;
} |
<reponame>donjar/iidx-12
require 'test_helper'
class ChartsControllerTest < ActionDispatch::IntegrationTest
setup do
@chart = charts(:one)
end
test 'should get index' do
get charts_url
assert_response :success
end
test 'should get new' do
get new_chart_url
assert_response :success
end... |
#!/bin/sh
##############################################################################
## ##
## This is a template for writing Subversion bug reproduction scripts. ##
## ... |
<filename>src/main/java/com/vodafone/garage/dto/VehicleModel.java
package com.vodafone.garage.dto;
import lombok.*;
import javax.validation.constraints.NotNull;
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@Builder
public class VehicleModel {
@NotNull(message = "vehicleType can not be null.")
priva... |
<gh_stars>1-10
package net.community.chest.io.encode.qp;
import java.io.IOException;
import java.io.InputStream;
import net.community.chest.io.encode.hex.Hex;
import net.community.chest.io.input.InputStreamEmbedder;
/**
* Helper class that reads from a quoted-printable input stream and
* returns decoded data
* @a... |
import requests
from bs4 import BeautifulSoup
url = "http://www.imdb.com/search/title?count=10&sort=user_rating,desc"
page = requests.get(url)
soup = BeautifulSoup(page.content, 'html.parser')
title_list = soup.find_all('div', {'class': 'lister-item-content'})
for title in title_list:
# get title
movie_title ... |
package me.legit.api.game.igloo.decoration;
import com.google.api.core.ApiFuture;
import com.google.cloud.firestore.DocumentReference;
import com.google.cloud.firestore.DocumentSnapshot;
import com.google.cloud.firestore.Firestore;
import com.google.cloud.firestore.WriteResult;
import com.google.firebase.auth.Firebase... |
def label_classifier(attributes):
if attributes["height"] > 40 and attributes["length"] > 75 and attributes["weight"] > 10:
return "large"
elif attributes["height"] > 20 and attributes["length"] > 30 and attributes["weight"] > 1:
return "medium"
else:
return "small" |
#!/bin/bash
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='crowdcoin.conf'
CONFIGFOLDER='/root/.crowdcoinbrain'
COIN_DAEMON='crowdcoind'
COIN_VERSION='v2.0.0'
COIN_CLI='crowdcoin-cli'
COIN_PATH='/usr/local/bin/'
COIN_REPO='https://github.com/crowdcoinChain/Crowdcoin.git'
COIN_TGZ='https://github.com/crowdcoinChain/Crowdcoin/rel... |
#TCP server
import socket
# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Bind the socket to the port
server_address = ('localhost', 10000)
print('starting up on {} port {}'.format(*server_address))
sock.bind(server_address)
# Listen for incoming connections
sock.listen(1)
while ... |
MININIX_PKG_HOMEPAGE=https://developer.gnome.org/gdk-pixbuf/
MININIX_PKG_DESCRIPTION="Library for image loading and manipulation"
MININIX_PKG_VERSION=2.36.12
MININIX_PKG_SHA256=fff85cf48223ab60e3c3c8318e2087131b590fd6f1737e42cb3759a3b427a334
MININIX_PKG_SRCURL=ftp://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/${MININIX_... |
#!/bin/sh
if cmus-remote -Q | grep -q 'paused'
then
echo "paused";
else
cmus-remote -Q | grep 'file' | awk -F/ '{print $NF}';
fi
|
#!/bin/bash
#
# bash completion file for otto (https://ottoproject.io
#
# To enable the completions either:
# - place this file in /etc/bash_completion.d
# or
# - copy this file to e.g. ~/.otto-completion.sh and add the line
# below to your .bashrc after bash completion features are loaded
# . ~/.otto-complet... |
import xml.etree.ElementTree as ET
def parse_xml_data(xml_data: str, code: str) -> str:
root = ET.fromstring(xml_data)
if code == '0':
zpid = root.find('response/url/cdata').text
return zpid
else:
msg = root.find('message/text/cdata').text
return msg |
<filename>instrumentation/spring/src/test/java/org/glowroot/instrumentation/spring/ControllerIT.java
/*
* Copyright 2016-2019 the original author or 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 cop... |
using System.Activities;
public class FactorialActivity : CodeActivity
{
public InArgument<int> Number { get; set; }
public OutArgument<int> Result { get; set; }
protected override void Execute(CodeActivityContext context)
{
int number = Number.Get(context);
int result = CalculateFacto... |
import logging
class ApplicationLogger:
def __init__(self):
self.loggers = {}
self.queue_logger = logging.getLogger('kamma.queue')
def set_module_logging_level(self, module_name, logging_level):
logger = logging.getLogger(f'kamma.{module_name}')
logger.setLevel(logging_level)
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import {
Container,
Divider,
Button,
Icon
} from 'semantic-ui-react';
import {
selectYear,
fetchMeetsIfNeeded,
invalidateYear
} from '../actions';
import Picker from '../compo... |
package com.imooc.o2o.util;
public class PageCalculator {
public static int calculateRowIndex(int pageIndex,int pageSize){
return (pageIndex >0) ? (pageIndex -1) * pageSize :0;
}
}
|
#!/usr/bin/env bash
# Copyright (c) 2021, ARM Limited and Contributors. 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 notice, th... |
<reponame>dariosilva/spring-framework-5<gh_stars>0
package com.dams.services;
import com.dams.domain.Recipe;
import com.dams.repositories.RecipeRepository;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.util.HashSet;
import java.util.Set;
i... |
<gh_stars>1-10
package com.webapp.model;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
public class Message {
private String _username;
private String _content;
private Date _time;
private UUID _uuid;
private String _ago;
private static SimpleDateFormat form... |
echo "soc-Epinions1.edges.random_bipartite_matching.with_header.edge" > gpuTestDump
./a.out /home/workspace/inputs/shashi/random_bipartite_matching/soc-Epinions1.edges.random_bipartite_matching.with_header.edge >> gpuTestDump
echo "soc-LiveJournal1.txt.random_bipartite_matching.with_header.edge" >> gpuTestDump
./a.out ... |
package com.zero.retrowrapper.emulator.registry.handlers;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.commons.io.IOUtils;
import com.zero.retrowrapper.emulator.RetroEmulator;
import com.zero.retrowrap... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResourceInterfaceTransactionsActionEnum = void 0;
/**
* @export
* @enum {string}
*/
var ResourceInterfaceTransactionsActionEnum;
(function (ResourceInterfaceTransactionsActionEnum) {
ResourceInterfaceTransactionsActionE... |
void ApplyForce(Vector3 force)
{
Rigidbody rb = GetComponent<Rigidbody>();
if (rb != null)
{
switch (m_ForceMode)
{
case ForceMode.Force:
rb.AddForce(force, ForceMode.Force);
break;
case ForceMode.Acceleration:
rb.AddFor... |
#!/bin/bash
#$ -cwd
# error = Merged with joblog
#$ -o joblog.$JOB_ID
#$ -j y
#$ -pe shared 8
#$ -l arch=intel-E5-2670,exclusive,h_rt=24:00:00,h_data=3.5G
# Email address to notify
## $ -M $USER@mal
# Notify when:
#$ -m bea
#save job info on joblog:
echo "Job $JOB_ID started on: " `hostname -s`
echo "Job $JOB_ID st... |
#!/bin/bash
cd "$(dirname "$0")"
CLASSPATH=pf2_custom_rules.jar ./../pmd-bin-6.14.0/bin/run.sh pmd -no-cache -f text -d testsrc -R myrule.xml
|
<reponame>biotope/website
/**
* ## DEFINE ALL INTERFACES FOR BioModal
**/
/**
* Props
*/
interface BioModalProps {
openonpageload: Boolean;
}
/**
* State
*/
interface BioModalState {
open: Boolean;
}
/**
* Methods
*/
interface BioModalMethods {
}
export {
BioModalProps,
BioModalState,
BioMod... |
#!/bin/bash
pushd ..
if [ ! -d 'classes/Ac/Controller' ]; then mkdir -p classes/Ac/Controller; fi
if [ ! -d 'classes/Ac/Controller/Response' ]; then mkdir -p classes/Ac/Controller/Response; fi
if [ ! -d 'classes/Ac/Controller/Context' ]; then mkdir -p classes/Ac/Controller/Context; fi
if [ ! -d 'classes/Ac/Controller/O... |
/**
* 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... |
import random
import string
def random_string(length):
# get all characters
chars = string.ascii_lowercase + string.ascii_uppercase + string.digits
# generate string of given length
str = "".join(random.choice(chars) for i in range(length))
return str
# test
print(random_string(7))
Ou... |
#!/bin/sh
## renew certbot
certbot renew --noninteractive --nginx --agree-tos
# https://certbot.eff.org/docs/using.html#renewal ??
# certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
|
<filename>codeforces/0869/c.cc
// https://codeforces.com/contest/869/problem/C
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll M = 998244353;
const ll N = 5000;
ll p[N+1], inv[N+1], invp[N+1];
ll binomial(ll n, ll k, ll m) {
ll c = 1;
while (n||k) {
ll a = n%m, b = k%m;
if (a... |
<reponame>wuzzh/master_thesis_code<gh_stars>100-1000
"""
Generates precision/recall curves for the given detections and ground truth BBTXT files.
The script generates several files - a PDF plot, PNG plot and CSV files with the precision and
recall values, which were used to generate the curves.
-----------------------... |
<reponame>kevinoid/openapi-transformers
/**
* @copyright Copyright 2019-2021 <NAME> <<EMAIL>>
* @license MIT
* @module "openapi-transformers/escape-enum-values.js"
*/
import OpenApiTransformerBase from 'openapi-transformer-base';
const escapeStringSymbol = Symbol('escapeString');
function makeEscapeString(lang) ... |
require 'fog/core/model'
module Fog
module OracleCloud
class Java
class Instance < Fog::Model
identity :service_name, :aliases=>['name', 'serviceName']
attribute :created_by
attribute :auto_update
attribute :cluster_name, :aliases=>'clusterName'
attribute :c... |
package com.iluwatar.caching;
import java.text.ParseException;
import java.util.HashMap;
import org.bson.Document;
import com.mongodb.MongoClient;
import com.mongodb.client.FindIterable;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.UpdateOptions;
/**
*
* <p>DBManager handles the commun... |
<gh_stars>10-100
const vscode = require(`vscode`);
module.exports = () => {
const baseExtension = (vscode.extensions ? vscode.extensions.getExtension(`halcyontechltd.code-for-ibmi`) : undefined);
return (baseExtension && baseExtension.isActive && baseExtension.exports ? baseExtension.exports.instance : null);
} |
func isValidEmail(email: String) -> Bool {
let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
let emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
return emailTest.evaluate(with: email)
} |
<filename>src/quasar6/main/Field.java
package quasar6.main;
import java.util.*;
/**
* Utility class for the game field.
* The utility class pattern is chosen over singleton
* because of runtime concerns.
*/
public final class Field {
public static final String BEGINNER = "Beginner";
public static final S... |
/********************************************************************************************************
* @file flash.h
*
* @brief for TLSR chips
*
* @author BLE Group
* @date May. 12, 2018
*
* @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd.
* All rights reserved.
*
... |
function tryOr(callback, jsxExpression, defaultValue) {
try {
const result = callback();
return result ? jsxExpression : defaultValue;
} catch (error) {
return defaultValue;
}
}
// Example usage
const rule = { name: "John" };
const Hi = ({ children }) => <span>Hello, {children}!</span>;
const default... |
import Foundation
class UserManager {
var users = [User]()
func createUser(username: String, password: String) {
if !userExists(withUsername: username) {
let user = User(username: username, password: password)
users.append(user)
} else {
print("Username already exists")
}
}
func updatePassword(u... |
import numpy as np
def distance(a, b):
# This function is used to calculate the eucledian
# distance between two points a and b
return((np.sum((a - b)**2))**0.5)
def L2norm(vec):
# This function is used to calculate the L2 norm of the vector vec
vec = np.array(vec)
return((np.sum(vec**2))**0.5... |
#!/bin/bash
time valgrind --tool=cachegrind --dump-instr=yes --collect-jumps=yes $@
|
class ServicoNFSe:
def __init__(self, nome, endpoint, envio):
self.nome = nome
self.endpoint = endpoint
self.envio = envio
class ServiceRegistry:
def __init__(self):
self.services = {}
def register_service(self, nome, endpoint, envio):
service = ServicoNFSe(nome, en... |
package com.example.jinha.wlwlab.app;
public class Config {
public static String SMARTHOME_IP = "192.168.1.3";
public static int SMARTHOME_PORT = 8080;
public int frequency_315 = 1;
public int frequency_433 = 2;
public int frequency_Infrared = 3;
//影院模式
public byte MoiveCenter_on[] = {0x31... |
CREATE TABLE Employees (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
department VARCHAR(255),
salary INT
); |
python bigmap_9.py
python bigmap_10.py
python bigmap_11.py
python bigmap_12.py
python bigmap_13.py
python bigmap_14.py
python bigmap_15.py
python bigmap_16.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.