text
stringlengths
1
1.05M
#!/usr/bin/env bash SRV_PORT=$(($RANDOM + 1024)) ./daytimeudpsrv_byname "0.0.0.0" $SRV_PORT & SRV_PID=$! sleep 1 ./daytimeudpcli_byname "127.0.0.1" $SRV_PORT kill $SRV_PID
namespace TogglerService.Models { public class ExcludedService { public GlobalToggle GlobalToggle { get; set; } public string ToggleId { get; set; } public string ServiceId { get; set; } } }
<gh_stars>1-10 /* * */ package net.community.chest.db.sql.impl; import java.sql.ClientInfoStatus; import java.sql.Connection; import java.sql.SQLClientInfoException; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; import java.util.Properties; /** * <P>Copyright 2008 as per GPLv2</P> ...
#!/usr/bin/env sh set -e # Ubuntu #sudo apt-get update #sudo apt-get install -y git docker #ansible # CentOS/RHEL #sudo yum install -y git docker ansible curl tar zip unzip #ssh-copy-id sudo yum install -y docker iptables-services sudo sh -c 'echo EXTRA_STORAGE_OPTIONS...
package events import "github.com/DisgoOrg/disgo/api" // NewEvent constructs a new GenericEvent with the provided Disgo instance func NewEvent(disgo api.Disgo, sequenceNumber int) GenericEvent { event := GenericEvent{disgo: disgo, sequenceNumber: sequenceNumber} disgo.EventManager().Dispatch(event) return event } ...
#!/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...
const sanitizeInput = (userInput) => { let sanitizedString = "" for(let i = 0; i < userInput.length; i++){ let char = userInput.charAt(i); if(char === "<"){ while(userInput.charAt(i) !== ">"){ i++; } continue; } sanitizedString ...
echo "Building with debug flag..." cd bin cmake -DCMAKE_BUILD_TYPE=Debug .. make cd .. echo "Running..." ./bin/src/Jam3D
# https://github.com/moteus/lua-travis-example export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin bash .travis/setup_lua.sh eval `$HOME/.lua/luarocks path`
#!/bin/sh #SBATCH --clusters=ub-hpc #SBATCH --partition=largemem --qos=largemem #SBATCH --time=72:00:00 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --output=slurm.out cur_dir=$(pwd) #export INFILE=inp_ut.inp #export OUTFILE=out_put.out infile here outfile here if [ ! -f $INFILE ]; then echo "Error! Input file doe...
<reponame>yinfuquan/spring-boot-examples package com.yin.springboot.mybatis.server; import java.util.List; import com.yin.springboot.mybatis.domain.UmsMemberRuleSetting; public interface UmsMemberRuleSettingService{ int deleteByPrimaryKey(Long id); int insert(UmsMemberRuleSetting record); int insertOrU...
#!/usr/bin/env bash set -ex if [ -d "${HOME}/.local/bin" ]; then export PATH="${HOME}/.local/bin:${PATH}" fi SRC_ROOT=${SRC_ROOT:-"${PWD}"} PYTHON=${PYTHON:-"python3"} function run_publish_pkg() { if [ "x${GITHUB_ACTIONS}" != "xtrue" ]; then echo "Did not detect github actions, exiting." exit 1 fi i...
<gh_stars>0 const sharp = require('sharp'); const { nanoid } = require('nanoid'); module.exports = async ({ rel, src: uncheckedSrc, options, debug }) => { try { src = uncheckedSrc; // convert Array buffer if needed. if (typeof uncheckedSrc !== 'string') { src = Buffer.from(uncheckedSrc); } ...
#!/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...
#解决https报错问题 apt install apt-transport-https ca-certificates # buster版本 # https://mirrors.tuna.tsinghua.edu.cn/help/debian/ # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 cp /etc/apt/sources.list /etc/apt/sources.list.bck # 清华源 cat >/etc/apt/sources.list<-eof deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main con...
<filename>qrutils/widgets/qRealMessageBox.cpp /* Copyright 2017 CyberTech Labs 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 * * http://www.apache.org/licenses/LICENSE-2.0 * ...
<reponame>makenosound/css-in-js-generator const parseSelector = require("postcss-selector-parser"); export function getSelectorScope(selector: string): string[] { const selectorScope: string[] = []; parseSelector((nodes: any) => { for (const node of nodes.first.nodes) { if (node.type === "class") { ...
function toUTC(time) { let hrs = time.substring(0,2); let amPm = time.substring(6, 8); if (amPm == 'PM') { hrs = parseInt(hrs) + 12 } return `${hrs.toString().padStart(2, '0')}:${time.substring(3, 5)}` } toUTC('3:00 PM'); //15:00
/* * ============================================================================= * * Copyright (c) 2011-2016, The THYMELEAF team (http://www.thymeleaf.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 ...
Set1 = [1, 2, 3, 4, 5] Set2 = [3, 4, 5, 6, 7] # intersection intersection_set = set(Set1) & set(Set2) # Printing intersection print("Intersection is :", intersection_set) # output Intersection is : {3, 4, 5}
class OptionsManager: def __init__(self, default_options): self.default_options = default_options self.file_options = {} def set_options(self, file_name, user_options): merged_options = self.default_options.copy() merged_options.update(user_options) self.file_options[fil...
#!/bin/sh python random_input.py
<reponame>miluoshi/obsidian-advanced-slides import { AttributeTransformer, Properties } from "."; export class ClassTransformer implements AttributeTransformer { transform(element: Properties) { const clazz = element.getAttribute('class'); if(clazz != undefined){ clazz .split(" ") .map((value) => va...
num = int(input("Enter an integer: ")) print("The number is:", num)
<filename>cmd/goatcounter/reindex.go // Copyright © 2019 <NAME> – This file is part of GoatCounter and // published under the terms of a slightly modified EUPL v1.2 license, which can // be found in the LICENSE file or at https://license.goatcounter.com package main import ( "context" "fmt" "os" "strings" "time"...
#!/usr/bin/env bash docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
<gh_stars>0 package gen import ( "log" "net/http" "strings" ) type router struct { roots map[string]*trieNode handlers map[string]HandlerFunc } //roots key eg, roots['GET'] roots['POST'] //handlers key eg, handlers['GET-/p/:lang/doc], handlers['POST-/p/book'] func newRouter() *router { return &router{ ro...
#!/bin/bash # # Copyright (c) 2017 The Bitcoin Core developers # Copyright (c) 2017 The Titancoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Check for new lines in diff that introduce trailing whitespace. ...
import React from 'react'; import { CarPreview } from './CarPreview'; export const IndexPage = (props) => ( <div className="home"> <div className="cars-selector"> {props.cars.map( carData => <CarPreview key={carData.id} {...carData} />, )} </div> </div> ); export default IndexPage;
<html> <head> <!-- Meta tags --> <meta charset="utf-8"> <title>Hello world!</title> <!--Stylesheet --> <style> body { display: flex; align-items: center; justify-content: center; } </style> ...
using System; public class Program { static void Main(string[] args) { string sentence = "This is a sample sentence"; int count = 0; foreach (char c in sentence) { if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') { count++; } } Console.WriteLine($"The sentence has {count} vowels"); } }
# Helper functions for bootstraping the M-Lab k8s cluster and adding new master # nodes. function create_master { local zone=$1 local reboot_day=$2 gce_zone="${GCE_REGION}-${zone}" gce_name="master-${GCE_BASE_NAME}-${gce_zone}" GCE_ARGS=("--zone=${gce_zone}" "${GCP_ARGS[@]}") GCE_TYPE_VAR="GCE_TYPE_${PR...
#!/bin/bash DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) sudo cp $DIR/ros.service /etc/systemd/system/ systemctl enable ros.service
<reponame>weltam/idylfin /** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.maths.lowlevelapi.functions.iss; import org.apache.commons.lang.Validate; /** * Tries to detect NaNs, where they are, and provides ...
<reponame>Starainrt/talebook import Vue from 'vue' import VueCookies from 'vue-cookies' Vue.use(VueCookies) //import talebook from "~/plugins/talebook.js" //Vue.use(talebook)
package opener import ( "errors" "reflect" "testing" "github.com/tomguerney/marks/mocks" ) func newTestOpener() *opener { return &opener{ config: mocks.NewConfig(), commander: newMockCommander(), } } type mockCommmander struct { commandFn func(name string, arg ...string) combinedOutputter com...
import java.math.BigDecimal; public class EmployeeSalaryManager { private BigDecimal salary; private String admissionDate; private String salaryScale; public EmployeeSalaryManager(String admissionDate, BigDecimal salary) { this.admissionDate = admissionDate; this.salary = salary; ...
<gh_stars>1-10 package com.zto.testcase.validator; import com.zto.testcase.validator.anno.InEnum; import java.lang.reflect.Field; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @Slf4j publi...
#include <stdbool.h> #include <kore/kore.h> #include <kore/http.h> #include <kore/pgsql.h> #include "shared/shared_error.h" #include "shared/shared_http.h" #include "model/flight.h" #include "assets.h" #define FLIGHT_BOOK_RESULT_OK 0 #define FLIGHT_BOOK_RESULT_NO_SEATS_AVAILABLE 1 #define FLIGHT_...
/* * 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 ed.biodare2.backend.features.subscriptions; import ed.biodare2.backend.security.BioDare2User; import ed.biodare2.backe...
const wordFrequency = (list) => { let frequencies = {}; list.forEach(word => { frequencies[word] = (frequencies[word] || 0) + 1 }); return frequencies; } let words = ["foo", "bar", "baz", "foo", "qux", "foo"]; let frequencies = wordFrequency(words); console.log(frequencies); Output: {foo: 3, bar: 1, baz: 1, qu...
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 <NAME>. All rights reserved. # """Convert hostname to IP address. """ #end_pymotw_header import socket for host in [ 'homer', 'www', 'www.python.org', 'nosuchname' ]: print host try: hostname, aliases, addresses = socket.gethostbyname_ex(...
<filename>Calligraphy/src/hallelujah/cal/ctrl/ParserController.java package hallelujah.cal.ctrl; import hallelujah.cal.parser.CalligraphyParser; import hallelujah.cal.producer.CalligraphyProducer; import java.io.IOException; import android.util.Log; class ParserController { private static final String TAG = "Par...
package Atom.Net; import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; import java.util.ArrayList; import java.util.Scanner; import java.util.function.Consumer; public class Client { public final PrintWriter output; private final Scanner input; private final ArrayList<Consumer<S...
#!/usr/bin/env bash # Copyright 2020 Antrea 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 applicable law o...
#!/bin/bash set -e KOTLIN_VERSION=1.3.50 TAG=develop UPDATE_LATEST=false if [ "$1" != "" ]; then TAG=$1 UPDATE_LATEST=true fi cd $(dirname $(readlink -f $0))/docker set -x # Make the build image and extract build artifacts # =============================================== sudo docker build \ -f Docke...
import json from typing import Dict def character_analysis(json_filename: str) -> Dict[str, int]: with open(json_filename, 'r') as file: data = json.load(file) contributions = data.get('contributions', []) char_count = {} for contribution in contributions: for char in contribution:...
package server import ( jsoniter "github.com/json-iterator/go" "rwcoding/gphp/internal/common" "rwcoding/gphp/internal/worker" ) func NewHttpPkg(pkg worker.Pkg) *httpPkg { hp := &httpPkg{ pkg: pkg, } hp.parse() return hp } type httpPkg struct { pkg worker.Pkg status int headers map[string]string cooki...
public class Student { private String name; private int age; private String course; public Student(String name, int age, String course) { this.name = name; this.age = age; this.course = course; } public String getName() { return name; } public int getAge() { return age; } public Strin...
#!/bin/bash # TODO explain --remote-host/--remote-path DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PROJECT_PATH="$(cd "$DIR/../../../.." && pwd)" REMOTE_PATH="$PROJECT_PATH" REMOTE_HOST="localhost" LOCAL_HOST="localhost" LOCAL_PORT=1234 OTSRC="src/ext/oblivc/ot.c" BENCHDIR="test/oblivc/ottest/" BENCHSRC="...
<gh_stars>0 package de.eimantas.eimantasbackend.entities; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import java.math.BigDecimal; import java.time.L...
<gh_stars>1000+ public class TestConfusingOverloading { class Super<T> { void test2(T t) {} void test(Super<T> other) {} } class Sub extends Super<Runnable> { void test(Sub other) {} } class Sub2 extends Super<Runnable> { @Override void test2(Runnable r) {} @Override void test(Super<Runnable> other) {} ...
/* Copyright (c) 2013, Groupon, 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: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disc...
mkdir -p checkpoints/transformer CUDA_VISIBLE_DEVICES=0 fairseq-train data-bin/iwslt14.tokenized.de-en \ --optimizer adam --lr 0.0005 --clip-norm 0.1 --dropout 0.2 --max-tokens 4000 \ --arch transformer_iwslt_de_en --save-dir checkpoints/transformer \ --reset-lr-scheduler --reset-optimizer --reset-meters ...
#! /usr/bin/env bash source "test-helper.sh" # # __stub_index() tests. # # Echoes index of given stub. STUB_INDEX=("uname=1" "top=3") assert '__stub_index "uname"' "1" assert '__stub_index "top"' "3" unset STUB_INDEX # Echoes nothing if stub is not in the index. STUB_INDEX=("uname=1") assert '__stub_index "top"' "" ...
<form action="/reviews" method="POST"> <label for="rating">Rating:</label><br> <select id="rating" name="rating"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select><br> <label for="title">Title:</label><br...
<filename>src/js/common/dom.js 'use strict'; function addClassHelper(el, className) { if (el.classList) { el.classList.add(className); } else { el.className += ' ' + className; } } function addClass(el, className) { if ((Object.prototype.toString.call(el) === '[object NodeList]')) { ...
import re text = "He is an excellent programmer" def find_and_replace(text, pattern, replacement): return re.sub(pattern, replacement, text) result = find_and_replace(text, r"excellent", "brilliant") print(result)
#!/bin/bash function docker_tag_exists() { EXISTS=$(curl -s https://hub.docker.com/v2/repositories/$1/tags/?page_size=10000 | jq -r "[.results | .[] | .name == \"$2\"] | any") test $EXISTS = true } if docker_tag_exists svenruppert/maven-3.2.5-zulu 1.8.181; then echo skip building, image already existing -...
#!/bin/bash python3 <<'EOF' animal_emotes = { 'viper': '🐍', 'hornet': '🐝', 'cricket': '🪳', 'newt': '🦎', 'termite': '🐜', 'python': '🐍', 'cicada': '🪰', 'bumblebee': '🐝', 'cobra': '🐍', 'frog': '🐸', 'tick': '🪳', 'turtle': '🐢', 'aphid': '🪲', 'ladybug': '�...
#/bin/bash -xe install_ansible () { apt-get update -q apt-get install -yq python-pip pip install ansible } install_git () { apt-get update -q apt-get install -yq git } [ -z "$(which ansible)" ] && install_ansible [ -z "$(which git)" ] && install_git ansible-pull \ -e gitlab_runner_ci_server_url="${GITLAB...
/* * Copyright (c) 2020 The Go Authors. All rights reserved. * * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ // Original Go source here: // http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/prog.go package com.steveniemitz.binaryre2j; impor...
/* * Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Eclipse Public License version 1.0 * GNU General Public License version 2 * GNU Lesser General ...
public class JettyWebDefaultsProcessor { private Map<Integer, String> webDefaultsMap; public JettyWebDefaultsProcessor() { // Initialize the web defaults map with version-specific web defaults webDefaultsMap = new HashMap<>(); webDefaultsMap.put(7, "Jetty 7 web defaults"); webDe...
import {http} from './config'; export default{ buscar:(cnpj)=>{ console.log(cnpj.cnpj_cadastral); //return http.get('https://www.receitaws.com.br/v1/cnpj/'+ '05018904000168'); return http.get('https://cors-anywhere.herokuapp.com/http://www.receitaws.com.br/v1/cnpj/' + cnpj.cnpj_cadastral);...
package com.rawsanj.adminlte; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer; @SpringBootApplication publ...
/* * Copyright 2018, The Android Open Source Project * * 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...
<gh_stars>1000+ public void m() { lock.lock(); // A try { // ... method body } finally { // B lock.unlock(); } }
<reponame>quintel/etengine class AddCreatedAtIndexToScenarios < ActiveRecord::Migration[5.2] def change add_index :scenarios, :created_at end end
from typing import Any from sqlite3 import Cursor class SQLQuery: def __init__(self, cursor: Cursor, sql: str): self.__cursor = cursor self.__sql = sql self.__params = {} def __setitem__(self, name: str, value) -> None: self.__params[name] = value def __contains__(self, ke...
class DockerfileGenerator: DOCKERFILE_TEMPLATE = """ # Dockerfile generated by DockerfileGenerator FROM base_image COPY {source_archivedir} /app ENV SOURCE_SHA={source_sha} """ def __init__(self, sourcecode_path, sha): self.sourcecode_path = sourcecode_path self.sha = sha ...
""" # Node class class Node: # Function to initialise the node object def __init__(self, data): self.data = data # Assign data self.next = None # Initialize next as null # Linked List class class LinkedList: # Function to initialize head def __init__(self): s...
let textAnimation = function(element, speed) { let pos = 0; setInterval(() => { if (pos > element.clientWidth) { pos = 0; } element.style.transform = `translateX(-${pos}px)`; pos += speed; }, 16); }; let myText = document.querySelector('.my-text'); textAnimati...
<filename>backend/src/main/java/oidc/management/service/impl/DefaultUserAccountService.java package oidc.management.service.impl; import lombok.extern.log4j.Log4j2; import oidc.management.model.UserAccount; import oidc.management.repository.UserAccountRepository; import oidc.management.service.UserAccountEncryptionSer...
<gh_stars>0 package main import ( "flag" "fmt" "os" "github.com/spacemeshos/smrepl/client" "github.com/spacemeshos/smrepl/log" "github.com/spacemeshos/smrepl/repl" ) func main() { var ( dataDir string walletName string be *client.WalletBackend ) grpcServer := client.DefaultGRPCServer secu...
#!/usr/bin/bash DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" export FINGERPRINT="TOYOTA COROLLA TSS2 2019" $DIR/../launch_openpilot.sh
/* * Copyright 2019 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 applicable l...
#!/usr/local/bin/bash # # Pass the destination host as the 1st argument, and optionally # the destination pool name as the 2nd (defaults to sndb). # # Switches: # # -c Compress (requires lz4) # -n Dry run. # -p <pools> List space-delimited pools to send # -v Verbose output pools="d...
<gh_stars>1-10 import React from 'react'; // import classes from './opportunity-filter.module.css'; type PropType = { onChange?(value: string): void; onFocus?(): void; }; export function OpportunityFilter(props: PropType) { return ( <> {/* <div className={classes.container}> <div cl...
package web import ( "net/http" "fmt" "github.com/chain-service/web/controllers" ) func Serve(app *controllers.Application) { fs := http.FileServer(http.Dir("web/assets")) http.Handle("/assets/", http.StripPrefix("/assets/", fs)) http.HandleFunc("/home.html", app.HomeHandler) http.HandleFunc("/request.html", ...
#!/usr/bin/env bash # Triggers automatic deploy for certain branches. # # Uses Shippable env variables: # - BRANCH # - COMMIT set -e elementIn () { local e for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done return 1 } # Automatic deploy allowed for these branches only. DEPLOY_BRANCHES=("staging" "mast...
/* TITLE Binding arguments with Function objects Chapter24Exercise3.cpp COMMENT Objective: Write an apply(f,a) that can takes a void f(T&), a T f(const T&), and their function object equivalents. Hint: Boost::bind. I'm clearly not getting something right. Input: - Output: - Author...
import {assert} from "chai"; import * as Yargs from "yargs"; import * as Options from "./options"; describe("options module has a", () => { describe("getOptions function that", () => { it("should load the configuration options", () => { Yargs([ "--delete", "--dir...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) : typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common'], factory) : (factory((global.ng = global.ng || {}, ...
public class Stack { private Object[] arr; private int top; public Stack(int size) { this.arr = new Object[size]; this.top = -1; } public Object pop() { if (this.top < 0) { // Stack is empty return null; } Object value = this.arr[this.top]; this.top--; return value; } publ...
def is_prime(n): for i in range(2, n): if n % i == 0: return False return True def find_primes(start, end): primes = [] for num in range(start, end + 1): if is_prime(num): primes.append(num) return primes find_primes(2, 100) # Output: [2, 3, 5, 7, 11, 13, 1...
<gh_stars>1-10 /* unparser.h * This header file contains the class declaration for the newest unparser. Six * C files include this header file: unparser.C, modified_sage.C, unparse_stmt.C, * unparse_expr.C, unparse_type.C, and unparse_sym.C. */ #ifndef UNPARSER_FORMAT_H #define UNPARSER_FORMAT_H //#include "sage...
echo "SCRIPT_NAME: $SCRIPT_NAME" echo "SHARED_HTPASSWD_PATH: $SHARED_HTPASSWD_PATH" echo "APP_SCRIPT_PATH: $APP_SCRIPT_PATH" echo "APP_START_SCRIPT_PATH: $APP_START_SCRIPT_PATH" echo "No tests"
<filename>tests/test_db_hybrid/test_where_not_equal.py import pytest import uvicore import sqlalchemy as sa from uvicore.support.dumper import dump # DB Hybrid @pytest.fixture(scope="module") def Posts(): from app1.database.tables.posts import Posts yield Posts @pytest.fixture(scope="module") def post(Posts...
<filename>core/migrations/0003_auto_20190821_1125.py # Generated by Django 2.2.4 on 2019-08-21 09:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_remove_product_exploitation'), ] operations = [ migrations.AlterField( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Utility to retrieve x-ray data from external libraries/databases =================================================================== Available libraries/dbs and order of usage ------------------------------------------ 1. `xraylib <https://github.com/tschoonj/xraylib>...
<gh_stars>1-10 import os import copy import numpy import torch import torchaudio import torch.nn.functional as F import pytorch_lightning as pl import wandb from torch import nn from .espnet_encoder import ESPnetEncoder from .networks import Encoder, Generator, Discriminator from .augment import augment, AdaptiveAugmen...
<gh_stars>0 import React from 'react'; import './index.css'; function ContactLinks() { return ( <div id="ContactLinks__container"> <h3>Let's Get In Touch</h3> <hr /> <div> <h5>LinkedIn</h5> <a>linkedin.com/in/ashish-shevale</a> </div> <div> <h5>GitHub</h5>...
import torch from torch.utils.data import Dataset import pandas as pd from PIL import Image class FollowSuit(Dataset): def __init__(self, csv_file): """ Args: csv_file (string): Path to the csv file with image indexes and class label annotations. """ self.data = pd.read_...
import UIKit class ViewController: UIViewController { let books = [ Book(title: "The Catcher in the Rye", author: "JD Salinger"), Book(title: "To Kill a Mockingbird", author: "Harper Lee"), Book(title: "The Great Gatsby", author: "F. Scott Fitzgerald") ] @IBOutlet weak var tableView: UITableView! override fu...
<gh_stars>0 const isValid = (s: string): boolean => { const stack = [] for (const str of s) { switch (str) { case '(': case '[': case '{': stack.push(str) break case ')': if (stack.pop() !== '(') { return false } break case ']': ...
package adapter import ( "math" "time" "github.com/ajityagaty/go-kairosdb/builder" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/prompb" "github.com/sirupsen/logrus" ) // BuildKairosDBMetrics takes in prometheus samples and returns a KairosDB MetricBuilder func BuildKairosDBMetrics(sam...
var Q = require('q'); var _ = require('lodash'); var log = require('npmlog'); var chronoCustom = require('./chronoCustomPL'); function parse(context, options) { var deferred = Q.defer(); options = _.isEmpty(options) ? {} : options; var txt = context.command.text; var parseResults = _.isDate(options.re...
# Setup Python environment source ~/.bash_profile init_conda conda activate dr17-binaries export HQ_RUN_PATH=/mnt/ceph/users/apricewhelan/projects/apogee-dr17-binaries/vac-pipeline/hq-config
import React, {useState, useEffect} from 'react' import {animated, useTransition} from 'react-spring' import {Link, useStaticQuery, graphql} from 'gatsby' import PropertyFilter from '../PropertyFilter' import Section from '../Section' import TextImageBox from '../TextImageBox' import BottomBorderedContainer from '../B...