text stringlengths 1 1.05M |
|---|
#!/bin/bash
find /var/www/html/download/ -mmin +59 -exec rm {} \;
echo "Account"
latest=$(find /var/www/html/download/*.json -printf "%T@ %p\n" | sort -nr|grep account_data|grep -v latest|head -n 2|tail -n 1|cut -d " " -f 2)
latestcsv=$(echo "$latest"|sed 's/json/csv/g')
latestcsvt=$(echo "$latestcsv"|sed 's/\//_/g')... |
"""The model for the MNIST variant of the multitask experiment."""
import torch
import torch.nn.functional as F
from torch import Tensor, nn
def assert_shape(x: Tensor, shape: (int, int)):
"""Raises an exception if the Tensor doesn't have the given final two dimensions."""
assert tuple(x.shape[-2:]) == tuple... |
<filename>com.ensoftcorp.open.dynadoc.core/src/com/ensoftcorp/open/dynadoc/core/wrapper/ClassCommitsWrapper.java
package com.ensoftcorp.open.dynadoc.core.wrapper;
import java.util.List;
import com.ensoftcorp.open.dynadoc.core.data.Commit;
import com.ensoftcorp.open.dynadoc.core.data.JavaClass;
import com.hp.gagawa.ja... |
#!/bin/bash
nvidia_version=`cat /proc/driver/nvidia/version |grep 'NVRM version:'| grep -oE "Kernel Module\s+[0-9.]+"| awk {'print $3'}`
nvidia_major_version=`echo $nvidia_version |sed "s/\..*//"`
driver_filename="NVIDIA-Linux-x86_64-$nvidia_version.run"
driver_url="http://us.download.nvidia.com/XFree86/Linux-x86_64/$n... |
module CamaleonCms::Frontend::NavMenuHelper
# draw nav menu as html list
# key: slug for nav menu
# to register this, go to admin -> appearance -> menus
# (DEPRECATED)
def get_nav_menu(key = 'main_menu', class_name = "navigation")
draw_menu({menu_slug: key, container_class: class_name})
end
# draw me... |
#!/bin/zsh
cd /tmp
NAME="$1"
EXPR="$2"
doc=$(cat <<EOF
\\documentclass[preview]{standalone}
\\\usepackage{mathtools}
\\\begin{document}
$ ${EXPR} $
\\\end{document}
EOF
)
echo $doc | pdflatex 1> /dev/null
convert -density 800 texput.pdf -quality 100 $HOME/equations/$NAME.png
print "Outputted to: $HOME/equations/$NAM... |
#!/usr/bin/env bash
#
# Configure environment for a particular configuration for whitebox testing. To
# use this outside of nightly testing, set these two variables in the
# environment:
#
# Variable Values
# ------------------------------------------------------
# COMPILER cray, intel, pgi, gnu
# COMP_TYPE TARG... |
<reponame>drkstr101/wa
export * from './lib/message';
export * from './lib/message-context';
export * from './lib/message-list';
export * from './lib/use-message';
|
def findMax(arr):
if len(arr) == 0:
return None
max = arr[0]
for i in range(1, len(arr)):
if arr[i] > max:
max = arr[i]
return max
arr = [1, 9, 4, 6, 8, 2]
print(findMax(arr)) |
import sqlite3
def processInput(name):
conn = sqlite3.connect('database.db')
cursor = conn.cursor()
query = "SELECT * FROM Students WHERE name = ?;"
cursor.execute(query, (name,))
results = cursor.fetchall()
conn.close()
return results |
from flask import Flask, render_template, redirect, url_for, request
import sqlite3
app = Flask(__name__)
# Create database
conn = sqlite3.connect('example.db', check_same_thread=False)
cursor = conn.cursor()
# Create table
cursor.execute("""CREATE TABLE IF NOT EXISTS customers
(id INTEGER PRIMARY KEY, name text, ... |
<reponame>SplashSync/PyCore
# -*- coding: utf-8 -*-
#
# This file is part of SplashSync Project.
#
# Copyright (C) 2015-2020 Splash Sync <www.splashsync.com>
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FI... |
public class ThickMatrix {
private String identifier;
private double length;
private PhaseMatrix m_matGen;
public ThickMatrix(String strId, double dblLen, PhaseMatrix matPhiSub) {
this.identifier = strId;
this.length = dblLen;
this.m_matGen = matPhiSub;
}
// Add any add... |
<gh_stars>1-10
# frozen_string_literal: true
require_relative 'foreign_key_add'
module DeclareSchema
module SchemaChange
class ForeignKeyRemove < ForeignKeyAdd
alias index_add_up_command up_command
alias index_add_down_command down_command
def up_command
index_add_down_command
e... |
package com.boot.feign.article;
import com.boot.data.CommonResult;
import com.boot.pojo.Article;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* ??????????????... |
#if defined(TEMPEST_BUILD_DIRECTX12)
#include "dxbuffer.h"
#include "dxdevice.h"
#include <cassert>
#include "gapi/graphicsmemutils.h"
using namespace Tempest;
using namespace Tempest::Detail;
DxBuffer::DxBuffer(DxDevice* dev, ComPtr<ID3D12Resource>&& b, UINT sizeInBytes)
:dev(dev), impl(std::move(b)), sizeInByte... |
<reponame>eiah32/springCloud<gh_stars>0
package com.eiah.service.impl;
import org.springframework.stereotype.Service;
import com.eiah.service.RoleService;
@Service
public class RoleServiceImpl implements RoleService{
// @Autowired
// private SqlSession sqlSession;
// @Override
// public List<Role> findRoles(String... |
#!/usr/bin/env bash
function checkout_knative_eventing {
checkout_repo 'knative.dev/eventing' \
"${KNATIVE_EVENTING_REPO}" \
"${KNATIVE_EVENTING_VERSION}" \
"${KNATIVE_EVENTING_BRANCH}"
}
function checkout_knative_eventing_operator {
checkout_repo 'knative.dev/eventing-operator' \
"${KNATIVE_EVENT... |
<gh_stars>1-10
/**
* Copyright (C) 2014 xuanhung2401.
*
* 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... |
<gh_stars>0
require 'ostruct'
if ENV['HEROKU']
Errbit::Config = OpenStruct.new
Errbit::Config.host = ENV['ERRBIT_HOST']
Errbit::Config.email_from = ENV['ERRBIT_EMAIL_FROM']
Errbit::Config.email_at_notices = [1,3,10] #ENV['ERRBIT_EMAIL_AT_NOTICES']
else
yaml = File.read(Rails.root.join('config','config.yml'))... |
<filename>src/minimumcost_spanning_tree/Boj21924.java
package minimumcost_spanning_tree;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
/**
*
* @author exponential-e
* 백준 21924번: 도시 건설
*
* @see https://www.acmicpc.net/problem/219... |
#!/bin/bash
# Copyright (c) 2019, NVIDIA CORPORATION. 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 of ... |
// units.rs
pub mod units {
pub mod length {
pub fn meters_to_feet(meters: f64) -> f64 {
meters * 3.28084
}
pub fn meters_to_inches(meters: f64) -> f64 {
meters * 39.3701
}
// Add more length conversion functions as needed
}
pub mod weight ... |
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
source ci/_
source ci/rust-version.sh stable
source ci/rust-version.sh nightly
export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"
_ cargo +"$rust_stable" fmt --all -- --check
# Clippy gets stuck for unknown reasons if sdk-c is included in the build, so check i... |
<filename>liteflow-test-springboot/src/main/java/com/yomahub/flowtest/components/CondComponent.java
/**
* <p>Title: litis</p>
* <p>Description: redis的全方位开发运维平台</p>
* <p>Copyright: Copyright (c) 2017</p>
* @author Bryan.Zhang
* @email <EMAIL>
* @Date 2017-11-28
*/
package com.yomahub.flowtest.components;
import ... |
ls;;
|
make clean
make -f windows.mk 64bit
|
<reponame>GunnarEriksson/space-invaders<gh_stars>0
/**
* The mystery ships handler in the game.
*
* Creates, removes and handles all mystery ships in the game.
*/
/*global Audio */
/*global Guer */
/*global ExplodedMysteryShip */
/*global MysteryShip */
/*global Vector */
/**
* The mystery ships constructor.
*
... |
<reponame>wsd325888/paike1
package com.zm.paipai;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.LayoutInfla... |
package mathcard.player;
import java.util.List;
import java.util.Random;
import mathcard.card.Card;
import mathcard.game.Play;
import mathcard.game.Play.Target;
public class PlayerRandom extends Player {
private Random rand;
public PlayerRandom(Random random)
{
super("Random" + random.hashCode());
rand = ra... |
import pandas as pd
# Load the dataset
data = pd.read_csv('data.csv')
# Split the dataset
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(data.drop('target', axis=1),
data['target'], test_size=0.20,
... |
from sklearn.svm import SVC
from sklearn.model_selection import train_test_split
# Step 1: Load the data
dataset = pd.read_csv('dataset.csv')
X = dataset.drop(['label'], axis = 1).values
y = dataset['label'].values
# Step 2: Split the data into training set and test set
X_train, X_test, y_train, y_test = train_te... |
import os
import json
def process_fish_json():
splited_path = os.path.realpath(__file__).split('\\')[:-1]
fish_path = '\\'.join(splited_path)
fish_json_name = "fish.json"
fish_json_path = os.path.join(fish_path, fish_json_name)
with open(fish_json_path, 'r') as file:
data = json.load(file... |
package com.bustiblelemons.cthulhator.system.properties;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.io.S... |
#!/bin/sh
#
# backup full webpages
#
# SCRIPT_DEPS: [ monolith ]
: "${MONOLITH:=monolith}"
: "${GET_TITLE:=get-url-title}"
ARCHIVE_DIR="/disk/archive/web"
ARCHIVE_DIR_FULL="${ARCHIVE_DIR}/full"
ARCHIVE_DIR_MIN="${ARCHIVE_DIR}/min"
mkdir -p "$ARCHIVE_DIR_FULL" "$ARCHIVE_DIR_MIN"
FILENAME="$($GET_TITLE "$1" | tr '~!@... |
(page, done) => {
var hh = page.getHttpHeaders("last");
//var staticdom = page.getDom();
if(!hh){
done(this.createResult('HTTP', "<b>No HTTP-header</b> found, most likely due to <b>caching</b>! HTTP-header depending tests might fail or not get reported!", 'warning'));
}
done();
}
|
<filename>public/resources/js/mapstyle.js
var style = [{
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "road",
"stylers": [{
"visibility": "on"
}, {
"color": "#ffffff"
}]
}, {
"featureType": "road.arte... |
#!/bin/sh
case "$1" in
merged|unmerged)
mode="$1"
;;
*)
echo "Usage: $0 (merged | unmerged)" >&2
exit 1
;;
esac
origin=${REMOTE:-origin}
git ls-remote --heads $origin |
while read sha1 ref
do
ref=$origin/${ref#refs/heads/}
case $ref in
$origin/master|$origin/debian-*)
continue;; # ignore debian as a topic b... |
<reponame>RobertPHeller/RPi-RRCircuits<gh_stars>1-10
//// -!- C++ -!- //////////////////////////////////////////////////////////////
//
// System :
// Module :
// Object Name : $RCSfile$
// Revision : $Revision$
// Date : $Date$
// Author : $Author$
// Created By : <NAME... |
<filename>src/main/java/controller/PersonController.java<gh_stars>0
package controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springfra... |
#!/bin/bash
# Module specific variables go here
# Files: file=/path/to/file
# Arrays: declare -a array_name
# Strings: foo="bar"
# Integers: x=9
###############################################
# Bootstrapping environment setup
###############################################
# Get our working directory
cwd="$(pwd)"... |
//app.js
App({
data:{
num:0,
API:'https://sample.zaixian.jichuangsi.com'
},
onLaunch: function () {
},
onUnlaunch: function () {
}
}) |
<gh_stars>10-100
package gov.cms.bfd.server.war.stu3.providers;
import ca.uhn.fhir.rest.client.api.IClientInterceptor;
import ca.uhn.fhir.rest.client.api.IHttpRequest;
import ca.uhn.fhir.rest.client.api.IHttpResponse;
import gov.cms.bfd.server.war.commons.RequestHeaders;
import java.io.IOException;
/** A HAPI {@link ... |
const config = {
env: {
browser: true,
jest: true,
node: true,
},
extends: ['airbnb', 'airbnb/hooks', 'airbnb-typescript', 'plugin:@typescript-eslint/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
... |
let word_in_str = (str, word) => {
let words = str.split(' ');
for (var i = 0; i < words.length; i++) {
if (words[i] === word) {
return true;
}
}
return false;
} |
#!/bin/sh
set -e -o pipefail
# Usage:
# ./install.sh
VERSION=$(curl -s https://api.github.com/repos/redhat-et/microshift/releases | grep tag_name | cut -d '"' -f 4)
# Function to get Linux distribution
get_distro() {
DISTRO=$(egrep '^(ID)=' /etc/os-release| sed 's/"//g' | cut -f2 -d"=")
if [[ $DISTRO != @(rh... |
<filename>web.js
const http = require('http');
const axios = require('axios').default;
const url = require('url');
const fs = require('fs');
const qs = require('querystring');
const path = require('path');
module.exports = {
start: (client, ops) => {
const server = http.createServer((req, res) => {
... |
firebase deploy --token $FIREBASE_TOKEN --non-interactive #token for deployment using master branch, refer wiki for more detail |
/*
Imports
*/
import path from 'path';
import { promises as fs, Dirent } from 'fs';
import { ITreeItem } from '../types/index.js';
import { hasOwnDir, listContents, reduceTree, confirmProceed } from './index.js';
/*
File utils
*/
const formatAsTreeItems = (root: string, dirItems: Array<Dirent>): Array<ITree... |
#!/usr/bin/env bash
set -ex
sbt +publishSigned
sbt sonatypeReleaseAll
echo "Released"
|
export * from './hi-there.component';
export * from './hi-there.route';
export * from './hi-there.module';
|
require "./array/my_max.rb"
describe Array do
describe "#my_max" do
it "finds the maximium value in array" do
expect([2, 5, 2, 6, 3, 9].my_max).to eq(9)
end
end
end
|
<reponame>agneym/react-loading
import * as React from 'react';
const Docs = () => {
return (
<>
<h1>Installation</h1>
<code>
npm install @agney/react-loading
</code>
<p>For more detailed docs, visit <a href="https://github.com/agneym/react-loading">Github page</a></p>
</>
);... |
import classnames from 'classnames';
import React, { useState } from 'react';
import { SupportedLocale } from '../../features/i18n/types';
import styles from './LanguageSwitcher.module.scss';
export interface ILocaleProps {
code: SupportedLocale;
title: string;
}
export interface ILanguageSwitcherParams {
curre... |
#!/usr/bin/env bash
PUSH=$1
DATE="$(date "+%Y%m%d%H%M")"
REPOSITORY_NAME="latonaio"
IMAGE_NAME="aion-statuskanban"
DOCKERFILE_DIR="./cmd/kanban-server"
DOCKERFILE_NAME="Dockerfile-kanban-server"
# build servicebroker
DOCKER_BUILDKIT=1 docker build -f ${DOCKERFILE_DIR}/${DOCKERFILE_NAME} -t ${REPOSITORY_NAME}/${IMAGE_... |
/* Copyright 2017 <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the... |
<gh_stars>1-10
/*
* MIT License
*
* Copyright (c) 2021 Imanity Software
*
* 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
... |
<filename>packages/multi/rollup.config.js
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import svelte from 'rollup-plugin-svelte';
import { terser } from 'rollup-plugin-terser';
import pkg from './package.json';
c... |
<gh_stars>0
var https = require('https')
var aws4 = require('aws4')
require('dotenv').config()
const Post = require('../models/post');
const list = async (req, res) => {
if (!req.query) {
return res.json({});
}
search = req.query.text;
var index = 'posts'
var opts = {
host: 'sear... |
SELECT student_name, COUNT(*) AS "Number of Courses"
FROM student_courses
GROUP BY student_name; |
#!/bin/bash
# Copyright 2013 Daniel Povey
# 2014 David Snyder
# Apache 2.0.
# This script extracts iVectors for a set of utterances, given
# features and a trained iVector extractor.
# Begin configuration section.
nj=30
num_threads=1 # Number of threads used by ivector-extract. It is usually not... |
<filename>app/src/main/java/com/sereno/view/ColorPickerView.java
package com.sereno.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.support.annotation.Nullable;
import android.util.A... |
<gh_stars>0
/* * -* *- *- *- *- *- *- * * ** -* -* -* - *- *- *-* - ** - *- - * *- */
/* * _ _ +\ */
/* - | |_ ___ ___ ___ ___ ___ ___ ___ _| |___ ___ ___ ___ + */
/* + | _| _| .'| |_ -| _| -_| | . | -_| | _| -_| /* ... |
<reponame>Neha-Dhuri/Atlas_Demo
package com.tatadigital.tcpapp.gui.pages;
import java.util.List;
import org.apache.log4j.Logger;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.FindBy;
import com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement;
import com.qaprosoft.ca... |
from cryptography.fernet import Fernet
import secrets
def generate_raw_shares(data: bytes, prime: int) -> Iterator[bytes]:
key = Fernet.generate_key()
f = Fernet(key)
encrypted_data = f.encrypt(data)
# Generate raw shares using a secure method
raw_share_1 = secrets.token_bytes(16)
raw_shar... |
<gh_stars>1-10
require "test/test_helper"
class Admin::CategoriesControllerTest < ActionController::TestCase
should "verify form partial can overwrited by model" do
get :new
assert_match "categories#_form.html.erb", @response.body
end
end
|
<gh_stars>0
import React from 'react';
import {observer} from 'mobx-react';
import styles from './index.less';
function MainContBox(props) {
return (
<div className={styles.box}>
{props.children}
</div>
);
}
export default observer(MainContBox);
|
<reponame>duncpro/squaremap
package xyz.jpenilla.squaremap.common;
import java.util.UUID;
import net.kyori.adventure.text.Component;
import net.minecraft.server.level.ServerPlayer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerf... |
from enum import Enum
from typing import Union
class GZEntryFlags(Enum):
# Define GZEntryFlags enumeration values here
FLAG1 = 1
FLAG2 = 2
# ...
class GZCompressionMethod(Enum):
# Define GZCompressionMethod enumeration values here
DEFLATE = 8
# ...
class GZDeflateCompressionFlags(Enum):
... |
#!/bin/bash
n=8
sed -i "" -e "s/templatesession/session$n/" README.md DESCRIPTION _pkgdown.yml
sed -i "" -e "s/template_session/session$n/" README.md
sed -i "" -e "s/sessionN/session$n/" DESCRIPTION
sed -i "" -e "s/session N/session $n/" DESCRIPTION
sed -i "" -e "s/Session N/Session $n/" vignettes/session_lecture.Rmd v... |
/*
Jameleon - An automation testing tool..
Copyright (C) 2007 <NAME> (<EMAIL>)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at... |
for n in range(20):
print('testing dict with {} items'.format(n))
for i in range(n):
# create dict
d = dict()
for j in range(n):
d[str(j)] = j
print(len(d))
# delete an item
del d[str(i)]
print(len(d))
# check items
for j in r... |
#!/bin/bash
DIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd ${DIR}/docker
docker build --rm --no-cache --add-host pontus-sandbox.pontusvision.com:172.17.0.2 -t pontusvisiongdpr/pontus-ad-base .
docker push pontusvisiongdpr/pontus-ad-base
#docker run --privileged --hostname pontus-sandbox.pontusvision.com -d --rm -p389:... |
export interface IPair {
difficulty: { level: number },
stat: {
frontend_question_id: number,
question__title_slug: string
}
}
|
package com.honyum.elevatorMan.data;
import java.io.Serializable;
/**
* Created by LiYouGui on 2017/12/11.
*/
public class ContractFile implements Serializable{
private String id;
private String contractId; //合同ID
private String fileName; //附件名称
private String url = ""; //附件路径
private String cr... |
<filename>texture_modulation_demo.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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.ap... |
<gh_stars>0
/* eslint-disable */
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
export namespace Components {
interfa... |
class Board:
def __init__(self, n):
self.n = n
self.board = [[None for _ in range(n)] for _ in range(n)]
def __getitem__(self, index):
return self.board[index]
def check_win(self, color):
# Check rows and columns
for i in range(self.n):
row_count = 0
... |
'use strict';
/*
This file contains verifying specs for:
https://github.com/sindresorhus/atom-editorconfig/issues/118
*/
const fs = require('fs');
const path = require('path');
const testPrefix = path.basename(__filename).split('-').shift();
const projectRoot = path.join(__dirname, 'fixtures');
const filePath = pa... |
def filter_by_length(list):
"""
Filters out strings in the given list that have length 3.
"""
filtered_list = [word for word in list if len(word) == 3]
return filtered_list
if __name__ == '__main__':
list = ['ada', 'python', 'ruby', 'egg', 'coffee']
print(filter_by_length(list)) |
import * as React from "react";
import { Callout } from "../components";
import { AppConsumer } from "./AppContext";
const container = () => (
<AppConsumer>
{({ showForm, setHeight, getForm }) => {
const form = getForm();
const { callout, themeColor } = form;
return (
<Callout
... |
#!/bin/bash
NPM_BIN=$(npm bin)
node "$NPM_BIN/webpack" --config ./tools/webpack/webpack.config.babel.js
cp ./tools/scripts/es5.js ./es5.js
node "$NPM_BIN/babel" src --out-dir lib
|
class Circle:
def __init__(self, radius):
self.radius = radius
def area(self):
return 3.14 * self.radius**2
def circumference(self):
return 2 * 3.14 * self.radius |
#!/usr/bin/env bash
sudo docker build --no-cache -t conanio/gcc7-x86 .
|
from logml.eda_tools.profiling_tools.utils import EligibleProfilingTools
from logml.eda_tools.profiling_tools.cell import Cell
@EligibleProfilingTools.register_view
class SummaryView:
"""
Simple dataset summary workflow:
- head/tail
- simple descriptive statistics
- numerical/categorical column... |
#!/usr/bin/env bash
source env/bin/activate
python compare_face_detection.py
deactivate
|
<gh_stars>10-100
package io.opensphere.overlay;
import java.awt.BorderLayout;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.InputEvent;
import java.util.function.Supplier;
import javax.swing.BorderFactory;
import javax.sw... |
import numpy as np
import pytest
class ShapeError(Exception):
pass
def loss(batch, target):
if not isinstance(batch, dict) or 'imgs' not in batch or 'labels' not in batch:
raise ValueError("Input batch should be a dictionary containing 'imgs' and 'labels' keys")
imgs = batch['imgs']
labels = ... |
<filename>docs/html/_atom_8h.js
var _atom_8h =
[
[ "Atom", "class_smol_dock_1_1_atom.html", "class_smol_dock_1_1_atom" ],
[ "atomTypeToAtomicRadius", "_atom_8h.html#a9c3abf1e37dc4fe013df80997dedb20b", null ],
[ "atomTypeToString", "_atom_8h.html#adc50d67bf7b33de8b30d90f97c25fb24", null ],
[ "atomTypeToS... |
var _compatibility_tests_8cpp =
[
[ "BOOST_AUTO_TEST_CASE", "_compatibility_tests_8cpp.xhtml#a8189edd0b64c34308ac5ae769f5baae3", null ]
]; |
<reponame>isandlaTech/cohorte-runtime<filename>java/deprecated/ui/org.psem2m.isolates.ui.admin/src/org/psem2m/isolates/ui/admin/impl/EFrameSize.java
/**
* Copyright 2014 isandlaTech
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.... |
<reponame>AlissonSteffens/OPKCalculator<gh_stars>0
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.univali.visao.panels;
import br.univali.model.interpolacao.EquationCalcu... |
/**
* Copyright 2009 Google 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 agree... |
/*
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var nopt = require('nopt'),
path = require('path'),
fs = require('fs'),
Collector = require('../collector'),
formatOption = require('../util/help-fo... |
function getEmailVerificationMessage($email) {
if (!$email) {
return "Invalid email provided.";
}
$user = $this->getUserInstance(); // Assuming $this refers to the current class instance
if ($user->isVerified($email)) {
return "Your email is already verified. Just go ahead and log in to your account."... |
<reponame>coffeeandhops/spree_wholesale
#insert_before :account_my_orders, 'hooks/wholesale_customer'
Deface::Override.new(:virtual_path => 'spree/users/show',
:name => 'wholesale-my-orders',
:insert_before => "[data-hook='account_my_orders'], #account_my_orders[data-hook]",
:partial => "spree/hooks/wholesale_c... |
var portal = function(args) {
this.x = args.x;
this.y = args.y;
this.direction = args.direction;
this.x1 = args.x1;
this.y1 = args.y1;
};
module.exports = portal;
|
#!/usr/bin/env bash
set -eo pipefail
postTagSystemRoot=$(cd "$(dirname "$0")" && pwd)
cd "$postTagSystemRoot"
lsfilesOptions=(
--cached
--others # untracked files
--exclude-standard # exclude .gitignore
'*'
':(exclude)*.png'
':(exclude)Dependencies/*'
':(exclude)libPostTagSystem/WolframHeaders... |
#!/bin/bash
# ============================================================================
# File : bcvTally.bash
# Project : BibleVox
# Date : 2016.06.24
# Author : MEAdams
# Purpose : scan bible text and create a book, chapter and verse lookup table
# --------:--------------------------------------------------... |
package com.iterlife.zeus.spring.core;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
public interface Resource extends InputStreamSource {
boolean isExist();
boolean isReadable();
boolean isOpen();
URL getURL() throws IOException;
URI getURI() throw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.