text stringlengths 1 1.05M |
|---|
#!/bin/bash
pkgver=4.2.2
if [[ -f /usr/bin/boostchanger ]]
then
rm /usr/bin/boostchanger
rm /usr/share/applications/boostchanger.desktop
rm /usr/share/pixmaps/boostchanger.png
echo "Boost Changer is successfully uninstalled"
fi |
// Copyright 2018 Sogou Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package com.sogou.sogocommon.utils;
/**
* Created by jnq on 2016/11/15.
*/
public class ShortByteUtil {
/**
* @功能 短整型与字节的转换
* @param
* @... |
<reponame>kolaczyn/rough-edit
import re
from datetime import timedelta
import os
def escape_string(string):
# escapes chars like ' and &
# strings I have to replace to make the * work
for sign in [' ', "'", '"', '(', ')', '&']:
string = string.replace(sign, '\\'+sign)
return string
def str_t... |
<filename>SMS/src/SMS/wwwroot/lib/jquery/src/manipulation/_evalUrl.min.js
define(["../ajax"],function(a){return a._evalUrl=function(r){return a.ajax({url:r,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},a._evalUrl});
//# sourceMappingURL=_evalUrl.min.js.map
|
package main
import (
"log"
"sync"
)
type tabWithContext struct {
tabContext
tab tab
}
type tabContext struct {
servConn *serverConnection
servState *serverState
chanState *channelState
pmState *privmsgState
}
type finderFunc func(*tabWithContext) bool
type tabRequestCreate struct {
ctx *tabContext
... |
import React from "react"
import { Badge, Card } from "react-bootstrap"
import {
FaUserMd,
FaStethoscope,
FaAddressBook,
FaHospitalSymbol,
FaHourglass,
} from "react-icons/fa"
import PropTypes from "prop-types"
import { useIntl, Link } from "gatsby-plugin-intl"
import Flag from "../flag"
import Avatar from ... |
PATH_TO_GOOGLE_PLISTS="${PROJECT_DIR}/RoyaleApp"
if [ "${CONFIGURATION}" = "Release" ]; then
"${PROJECT_DIR}/scripts/FirebaseCrashlytics/run" -gsp "$PATH_TO_GOOGLE_PLISTS/GoogleService-Info.plist"
else
"${PROJECT_DIR}/scripts/FirebaseCrashlytics/run" -gsp "$PATH_TO_GOOGLE_PLISTS/GoogleService-Info-Dev.plist"
fi... |
<reponame>wjimenez5271/migration-tools
// Copyright 2016 Google Inc. 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-... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2018 at 01:12 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
from typing import List, Tuple, Any
def sort_results(results: List[Tuple[Any, Any, Any]]) -> List[Tuple[Any, Any, Any]]:
return sorted(results, key=lambda r: -r[2]) |
// Each of these functions contructs a path for an endpoint.
const { Params } = require('../params.js')
module.exports = {
branch (params, extra) {
params = new Params({ ...params, ...extra })
const orgName = params.stringRequired('orgName')
const dbName = params.stringRequired('dbName')
return `/ap... |
<reponame>JakeSidSmith/watfish<gh_stars>0
import * as childProcess from 'child_process';
import * as colors from 'colors/safe';
import { Tree } from 'jargs';
import * as path from 'path';
import { DEFAULT_ENV, DISAPPROVAL, WAT } from './constants';
import * as logger from './logger';
import {
getConfigPath,
getEnvV... |
package com.example.mypc.esports2.main.news.newsinner;
import android.content.Intent;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.example.mypc.esports2.bean.AdBean;
import com.example... |
#!/bin/sh -f
xv_path="/home/huchao/vivado/Vivado/2015.2"
ExecStep()
{
"$@"
RETVAL=$?
if [ $RETVAL -ne 0 ]
then
exit $RETVAL
fi
}
ExecStep $xv_path/bin/xelab -wto 677a86e31c004618b5999f494e300815 -m64 --debug typical --relax --mt 8 -L xil_defaultlib -L unisims_ver -L unimacro_ver -L secureip --snapshot lab3_2_tb_behav x... |
package io.miti.jarman.data;
import io.miti.jarman.gui.JarPage;
import io.miti.jarman.gui.ListingsPage;
import io.miti.jarman.gui.ManifestPage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
im... |
<filename>src/test/java/com/github/jinahya/datagokr/api/b090041_/lunphinfoservice/client/LunPhInfoServiceClientTest.java
package com.github.jinahya.datagokr.api.b090041_.lunphinfoservice.client;
import lombok.extern.slf4j.Slf4j;
@Slf4j
class LunPhInfoServiceClientTest
extends AbstractLunPhInfoServiceClientTes... |
#ifndef LODTALK_STACK_INTERPRETER_HPP
#define LODTALK_STACK_INTERPRETER_HPP
#include "Lodtalk/InterpreterProxy.hpp"
#include "Method.hpp"
namespace Lodtalk
{
class StackInterpreter;
class VMContext;
class StackMemory;
//Oop interpretCompiledMethod(VMContext *context, CompiledMethod *method, Oop receiver, int argumen... |
<filename>src/rsa.ts
import { modPow } from "https://deno.land/x/modpow@v0.1.1/modpow.ts";
export const rsaEncrypt = (
text: bigint,
pubKey: bigint,
modules: bigint,
): Promise<string> => {
const biRet = modPow(text, pubKey, modules);
// leading zero fill
const result = biRet.toString(16).padStart(256, "0... |
package com.meida.model;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.ICallback;
import com.meida.model.base.BaseOriginalLogistic;
import com.meida.service.OrderService;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
* 原始物流
* Crea... |
<gh_stars>10-100
/**
* MIT License
*
* Copyright (c) 2018 Infineon Technologies AG
*
* 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 righ... |
#!/usr/bin/env bash
set -e
docker login -u="$DOCKER_LOGIN" -p="$DOCKER_PASSWORD"
docker tag zutherb/monolithic-shop:latest $DOCKER_LOGIN/monolithic-shop:latest
docker push $DOCKER_LOGIN/monolithic-shop:latest |
import { expect } from 'chai';
import Cascade, { observable } from 'cascade';
import { CrudConnection } from '../scripts/CascadeManager';
describe('CrudConnection', () => {
it('should Get from the server', () => {
var connection = new CrudConnection('https://jsonplaceholder.typicode.com/posts/');
... |
#!/bin/sh
SPATH=$(dirname $(readlink -f "$0"))
cd $SPATH/..
export LEMONDIR=$(pwd)
mkdir -p $HOME/.local/share/lemon/sysroot/system
mkdir -p $HOME/.local/share/lemon/sysroot/system/include
mkdir -p $HOME/.local/share/lemon/sysroot/system/lib
mkdir -p $HOME/.local/share/lemon/sysroot/system/bin
docker pull computerfi... |
#!/bin/bash
## ------------------------------------------------
## PubNub 3.3 Real-time Cloud Push API - JAVASCRIPT
## ------------------------------------------------
## ----------------------------------------------------
##
## TESTLING - PubNub JavaScript API for Web Browsers
## uses Testling Cloud Serv... |
<reponame>wujia28762/Tmate<gh_stars>0
package com.honyum.elevatorMan.activity.maintenance;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
impo... |
//-----------------------------------------------------------------------------
// File: Autorun.cpp
//
// The program entry point for the Autorun sample.
// Implementation of the base class for the Autorun functionality.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------... |
<filename>vec2.h
#ifndef __VEC2_H__
#define __VEC2_H__
#include <cmath>
#include <memory>
#if defined(__SSE4_1__)
#include <smmintrin.h>
#elif defined(__SSE2__)
#include <emmintrin.h>
#endif
#ifdef __SSE2__
typedef union {
__m128d v;
double xy[2];
} vector;
#endif //__SSE2__
class Vec2 {
#ifdef __SSE2__
vector... |
<gh_stars>10-100
#ifndef _BLE_PUB_H_
#define _BLE_PUB_H_
#include "rtos_pub.h"
#if defined(SUPPORT_MIDEA_BLE)
#include "msm_ble_adapter.h"
#endif
#define BLE_SUCCESS (0)
#define BLE_FAILURE (1)
#define BLE_DEV_NAME "ble"
#define BLE_CMD_MAGIC (0xe2a0000)
#define MAX_ADV_DATA_LEN (0x1F)
e... |
<gh_stars>0
import React, {Component} from "react"
// import PropTypes from "prop-types"
// import {Link} from "react-router"
// import FlatButton from "material-ui/FlatButton"
// import Popover from "material-ui/Popover"
// import Menu from "material-ui/Menu"
// import MenuItem from "material-ui/MenuItem"
class Landi... |
export const assets = {};
assets["character1"] = new URL("./1.jpeg", import.meta.url);
assets["character35"] = new URL("./35.png", import.meta.url);
assets["character83"] = new URL("./83.png", import.meta.url);
assets["character96"] = new URL("./96.png", import.meta.url);
assets["character316"] = new URL("./316.png", i... |
apt -y update
apt -y install git
apt -y install screen
git clone https://github.com/Envinorma/data-tasks.git
cd data-tasks
apt -y install python3-pip
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
apt-get -y remove ocrmypdf
apt-get -y update
apt-get -y install \
ghostscript \
icc-profiles-free... |
// cc29 robotPaths
[
[ true, false, false, false, false ],
[ false, false, false, false, false ],
[ false, false, false, false, false ],
[ false, false, false, false, false ],
[ false, false, false, false, "destination" ]
]
/*
*
* A robot located at the top left corner of a 5x5 grid is trying to reach th... |
<reponame>msaveleva/RSS-Reader
//
// SourcesManager.h
// RSS-Reader
//
// Created by MariaSaveleva on 08/02/2017.
// Copyright © 2017 MariaSaveleva. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FeedItem;
@class FeedSource;
@class Feed;
NS_ASSUME_NONNULL_BEGIN
/// Handle all model changes. Po... |
<gh_stars>0
import { Component, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { base64ToFile, ImageCroppedEvent, ImageTransform } from 'ngx-image-cropper';
import { HttpEventType, HttpResponse } fro... |
<reponame>AbdifatahZamiir/TaskListApp<filename>web/src/utils/fetchData.js<gh_stars>0
import axios from "axios";
import config from "../config.json";
export async function getTodo(todoId) {
const { data: todo } = await axios.get(`${config.apiUrl}/${todoId}`);
if (!todo) return this.props.history.replace("/not-found"... |
<gh_stars>0
package org.linlinjava.litemall.core;
import org.apache.ibatis.reflection.ArrayUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.linlinjava.litemall.core.notify.NotifyService;
import org.linlinjava.litemall.core.notify.NotifyType;
import org.linlinjava.litemall.core.util.DateTimeUtil... |
<gh_stars>0
import socket
import time
import threading
from queue import Queue
socket.setdefaulttimeout(0.25)
print_lock = threading.Lock()
target = input('Host to be scanned: ')
t_IP = socket.gethostbyname(target)
print ('Starting scan on host: ', t_IP)
def portscan(port):
s = socket.socket(socket.AF_INET, socke... |
#!/usr/bin/env bash
set -e
export SENTRY_TEST_HOST="${SENTRY_TEST_HOST:-http://localhost:9000}"
TEST_USER='test@example.com'
TEST_PASS='test123TEST'
COOKIE_FILE=$(mktemp)
# Courtesy of https://stackoverflow.com/a/2183063/90297
trap_with_arg() {
func="$1" ; shift
for sig ; do
trap "$func $sig "'$LINENO' "$sig"... |
#!/bin/bash
VERSION=`date "+%Y%m%d%H"`
APP_NAME="memcached_exporter"
GO_ARCH=`go env| grep GOARCH|awk -F\" '{print $2}'`
cd `dirname $0`
WORKDIR=`pwd| sed 's#.*/src#/go/src#g'`
docker run --rm -it -v ${GOPATH}:/go -w ${WORKDIR} golang:latest go build -o ${APP_NAME}-${VERSION}.linux.${GO_ARCH} -v
echo "Linux Packagi... |
<filename>ramanpy/process_results_raman.py
import string
import numpy as np
import pandas as pd
from configobj import ConfigObj
from ramanpy import RamanFit
class ReadResultParamsFit:
"""
A class to read a result file from fitting of raman/xrd spectra
This class is used in ResultsDataFrames to... |
<reponame>saya-ac-cn/go<filename>unit5/start6.go
package main
import "fmt"
func main() {
defer func() {
if err := recover(); err != nil{
fmt.Println(err)
}
}()
defer func() {
panic("first defer panic")
}()
defer func() {
panic("second defer panic")
}()
panic("main body panic")
}
|
import os
import shutil
def performBuildActions():
# Remove the directory named "build/units_arm32" if it exists
if os.path.exists("build/units_arm32"):
shutil.rmtree("build/units_arm32")
# Create a new directory named "build/units_arm32"
os.makedirs("build/units_arm32")
# Compile the pro... |
<filename>jeecg-boot-module-system/src/main/java/org/jeecg/modules/activiti/service/impl/ActivitiServiceImpl.java
package org.jeecg.modules.activiti.service.impl;
import org.activiti.bpmn.model.BpmnModel;
import org.activiti.engine.HistoryService;
import org.activiti.engine.RepositoryService;
import org.activiti.engin... |
def get_unique_name(vdir, names):
base_name = vdir.split('/')[-1] # Extract the base name of the virtual directory
unique_name = base_name
counter = 1
while unique_name in names:
unique_name = f"{base_name}_{counter}" # Append a counter to the base name if it's not unique
counter += 1
... |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by <NAME>, <EMAIL>, All rights reserved.
# LLNL-CODE-647188
#
# For det... |
<reponame>jinshiyi11/AndroidPerformanceMonitor
package com.tencent.wstt.gt.collector.util;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningAppProcessInfo;
import android.content.Context;
/**
* Created by elvis on 2017/2/24.
*/
public class ProcessUtil {
/**
* 判断进程是否包含Applicat... |
# Note: Script must be run as root (sudo OK) because it writes file in LIB directory
# Create startup shell that runs python script
echo "/usr/bin/python /home/bruce/pitoys/raspberrypi/buttonpressed.py" > /home/bruce/startup.bash
# for debug, add > log.txt 2>&1 at the end to cause all info to be written to a log file ... |
class UsersModel {
constructor(psql) {
this.psql = psql;
}
getConnectedUsers() {
return this.psql.query("SELECT * FROM logtimes_logtimes AS logs WHERE logs.end_at IS NULL")
.then(result => result.rows);
}
}
module.exports = UsersModel;
|
fn is_length_odd(input: &str) -> bool {
let len = input.len();
if len % 2 == 1 {
true
} else {
false
}
}
fn main() {
println!("{}", is_length_odd("hello")); // Output: true
println!("{}", is_length_odd("world")); // Output: false
} |
#!/usr/bin/env python
import matplotlib.pyplot as plt
positions = [0.5, 1.5, 2.5, 3.5, 4.5, 5.5]
countries = ['India', 'Brazil', 'USA', 'China', 'EU', 'Argentina']
cattle_numbers = [3.03e8, 2.44e8, 9.44e7, 9.14e7, 8.70e7, 5.37e7]
plt.bar(positions, cattle_numbers, tick_label=countries)
plt.xlabel('Country/Region')
p... |
#!/bin/bash
# set the number of nodes and processes per node. We are running one process on a single node
#SBATCH --nodes=32
#SBATCH --ntasks-per-node=1
#SBATCH --mem=50Gb
# uncomment if NUM_QUBITS - log2(NUM_NODES) > 30
####SBATCH --mem=100Gb
# set max wallclock time
#SBATCH --time=05:00:00
# set name of job
#SBAT... |
<reponame>alemesa1991/School-Projects
#include <iostream>
#include <string>
using namespace std;
class X {
string name;
uint8_t memBlock[1024*1024]; // 1 MByte
public:
X(const std::string& n) { name = n; cout << "X ctor " << name << "\n"; }
~X() { cout << "X dtor " << name << "\n"; }
void hello() const { co... |
#include <stdlib.h>
#include <stdio.h>
#include "palindrome.h"
int main(int argc, char** argv) {
// Define method variables
int exitCode = 0;
int limit = 999;
int a = 0;
int b = 0;
int biggestPalindrome = 0;
// Loop through all possible products and capture the biggest palindrome
f... |
// WPT-specific test checking that WebGPU is available iff isSecureContext.
import { assert } from '../../common/util/util.js';
// TODO: Test all WebGPU interfaces.
const items = [
globalThis.navigator.gpu,
globalThis.GPU,
globalThis.GPUAdapter,
globalThis.GPUDevice,
globalThis.GPUBuffer,
globalThis.GPUB... |
package malte0811.controlengineering.logic.schematic;
import it.unimi.dsi.fastutil.ints.IntSet;
import malte0811.controlengineering.ControlEngineering;
import malte0811.controlengineering.logic.schematic.symbol.PlacedSymbol;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableCom... |
#!/bin/bash
# Copyright 2019 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 require... |
<reponame>powerumc/runcode
export * from "./application-logger-service";
|
<reponame>lshqqytiger/JJWAK
const FS = require("fs");
const { iterateLine, orderByKey, withComma } = require("./common");
const NAME = process.argv[2];
const METHOD = process.argv[3];
const PATH = process.argv[4];
if(!NAME || !METHOD || !PATH){
console.info("Usage: node xhr.js NAME METHOD PATH");
process.exit();
... |
<reponame>ideacrew/pa_edidb
class ShopQualifyingLifeEvent < QualifyingLifeEvent
SHOP_QLES = %W[
adoption
birth
contract_violation
death
divorce
exceptional_circumstances
location_change
lost_access_to_mec
marriage
termination_of_benefits
]
embedded_in :family
end |
<filename>analysis/plotting.py
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
#!/bin/sh
cd src || exit
nim c --out:../ng2bounce --multimethods:on bounce.nim
cd ..
|
def getCombinations(word):
combinations = []
for i in range(len(word)):
for j in range(i+1, len(word)+1):
combinations.append(word[i:j])
return combinations |
//инициализация библиотек
#include <windows.h>
#include <conio.h>
#include <iostream>
//устанавливаем пространство имён
using namespace std;
//класс Sokoban, в котором описана вся игра
class Sokoban
{
private:
//выбранный уровень
unsigned short int lvl;
public:
//конструктор
Sokoban()
{
set... |
def age(month, day):
# Get the current date
today = datetime.date.today()
# Get the birth date
birth_date = datetime.date(today.year, month, day)
# If the birth date has not occurred yet this year, subtract 1 from the age
if birth_date > today:
age = today.year - birth_date.year - 1
... |
class DefaultSubscription:
pass
class Observable:
def __init__(self):
self.observers = []
def add_observer(self, observer):
self.observers.append(observer)
def remove_observer(self, observer):
self.observers.remove(observer)
def notify_observers(self, value, is_complete=F... |
import nltk
#tokenize the text
text = "John and Mary went to the park. They had a great time."
tokenized_text = nltk.word_tokenize(text)
# tag the tokens with their part-of-speech
tagged_words = nltk.pos_tag(tokenized_text)
# filter for proper nouns
names = [word for word,pos in tagged_words if (pos == 'NNP' or pos ... |
#!/bin/bash
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
|
export type ViewState = {
downloadsIsOpen: boolean
timeZone: string
}
export type ViewAction = TIME_ZONE_SET | DOWNLOADS_SHOW | DOWNLOADS_HIDE
export type TIME_ZONE_SET = {
type: "TIME_ZONE_SET"
timeZone: string
}
export type DOWNLOADS_SHOW = {
type: "DOWNLOADS_SHOW"
}
export type DOWNLOADS_HIDE = {
typ... |
/*
Create the database based on this schema if it doesn't already exist.
If it does exist, drop it and create it from scratch.
This will set up a single table with three fields:
"id", "title", and "text"
*/
drop table if exists entries;
create table entries (
id integer primary key autoincrement,
title text not n... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 08, 2018 at 04:35 PM
-- Server version: 5.6.33-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
import React, { FC, useContext } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import moment from 'moment';
import { Routes } from 'lib-client/constants';
import { withBem } from 'utils/bem';
import { getIsAdmin, getIsPostOwner } from 'lib-client/permissions';
import Button from 'component... |
#!/bin/bash
source inc_vars.sh
# Script for multiple shallow water equation tests
cp par/swmnew.par par/swm.par
sh/runngridsHR95_8.sh
sh/runngridsSCVT_8.sh
cp par/swmtrsk.par par/swm.par
sh/runngridsHR95_8.sh
sh/runngridsSCVT_8.sh
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _UtilInherits = _interopRequireDefault(require("./UtilInherits"));
var _Prototypal = _interopRequireDefault(require("./Prototypal"));
var _GlobalExtends = _interopRequireDefault(require("./GlobalExtends")... |
import React, { Component } from 'react';
import profile from '../../images/profile-pictures.jpg';
import Index from '../Common/index';
import Alerts from './alerts';
import { NavLink } from 'react-router-dom';
class Profile extends Component {
constructor(props){
super(props);
this.state={
... |
/*
* 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 ... |
/*!
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required ... |
from feature_judge import is_monotone_increase
from util import generate_random_list
def test_monotone_increase():
for _ in range(10): # Perform 10 random tests
test_list = generate_random_list() # Generate a random list
expected_result = all(test_list[i] <= test_list[i + 1] for i in range(len(te... |
/* mksignames.c -- Create and write `signames.h', which contains an array of
signal names. */
/* Copyright (C) 1992-2006 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software: you can redistribute it and/or modify
it under the terms of the GNU General... |
<gh_stars>1-10
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
import { EdiumSummary, LoadedState } from "./slices.types";
const loadSummary = createAsyncThunk(
"summary/load",
async function () {
const res = await fetch("http://localhost:59130/edia");
const json = await res.json();
... |
<reponame>jtmccormick18/electron-react-bp
/* jshint indent: 1 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('dataEdits', {
recid: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true,
field: 'RECID'
},
pkey: {
type: DataTypes.INTEGER... |
import LoginScreen from "./LoginScreen"
import strings from "./strings"
export { strings }
export default LoginScreen |
#!/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)"... |
/*
* Benchmark.java
*
* Created on May 30, 2007, 9:45 PM
*
* From "The Art of Multiprocessor Programming",
* by <NAME> and <NAME>.
*
* This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
* http://i.creativecommons.org/l/by-sa/3.0/us/88x31.png
*/
package tamp.ch18... |
#!/bin/bash
#
# Copyright (C) 2013-2014 Red Hat, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... |
#!/usr/bin/env bats
load helpers
function teardown() {
cleanup_test
}
# 1. test running with ctr unconfined
# test that we can run with a syscall which would be otherwise blocked
@test "ctr seccomp profiles unconfined" {
# this test requires seccomp, so skip this test if seccomp is not enabled.
enabled=$(is_secco... |
#!/usr/bin/env bash
set -eEuox pipefail
# Lock
is_locked=0
lock_id=datamaintain
lock_collection=datamaintainLock
mongo_eval() {
mongo "$MONGO_URI" --quiet --eval "$1"
}
echo "Start datamaintain"
# loop while not locked
while [ "$is_locked" -eq 0 ]
do
echo "Remove expired lock"
mongo_eval "db.getCollectio... |
/* **** Notes
Concatenate
Remarks:
Release at the *di.
*/
# define CAR
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl concat_argv(signed(offset),signed char(**di),signed char(**si))) {
/* **** DATA, BSS and STACK */
auto signed i,r;
/* **** CODE/TEXT */
if(offset<(0x00)) return(0x00);
if(... |
package org.hisp.dhis.reporttable;
/*
* Copyright (c) 2004-2012, 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 ... |
require 'erb'
data = DATA.read
max = 1_500_000
title = "hello world!"
content = "hello world!\n" * 10
src = "def self.render(title, content); #{ERB.new(data).src}; end"
mod = Module.new
mod.instance_eval(src, "(ERB)")
max.times do
mod.render(title, content)
end
__END__
<html>
<head> <%= title %> </head>
<bod... |
from datetime import datetime
def parse_date(date_str: str) -> datetime:
return datetime.strptime(date_str, "%Y-%m-%d") |
<filename>store/utils.go
package store
import "fmt"
const DSP_TASK_TABLE_NAME = "dsp_tasks"
const CreateTasks string = "CREATE TABLE IF NOT EXISTS " + DSP_TASK_TABLE_NAME +
" (id VARCHAR[255] NOT NULL PRIMARY KEY, fileHash VARCHAR[255] NOT NULL, fileName VARCHAR[255] NOT NULL, walletAddr VARCHAR[255] NOT NULL, type... |
<filename>apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/PatientResourceProviderIT.java<gh_stars>0
package gov.cms.bfd.server.war.stu3.providers;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static or... |
if (Meteor.isServer) {
Meteor.publish('settings', function () {
if(this.userId) return Settings.find();
});
Meteor.publish('permissions', function () {
if(this.userId) return Permissions.find();
});
Meteor.publish('movies', function () {
if (this.userId) {
return Movies.find({});
... |
<filename>CarteService/default/src/main/java/org/rzo/yajsw/wrapper/TrayIconMessage.java
package org.rzo.yajsw.wrapper;
import org.rzo.yajsw.wrapper.TrayIconProxy.Types;
public class TrayIconMessage
{
Types _type;
String _caption;
String _message;
public TrayIconMessage(Types type, String caption, Strin... |
package com.linkedin.metadata.search.elasticsearch.query.request;
import com.linkedin.metadata.models.EntitySpec;
import com.linkedin.metadata.models.SearchableFieldSpec;
import com.linkedin.metadata.models.annotation.SearchScoreAnnotation;
import com.linkedin.metadata.models.annotation.SearchableAnnotation.FieldType;... |
/**
* @license Copyright (c) 2003-2021, CKSource - <NAME>. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
import FontBackgroundColor from './../src/fontbackgroundcolor';
import FontBackgroundColorEditing from './../src/fontbackgroundcolor/fontbackgroundcol... |
cp -avx -f ../include/* ./Classes
srcPath="./Classes/src"
if [[ ! -d "$srcPath" ]]; then
mkdir "$srcPath"
fi
cp -avx -f ../src/* "$srcPath"
pluginsPath="./Classes/plugins"
if [[ ! -d "$pluginsPath" ]]; then
mkdir "$pluginsPath"
fi
cp -avx -f ../plugins/* "$pluginsPath" |
<gh_stars>0
require_relative "./deedveloper/version"
require_relative './deedveloper/controller'
require_relative "./deedveloper/scraper"
require_relative "./deedveloper/job"
module Deedveloper
end |
<reponame>lemoi/aobot<filename>src/server/index.js
const express = require('express');
const http = require('http');
const https = require('../utils/https');
const transmit = require('../utils/transmit');
const socket = require('../sync/socket');
const app = express();
const caDownload = require('../ssl/ca-download');
... |
module.exports = function (from, to) {
from = RegExp(from);
return function (req, res, next) {
req.url = req.url.replace(from, to);
next();
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.