repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
linklab/link_rl | common/fast_rl/policy_based_model.py | <reponame>linklab/link_rl
import glob
import math
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from common.fast_rl import rl_agent
def init_weights(m):
if type(m) == nn.Linear or type(m) == nn.Conv2d:
torch.nn.init.k... |
mghgroup/Glide-Browser | chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.payments;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.endsWith;
import ... |
domax/gwt-node | modules/cassandra/src/org/gwtnode/modules/cassandra/System.java | <filename>modules/cassandra/src/org/gwtnode/modules/cassandra/System.java
/*
* Copyright 2013 <NAME>
*
* 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/license... |
PacktPublishing/Practical-OneOps | Chapter 09/circuit-oneops-1-master/components/cookbooks/iis/resources/staticcompression.rb | <gh_stars>1-10
actions :configure
default_action :configure
# Compression level - from 0 (none) to 10 (maximum)
attribute :level, kind_of: Integer, default: 7
# Which mime-types will be / will not be compressed
attribute :mime_types, kind_of: Hash, default: {
"text/*" => true,
"message/*" => true,
"application/... |
BridgesUNCC/OpenDSA-LTI | db/migrate/20150328150855_remove_name_from_course_offering.rb | class RemoveNameFromCourseOffering < ActiveRecord::Migration
def change
remove_column :course_offerings, :name, :string
change_column_null :course_offerings, :label, false
end
end
|
AnnotationSro/java-annotation-mapper | jam-processor/src/main/java/sk/annotation/library/jam/processor/utils/annotations/data/AnnotationMapperConfig.java | package sk.annotation.library.jam.processor.utils.annotations.data;
import com.sun.tools.javac.code.Type;
import lombok.Getter;
import lombok.Setter;
import sk.annotation.library.jam.annotations.enums.ApplyFieldStrategy;
import sk.annotation.library.jam.processor.utils.annotations.data.fields.AnnotationFieldIgnore;
im... |
Ezeer/VegaStrike_win32FR | vegastrike/src/audio/renderers/OpenAL/OpenALRenderableSource.cpp | //
// C++ Implementation: Audio::OpenALRenderableListener
//
#include "OpenALRenderableSource.h"
#include "OpenALSimpleSound.h"
#include "OpenALHelpers.h"
#include "config.h"
#include "al.h"
#include "../../Source.h"
#include "../../Listener.h"
#include "vs_math.h"
namespace Audio {
static inline void alSource... |
GABRIEL08266644/Curso-Web-Moderno-Completo-com-JavaScript-2020---Projetos | Javascript/array/simulandoArray.js | const quaseArray = { 0: 'rafael', 1:'ana', 2: 'bia' }
console.log(quaseArray)
Object.defineProperty(quaseArray, 'toString', {
value: function() { return Object(this)},
enumerable: false
})
console.log(quaseArray[0])
const meuArray = ['rafael', 'ana', 'bia']
console.log(quaseArray.toString(), meuArray) |
dipsuji/Phython-Learning | practiceset/longest_polidrome.py | <filename>practiceset/longest_polidrome.py
def polindrom(str1):
last = len(str1) - 1
for i in range(0, int(len(str1) / 2)):
if str1[i] != str1[last]:
return False
last = last - 1
return True
print(polindrom("abcaba"))
def longestPalSubstr(string):
maxLength = 1
start... |
nailed/nailed-api | src/main/java/jk_5/nailed/api/plugin/Plugin.java | package jk_5.nailed.api.plugin;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* An annotation used to describe and mark a Sponge plugin
*
* @author jk-5
*/
@Target(TYP... |
MirekSz/webpack-es6-ts | app/mods/mod1806.js | <reponame>MirekSz/webpack-es6-ts
import mod1805 from './mod1805';
var value=mod1805+1;
export default value;
|
robinshi007/cx-tasks | frontend/craco.config.js | const path = require('path');
const fs = require('fs');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const WebpackBar = require('webpackbar');
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
module.exports ... |
wahello/openshift-installer | terraform/azurerm/vendor/github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate/linux_computer_name.go | package validate
import (
"fmt"
"strings"
)
func LinuxComputerNameFull(i interface{}, k string) (warnings []string, errors []error) {
// Linux host name cannot exceed 64 characters in length
return LinuxComputerName(i, k, 64, false)
}
func LinuxComputerNamePrefix(i interface{}, k string) (warnings []string, erro... |
mobarski/sandbox | topic/lda/test_lda2.py | <reponame>mobarski/sandbox
from __future__ import print_function
from time import time
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.decomposition import NMF, LatentDirichletAllocation
n_samples = 9
n_features = 100
n_components = 3
n_top_words = 6
def print_top_words(mo... |
PinkFlufflyLlama/ttauri | src/ttauri/file_view_tests.cpp | // Copyright <NAME> 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
#include "ttauri/file_view.hpp"
#include "ttauri/required.hpp"
#include <gtest/gtest.h>
#include <iostream>
#include <string>
using namesp... |
daemon-demon/airflow | airflow/providers/redis/operators/redis_publish.py | <filename>airflow/providers/redis/operators/redis_publish.py
#
# 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 t... |
kylearon/test1 | com.soartech.simjr.core/src/main/java/com/soartech/simjr/ui/shapes/NullShapeFactory.java | /*
* Copyright (c) 2010, Soar Technology, 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 ... |
lcy0x1/Create | src/main/java/com/simibubi/create/foundation/ponder/instruction/EmitParticlesInstruction.java | package com.simibubi.create.foundation.ponder.instruction;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.ponder.PonderScene;
import com.simibubi.create.foundation.ponder.PonderWorld;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.ParticleEngine;
import net.minec... |
leroynas/udacity-wyr | app/components/pages/Question/index.js | <reponame>leroynas/udacity-wyr
/**
*
* Question
*
*/
import React, { memo, useState } from 'react';
import PropTypes from 'prop-types';
import { Redirect } from 'react-router-dom';
import Container from 'components/ui/Container';
import Title from 'components/ui/Title';
import Page from 'components/ui/Page';
impo... |
BernardoFuret/async-tajs | test-resources/src/flowgraphbuilder/flowgraph_builder0103.js | <gh_stars>1-10
var x = {a:42}
for (var b in x) {
continue;
b = 44;
}
|
Fusion-Rom/android_external_chromium_org | athena/home/public/app_model_builder.h | <gh_stars>1-10
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ATHENA_HOME_PUBLIC_APP_MODEL_BUILDER_H_
#define ATHENA_HOME_PUBLIC_APP_MODEL_BUILDER_H_
#include "athena/athena_export.h"
namespa... |
cuauv/software | locator/density.py | <reponame>cuauv/software<filename>locator/density.py<gh_stars>10-100
import numpy
import pylab
import math
from math import degrees, atan2, radians, cos, sin
import random
import scipy.ndimage
num_type = numpy.float32
def normalize_volume(array):
''' Makes a new array with total density of 1 and the same shape a... |
TrustedBSD/sebsd | tools/regression/mqueue/mqtest1/mqtest1.c | <reponame>TrustedBSD/sebsd
/* $FreeBSD: src/tools/regression/mqueue/mqtest1/mqtest1.c,v 1.1 2005/11/26 13:19:08 davidxu Exp $ */
#include <stdio.h>
#include <mqueue.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
#define MQNAME "/mytstqueue1"
int main()
{
struct mq_attr attr, attr2;
struct sigevent si... |
Lavish883/Loki-Stream | node_modules/@expo/config-plugins/build/utils/modules.js | version https://git-lfs.github.com/spec/v1
oid sha256:da8d72ea694d0371e8ada19d8b30f1bde46717e2c01834623ee3010ad03a87e6
size 1030
|
peurpdapeurp/ndnrtc | cpp/tests/test-audio-playout.cc | <filename>cpp/tests/test-audio-playout.cc
//
// test-audio-playout.cc
//
// Created by <NAME> on 18 May 2016.
// Copyright 2013-2016 Regents of the University of California
//
#include <stdlib.h>
#include "gtest/gtest.h"
#include "tests-helpers.hpp"
#include "frame-data.hpp"
#include "src/audio-playout.hpp"
#inclu... |
dawmlight/tools_oat | src/main/java/ohos/oat/analysis/OatMainAnalyser.java | /*
* Copyright (c) 2021 Huawei Device Co., 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
*
* Unless required by applicable law ... |
bocke/ucc | test/cases/inline/inline_stret.c | <gh_stars>10-100
// RUN: %ocheck 10 %s -fno-semantic-interposition
void abort(void) __attribute__((noreturn));
typedef struct A { long i, j, k; } A;
__attribute((always_inline))
inline A f(int k, int cond)
{
if(cond){
A local = { .i = 99, .k = k };
return local;
}
return (A){ .i = 3, .k = k };
}
main()
{
#inc... |
LazarJovic/literary-association | Bitcoin-Payment-Service/src/main/java/goveed20/BitcoinPaymentService/BitcoinPaymentServiceApplication.java | <reponame>LazarJovic/literary-association<gh_stars>0
package goveed20.BitcoinPaymentService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.... |
uxDaniel/homebrew-fonts | Casks/font-gandom.rb | cask 'font-gandom' do
version '0.3'
sha256 '6a0084ffe9a57744e4c17f9a80c6417e42c3ff28c01bfbec8d399ea2683c4a4b'
url "https://github.com/rastikerdar/gandom-font/releases/download/v#{version}/gandom-font-v#{version}.zip"
appcast 'https://github.com/rastikerdar/gandom-font/releases.atom',
checkpoint: '644... |
jingshanccc/course | file/proto/file/file.pb.micro.go | // Code generated by protoc-gen-micro. DO NOT EDIT.
// source: gitee.com/jingshanccc/course/file/proto/file/file.proto
package file
import (
fmt "fmt"
dto "gitee.com/jingshanccc/course/file/proto/dto"
basic "gitee.com/jingshanccc/course/public/proto/basic"
proto "github.com/golang/protobuf/proto"
math "math"
)
... |
hmrc/residence-nil-rate-band-calculator-frontend | app/uk/gov/hmrc/residencenilratebandcalculator/json/JsonErrorProcessor.scala | /*
* Copyright 2021 HM Revenue & Customs
*
* 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 a... |
mario2904/ICOM5016-Project | app/components/administrator.js | import React, { Component } from 'react';
import { Link } from 'react-router';
import { Header, List, Icon, Button } from 'semantic-ui-react';
import AdministratorTableAssociations from './administrator-table-associations';
export default class Administrator extends Component {
render () {
return (
<div>
... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/pr81650.c | /* PR driver/81650 */
/* { dg-do compile } */
/* { dg-options "-Walloc-size-larger-than=9223372036854775807" } */
void *
foo (void)
{
return __builtin_malloc (5);
}
|
jce-caba/GtkQR | include/QrcalculateMask.h | #ifndef QRCALCULATEMASK_H_INCLUDED
#define QRCALCULATEMASK_H_INCLUDED
#include <QrDefinitions.h>
long getpointMask(char **,QR_Data *);
long getpointMask_micro_QR(char **,QR_Data *);
#endif // QRCALCULATEMASK_H_INCLUDED
|
opengauss-mirror/CM | src/cm_server/cms_barrier_check.cpp | /*
* Copyright (c) 2021 Huawei Technologies Co.,Ltd.
*
* CM is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ON AN "... |
mbsharp85/knox | gateway-spi/src/main/java/org/apache/knox/gateway/services/config/client/RemoteConfigurationRegistryClient.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may ... |
sifbuilder/eon | eon-muon-anitem.js | <filename>eon-muon-anitem.js
/***********
* @eonMuonAnitem
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)
: typeof define === 'function' && define.amd ? define(['exports'], factory)
: (factory((global.eonMuonAnitem = global.eonMuonAnitem... |
amane312/mct | mobile/screens/AI/Quiz.js | import React, {useState} from 'react';
import {
Text,
View,
StyleSheet,
TouchableOpacity,
SafeAreaView,
FlatList,
StatusBar,
Image,
ImageBackground,
Button,
ScrollView,
} from 'react-native';
import {ProgressBar} from '@react-native-community/progress-bar-android';
import {Icon} from 'react-nativ... |
YXChan/chronus | chronus-metadata-api/src/main/java/com/qihoo/finance/chronus/metadata/api/assign/enums/ExecutorLoadPhaseEnum.java | <reponame>YXChan/chronus
package com.qihoo.finance.chronus.metadata.api.assign.enums;
/**
* Created by xiongpu on 2019/9/7.
*/
public enum ExecutorLoadPhaseEnum {
RESET(-1, "需重新加载"),
INIT(0, "初始化"),
REMOVE(1, "变更调度需移除"),
ADD(2, "变更调度需补充"),
FINISH(3, "处理完成"),
OFFLINE(-9, "节点下线"),
;
p... |
chuckmersereau/api_practice | spec/services/tnt_import/xml_reader_spec.rb | <filename>spec/services/tnt_import/xml_reader_spec.rb
require 'rails_helper'
describe TntImport::Xml do
let(:tnt_import) { create(:tnt_import, override: true) }
let(:xml_reader) { TntImport::XmlReader.new(tnt_import) }
describe 'initialize' do
it 'initializes' do
expect(xml_reader).to be_a TntImport::... |
doitintl/dataflow-bigquery-schema-migrator-insert | src/main/java/com/doit/schemamigration/Parsers/JsonToTableRow.java | <reponame>doitintl/dataflow-bigquery-schema-migrator-insert
package com.doit.schemamigration.Parsers;
import com.google.api.services.bigquery.model.TableRow;
import com.owlike.genson.Genson;
import com.owlike.genson.JsonBindingException;
import com.owlike.genson.stream.JsonStreamException;
import java.util.HashMap;
im... |
muthukumaravel7/armnn | Documentation/structarmnn_1_1_resolve_type_impl_3_01_data_type_1_1_boolean_01_4.js | <filename>Documentation/structarmnn_1_1_resolve_type_impl_3_01_data_type_1_1_boolean_01_4.js
var structarmnn_1_1_resolve_type_impl_3_01_data_type_1_1_boolean_01_4 =
[
[ "Type", "structarmnn_1_1_resolve_type_impl_3_01_data_type_1_1_boolean_01_4.xhtml#a4ead9bff73e6b8e9843a264a3c9ef8f8", null ]
]; |
kreta/Kreta | CompositeUi/src/views/component/NavigableListItemLink.js | <filename>CompositeUi/src/views/component/NavigableListItemLink.js
/*
* This file is part of the Kreta package.
*
* (c) <NAME> <<EMAIL>>
* (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React from 're... |
ttrifonov/horizon | horizon/horizon/dashboards/syspanel/instances/tests.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
#
# 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
#
# ... |
erichuang1994/leetcode-solution | 901-1000/997. Find the Town Judge.cpp | <reponame>erichuang1994/leetcode-solution
class Solution
{
public:
int findJudge(int N, vector<vector<int>> &trust)
{
vector<int> in(N + 1), out(N + 1);
for (auto &t : trust)
{
in[t[1]]++;
out[t[0]]++;
}
for (int i = 1; i < N + 1; ++i)
{
if (in[i] == N - 1 && out[i] == 0)
... |
charithe/beam | learning/katas/java/Windowing/Fixed Time Window/Fixed Time Window/test/org/apache/beam/learning/katas/windowing/fixedwindow/WindowedEvent.java | <reponame>charithe/beam
/*
* 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 ... |
kuzhamuratov/deep-landscape | superres/src/models/srgan.py | <filename>superres/src/models/srgan.py<gh_stars>10-100
import logging
from collections import OrderedDict
import torch
import torch.nn as nn
from torch.nn.parallel import DataParallel, DistributedDataParallel
import models.networks as networks
import models.lr_scheduler as lr_scheduler
from .base_model import BaseMod... |
VolgaCTF/volgactf-qualifier-backend | src/controllers/mail/smtp.js | const logger = require('../../utils/logger')
const nodemailer = require('nodemailer')
class SMTPController {
static sendEmail (message, recipientEmail, recipientName, messageId) {
return new Promise(function (resolve, reject) {
const transporter = nodemailer.createTransport({
host: process.env.SMTP... |
willmexe/opuntiaOS | kernel/include/mem/bits/zone.h | /*
* Copyright (C) 2020-2022 The opuntiaOS Project Authors.
* + Contributed by <NAME> <<EMAIL>>
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef _KERNEL_MEM_BITS_ZONE_H
#define _KERNEL_MEM_BITS_ZONE_H
#include <mem/bits/mmu.h>
enum ZONE_FLAGS {... |
hrajput89/kv_engine | include/cbsasl/logging.h | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2017 Couchbase, Inc.
*
* 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
*
* ... |
vladimirg-dev/lazybucks-cookie-manager | spec/ui.spec.js | <reponame>vladimirg-dev/lazybucks-cookie-manager<filename>spec/ui.spec.js<gh_stars>10-100
"use strict"
const Promise = require ("bluebird")
const Browser = require ("../utils/Browser")
const assert = require ("assert")
describe ( "User Interface", function () {
this.timeout ( 2E5 )
describe ( "Search", function (... |
alexeyz041/toolbox | rtsp-streamer/source.h | <filename>rtsp-streamer/source.h
#ifndef _SOURCE_H
#define _SOURCE_H
#ifndef _FRAMED_SOURCE_HH
#include "FramedSource.hh"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <deque>
#ifdef USE_X264
#include "encoder.h"
#else
#include "encoder2.h"
#endif
class SourceParameters {
public:
Sour... |
vjpr/swc | ecmascript/minifier/tests/terser/compress/typeof/duplicate_lambda_arg_name/output.terser.js | <reponame>vjpr/swc
console.log(
(function long_name(long_name) {
return typeof long_name;
})()
);
|
Andreas237/AndroidPolicyAutomation | ExtractedJars/RT_News_com.rt.mobile.english/javafiles/com/google/android/gms/internal/ads/zziy.java | // Decompiled by Jad v1.5.8g. Copyright 2001 <NAME>.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.internal.ads;
import java.io.IOException;
// Referenced classes of package com.google.android.gms.internal.ads:
// zzbfc, zzbez, z... |
kane-chen/mview | mview.worker/src/main/java/cn/kane/mview/worker/resource/loader/builder/PageBuilder.java | <gh_stars>0
package cn.kane.mview.worker.resource.loader.builder;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import cn.kane.mview.service.definition.entity.DefinitionKey;
import cn.kane.mview.service.definition.entity.PageDefinition;
import cn.kane.mview.service.definition.... |
narendly/VoogaSalad | voogasalad/player/leveldatamanager/LevelData.java | <reponame>narendly/VoogaSalad<gh_stars>1-10
package player.leveldatamanager;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.HashMap;
import authoring.interfaces.Elem... |
null-kryptonian/ProblemSolving | HackerRank/10 days of Statistics/Day 1 Standard Deviation.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
cin >> n;
int arr[n], sum = 0;
double mean = 0.0, result = 0.0, variance = 0.0, stdDeviat... |
jjzhang166/zzilla_opencvr | include/mining/include/minterfacemgr.hpp | //------------------------------------------------------------------------------
// File: minterfacemgr.hpp
//
// Desc: Interface manager for Data Mining.
//
// Copyright (c) 2014-2018. veyesys.com All rights reserved.
//------------------------------------------------------------------------------
#ifndef __M_INTERFAC... |
phpmob/chang-admin | src/PhpMob/CmsBundle/Resources/private/js/lib/submit-spinner.js | $.fn.spinner = function (type, side) {
var $el = $(this);
var method = 'left' === side ? 'prepend' : 'append';
if ('remove' === type) {
$el.removeClass('spinning');
$el.find('.submit-spinner').remove();
return this;
}
$el.addClass('spinning');
$el[method](
'<di... |
jnthn/intellij-community | python/testData/copyPaste/BeginningOfIndentedLinePrecededByPastedWord.src.py | <reponame>jnthn/intellij-community<filename>python/testData/copyPaste/BeginningOfIndentedLinePrecededByPastedWord.src.py
<selection>CellClass.</selection> |
choi360/42bangkok-libft | test/libft_test/tests/Part1_functions/ft_memchr/main.c | <filename>test/libft_test/tests/Part1_functions/ft_memchr/main.c
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c ... |
umer-rs/runelite | runescape-client/src/main/java/class251.java | import net.runelite.mapping.ObfuscatedName;
@ObfuscatedName("is")
public interface class251 {
}
|
talCrafts/Udhari | app/src/main/java/org/talcrafts/udhari/tx/DatePickerFragment.java | package org.talcrafts.udhari.tx;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.os.Bundle;
import androidx.fragment.app.DialogFragment;
import java.util.Calendar;
/* Wrapper to show a managed date picker */
public class DatePickerFragment extends DialogFragment {
@Override
p... |
mantamusica/interfacesDesign | NetBeansProjects/Sockets_Ejercicio1/src/sockets_ejercicio2/Server.java | package sockets_ejercicio2;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import s... |
LeovR/rtpmidi | rtp-midi-core/src/main/java/io/github/leovr/rtipmidi/AppleMidiServer.java | package io.github.leovr.rtipmidi;
import io.github.leovr.rtipmidi.session.AppleMidiSession;
import io.github.leovr.rtipmidi.session.SessionChangeListener;
import io.github.leovr.rtipmidi.control.AppleMidiControlServer;
import io.github.leovr.rtipmidi.session.AppleMidiSessionServer;
import lombok.Getter;
import lombok.... |
Quantify-world/react-styleguidist-fix-react-docgen | lib/rsg-components/Name/NameRenderer.js | <reponame>Quantify-world/react-styleguidist-fix-react-docgen
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NameRenderer = NameRenderer;
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _int... |
GuillaumeLahi/Bauhaus | packages/utilities/src/components/editor-html/editor-html.spec.js | import React from 'react';
import { render } from '@testing-library/react';
import EditorHTML from '.';
describe('editor-html', () => {
it('renders without crashing', () => {
const onChange = () => '';
render(<EditorHTML text="text" handleChange={onChange} smart={true} />);
});
});
|
dsager/article_json | lib/article_json/import/google_doc/html/image_parser.rb | module ArticleJSON
module Import
module GoogleDoc
module HTML
class ImageParser
include Shared::Caption
include Shared::Float
# @param [Nokogiri::HTML::Node] node
# @param [Nokogiri::HTML::Node] caption_node
# @param [ArticleJSON::Import::GoogleDoc:... |
marc-christian-schulze/aws-sdk-java-v2 | core/metrics-spi/src/main/java/software/amazon/awssdk/metrics/NoOpMetricCollector.java | <reponame>marc-christian-schulze/aws-sdk-java-v2
/*
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.ama... |
z415073783/MNN | source/backend/cpu/CPUCosineSimilarity.cpp | //
// CPUCosineSimilarity.cpp
// MNN
//
// Created by MNN on 2019/07/17.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include "CPUCosineSimilarity.hpp"
#include <math.h>
#include "CPUBackend.hpp"
#include "Macro.h"
#include "Vec4.hpp"
namespace MNN {
ErrorCode CPUCosineSimilarity::onExecute(const std::... |
MagicSchooliOS/WCRLiveCorePod | Frameworks/WCRLiveCore.framework/Headers/WCRError.h | <filename>Frameworks/WCRLiveCore.framework/Headers/WCRError.h
//
// WCRError.h
// WCRLiveCore
//
// Created by wenssh on 2018/8/8.
// Copyright © 2018年 com.100tal. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface WCRError : NSError
- (instancetype)initWithDomain:(NSEr... |
panos/haikudepotserver | haikudepotserver-webapp/src/main/java/org/haiku/haikudepotserver/multipage/package-info.java | /**
* <p>This package is concerned with the presentation of a simplified user interface that is driven by vanilla
* web pages as opposed to the "single page" approach taken in the main user interface for the application.</p>
*/
package org.haiku.haikudepotserver.multipage; |
lokijuhy/renku-python | tests/core/management/test_template.py | <reponame>lokijuhy/renku-python
# -*- coding: utf-8 -*-
#
# Copyright 2019-2021 - Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you m... |
harveywangdao/earth | elegant/test/hera/main_cookie.go | <reponame>harveywangdao/earth
package main
import (
"io"
"log"
"net/http"
"strings"
)
func main() {
http.HandleFunc("/", Cookie)
http.HandleFunc("/2", Cookie2)
err := http.ListenAndServe(":8090", nil)
if err != nil {
log.Fatal(err)
}
}
func Cookie(w http.ResponseWriter, r *http.Request) {
log.Print("111... |
fangjinuo/langx | langx-java/src/main/java/com/jn/langx/pipeline/HeadHandlerContext.java | <filename>langx-java/src/main/java/com/jn/langx/pipeline/HeadHandlerContext.java
package com.jn.langx.pipeline;
public class HeadHandlerContext extends HandlerContext {
public HeadHandlerContext() {
super(NoopHandler.getInstance());
}
public HeadHandlerContext(Handler handler) {
super(hand... |
rgiduthuri/NNEF-Tools | nnef_tools/io/nnef/nnef_io.py | # Copyright (c) 2017 The Khronos Group Inc.
#
# 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 ... |
Quernest/schedule-admin | client/src/components/Dashboard/Schedule/Week.js | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from 'react-intl';
import parsers from '../../../helpers/parsers';
const { parseWeekTypes } = parsers;
const Week = ({
intl,
children,
className,
type,
}) => {
const { formatMessage } = intl;
return (
<div... |
AdrianKolbuk/WebService-for-driving-school | tin_projekt_Kolbuk_s17131/tin_s17131_react/src/components/other/MainContent.js | <filename>tin_projekt_Kolbuk_s17131/tin_s17131_react/src/components/other/MainContent.js
import React from 'react'
import { useTranslation } from 'react-i18next';
function MainContent() {
const { t } = useTranslation();
return (
<main>
<h2>{t('nav.main-page')}</h2>
<p>System in... |
qwzhang01/lotus | lotus_common/src/main/java/com/lotus/common/entity/AjaxResult.java | package com.lotus.common.entity;
public class AjaxResult {
private String message;
private int errorCode = 0; // 0: normal , >=1 : error
private Object data;
public static AjaxResult success(String message) {
AjaxResult result = new AjaxResult();
result.setErrorCode(0);
result.... |
stdbilly/CS_Note | mycode/cpp/OOD/TextQuery/Query.cc | <gh_stars>1-10
#pragma once
#include "Query.h"
#include <algorithm>
#include <iterator>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "TextQuery.h"
using namespace std;
QueryResult OrQuery::eval(const TextQuery& text) const {
//通过query的_lhs和_rhs进行的虚调用
auto right = _rhs.eval(tex... |
vicobits/django-wise | apps/accounts/serializers/token_serializer.py | # -*- coding: utf-8 -*-
from rest_framework import serializers
from rest_framework.serializers import Serializer
class TokenSerializer(Serializer):
"""Validates token existence."""
token = serializers.CharField()
class RefreshTokenSerializer(serializers.Serializer):
"""Validates refresh_token existenc... |
tusharchoudhary0003/Custom-Football-Game | sources/p005cm/aptoide/p006pt/dataprovider/p010ws/p013v7/home/ActionItemResponse.java | <gh_stars>1-10
package p005cm.aptoide.p006pt.dataprovider.p010ws.p013v7.home;
import p005cm.aptoide.p006pt.dataprovider.model.p009v7.BaseV7EndlessDataListResponse;
/* renamed from: cm.aptoide.pt.dataprovider.ws.v7.home.ActionItemResponse */
public class ActionItemResponse extends BaseV7EndlessDataListResponse<ActionI... |
rgomulin/aml_s905_uboot | u-boot/board/xilinx/zynq/legacy.c | <gh_stars>10-100
#warning usage of ps7_init files is deprecated please use ps7_init_gpl
|
AndreyShpilevoy/DemProject | DEM_MVC_UI/src/scripts/containers/Page_ViewForum/test.js | /*eslint no-undef: 'off'*/
/* eslint import/no-extraneous-dependencies: 'off' */
import React from 'react';
import {shallow} from 'enzyme';
import * as mockActions from 'actions/__mocks__/sharedFakeActions';
import {sharedFakeStore, validFakeStoreData} from 'store/__mocks__/sharedFakeStore';
import PageViewForum from ... |
vimofthevine/UnderBudget | src/ui/prefs/PrefsDialog.cpp | /*
* Copyright 2013 <NAME>
*
* 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 in wr... |
jhtwong/Open-Quark | src/Utilities/org/openquark/util/xml/AttributeSetSerializer.java | /*
* Copyright (c) 2007 BUSINESS OBJECTS SOFTWARE LIMITED
* 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 n... |
GreenLightSoftware/brochure-wsgi | brochure_wsgi/http_user_interface.py | <gh_stars>0
import json
from collections import defaultdict
from functools import partial
from typing import Callable, Optional, Dict
from brochure.brochure_user_interface import BrochureUserInterface
from brochure.values.basics import Basics
from brochure.values.contact_method import ContactMethodType
from brochure.v... |
werminghoff/Provenance | Cores/PicoDrive/platform/gp2x/warm.h | /*
* wARM - exporting ARM processor specific privileged services to userspace
* library functions
*
* Copyright (c) Gražvydas "notaz" Ignotas, 2009
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistr... |
katalysteducation/cnx-designer | test/handlers/exercise/enter-in-solution.js | /** @jsx h */
import { Editor, Element, Transforms } from 'slate'
export default (input, editor) => {
input.break().break()
Transforms.select(editor, Editor.end(editor, Editor.above(editor, { match: Element.isElement })[1]))
input.break().break().break()
}
export const input = <editor>
<exercise>
... |
rrdrake/vvtest | trig/svnemail.py | <gh_stars>1-10
#!/usr/bin/env python
import sys
sys.dont_write_bytecode = True
sys.excepthook = sys.__excepthook__
import os
import time
import signal
from mailmessage import Message, get_current_user_name
SEND_MAIL_TIMEOUT = 30
DEFAULT_SMTPHOSTS = ['smtp.sandia.gov','localhost']
EMAIL_DOMAIN = 'sandia.gov'
class... |
dbadari/fiscalizer | spec/spec_helper.rb | require 'fiscalizer'
require 'pathname'
require 'pry'
require 'securerandom'
require 'webmock/rspec'
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
root_path = Pathname.new(File.expand_path('../', File.dirname(__FILE__)))
Dir[root_path.join('spec/support/**/*.rb')].each { |f| require f }
public
def get_... |
pramulkant/https-github.com-android-art-intel-marshmallow | art-extension/opttests/src/OptimizationTests/regression/test183046/Main.java | /*
* Copyright (C) 2015 Intel 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.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
thejohnfreeman/rambda | modules/reject.js | import filter from './filter'
export default function reject (fn, arr) {
if (arr === undefined) {
return arrHolder => reject(fn, arrHolder)
}
return filter(x => !fn(x), arr)
}
|
apihackers/wapps | wapps/factories/category.py | <filename>wapps/factories/category.py
import factory
from wapps.models import Category
class CategoryFactory(factory.DjangoModelFactory):
name = factory.Sequence(lambda n: 'Category {0}'.format(n))
class Meta:
model = Category
|
santosh653/interproscan | core/io/src/main/java/uk/ac/ebi/interpro/scan/io/match/hmmer/hmmer3/parsemodel/DomainMatch.java | package uk.ac.ebi.interpro.scan.io.match.hmmer.hmmer3.parsemodel;
import java.io.Serializable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Provides a match for a Domain line in hmmsearch output format.
*
* @author <NAME>
* @version $Id$
* @since 1.0-SNAPSHOT
*/
public class DomainMatch... |
kdoomsday/kaminalapp | test/daos/doobie/UserDaoDoobieSpec.scala | package daos.doobie
import doobie.specs2.imports.AnalysisSpec
import org.specs2.mutable.Specification
import testutil.TestUtil
/** Pruebas para los queries de UserDaoDoobie */
object UserDaoDoobieSpec extends Specification with AnalysisSpec {
val transactor = TestUtil.transactor()
check(UserDaoDoobie.userIdQuery... |
dpukhkaiev/BRISE2 | worker/worker_tools/__init__.py | __all__ = [
"reflective_worker_method_import",
"splitter"
]
|
WhatAboutGaming/pyramid-waggle | server/util/tokens.js | const sodium = require("sodium").api;
const SESSION_KEY_LENGTH = 80;
const CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var acceptedTokens = [];
const rand = function() {
return sodium.randombytes_random() / 0xffffffff;
};
const addToAcceptedTokens = function(token) {
if (token) {
a... |
atul-vyshnav/2021_IBM_Code_Challenge_StockIT | src/StockIT-v1-release_source_from_JADX/sources/com/google/android/gms/ads/internal/overlay/AdOverlayInfoParcel.java | <reponame>atul-vyshnav/2021_IBM_Code_Challenge_StockIT<gh_stars>1-10
package com.google.android.gms.ads.internal.overlay;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.ads.internal.zzi;
import co... |
ronistone/SpaceInvaders | core/src/com/space/invaders/models/Touchable.java | package com.space.invaders.models;
public interface Touchable {
public boolean isTouch(float x, float y);
public void doAction();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.