text stringlengths 1 1.05M |
|---|
package com.jgabrielfreitas.blurimageview;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChange... |
<filename>src/app/app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
isLoggedIn:boolean= false;
title: string = "Revature Community";
constructor() {}
ngAf... |
// {namespace name=backend/swag_import_export/view/session}
// {block name="backend/swag_import_export/view/manager/session"}
Ext.define('Shopware.apps.SwagImportExport.view.manager.Session', {
extend: 'Ext.grid.Panel',
/**
* List of short aliases for class names. Most useful for defining xtypes for widget... |
package pulse.io.readers;
import java.io.File;
import pulse.util.Reflexive;
/**
* There are two types of {@code AbstractHandler}s, which are used to either
* update/populate existing objects or convert data into new objects of a given
* type. The superclass contains basic methods of checking compliance to a
* pr... |
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int n = 16;
cout << sqrt(n);
return 0;
} |
<filename>src/codersrank-activity.js
import { fetchData } from './shared/fetch-data';
import { renderChart } from './shared/render-chart';
import { renderError } from './shared/render-error';
import { renderLoading } from './shared/render-loading';
import { icons } from './shared/icons';
// eslint-disable-next-line
co... |
import { useSelector } from "react-redux";
/**
* @typedef {import("../store/initialState").DefaultState} DefaultStateType
* @typedef {import("../store/initialState").DefaultUIAlertsObject} DefaultUIAlertsObject
*/
/**
* Select Redux store ui alerts data.
*
* @returns {DefaultUIAlertsObject} Store ui alerts stat... |
package fontysmultipurposelibrary.communication.messaging;
import fontysmultipurposelibrary.serialization.ISerializer;
import fontysmultipurposelibrary.serialization.SerializationProvider;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
public abstract class MessageHandlerBase<T> implement... |
#!/bin/bash
# This symlinks all dotfiles to ~/. It's safe to run multiple times and will prompt you about
# anything unclear.
answer_is_yes() {
[[ "$REPLY" =~ ^[Yy]$ ]] \
&& return 0 \
|| return 1
}
ask_for_confirmation() {
print_question "$1 (y/n) "
read -n 1
printf "\n"
}
execute()... |
<gh_stars>0
package engine.events;
import engine.collisions.HitBox;
import engine.entities.Entity;
/**
* An event that specifies a collision
* @author Albert
*/
public class CollisionEvent extends Event {
private HitBox collidedHitBox;
private Entity collidedWith;
/**
* Creates a new CollisionEve... |
/*
* Copyright 2014-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
import React from 'react'
import { NavLink } from "react-router-dom";
const Sidebar = ({links}) => {
const navigation = links
.filter(link => link.visible)
.map((link) =>
<NavLink key={link.title} to={link.path} activeClassName="sidebar-active" strict>
<span className={'sidebar-icon ' + link.i... |
#!/bin/sh
# AmpFuzz pre-fuzz config script
# Use this script to create/modify
# config files for the fuzz target
echo "time dgram udp wait root internal" >> /etc/inetd.conf
|
#!/usr/bin/env bash
# This file is only necessary due to https://github.com/hashicorp/terraform/issues/4149
terraform apply -target=module.cloud -auto-approve
terraform apply -target=module.galaxy -auto-approve
terraform apply -target=module.admin_user -auto-approve
terraform apply -auto-approve
echo "Run destroy.sh ... |
<filename>sentinel-pigeon-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/pigeon/SentinelPigeonProviderInterceptorTest.java
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License... |
def computeFibonacci(n):
if n<0:
print("Incorrect input")
elif n==1:
return 0
elif n==2:
return 1
else:
return computeFibonacci(n-1)+computeFibonacci(n-2) |
cmd=/home/jussi/src/dwilib/print_all.py
models="MonoN KurtN StretchedN BiexpN"
#for m in ${models}; do
# outfile=medians_roi1.txt
# ${cmd} -v -r 1 -s scans_az.txt -g 3+3 3+4 -m pmap/*_$m.txt >> ${outfile}
# ${cmd} -v -r 1 -s scans_pz.txt -g 3+3 3+4 -m pmap/*_$m.txt >> ${outfile}
# ${cmd} -v -r 1 -s scans_c... |
cd ../vendor/mame/
emmake make REGENIE=1 -j5 SUBTARGET=c64 SOURCES=src/mame/drivers/c64.cpp
cp mamec64.js ../../drivers
|
<reponame>ted80810/drb-estuary-salinity-ml
import torch
import torch.nn as nn
import time
# Simple LSTM made from scratch
class LSTMDA(nn.Module):
def __init__(self, input_dim, hidden_dim, recur_dropout = 0, dropout = 0):
super().__init__()
self.input_dim = input_dim
self.hidden_s... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/bigquery/storage/v1beta1/table_reference.proto
require 'google/api/resource_pb'
require 'google/protobuf/timestamp_pb'
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("google/cloud/bigquery/... |
<reponame>jasmaa/throw-trash-in-the-ocean
import os
import psycopg2
from dotenv import load_dotenv
def main():
"""Clears all db tables
"""
load_dotenv()
POSTGRES_HOST = os.getenv('POSTGRES_HOST')
POSTGRES_USER = os.getenv('POSTGRES_USER')
POSTGRES_PASSWORD = os.getenv('POSTGRES_PASSWORD')
... |
import React from "react";
import {
Document,
Page,
Text,
View,
PDFViewer,
Image,
} from "@react-pdf/renderer";
import { InvoiceLogo } from "Assets";
import EntryLine from "Components/EntryLine";
import Summary from "Components/Summary";
import Checkout from "Components/Checkout";
// Create Document Compon... |
<gh_stars>0
import { mkdirSync, writeFileSync } from "node:fs";
import os from "node:os";
import path from "node:path";
export function writeUserConfig(
oauth_token?: string,
refresh_token?: string,
expiration_time?: string
) {
const lines: string[] = [];
if (oauth_token) {
lines.push(`oauth_token = "${o... |
#include "DirectInput.h"
float DirectInput::rotx = 0;
float DirectInput::rotz = 0;
float DirectInput::scaleX = 1.0f;
float DirectInput::scaleY = 1.0f;
float DirectInput::moveLeftRight = 0.0f;
float DirectInput::moveBackForward = 0.0f;
float DirectInput::camYaw = 0.0f;
float DirectInput::camPitch = 0.0f;
float Direct... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_perm_camera_mic = void 0;
var ic_perm_camera_mic = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0z",
"fill": "none"
},
"children": []
}, {
"name": "p... |
<gh_stars>1-10
from . import DirProvider
class NullDirProvider(DirProvider):
def search(self):
return self.config['repos']
|
// 云函数入口文件
const cloud = require("wx-server-sdk");
cloud.init();
const db = cloud.database();
const nodemailer = require("nodemailer");
const transporter = nodemailer.createTransport({
service: "163",
port: 465,
secureConnection: true,
auth: {
user: "",
pass: "",
},
});
const mailOptions = {
from:... |
package io.opensphere.core.model;
/**
* An enumerated type set that represents all the possible relationships of two
* one-dimensional intervals.
*/
public enum RangeRelationType
{
/** One interval is before the other, no touching or overlap. */
BEFORE,
/** One interval is before the other, ... |
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2016 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppli... |
<filename>tapestry-core/src/main/java/org/apache/tapestry5/services/ApplicationStateCreator.java<gh_stars>0
// 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 owners... |
<filename>src/components/Button/styles.ts
import styled, { css } from 'styled-components'
import theme from '../../styles/theme'
interface WrapperProps {
btnType: string
size: string
}
export const Wrapper = styled.button<WrapperProps>`
${(props) =>
props.btnType === 'primary'
? css`
backgro... |
package com.infamous.framework.http.factory;
import com.infamous.framework.http.Async;
import com.infamous.framework.http.Body;
import com.infamous.framework.http.Header;
import com.infamous.framework.http.Headers;
import com.infamous.framework.http.HttpMethod;
import com.infamous.framework.http.MultiPart;
import com.... |
#!/usr/bin/env bash
# Inspired by
# ~/.osx — https://mths.be/osx
#
# Get Admin Upfront
#
sudo -v
# Keep-alive: update existing `sudo` time stamp until we're finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
#
# Run settings
#
for settings in $GROK_TOPICS/osx/settings/*; do
... |
<filename>mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/__envir__.js
__envir__.interpreter_name = 'python';
__envir__.transpiler_name = 'transcrypt';
__envir__.executor_name = __envir__.transpiler_name;
__envir__.transpiler_version = '3.7.16';
|
<reponame>updog123/EconomicGames_TEST<gh_stars>1-10
var iframe = document.getElementById("myFrame");
iframe.style.position = "relative";
set_element_size_style();
function set_element_size_style() {
iframe.style.width = iframe.parentElement.clientWidth + "px";
iframe.style.height = "600px"
}
window.addEventList... |
#!/bin/bash
#######################################################################################
# Compiles MUSEN locally.
# Requires common_config.sh in the same directory to run.
#
# To select version of MUSEN to build, run the script as
# $ ./make_musen_host.sh [--target=cli] [--target=gui] [--target=matlab]
# o... |
<reponame>kneczaj/youtube-viewer
import { Component, OnInit } from '@angular/core';
import {AuthenticationService} from '../services/authentication.service';
import {Router} from '@angular/router';
@Component({
selector: 'yv-profile-menu-page',
template: `
<div class="nav-item dropdown">
<ng-template [ng... |
#!/bin/bash
# Check if the script is being run as root
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root"
exit 1
fi
# Check if the unprovisioned_state directory exists
if [ -d "/var/aos/unprovisioned_state" ]; then
# Remove the unprovisioned_state directory and all its contents
rm -rf /var/aos/u... |
<filename>src/rules-configurations/eslint/comma-style.d.ts
import { RuleConfiguration } from '../../../support/Rule'
type Options = (("first" | "last") | {
exceptions?: {
[key: string]: boolean
}
})[]
type Configuration = RuleConfiguration<'comma-style', 'eslint', Options>
export default Configuration |
# models/customer.rb
class Customer < ApplicationRecord
end
# routes.rb
Rails.application.routes.draw do
resources :customers
end
# customers_controller.rb
class CustomersController < ApplicationController
def index
@customers = Customer.all
end
def create
@customer = Customer.create(customer_params)
end
de... |
GBP="Group-Based Policy"
[[ $ENABLE_NFP = True ]] && NFP="Network Function Plugin"
function gbp_configure_nova {
iniset $NOVA_CONF neutron allow_duplicate_networks "True"
}
function gbp_configure_heat {
local HEAT_PLUGINS_DIR="/opt/stack/gbpautomation/gbpautomation/heat"
iniset $HEAT_CONF DEFAULT plugin_d... |
const {logError, init} = require('../utils');
// Script steps
init();
logError('No tests written just yet...\n');
|
//
// mulle_objc_kvccache.h
// mulle-objc-runtime
//
// Created by Nat! on 18.07.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following... |
function handleRequest(method: string, path: string): string {
const uppercaseMethod = method.toUpperCase();
const predefinedEndpoints = ['endpoint1', 'endpoint2', 'endpoint3']; // Example predefined endpoints
if (predefinedEndpoints.includes(path)) {
if (uppercaseMethod === 'POST') {
return `Handling ... |
class DataProcessor:
def __init__(self, prefix: str):
self.prefix = prefix
def apply_operation(self, data: dict, operation: callable) -> dict:
"""
Apply the given operation to data attributes with names starting with the prefix.
Args:
data (dict): A dictiona... |
import random
characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
length = 8
randstring = ''.join(random.choice(characters) for i in range(length)) |
#!/bin/bash
source "common.sh"
$Multini -o "$OutIni" --set "$InIni" MultipleKeySection Key onlyone
compare
|
from typing import List
def bubble_sort(arr: List[int]) -> List[int]:
n = len(arr)
for i in range(n):
# Flag to check if any swap occurred in the current pass
swapped = False
for j in range(0, n-i-1):
if arr[j] > arr[j+1]:
arr[j], arr[j+1] = arr[j+1], arr[j]
... |
<reponame>lananh265/social-network
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_stop_circle = void 0;
var ic_stop_circle = {
"viewBox": "0 0 24 24",
"children": [{
"name": "g",
"attribs": {},
"children": [{
"name": "rect",
"attribs": {
"f... |
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
BRANCH=$(git symbolic-ref --short HEAD)
TAG=$(echo $BRANCH| sed 's/\(dev-[0-9]*\).*/\1/')
FILENAME="pipeline-$TAG.yml"
echo "branch=$BRANCH"
echo " tag=$TAG"
echo "# Created by script $0" > $FILENAME
echo "# From pipeline_template.yml" >> $FILENAME
echo "... |
import * as types from '../actionTypes';
export function addPlayer(name) {
return {
type: types.ADD_PLAYER,
name
}
}
export function sendVote(idFrom, idFor) {
return {
// type: types.SEND_VOTE,
type: types.SET_VOTE,
vote: {
from: idFrom,
for:... |
#!/bin/sh
# Copyright (c) 2013-2016 The bitphantom Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
set -e
srcdir="$(dirname "$0")"
cd "$srcdir"
if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v... |
<reponame>fernandobritto/CedroTech-API
import { Router } from 'express'
import usersRouter from '@app/users/routes/users.routes'
import sessionsRouter from '@app/users/routes/sessions.routes'
import documentsRouter from '@app/documents/routes/documents.routes'
const routes = Router()
routes.use('/users', usersRouter)... |
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# Modify default IP... |
function binarySearch(arr, val) {
let left = 0;
let right = arr.length - 1;
while (left <= right) {
const mid = Math.floor((left + right) / 2);
if (arr[mid] === val) {
return mid;
} else if (arr[mid] < val) {
left = mid + 1;
} else {
right = mid - 1;
}
}
return -1;
}
console.log(binarySearch(arr, val));... |
"""
Declares a @builtin decorator class for tagging php built-in functions, as well as implements and exports most if not all php built-in functions.
"""
import pyphp.scope as scope
import builtin
import string
import regex
import constants
import datetime
import lang
def gen_builtins():
modules=[constants, datetim... |
<reponame>akelly1954/Samples
#pragma once
/////////////////////////////////////////////////////////////////////////////////
// MIT License
//
// Copyright (c) 2022 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Soft... |
make_ros() {
local file=$1
local name=$2
local lan=$3
echo "/ip firewall address-list remove [/ip firewall address-list find list=$name]"
echo "/ip firewall address-list"
if [[ ! -z "$lan" ]]; then
echo "add address=10.0.0.0/8 disabled=no list=$name"
echo "add address=172.16.0.0/12 disabled=no list... |
<filename>Intro to JS Unit testing/test/ship_test.js<gh_stars>1-10
var expect = require('chai').expect;
describe('SHIP METHODS', () => {
describe('Check for ship', () => {
var checkForShip = require('../game_logic/ship_methods').checkForShip;
var player;
// Hook to reuse the player object
before(() =... |
import tkinter as tk
# create the application window
app = tk.Tk()
# set the title and size of the window
app.title('My GUI Application')
app.geometry("200x100")
# create a label
label = tk.Label(app, text = "Hello, world!")
# pack the label in the window
label.pack()
# always be sure to ensure th... |
#!/usr/bin/env bash
set -e
# SETTINGS
################################################################################
MICROWAVE_HOST="http://35.185.105.222"
MICROWAVE_PORT="8989"
MICROWAVE_PATH="/unoconv/pdf"
MICROWAVE_URL="${MICROWAVE_HOST}:${MICROWAVE_PORT}${MICROWAVE_PATH}"
# INPUT PROCESSING
####################... |
<gh_stars>1-10
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Events } from 'ionic-angular';
import { BluetoothlocationProvider } from '../../providers/btlocationprovider';
@Component({
selector: 'page-about',
templateUrl: 'about.html'
})
export class AboutPage ... |
/*
* This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 United States License.
* For more information go to http://creativecommons.org/licenses/by-nc/3.0/us/
*/
package org.eastsideprep.spacecritters.alieninterfaces;
/**
*
* @author gmein
*/
public class AlienSpecies {
public Strin... |
import re
def spell_correction(word):
# Remove punctuation
word = re.sub(r'[^\w\s]', '', word)
# Separate words using whitespace
word_list = word.split()
# Create a set to store the dictionary words
dict_words = set()
# Open the words.txt dictionary
with open('words.txt', 'r') as file:
# Read each ... |
package models;
import java.util.Date;
import java.util.concurrent.Callable;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.bson.types.ObjectId;
import org.jongo.MongoCollection;
import org.jongo.marshall.jackson.oid.Id;
//@lombok.Getter
public class Coin extends Model {
@Id
private Objec... |
<gh_stars>0
import java.util.regex.Pattern;
public class Abbreviator {
public String abbreviate(String string) {
return Pattern.compile("[a-zA-Z]{4,}").matcher(string).replaceAll(m -> {
var s = m.group();
var l = s.length();
return s.charAt(0) + Integer.toString(l - 2) +... |
#!/bin/bash
echo "Setting up virtual environment"
VENV="venv/bin/activate"
if [[ ! -f $VENV ]]; then
python3.8 -m venv venv
. $VENV
pip install --upgrade pip setuptools
if [ $1 == 'databricks' ]
then
echo "Installing dbt-spark"
pip install dbt-spark[ODBC] --upgrade --pre
elif [ ... |
class Customer
attr_accessor :name, :address
def initialize(name, address)
@name = name
@address = address
end
end |
INSERT INTO login_records (login_info_column) VALUES (#{param}) |
<reponame>vishaltanwar96/iTrack<filename>src/task/models.py
from django.db import models
from user.models import User
from project.models import Project
from shared.models import AbstractEntity, AbstractRemarksHistory
from itrack.model_field_validation import past_date_validator
class Task(AbstractEntity):
entit... |
<reponame>samuelgrigolato/tafeito<filename>src/components/App/index.tsx
import React, { useEffect } from 'react';
import { Routes, Route } from "react-router-dom";
import Login from '../../screens/Login';
import Tasks from '../../screens/Tasks';
import { useLocalStorage } from '../../hooks/useLocalStorage'
import { us... |
<div>
<h1>Restaurant Menu</h1>
<ul>
<li><strong>Burger</strong> - $5.00</li>
<li><strong>Fries</strong> - $2.50</li>
<li><strong>Soda</strong> - $1.00</li>
</ul>
</div> |
var activeCueIds = [];
var nScrubs = -1; //number of times scrubed. Could put in a function to reset after x number scrubs, and then instead load new subs in same genre.
$( document ).ready(function() {
//for when DOM is ready..
//initialise with subs:
scrubTrack(nScrubs + 1);
var iframe_active = $(".a... |
package com.example.masato.weatherforecast.model.weekweather;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by masato on 17/03/20.
*/
public class Item {
@Expose
@SerializedName("title")
private String title;
@Ex... |
<filename>plejd/types/Mqtt.d.ts
/* eslint-disable no-use-before-define */
export type TopicType = 'config' | 'state' | 'availability' | 'set';
export type TOPIC_TYPES = { [key: string]: TopicType };
export type MqttType = 'light' | 'scene' | 'switch' | 'device_automation';
export type MQTT_TYPES = { [key: string]: Mq... |
<reponame>opentaps/opentaps-1
/*
* 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, Versio... |
<filename>src/modules/chooseGame/view/pages/Profile/components/ImageInput/styles.ts
import styled from 'styled-components/native';
export const Image = styled.Image`
width: 120px;
height: 120px;
border-radius: 60px;
margin-bottom: ${({ theme }) => theme.layout.spacing(4)};
`;
|
#pragma once
// This file was created automatically, do not modify the contents of this file.
PRAGMA_DISABLE_DEPRECATION_WARNINGS
#include "CoreMinimal.h"
#include "ManageEventSender.h"
#include "Generate/Manage/ManagePawnAction_Repeat.h"
#include "Runtime/AIModule/Classes/Actions/PawnAction_Repeat.h"
// Source file... |
# 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 may not u... |
filtered_strings = [string for string in strings if re.match(r"^hello.*world$", string)]
# filtered_strings = ["hello_world"] |
#!/bin/bash
#SBATCH --account=def-dkulic
#SBATCH --gres=gpu:1 # request GPU generic resource
#SBATCH --cpus-per-task=2 #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.
#SBATCH --mem=8000M # memory per node
#SBATCH --time=0-01:30 # time (DD-HH:MM)
#SBATCH --output... |
#!/bin/sh -e
# only execute anything if either
# - running under orb with package = builder
# - not running under opam at all
if [ "$ORB_BUILDING_PACKAGE" != "builder-web" -a "$OPAM_PACKAGE_NAME" != "" ]; then
exit 0;
fi
basedir=$(realpath "$(dirname "$0")"/../..)
pdir=$basedir/packaging/FreeBSD
bdir=$basedir/_bu... |
import os
def get_recent_commits(directory_path):
"""
Returns a list of the most recent commit files in the specified directory.
Args:
directory_path (str): The path to the directory containing commit files.
Returns:
list: A list of the most recent commit files in the directory.
"""
c... |
#include <stdio.h>
int g_a = 100;
int g_arr[100][3];
int (*g_parr)[100][3] = &g_arr;
union { int a; unsigned short b; } g_foo = { 1 };
union { short a; char b[10]; } g_bar = { .b = "Hello" };
struct { int a; unsigned short b; } g_x = { 2, 3 };
struct { short a; char b[10]; int c; } g_y = { .b = "Hi", .a = 11 };
st... |
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-preferred-smartcard',
templateUrl: './preferred-smartcard.component.html',
styleUrls: ['./preferred-smartcard.component.css'],
encapsulation: ViewEncapsulation.None,
})
export class PreferredSmartcardComponent imp... |
<reponame>Anerco/SimpleWebAuthn
import {
PublicKeyCredentialCreationOptionsJSON,
RegistrationCredential,
RegistrationCredentialJSON,
} from '@simplewebauthn/typescript-types';
import utf8StringToBuffer from '../helpers/utf8StringToBuffer';
import bufferToBase64URLString from '../helpers/bufferToBase64URLS... |
#!/bin/bash
set -euo pipefail
# Deploy OAS Specification to Apigee
curl --fail -H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" -H "Accept: application/json;charset=utf-8" -H "Authorization: Basic ZWRnZWNsaTplZGdlY2xpc2VjcmV0" -X POST https://login.apigee.com/oauth/token -d "username=$APIGEE_USERNA... |
var proRubApp = angular.module('proRubApp', ['ngRoute'])
.config(['$interpolateProvider', '$routeProvider', '$locationProvider', function($interpolateProvider, $routeProvider, $locationProvider){
//set interpolateProvider to reset handlebars
$interpolateProvider.startSymbol('((');
$interpolateProvider.endSymbol('))... |
#!/bin/bash
set -euo pipefail
addOrDelete=${1:-add}
MACHINE_NAME=${2:-default}
gateway=$(docker-machine ip $MACHINE_NAME)
networkname=$(echo $(basename $(pwd)) | tr -d '[:punct:]')_default
subnet=$(docker network inspect mesosactor_default -f '{{(index .IPAM.Config 0).Subnet}}')
if [ "$addOrDelete" = "add" ]; then
... |
/* eslint-disable */
var icon = require('vue-svgicon')
icon.register({
'nodejs': {
width: 16,
height: 16,
viewBox: '0 0 24 24',
data: `<path pid="0" d="M11.435.153l-9.37 5.43c-.35.203-.564.578-.563.983V17.43c0 .404.215.78.564.982l9.37 5.435c.35.203.78.203 1.13 0l9.366-5.433a1.14 1.14 0 0 0 .565-.982V... |
package main
import "fmt"
func main() {
// 2. 在输出 world
defer fmt.Println("world")
// 1. 先输出 hello
fmt.Println("hello")
// 输出结果
// =======
// hello
// world
fmt.Println("counting")
for i := 0; i < 10; i++ {
defer fmt.Println(i)
}
fmt.Println("done")
// 输出结果
// =======
// counting
// done
// 9
// 8... |
#!/usr/bin/env bash
#
# install sidecar in kubernetes kind
#
set -o errexit
set -o pipefail
set -o nounset
CLUSTER_NAME="sidecar-testing"
BIN_DIR="$(mktemp -d)"
KIND="${BIN_DIR}/kind"
CWD="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
KIND_CONFIG="${CWD}/kind-config.yaml"
SIDECAR_MANIFEST="${CWD}/tes... |
<gh_stars>0
const previous = document.getElementById('previous');
const next = document.getElementById('next');
document.addEventListener('keydown', e => {
if(previous && e.keyCode === 37) {
previous.click();
}
if(next && e.keyCode === 39) {
next.click();
}
});
|
#! /bin/bash
# Openrtist screensaver script for GHC 9th floor Demo. This script launches a media player which displays a stream from
# a linux pipe.
# This script should be used together with ../stream_for_screensaver.sh
_V=0
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-v|--verbose)
_V=1
;;
... |
package test161
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"github.com/kevinburke/go.uuid"
"io/ioutil"
"os"
"os/exec"
"path"
"sort"
"strings"
"sync"
"time"
)
type SubmissionUserInfo struct {
Email string `yaml:"email"`
Token string `yaml:"token"`
KeyHash string `yaml:"-"`... |
<filename>biodwh2-reactome/src/main/java/de/unibi/agbi/biodwh2/reactome/etl/Neo4jSessionFactory.java
package de.unibi.agbi.biodwh2.reactome.etl;
import org.neo4j.ogm.config.Configuration;
import org.neo4j.ogm.session.Session;
import org.neo4j.ogm.session.SessionFactory;
/**
* Created by manuel on 13.01.20.
*/
publi... |
import TimeSegment from '../../../shared/modules/DataRender/vos/TimeSegment';
import Dates from '../../../shared/modules/FormatDatesNombres/Dates/Dates';
import ModuleMaintenance from '../../../shared/modules/Maintenance/ModuleMaintenance';
import MaintenanceVO from '../../../shared/modules/Maintenance/vos/Maintenance... |
<filename>test/controller/HomeControllerTest.java
package controller;
import akka.actor.ActorSystem;
import controllers.AssetsFinder;
import controllers.routes;
import org.junit.BeforeClass;
import org.junit.Test;
import play.Application;
import play.mvc.Call;
import play.mvc.Http;
import play.mvc.Result;
import pla... |
from argparse import ArgumentParser, Namespace
from blok.http_server import get_app
def parse_args() -> Namespace:
parser = ArgumentParser()
parser.add_argument("-b", "--bind", default="0.0.0.0")
parser.add_argument("-d", "--debug", default=False, type=bool)
parser.add_argument("-p", "--port", defaul... |
#! /bin/sh
tgt="$1"
drv="$2"
nix="${3:-$(nix-build --no-out-link '<nixpkgs>' -A nixUnstable)}"
shift ; shift; shift
"$(dirname "$0")/deploy-nix-to-chroot.sh" "$tgt" "$nix" "$drv" &> /dev/null
mkdir -p "$tgt"/{dev,sys,proc}
test -e "$tgt/dev/null" || mount --bind /dev "$tgt/dev"
test -e "$tgt/sys/class" || mount s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.