id stringlengths 64 64 | content stringlengths 500 100k | language stringclasses 29
values | path stringlengths 4 333 | repo stringlengths 5 116 | license stringclasses 15
values | size int64 500 100k | lines int64 26 8.06k | source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
9c431ffc1c6151e32d0ae25adc403aaad5a467fcda63386f414c430921e6dd92 | package main
import (
"crypto/sha1"
"encoding/hex"
"encoding/json"
"fmt"
"net"
"os"
"os/exec"
"text/template"
"github.com/golang/glog"
k8sexec "k8s.io/kubernetes/pkg/util/exec"
)
const (
nsdTmpl = `
`
)
type record struct {
name string
ip net.IP
}
type nsd struct {
ns []record
a []record
}
func ... | GO | nsd.go | aledbf/kube-dns-server | apache-2.0 | 1,221 | 80 | codeparrot/github-code |
e9188e2e669a9da784f1729836127cb4c2c4fd313172a839e5c4e295db6cce81 | <?php
include_once("header.php");
?>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<h1 class="page-header page-head">
Youth Empowerment
... | PHP | youth.php | thadaninilesh/Vivekanand-Seva-Mandal-Website | apache-2.0 | 15,312 | 280 | codeparrot/github-code |
2ba95c87372c33f1f9e888844b5af4388638d594993bfbe0828f726c0cfcec10 | /**
*
*/
package bonafide.datastore;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.Map.Entry;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.google.common.collect.I... | Java | src/main/java/bonafide/datastore/KeyValueColumnDatastoreProxyTest.java | fbotelho-university-code/poseidon | apache-2.0 | 11,832 | 369 | codeparrot/github-code |
84c8ef781d89203387471183fb36db2d78fe9479188134fa3d1cc970c67c0caa | /*
* AbstractRatiosDataModel.java
*
*
* Copyright 2006-2015 James F. Bowring and www.Earth-Time.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... | Java | src/main/java/org/earthtime/ratioDataModels/AbstractRatiosDataModel.java | johnzeringue/ET_Redux | apache-2.0 | 39,990 | 1,243 | codeparrot/github-code |
1548508e297193d37b8a668520dd331c72174c2cdf6f11cf06544dd20bf13ee8 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | Java | engine/src/test/java/org/camunda/bpm/engine/test/api/repository/diagram/ProcessDiagramParseTest.java | falko/camunda-bpm-platform | apache-2.0 | 4,791 | 126 | codeparrot/github-code |
c4914557fbeb0f5489aa010bd5657b0a31654a50e3df7c4f3324b72d72ba0ab2 | using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
public class DataCenterListItem
{
public string Category { get; set; }
public string SwitchName { get; set; }
public string Name { get; set; }
public override string ToS... | C# | KabMan Application/QuickTest/Program.cs | abutun/kabman | apache-2.0 | 3,567 | 118 | codeparrot/github-code |
5babcca215b276178a896dfeb97a186f1ff07290554592e17ad3904487c12bc4 | /*
* Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | Java | commons/com.b2international.collections.fastutil/src/com/b2international/collections/bytes/ByteArrayListWrapper.java | b2ihealthcare/snow-owl | apache-2.0 | 3,372 | 119 | codeparrot/github-code |
40d93a0d0b8da5a5aac7844a89a77c020c4508ad11b79851cb48d16b4e2049cc | package org.rest.sec.model;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import ... | Java | modules/api/src/main/java/org/rest/sec/model/Role.java | minanos/minano | apache-2.0 | 3,150 | 121 | codeparrot/github-code |
bb7817f15898ca71cdbfebbef44b980fb7be1e3420f0cd4e0f0cf1e190f7a807 | package com.hss01248.image.exif;
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;
import com.hss01248.image.MyUtil;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.refl... | Java | imageloader/src/main/java/com/hss01248/image/exif/ExifUtil.java | hss01248/ImageLoader | apache-2.0 | 37,509 | 768 | codeparrot/github-code |
356b20d06680280199d091c7fa926d19b03736b84d029e6bb9c7166d1307d251 | """ EPYNET Classes """
from . import epanet2
from .objectcollection import ObjectCollection
from .baseobject import BaseObject, lazy_property
from .pattern import Pattern
class Node(BaseObject):
""" Base EPANET Node class """
static_properties = {'elevation': epanet2.EN_ELEVATION}
properties = {'head': ep... | Python | epynet/node.py | VitensTC/epynet | apache-2.0 | 4,030 | 114 | codeparrot/github-code |
d3d105d0503118aaabd1552e790373de35fa4cc3260a00c01063de6e7d5c51a6 | /**
* © Copyright IBM Corporation 2015
*
* 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 ... | Java | speech-android-wrapper/src/main/java/com/ibm/watson/developer_cloud/android/text_to_speech/v1/TextToSpeech.java | jithsjoy/speech-android-sdk | apache-2.0 | 5,182 | 163 | codeparrot/github-code |
3d86db6692551afd853e29af2a08b45ccb26cd8e1671a1caddb431a54f939a72 | /*
* Copyright (C) 2004-2015 Volker Bergmann (volker.bergmann@bergmann-it.de).
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/lic... | Java | src/test/java/org/databene/commons/math/IntervalParserTest.java | aravindc/databenecommons | apache-2.0 | 2,106 | 59 | codeparrot/github-code |
5b62146535521c1e7730ea7cba53fd9285831616318abcf5134af992d6cca4a3 | pub type __priority_which_t = ::c_uint;
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: ::sigevent,
__next_prio: *mut aiocb,
... | Rust | src/unix/notbsd/linux/other/mod.rs | cactorium/libc | apache-2.0 | 22,640 | 624 | codeparrot/github-code |
04cdbafd2f523e24b74790ff0bb29e8d43dfefd7f6fabc19a65b5d4d13b254fa | #ifndef CHASKY_CORE_FRAMEWORK_FUNC_H_
#define CHASKY_CORE_FRAMEWORK_FUNC_H_
#include <vector>
#include <memory>
#include <unordered_map>
#include "chasky/core/common/status.h"
#include "chasky/common/strings.h"
#include "chasky/common/string_piece.h"
#include "chasky/core/framework/argument.pb.h"
#include "chasky/core/... | C | chasky/core/framework/function.h | Superjom/cHasky | apache-2.0 | 5,021 | 166 | codeparrot/github-code |
881ff8e878d894c946b547e54bb83816f80c32e43f13f866d3fad25fb136d393 | /*
* Licensed to Crate.io Inc. ("Crate.io") under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership. Crate.io licenses
* this file to you under the Apache License, Version 2.0 (the "License");
* you may not use ... | Java | server/src/test/java/io/crate/analyze/DropFunctionAnalyzerTest.java | EvilMcJerkface/crate | apache-2.0 | 4,225 | 98 | codeparrot/github-code |
4d8b63a6e423e5e050bc0b977e04388d1477b45dac384a6ca7610b3f89146039 | /*
* Copyright 2011-2021 Asakusa Framework Team.
*
* 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 ... | Scala | runtime/src/main/scala/com/asakusafw/spark/runtime/serializer/BranchSerializer.scala | asakusafw/asakusafw-spark | apache-2.0 | 1,346 | 39 | codeparrot/github-code |
e154fc812fa4f1ea29d6d06fc5c7f2a18c4eb7d9948a48ce9d26e5f0ae4076be | package elasticsearch
import (
"encoding/json"
"fmt"
"github.com/luopengift/gohttp"
)
const (
enter = '\n'
)
type Meta struct {
Index string `json:"_index"`
Type string `json:"_type"`
Id string `json:"_id,omitempty"`
}
func NewMeta(_index, _type, _id string) *Meta {
return &Meta{_index, _type, _id}
}
... | GO | plugins/output/elasticsearch/bulk.go | luopengift/transport | apache-2.0 | 1,235 | 66 | codeparrot/github-code |
5b80e67702d38ea8a899813193ed46221b1498ca2b69de98b88676ec5b0f836d | from __future__ import print_function
import pandas as pd
from sklearn.base import TransformerMixin
class FamilyCounter(TransformerMixin):
def __init__(self, use=True):
self.use = use
def transform(self, features_raw, **transform_params):
if self.use:
features = features_raw.copy... | Python | titanic/transformers/FamilyCounter.py | wojtekwalczak/kaggle_titanic | apache-2.0 | 946 | 31 | codeparrot/github-code |
8d41a25075017c773a929326bc51323daa596386c96c3859ea4957d55e976e99 | /*
Derby - Class org.apache.derby.impl.jdbc.UTF8ReaderTest
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 u... | Java | java/testing/org/apache/derby/impl/jdbc/UTF8ReaderTest.java | trejkaz/derby | apache-2.0 | 10,873 | 271 | codeparrot/github-code |
8d963e7c4a62fd55e77aba3e02e469e0ea341e48afe0c5c27fc6a4bed2ed34c6 | package technology.mainthread.apps.moment.ui.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
im... | Java | mobile/src/main/java/technology/mainthread/apps/moment/ui/fragment/SignInFriendFinderFragment.java | AndrewJack/moment-for-android-wear | apache-2.0 | 6,762 | 181 | codeparrot/github-code |
217003a8116170ead574bdda09641c466e308d6623785bfa7f739475d4c1dbad | <?php
if(!defined('MAIN_DIR')){define('MAIN_DIR',dirname('__FILENAME__'));}
require_once(MAIN_DIR.'/_php/_config/session.php');
require_once(MAIN_DIR.'/_php/_config/connection.php');
require_once(MAIN_DIR.'/_php/_config/functions.php');
confirm_logged_in();
require_priv('priv_csv_import');
/*
Read the uploaded file a... | PHP | import.php | VandyVRC/DIMLI | apache-2.0 | 6,082 | 211 | codeparrot/github-code |
4cd4ce858f573cad5dbaef94401476cb3a469110bb2b7851ec761a78a0a8c3bd | package org.hswebframework.web.authorization.basic.define;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.hswebframework.web.authorization.annotation.*;
import org.hswebframework.web.authorization.define.*;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.sp... | Java | hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/define/DefaultBasicAuthorizeDefinition.java | hs-web/hsweb-framework | apache-2.0 | 5,350 | 155 | codeparrot/github-code |
2deb62dc9ebb16467b6aad4969d20dc905b8916f268a3378176dfe9c218cf4be | /*
* Copyright 2013 Gunnar Kappei.
*
* 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... | Java | src/net/opengis/gml/impl/SymbolDocumentImpl.java | moosbusch/xbLIDO | apache-2.0 | 2,326 | 75 | codeparrot/github-code |
ba27320539973694e81b10f14b9549a496ce23553ef585f5d29d6be70da90a9d | package krasa.release.service;
import java.io.File;
import java.util.Date;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Ser... | Java | src/main/java/krasa/release/service/TokenizationFacade.java | krasa/DevSupportApp | apache-2.0 | 4,750 | 136 | codeparrot/github-code |
6b44b1f8745433c042504b32dfc36b8e34d2e84be8e4b697c319ce84f4290b44 | goog.provide('recoil.ui.widgets.table.LabelColumn');
goog.require('recoil.frp.Behaviour');
goog.require('recoil.frp.struct');
goog.require('recoil.ui.BoolWithExplanation');
goog.require('recoil.ui.widgets.LabelWidget');
goog.require('recoil.ui.widgets.table.Column');
/**
* @implements {recoil.ui.widgets.table.Colum... | JavaScript | src/ui/widgets/table/label_column.js | evaks/recoil | apache-2.0 | 2,400 | 78 | codeparrot/github-code |
f42d3593f6eb54cc3357b1b7679ff0415afe5796a8e02b94cff0371fdd03d764 | <?php declare(strict_types=1);
namespace Star\BacklogVelocity\Agile\Application\Query\Sprint;
use Star\BacklogVelocity\Agile\Domain\Model\ProjectId;
use Star\BacklogVelocity\Common\Application\Query;
final class MostActiveSprintInProject extends Query
{
/**
* @var ProjectId
*/
private $projectId;
... | PHP | src/Agile/Application/Query/Sprint/MostActiveSprintInProject.php | yvoyer/backlog-velocity | apache-2.0 | 850 | 41 | codeparrot/github-code |
3c0d3df455bbe08f8bec6eb14f2cd32b069ee43d837f8587aaf8584c693c3b63 | #coding: utf-8
__author__ = 'horacioibrahim'
import unittest, os
import datetime
from time import sleep, ctime, time
from random import randint
from hashlib import md5
from types import StringType
# python-iugu package modules
import merchant, customers, config, invoices, errors, plans, subscriptions
def check_tes... | Python | lib/iugu/tests.py | horacioibrahim/iugu-python | apache-2.0 | 80,119 | 1,786 | codeparrot/github-code |
f713f58c0470a461e983ea085159c03049380a6c6d6bfe30c11da54b034c543b | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
int socket_connect(char *host, in_port_t port){
struct hostent *hp;
struct sockaddr_in addr;
int on = ... | C | Introduction_to_Programming_Using_Java/socket.c | VictorS-Zhao/JavaEx | apache-2.0 | 1,364 | 66 | codeparrot/github-code |
4dc2ef85f39cea6488f2a3d26ab2196126e367075e8782747b6ba2381cbd8ac3 | package net.sf.anpr.rcp.widget;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.List;
import javax.imagei... | Java | src/main/java/net/sf/anpr/rcp/widget/OpenPerspectiveDialog.java | alexmao86/swing-rcp | apache-2.0 | 6,161 | 203 | codeparrot/github-code |
9579411c2111699c7d6357ea280bbed8afe934746386c9d0fc0e6ba4dee97fe8 | using System;
using PasPasPas.Globals.Runtime;
using PasPasPas.Globals.Types;
using PasPasPas.Typings.Common;
namespace PasPasPas.Typings.Simple {
/// <summary>
/// boolean type
/// </summary>
internal class BooleanType : CompilerDefinedType, IBooleanType {
/// <summary>
... | C# | PasPasPas.Typings/src/Simple/BooleanType.cs | prjm/paspaspas | apache-2.0 | 4,797 | 140 | codeparrot/github-code |
cfbfdc70f64a30c609b389f60b5d49f4adc7c934ad9e140d2da68143358d62b2 |
package chatty;
import chatty.gui.MainGui;
import chatty.util.DateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.logging.Logger;
/**
* Twitch Chat commands. Al... | Java | src/chatty/TwitchCommands.java | partouf/Chatty-Twitch-Client | apache-2.0 | 11,388 | 357 | codeparrot/github-code |
e4a9fe106c3c27474710840b345e1e553dea61fc712d89a9967caa1089b1b5bf | """
Copyright (C) 2017 Open Source Robotics Foundation
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... | Python | terminus/geometry/enu.py | ekumenlabs/terminus | apache-2.0 | 1,657 | 48 | codeparrot/github-code |
ac73bbbbcb0834c025da69451e5ccc90be0d2d41a417dafd1d6e769e749acd83 | /*
* Copyright 2010 JBoss 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 to i... | Java | drools-planner-examples/src/main/java/org/drools/planner/examples/curriculumcourse/domain/Curriculum.java | cyberdrcarr/optaplanner | apache-2.0 | 1,157 | 42 | codeparrot/github-code |
ea017b0ca16abe5e7a981526ad340489e7ac41ba67682fc417fd2f08c43dacdb | import { Element } from "./Element"
import * as request from "request-promise-native"
import { Environment } from "../environment"
export default class ContentService {
static createContent = function (name: string, typeId: string, elements: any[]) {
let data = {}
elements.forEach((tuple) => {
... | TypeScript | src/wch/model/ContentService.ts | aselamal/wch-feed-consumer | apache-2.0 | 1,165 | 41 | codeparrot/github-code |
ba2f98b54204411b2f0592739ba59cc43fad4c91f3f9d46ecccbb219797f52e3 | // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.wm.impl;
import com.intellij.ide.DataManager;
import com.intellij.ide.RecentProjectsManagerBase;
import com.intellij.ide.impl.DataManagerImpl;
import... | Java | platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.java | xfournet/intellij-community | apache-2.0 | 25,838 | 797 | codeparrot/github-code |
657578ecbab807648b7ec4485000eeca25fe95739280677cbb5169adf866ff3f | /*
* Copyright 2015 Daniel Dittmar
*
* 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 writ... | Java | app/src/main/java/dan/dit/whatsthat/riddle/control/RiddleController.java | DanDits/WhatsThat | apache-2.0 | 22,693 | 570 | codeparrot/github-code |
741cf8d087b9a965536daa8fd205a6ce607e01482b29742c51bcdac9962eeb8a | /*
* Copyright 2010-2016 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.amazon.com/apache2.0
*
* or in the "license" fil... | C | aws-cpp-sdk-ssm/include/aws/ssm/model/CommandPluginStatus.h | ambasta/aws-sdk-cpp | apache-2.0 | 1,166 | 45 | codeparrot/github-code |
f75a935a96bc32de24c118684cf0724deced68ec13628745bf96730d74214932 | package com.rahulmadhavan.clippy;
public class Message {
private String value;
public Message(){
}
public Message(String _value){
this.value = _value;
}
public synchronized boolean isValueSame(String data){
boolean result = false;
if( null == data || null == value ){
}else if(data.comp... | Java | android/src/com/rahulmadhavan/clippy/Message.java | rahulmadhavan/clippy | apache-2.0 | 627 | 44 | codeparrot/github-code |
c36f3246b909a22a3ce4c22cac982cbdbf3bef26594378921c10939ec0d9c2e8 | package no.panopticon.api.external;
import no.panopticon.storage.RunningUnit;
import no.panopticon.storage.StatusSnapshot;
import java.time.LocalDateTime;
import java.util.List;
import static java.util.stream.Collectors.toList;
public class UpdatedStatus {
public String environment;
public String system;
... | Java | backend/src/main/java/no/panopticon/api/external/UpdatedStatus.java | Espenhh/panopticon | apache-2.0 | 1,855 | 61 | codeparrot/github-code |
cebf960bf97b49d351fae38cb8c31cc496317dcca37bbc0406118e32b90edfac | /*
* Copyright 2004-2007 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 requi... | Java | java/src/org/jpublish/util/PathUtilities.java | florinpatrascu/jpublish | apache-2.0 | 5,804 | 197 | codeparrot/github-code |
adb3579bf561b829bdd4f4d1c3cbacb3b4cbe47fb2f470714e8ffabd8418c9d5 | package br.com.objectos.testing.ui.login.iter7;
import br.com.objectos.way.ui.AbstractUiAction2;
import br.com.objectos.way.ui.Action;
import br.com.objectos.way.ui.Ui;
@Ui
abstract class LoginAction7 extends AbstractUiAction2<String, String> {
abstract UiHomeActivity7 homeActivity();
abstract UiLoginForm7 form(... | Java | way-compiler/src/test/resources/code/ui/login-iter7/LoginAction7.java | objectos/way | apache-2.0 | 904 | 35 | codeparrot/github-code |
5a86ec53f4c4cb4adf4d534a28a4109e69b96429ee6a6321b0b261ea5714b008 | """Configure number in a device through MQTT topic."""
from __future__ import annotations
import functools
import logging
import voluptuous as vol
from homeassistant.components import number
from homeassistant.components.number import (
DEFAULT_MAX_VALUE,
DEFAULT_MIN_VALUE,
DEFAULT_STEP,
NumberEntity... | Python | homeassistant/components/mqtt/number.py | home-assistant/home-assistant | apache-2.0 | 8,276 | 258 | codeparrot/github-code |
2a0a445b3f6d841cc697bffc80115d84db5ddb0987aa8f2007ef5fd2ce863de2 | package org.cfr.commons.util.collection;
import java.util.Collection;
import java.util.List;
import java.util.Map;
public class CollectionReorderer<T> {
public void moveToStart(final List<T> objects, final T toMove) {
assertContains(objects, toMove);
objects.remove(toMove);
objects.add(0,... | Java | commons-util/src/main/java/org/cfr/commons/util/collection/CollectionReorderer.java | devacfr/commons | apache-2.0 | 4,278 | 113 | codeparrot/github-code |
aee6d8e0ad75839babfd23e6dbe13066a3570f96a12d71e49d0a1f47ffac1a9d | /*
* Copyright 2012-2017 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchdomain/model/QueryParser.java | dagnir/aws-sdk-java | apache-2.0 | 1,678 | 60 | codeparrot/github-code |
76fc3257be87c8a09af5f90f345c17e6d54ce3860869afd64bba2f360f018d58 | /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Softwa... | Java | sbql4j8/src/test/openjdk/tools/javac/doctree/LiteralTest.java | emil-wcislo/sbql4j8 | apache-2.0 | 3,119 | 135 | codeparrot/github-code |
1c4322c89f88e15fbf48b3840158afb7afd6c19b0d2eb094ca97d4cfbce9507c | using SimpleHttpServer.Models;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace SimpleHttpServer
{
public class HttpServer
{
public HttpServer(int port, IEnumerable<Route> routes)
{
this.Port = port;
... | C# | SimpleHttpServer/HttpServer.cs | vallenti/shouter | apache-2.0 | 1,323 | 45 | codeparrot/github-code |
9d74e28e17d7dcaa30d29d7877f9e8219734673f4d48a3cc560e2e4d095adf15 | package tw.me.ychuang.rpc.json;
import java.lang.reflect.Type;
import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import tw.me.ychuang.rpc.Response;
import tw.me.ychuang.rpc.Result;
import com.google.gson.Jso... | Java | src/main/java/tw/me/ychuang/rpc/json/ResponseTypeAdapter.java | allan-huang/remote-procedure-call | apache-2.0 | 4,051 | 127 | codeparrot/github-code |
b7bff402f0cd9d046bf485714c0892cf3092aacc37b78453d5fb299b3ea5232a | /*
* Copyright (c) 2012-2014 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the
* Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at
* http://www... | Scala | 3-enrich/scala-common-enrich/project/BuildSettings.scala | artsy/snowplow | apache-2.0 | 2,512 | 66 | codeparrot/github-code |
fd5698bc44d60a72186067d5275399116f460c1d2ead1eb03d48b94a0abd7e8b | package com.wzhnsc.testviewpageautoscroll;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.os.Handler;
import android.os.Parcelable;
import and... | Java | app/src/main/java/com/wzhnsc/testviewpageautoscroll/ViewPageAutoScroll.java | wzhnsc/TestViewPageAutoScroll | apache-2.0 | 16,413 | 465 | codeparrot/github-code |
7676b6360cb21cba8d367f71a1deb2741d9ec59f2d9e86a20db61ed9c0111f69 | package com.twitter.algebird
import org.scalatest.FunSuite
/**
* This is just a compilation test that we can resolve
* algebird types from implicit algebra instances.
*/
class AlgebraResolutionTest extends FunSuite {
// A type with no built in algebird algebras
trait Empty {}
test("algebra.Semigroup") {
... | Scala | algebird-core/src/test/scala/com/twitter/algebird/AlgebraResolutionTest.scala | nevillelyh/algebird | apache-2.0 | 1,402 | 51 | codeparrot/github-code |
39ed7a289b35ac8b7cb62a5ee2b33c88325130919b0f092c000c6bb34c25b1e1 | /*
* Copyright 2014 Adam Browning
*
* 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 ... | Java | src/test/java/hadoop/writable/OffHeapWritableTest.java | adbrowning/HadoopUtils | apache-2.0 | 6,891 | 206 | codeparrot/github-code |
24278e8482803f1449011d1ed0c3fc7fcca2ddc5668461fb56de145baa14e629 | /* insns.h header file for insns.c
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is
* redistributable under the license given in the file "LICENSE"
* distributed in the NASM archive.
*/
#ifndef NASM_INSNS_H
#define NASM_INSNS_H
#include "nasm... | C | nasm-2.13.02/include/insns.h | ninetian/ffmpeginstaller | apache-2.0 | 2,045 | 71 | codeparrot/github-code |
d75aae7e6c88f0df6483a8e2c5bf711f997f2170799510fb483d4c0df6b18cc9 | /*
* Copyright 2017-2022 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/transform/CreateFleetRequestMarshaller.java | aws/aws-sdk-java | apache-2.0 | 2,275 | 61 | codeparrot/github-code |
2f727934c4a28a4dc21f9e732764b95521a4d147aea7258a651915f8c2e6a9c8 | /*
* Copyright 2017-2022 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-transcribe/src/main/java/com/amazonaws/services/transcribe/model/transform/UpdateMedicalVocabularyRequestMarshaller.java | aws/aws-sdk-java | apache-2.0 | 2,807 | 62 | codeparrot/github-code |
a372fb71194f0be2599d683c39cfdc9181131060d2cac67d2a63818c19c66930 | /*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/param.h>
#include "esp_mbedtls_dynamic_impl.h"
int __real_mbedtls_ssl_handshake_server_step(mbedtls_ssl_context *ssl);
int __wrap_mbedtls_ssl_handshake_server_step(mbedtls_ssl_contex... | C | components/mbedtls/port/dynamic/esp_ssl_srv.c | espressif/esp-idf | apache-2.0 | 5,329 | 177 | codeparrot/github-code |
088c3cd6b560f619dcb05cb632bfb903d87519f0f9b79d306b8b6cd51d353525 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 OpenStack 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
#
# htt... | Python | nova/network/vmwareapi_net.py | termie/nova-migration-demo | apache-2.0 | 3,772 | 85 | codeparrot/github-code |
0de278722d72beb0c6f1f8ff9ba5383853c2f9c2b9964f50fc7de915ead5ae55 | # Copyright (c) 2016 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | Python | cinder/volume/drivers/huawei/huawei_driver.py | bswartz/cinder | apache-2.0 | 97,319 | 2,312 | codeparrot/github-code |
6d9e70bd9c77776ea6f55966abd267c2212a47ae969b5d9436d74a48ddb97459 | package service
import (
"context"
"go-common/library/ecode"
"go-common/library/xstr"
"net/url"
"strconv"
"go-common/app/admin/main/videoup-task/model"
"go-common/library/database/elastic"
"go-common/library/log"
)
const (
_searchBusinessQAVideo = "task_qa"
_searchBusinessQAVideoRandom = "task_qa_ran... | GO | 126-go-common-master/app/admin/main/videoup-task/service/search.go | LQJJ/demo | apache-2.0 | 3,488 | 119 | codeparrot/github-code |
11786e2ec8feaa14972e9888db832f258974fb55785464c6fe3ed4f50e653725 | /**
* 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... | Java | test/unit/org/apache/cassandra/cli/CliTest.java | muntasirraihan/apache-cassandra-1.2.4-src | apache-2.0 | 15,616 | 325 | codeparrot/github-code |
89f3224b14618214ebe68b19f11192d35257d7ee295a34a2fad333eebae460d9 | /**
* Copyright 2017 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | JavaScript | build-system/app.js | lzanol/amphtml | apache-2.0 | 31,995 | 972 | codeparrot/github-code |
ecb117fe2b8fe1116e283196cb2bc48cd083dcacd758600396b95091fd93fbe3 | /**
* Created by jan on 20/10/14.
*/
function AccountManager() {
}
AccountManager.prototype.generateAmount = function () {
var s1 = Math.floor(Math.random() * 7) % 10;
var s2 = Math.floor(Math.random() * 7) % 10;
var s3 = Math.floor(Math.random() * 7) % 10;
var sum = s1 * 1000 + s2 * 100 + s3 * 10;... | JavaScript | js/AccountManager.js | janpalencar/g-transaction | apache-2.0 | 1,157 | 46 | codeparrot/github-code |
48adc93b7944ee23170e890f7a1d1bd548258b8495804e78128e4f97f0f96e59 | package com.wifi.utils;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import co... | Java | wiFiWeather/src/main/java/com/wifi/utils/BaiduLocation.java | VickerChen/mao-company-wifi-code | apache-2.0 | 22,543 | 500 | codeparrot/github-code |
1608232559bd202fec9a1df7a27aac215390c7b8204a66e091d1d57a1ddf8d1d | package de.undercouch.citeproc.tool.shell;
import de.undercouch.citeproc.BibliographyFileReader;
import de.undercouch.citeproc.BibliographyFileReader.FileFormat;
import de.undercouch.citeproc.tool.AbstractCSLToolCommand;
import de.undercouch.citeproc.tool.CSLToolContext;
import de.undercouch.underline.InputReader;
imp... | Java | citeproc-java-tool/src/main/java/de/undercouch/citeproc/tool/shell/ShellLoadCommand.java | michel-kraemer/citeproc-java | apache-2.0 | 2,799 | 102 | codeparrot/github-code |
c14e38792056c82bc68d1697781520cff3d5d72a177318b621ef896907f39256 | package net.jueb.util4j.buffer.tool.demo;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import net.jueb.util4j.buffer.tool.ClassFileUitl;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.netty.util.CharsetUtil;... | Java | util4j/src/main/java/net/jueb/util4j/buffer/tool/demo/BufferBuilderDemo.java | juebanlin/util4j | apache-2.0 | 3,957 | 103 | codeparrot/github-code |
4df3c5e0c899ae3e84785b189f24b618c1128ec1bf0dfac18f4a97a4d836dc56 | package axmlprinter;
import java.io.File;
/**
* Constant definition class.<br>
* <br>
* Most constants have a prefix defining the content.
* <ul>
* <li><code>OS_</code> OS path constant. These paths are different depending on
* the platform.</li>
* <li><code>FN_</code> File name constant.</li>
* <li><code>FD_<... | Java | src/axmlprinter/SdkConstants.java | titze/axmlparser | apache-2.0 | 19,114 | 434 | codeparrot/github-code |
669bd0d4554eee3093d3d266f6ee0bfb56b18bd9c115c509c06c12b1a8a3778f | /**
* 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... | Java | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/component/instance/ComponentInstance.java | GeLiXin/hadoop | apache-2.0 | 28,150 | 727 | codeparrot/github-code |
b0a3bc8a610b4cbe362303d25d57a3cf862b83173a98cb57ce6f9b2ce57f51c3 | /* Pawn compiler
*
* Machine and state maintenance.
*
* Three lists are maintained here:
* - A list of automatons (state machines): these hold a name, a unique id
* (in the "index" field) and the memory address of a cell that holds the
* current state of the automaton (in the "value" field).
* - A li... | C | SOURCE/COMPILER/scstate.c | Fabsch/pawnccsamp | apache-2.0 | 10,428 | 376 | codeparrot/github-code |
1b9c48b5bd1963141cd7234fa976e14ab69182dda0ef83773d69c43a5049459e | //---------------------------------------------------------- -*- Mode: C++ -*-
// $Id$
//
// Created 2006/03/16
// Author: Sriram Rao
//
// Copyright 2008-2012,2016 Quantcast Corporation. All rights reserved.
// Copyright 2006-2008 Kosmix Corp.
//
// This file is part of Kosmos File System (KFS).
//
// Licensed under t... | C | src/cc/chunk/ChunkServer.h | quantcast/qfs | apache-2.0 | 3,637 | 129 | codeparrot/github-code |
e40acaa42491c5e40bd0172dbee555a4ef8c7a548252136364169a38feb3ca3e | package nl.jqno.equalsverifier.integration.operational;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
import java.util.List;
import nl.jqno.equalsverifier.ConfiguredEqualsVerifier;
import nl.jqno.equalsverifier.EqualsVer... | Java | equalsverifier-test-core/src/test/java/nl/jqno/equalsverifier/integration/operational/ConfiguredEqualsVerifierMultipleTest.java | jqno/equalsverifier | apache-2.0 | 7,256 | 189 | codeparrot/github-code |
02ae037ba12620160f82f8d1d358aa80863a2481eafc8b3a89e391159be85178 | package code.docflow.controlflow;
//
// Author: Alexey Zorkaltsev (alexey@zorkaltsev.com)
//
import code.docflow.action.Transaction;
import code.docflow.docs.Document;
import code.docflow.users.CurrentUser;
import play.Logger;
import play.db.jpa.JPAPlugin;
import play.db.jpa.NoTransaction;
import play.exceptions.JPAE... | Java | app/code/docflow/controlflow/DocflowJob.java | delightsoft/DSCommon | apache-2.0 | 3,604 | 112 | codeparrot/github-code |
9e494a4e094176fdcede0efa2a7203de014a2e096cd426ae1d0572d06efa6343 | /*
* 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 ... | Java | azurecompute/src/main/java/org/jclouds/azurecompute/features/SubscriptionApi.java | hardfish/justTest | apache-2.0 | 1,968 | 55 | codeparrot/github-code |
8ebb905a4ac7c80375418d96dfca2f1585748da0d9311c4a9b207a87307b156e | /****************************************************************************\
* *
* IFC (Iris Foundation Classes) Project *
* http://github.com/haoxingeng/ifc *
* ... | C | Include/ifc_exceptions.h | haoxingeng/ifc | apache-2.0 | 11,437 | 356 | codeparrot/github-code |
19a4ab1ed9e9a4e456ad54040ae8115182a0bf892ecc1dc44561c7af169a36c0 | /*
* Copyright 2017-2022 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/transform/PipelinePauseStateSettingsMarshaller.java | aws/aws-sdk-java | apache-2.0 | 2,063 | 56 | codeparrot/github-code |
f1ecc26b0cde515f7e4491b51e9d809edf060a09253174dd1791c2173263d393 | /*
* Copyright 2009-2014 DigitalGlobe, 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 ag... | Java | mrgeo-core/src/main/java/org/mrgeo/data/image/MrsImageOutputFormatProvider.java | tjkrell/MrGEO | apache-2.0 | 1,397 | 46 | codeparrot/github-code |
b60336d173a80238bb832389a097df3d9a3c28c37d2945e028f79f40ab0e6ea8 | /**
* JBoss, Home of Professional Open Source.
* Copyright 2014-2020 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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... | Java | rest/src/main/java/org/jboss/pnc/rest/endpoints/ProjectEndpointImpl.java | thescouser89/pnc | apache-2.0 | 3,238 | 97 | codeparrot/github-code |
29980bb4182313e551b05df32eb98fae7508d41f5e770545141ee9a56c46baeb | package com.comcast.cdn.traffic_control.traffic_router.core.request;
import com.comcast.cdn.traffic_control.traffic_router.core.ds.DeliveryServiceMatcher.Type;
import com.comcast.cdn.traffic_control.traffic_router.core.util.ComparableStringByLength;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
pub... | Java | traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/request/RequestMatcher.java | PSUdaemon/traffic_control | apache-2.0 | 3,765 | 120 | codeparrot/github-code |
a6857e4655c1680d33f7ae4c5bdefeee20f23733b5db9b658f5dd2ff2c8dcfd0 | /**
* Copyright © 2013-2018 shadowhunt (dev@shadowhunt.de)
*
* 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 a... | Java | src/test/java/de/shadowhunt/subversion/internal/httpv1/v1_2/RepositoryLogReadOnlyIT.java | thrawn-sh/subversion | apache-2.0 | 1,130 | 35 | codeparrot/github-code |
06a40661ee322fcb3bcca8f68528666e5319f7771d3e37f8243c4eae1682c470 | /*
* Copyright 2009 Andy Lee.
*
* 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 ... | Java | src/test/java/uk/co/optimisticpanda/gtest/dto/ExampleTest2.java | plasma147/lorraine-dto-test-gen | apache-2.0 | 3,292 | 87 | codeparrot/github-code |
bc98077332641f5a3b86dd0ffb62f6a65d46b6e1dbbefc5a3057873c3607b9ed | # -*- coding: utf-8 -*-
# vim:fenc=utf-8
'''
Insights Forex live source
--------------------------
:copyright (c) 2014 Xavier Bruhiere
:license: Apache 2.0, see LICENSE for more details.
'''
import time
import pandas as pd
import dna.logging
import intuition.data.forex as forex
log = dna.logging.logger(__n... | Python | insights/sources/live/currencies.py | intuition-io/insights | apache-2.0 | 1,793 | 61 | codeparrot/github-code |
e308c6b727b624d7246511748e0b1072bbea132db4437a0fb8d2abaf231a33ff | // Copyright 2017 Jan Christian Grünhage
//
// 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 ag... | GO | filter.go | matrix-org/gomatrixserverlib | apache-2.0 | 5,518 | 151 | codeparrot/github-code |
33003e528ace0a966060e6e6b7a8952f2288c0c62eff413f44076fd4b2aa4549 | /*
* 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 ... | Scala | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/TableSinkITCase.scala | darionyaphet/flink | apache-2.0 | 20,001 | 624 | codeparrot/github-code |
ccb52d83561c5d856fa751b1f8d0e581f0c963ad22797856083f263488e79453 | /*
* Copyright (c) 2017-2018 mikan
*/
package com.github.javatrainingcourse.obogmanager.ui.view;
import com.github.javatrainingcourse.obogmanager.Version;
import com.github.javatrainingcourse.obogmanager.domain.model.Convocation;
import com.github.javatrainingcourse.obogmanager.domain.model.Membership;
imp... | Java | src/main/java/com/github/javatrainingcourse/obogmanager/ui/view/LoginView.java | JavaTrainingCourse/obog-manager | apache-2.0 | 5,559 | 136 | codeparrot/github-code |
4aace2934713c4fb558dcdcfd7ee608e76f134505d762487ed0deb6110f2b5db | 'use strict';
/**
* Expose 'NetworkTask'
*/
module.exports = NetworkTask;
/**
* Module dependencies
*/
var networkObject = require('./network-object');
var readLine = require('readline');
var childProcess = require('child_process');
/**
* Constants
*/
var NETWORK_TOPIC = 'monitor/network';
/**
* Constructo... | JavaScript | DragonBoard/src/lib/network/network-task.js | ArrowElectronics/aws-iot-dragonpulse-js | apache-2.0 | 7,159 | 282 | codeparrot/github-code |
eeabc465d138102e601bf2794b1c7765b68d1d80e7687e9f446d5cbf45eafd3f | 'use strict';
/**
* @ngdoc object
* @name activityApp
* @requires $routeProvider
* @requires activityControllers
* @requires ui.bootstrap
*
* @description
* Root app, which routes and specifies the partial html and controller depending on the url requested.
*
*/
var app = angular.module('activityApp',
['... | JavaScript | src/main/webapp/js/app.js | du6/yourlittleone | apache-2.0 | 3,544 | 134 | codeparrot/github-code |
06bdf0ecc0a9afa25356cb96bbb030a51b065d506f51097c9815ac177f3abdff | /* hci_userchan.c - HCI user channel Bluetooth handling */
/*
* Copyright (c) 2015-2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <sys/atomic.h>
#include <sys/byteorder.h>
#include <drivers/bluetooth/hci_driver.h>
#include <bluetooth/buf.h>
#include <bluetooth/hci_r... | C | subsys/bluetooth/host/hci_raw.c | finikorg/zephyr | apache-2.0 | 7,565 | 381 | codeparrot/github-code |
2a1d9bac7184394b586484c2b30d0e8b03e2b59d03bc54f3e5517c1cf0289c0f | package com.drew.metadata.mov.media;
import com.drew.lang.annotations.NotNull;
import com.drew.metadata.mov.QtDirectory;
import java.util.HashMap;
public class QtSoundDirectory extends QtDirectory
{
// Sound Sample Description Atom
public static final int TAG_AUDIO_FORMAT = 0x0301;... | Java | Source/com/drew/metadata/mov/media/QtSoundDirectory.java | Widen/metadata-extractor | apache-2.0 | 1,465 | 50 | codeparrot/github-code |
299c5b0b6dbdc66bcc697db371a77cadafcb98aa5f93d0e599b3a10b48f395fc | # snapshot-check.rb
# Version: 1.0.0
# Author: Jason Boeshart
# Date: 10/22/2015
# Notes: Initial script creation. This script will go through and get the servers that have drives with no snapshots
# and the volumes that haven't been snapshotted within the specified number of days. It outputs to the... | Ruby | ruby/snapshot-check.rb | jboeshart/code | apache-2.0 | 3,968 | 119 | codeparrot/github-code |
467907d614a7aec1f1aea2df646508b78f5a154d5b0d33965130c32ef5224fc6 | /*
* File: fat32-util.c
* Author: Ducky
*
* Created on July 28, 2011, 12:35 PM
*
* Revision History
* Date Author Change
* 28 Jul 2011 Ducky Initial implementation.
*
* @file
* Helper funcitons for the FAT32 library. These are all simple calculation
* functions and do not involve reading from the card.
... | C | Datalogger/FAT32/fat32-util.c | CalSol/Impulse | apache-2.0 | 2,634 | 111 | codeparrot/github-code |
2adde592378a8cc70451ca55adc02b83eaa384e75b61921c8703bea9b85fd308 | /*
* Copyright 2012-2017 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-directory/src/main/java/com/amazonaws/services/directory/model/transform/CreateTrustRequestProtocolMarshaller.java | dagnir/aws-sdk-java | apache-2.0 | 2,619 | 63 | codeparrot/github-code |
31ab67e3f036c3762b6b242382172dc3bf798901f1210e3ec3d2b184269f0805 | /*
* Copyright 2012-2017 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-inspector/src/main/java/com/amazonaws/services/inspector/model/transform/DescribeRulesPackagesResultJsonUnmarshaller.java | dagnir/aws-sdk-java | apache-2.0 | 3,368 | 81 | codeparrot/github-code |
c677cc96bb95b133131152369f6c363b312e02d0c278b4ccc5de0ef9461f23bc | // For conditions of distribution and use, see copyright notice in license.txt
#include "StableHeaders.h"
#include "DebugOperatorNew.h"
#include <QUrl>
#include <phonon/VideoPlayer>
#include <phonon/MediaObject>
#include <phonon/VideoWidget>
#include "PhononPlayerModule.h"
#include "VideoPlayer.h"
#include "MemoryLe... | C++ | src/Application/PhononPlayerModule/VideoPlayer.cpp | antont/tundra | apache-2.0 | 2,624 | 79 | codeparrot/github-code |
726ca549a9fa01b2903b93f6c4f3b18b19eae71529c937523f47e9c2274d0eb3 | /*
* Copyright 2017-2022 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/RegisterElasticIpResult.java | aws/aws-sdk-java | apache-2.0 | 3,751 | 130 | codeparrot/github-code |
b9f258d361b462e3379f9de85e17407da26c82bab64816d5ee459cb9cfb3d477 | package com.socks.jandan.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
/**
* Created by zhaokaiqiang on 15/4/22.
*/
public class NetWorkUtil {
/**
* 判断当前网络是否已连接
*
* @param context
* @return
*/
public static boolean isNetWorkConnected(Cont... | Java | app/src/main/java/com/socks/jandan/utils/NetWorkUtil.java | 404neko/jandan_plus | apache-2.0 | 992 | 43 | codeparrot/github-code |
55e9070040c4e087074a85f778702d0b73253e6d0264629867e908b62dd26c2d | /*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 ... | C# | Common/Data/Consolidators/TradeBarConsolidator.cs | Jay-Jay-D/LeanSTP | apache-2.0 | 4,781 | 112 | codeparrot/github-code |
3914bb39e9180b5e2dd1f06a79efd596ad1c3ceefeed0dce21b6cb0107011dd5 | package com.vigorous.asynchronized.network.request;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import java.io.IOException;
import okhttp3.ResponseBody;
import retrofit2.Converter;
/**
* Created by Vigorous.Liang on 2017/9/22.
*/
public class DecryptResponsebodyConverter<T>
implements ... | Java | networklib/src/main/java/com/vigorous/asynchronized/network/request/DecryptResponsebodyConverter.java | VigorousLiang/RxjavaRetrofitNetwork | apache-2.0 | 912 | 42 | codeparrot/github-code |
75b3ecea660586b9369f2fb44f072ea3f4c0162eae1439e1d66b46c4b41eeb59 | from models.RepPoints.builder import RepPoints as Detector
from models.dcn.builder import DCNResNetFPN as Backbone
from models.RepPoints.builder import RepPointsNeck as Neck
from models.RepPoints.builder import RepPointsHead as Head
from mxnext.complicate import normalizer_factory
def get_config(is_train):
class ... | Python | config/RepPoints/reppoints_moment_dcn_r101v1b_fpn_multiscale_2x.py | TuSimple/simpledet | apache-2.0 | 7,766 | 269 | codeparrot/github-code |
e85554a3dcab0ff969c8b77f42087b1dada3031703003d0542d962421ea2dbc4 | /**
* Copyright (C) 2014 TopCoder Inc., All Rights Reserved.
* @version 1.1
* @author Sky_, TCSASSEMBLER
* changes in 1.1:
* 1. change handleError. Return sql error with unique constrains as Bad Request.
* 2. close db when request ends.
* 3. don't create transactions for GET requests
*/
"use strict";
var _ = r... | JavaScript | helpers/logging.js | elkhawajah/NTL-Solution-Mechanism-Guide | apache-2.0 | 6,051 | 160 | codeparrot/github-code |
b7f9b0d42d21980aa51f85279604456dc22db534bb1f7ecbf10537cbd1819bdd | /*
* Copyright 2017-2022 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.amazon.com/apache2.0
*
* or in the "licen... | Java | aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/waf/transform/SizeConstraintSetSummaryMarshaller.java | aws/aws-sdk-java | apache-2.0 | 2,370 | 59 | codeparrot/github-code |
e06791f4a6aadf374ae139a9bcc299fb65a51d6660eca40e54c61f48924ba629 | /*
* Copyright 2010-2017 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.amazon.com/apache2.0
*
* or in the "license" fil... | C++ | aws-cpp-sdk-comprehendmedical/source/model/InferICD10CMRequest.cpp | cedral/aws-sdk-cpp | apache-2.0 | 1,355 | 54 | codeparrot/github-code |
3f566cda0666d8e2eb398594a305b27bf15291605f5ab2bceefcc668b55bd98c | local utils = require "kong.tools.utils"
local Object = require "classic"
local Migrations = Object:extend()
-- Instanciate a migrations runner.
-- @param `core_migrations` (Optional) If specified, will use those migrations for core instead of the real ones (for testing).
-- @param `plugins_namespace` (Optional) If s... | Lua | kong/tools/migrations.lua | vzaramel/kong | apache-2.0 | 5,122 | 167 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.