text stringlengths 1 1.05M |
|---|
package fr.calamus.common.mail.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class ListeDestinataires implements Serializable {
private static final long serialVersionUID = 3888626294977279852L;
protected List<IDestinataireMap> liste;
protected static String colId;
... |
def to_compact_text(error):
return f"{error['severity']}|{error['type']}|{error['loc']['file']}|{error['loc']['startLine']}|{error['loc']['startColumn']}|{error['message']}"
# Test the function with the provided example
error = {
'severity': 'error',
'type': 'syntax',
'loc': {
'file': 'script.p... |
<gh_stars>100-1000
/* global $, _, crossfilter, d3 */
(function(nbviz) {
'use strict';
nbviz.updateList = function(data) {
var rows, cells;
// Sort the winners' data by year
var data = data.sort(function(a, b) {
return +b.year - +a.year;
});
// Bind our winners' data to the table rows... |
const express = require('express');
const session = require('express-session');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
app.use(session({
secret: 'secret-key',
resave: false,
saveUninitialized: false,
}));
let users = [];
app.post('/register', (req, res) => {
... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
class Main {
public static void main(String[] args) throws IOException {
final var COUNT = 5;
final var FILE = Paths.get("/fixtures/samp... |
def binary_search(arr, target):
left = 0
right = len(arr)-1
mid = left + (right - left)//2
while left <= right:
if arr[mid] == target:
return mid
elif arr[mid] < target:
left = mid + 1
else:
right = mid - 1
mid = left + (right - lef... |
<gh_stars>0
import fs = require('fs');
module.exports = class Cache {
private static cache: any = {};
private static logger;
public static setLogger(logger: any) {
this.logger = logger;
}
public static get(key: any) {
if (Cache.cache[key] !== undefined) {
const cache... |
// ensure service workers are supported
if (navigator.serviceWorker) {
window.addEventListener('load', () => {
navigator.serviceWorker
.register('sw_cached_site.js')
.then(reg => console.log('Service Worker: Registered'))
.catch(err => console.error(`Service Worker: Error: ${err}`))
})
} |
#!/usr/bin/env bash
###############################################################################
# Copyright 2017 The Apollo Authors. 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... |
<filename>src/main/java/org/olat/course/run/preview/PreviewSettingsForm.java
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <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 ... |
#!/bin/sh
#复制文件
copyFile(){
local src=$1
local dir=$2
local name=$3
if [ ! -d $dir ]
then
mkdir -p $dir
fi
cp "$src" "$dir/$name"
}
#检查数组包含
containStr(){
arr=$1
for str in ${arr[@]}
do
if [ "$str" = "$2" ]
then
return 1
fi
do... |
function fibonacci(n) {
if (n <= 1) {
return n;
}
var cache = [0, 1];
for (var i = 2; i <= n; i++) {
var prev = cache[i -1];
var current = cache[i - 2];
cache.push(prev + current);
}
return cache[n];
} |
<filename>client/app/iplb/sslCertificate/iplb-ssl-certificate.service.js
class IpLoadBalancerSslCertificateService {
constructor ($q, OvhApiIpLoadBalancing, ServiceHelper) {
this.$q = $q;
this.ServiceHelper = ServiceHelper;
this.Ssl = OvhApiIpLoadBalancing.Ssl().Lexi();
}
getCertifi... |
<gh_stars>1-10
"""Tests for kernel connection utilities"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import json
import os
import re
import stat
import tempfile
import shutil
from traitlets.config import Config
from jupyter_core.application import JupyterApp... |
export const USER_FETCH_REQUESTED = '@task/USER_FETCH_REQUESTED'
export const USER_FETCH_FAILED = '@task/USER_FETCH_FAILED'
export const ADD_TASK = '@task/ADD_TASK'
export const REMOVE_TASK_BY_ID = '@task/REMOVE_TASK_BY_ID'
|
<filename>src/ex3_js-objects-part1/task-01.js
const student = {};
student.name = 'Stas';
student.surname = 'Mishin';
student.age = 25;
student.access = true;
delete student.surname;
module.exports = student;
|
import matplotlib.pyplot as plt
def add_color_bar(fig, color_generator, label):
# Add colour bar
cbaxes = fig.add_axes([0.65, 0.42, 0.01, 0.43]) # [left, bottom, width, height]
color_generator.set_array([0, 0]) # array here just needs to be something iterable – norm and cmap are inherited
# from colo... |
<reponame>Gesserok/Market<filename>AntonBabunin/src/main/java/ua/artcode/market/controllers/IReportImpl.java
package ua.artcode.market.controllers;
import ua.artcode.market.exclude.exception.NullArgumentException;
import ua.artcode.market.interfaces.IAppDb;
import ua.artcode.market.interfaces.IReport;
import ua.artcod... |
<reponame>Gesserok/Market
package ua.artcode.market.controller;
import org.junit.Before;
import org.junit.Test;
import ua.artcode.market.models.Bill;
import ua.artcode.market.models.Product;
import static org.junit.Assert.*;
/**
* Created by serhii on 19.11.17.
*/
public class ITerminalControllerTest {
privat... |
<reponame>phosphor-icons/phosphr-webcomponents
/* GENERATED FILE */
import { html, svg, define } from "hybrids";
const PhAirplane = {
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
render: ({ color, size, weight, mirrored }) => html`
<svg
xmlns="http://www.w3.org/2000/svg"
... |
import os
def read_file(path):
lines = []
with open(path, "r", encoding="utf-8") as f:
lines = f.readlines()
lines = [ln.strip(os.linesep) for ln in lines]
return lines
def write_file(path, rows, separator="\t"):
with open(path, "wb") as outfile:
for row in rows:
... |
/*
* Copyright (c) 2013 Red Rainbow IT Solutions GmbH, Germany
*
* 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, c... |
#
# Copyright (C) 2010 OpenWrt.org
#
PART_NAME=firmware
platform_check_image() {
local board=$(board_name)
local magic="$(get_magic_long "$1")"
[ "$#" -gt 1 ] && return 1
case "$board" in
3g150b|\
3g300m|\
a5-v11|\
ai-br100|\
air3gii|\
alfa-network,ac1200rm|\
alfa-network,awusfree1|\
all0239-3g|\
all02... |
#
# Author:: Nagalakshmi <<EMAIL>>
# Cookbook Name:: nrpe
# Attributes:: default
#
# Copyright 2015, Cloudenablers
#
# All rights reserved. Do not redistribute.
#
# nrpe package options
default['nrpe']['package']['options'] = nil
default['nrpe']['install_method'] = 'source'
# nrpe daemon user/group
default['nrpe']... |
#!/bin/sh
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
TNAME=`basename $0 .sh`
RTOL=$1
ATOL=$2
#======================================================================... |
class InsufficientFundsError(Exception):
pass
class InvalidRecipientError(Exception):
pass
class User:
def __init__(self, username, public_key):
self.username = username
self.public_key = public_key
class Coin:
def __init__(self, user):
self.coin = {user.public_key: 100} # In... |
#!/bin/bash
#版本信息
build_date="20200307"
build_version="v1.0.0"
#当前时间 格式:2020-03-12 14:36:31
NOW_DATE=$(date "+%Y-%m-%d %H:%M:%S")
#当前时间
echo "=========== $(date) ==========="
#定义字体颜色
color_black_start="\033[30m"
color_red_start="\033[31m"
color_green_start="\033[32m"
color_yellow_start="\033[33m"
color_blue_start="... |
# Copyright 2020 TWO SIGMA OPEN SOURCE, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
# The Book of Ruby - http://www.sapphiresteel.com
require( "testmod.rb" )
|
package io.github.rcarlosdasilva.weixin.core.cache.storage.redis;
import org.springframework.data.redis.core.RedisTemplate;
import io.github.rcarlosdasilva.weixin.core.Registry;
import io.github.rcarlosdasilva.weixin.core.exception.RedisCacheNotInitializeException;
import io.github.rcarlosdasilva.weixin.core.setting.... |
<filename>frontend/src/mixins/FieldMixin.js
import { camelCase } from 'lodash-es';
import { getId, getName, attributesTable } from '@utils/helpers';
import FieldInstructions from '@components/inputs/includes/FieldInstructions.vue';
import FieldLabel from '@components/inputs/includes/FieldLabel.vue';
export default {... |
<reponame>humorliang/bc-cms
package main
import (
"flag"
"github.com/gin-gonic/gin"
"com/setting"
"com/gmysql"
"routers"
"middlerware"
"strconv"
"fmt"
)
func main() {
var mode = flag.String("mode", "dev", "this is run mode options")
//命令行解析 mode为*string
flag.Parse()
//配置文件初始化
setting.SetUp(mode)
//设置模... |
#!/usr/bin/env bash
IP=ocp.datr.eu
USER=justin
PROJECT=tekton-example
oc login https://${IP}:8443 -u $USER
oc delete project $PROJECT
oc new-project $PROJECT 2> /dev/null
while [ $? \> 0 ]; do
sleep 1
printf "."
oc new-project $PROJECT 2> /dev/null
done
#oc apply -f git_resource.yaml
#
#oc apply -f image_r... |
#!/bin/bash
function check_text_in_log {
EXPECTED_TEXT=$1
EXPECTED_COUNT=${2:-1}
echo "Checking log for '${EXPECTED_TEXT}'"
EXPECTED_TEXT_COUNT=$(grep "${EXPECTED_TEXT}" ${OUTPUT_LOG_FILE} | wc -l)
if [ ${EXPECTED_TEXT_COUNT} -ne ${EXPECTED_COUNT} ]; then
echo "Unexpected count of '${EXPECT... |
<filename>C2CRIBuildDir/projects/C2C-RI/src/RIGUI/src/org/fhwa/c2cri/gui/ConfigFileTableModel.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.fhwa.c2cri.gui;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import j... |
package cn.stylefeng.guns.onlineaccess.modular.mapper;
import cn.stylefeng.guns.onlineaccess.modular.entity.DataType;
import cn.stylefeng.guns.onlineaccess.modular.result.DataTypeResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import or... |
package family.service;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
* This class was generated by Apache CXF 3.2.4
* 2018-05-1... |
#!/bin/bash
#
# Copyright (c) 2019-2021, NVIDIA CORPORATION. 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... |
module Typus
VERSION = "0.9.40"
end
|
<filename>src/icons/legacy/LogoAds.tsx
// Generated by script, don't edit it please.
import createSvgIcon from '../../createSvgIcon';
import LogoAdsSvg from '@rsuite/icon-font/lib/legacy/LogoAds';
const LogoAds = createSvgIcon({
as: LogoAdsSvg,
ariaLabel: 'logo ads',
category: 'legacy',
displayName: 'LogoAds'
... |
package io.opensphere.myplaces.editor.model;
import java.awt.Color;
import java.awt.Font;
import de.micromata.opengis.kml.v_2_2_0.ExtendedData;
import de.micromata.opengis.kml.v_2_2_0.Placemark;
import io.opensphere.core.util.ValidationStatus;
import io.opensphere.core.util.swing.FontWrapper;
import io.opensphere.cor... |
import React from 'react';
import { Route, Redirect } from 'react-router-dom';
import cookie from '../libs/cookie/client';
export default class Protected extends React.Component<any,any> {
redirectUrl = '/login';
constructor(props: any) {
super(props);
this.state = {
initialized: false,
allow:... |
def is_prime(num):
#handle edge case when num is 1
if num == 1:
return False
#check every number from 2 to n-1 to see if its a factor
for i in range(2,num):
if num % i == 0:
return False
#if we don't find any factor, then num is prime
return True |
package chylex.hee.world.feature.stronghold.rooms.decorative;
import java.util.Random;
import net.minecraft.init.Blocks;
import chylex.hee.system.abstractions.Meta;
import chylex.hee.system.abstractions.Pos.PosMutable;
import chylex.hee.system.abstractions.facing.Facing4;
import chylex.hee.world.feature.stronghold.room... |
from ...Core.commands import Commands
def object_val_def(compiler, node):
value_type = node.value.compile_asm(compiler)
prop_var = compiler.environment.add_local_var(value_type, node.name.name, object_namespace=compiler.environment.object_list[-1][0])
compiler.code.add(Commands.POP, prop_var)
|
#!/bin/bash
RESOURCES=$(echo "deploy/neutron-server" \
"ds/nova-compute-default" \
"job/neutron-db-init" \
"job/neutron-db-sync")
NAMESPACE=${NAMESPACE:-openstack}
mkdir resources
pushd resources
for resource in $RESOURCES; do... |
<reponame>smagill/opensphere-desktop
package io.opensphere.core.pipeline.processor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.Reentr... |
export CODAR_CHEETAH_EXPERIMENT_DIR="/gpfs/alpine/csc299/proj-shared/iyakushin/test_cs/1/local/iyakushin"
export CODAR_CHEETAH_MACHINE_CONFIG="/autofs/nccs-svm1_home1/iyakushin/.conda/envs/Test10/lib/python3.8/site-packages/cheetah-0.5.1-py3.8.egg/codar/cheetah/data/machine_config/local/submit-env.sh"
export CODAR_CHE... |
<gh_stars>1-10
package discovery
import (
"errors"
"net/http"
"net/http/httptest"
"testing"
"github.com/paulormart/assert"
)
func TestNewConsulDefault(t *testing.T) {
cd := newConsulDefault()
assert.Equal(t, "localhost:8500", cd.cfg.Addr)
assert.Equal(t, "http://localhost:8500", cd.cfg.URL())
assert.Equal(t... |
export const environment = {
production: false,
api_url: 'http://192.168.127.12:81/api/',
host_url: 'http://192.168.127.12:81',
apiKey: '<KEY>',
};
|
<reponame>baart1989/gatsby-starter-elemental
import React from "react"
import { useStaticQuery, graphql, Link } from "gatsby"
import { Logo } from "./utils"
import Navlinks from "./navigation-list"
export default function() {
const query = useStaticQuery(graphql`
query {
site {
... |
#!/bin/bash
sed $'s/,/\\\n/g' <names.csv >names.txt
sed -i '' 's/\"//g' names.txt
|
function akill() {
adb shell ps | grep $1 | grep -Eo " [0-9]+ " | head -1 | xargs adb shell kill
}
function javaDiff() { diff <(git diff "$@" -G "^import ") <(git diff "$@") | sed "s/^> //" | vim - }
|
#!/bin/bash -e
. /var/cache/build/packages-manual/common.sh
# Install R packages.
#d XXX: This is unverifiable and thus may compromise the whole image.
# XXX: Use notary (https://github.com/ropenscilabs/notary) when ready.
sed -e 's/^#.*$//g' -e '/^$/d' /var/cache/build/packages-r.txt | \
Rscript --slave --no-sav... |
<reponame>despo/apply-for-teacher-training
module SupportInterface
class ProviderUsersFilter
attr_reader :applied_filters
def initialize(params:)
@applied_filters = params
end
def filters
[
{
type: :checkboxes,
heading: 'Use of service',
name: 'use_o... |
#ifndef STRING_UTILITIES_H
#define STRING_UTILITIES_H
#include <string>
#include <vector>
#include <iostream>
std::string characterToString(char ch);
int toInt(const std::string & str);
double toDouble(const std::string & str);
std::string escapeUnderscore(const std::string & str);
std::string toString... |
function celToFah(arr) {
let result = [];
for (let temp of arr) {
let fah = (temp * 9/5) + 32;
result.push(fah);
}
return result;
}
let celsiusArray = [28, 15, -2];
let fahrenheitArray = celToFah(celsiusArray);
console.log(fahrenheitArray); |
<filename>translations/strings/security/zh.ts
export const zh = {
'security': {
/**
* Rooted device warning screen
*/
'modified-device': '设备已改良',
'modified-device-subtitle': '您正在使用的是已ROOT过的设备或越狱设备。',
'modified-device-intro1': '这对您的助记词和密码存在安全风险,并可能危及您的资金... |
#!/bin/bash
echo "/gen/challenge"
echo "/gen/libc.so" |
import React from 'react';
export interface IconUsersProps extends React.SVGAttributes<SVGElement> {
color?: string;
size?: string | number;
className?: string;
style?: React.CSSProperties;
}
export const IconUsers: React.SFC<IconUsersProps> = (
props: IconUsersProps
): React.ReactElement => {
const { col... |
import tensorflow as tf
from tensorflow.keras.layers import *
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam
# Create the model
inputs = Input(shape=(256, 256, 3))
conv1 = Conv2D(64, (3,3), activation="relu", padding="same")(inputs)
conv2 = Conv2D(64, (3,3), activation="relu", p... |
#!/bin/bash
# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
package goscope
import (
"fmt"
"net/http"
"os"
"strings"
"github.com/gin-gonic/gin"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/host"
"github.com/shirou/gopsutil/mem"
)
func getAppName(c *gin.Context) {
c.Header("Access-Control-Allow-Origin", "*")
c.JSON(... |
package y2020.day11
import org.scalatest.flatspec.AnyFlatSpec
class SeatingSystemSpec extends AnyFlatSpec{
val ferry = new Ferry("y2020/11_test.txt")
val ferry2 = new Ferry("y2020/11_test.txt")
ferry.relax
ferry2.relax2
"Ferry with simple seating rules" should "have 37 occupied seats" in {
assert(ferry... |
/*
* 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 thi... |
/*
* Copyright (c) Open Source Strategies, Inc.
*
* Opentaps is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Opentap... |
import path from 'path';
async function loadModules(modulePaths) {
const results = {};
for (const modulePath of modulePaths) {
const moduleName = path.basename(modulePath, '.js');
const module = require(modulePath);
if (moduleName.includes('sendMsgToAll')) {
results[moduleName] = await module.s... |
#!/bin/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 "License"); you ... |
#!/bin/bash
# Sets up a venv suitable for running samples.
# Recommend getting default 'python' to be python 3. For example on Debian:
# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
# Or launch with python=/some/path
TD="$(cd $(dirname $0) && pwd)"
VENV_DIR="$TD/iree-samples.venv"
if [... |
#!/bin/sh
DOTFILES_BOOTSTRAP=false . ./bootstrap.sh
package="git"
# TODO: should we overwrite system git on macOS?
install_packages_if_necessary "${package}" || die "Installing ${package} failed"
source_config_dir="$DOTFILES_DIR/config/$package"
# TODO: rely on $HOME being set?
# TODO: support XDG...
dest_config_di... |
<filename>C2CRIBuildDir/projects/C2C-RI/src/jameleon-test-suite-3_3-RC1-C2CRI/jameleon-core/src/java/net/sf/jameleon/reporting/AbstractTestRunReporter.java<gh_stars>0
/*
Jameleon - An automation testing tool..
Copyright (C) 2007 <NAME> (<EMAIL>)
This library is free software; you can redistribute it and/or... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
def get_room_details(buildings_data, room_id):
for building in buildings_data["buildings"]:
for room in building["rooms"]:
if room["id"] == room_id:
details = {
"Window": room["window"],
"Door": room["door"],
"AC": room[... |
#! /bin/bash
ANSWER=0
if [[ $1 =~ force-* ]]; then FORCED=1; else FORCED=0; fi
if [ -d "/usr/local/include/eosio" ] || [ -d "$HOME/opt/eosio" ] || [ $FORCED == 1 ]; then # use force for running the script directly
printf "\nEOSIO installation (AND DEPENDENCIES) already found...\n"
if [ $1 == 0 ]; then
read ... |
def shortest_path(start, end):
# create the graph
graph = createGraph(matrix)
# find all possible paths
paths = findAllPaths(start, end, graph)
# find the shortest
shortest = reduce(lambda a, b: a if len(a)< len(b) else b, paths)
# returning the shortest path
return short... |
<filename>src/main/java/org/olat/course/nodes/sp/SPPeekviewController.java
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <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 th... |
The first snippet is more efficient than the second snippet because it uses a for loop, which allows the loop counter (i) to be initialized, tested, and updated in a single statement. In the second snippet, the counter has to be manually incremented each time through the loop, and that requires an extra statement, whic... |
<filename>pirates/piratesgui/LootPopupPanel.py<gh_stars>1-10
# File: L (Python 2.4)
from direct.showbase import DirectObject
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from pirates.piratesbase import PLocalizer
from pirates.piratesbase import Freebooter
from pirates.piratesgui import PiratesG... |
app.get('/users', (req, res) => {
try {
const users = db.getUsers();
res.send(users);
} catch (err) {
console.error(err);
res.status(500).send({error: 'Internal Server Error'});
}
}); |
/**
* Copyright 2020 <NAME>.
*
* 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 writ... |
__all__ = [
"IPAnylast",
]
|
package pl.gda.pg.eti.kio.malicious.event;
import pl.gda.pg.eti.kio.malicious.entity.BaseMalice;
/*
* 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.
*/
/**
*
* @author szkol_000
*/
pub... |
<filename>PeshOS.Poll/scripts/peshos.poll.edit.js
"use strict";
var PeshOS = PeshOS || {};
PeshOS.Poll = PeshOS.Poll || {};
PeshOS.Poll.Edit = (function () {
var resources = PeshOS.Poll.Resources.getLocaleStrings(),
PreviewButtonsModel = function () {
var self = this;
self.sa... |
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
for {
fmt.Print("Enter command: ")
if scanner.Scan() {
command := scanner.Text()
if command == "quit" {
break
}
fmt.Println("\nYou entered: " + command)
}
}
} |
<gh_stars>0
package provider
import (
"errors"
"k8s.io/apimachinery/pkg/util/wait"
"sync"
"time"
"github.com/lterrac/system-autoscaler/pkg/metrics-exposer/pkg/metrics"
apierr "k8s.io/apimachinery/pkg/api/errors"
apimeta "k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/... |
<reponame>khaled-11/Botai<filename>local_modules/database/update_current_page.js
// Function to update the Messenger user Data //
const _ = require("lodash");
const AWS = require("aws-sdk");
var ddb = new AWS.DynamoDB();
var docClient = new AWS.DynamoDB.DocumentClient();
module.exports = async (id, field, data, field... |
<reponame>KevinMellott91/jibo-philips-hue<filename>src/lighting/lighting-controller.js<gh_stars>1-10
'use strict';
const Hue = require('node-hue-api');
const _ = require('lodash');
const fs = require('fs');
const nconf = require('nconf');
const moment = require('moment');
/**
* Main class that allows the program to ... |
#!/usr/bin/env bash
function _wrap_build()
{
local start_time=$(date +"%s")
local start_ns=$(date +"%N")
"$@"
local ret=$?
local end_ns=$(date +"%N")
((start_ns=10#$start_ns))
((end_ns=10#$end_ns))
local end_time=$(date +"%s")
if [ $start_ns -gt $end_ns ] ; then
end_time=$(($... |
<reponame>souza-eti-br/souza-crypto
package br.eti.souza.crypto;
import br.eti.souza.exception.SystemException;
/**
* Classe utilitária para criptografia usando Base64.
* @author <NAME>.
*/
public final class Base64 {
/**
* Codificar texto para base64.
* @param text Texto.
* @retur... |
<reponame>icokk/react-native-braintree-xplat<gh_stars>0
package com.pw.droplet.braintree;
import android.content.Intent;
import android.content.Context;
import android.app.Activity;
import com.braintreepayments.api.PayPal;
import com.braintreepayments.api.PaymentRequest;
import com.braintreepayments.api.ThreeDSecure;... |
class Item
{
public $item;
public function __construct($item)
{
$this->item = $item;
}
public function searchDatabase()
{
$db = new mysqli('localhost', 'my_user', 'my_password', 'my_db');
if (mysqli_connect_errno()) {
return 'Connection failed.';
}
$sql = "SELECT * FROM items WHERE item = '$this-... |
#!/bin/bash
unameOut="$(uname -s)"
platform=""
case "${unameOut}" in
Linux*) platform=Linux;;
Darwin*) platform=Mac;;
*) platform="UNSUPPORTED:${unameOut}"
esac
echo "Attempting to mount EFI folder..."
read -p "Enter the disk identifier for EFI partition (e.g. disk0s1, sdb1, etc): " disk_id
esp_pa... |
<filename>python/modules/kivydd/widgets/light_button.py
# The MIT license:
#
# Copyright 2017 <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 witho... |
<filename>arbidex-more-info.js
function showHideMoreInfo() {
if (typeof window.ABXnodesAdded !== 'undefined') {
// If script was executed, clean previous work
window.ABXnodesAdded.forEach(node => node.remove());
delete window.ABXnodesAdded;
return
}
window.ABXnodesAdded = [] // Global variable to... |
package com.createchance.imageeditor.shaders;
import android.opengl.GLES20;
/**
* Butterfly Wave Scrawler transition shader.
*
* @author createchance
* @date 2018/12/31
*/
public class ButterflyWaveScrawlerTransShader extends TransitionMainFragmentShader {
private final String TRANS_SHADER = "ButterflyWaveSc... |
export XDK_TARGET_PLATFORM=linux
export XDK_TARGET_CPU=x86
if [[ ! "$_ELASTOS64" == "" ]]; then
export XDK_TARGET_CPU_ARCH=64
else
export XDK_TARGET_CPU_ARCH=32
fi
export XDK_COMPILER=gnu
#export XDK_TARGET_BOARD=pc
#export XDK_TARGET_PRODUCT=devtools
export THIRDPART_DEPENDED=$XDK_ROOT/ToolChains/$XDK_TARGET_P... |
<filename>src/blocks/RecipeCarousel/RecipeCarousel.tsx
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { LazyLoadImage } from 'react-lazy-load-image-component';
import { Link } from 'react-router-dom';
import Box from '@mui/material/Box';
import Typography from '... |
#!/bin/bash
set -e
source /home/venv/bin/activate
mypy -p autorop
|
from typing import Any, Optional, Union
import jwt
from fastapi import Depends, Header
from sqlalchemy.orm import Session
from app.api.api_v1.router.auth import crud
from app.api.api_v1.router.auth import schemas
from app.api.db.session import get_db
from app.api.models.auth import AdminUser
from app.api.utils import ... |
<reponame>songningbo/jdk8source<filename>javafx-src/com/sun/webkit/Utilities.java<gh_stars>1-10
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.