text
stringlengths
1
1.05M
<reponame>leftcoding/GankLy<gh_stars>10-100 package com.gank.gankly.mvp.base; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; /** * Create by LingYan on 2016-10-21 * Email:<EMAIL> */ public abstract class FetchFragment extends ThemeFragment { @Override publ...
/* * Copyright (c) 2004-2021, University of Oslo * 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, this * list o...
package net.community.chest.util.map; import java.util.Collection; import java.util.Comparator; import java.util.SortedMap; /** * Copyright 2007 as per GPLv2 * * Helper class for {@link SortedMap} implementors - provides some useful * common functionality * * @param <K> Generic key type * @param <V> Generic va...
<reponame>NullaDev/WebGL-STG-Engine<filename>src/stg/entity/ComplexListener.ts import { SCR_HALF_HEIGHT, SCR_HALF_WIDTH } from "../../platform/Screen"; import { EntityPool } from "../stage/EntityPool"; import { State } from "./Entity"; import { MovePoint, MovePointEventListener } from "./MovePoint"; import { RayLaser, ...
<filename>src/assets/build.asset.spec.ts import { beforeEach, describe, expect, it, jest } from '@jest/globals'; import { CxEntry, cxRecent } from '@proc7ts/context-values'; import { Supply } from '@proc7ts/supply'; import { CxBuilder } from '../builder'; import { CxPeerBuilder } from '../peer-builder'; import { cxBuil...
import { Button, Card, Form, Input, Row, Col, InputNumber, message } from 'antd'; import React, { Component } from 'react'; import { Dispatch } from 'redux'; import { FormComponentProps } from 'antd/es/form'; import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { connect } from 'dva'; import styles from '...
import component from './Switch' export default component
class MergeSort: def __init__(self, list1, list2): self.list1 = list1 self.list2 = list2 def merge_lists(self): sorted_list = self.list1 + self.list2 sorted_list.sort() return sorted_list
import datetime print(str(datetime.datetime.now())[:10])
def func_name(param1, param2): # Add two parameters a = param1 + param2 # Multiply two parameters b = param1 * param2 # Return a and b return a, b
const express = require('express'); const app = express(); const bodyParser = require('body-parser'); // Create posts array let posts = [ { id: 1, title: 'First Post', content: 'This is my first post' }, { id: 2, title: 'Second Post', content: 'This is my second post' } ]; // Parse incoming requests data app.use(bo...
#!/bin/sh . ./test-pre.sh AFL_GCC=afl-gcc $ECHO "$BLUE[*] Testing: ${AFL_GCC}, afl-showmap, afl-fuzz, afl-cmin and afl-tmin" test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc" -o "$SYS" = "i386" && { test -e ../${AFL_GCC} -a -e ../afl-showmap -a -e ../afl-fuzz && { ../${AFL_GCC} -o ...
function isPrime(num) { for(let i = 2; i < num; i++) if(num % i === 0) return false; return num > 1; } let num = 31; let res = isPrime(num); if (res) console.log(num + " is Prime"); else console.log(num + " is not Prime");
<reponame>wested/surveyor<gh_stars>0 class Validation < ApplicationRecord include Surveyor::Models::ValidationMethods end
<gh_stars>0 /* * loader di element jquery * per HTML5 */ $(document).ready(function(){ $.canvas = { support_canvas: function(){ return !!document.createElement('canvas').getContext; }, supports_canvas_text: function(){ if (!$.canvas.support_canvas()) {return false;} var emi_canv = document.createElement...
CREATE TABLE BPM_TASK_DEF( ID BIGINT NOT NULL, TASK_DEFINITION_KEY VARCHAR(200), ASSIGNEE VARCHAR(200), CANDIDATE VARCHAR(200), PROCESS_ID BIGINT, CONSTRAINT PK_BPM_TASK_DEF PRIMARY KEY(ID), CONSTRAINT FK_BPM_TASK_DEF_ID FOREIGN KEY(PROCESS_ID) REFERENCES BPM_PROCESS(ID) ) ENGINE=INNODB C...
#!/bin/bash set -ex MY_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) cd $MY_DIR/edge_device # serve fastapi app python3 -m uvicorn fastapi_app:app --port 8778
/* * Copyright (C) 2016 Lightbend Inc. <http://www.lightbend.com> */ package docs.home.scaladsl.persistence import akka.Done import com.lightbend.lagom.scaladsl.persistence.AggregateEvent import com.lightbend.lagom.scaladsl.persistence.AggregateEventShards import com.lightbend.lagom.scaladsl.persistence.AggregateEve...
#!/bin/bash -xeu # Usage: # # $ ./scripts/release.sh v1.2.3 GITHUB_USER upstream # if [[ $1 != v* ]]; then echo "Argument does not start with 'v'" exit 1 fi VERSION=${1#v} GITHUB_USER=$2 REMOTE=$3 find . -type f -iname "*.pyc" -exec rm {} + find . -type f -iname "*.o" -exec rm {} + find . -type f -iname "*....
export function calendar(yearArg: any, monthArg: any, flatParam?: boolean, formatParam?: string, locale?: string): any; export function daysInCalendar(yearArg: any, monthArg: any, formatParam?: string): any[]; export function prevDaysInCalendar(yearArg: any, monthArg: any, formatParam?: string): any[]; export function ...
#!/bin/bash -u JSFILE="$(mktemp --suffix=.js)" function cleanup { rm -rf -- "$JSFILE" rm -rf -- "/home/ctf$JSFILE" } trap cleanup EXIT cat > "$JSFILE" cp "$JSFILE" "/home/ctf$JSFILE" chmod 644 "/home/ctf$JSFILE" /usr/sbin/chroot --userspec=1000:1000 /home/ctf timeout 600 ./ch "$JSFILE" 2>&1
<filename>projects/pezng/threejs/src/lib/components/camera/cube-camera/cube-camera.directive.spec.ts<gh_stars>0 import { CubeCameraDirective } from './cube-camera.directive'; describe('CubeCameraDirective', () => { it('should create an instance', () => { const directive = new CubeCameraDirective(); expect(di...
!function(n, t) { "object" == typeof module && "object" == typeof module.exports ? module.exports = n.document ? t(n, !0) : function(n) { if (!n.document) throw new Error("jQuery requires a window with a document"); return t(n) } : t(n) }("undefined" != typeof window ? win...
python ./multiproc.py --nproc_per_node 16 ./main.py --raport-file raport.json -j5 -p 100 --lr 4.096 --optimizer-batch-size 4096 --warmup 16 --arch resnet50 -c fanin --label-smoothing 0.1 --data-backend pytorch --lr-schedule cosine --mom 0.875 --wd 3.0517578125e-05 --workspace $1 -b 128 --epochs 90 /data/imagenet
<filename>test/__fixtures__/double-access/code.js function App() { let state = 1; function handleAdd() { state = state + 1; } function handleRemove() { state = state - 1; } return ( <> {state} <div onClick={handleAdd}></div> <div onClick={handleRemove}></div> </> ); }
/** * Retrieve and display daily expenses * * @param string $day The date for which expenses need to be retrieved (format: 'Y-m-d') * @return \Illuminate\View\View The view containing the expenses for the given day */ function displayDailyExpenses($day) { // Assuming the 'EndExpense' model is properly defined ...
<gh_stars>0 import { ICommandProps } from "."; import cheerio from 'cheerio' import { getLeaderBoard } from "../utils"; import { client } from ".."; const findUserInLeaderboard = (html: string): [string, string, string, number] | null => { const $ = cheerio.load(html) let result: [string, string, string, numbe...
<reponame>rvkhakhkhar/spring-petclinic-graphql export { default } from "./AddOwnerPage";
#include "nrs.hpp" #include "meshSetup.hpp" #include "nekInterfaceAdapter.hpp" #include "udf.hpp" #include "filter.hpp" #include "bcMap.hpp" static dfloat *scratch; static occa::memory o_scratch; cds_t *cdsSetup(ins_t *ins, mesh_t *mesh, setupAide &options, occa::properties &kernelInfoH); ins_t *insS...
<filename>maven2.demo/src/main/java/service/LojasService.java package service; import dao.LojasDAO; import model.Lojas; import spark.Request; import spark.Response; public class LojasService { private LojasDAO LojasDAO; public LojasService() { LojasDAO = new LojasDAO(); LojasDAO.conectar(); } public Objec...
import random randomNumber = random.randint(1, 5) print(randomNumber)
import { ValidationErrorCause } from '../ValidationError'; import { ValueValidatorOptions } from './ValueValidatorOptions'; export function validate(opts: ValueValidatorOptions): ValidationErrorCause | undefined { const { options, key, targetValue } = opts; const validator = options?.validator?.validator; if (...
def find_min(arr): min = arr[0] for num in arr: if num < min: min = num return min find_min([45, 12, 8, 33, 19])
# this will fail with _main undefined, but should work otherwise /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk PullToRefreshView.m -arch armv7 -framework Foundation -framework UIKit -miphoneos-version-min=4.0 -framework Q...
pkgname=swc deps="wld:pixman" pkgver=intel-tiling fetch() { curl -L "https://github.com/michaelforney/swc/archive/refs/heads/intel-tiling.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz cp ../config.mk . } build() { cd $pkgname-$pkgver cp ../config.mk . gmake PREFIX=/usr CC=cc } package() ...
<filename>lib/x12/empty.rb module X12 # Class indicating the absense of any X12 element, be it loop, segment, or anything else like that. class Empty < Base # Create a new empty def initialize super(nil, []) end # Returns an empty string # @return [String] def to_s retu...
def sort_list(list): for i in range(len(list)): for j in range(i+1, len(list)): if list[i] > list[j]: list[i], list[j] = list[j], list[i] return list my_list = [9, 3, 6, 7, 1] my_list = sort_list(my_list) print(my_list)
var searchData= [ ['placeformsection_169',['placeFormSection',['../class_application.html#a81f066df3ca1cdae16028a15a952a94b',1,'Application']]], ['placemenusection_170',['placeMenuSection',['../class_application.html#abb3ba6361b4dc0042031ea66ae6fe544',1,'Application']]] ];
<reponame>fire-punch/Fyp<filename>js/teat_seat.js<gh_stars>0 const container = document.querySelector('.container'); const count = document.querySelector('#count'); const total = document.querySelector('#total'); const seats = document.querySelectorAll('.rows .seat:not(occupied)'); const movieSelect = document.quer...
<filename>src/parser/jobs/nin/modules/TrickAttackUsage.tsx import {Trans, Plural} from '@lingui/react' import {ActionLink} from 'components/ui/DbLink' import {ActionKey} from 'data/ACTIONS' import {Event, Events} from 'event' import {Analyser} from 'parser/core/Analyser' import {EventHook} from 'parser/core/Dispatcher'...
<filename>mashidcore/Mashid.UnitTest/wwwroot/app/es2015/demo_screenshot.UnitTest.Jasmine.js describe("screenshot", function () { it("screenshot for ALT-SHIFT-F10", function () { // with electron ... var element = document.getElementsByTagName("body"); console.log(element); console...
<reponame>arcadium-dev/core<gh_stars>0 // Copyright 2021 arcadium.dev <<EMAIL>> // // 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 // // ...
describe("bad username login", function() { it("fails to login", function() { cy.visit("/login") cy.get("#login-email") .type("<EMAIL>") .should("have.value", "<EMAIL>") cy.get("#login-password") .type("<PASSWORD>") .should("have.value", "<PASSWORD>") cy.contains("Sign In")....
<filename>test/util/contract/execute.js<gh_stars>1-10 var deasync = require('deasync'); module.exports = function(web3, method, context, params, account, gas){ var error = false; var mined = false; var counter = 0; params.push({from:account||web3.eth.defaultAccount, gas:gas||4000000}) var txid = ...
<gh_stars>10-100 "use strict"; const Endpoints = Object.freeze({ GetFormSchema: 'ManageWebsiteContent/GetFormSchema', GetLanguageSchema: 'ManageWebsiteContent/GetLanguageSchemaById', AddDataForSchema: 'ManageWebsiteContent/AddDataForSchema', UpdateDataForSchema: 'ManageWebsiteContent/UpdateDataForSche...
$:<< File.expand_path(File.dirname(__FILE__) + '/../..') require 'test_helper.rb' class ResponseTest < ActionDispatch::IntegrationTest WARN_RESPONSE = { :response => QBWC_CUSTOMER_QUERY_RESPONSE_WARN, :code => '500', :severity => 'Warn', :message => QBWC_CUSTOMER_QUERY_STATUS_MESSAGE_WARN, } ...
#!/bin/bash dieharder -d 207 -g 29 -S 2374669537
#!/bin/sh ### BEGIN INIT INFO # Provides: ledplay_s # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: # Default-Stop: # Short-Description: Enables/Disables each LED once at boot ### END INIT INFO . @LIBEXEC@/ledctrl led_test_s exit 0
package migrations const ( // recent changes to the pyup updater were made. // since pyup updates their sec-db slowly, this // bumps out any existing fingerprint associated // with the pyup sec-db and forces a re-fetch // and re-download by the updater code. migration3 = ` UPDATE update_operation SET fingerprint...
class CloudStorageAccount: service_name = 'Dropbox' def __init__(self, username): self.username = username def get_username(self): return self.username
#!/bin/sh ${TEST_RUNNER} sub
<gh_stars>10-100 package io.opensphere.geopackage.mantle; import java.util.List; import java.util.Map; import java.util.Set; import io.opensphere.core.Toolbox; import io.opensphere.core.data.DataRegistry; import io.opensphere.core.data.DataRegistryListenerAdapter; import io.opensphere.core.data.util.DataMode...
<filename>z2clib/BaseCompiler.h #ifndef _z2clib_BaseCompiler_h_ #define _z2clib_BaseCompiler_h_ #include "Assembly.h" #include "Source.h" class BaseCompiler { public: enum PlatformType { WINDOWS32, POSIX, }; BaseCompiler(Assembly& aAss): ass(aAss) { #ifdef PLATFORM_WIN32 Platform = WINDOWS32; #endif #ifde...
#!/usr/bin/env bash # Copyright 2016 The TensorFlow 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
// Copyright 2015 Cloudera, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
#!/bin/bash go-callvis \ -focus gitlab.tocraw.com/root/toc_trader/pkg/modules/tradebot \ -skipbrowser \ -file=./assets/callvis \ ./cmd || exit 1
import './App.css'; import 'react-toastify/dist/ReactToastify.css'; import Location from './Location'; //container import React, { useEffect, useState } from 'react'; import Weather from './Weather'; function App() { const [location, setLocation] = useState('') return <React.Fragment> <div classN...
def query_db(db): try: result = db.query("SELECT * FROM users") except Exception as e: print("An error occurred while querying the database: " + str(e)) return None return result
import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; @ObfuscatedName("t") public class class17 extends class14 { @ObfuscatedName("f") boolean field136; @ObfuscatedName("o") byte field133; @ObfuscatedName("u") byte field134; @ObfuscatedName("p") byte field132; @Obfuscate...
def is_leap(year): if (year % 400 == 0) : return True if (year % 100 == 0) : return False if (year % 4 == 0): return True else: return False
class Person: def __init__(self, name, age, country): self.name = name self.age = age self.country = country def get_name(self): return self.name def get_age(self): return self.age def get_country(self): return self.country
<reponame>m-wrona/hevicado 'use strict'; describe('calendar-renderer-spec:', function () { //prepare module for testing beforeEach(angular.mock.module('chronos')); describe('CalendarRenderer-spec:', function () { var renderer; beforeEach(inject(function ($injector) { rendere...
#!/bin/bash set -e cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" declare -A aliases=( #[suite]='tag1 tag2 ...' ) aliases[$(< latest)]+=' latest' aliases[$(< rolling)]+=' rolling' # https://github.com/docker-library/official-images/issues/2323#issuecomment-284409446 declare -A noVersion=( #[suite]=1 ) develSuite...
<gh_stars>100-1000 #coding:utf-8 import os, sys import os.path as osp import numpy as np import torch from torch import nn from torch.optim import Optimizer from functools import reduce from torch.optim import AdamW class MultiOptimizer: def __init__(self, optimizers={}): self.optimizers = optimizers ...
/* * 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/LICENSE-2.0 * * Unless required by applicable law or a...
#!/bin/bash # # ADMIN UTILITY # # This script is only used during the development process and aids to recreated # the protobug related python files which correspond to the RPC's server defined .proto files. # You DO NOT need to invoke this script manually. # This is only needed id the proto files on avatica-core-${V...
#include <iostream> #include <cstdint> namespace duckdb { const uint64_t VERSION_NUMBER = 31; uint64_t incrementVersion(uint64_t currentVersion) { return currentVersion + 1; } } int main() { uint64_t currentVersion = duckdb::VERSION_NUMBER; uint64_t updatedVersion = duckdb::incrementVersi...
import random names = ["John", "Mary", "Paul", "Gerry"] print("The randomly chosen name is", random.choice(names))
<reponame>LaudateCorpus1/hermes-5<filename>src/examples/cf_example.py<gh_stars>100-1000 #!/usr/bin/env python import click import itertools import json import os import sys from pyspark import SparkConf from pyspark.mllib.recommendation import ALS from pyspark.sql.types import StructType from pyspark.mllib.util impor...
<gh_stars>1-10 // 20 june 2016 // kept in a separate file for now typedef struct uiImage uiImage; // TODO use const void * for const correctness _UI_EXTERN uiImage *uiNewImage(double width, double height); _UI_EXTERN void uiFreeImage(uiImage *i); _UI_EXTERN void uiImageAppend(uiImage *i, void *pixels, int pixelWidth,...
#!/usr/bin/env bash cd features/fixtures/sampler function launch_app() { react-native run-ios \ --configuration=Release \ --simulator "iPhone SE" \ --no-packager } echo "{\"name\": \"$EVENT_TYPE\"}" > scenario.json launch_app sleep 2s echo "{\"name\": \"none\"}" > scenario.json launch_app sleep 2s
<filename>hotspots.py from prettytable import PrettyTable import click import datetime import iso8601 import math import os import requests GITHUB_TOKEN = os.environ['GITHUB_TOKEN'] BASE_URL = 'https://api.github.com' client = requests.Session() client.auth = ('token', GITHUB_TOKEN) def get_all_pages(url, params=...
#ifndef __DOMAIN_UPDATE_H__ #define __DOMAIN_UPDATE_H__ #include "db_update.h" #define DNS_STATUS_INIT "init" #define DNS_STATUS_RUN "running" void domian_info_exchange_run(uint16_t web_port, int ssl_enable, char *key_pem_file, char *cert_pem_file); int domain_list_del_zones(char *del_zones); void domain_in...
<gh_stars>10-100 package com.peony.core.control.job; import com.peony.core.control.annotation.Service; import com.peony.core.data.DataService; import com.peony.core.data.tx.AbListDataTxLifeDepend; import com.peony.core.data.tx.Tx; import com.peony.core.data.tx.TxCacheService; import com.peony.common.exception.MMExcept...
<gh_stars>1-10 const obs = require('../obs') module.exports = { getScenes: async (request, response) => { if (!obs.getConnectionStatus()) { return response.json({ error: 'Não conectadado' }) } const cenas = await obs.getScenes() return response.json(cenas) }, swithScene: async (request, re...
<?hh // strict namespace Waffle\Http\Server\__Private; use type Waffle\Contract\Http\Message\ResponseInterface; use type Waffle\Contract\Http\Message\ServerRequestInterface; use type Waffle\Contract\Http\Server\RequestHandlerInterface; use type Waffle\Contract\Http\Server\MiddlewareInterface; use type SplPriorityQueu...
#!/bin/bash DEPS=("websocat" "curl" "jq" "cut" "twitchpipe") API_URL="https://gql.twitch.tv/gql" WEBSOCKET_URL="wss://pubsub-edge.twitch.tv/v1" CLIENT_ID="kimne78kx3ncx6brgo4mv6wki5h1ko" PRINT_FILENAME=0 GROUP="chunked" FILENAME_COMMAND=$'date -u \'+%Y_%m_%d_%H_%M_%S_(%Z)\'' errf(){ >&2 printf "${@}"; } safe_name(...
Phaser.Plugin.JSON2Game = function(game, parent, settings) { Phaser.Plugin.call(this, game, parent); DOM_Wrapper.install(game); // hay que ver como hacer esto más prolijo var def = (typeof $ == "function" && typeof $.Deferred == "function") ? $.Deferred : (typeof j...
/* * 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 ...
package org.para.distributed.util; import java.util.Comparator; import org.apache.log4j.Logger; import org.para.distributed.dto.WorkerNode; /** * 按照资源总值排序 * * * 按照公式:CPU剩余率*100*CPU权重+内存剩余率*100*(1-CPU权重)=负载Value,进行从大到小的排序。( * 硬件的性能指数还可以在细化:CPU工作频率、内存工作频率、硬盘转数、网络吞吐量) * * @author liuyan * @Email:<EMAIL> * @...
/* Copyright © 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
def web_scrape(url): response = req.get(url) soup = bs4.BeautifulSoup(response.text, 'html.parser') data = [] # Find all elements with the required class elems = soup.find_all('div', {'class': 'sample_class'}) # Extract the data for elem in elems: data.append(elem.text) retur...
<reponame>justcrossheaven/platform import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import * as Mongoose from 'mongoose'; import { Model } from 'mongoose'; import { Bill, BillDocument, BillModel } from './bill.schema'; @Injectable() export class BillStoreService { construc...
#!/usr/bin/env bash # # Generated by: https://github.com/swagger-api/swagger-codegen.git # frameworkVersion=net45 # sdk must match installed framworks under PREFIX/lib/mono/[value] sdk=4.5.2-api # langversion refers to C# language features. see man mcs for details. langversion=${sdk} nuget_cmd=nuget # Match against...
#!/bin/sh # 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 m...
#ifndef INCLUDED_RENDER_HEAD_ACTION_RENDERER_H #define INCLUDED_RENDER_HEAD_ACTION_RENDERER_H #include "platform/i_platform.h" #include "render/action_renderer.h" #include "core/actor.h" #include "renderable_sprite.h" #include "renderable_repo.h" namespace render { class HeadActionRenderer : public ActionRenderer { ...
import torch def adjust_image(image: torch.Tensor) -> torch.Tensor: return torch.clamp(image, 0.0, 1.0)
#!/usr/bin/env bash # Build soldat.smod file # Requires zip set -o errexit set -o pipefail set -o nounset #set -o xtrace pushd . &> /dev/null if ! command -v zip &> /dev/null then echo "Error: Cannot find zip executable" exit fi ROOTDIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")") cd "${ROOTDIR}" if [ -f "s...
package math; import java.io.BufferedReader; import java.io.InputStreamReader; public class Boj3004 { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); System.out.println(getRes(N)); } ...
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.naive_bayes import MultinomialNB class DocumentClassifier: def __init__(self,model_path): self.model_path = model_path self.vectorize...
#!/bin/bash echo -e "Removing previous SAML metadata directory, if any, for ${SCENARIO}" rm -Rf "${PWD}/ci/tests/puppeteer/scenarios/${SCENARIO}/saml-md" echo -e "Creating SAML metadata directory for ${SCENARIO}" mkdir "${PWD}/ci/tests/puppeteer/scenarios/${SCENARIO}/saml-md"
import os import numpy as np import matplotlib.pyplot as plt GENGERATIONS = 30 POPULATION_SIZE = 50 LOG_FILE_NAME = "../../logs/evolution_18-09-29_17:15.log" LABELS = ['Average','Best individual','Worst individual'] if __name__ == "__main__": lines = [line.rstrip('\n') for line in open(LOG_FILE_NAME)] lines_...
#!/bin/sh # failure validates that the correct error message # is displayed for XOR'd args ../build/examples/test20 -ba > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test76.out; then exit 0 else exit 1 fi
#!/bin/bash # # Copyright (c) 2020, 2021 Red Hat, IBM Corporation and others. # # 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 requ...
function codeCommune() { return '34172' } module.exports = {codeCommune}
import numpy as np def multiply_two_matrices(x, y): return np.matmul(x, y)
export class NPMErr extends Error { public readonly type: NPMErrType; constructor(type: NPMErrType, message: string) { super(message); this.type = type; } } export enum NPMErrType { Error, Warning, Info }
<reponame>tkowalcz/rx-java-pantha-rhei package pl.tkowalcz.twitter.mock; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import rx.Observable; import rx.schedulers.Schedulers; public class MockTwitterClient implements AutoCloseable { public Observable<String> tweets() { ...
#!/usr/bin/env bash git archive --format zip --output taiga-collapse-us.zip master
<reponame>zheleznovux/beauty-saloon-server import { Controller, Get, Param, HttpException, HttpStatus, Body, Post, Delete, Query, UseGuards, UseInterceptors, UploadedFile, Res, Patch } from '@nestjs/common'; import { ApiOperation, ApiTags, ApiOkResponse, ApiNotFoundResponse, ApiCreatedResponse, ApiQuery, ApiBearerAuth,...