text stringlengths 1 1.05M |
|---|
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-s390"
TEXT_START_ADDR=0x00400000
MAXPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x00400000
ARCH="s390:31-bit"
MACHINE=
NOP=0x07070707
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
|
package com.designre.blog.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.designre.blog.model.dto.CategoryInfoDto;
import com.designre.blog.model.entity.Category;
import com.designre.blog.model.param.SaveCategoryParam;
import java.util.List;
public interface CategoryService extends IS... |
<filename>java/ql/test/library-tests/dependency-counts/Example.java
import java.util.Set;
import java.util.List;
public interface Example <A> extends Set<List<A>> {
public interface InnerExample extends Example<Set> {
}
}
|
#! /bin/bash
# Display system date and time
echo "Current date & time: $(date)"
# Display system information
echo "System: $(uname -a)"
# Display user information
echo "Logged in user: $(whoami)"
# Display cpu information
echo "CPU $(cat /proc/cpuinfo)"
# Display memory information
echo "Memory $(free -m)"
# Disp... |
import { AdapterContext } from '@chainlink/types'
import { getEnv, buildUrlPath, buildUrl, baseEnvDefaults } from '../../src/lib/util'
describe('utils', () => {
let oldEnv
beforeEach(() => {
oldEnv = process.env
})
afterEach(() => {
process.env = oldEnv
})
describe('getEnv', () => {
it('fetc... |
<filename>src/App.tsx
import './global.custom.scss';
import { useLocalStorageState, useMount } from 'ahooks';
import classNames from 'classnames';
import React from 'react';
import { connect } from 'react-redux';
import Footer from '@/components/Footer';
import Main from '@/components/Main';
import Nav from '@/compon... |
package managers;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.LinkedList;
import java.util.List;
import java.sql.PreparedStatement;
import model.Boss;
import model.Constants.DKPEventType;
i... |
#! /bin/bash
set -ex
# Get the height parameter from the command line argument.
height=${1-0}
addr=$(cat t1/8000/ag-cosmos-helper-address)
hex=$(ag-cosmos-helper keys parse $addr --output=json | jq -r '.bytes')
b64=$(echo $hex | xxd -r -p | base64 | tr '+/' '-_')
# echo $b64
# Query the bank balance of (potentially)... |
def update_production_schedule(values, workorder):
if 'date_planned_finished' in values:
planned_finish_date = values['date_planned_finished']
workorder.production_id.with_context(force_date=True).write({
'date_planned_finished': fields.Datetime.to_datetime(planned_finish_date)
}... |
def process_command(command):
if command == "start":
print("Starting the process")
elif command == "build":
print("Building the project")
else:
print("Error: Invalid command")
# Main program
while True:
user_input = input("Enter a command: ")
process_command(user_input) |
<filename>cmd/gocve/cli/list.go<gh_stars>1-10
// +build linux,amd64 darwin,amd64
package cli
import (
"fmt"
"log"
dbWrapper "github.com/jimmyislive/gocve/internal/pkg/db"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var listCmd = &cobra.Command{
Use: "list",
Short: "Lists all cve ids",
Long: `List... |
<filename>redis/src/test/java/org/grain/redis/RedisManagerTest.java
//package org.grain.redis;
//
//import static org.junit.Assert.assertEquals;
//
//import org.junit.BeforeClass;
//import org.junit.Test;
//
//public class RedisManagerTest {
//
// @BeforeClass
// public static void setUpBeforeClass() throws Exception {... |
<filename>public/assets/admin_asset/js/app/charts/easy-pie.js
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(... |
<filename>src/example-components/BlocksComposed/BlocksComposed3/index.js<gh_stars>0
import React, { useState } from 'react';
import clsx from 'clsx';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
Card,
CardContent,
Button,
Tooltip,
TextField
} from '@material-ui/core';
import P... |
if [[ $zabbix_username == "" ]] || [[ $zabbix_password == "" ]]; then
echo "Please set vars for zabbix_username and zabbix_password"
exit 1
fi
if [[ $local_network_ip == "" ]] || [[ $local_network_interface == "" ]] || [[ $zabbix_postgres_ip == "" ]]
then
echo "Please set vars for both local_network_ip and... |
/*
* 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 ... |
/**
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2020 Gothel Software e.K.
* Copyright (c) 2020 ZAFENA AB
*
* 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... |
/*
* Dit bestand is een onderdeel van AWV DistrictCenter.
* Copyright (c) AWV Agentschap <NAME>, <NAME>
*/
package be.vlaanderen.awv.atom.java;
import be.vlaanderen.awv.atom.Entry;
import be.vlaanderen.awv.atom.Feed;
import be.vlaanderen.awv.atom.Link;
import be.vlaanderen.awv.atom.Url;
import lombok.Data;
import ... |
import React, {useState} from 'react';
import {StyleSheet, View, Text, TextInput, Button} from 'react-native';
export default function App() {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const authenticate = async () => {
// code to authenticate user
};
return... |
<reponame>wojnosystems/vsql
//Copyright 2019 <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, me... |
package ml.cluster;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import ml.data.Attribute;
import ml.data.DataInstance;
public class KMeans {
public Random rng;
DistanceFunction distFn;
List<Cluster> clusters;
public KMeans(Distan... |
<gh_stars>0
import { ContainerModule } from 'inversify';
import { ProxyProvider } from './jsonrpc/proxy-provider';
import { ConnnectionFactory, ConnnectionFactoryImpl } from '../common/jsonrpc/connection-factory';
import { Dispatcher } from '../common/jsonrpc/dispatcher-protocol';
import { ServiceDispatcher } from './j... |
<gh_stars>0
#include <common.h>
#include <game.h>
#include <g3dhax.h>
#include <sfx.h>
const char* TMarcNameList [] = {
"topman",
NULL
};
class daTopman : public dEn_c {
int onCreate();
int onDelete();
int onExecute();
int onDraw();
mHeapAllocator_c allocator;
nw4r::g3d::ResFile resFile;
m3d::mdl_c bodyMo... |
<gh_stars>0
# frozen_string_literal: true
Sequel.migration do
up do
run 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp"'
create_table :events, id: false do
column :id, :uuid, index: true
column :data, :jsonb, default: "{}", index: {type: :gin}
String :type, index: true
DateTime :created_a... |
Model:
import tensorflow as tf
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
tokenizer = Tokenizer()
tokenizer.fit_on_texts(sentence_list)
word_index = tokenizer.word_index
# Create input sequences using list of tokens
input_sequences = []
... |
<!DOCTYPE html>
<html>
<head>
<title>Navigation</title>
</head>
<body>
<h1>Navigation</h1>
<div>
<a href="page1.html"><button>Page 1</button></a>
<a href="page2.html"><button>Page 2</button></a>
<a href="page3.html"><button>Page 3</button></a>
</div>
</body>
</html> |
<filename>src/logging/index.ts
export interface Logger {
debug(message: string): void;
info(message: string): void;
warn(message: string): void;
error(message: string): void;
}
export interface LoggerFactory {
(namespace?: string): Logger;
}
|
#!/bin/bash
mpirun -n 16 ./mpi_wordcount data-wordcount/in/
|
import os
import csv
import random
STORE_HEIGHT = int(os.getenv('STORE_HEIGHT', 10))
STORE_WIDTH = int(os.getenv('STORE_WIDTH', 6))
CUSTOMERS_AVERAGE_IN_STORE = int(os.getenv('CUSTOMERS_AVERAGE_IN_STORE', 6))
CUSTOMERS_LIST_FILE = os.getenv('CUSTOMERS_LIST_FILE', 'customers.csv')
def read_customer_list(file_name):
... |
#!/bin/bash
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use ... |
#!/bin/bash
cp ${RECIPE_DIR}/condabuildinfo.cmake .
mkdir -p build
cd build
${BUILD_PREFIX}/bin/cmake \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DIS_CONDA_BUILD=True \
-DCONDA_PREFIX=${CONDA_PREFIX} \
-DIS_PYTHON_BUILD=True \
-DPYTHON_TARGET_VERSION=${PY_VER} \
... |
/*
* Copyright 2022. http://devonline.academy
*
* 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... |
<reponame>mehdisamavat65/artfactory-frontend
import gql from "graphql-tag";
export const GET_ALL_USER_ADMIN = gql`
query {
getAllUserAdmin {
id
name
mobile
active
access {
admin
teacher
departemant
course
gallery
offer
website
... |
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")" \
&& . "../../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_in_purple "\n Trackpad & Mouse\n\n"
execute "defaults write -g com.apple.trackpad.scaling -int 5 && \
defaults write -g com.apple.mouse.scaling... |
#!/bin/bash
# Invocation: script.sh 'bucketname' '30 days ago'
# See more date input formats: https://www.gnu.org/software/coreutils/manual/html_node/date-invocation.html#date-invocation
aws s3 ls s3://$1 | while read -r line;
do
createDate=`echo $line|awk {'print $1" "$2'}`
createDate=`date -d"$createDate"... |
package net.ninjacat.omg.omql;
import net.ninjacat.omg.conditions.AlwaysTrueCondition;
import net.ninjacat.omg.conditions.Condition;
import net.ninjacat.omg.conditions.Conditions;
import net.ninjacat.omg.errors.OmqlParsingException;
import net.ninjacat.omg.errors.TypeConversionException;
import org.immutables.value.Va... |
#!/usr/bin/env bats
load ./common
@test "--container-mounts absolute directory" {
run_srun --container-mounts=/home:/test-mnt --container-image=ubuntu:18.04 findmnt /test-mnt
}
@test "--container-mounts regular file" {
run_srun --container-mounts="${BASH_SOURCE[0]}:/script.bats" --container-image=ubuntu:18.0... |
#!/usr/bin/env python
# file: tk-threaded.pyw
# vim:fileencoding=utf-8:fdm=marker:ft=python
#
# Copyright © 2022 <NAME> <<EMAIL>>
# SPDX-License-Identifier: MIT
# Created: 2022-02-02T21:40:48+0100
# Last modified: 2022-02-04T16:39:32+0100
"""Example tkinter script showing the use of a thread."""
import os
import sys
i... |
package db
import (
"context"
"net/http"
"strings"
"github.com/pkg/errors"
"github.com/uclaacm/teach-la-go-backend/httpext"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"cloud.google.com/go/firestore"
"github.com/labstack/echo/v4"
)
// User is a struct representation of a user document.
/... |
<reponame>Haarmees/azure-devops-intellij
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See License.txt in the project root.
package com.microsoft.alm.plugin.idea.tfvc.core.tfs;
import com.microsoft.alm.plugin.idea.IdeaAbstractTest;
import org.junit.Test;
import static org.junit.... |
#!/bin/bash
# Shell Checker
# Author: Arya Narotama (4WSec)
# Team: Anon Cyber Team - anoncyberteam.or.id
# Github: github.com/aryanrtm
# Instagram: instagram.com/aryanrtm_
# 07-2019 - 4WSec
# Date
time=$(date +%d_%m_%y)
# Color
GR='\033[92m'; # Green
YW='\033[93m'; # Yellow
RD='\033[91m'; # Red
NT='\033[97m'; # Ne... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { InviteFriendPageRoutingModule } from './invite-friend-routing.module';
import { InviteFriendPage } from './invite-friend.page'... |
require "rails_helper"
RSpec.describe MissingDataCalculator, type: :model do
describe "no data calculations" do
subject(:department_test) { FactoryGirl.build(:department) }
subject(:delivery_organistion_test) { FactoryGirl.build(:delivery_organistion, department: department_test) }
it "can calculate when... |
package clocktest_test
import (
"testing"
"time"
"github.com/stellar/go/support/clock"
"github.com/stellar/go/support/clock/clocktest"
"github.com/stretchr/testify/assert"
)
// TestNewFixed tests that the time returned from the fixed clocks Now()
// function is equal to the time given when creating the clock.
f... |
<filename>Practice/Intro-To-Java-8th-Ed-Daniel-Y.-Liang/Chapter-5/Chapter05P11/test/junit/SalesAmountRevisedTest.java
package junit;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
... |
#!/bin/bash
echo "Please enter a password:"
read password
if [ "$password" == "CorrectPassword" ]; then
echo "Access granted"
else
echo "Incorrect password"
fi |
<reponame>joaoferr/Aula-03-Modulo-02
import express from 'express';
import { promises } from 'fs';
import moment from 'moment';
const { writeFile, readFile } = promises;
import {
addGrade,
updateGrade,
deleteGrade,
findGrade,
sumGrade,
avgGrade,
sortGrade,
} from '../controllers/gradesControll... |
<gh_stars>1-10
import * as React from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import { compose } from 'redux';
import {
userIsNotLogged,
userIsLogged,
userDidNotAcceptTOS,
userDidNotConfirmSecurityNotice
} from 'modules/shared/checkAuth';
import { routes } from './constants';
impo... |
package com.hummer.core.jni;
public class JSStaticFunction {
String name;
JSCallAsFunction callback;
int attributes;
public JSStaticFunction(String name, JSCallAsFunction callback, int attributes){
this.name = name; this.callback = callback; this.attributes = attributes;
}
}
|
<reponame>jedesah/scrooge<filename>scrooge-linter/src/main/scala/com/twitter/scrooge/linter/Linter.scala
/*
* Copyright 2014 Twitter, 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... |
<reponame>Hannah-Abi/python-pro-21<gh_stars>0
# Write your solution here
g1 = int(input("Please type in the first number: "))
g2 = int(input("Please type in the another number: "))
if (g1 > g2):
print(f"The greater number was: {g1}")
elif (g1 < g2):
print(f"The greater number was: {g2}")
else:
print("The nu... |
// 1668. 트로피 진열
// 2020.03.29
// 탐색
#include<iostream>
#include<vector>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> height(n);
for (int i = 0; i < n; i++)
{
cin >> height[i];
}
// 트러피가 1개일때는 왼쪽 오른쪽 모두 1
if (n == 1)
{
cout << 1 << endl << 1 << end... |
<reponame>lykmapipo/bipsms<filename>src/FakeTransport/fixtures/log.js
'use strict';
//dependencies
var _ = require('lodash');
var { v4: uuidv4 } = require('uuid');
var moment = require('moment');
var randomNumber = require('random-number');
var sentDays = randomNumber({
min: -30,
max: -15
});
var doneDays = random... |
osascript -e 'display notification "Set up a No Internet block today" with title "Focus Time" sound name "Pop"'
|
TERMUX_PKG_HOMEPAGE=https://sourceforge.net/projects/gpg-crypter/
TERMUX_PKG_DESCRIPTION="A graphical front-end to GnuPG(GPG) using the GTK3 toolkit and libgpgme"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.4.1
TERMUX_PKG_REVISION=19
TERMUX_PKG_SRCURL=https://downloads.sourceforge.... |
import torch
def matrix_multiplication(A, B):
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
A = torch.tensor(A).to(device)
B = torch.tensor(B).to(device)
return torch.matmul(A, B).cpu().numpy() |
#!/bin/bash
set -euo pipefail
if [ ! -d node_modules ]; then
npm install
fi
npm run build
|
<reponame>smagill/opensphere-desktop
/**
* HUD GUI layout management.
*/
package io.opensphere.core.hud.framework.layout;
|
# requires gsutil (sudo snap install google-cloud-sdk)
#echo Downloading...
mkdir quickdraw_background quickdraw_evaluation
gsutil -m cp gs://quickdraw_dataset/full/simplified/*.ndjson quickdraw_background
echo Unpacking...
python rasterize.py quickdraw_background -n 1000
mv quickdraw_background/*.ndjson quickdraw_ev... |
#!/usr/bin/env bash
#
# Copyright (c) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
<filename>uvicore/support/str.py<gh_stars>10-100
import re
def ucbreakup(value: str):
"""Breakup words with by - _ or camel and uppercase first letter of each word stripping non alphanumeric"""
#dashes = re.compile('_|-')
delimiter = '_'
uppers = re.compile(r'(?<!^)(?=[A-Z])')
nonalphanumeric = re... |
#!/bin/sh
#
# Copyright (c) 2008 David Aguilar
#
test_description='git submodule sync
These tests exercise the "git submodule sync" subcommand.
'
. ./test-lib.sh
test_expect_success setup '
echo file >file &&
git add file &&
test_tick &&
git commit -m upstream &&
git clone . super &&
git clone super submodule... |
/**
* percentage between two numbers
*/
import util from "../util";
function percent(input, divided, round) {
let divider = util.isString(input) ? Number(input) : input;
divided = divided || 100;
round = round || false;
if (!util.isNumber(divider) || isNaN(divider)) return input;
return round
? Math.... |
<reponame>shin-kinoshita/dbflute-core<gh_stars>0
/*
* Copyright 2014-2018 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 copy of the License at
*
* http://www.apache.org/... |
#!/usr/bin/env bats
@test "go version" {
run bash -c "docker exec di-circleci-infra-image-slim-edge go version"
[[ "${output}" =~ "1.16.5" ]]
}
@test "rust version" {
run bash -c "docker exec di-circleci-infra-image-slim-edge rustc --version"
[[ "${output}" =~ "1.53.0" ]]
}
@test "python3 version" {
run ba... |
#!/usr/bin/env bash
NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); }
while true; do
get_total_updates
# notify user of updates
if hash notify-send &>/dev/null; then
if (( UPDATES > 50 )); then
... |
#!/bin/bash
rm -fR .clone_defs 2> /dev/null
mkdir .clone_defs
cd .clone_defs
git init
git remote add origin -f git@github.com:rive-app/rive.git
git config core.sparseCheckout true
echo '/dev/defs/*' > .git/info/sparse-checkout
git pull origin master
rm -fR ../defs
mv dev/defs ../
cd ..
rm -fR .clone_defs |
import { Resolver, Query, Mutation, Args, Int } from '@nestjs/graphql';
import { GameService } from './game.service';
import { Game } from './entities/game.entity';
import { CreateGameInput } from './dto/create-game.input';
import { UpdateGameInput } from './dto/update-game.input';
@Resolver(() => Game)
export class G... |
import Joi from 'joi';
export declare const ModelSchema: Joi.ObjectSchema<any>;
|
#! /bin/bash
#
# must be run after base-notebook.sh
# may be run before or after scipy-notebook.sh
#
# This is just a shell script version of
# https://github.com/jupyter/docker-stacks/blob/master/r-notebook/Dockerfile
#
# We are blindly assuming the needed Linux distro packages are already installed, such as:
... |
package knokko.container;
import java.util.ArrayList;
import knokko.main.HyperCombat;
import knokko.recipes.RecipesIngotEnchanter;
import knokko.slots.SlotBattery;
import knokko.slots.SlotOutputIngotEnchanter;
import knokko.tileentity.TileEntityIngotEnchanter;
import net.minecraft.entity.player.EntityPlayer;
import n... |
module xor_and_module (input [7:0] a, input [7:0] b, output [7:0] c);
reg [7:0] temp0, temp1;
always@(*)
begin
temp0 = a ^ b;
temp1 = a & b;
c = temp0 & temp1;
end
endmodule |
<filename>src/service/WishListService.java
package service;
import domain.Product;
import domain.WishList;
import mapper.WishListMapper;
import utility.UnitOfWork;
public class WishListService {
private WishListMapper wishListMapper = new WishListMapper();
public void createWishList(WishList wishList) {
UnitOfW... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS users(
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
created_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
name VARCHAR(100) NOT NULL,
about VARCHAR NOT NULL
); |
# lottery_b4705a5d67c5507773016a2bbd2440ca
python3 open_lth.py lottery --num_workers 4 --default_hparams=mnist_lenet_300_100 --model_name mnist_lenet_300_300_100 --level=16 --replicate=$replicate
# lottery_e6ed6df2d24f7195508e3b6699972146
python3 open_lth.py lottery --num_workers 4 --default_hparams=mnist_lenet... |
<reponame>zhuofdeng/advent-of-code-2021
export class BingoBoard {
private numbers: string[][] = [];
private won = false;
constructor(input: string) {
const rows = input.split('\n');
rows.forEach((row, index) => {
this.numbers[index] = row.split(' ');
this.numbers... |
<filename>server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/CtlController.java
/*
* Copyright 2014-2016 CyberVision, 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 ... |
# frozen_string_literal: true
git File.join(Chef::Config['file_cache_path'], 'unco') do
repository node['unco']['repo']
reference node['unco']['ref']
action :sync
end
execute 'install unco' do
cwd File.join(Chef::Config['file_cache_path'], 'unco')
command <<-COMMAND
cmake -DCMAKE_INSTALL_PREFIX=#{node['... |
<reponame>alterem/smartCityService
package com.zhcs.utils.mail;
import java.util.Date;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transpor... |
def get_view_function(url_pattern: str) -> str:
urlpatterns = [
('auth/$', 'gchatautorespond.apps.autorespond.views.auth_view'),
('oauth2callback/$', 'gchatautorespond.apps.autorespond.views.auth_return_view'),
('worker_status/$', 'gchatautorespond.apps.autorespond.views.worker_status_view')... |
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
describe "Kernel#trace_var" do
before :each do
$Kernel_trace_var_global = nil
end
after :each do
untrace_var :$Kernel_trace_var_global
$Kernel_trace_var_global = nil
$Kernel_trac... |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="8a_scraper",
version="0.0.2",
author="<NAME>",
author_email="<EMAIL>",
license="MIT",
description="A Python client for scraping data from 8a.nu",
long_description=long_description,... |
public class CustomDataStructure {
private Set<Integer> set;
public CustomDataStructure() {
set = new HashSet<>();
}
public void add(int x) {
set.add(x);
}
public void remove(int x) {
set.remove(x);
}
public boolean contains(int x) {
return set.contain... |
<gh_stars>0
package io.sumac.devtools.propertyresolver.annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Retention(RUNTIME)
@Target({ FIELD, METHOD, PARAMETER })
public... |
function generateWeightedList(list) {
// Create a result array
const result = [];
// Store total weights sum
let sum = 0;
// Iterate over the given list
for (let i = 0; i < list.length; i++) {
// Generate a random number
const randomNum = Math.random();
// Calculate the partial sum
sum += randomNum;
// A... |
/**
* Copyright 2016 <NAME>
* <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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed... |
import org.springframework.context.annotation.Configuration
import org.springframework.boot.web.servlet.ServletRegistrationBean
import org.springframework.context.annotation.Bean
import org.h2.server.web.WebServlet
@Configuration
class H2Config {
@Bean
def h2servletRegistration(): ServletRegistrationBean = {
... |
const React = require('react');
const {
Button,
Modal,
Divider,
Dialog,
Drawer,
Space,
Dropdown,
Menu,
Layout,
Icon,
Link,
} = require('antd');
require('antd/dist/antd.css');
const { Header, Footer, Sider, Content } = Layout;
class Home extends React.Component {
const... |
<filename>testdata/flow/flow.c
#include <stdio.h>
int main() {
int a = sizeof(1);
int *b = &a;
switch (a) {
case 4:
printf("sizeof(int) == 4\n");
break;
case 8:
printf("sizeof(int) == 8\n");
break;
case 0:
case 1:
default:
printf("sizeof(int) == u... |
package com.wxh.sdk.http;
import com.google.gson.Gson;
import com.orhanobut.logger.Logger;
import com.wxh.sdk.des3.AESUtils;
import com.wxh.sdk.httputils.HttpResponse;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.builder.GetBuilder;
import com.zhy.http.okhttp.builder.PostFormBuilder;
import com.z... |
chmod +x mvnw
./mvnw clean package -Pnative -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime=docker
docker rmi quay.io/qiotcovid19/edge-sensors-emulator:2.0.0-alpha-x86_64 --force
docker build -f src/main/docker/Dockerfile.native -t quay.io/qiotcovid19/edge-sensors-emulator:2.0.0-alpha-x86_64 .
... |
<reponame>yinfuquan/spring-boot-examples
package com.yin.springboot.mybatis.server;
import com.yin.springboot.mybatis.domain.UmsMemberReceiveAddress;
import java.util.List;
public interface UmsMemberReceiveAddressService{
int deleteByPrimaryKey(Long id);
int insert(UmsMemberReceiveAddress record);
int ... |
#/bin/bash
sudo apt update -y
sudo apt upgrade -y
sudo apt-get clean -y
sudo apt-get autoremove -y
#SAMBA
sudo apt-get install -y samba samba-common-bin # требует одно подтверждение при установке (Yes/No), по-умолчанию выбрано то что нужно (No)
sudo cp /etc/samba/smb.conf /etc/samba/smb.confbackup
sudo rm /etc/samba/... |
"""
xy and xyz classes
part of hwpy: an OO hardware interface library
home: https://www.github.com/wovo/hwpy
"""
from hwpy_modules.wait import *
import copy
# ===========================================================================
#
# xy class
#
# ================================================================... |
package org.example;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.ni... |
require 'timeout'
class MockSocket
TIMEOUT = 1
def self.pipe
socket1, socket2 = new, new
socket1.in, socket2.out = IO.pipe
socket2.in, socket1.out = IO.pipe
[socket1, socket2]
end
attr_accessor :in, :out
def puts(m) @out.puts(m) end
def print(m) @out.print(m) end
def gets
timeout... |
#!/bin/bash
set -eo pipefail
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
PROJECT_DIR=$1
shift
"$@" ./src/play/play \
OREMOA_ \
"${SCRIPT_DIR}/tiles.txt" \
"${PROJECT_DIR}/boards/wwf_challenge.txt"
|
package edu.uwp.appfactory.racinezoo.EventScreen;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.preference.Pr... |
<filename>source/NuGet/_shared/content/Scripts/_config.js
_.templateSettings = { interpolate: /\{\{(.+?)\}\}/g }; |
<filename>src/main/java/com/github/thomasj/springcache/ext/juc/LinkedHashMapEx.java
package com.github.thomasj.springcache.ext.juc;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.DelayQueue;
import java.util.concurrent.TimeUnit;
import com.google.common.collect.Maps;
import lombok.S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.