text
stringlengths
1
1.05M
package com.yoloho.enhanced.cache.support; import org.springframework.data.redis.core.RedisTemplate; /** * Basicly initializing needed under aspectj * * @author jason * */ public class CacheSimpleInit { public CacheSimpleInit(String ns) { this(ns, null); } public CacheSimpleInit(String ns, ...
const str1 = "Hello"; const str2 = "World"; const combinedString = str1 + " " + str2; console.log(combinedString); // Output: "Hello World"
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2018 Xilinx, Inc. All Rights Reserved. # echo "This script was generated under a different operating system." echo "Please update the PATH and LD_LIBRARY_PATH variables below, before executing this script" exit if [ -z "$...
<filename>14_funcoes/a118_prog_funcional_spoiler_callable.py #!/usr/bin/python3 ''' def executar(funcao): = Criando a funcao executar if callable(funcao): = Validando se o objeto é tipo de uma funcao funcao() = Executando a funcoa recebida ''' def executar(funcao): if callable(funcao): # server para ingorar o pa...
cd src # Training python main.py tracking,polydet \ --dataset kitti_mots --exp_id kitti_mots --dataset_version train_full \ --num_epochs 120 \ --hm_disturb 0.05 --lost_disturb 0.4 --fp_disturb 0.1 \ --pre_hm --same_aug --elliptical_gt --nbr_points 32 \ --arch hourglass \ --lr_step 50,90 \ --head_conv 256 --num_head_c...
#!/bin/bash #*************************************************************************# # @param # drop_rate: Decode Drop frame rate (0~1) # src_frame_rate: frame rate for send data # data_path: Video or image list path # model_path: offline model path # label_path: label path # postproc_name: postproc class name (Post...
<gh_stars>1000+ //+build ignore /* Copyright 2021 Cesanta Software Ltd. 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 https://www.apache.org/licenses/LICENSE-2.0 Unless re...
<gh_stars>100-1000 #ifndef MODULE_CALLS_H #define MODULE_CALLS_H #include <module/device_generic_driver.h> #include <stddef.h> #include <stdint.h> template <typename T, typename... argument> using mfunc = T (*)(argument...); #define IO_BIT_SIZE_8 0b0 #define IO_BIT_SIZE_16 0b01 #define IO_BIT_SIZE_32 0b10 #define IO_BI...
<gh_stars>0 import setuptools with open("ReadMe.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="heraut", version="0.0.1dev1", author="<NAME>", author_email="<EMAIL>", description="The herald of python message passing between threads and processes", l...
sed -i.bak "s/CPP=g++/CPP=\${GXX}/" src/Makefile sed -i.bak "s/-o clan_search/-o clan_search -lrt/" src/Makefile sed -i.bak "s/-o clan_annotate/-o clan_annotate -lrt/" src/Makefile make mkdir -p $PREFIX/bin cp bin/* $PREFIX/bin/
'use strict'; /* Memory Game Models and Business Logic */ function Tile(title) { this.title = title; this.flipped = false; } Tile.prototype.flip = function() { this.flipped = !this.flipped; } function Game(tileNames) { var tileDeck = makeDeck(tileNames); this.grid = makeGrid(tileDeck); this.message = G...
<reponame>path64/assembler<filename>frontends/ygas.cpp // // GNU AS-like frontend // // Copyright (C) 2001-2010 <NAME> // // 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 re...
import requests from bs4 import BeautifulSoup url = 'https://www.example.com' page = requests.get(url) soup = BeautifulSoup(page.content, 'html.parser') data = soup.find_all('p') # Process the data
<filename>src/constants.js /** * Created by FDD on 2017/9/18. * @desc 静态变量相关 */ const EVENT_TYPE = { // 事件类型 LOAD_MAP_SUCCESS: 'loadMapSuccess', // 地图初始化成功事件 CLICK: 'click', // 点击事件 DBCLICK: 'dbclick', // 双击事件 SINGLECLICK: 'singleclick', // 单击事件 MOVESTART: 'movestart', // 地图开始移动事件 MOVEEND: 'moveend', ...
CREATE TABLE Movies ( name VARCHAR(30), genres VARCHAR(200), release_year INT );
<reponame>ftraple/cpp-FractalCreator #ifndef BITMAP_FILE_HEADER_HPP #define BITMAP_FILE_HEADER_HPP #include <cstdint> #pragma pack(2) // Avoid padding struct BitmapFileHeader { char header[2]{'B', 'M'}; int32_t fileSize; int32_t reserver{0}; int32_t dataOffset; }; #endif // BITMAP_FILE_HEADER_HPP
#!/bin/bash # Source library source ../../../utils/helper.sh source ./delta_configs/env.delta topics_to_delete="test1 test2" for topic in $topics_to_delete do if [[ $(docker-compose exec connect kafka-topics --bootstrap-server $CONNECT_BOOTSTRAP_SERVERS --command-config /tmp/ak-tools-ccloud.delta --describe --topi...
#!/bin/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 "License"); yo...
<gh_stars>1-10 package com.singularitycoder.folkdatabase.auth.viewmodel; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; import com.singularitycoder.folkdatabase.auth.repository.LoginAuthRepository; import com.singularitycoder.folkdatabase.helper.Req...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouterModule} from "@angular/router"; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/...
def convert_time_format(time): """ Converts a given time in 24-hour format to 12-hour AM/PM format. Args: time (str): The time in 24-hour format. Return: str: The converted time in 12-hour AM/PM format. """ # Extract the hour and minutes hour, minutes = int(time.sp...
/*************************************************************************** MIT License Copyright (c) 2018 Rohit 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, includi...
// IndexStyles.js: // ------------------ import styled from 'styled-components'; const Banner = styled.div ` &:after { content: ""; display: block; height: 100vh; width: 100%; background-image: url('/img/cover.jpg'); background-size: cover; background-repeat...
/* * Copyright (c) 2020 Elastos Foundation * * 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 * to use, copy, modify, merge, ...
import { TestCase } from './testCase'; export class TestCaseImpl<I, O> implements TestCase<I, O> { constructor(public input: I, public output: O, public ids?: Record<string, string>) {} }
#!/bin/bash SCRIPT=`realpath $0` SCRIPT_PATH=`dirname $SCRIPT` DATA_PATH="$SCRIPT_PATH/data" ARGUMENTS=`$SCRIPT_PATH/arguments-from-config.rb $1` if [ $# -lt 1 ]; then echo "please specify config.json" exit -1 fi echo "\ 0 0 1 * * /bin/bash -l -c \"$SCRIPT_PATH/average-and-truncate.sh day 30 month 100\" 0 0 * *...
/** Copyright 2013 <NAME> project Ardulink http://www.ardulink.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 License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appli...
<gh_stars>0 from __future__ import print_function import pytest from simtk import openmm from simtk import unit from simtk.openmm import app import atomsmm def execute(shifted, target): rcut = 10*unit.angstroms rswitch = 9.5*unit.angstroms case = 'tests/data/q-SPC-FW' pdb = app.PDBFile(case + '.pdb'...
<filename>apps/app/src/app/modules/administration/modules/user-management/modules/detail/guards/user-management-detail.guard.ts import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, CanActivate, CanDeactivate, Router, UrlTree } from '@angular/router'; import { catchError, Observable, of } from 'r...
# USAGE # python create_dataset.py --input videos/real.mov --output Dataset/Real # python create_dataset.py --input videos/fake.mp4 --output Dataset/Fake import numpy as np import argparse from imutils.video import VideoStream import cv2 import os ap = argparse.ArgumentParser() ap.add_argument("-i", "--input", type=...
import { getHeader } from '../console'; import { revertAll } from '../git'; export const setup = () => { getHeader('generi revert'); revertAll(); };
<reponame>dogballs/battle-city import { InputBinding, KeyboardButtonCode } from '../../core'; import { InputControl } from '../InputControl'; // Suggested for multi-player mode, first player, left side of the keyboard, // because primary tank spawns on the left side of base export class SecondaryKeyboardInputBinding ...
struct IconNode { let iconUrl: String let wikiName: String let hdIconUrl: String let wikiCode: String let level: String let idx: String let parentCode: String }
cd /storage/home/users/pjt6/phy/orthofinder python /storage/home/users/pjt6/misc_python/BLAST_output_parsing/Blast_RBH_two_fasta_file_evalue.py --threads 2 -o ../GCA_002911725.1_ASM291172v1_cds_from_genomi.fa_GCA_000365505.1_Phyt_para_P1569_V1_cds_from_genomi.fa GCA_002911725.1_ASM291172v1_cds_from_genomi.fa GCA_0003...
<reponame>xfyre/tapestry-5<gh_stars>10-100 package testsubjects; public class StaticMethodsIgnored { void anInstanceMethod() { } static void aStaticMethod() { } }
<reponame>bhits-dev/try-policy package gov.samhsa.c2s.trypolicy.service.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SampleDocDto { private int id; private boolean isSampleD...
<filename>webauthn4j-core/src/test/java/com/webauthn4j/validator/RpIdHashValidatorTest.java /* * Copyright 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 Licen...
/opt/cloudera/parcels/CDH/lib/hive/bin/beeline -u "jdbc:hive2://server01:21050/;auth=noSasl" -n hsu -p hsu -d org.apache.hive.jdbc.HiveDriver --color=true --verbose=true
SELECT AVG(median_val) as median_val FROM (SELECT DISTINCT val, PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY val) OVER() median_val FROM tbl ) tmp;
const generateRandomString = () => { let result = ''; const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; const charactersLength = characters.length; for (let i = 0; i < 8; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } // ...
#!/bin/bash mkdir data/WN18RR mkdir data/FB15k-237 mkdir data/kinship mkdir saved_models tar -xvf data/WN18RR.tar.gz -C data/WN18RR tar -xvf data/FB15k-237.tar.gz -C data/FB15k-237 tar -xvf data/kinship.tar.gz -C data/kinship python wrangle_KG.py WN18RR python wrangle_KG.py FB15k-237 python wrangle_KG.py FB15k-237-attr...
/* * Copyright © 2019 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, including this file, may be copied, modified, * propagated...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withRouter } from 'react-router-dom'; import { connect } from 'react-redux'; import { Main, PageHeader, PageHeaderTitle } from '@redhat-cloud-services/frontend-components'; import { Card, CardBody, Toolbar, ToolbarGroup, ToolbarItem...
<gh_stars>1-10 // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Gen...
import IDistantVOBase from '../../IDistantVOBase'; export default class MailEventVO implements IDistantVOBase { public static EVENT_NAMES: string[] = [ 'mail_event.EVENT_Initie', 'mail_event.EVENT_Envoye', 'mail_event.EVENT_Delivre', 'mail_event.EVENT_Ouverture', 'mail_event.EVENT_Clic', ...
<gh_stars>1-10 /**************************************************************************** Copyright 2016 Apigee Corporation 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...
import React from 'react' import classNames from 'classnames' import './index.less' const noop = ()=>{} var PopupHeader = React.createClass({ render(){ const {leftText, rightText, title, showBottomBorder, onClickRight, onClickLeft, className, ...others} = this.props; const cls = classNames('mt-popup-header...
import express from 'express'; // Express web framework import session from 'express-session'; // Express session management import { toExpenses, fromExpenses } from './expenses'; // Module for converting expenses from/to application data format import { getTrends } from './trends'; // Module for retrieving/calculating...
VERSION=1.6.36 TAR=https://github.com/glennrp/libpng/archive/v${VERSION}.tar.gz BUILD_DEPENDS=(zlib) function recipe_version { echo "$VERSION" skip=1 } function recipe_update { echo "skipping update" skip=1 } function recipe_build { sysroot="$(realpath ../sysroot)" export CPPFLAGS="-I$sysroot...
class AuthenticationSystem: def __init__(self): self.users = dict() def create_user(self, username, role, password): if username not in self.users: self.users[username] = {"role": role, "password": password} else: print("Username already taken!") def aut...
<filename>packages/app/src/index.tsx import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import { setMockApiDelay } from 'mock-api'; import { setupWorker } from 'msw'; import { mockFriendHandlers } from 'friends-api'; import './index.css'; if (process.env.REACT_APP_USE_MOCK_API === '...
import React, {ReactElement} from 'react'; import {Helmet} from 'react-helmet'; export interface IAppCommonHeadProps { readonly basePath?: string; } export function AppHelmet({basePath}: IAppCommonHeadProps): ReactElement { const prefix = basePath ?? ''; const robotoPath = `${prefix}/fonts/roboto/roboto...
package com.honyum.elevatorMan.service; import android.app.Notification; import android.app.PendingIntent; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import android...
<reponame>nhood-org/nhood-engine package com.h8.nh.nhoodengine.core.workers; import com.h8.nh.nhoodengine.core.DataFinder; import com.h8.nh.nhoodengine.core.DataFinderCriteria; import com.h8.nh.nhoodengine.core.DataFinderResult; import com.h8.nh.nhoodengine.core.DataResourceKey; import java.util.List; public final c...
#include "stdafx.h" #include "io.h" #include "direct.h" #include "RegisterSharpCOM.h" CRegisterSharpCOM::CRegisterSharpCOM(void) { } CRegisterSharpCOM::~CRegisterSharpCOM(void) { } CString CRegisterSharpCOM::GetCodeBase() { CString strRunPath = ""; char szIniPath[MAX_PATH]; DWORD dwResult = GetModuleFileName(NUL...
<gh_stars>0 /* * Copyright (c) 2015 IBM Corporation and others. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
#!/bin/sh set -e mv _gitignore .gitignore git init sh scripts/bootstrap git add -A . git commit -m "Initial Commit"
#define MSC_CLASS "MediaStreamTrackFactory" #include <iostream> #include "MediaSoupClientErrors.hpp" #include "MediaStreamTrackFactory.hpp" #include "pc/test/fake_audio_capture_module.h" #include "pc/test/fake_periodic_video_track_source.h" #include "pc/test/frame_generator_capturer_video_track_source.h" #include "sy...
<filename>scripts/index.js import { Board } from "./classes.js"; let solutionDetails function createModal(queens, genes){ let resultHTML = `<table class="chessboard">` for(let i = 0; i < queens; i++){ resultHTML += `<tr class="chessboard">` for(let j = 0; j < queens; j++){ resultHTML += `<td id=mod...
#!/bin/bash ## ## Case Name: verify-firmware-presence ## Preconditions: ## SOF firmware install at "/lib/firmware/intel/sof" ## Description: ## check target platform firmware file ## Case step: ## 1. check if target platform firmware exists ## 2. dump fw file md5sum ## Expect result: ## list target firm...
from os import path, makedirs from requests.auth import HTTPBasicAuth import requests import hashlib from time import time, sleep from sortedcontainers import SortedSet from config import Config class RequestHandler: def __init__(self, term, extension): # setup configuration self.config = Config...
from __future__ import print_function import os import sys import os.path as op from collections import Counter, namedtuple import pickle import json import numpy as np import pandas as pd import pybedtools from seqcluster.libs.utils import file_exists import seqcluster.libs.logger as mylog from seqcluster.libs impo...
<filename>django_event_tasks/admin.py<gh_stars>0 from django.contrib import admin from django_event_tasks.models import TaskType, ReminderType, TimeType, TaskStatus, Task, TaskReminder @admin.register(TaskType) class TaskTypeAdmin(admin.ModelAdmin): list_display = ('name', ) class TaskTypeReminderInline(admin....
#!/bin/sh set -eu clang++ -fbracket-depth=999999 -march=native -mtune=native -std=gnu++11 -O3 -flto -fuse-ld=lld -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Da24_hex='0x3039' -Da24_val='12345' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0...
<gh_stars>0 module ObjectSpace::AllocationTracer VERSION = "0.6.0" end
<filename>changingDOM/changeDom.js var mainContent = document.getElementById("mainContent"); mainContent.setAttribute("align","right"); mainTitle = document.getElementById("mainTitle"); console.log(mainTitle.innerHTML); var sidebar = document.getElementById("sidebar"); console.log(sidebar.innerHTML); var arrayOfH1s ...
#!/bin/bash # 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 applicable law or agreed to...
def find_lengths(strings): lengths = [len(string) for string in strings] return lengths
package com.oath.cyclops.anym.internal.adapters; import com.oath.cyclops.anym.extensability.AbstractMonadAdapter; import cyclops.stream.type.impl.ReactiveStreamX; import cyclops.monads.AnyM; import cyclops.monads.Witness; import cyclops.monads.Witness.StreamWitness; import cyclops.reactive.ReactiveSeq; import cyclops....
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-23 13:22 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('practiceapp', '0018_auto_20160823_1554'...
<reponame>Habens/cascade<gh_stars>10-100 package com.github.robindevilliers.welcometohell.steps; import com.github.robindevilliers.cascade.annotations.*; import com.github.robindevilliers.welcometohell.Utilities; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import static org.junit.Assert.asser...
<reponame>amelvill-umich/libbat #pragma once #include <memory> #include <mutex> #include <ostream> #include <unordered_map> #include <vector> #include <parallel_hashmap/phmap.h> #include "abstract_array.h" #include "attribute.h" #include "ba_treelet.h" #include "box.h" #include "owned_array.h" #include "plane.h" #incl...
const reverseList = (list) => { return list.reverse(); }; const list = [1, 2, 3, 4, 5]; console.log('Original list:', list); const reversedList = reverseList(list); console.log('Reversed list:', reversedList);
<reponame>tunderdomb/treant var assert = window.chai.assert var it = window.it var describe = window.describe if (!it || !describe || !assert) { throw new Error("Invalid test environment") } var pagination = document.getElementById("pagination") var pagination2 = document.getElementById("pagination2") var paginatio...
package main import tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" var keyboards = map[string]tgbotapi.InlineKeyboardMarkup{ "sugaroid:yesno": tgbotapi.NewInlineKeyboardMarkup( []tgbotapi.InlineKeyboardButton{ tgbotapi.NewInlineKeyboardButtonData("Yes", "yes"), tgbotapi.NewInlineKeyboardButton...
#!/bin/bash -x trap "exit 10" SIGUSR1 SWARM_DIR=/b/swarming SWARM_ZIP=swarming_bot.zip DEPOT_TOOLS_DIR=/b/depot_tools DEPOT_TOOLS_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.git" DEPOT_TOOLS_REV="da3a29e13e816459234b0b08ed1059300bae46dd" if [ -z "$CROS_SSH_ID_FILE_PATH" ] ; then echo "Must s...
import 'mocha'; import { helloWorld, helloUser } from '../src/handlers/handler'; import { StubEvent, StubContext } from '../stubs/hello'; import * as expect from 'expect.js'; describe('helloWorld', function () { let event: StubEvent; let context: StubContext = new StubContext('helloWorld'); it('should return a ...
// Copyright 2015 <NAME>. // // Distributed under the Boost Software License, Version 1.0. // // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include <boost/mp11/detail/config.hpp> #if BOOST_MP11_MSVC # pragma warning( disable: 4503 ) // decorated name length exceeded #e...
def evaluateTree(root): if root is None: return 0 if root.left is None and root.right is None: return int(root.val) left_sum = evaluateTree(root.left) right_sum = evaluateTree(root.right) if (root.val == '+'): return left_sum + right_sum elif (root.val == '-'): return left_sum - right_sum elif ...
from example.movies.models import Movie as MovieDB from djangosolr.documents import Document, TextField class Movie(Document): text = TextField(stored=False) class Meta: model = MovieDB type = 'movie'
//https://developer.mozilla.org/en-US/docs/Web/Events export const domEventsList = [ 'focus', 'blur', 'resize', 'scroll', 'keydown', 'keypress', 'keyup', 'mouseenter', 'mousemove', 'mousedown', 'mouseover', 'mouseup', 'click', 'dblclick', 'contextmenu', 'wheel', 'mouseleave', 'mouseo...
<reponame>kweiberth/paypal-messaging-components const fs = require('fs'); const got = require('got'); const devAccountMap = { DEV00000000NI: ['US', 'ni'], DEV000NINONUS: ['US', 'ni_non-us'], DEV0000000EAZ: ['US', 'ezp_any_eqz'], DEV0000000EAG: ['US', 'ezp_any_gtz'], DEV0000000PSZ: ['US', 'pala_sing...
<reponame>OswaldoRodriguez123/easy-dance-app<filename>public/assets/js/eosMenu.js /* * Jquery eosMenu 1.0 * tangpanqing * https://github.com/tangpanqing/eosMenu * released under MIT license * last update 2016-09-17 23:00:00 */ (function($) { $.fn.extend({ "eosMenu": function(options) { var defaluts = { ...
N = int(input()) while N: sentence = input() print(sentence[0].upper() + sentence[1:]) N -=1
from ctypes import cdll, c_char_p, c_void_p class Dota2Comm: def __init__(self, name): self.__dota2comm = cdll.LoadLibrary("dota2comm.dll") self.name = name self.__name = name.encode() self.__receiveMessage = self.__dota2comm.receiveMessage self.__receiveMessage.arg...
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2019 Xilinx, Inc. All Rights Reserved. # if [ -z "$PATH" ]; then PATH=/data3/Xilinx/Vitis/2019.2/bin:/data3/Xilinx/Vivado/2019.2/ids_lite/ISE/bin/lin64:/data3/Xilinx/Vivado/2019.2/bin else PATH=/data3/Xilinx/Vitis/2019...
<gh_stars>1-10 export default { ADD: 'ADD_RATE_EXCHANGE', REMOVE: 'REMOVE_RATE_EXCHANGE', RESET: 'RESET_RATE_EXCHANGE', UPDATE: 'UPDATE_RATE_EXCHANGE', };
ReportMailJob.set(wait_until: Time.now.tomorrow.midnight.ago(60)).perform_later InitUsingLogJob.set(wait_until: Time.now.tomorrow.midnight).perform_later #rake db:migrate:resetを実行するとdelayed_jobsが見つからない的なエラーが出るのでコメントアウトしておく。
const alphabet = Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
<filename>api/_bot/commands/math.js import nerdamer from 'nerdamer/all' import mathjax from 'mathjax' import sharp from 'sharp' const getMathJax = (() => { let MathJax = null return async () => { if (MathJax == null) { MathJax = await mathjax.init({ loader: { load: ['input/tex', 'output...
<filename>test/sdk.test.ts import { logger } from "@sentry/utils"; import { flush } from "../src/js/sdk"; jest.mock("@sentry/react", () => { const mockClient = { flush: jest.fn(() => Promise.resolve(true)), }; return { getCurrentHub: jest.fn(() => ({ getClient: jest.fn(() => mockClient), })),...
#!/bin/bash function cookie_local() { pbpaste | jq '(.[] | .domain) |= "localhost"' | jq '(.[] | .expirationDate ) |= 2147483647' | pbcopy } function cookie_c20n() { pbpaste | jq '(.[] | .domain) |= "apps.test.jstor.org"' | jq '(.[] | .expirationDate ) |= 2147483647' | pbcopy } function json_clean() { pbpaste ...
package validation import ( "context" "fmt" "io/ioutil" "path/filepath" "reflect" "strings" "github.com/ghodss/yaml" "github.com/open-policy-agent/opa/rego" ) const ( defaultPackage = "com.segment.kubeapply" defaultResult = "deny" warnPrefix = "warn:" ) // Policy wraps a policy module and a prepared...
#!/usr/bin/env bash set -ex echo "PWD=$PWD" python manage.py collectstatic --noinput
from bottle import Bottle, run, route, static_file app = Bottle() # Define the directory path for static files PATH = '/path/to/static/files' # Configure the static file serving app.mount('/static', static_file(PATH, index_file='index.html')) # Define a route to serve the index.html file for the root URL @app.route...
using System; using System.Collections.Generic; public class CommandLineParser { private Dictionary<string, Action<string>> options; public CommandLineParser() { options = new Dictionary<string, Action<string>>(); } public void Add(string option, string description, Action<string> action)...
#!/bin/bash set -v # print commands as they're executed set -e # fail and exit on any command erroring GIT_COMMIT_ID=${1:-""} [[ -z $GIT_COMMIT_ID ]] && echo "Must provide a commit" && exit 1 TMP_DIR=$(mktemp -d) pushd $TMP_DIR echo "Cloning tensorflow/datasets and checking out commit $GIT_COMMIT_ID" git clone ht...
#!/bin/sh java -Xmx1024M -Xms512M -jar ~/usr/minecraft.jar &
public class MultiplicationTable { public static void main(String[] args) { System.out.println("Multiplication Table for 7:"); int num = 7; for (int i = 1; i <= 10; ++i) { System.out.println(num + " * " + i + " = " + (num * i)); } } }
#!/usr/bin/env python import ss import sys import json import csv import logging import urllib ############ ENV Settings ############ logging.basicConfig(filename='mx-sync.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s') ############ GLOBALS ############ sourcePolicies = {} AUTH = {} try: with o...