text stringlengths 1 1.05M |
|---|
class Customer:
def __init__(self, name, email, address, phone, credit_card_number):
self.name = name
self.email = email
self.address = address
self.phone = phone
self.credit_card_number = credit_card_number
def get_name(self):
return self.name
def set_name(self, name):
self.name = name
def get_email(self)... |
TERMUX_PKG_HOMEPAGE=https://maven.apache.org/
TERMUX_PKG_DESCRIPTION="A Java software project management and comprehension tool"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@masterjavaofficial"
TERMUX_PKG_VERSION=3.8.3
TERMUX_PKG_SRCURL=https://dlcdn.apache.org/maven/maven-3/${TERMUX_PKG_VERSION}/binaries/ap... |
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
GPU_ID=$1
DATASET=$2
NET=$3
ITERS=$4
array=( $@ )
len=${#array[@]}
EXTRA_ARGS=${array[@]:4:$len}
EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_}
case ${DATASET} in
pascal_voc)
TRAIN_IMDB="voc_2007_trainval"
TEST_IMDB="voc_2007_test"
ITERS=70000
ANCHORS=... |
#!/bin/bash -eux
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "/var/correctly:/var/correctly:ro" -w="/var/correctly" docker/compose:latest up -d
|
#ifndef GameCenterAuth_h
#define GameCenterAuth_h
typedef void ( __stdcall *GenerateSucceeded )(
const char* publicKeyUrl,
uint64_t timestamp,
const char* signature,
const char* salt,
const char* playerID,
const char* alias,
const char* bundleID
);
typedef void ( __stdcall *GenerateFailed... |
<reponame>lanpinguo/rootfs_build
/*
******************************************************************************
*
* vin.c
*
* Hawkview ISP - vin.c module
*
* Copyright (c) 2015 by Allwinnertech Co., Ltd. http://www.allwinnertech.com
*
* Version Author Date Description
*
* 3.0 <NAME>... |
<filename>omf-impl/src/main/java/org/om/core/impl/session/factory/DefaultSessionFactory.java
package org.om.core.impl.session.factory;
import org.om.core.api.persistence.PersistenceAdapterFactory;
import org.om.core.impl.mapping.extractor.EntityMappingExtractorImpl;
import org.om.core.impl.mapping.registry.OnDemandMap... |
<reponame>wilbur147/Ruoyi-VUE-Plus<gh_stars>0
package com.ruoyi.content.mapper;
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
import com.ruoyi.content.domain.ConTopic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 专题Mapper接口
*
* @author ruoyi
* @date 2021-05-12
*/
public interface... |
#! /bin/bash
set -e
go build
./server -port=8080 &
./server -port=8081 &
./server -port=8082 &
echo "running, enter to stop"
read && killall server
|
<filename>vendor/github.com/crackcomm/cloudflare/messages.go
package cloudflare
import "encoding/json"
// Response - Cloudflare API Response.
type Response struct {
Result json.RawMessage `json:"result"`
ResultInfo *ResultInfo `json:"result_info"`
Errors []*ResponseError `json:"errors"`
Success bool ... |
<reponame>diitalk/flect-chime-sdk-demo<filename>frontend3/src/App.tsx
import React, { useMemo } from 'react';
import './App.css';
import { MessageDialog } from './pages/000_common/MessageDialg';
import { SignIn } from './pages/010_signin';
import { SignUp } from './pages/011_signup';
import { Verify } from './pages/012... |
package com.example.xty.helloagain.Utils;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.xty.helloagain.MyEntity.Entity;
import com.example.xty.helloagain.R;
import java.uti... |
#!/bin/bash
# by Sanzhen Liu
# 9/12/2021
version=0.01;
default_f1suffix='.R1.pair.fq';
default_f2suffix='.R2.pair.fq';
default_cpus=4;
script_dir=`echo $0 | sed 's/[^\/]*\/[^\/]*$//g'` # remove file and the direct subdirectory
default_parser=$script_dir"/utils/samparser.bwa.pl";
default_aggregator=$script_dir"/utils/... |
#include "Text.h"
#include <cstring>
#include <cassert>
#include <cstdarg>
#define MakeLetterCaseLower(character) (character | 0b00100000)
#define MakeLetterCaseUpper(character) (character & 0b11011111)
#define CompareLetterCaseIgnore(a, b) (MakeLetterCaseLower(a) == b) || (MakeLetterCaseUpper(a) == b)
inline wchar_... |
import React from "react";
import Dialog from "@material-ui/core/Dialog";
import { makeStyles } from "@material-ui/core/styles";
import { closeFeedback, isFeedbackOpen } from "../../Redux/dialogs";
import { useDispatch, useSelector, shallowEqual } from "react-redux";
import { getUser, getSessionId, getUserId } from "..... |
python3 -m pip install alabaster
python3 -m pip install aniso8601
python3 -m pip install appnope
python3 -m pip install asn1crypto
python3 -m pip install astroid
python3 -m pip install atomicwrites
python3 -m pip install attrs
python3 -m pip install Babel
python3 -m pip install backcall
python3 -m pip install backports... |
<reponame>neowutran/home-assistant-js-OTP<filename>src/modules/voice/stores/is-voice-supported-store.js
import { Store } from 'nuclear-js';
const INSTANCE = new Store({
getInitialState() {
return 'webkitSpeechRecognition' in window;
},
});
export default INSTANCE;
|
from rest_framework import routers
from django.urls import path, include
from drf.base import views
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework import status
router = routers.DefaultRouter()
router.register(r'members', views.MemberViewSet)
@api_view(... |
export { default as Logon } from './Logon';
export { default as Register } from './Register';
export { default as Profile } from './Profile';
export { default as NewIncidents } from './NewIncidents';
|
/* global module:false */
module.exports = function(grunt) {
grunt.initConfig({
app: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'expanded'
},
files: {
'css/style.css': 'scss/style.scss'
}
... |
def is_armstrong(num):
n = len(str(num))
total = 0
temp = num
while temp > 0:
digit = temp % 10
total += digit**n
temp //= 10
if num == total:
return True
else:
return False |
// Ava does not allow defining in `./helpers`. Otherwise, this file should be
// with the other test runner files in `test/helpers/testing/`
// eslint-disable-next-line import/no-unassigned-import
import '../helpers/testing/ava.js'
|
import random
def random_picks(sequence, relative_odds):
table = [ z for x, y in zip(sequence, relative_odds) for z in [x]*y ]
while True:
yield random.choice(table)
|
import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { fetch } from '@nrwl/angular';
import { map } from 'rxjs/operators';
import * as EventsPileCardsActions from './events-pile-cards.actions';
import { createInitialEvents... |
module.exports = {
siteMetadata: {
title: `Bitlogic Web`,
description: `Bitlogic Web`,
author: `Bitlogic`,
},
plugins: [
`gatsby-plugin-netlify-cms`,
`gatsby-transformer-json`,
`gatsby-plugin-react-helmet`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `ga... |
#!/bin/sh
. ../config/webserver-settings.sh
echo "starting 35-processmodel-publish-fork-simple.sh"
curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
-d "<somexml/>" \
-H "Content-type: application/xml" -H "Accept: application/xml" \
"http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:publ... |
def solution(pointA, pointB):
graph = [[0, 10, 15, 20],
[5, 0, 9, 10],
[6, 13, 0, 12],
[8, 8, 9, 0]]
start = pointA
end = pointB
# Shortest Path
infinity = float("inf")
distances = [infinity] * len(graph)
previous = [None] * len(graph)
visited = [... |
'use strict';
let uuids = {};
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (_ref) {
var t = _ref.types;
/* ==========================================================================
* Utilities
* ===============================================================... |
def fibonacci(n):
first = 0
second = 1
for i in range(n):
print(first)
temp = first
first = second
second = temp + second
fibonacci(5) |
<reponame>Loliticos/mayfi
const { Command, MayfiEmbed, MiscUtils } = require('../../')
const fetch = require("node-fetch")
module.exports = class Dog extends Command {
constructor (client) {
super({
name: 'dog',
aliases: ['cachorro'],
category: 'fun',
}, client)
}
async run ({ channel,... |
class RenameSiteAssignment < ActiveRecord::Migration[5.1]
def change
rename_table :site_assignments, :site_contact_assignments
end
end
|
import numpy as np
from scipy.ndimage import gaussian_filter
from scipy.ndimage import maximum_filter
def detectFeatures(image, hessianThreshold, minFeatureScales):
# Compute the Hessian matrix
dx, dy = np.gradient(image)
dxx, dxy = np.gradient(dx)
dyx, dyy = np.gradient(dy)
# Compute the eigenval... |
function replace_with_code($str) {
$newStr = '';
for($i=0; $i < strlen($str); $i++) {
$code = ord($str[$i]);
$newStr .= "&#{$code}";
}
return $newStr;
} |
import { ConflictException, InternalServerErrorException } from '@nestjs/common'
import { EntityRepository, Repository } from 'typeorm'
import { AuthCredentialsDto } from './dto/auth-credential.dto'
import { User } from './user.entity'
import * as bcypt from 'bcryptjs'
@EntityRepository(User)
export class UserReposito... |
<gh_stars>1-10
//
// UIViewController+ADScaleTransition.h
// CommonLibrary
//
// Created by James on 3/7/14.
// Copyright (c) 2014 CommonLibrary. All rights reserved.
//
#if kSupportADTransition
#import <UIKit/UIKit.h>
#import "ADScaleTransition.h"
@interface UIViewController (ADScaleTransition)
@property (nona... |
<gh_stars>0
export * from './getAllMdx';
export * from './getAllMdxCategories';
export * from './getMdx';
|
#!/bin/bash
# © Copyright IBM Corporation 2019.
# LICENSE: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
#
# Instructions:
# Download build script: wget https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/CFSSL/1.3.4/build_cfssl.sh
# Execute build script: bash build_cfssl.sh (p... |
#!/bin/sh
set -euf
# Loop until Confd created the first config gile
until /usr/bin/confd -onetime \
-node 127.0.0.1:4001 \
-config-file /etc/confd/conf.d/nginx.toml
do sleep 5; done
# Start Confd
echo "Starting Confd"
/usr/bin/confd -interval 10 \
-node 127.0.0... |
tensorflow_model1="https://c7xcode.obs.cn-north-4.myhuaweicloud.com:443/models/scenetextrecognition/advancedeast.pb"
tensorflow_model2="https://c7xcode.obs.cn-north-4.myhuaweicloud.com:443/models/scenetextrecognition/chineseocr.pb"
model_name1="advancedeast"
model_name2="chineseocr"
version=$1
data_source="https://c7x... |
<reponame>jtlivio/jl-spfx-project-webparts
declare interface IStarterWpStrings {
PropertyPaneDescription: string;
BasicGroupName: string;
MaxItemsFieldLabel: string;
}
declare module 'starterWpStrings' {
const strings: IStarterWpStrings;
export = strings;
}
|
package com.abubusoft.sharedpreferencewatcher.view.ui;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import ... |
package benchmarks.ran.bnldev.Neq;
public class oldV{
public static double snippet (double pp, int n, int idumx, int idum) {//idum is global Var
idum = idumx;
double PI=3.141592653589793238;
double j=0;
double nold=-1;
double am=0;
double em=0;
double g=0;
... |
package javax.jmdns.impl.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.Map;
/**
* This class contains all the byte shifting
*
* @author <NAME>
*
*/
public class ByteWrangler {
//private static Logger l... |
sleep 5
pwd > pwd.txt
|
/**************************************************************
* DEF_F_msgsys
* yafra.org
*
* system messages definition
*
**************************************************************/
delete from msg where msg.msg_typ = 5 and msg.s_id = 2;
commit work;
insert into msg values (5, 0, 2, 1,
'Dans le cas ou vou... |
#!/usr/bin/env bash
set -ex
USERNAME=unlockprotocol
IMAGE=locksmith
docker build -t $USERNAME/$IMAGE:latest --build-arg BUILD_DIR=locksmith . |
import * as builder from 'botbuilder';
const dialog: builder.IDialogWaterfallStep[] = [
(session: builder.Session, args: any /** XXX type */, skip: Function) => {
session.endDialog(args.intent.answers[0].answer);
}
];
export default dialog;
|
nim c -d:release \
--define:"openmp" \
--define:"blas=mkl_intel_lp64" \
--define:"lapack=mkl_intel_lp64" \
--clibdir:"/opt/intel/mkl/lib/intel64" \
--passL:"/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a" \
--passL:"-lmkl_core" \
--passL:"-lmkl_gnu_thread" \
--passL:"-lgomp" \
--dynlibOverride:"mkl_intel_lp64"... |
const express = require('express');
const controller = require('./filters.controller');
const router = express.Router();
router.get('/:namespace', controller.getAllIdsByNamespace);
router.post('/:namespace/:id', controller.add);
router.delete('/:namespace/:id', controller.delete);
module.exports = () => router;
|
package com.nortal.spring.cw.core.web.component.page;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.commons.collections.MapUtils;
import org.springframework.util.Assert;
import com.nortal.spring.cw.core.web.component.ElementPath;
import com.nortal.spring.cw.core.web.component.element.EventE... |
#!/usr/bin/env bash
# Copyright 2021 VMware
#
# 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 ... |
#!/bin/bash
# bcc BNU Can CNRM GFDLG GFDLM
for runname in GFDLM
do
cd /home/hnoorazar/analog_codes/00_post_biofix/02_find_analogs/rcp85_qsubs/$runname
cat /home/hnoorazar/analog_codes/parameters/post_biofix/q_rcp85_w_precip | while read LINE ; do
qsub $LINE
done
done
|
import { createSelector } from "reselect";
import { includes, filter, map, orderBy, reduce, uniq } from "lodash";
import { getAllResearchers } from "../researchers/selectors";
import moment from "moment-timezone";
import {
LIVE_EVENTS_TAB,
PENDING_EVENTS_TAB,
STATES_LEGS,
FEDERAL_RADIO_BUTTON,
DATE_TIMESTAMP,... |
<reponame>matthewrobb/js2php<gh_stars>1-10
/*global global, testSuite*/
testSuite('core', function(assert) {
function throwCatch(value) {
try {
throw value;
} catch(e) {
return e;
}
}
testSuite('object', function() {
var toString = Object.prototype.toString;
assert('toString.call... |
<reponame>akaczorowski/android-research
getFragmentManager().beginTransaction().replace(android.R.id.content,
new ExampleFragment()).commit(); |
import com.entity.User;
import com.mapper.UserMapper;
import com.system.XSqlSession;
import org.junit.Test;
public class XWTest {
@Test
public void test() {
XSqlSession xSqlSession = new XSqlSession("src/main/resources/xuwei-mybatis.xml");
UserMapper userMapper = (UserMapper) xSqlSession.getMap... |
<reponame>HaoNanYanToMe/akash<gh_stars>0
package prism.akash.controller;
import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import prism.akash.container.BaseData;
imp... |
#download some data and make tiles out of it
#NOTE: you can feed multiple extracts into pbfgraphbuilder
wget https://download.bbbike.org/osm/bbbike/Brisbane/Brisbane.osm.pbf
#get the config and setup
mkdir -p valhalla_tiles
valhalla_build_config --mjolnir-tile-dir ${PWD}/valhalla_tiles --mjolnir-tile-extract ${PWD}/val... |
#!/bin/bash
java_tar="jdk-8u211-linux-x64.tar.gz"
jdk="openjdk"
cdh_version="5.16.1"
if [ "${1}" == "oracle" ]
then
if [ ! -s oracleJDK/${java_tar} ]
then
echo "Fatal: ${java_tar} not found; please download oracle jdk"
exit 1
else
cd oracleJDK
jdk="oraclejdk"
fi
else
cd openJDK
fi
if [ "${1}... |
// Import the necessary modules and Axios instance
import axios from 'axios';
// Create the Axios instance
const instance = axios.create({
baseURL: 'https://api.example.com',
});
// Define the authInterceptor function
const authInterceptor = instance.interceptors.request.use((config) => {
// Retrieve the token fr... |
<filename>src/function/aggregate/distributive/sum.cpp
#include "duckdb/function/aggregate/distributive_functions.hpp"
#include "duckdb/common/exception.hpp"
#include "duckdb/common/types/null_value.hpp"
#include "duckdb/common/vector_operations/vector_operations.hpp"
#include "duckdb/common/vector_operations/aggregate_... |
public class AnimNavigationDrawer extends View {
private boolean isOpen = false;
public AnimNavigationDrawer(Context context, AttributeSet attrs) {
super(context, attrs);
// Initialize the view and attributes
}
public void openDrawer() {
// Implement the animation for opening t... |
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
} |
#include <iostream>
#include <cstdlib>
// Custom function to handle critical errors
void _FATALERROR(const char* errorMessage) {
std::cerr << "Fatal Error: " << errorMessage << std::endl;
std::exit(EXIT_FAILURE);
}
// Custom namespace for installing hooks
namespace Hooks {
bool InstallHooks() {
//... |
class KeyValueStore<T> {
private store: Record<string, T> = {};
add(key: string, value: T): void {
this.store[key] = value;
}
get(key: string): T | undefined {
return this.store[key];
}
remove(key: string): void {
delete this.store[key];
}
} |
<gh_stars>1-10
package com.abubusoft.filmfinder.view.ui;
import android.os.Bundle;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;
import com.abubusoft.filmfinder.R;
import com.bumptech.glid... |
<filename>node_modules/alga-js/types/date/rangeDate.d.ts<gh_stars>0
export function rangeDate(startDate: any, endDate: any, formatParam?: any): any[];
|
"use strict";
require("./modules/parts/widgets-mobile");
|
<gh_stars>0
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Location } from './../../models/location.model';
import { Link } from './../../models/link.mo... |
# Copyright 2021 The Google Research 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 or agree... |
# -*- coding: UTF-8 -*-
"""Definitions for `Ensembler` class."""
import gc
import sys
import time
import numpy as np
import scipy
from astrocats.catalog.model import MODEL
from astrocats.catalog.quantity import QUANTITY
from emcee.autocorr import AutocorrError
from mosfit.mossampler import MOSSampler
from mosfit.samp... |
<reponame>jrfaller/maracas
package mainclient.methodNowAbstract;
import main.methodNowAbstract.IMethodNowAbstract;
public interface MethodNowAbstractIntf extends IMethodNowAbstract {
}
|
<gh_stars>1-10
import gql from "graphql-tag";
import { printWithReducedWhitespace } from "..";
describe("printWithReducedWhitespace", () => {
it("removes whitespace", () => {
// Note: there's a tab after "tab->", which prettier wants to keep as a
// literal tab rather than \t. In the output, there should be... |
<filename>ruby/spec/ruby/core/symbol/size_spec.rb
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/length', __FILE__)
describe "Symbol#size" do
it_behaves_like :symbol_length, :size
end
|
package edu.fiuba.algo3.modelo;
import java.util.ArrayList;
import java.util.Stack;
import edu.fiuba.algo3.modelo.bloques.Bloque;
import edu.fiuba.algo3.modelo.bloques.BloqueAlgoritmo;
import edu.fiuba.algo3.modelo.bloques.BloqueBajarLapiz;
import edu.fiuba.algo3.modelo.bloques.BloqueComplejo;
import edu.fiuba.algo3.... |
#!/usr/bin/env sh
# Originally from https://github.com/latex3/latex3
# This script is used for testing using Travis
# It is intended to work on their VM set up: Ubuntu 12.04 LTS
# A minimal current TL is installed adding only the packages that are
# required
# See if there is a cached version of TL available
export ... |
<reponame>junifar/job1_sample
import React , { Component } from 'react';
import { Form } from 'reactstrap';
import axios from 'axios';
import { Input, Button } from '../../_Main';
export default class mandiriclickpay extends Component{
constructor(props){
super(props);
this.state = {
debit_card: "",... |
#!/bin/sh
# Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
interface Parser {
ParsedURI parseURI(String uri);
}
class ParsedURI {
private String scheme;
private String host;
private int port;
private String path;
private Map<String, String> queryPa... |
sudo apt-get install apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
echo "deb https://repo.clickhouse.com/deb/stable/ main/" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y clickhouse-server cl... |
<filename>include/Repeater.hpp
//
// Repeater.hpp
// GameBT
//
// Created by <NAME> on 15/1/2018.
// Copyright © 2018 <NAME>. All rights reserved.
//
// RepeatDecorator is a Decorator that executes it child
// until a limit is reached.
// if the child fails, the decorator fails;
// if the child succ... |
def cube_volume(side_length):
return side_length ** 3 |
public class EndpointValidator
{
public void ValidateEndpoints(List<string> endpoints)
{
if (endpoints == null)
{
throw new ArgumentNullException(nameof(endpoints));
}
// Add validation logic for endpoints here
}
} |
package testsubjects.foo;
public class BaseClass {
void method() {
}
}
|
export default {
publicKey: '-----BEGIN PUBLIC KEY-----' +
'<KEY>' +
'<KEY>' +
'<KEY>n' +
'<KEY>' +
'<KEY>' +
'<KEY>' +
'lwIDAQAB\n' +
'-----END PUBLIC KEY-----'
}
|
<reponame>gabrieloandco/RiscV-Arqui1
from myhdl import *
from AND import *
import random
@block
def tbAND():
data1 = Signal(modbv(0)[32:0])
data2 = Signal(modbv(0)[32:0])
dataout = Signal(modbv(0)[32:0])
dut = AND(data1,data2,dataout)
interv = delay(5)
@always(interv)
def stim():
data1.next = random.randra... |
<filename>utils/generateMarkdown.js
const licenseArray = [
{
name: "Apache License 2.0",
link: "https://www.apache.org/licenses/LICENSE-2.0.txt",
},
{
name: "GNU General Public License v3.0",
link: "https://www.gnu.org/licenses/gpl-3.0.en.html",
},
{
name: "MIT License"... |
import java.util.*;
public class Main {
public static void main(String[] args) {
char[][] board = new char[3][3];
generateBoard(board);
String player1 = "X";
String player2 = "O";
while(true) {
if(!updateBoard(board, player1)) break;
if(!updateBoard(board, player2)) break;
}
}
public static void... |
package utils.semanticActions;
import logic.Lexicon;
public class SA_AddChar implements SemanticAction{
@Override
public void action(Lexicon Lex) {
Lex.addCharacter();
}
}
|
#!/bin/sh
set -ex
# Print the env for debug purpose
env
# Migrate the database
./manage.py migrate
# Run the command
exec $@ |
# Doesn't work. See https://code.google.com/p/gmpy/issues/detail?id=85
$PYTHON setup.py install --prefix=$PREFIX
|
from sqlalchemy import Column, String, Integer
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
def generate_sqlalchemy_models(table_columns):
model_definitions = ""
for table_name, columns in table_columns.items():
table_class_name = table_name.capitalize() + "Table"
... |
<reponame>Remolten/ld33
var Entity = {};
Entity.prototype = {
init: function(id) {
this.id = id;
this.components = {};
},
getComponent: function(id) {
return this.components[id];
},
add: function() {
for (var i = 0; i < arguments.length; i++) {
this.compon... |
(function() {
// tFrame is a DOMHighResTimeStamp, accurate to 1/1000 of a ms
function main(tFrame) {
window.requestAnimationFrame(main);
// stopMain contains the token ID generated by requestAnimationFrame
MyGame.stopMain = window.requestAnimationFrame(main);
var nextTick = MyGame.lastTick + MyGame... |
#pragma once
#include <algorithm>
#include <cstddef>
#include "nifty/marray/marray.hxx"
#include "nifty/tools/runtime_check.hxx"
#include "nifty/tools/block_access.hxx"
#include "nifty/hdf5/hdf5_array.hxx"
namespace nifty{
namespace graph{
template<std::size_t DIM, class LABEL_TYPE>
class Hdf5Labels{
public:
t... |
#!/bin/bash
# This script starts a local Docker container with created image.
# Find package.json inside project tree.
# This allows to call bash scripts within any folder inside project.
PROJECT_DIR=$(git rev-parse --show-toplevel)
if [ ! -f "${PROJECT_DIR}/package.json" ]; then
echo "[E] Can't find '${PROJECT_D... |
#!/bin/bash
##
# Remote Installer script for MirrorBot 1.0
# Copyright (c) 2011-2014 Joseph Huckaby and PixlCore.com
# Released under the MIT License: http://opensource.org/licenses/MIT
#
# To install or upgrade, issue this command as root:
#
# curl -L -s "http://pixlcore.com/software/mirrorbot/install-latest-_BRANCH_... |
let sales = [7, 10, 15];
let total = 0;
for (let i = 0; i < sales.length; i++) {
total += sales[i];
}
console.log(total); |
var arr1 = [];
arr1.length = 3;
console.log(arr1);
var arr2 = new Array(3);
console.log(arr2);
var arr3 = [undefined, undefined, undefined];
console.log(arr3); |
function applyStyles(style) {
let pageContent = document.getElementById("pageContent");
pageContent.style.cssText = style;
}
style = "background-color: #f2f2f2; color: #000; font-family: Arial; font-size: 16px;"
applyStyles(style); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.