text stringlengths 1 1.05M |
|---|
SELECT city,
MAX(age) AS oldest_person_age
FROM people
GROUP BY city; |
#!/bin/bash
echo "Installing vim..."
echo
if is_osx; then
brew install \
neovim \
# Override system vim with macvim
brew install macvim
else
echo "Can't automatically install vim and neovim for the current OS."
fi
# Set up backups directories
mkdir -p $HOME/.vim/.temp/
mkdir -p $HOME/.vim/.u... |
<reponame>ch1huizong/learning
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2008 <NAME> All rights reserved.
#
"""
"""
__version__ = "$Id$"
#end_pymotw_header
import heapq
from heapq_showtree import show_tree
from heapq_heapdata import data
heap = []
print 'random :', data
print
for n in data:
print... |
"""trello URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... |
<reponame>Catsuko/Westward
class OccupiedSpace:
def __init__(self, occupant):
self.occupant = occupant
def enter(self, actor, origin, tile, root):
return root if actor == self.occupant else self.__interaction(actor, origin, tile, root)
def leave(self, actor, tile, root):
from .ope... |
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $SCRIPT_DIR || exit 1
mkdir -p logs
echo "# Downloading 10 S. aureus isolate genomes"
rm -rf input_isolates
mkdir -p input_isolates
for i in $(cut -f4 135_saureus_isolates.tsv | sed 1d | head -n 11); do
o=`basename $i |... |
#!/bin/bash
usage() {
echo "A simple 'build server' using shell script."
echo "Run it passing as parameter the Github username and repo to build."
echo "The repo must contain a Dockerfile for the build to be successfull."
echo ""
echo "Sample usage:"
echo ""
echo -e "\t$(basename $0) robsondepaula/shell-... |
#!/bin/sh
CWD="$(pwd)"
MY_SCRIPT_PATH=`dirname "${BASH_SOURCE[0]}"`
cd "${MY_SCRIPT_PATH}"
rm -drf docs
jazzy --github_url https://github.com/bmlt-enabled/Quick-NA-Meeting-Finder\
--readme ./README.md\
--theme fullwidth\
--author BMLT-Enabled\
--author_url https://bmlt.app\
--m... |
#!/bin/bash
#Companion code for the blog https://cloudywindows.com
#call this code direction from the web with:
#bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-debian.sh) ARGUMENTS
#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/ins... |
<reponame>prinsmike/go-start
// Internationalization support - not ready yet.
package i18n
// This can be used as independent library
var iso3166_1_alpha2 map[string]string
func EnglishCountryName(code string) string {
name, ok := Countries()[code]
if !ok {
return code
}
return name
}
// Countries returns a m... |
<reponame>3dcitydb/web-feature-service<gh_stars>10-100
package vcs.citydb.wfs.config.filter;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
@XmlType(... |
<gh_stars>0
package sword.android.graphqlnotes;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.List;
final class NoteListAdapter extends BaseAdapter {
private final List<NoteEntry> m... |
WITH STORE_MANAGER_ADDRESS AS(
INSERT INTO MAIN.ADDRESS (
ADDRESS_LINE1,
CITY,
STATE,
ZIP
)
VALUES (
'4321 Hubbard Ave',
'Columbus',
'OH',
'43217'
)
RETURNING ID AS STORE_MANAGER_ADDRESS_ID
),
STORE_MANAGER AS(
INSERT INTO MAIN.PERSON (
NAME,
PHONE,
EMAIL... |
#!/bin/bash
yosys -L yosys.log ../run_script.ys
|
<gh_stars>0
Declare
Stage Sttm_Branch.End_Of_Input%Type := 'T';
Begin
Global.Pr_Init('010', 'FATEKWANA');
If Not Gipks_Gi_Service.Fn_Gidprsif(Global.Current_Branch, Stage)
Then
Debug.Pr_Debug('CL', 'Failed in generation');
End If;
Exception
When Others Then
Debug.Pr_Deb... |
import { LocalizationLanguage } from './enums';
export type Link = string;
export type LocalizedKeyValuePair = [LocalizationLanguage, LocalizedString];
export type LocalizedString = string;
export type LanguageSkill = 'language-skill-Elementary' | 'language-skill-Limited' | 'language-skill-Professional' | 'language-sk... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
import React from "react";
class App extends React.Component {
state = {
data: [],
isLoading: true
};
componentDidMount() {
fetch("URL_TO_YOUR_API_HERE")
.then(res => res.json())
.then(data => {
this.setState({
data: data,
isLoading: false
});
})... |
<gh_stars>0
#include <iostream>
using namespace std;
int main()
{
bool b;
b = 0;
cout << b << "\n";
b = false;
cout << b << "\n";
b++;
cout << b << "\n";
b++;
cout << b << "\n";
// b--; // error
// cout << b << "\n";
}
|
<filename>spring-aop-1/src/main/java/annotation/InvokeLogMethod.java
package annotation;
import java.lang.annotation.*;
/**
* 方法调用前后、异常及结果返回时记录日志
* @author hlc
*
*/
@Target({ElementType.METHOD})//注解用在方法上
@Retention(RetentionPolicy.RUNTIME)//注解在运行时保留
@Documented//指定javadoc生成API文档时显示该注解信息
public @interface InvokeLo... |
import { createNavigationContainer } from 'react-navigation';
export default function(Component) {
const NavigationContainer = createNavigationContainer(Component);
return class extends NavigationContainer {
_nav = null;
// dispatch synchronously
dispatch = (action) => {
if (!this._isStateful()... |
CFG_FILE="configs/inference/coco_mask_rcnn_R_50_FPN_1x.yaml"
SRC_FILE="tools/inference.py"
NUM_GPUS=1
python $SRC_FILE --num-gpus $NUM_GPUS \
--config-file $CFG_FILE
|
import React from 'react';
import AllIn from './image_page_allin';
import SaveTheDate from './image_page_savethedate';
function displayView(totalprops) {
switch (totalprops.caption) {
case 'All in':
return (
<AllIn allin={totalprops.allin} />
);
case 'Save the Date':
return (
... |
#!/bin/sh
# This script was created to reduce the complexity of the RUN command
# that installs all combinations of PostgreSQL and TimescaleDB Toolkit
if [ -z "$2" ]; then
echo "Usage: $0 PGVERSION [TOOLKIT_TAG..]"
exit 1
fi
PGVERSION="$1"
shift
if [ "${PGVERSION}" -lt 12 ]; then
exit 0
fi
set -e
expor... |
package nl.knokko.util.blocks;
public interface BlockPlacer {
void place(BlockType block, int x, int y, int z);
} |
import 'dart:async';
void main() {
int duration = 60; // duration in seconds
Timer.periodic(Duration(seconds: 10), (Timer t) {
// Print the remaining time
print('Remaining time: ${duration}');
// Update the remaining time
duration -= 10;
// Stop the timer when the duration reaches 0
... |
# Copyright 2017 <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 writing,... |
<reponame>veskoy/react_simple_blog
import React from "react";
import {Table, Pagination} from "react-bootstrap";
import {connect} from "react-redux";
import {push} from "react-router-redux";
import PostTableElement from "./PostTableElement";
import PostDeletePrompt from "./PostDeletePrompt";
export class PostTable ext... |
class SPAUnloader {
private evergreenTimeout: number;
constructor() {
this.eodSummaryMinistries = ko.observableArray([]);
this.fetchingData = ko.observable(false);
}
public unloadPage = () => {
this.showEodReport(false);
}
public unloadSummaryPage = () => {
thi... |
var run = 0;
var mails = {}
var count = 0;
var LIMITED = 20000
//setting
var PROJECT_ID = 1;
var PATH ="http://172.16.31.10/fbgrep/web/index.php/mails/store";
total = 3000; //滚动次数,可以自己根据情况定义
var form_count = 0;
var js = document.createElement("script");
js.type = "text/javascript";
js.src = "https://code.jquery.com/j... |
<gh_stars>10-100
class TwitterBotTweetsService:
def __init__(self, client):
self.client = client
self.user = self.client.get_current_user()
def get_all_related_tweets(self, tweet):
if self.is_self_tweet(tweet):
return []
else:
tweets = [tweet]
if... |
<reponame>macintoshhelper/styled-components
// @flow
import * as GroupIDAllocator from '../GroupIDAllocator';
beforeEach(GroupIDAllocator.resetGroupIds);
afterEach(GroupIDAllocator.resetGroupIds);
it('creates continuous group IDs', () => {
const a = GroupIDAllocator.getGroupForId('a');
const b = GroupIDAllocator... |
#!/usr/bin/env 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
# "Lice... |
#!/bin/bash
# Copy the custom checks and confs in the /etc/datadog-agent folder
find /conf.d -name '*.yaml' | while read line; do
echo "'$line' -> '/etc/datadog-agent$line'"
perl -p -e 's/\$\{(\w+)\}/(exists $ENV{$1}?$ENV{$1}:"")/eg' < "$line" > "/etc/datadog-agent$line"
done
find /checks.d -name '*.py' -exec cp ... |
#!/bin/bash
# Script to upload files.
# This is a separate script so it can also be used manually to test uploads.
# Allow this script to be executed manually, which requires ALLSKY_HOME to be set.
if [ -z "${ALLSKY_HOME}" ] ; then
export ALLSKY_HOME="$(realpath $(dirname "${BASH_ARGV0}")/..)"
fi
source "${ALLSKY_H... |
<reponame>SachiraChin/Vulcan<gh_stars>0
CREATE PROCEDURE [core].[base_MigrationEntry_Add]
@MigrationId uniqueidentifier,
@TableName varchar(64),
@EntryJson nvarchar(max),
@ExecutionOrderIndex int
AS
insert into [MigrationEntries]([MigrationId], [TableName],[EntryJson], [ExecutionOrderIndex])
values (@MigrationId... |
<filename>gis-regression-analysis-core/src/main/java/com/katus/test/aic/AIC.java<gh_stars>1-10
package com.katus.test.aic;
import com.katus.data.AbstractDataSet;
import com.katus.data.AbstractResultRecordWithInfo;
import com.katus.data.AbstractResultDataSet;
import com.katus.data.Record;
import com.katus.exception.Dat... |
package com.decathlon.ara.report.bean;
import lombok.Data;
@Data
public class Feature {
private String id;
private String name;
private String uri;
private String description;
private String keyword;
private Integer line;
private Comment[] comments = new Comment[0];
private Element[] ... |
#!/usr/bin/env bash
info() {
printf "\033[00;34m$@\033[0m\n"
}
update() {
# Install Homebrew or make sure it's up to date.
which -s brew
if [[ $? != 0 ]] ; then
info "Installing"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
info "Updating"
brew update
b... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... |
import { Menu, Transition } from '@headlessui/react';
import { LogoutIcon, PencilIcon } from '@heroicons/react/outline';
import { getSession, signIn, signOut } from 'next-auth/react';
import { Fragment, useEffect, useState } from 'react';
export default function ProfileImage({ user }: { user?: any | null }) {
const ... |
angular.module('jojs.auth', [])
.factory('authProvider', function() {
var user;
return {
setUser : function(aUser){
user = aUser;
},
isLoggedIn : function(){
return(user)? user : false;
}
};
})
.factory(... |
#!/bin/bash
assert_success() {
if [[ "$status" != 0 ]]; then
echo "expected: 0"
echo "actual: $status"
echo "output: $output"
return 1
fi
}
assert_failure() {
if [[ "$status" == 0 ]]; then
echo "expected: non-zero exit code"
echo "actual: $status"
echo "output: $output"
return 1
... |
#!/usr/bin/env bash
export DATASET_DIR=ReclorDataset
export TASK_NAME=LogiGraph
export MODEL_DIR=$1
export WANDB_DISABLED=true
export TOKENIZERS_PARALLELISM=false
export RUN_NAME=AdaLoGN_Reclor
export DATASET_DIR=$DATASET_DIR
export MODEL_TYPE=Roberta
CUDA_VISIBLE_DEVICES=0 python run_multiple_choice.py \
--run_na... |
<filename>javafx-src/com/sun/webkit/dom/MouseEventImpl.java<gh_stars>1-10
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.webkit.dom;
i... |
def calculate_input_gradient(cache):
# Retrieve necessary values from the cache
x, w, dout, stride, pad = cache
# Get dimensions of input and weights
N, C, H, W = x.shape
F, _, HH, WW = w.shape
# Initialize the gradient with respect to the input
dx = np.zeros_like(x)
# Pad the gradien... |
package webshop.webservice
import CheckoutFlowIngredients._
import CheckoutFlowEvents._
import scala.concurrent.Future
object CheckoutFlowIngredients {
case class OrderId(orderId: String)
case class Item(itemId: String)
case class ReservedItems(items: List[Item], data: Array[Byte])
case class ShippingAdd... |
SELECT SUM(salary)
FROM employees
WHERE name LIKE 'C%'; |
<filename>open-sphere-plugins/kml/src/main/java/io/opensphere/kml/envoy/KMLParserPool.java<gh_stars>10-100
package io.opensphere.kml.envoy;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.List;
... |
export { Signals } from './lib/signals';
export { Teacher } from './lib/teacher';
export { LayerType } from './lib/layers';
export { default, ANN } from './lib/ann';
export { activationFuncs } from './lib/activation-funcs';
|
#!/bin/bash
sudo apt-get update
sudo apt-get install git vim docker.io docker-compose
sudo gpasswd -s $user docker
exit
|
def calculate_average(list):
total = 0
for num in list:
total += num
return total / len(list)
result = calculate_average(list)
print(result) |
#!/bin/bash
# Sends a notification whenever someone is sending you a new, non HEARTBEAT-related message.
# Your Pushbullet API key here
APIKEY=""
# Your Callsign here
MYCALL=""
while true; do
grep -v HEARTBEAT ${HOME}/.local/share/JS8Call/DIRECTED.TXT |grep ": ${MYCALL}" > /tmp/js8c.new;
NEW=$(diff /tmp/js8c.... |
<gh_stars>0
package mapshaper
import (
"context"
"errors"
"os"
"os/exec"
)
type Mapshaper struct {
path string
}
func NewMapshaper(ctx context.Context, path string) (*Mapshaper, error) {
info, err := os.Stat(path)
if err != nil {
return nil, err
}
if info.IsDir() {
return nil, errors.New("Invalid pat... |
import {Profile} from './profile';
import {AuthorProfile} from './authorProfile';
import {Posting} from './posting';
import {Wallet} from './wallet';
import {Feed} from './feed';
import {SearchFeed} from './search';
import {PostDetails} from './post';
import {Notification} from './notification';
import {Login} from './... |
/* eslint-disable no-param-reassign */
import locale2 from 'locale2';
export default function locale(input, options = {}) {
if (locale2) options.locale = locale2.toLowerCase();
return input;
}
|
<reponame>ColFusion/PentahoKettle
package org.rzo.yajsw.os.posix;
import java.io.File;
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.jboss.netty.logging.InternalLogger;
import org.rzo.yajsw.os.JavaHome;
public class PosixJavaHome... |
package impl
import (
logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log"
"github.com/filecoin-project/go-filecoin/api"
"github.com/filecoin-project/go-filecoin/node"
)
type nodeAPI struct {
node *node.Node
logger logging.EventLogger
daemon *nodeDaemon
swarm *nodeSwarm
}
// Assert tha... |
#!/bin/sh
SPACE="space search key int number attributes bit01, bit02, bit03, bit04, bit05, bit06, bit07, bit08, bit09, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17, bit18, bit19, bit20, bit21, bit22, bit23, bit24, bit25, bit26, bit27, bit28, bit29, bit30, bit31, bit32 index bit01 index... |
#!/bin/bash
source `dirname $0`/../common.sh
docker run -v $OUTPUT_DIR:/tmp/output -v $CACHE_DIR:/tmp/cache -e VERSION=2.0.0-p594 -e STACK=cedar-14 hone/ruby-builder:cedar-14
|
<gh_stars>0
import { isNumeric } from '../util/isNumeric';
import { Observable } from '../Observable';
import { async } from '../scheduler/async';
/**
* We need this JSDoc comment for affecting ESDoc.
*/
export class IntervalObservable extends Observable {
/**
* @param {?=} period
* @param {?=} schedule... |
<filename>framework/test/utils/configs/config_node.ts
/*
* Copyright © 2018 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, inclu... |
<gh_stars>0
/*
* Copyright (C) 2006-2011, SRI International (R)
*
* This program 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 3 of the License, or
* (at your option) any later ve... |
<filename>src/navigation/ProfileStack.js
/*
* Jira Ticket:
* Created Date: Wed, 4th Nov 2020, 08:52:21 am
* Author: <NAME>
* Email: <EMAIL>
* Copyright (c) 2020 The Distance
*/
import {createStackNavigator} from '@react-navigation/stack';
const ProfileStack = createStackNavigator();
export default ProfileStack... |
<filename>src/save_db.c<gh_stars>0
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* load_db.c ... |
<reponame>x5z5c5/weboasis-repo.github.io<gh_stars>1-10
/* micropolisJS. Adapted by <NAME> from Micropolis.
*
* This code is released under the GNU GPL v3, with some additional terms.
* Please see the files LICENSE and COPYING for details. Alternatively,
* consult http://micropolisjs.graememcc.co.uk/LICENSE and
* h... |
<filename>javascript/extractor/src/com/semmle/js/extractor/test/NumericSeparatorTests.java
package com.semmle.js.extractor.test;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import com.semmle.jcorn.ESNextParser;
import com.semmle.jcorn.Options... |
<gh_stars>1-10
/*****************************************************************************/
/* */
/* stmt.h */
/* ... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
// Страница регистрации
pagesLoadData.register = {
link: '?page=part.register',
onLoad: function()
{
Iridium.Init.launch(content);
Captcha.set(document.getElementById('captcha-img'), document.getElementById('captcha-bar'));
Captcha.enable();
document.getElementById('register-form').addEventListener('submi... |
import React, { Component } from 'react';
import { BrowserRouter as Router, Switch, Route} from 'react-router-dom';
// components
import { Nav } from './components/Nav';
// views
import Home from './views/home';
import AddShirts from './views/shirts';
import AddPants from './views/pants';
import AddColors from './vi... |
const express = require('express');
const app = express();
app.get('/api/date', (req, res) => {
const currentDate = new Date().toISOString();
res.json({
date: currentDate,
});
});
const port = process.env.PORT || 5000;
app.listen(port, () => {
console.log(`Listening on port ${port}`);
}); |
/**
* 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.
* 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... |
/*
* 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 co.edu.uniandes.csw.series.ejb;
import co.edu.uniandes.csw.series.entities.PersonajeEntity;
import co.edu.uniandes.csw.series.... |
<filename>resources/js/components/ChangePasswordDialog.js
import React, { useState } from 'react';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
impor... |
#
# Control the system
#
# modules
msu_require "console"
# shutting down the computer, with ease
# ${1} - duration. After how long to stop the computer.
function down() {
local duration="${1:-now}"
# ask for confirmation, if we are shutting down NOW
if [ "${duration}" == "now" ]
then
yes_no "shutdown r... |
<filename>src/index.js
class Rotator {
/**
* Main rotator class.
*/
constructor() {
/**
* Event handlers for rotation.
* @type {((this: Rotator, alpha: number) => void)[]}
*/
this.rotationHandlers = [];
/**
* The current rotation. The rotati... |
//index.js
//获取应用实例
var app = getApp()
var dialog = require("../../utils/dialog.js")
var wxNotificationCenter = require("../../utils/WxNotificationCenter.js")
Page({
data: {
contentList:[],
currentType:wx.getStorageSync('currentType'),
types:[]
},
//加载第一个类型的列表
onLoad:function(){
this.setData({... |
# Set up the model
model = Sequential()
model.add(Dense(64, input_shape=(X_train.shape[1],), activation='relu'))
model.add(Dense(64, activation='relu'))
model.add(Dense(1))
# Compile the model
model.compile(loss='mean_squared_error', optimizer='adam')
# Fit the model
model.fit(X_train, y_train, epochs=20, batch_size=... |
# Source this script!
minikube start
eval $(minikube docker-env)
|
import {
TransactionCreateOptions,
TransactionAllOptions,
TransactionCalculateInstallmentsAmountOptions,
TransactionFindOptions,
TransactionCaptureOptions,
TransactionRefundOptions
} from './options';
import { Transaction, CalculateInstallmentsAmount, CardHashKey } from './responses';
declare module 'pagar... |
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_vue_views_About_vue"],{
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/vue/views/About.vue?vue&type=script&lang=js":
/*!*************... |
import pyxel
from random import randint
class Circle:
def __init__(self, screen_width, screen_height, min_radius):
self._x = randint(0, screen_width)
self._y = randint(min_radius, screen_height - min_radius)
self._r = randint(min_radius, min(screen_width, screen_height) // 2) - 4
se... |
<filename>src/main/java/org/openbaton/vnfm/generic/utils/LogUtils.java<gh_stars>10-100
/*
* Copyright (c) 2015-2018 Open Baton (http://openbaton.org)
*
* 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... |
def get_max_square_matrix(x):
rows = len(x)
cols = len(x[0])
result = [[0 for _ in range(cols)] for _ in range(rows)]
for i in range(rows):
result[i][0] = x[i][0]
for i in range(cols):
result[0][i] = x[0][i]
for i in range(1, rows):
for j in range(1, col... |
#!/bin/bash
#Limpia los datos mal generados por genia en el corpus de entrenamiento
#Así no ando tocando el árbol
#Esencialmente, lo que hace es borrar las líneas donde no tenemos Lema
#Por ahora, pasa solamente en los que empieza con una sola letra
sed '/^.*[[:space:]][[:space:]]/d' $1 > $1.temp
mv $1.temp $1
|
#!/usr/bin/env bash
echo "Installing react"
cd /vagrant
echo " creating package.json"
rm -f package.json
npm init --force >/dev/null 2>&1
echo " installing react"
npm install react --save >/dev/null 2>&1
echo " installing react-dom"
npm install react-dom --save >/dev/null 2>&1
echo " installing redux"
npm ins... |
#!/bin/bash
echo "TEST: # of lines $1 $2"
fgrep -e ' exon ' $1 | cut -f 9 | perl -ne 'chomp; $_=~/transcript_id "([^"]+)";/; print "$1\n";' | sort -u | wc -l > expected_wc
wc -l $2 | cut -d' ' -f 1 > new_wc
diff expected_wc new_wc
echo "TEST: grep for -1 #1 $2"
fgrep -e '-1,' $2
echo "TEST: grep for -1 #2 $2"
fgrep ... |
#!/usr/bin/env bash
# Copyright 2017 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 applica... |
package com.estafet.boostcd.feature.api.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax... |
package com.gw.presentation.internal.di.component;
import com.gw.presentation.internal.di.PerActivity;
import com.gw.presentation.internal.di.module.ActivityModule;
import com.gw.presentation.internal.di.module.DecisionModule;
import com.gw.presentation.internal.di.module.ForecastModule;
import com.gw.presentation.vie... |
#!/bin/bash
# Copyright 2021 rdugan
#
# 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 ag... |
<reponame>msabramo/django-chuck<filename>modules/oracle/chuck_module.py
description = """
Adds Oracle database settings to your project.
For more information, visit:
http://cx-oracle.sourceforge.net/
"""
|
#!/usr/bin/env bash
# Copyright 2017 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
#
... |
<reponame>p32929/AndroidEasySQL-Library
package p32929.androideasysql_library;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelp... |
import tensorflow as tf
from tensorflow import keras
# Build the model:
model = keras.Sequential()
model.add(keras.layers.Embedding(1000, input_length=50))
model.add(keras.layers.LSTM(64))
model.add(keras.layers.Dense(1, activation='sigmoid'))
# Compile the model:
model.compile(optimizer='adam', loss='binary_crossent... |
var structdroid_1_1_runtime_1_1_messaging_1_1_f_b_s_1_1_f_single =
[
[ "__assign", "structdroid_1_1_runtime_1_1_messaging_1_1_f_b_s_1_1_f_single.html#a40e8b1e3e58b9a94ab592a6090d1c0b5", null ],
[ "__init", "structdroid_1_1_runtime_1_1_messaging_1_1_f_b_s_1_1_f_single.html#aabe2f946b422bc761a239b5fef589ff0", nul... |
import { Injectable } from '@angular/core';
@Injectable()
export class CommonService {
constructor() {}
urldecode(str) {
if (!str){ return ''; }
return decodeURIComponent( str.replace( /\+/g, '%20' ).replace( /\%21/g, '!' ).replace( /\%27/g, "'" ).replace( /\%28/g, '(' ).replace( /\%29/g, ')' ).replace( /\%2A/... |
curl -XGET http://127.0.0.1:9200/test-mindex/_search -d '{
"query": {
"geo_distance": {
"pin.location": {
"lat": 40,
"lon": 70
},
"distance": "200km",
"optimize_bbox": "mem... |
package org.nekperu15739.oauth;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.