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 |
|---|---|---|---|---|---|---|---|---|
1740bf9e01235c2ee99736989a6869dcf9631ef2be5694a2de48169e11ab9319 | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Example
*
* This is an example of a few basic user interaction methods you could use
* all done with a hardcoded array.
*
* @package CodeIgniter
* @subpackage Rest Server
* @category Controller
* @author Phil Sturgeon
* @link http... | PHP | expendthrift-api/php/application/controllers/api/example.php | gavinengel/gavinengel.github.io | mit | 4,640 | 138 | codeparrot/github-code |
6bb9d6a6c7057b1d686c1e0dc5ff33aa2a7f595b2b6f016d0348d03bb329c68f | // Package vertica defines and registers usql's Vertica driver.
//
// See: https://github.com/vertica/vertica-sql-go
package vertica
import (
"context"
"os"
"regexp"
"strings"
_ "github.com/vertica/vertica-sql-go" // DRIVER
"github.com/vertica/vertica-sql-go/logger"
"github.com/xo/usql/drivers"
)
func init() ... | GO | drivers/vertica/vertica.go | knq/usql | mit | 1,382 | 49 | codeparrot/github-code |
116dad0513bd5459333007791c6d9edd64492d3f013008f1c675b4d74de8f41c | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.IO;
namespace MadcowModel.Database
{
public class DatabaseProvider
{
private Database database;
public DatabaseProvider(string filepath)
... | C# | Model/MadcowModel/Database/DatabaseProvider.cs | gietal/madcow | mit | 914 | 41 | codeparrot/github-code |
ad674be777b781b4bd2f20d0dd6d901ad3e194d93c2de0141cdb9a3e4634f828 | var mongoose = require('mongoose');
var Map = mongoose.model('Map');
var messages = require('../../lib/messages');
/**
* Load
*/
exports.load = function (req, res, next, id) {
Map.load(id, function (err, map) {
if (err) return next(err);
if (!map) {
return res.json(
400,
messages.err... | JavaScript | app/controllers/maps.js | codigourbano/yby | mit | 2,379 | 114 | codeparrot/github-code |
a829dcfa6e584f8193c201bf3921ef0df43c6a007c4a1e966c8bbb06aed8fc9b | package edu.wheaton.simulator.gui;
import java.util.Set;
import javax.swing.JOptionPane;
import edu.wheaton.simulator.datastructure.AbstractGUIGridObserver;
import edu.wheaton.simulator.datastructure.AgentAppearance;
import edu.wheaton.simulator.simulation.end.SimulationEnder;
public class GridPanelObserv... | Java | src/edu/wheaton/simulator/gui/GridPanelObserver.java | tsmacdonald/simulator | mit | 811 | 33 | codeparrot/github-code |
00372839f5081f65bc71ef7c0d4c742fc286ccba1f9217bc25fcedec3545b020 | (function () {
// The util functions
YAHOO.namespace('tagz.Utils');
var lang = YAHOO.lang;
if(Array.prototype.forEach) {
YAHOO.tagz.Utils.foreach = function(func,list,self) {
return list.forEach(func,self);
};
} else {
YAHOO.tagz.Utils.foreach = function(func,lis... | JavaScript | utils.js | jeethu/dombuilder | mit | 4,276 | 150 | codeparrot/github-code |
f0da5ecc61c60dfd6220526902ccfa02390372e51bdb89eb63791b4916b109ae | package edu.usc.ict.superglu.vhuman;
import edu.usc.ict.superglu.core.*;
import edu.usc.ict.superglu.core.config.GatewayBlackWhiteListConfiguration;
import edu.usc.ict.superglu.core.config.ServiceConfiguration;
import java.io.IOException;
import java.math.BigDecimal;
/**
* This class is the internal service that wi... | Java | java_maven/src/main/java/edu/usc/ict/superglu/vhuman/GIFTVHumanBridge.java | GeneralizedLearningUtilities/SuperGLU | mit | 3,561 | 104 | codeparrot/github-code |
b19745d8b9812a5b5f4ecb67e16966cc46e87132b2302288114db428a83d194f | #ifndef INCLUDED_openfl_display_Tilesheet
#define INCLUDED_openfl_display_Tilesheet
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
HX_DECLARE_CLASS2(flash,display,BitmapData)
HX_DECLARE_CLASS2(flash,display,Graphics)
HX_DECLARE_CLASS2(flash,display,IBitmapDrawable)
HX_DECLARE_CLASS2(flash,geom,Point)
HX_DECLARE_CLASS2(fla... | C | bin/windows/cpp/obj/include/openfl/display/Tilesheet.h | Akryum/mahjong | mit | 1,722 | 56 | codeparrot/github-code |
852706cabc199912b30c2b222082365c8aa0145da837e5b26a3ebf14f1270e04 | using System;
using System.Linq;
using Hackathon.Sitecore.Triumvirate.Foundation.Mail.Models;
using Sitecore.Data.Fields;
using Sitecore.Data.IDTables;
using Sitecore.Data.Items;
using Sitecore.Data.Managers;
using Sitecore.XA.Foundation.IoC;
using Sitecore.XA.Foundation.Mvc.Repositories.Base;
using Sitecore.XA.Founda... | C# | src/Foundation/Hackathon.Sitecore.Triumvirate.Mail/code/Repositories/Imp/MailConfigurationRepository.cs | SaschaHeyer/Sitecore-Hackathon-2017 | mit | 3,164 | 87 | codeparrot/github-code |
a89e7ccdfb5e3abf3bcc0c46d186cdcc076426eec911b598f20431d149c852eb | #!/usr/bin/env python3
# Copyright (c) 2016 Zurcoin Core Developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# This script will locally construct a merge commit for a pull request on a
# github repository, inspect it, sign ... | Python | contrib/devtools/github-merge.py | zurcoin/zurcoin | mit | 10,860 | 252 | codeparrot/github-code |
f280b999fc563582b1caf69b0fe2a75700985cb9de5e981dce45205117dcef18 | using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
namespace PlayerPrefsEditor
{
class PlayerPrefDataForEdit
{
public bool enabled = true;
public string key = ""; // PlayerPrefのkey
public PlayerPrefsType type = PlayerPrefsType.String; // PlayerPrefのDataの... | C# | Assets/PlayerPrefsEditor/Editor/EditPlayerPrefsWindow.cs | namakemono/unity-player-pref-editor-plugin | mit | 5,130 | 128 | codeparrot/github-code |
730673bc42bd01402276f294326070d7bac3fc8b321187f3fb1a308d88e0b0ec | package com.xson.util;
import com.xson.JsonAware;
import com.xson.feature.SerializeFeature;
import java.io.*;
public final class Null implements Serializable,JsonAware {
private static final long serialVersionUID = -5850043100711134472L;
public static final Null instance = new Null();
private Null(){... | Java | src/main/java/com/xson/util/Null.java | xcr1234/json | mit | 682 | 38 | codeparrot/github-code |
0badc56b99cd088ec9a64e784cc672a90f52f3f86506d0fc652078469b610563 | package com.example.accessibility.automatic.uninstall;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.Intent;
import android.net.Uri;
import android.support.annotation.Nullable;
import android.view.accessibility.AccessibilityEvent;
import com.demon.lib.base.BaseEventHandler;
impo... | Java | app/src/main/java/com/example/accessibility/automatic/uninstall/AutoUninstallHandler.java | dandaner/AccessibilityLib | mit | 1,485 | 50 | codeparrot/github-code |
b9611cdb4112df080ac4ee52e77d3d7fb143ba32cbe303385702a0c11ae23cb7 | /*
* Copyright © 2015 Packt Publishing - All Rights Reserved.
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
package com.packtpub.rest.ch5.hateoas.jersey;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import javax.ws.rs.core.Link;
import javax.xml.bind.... | Java | rest-chapter5-jersey/rest-chapter5-hateoas/src/main/java/com/packtpub/rest/ch5/hateoas/jersey/LinkAdaptor.java | jobinesh/restful-java-web-services-edition2 | mit | 2,134 | 85 | codeparrot/github-code |
3d636e31d8f88bc7645416995ef1b50d22cb012bb41ffd772f196256e249d972 | #!/usr/bin/python
import fetch
import sys
from pymongo import MongoClient
db = MongoClient().ppa.ticket
for loc in db.distinct('location'):
print loc
sys.exit(1)
''' Getting the count for each date
for date in sorted(db.distinct('issueDate')):
print "%s: %s" % (date, db.find({'issueDate':date}).count())
''... | Python | stats.py | di/ppa | mit | 2,062 | 61 | codeparrot/github-code |
b662b2c60f064a55417a12471f57a280347b19ca7dcd4e8cffdcb1eeb020b0d4 | /*
* FreeRTOS Kernel V10.0.0
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, ... | C | embedded/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h | robotics-at-maryland/qubo | mit | 9,001 | 251 | codeparrot/github-code |
8a82e65e99d4d5ff6233d0838be4a7aee21a1d2b4c0d805f74bec90d0c47d48d | <!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>Slicebox - 3D图片滑块效果</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Slicebox - 3D Image S... | HTML | slice-box/index.html | yaozeye/yaozeye.github.io | mit | 5,330 | 194 | codeparrot/github-code |
96368abb1d022340d1432b3228192dc6311b21855b69153229c0e470ffa8197f | package som.interpreter.nodes.nary;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.Tag;
import com.oracle.truffle.api.nodes.Node;
import som.interpreter.TruffleCompiler;
import som.interpreter.nodes.... | Java | src/som/interpreter/nodes/nary/EagerBinaryPrimitiveNode.java | smarr/SOMns | mit | 3,947 | 133 | codeparrot/github-code |
0a2ce167771e4899a05c7e9ef16dd7c8a6e041b6c25b130cb88b50a251050d8b | /*
Exact Change
Design a cash register drawer function checkCashRegister() that accepts purchase price as the first argument (price), payment as the second argument (cash), and cash-in-drawer (cid) as the third argument.
cid is a 2D array listing available currency.
Return the string "Insufficient Funds" if cash-in-... | JavaScript | advance_algorythm_scripting/Exact_Change_checkCashRegister.js | aspiringguru/FreeCodeCamp | mit | 10,624 | 194 | codeparrot/github-code |
1d11844362499787a12e1e63cba944cfac0144140dfaff403bb2733578140539 | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.12.2017 16:03
:Licence MIT
Part of grammpy
"""
from typing import TYPE_CHECKING
from .SplittedRules import splitted_rules
if TYPE_CHECKING: # pragma no cover
from .. import Nonterminal
class InverseCommon:
"""
Class that aggregates function... | Python | grammpy/transforms/InverseCommon.py | PatrikValkovic/grammpy | mit | 807 | 33 | codeparrot/github-code |
2f8cba735fb1228b22c04a47e9cb306e0b2a52ef9ed36985c0f06a474f2e5c0f | /**
* @author Julien Midedji <admin@resamvi.de>
* @copyright 2017 Julien Midedji
* @license {@link https://github.com/ResamVi/spayle/blob/master/LICENSE MIT License}
*/
import Const from './Constants';
import Player from './Player';
/**
* The menu is displayed after loading and before playing.
* T... | TypeScript | src/MenuState.ts | ResamVi/spayle | mit | 5,057 | 148 | codeparrot/github-code |
5b40fece25d7f28f18e54544280977d9ccac687c7ac8ee8769b5221b919ded77 | # coding=utf-8
__author__ = 'javon'
import sys
rdfTemplate = """<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns="http://vocab.cdmk-caribbean.net/cdmk#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns... | Python | converter.py | JA-VON/python-helpers-msbm | mit | 10,280 | 243 | codeparrot/github-code |
f0af0c7d4b6ce047e3d37fcb549ab715de2256992012aadf3cad0fef25097189 | /*
* Write a program that finds the biggest of three numbers.
*/
package thebiggestofthreenumbers;
import java.text.MessageFormat;
import java.util.Scanner;
public class TheBiggestOfThreeNumbers {
public static void main(String[] args) {
double numberOne;
double numberTwo;
double number... | Java | Telerik - School Academy Java/Java Fundamentals - 1/Homework/Conditional Statements/TheBiggestOfThreeNumbers/src/thebiggestofthreenumbers/TheBiggestOfThreeNumbers.java | diyanbogdanov/Java | mit | 1,064 | 42 | codeparrot/github-code |
995685340518d55efc94bdc9b7544e2a33f65d0d484d1ea09ba5076515fba901 | #!/usr/bin/env python3
import os, sys, argparse, stat, time, copy
# From StackOverflow :: http://stackoverflow.com/a/1094933
def sizeof_fmt(num, suffix='B'):
for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, suffix)
num /= 1024.0
return "%.1f%... | Python | ls.py | stwb/pywinux | mit | 2,725 | 88 | codeparrot/github-code |
f19a350b37bbea923f580cea9458e3fc8ddccc801ecd72637a8cd1e563560e61 | using System;
using System.Collections.Generic;
using Skahal.Infrastructure.Framework.Commons;
namespace Skahal.Infrastructure.Framework.Logging
{
/// <summary>
/// A filtrable log strategy used for filter an underlying log strategy.
/// </summary>
internal class FiltrableLogStrategy : LogStrategyBase
{
#region... | C# | src/Skahal.Infrastructure.Framework/Logging/FiltrableLogStrategy.cs | skahal/Skahal.Infrastructure.Framework | mit | 2,789 | 101 | codeparrot/github-code |
5f97e14cc742e8ae623d8f4e771280f5aad1815d46307704771f2645b983b2a0 | <?php
/* TwigBundle:Exception:error.xml.twig */
class __TwigTemplate_674b99b1a57e72a1e70f446b1e54aac5ba1ef426a552ff7ea12d6c5b45cbfbba extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
... | PHP | var/cache/dev/twig/2b/2bf571be71eaad8ee265decb6a9801a1980d1b3dfbe27f1712c48be39c29f7db.php | UchiKir/SymfonyPadelApp | mit | 2,034 | 57 | codeparrot/github-code |
5e5ffa7c5e202c92341ede730b338ea22b6d55930e8c9a3b3938fd52de53133f | /**
* Created by double on 02/09/15.
*/
var DSINK_API_BASE_URI = 'http://127.0.0.1:20001/api/v0.1';
var DSINK_REGISTER_URI = DSINK_API_BASE_URI + '/user';
var DSINK_LOGIN_URI = DSINK_API_BASE_URI + '/auth';
var DSINK_RESOURCE_URI = DSINK_API_BASE_URI + '/resource';
//
//var CONFIG_URI = 'http://127.0.0.1:8080/con... | JavaScript | DataSink-UI/js/demo/config.js | dhrproject/mydatasink | mit | 37,600 | 1,193 | codeparrot/github-code |
db2b37f7500d96cacca4eeb8b2c6da9b4e9fe708925dfc8a5ca7b205ff896c1f | import {Component, OnInit} from '@angular/core';
import {Subscription} from 'rxjs';
import {AppConfigService} from '../../../service/appconfigservice';
import {AppConfig} from '../../../domain/appconfig';
@Component({
templateUrl: './doughnutchartdemo.html'
})
export class DoughnutChartDemo {
data: any;
... | TypeScript | src/app/showcase/components/chart/doughnutchart/doughnutchartdemo.ts | WebRota/primeng | mit | 1,764 | 72 | codeparrot/github-code |
3b6ea1ce8691ecadf5ecd49feb1f789dbbc9ffb00c37a4136c6b68ddc84c9525 | /*******************************************************
*
* This file may be used under under the license as
* stated below. For more information about License
* types see the included LICENSE file. If you did
* not recive a copy of that file contact the author.
*
* @author John Talton
* @date M... | C++ | editor/ToolTip.cpp | HaikuArchives/HyperStudio | mit | 4,962 | 201 | codeparrot/github-code |
2e91f2d98eea13e31c043254b422fe5f927c4fc9b1d03ecf855a1a7eae264d08 | <?php
/**
* Optional include file for SimpleTest
* @package SimpleTest
* @subpackage UnitTester
* @version $Id: default_reporter.php 2011 2011-04-29 08:22:48Z pp11 $
*/
/**#@+
* include other SimpleTest class files
*/
require_once(dirname(__FILE__) . '/simpletest.php');
require_once(dirna... | PHP | vendors/simpletest/default_reporter.php | ragmar/bvmjm | mit | 5,119 | 163 | codeparrot/github-code |
07aa4c252b26237a39e533f9a7a5ee9e57be80847e004e27f2827e939a1090a3 | using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
namespace NetOffice.AccessApi
{
#region Delegates
#pragma warning disable
#pragma warning restore
#endregion
/// <summary>
/// CoClass SmartTagActions
/// SupportByVersion Access, 11,12,14,15,16
/// </s... | C# | Source/Access/Classes/SmartTagActions.cs | NetOfficeFw/NetOffice | mit | 3,974 | 138 | codeparrot/github-code |
41bb897dcdd2a657cd96f56f2a286fbe762b0386bcb47916ea7453ead28f0265 | <!DOCTYPE html>
<html lang="en-us">
<head>
<title>一个Linux通用iptables脚本 · Racksam</title>
<meta name="generator" content="Hugo 0.85.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" content="Rack Sam">
... | HTML | 2014/04/08/iptables-script-for-web-service/index.html | racksam/racksam.github.io | mit | 40,323 | 1,224 | codeparrot/github-code |
bfdc780d1d538b94f858ef13f089bf7fe2f57a0d78f39e3551bea26dbf31c3bf | package com.in28minutes.example.layering.business;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springf... | Java | 2.RealWorldExample/business/impl/src/test/java/com/in28minutes/example/layering/business/TodoBusinessServiceJavaStubTest.java | in28minutes/SpringIn28Minutes | mit | 1,390 | 43 | codeparrot/github-code |
c233833ed2917f343d4a69b54cf251555d6f136694ffea5e3ce8e99d49cf17a7 | using System;
namespace CommonUtility.Logging
{
public static class LoggerExtensions
{
public static void Trace<T>(this ILogger logger, T message)
{
logger.Log(LogLevel.Trace, message);
}
public static void Trace(this ILogger logger, Exception exception, IFormatPro... | C# | CommonUtility/Logging/LoggerExtensions.cs | 3gbywork/CommonUtility | mit | 2,819 | 84 | codeparrot/github-code |
081b393a518f78ae8eb4f3d9a9aaa0b9f7df4f4ab276bb10ea066d9345f4950c | // ---------------------------------------------------------------------------
// <copyright file="TimeChangeRecurrence.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// ---------------------------------------------------------------------------
//-----... | C# | ComplexProperties/TimeChangeRecurrence.cs | dclaux/ews-managed-api | mit | 4,895 | 133 | codeparrot/github-code |
2f43c187c76eed01f6c8e076cf8b1f52a60915fde621f499240208a9e2c03ada | namespace OsmLibrary
{
using System.Collections.Generic;
using System.Xml.Serialization;
/// <summary>
/// Provides a base class for elements that contains tags.
/// </summary>
public abstract class TaggedElement : Element
{
/// <summary>
/// The tags
/// </summary>... | C# | Source/Examples/DrawingLibrary/Examples/OpenStreetMapExamples/OsmModel/TaggedElement.cs | objorke/oxyplot | mit | 864 | 38 | codeparrot/github-code |
8e3348ecf317ce3b7ae14f36ec1e7b80889822a5a817277013cfd3dc96f9523d | const User1 = require('../../model/user/user-schema');
const authUtils = require('../../auth/authUtils');
describe('functional test Create User', () => {
beforeEach((done) => {
User1.collection.drop();
User1.ensureIndexes();
mockgoose(mongoose).then(() => {
global.server = require('../../index');
... | JavaScript | test/functional/user_crud.js | IntegratedControls/LibraryBackEnd | mit | 3,679 | 129 | codeparrot/github-code |
a467a5eab117bbc372ab2ca0576b7595d1dd5c651214a4ae08f405c89f725701 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<A name=1></a><hr>
<A name=2></a><hr>
<A name=3></a><hr>
<A name=4></a><hr>
<A name=5></a><hr>
<A name=6></a><hr>
<A name=7></a><hr>
<A name=8></a><hr>
<A name=9></a>April 9, 2014<br>
RE:<br>
Filter Socks and Oth... | HTML | html/pdf/W20522.pdfs.html | datamade/elpc_bakken | mit | 49,874 | 3,949 | codeparrot/github-code |
0a63b90e6aa0ca3c3d04debc9b3cb60e2e99cbef4170a3c691d759227d5d09eb | import { Component, Directive, Input, HostBinding, OnInit, SimpleChanges, OnChanges } from '@angular/core';
import { ViewChild, ViewContainerRef } from '@angular/core';
import { ComponentFactoryResolver, ComponentRef, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, FormControl } fro... | TypeScript | src/platform/dynamic-forms/dynamic-element.component.ts | jakoubekm/TeradataCovalent_MJA | mit | 4,029 | 146 | codeparrot/github-code |
d18940bd27cfd559096c8dee087f89ee31292eda052fd3cce81f2eeccec2ea79 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>reflexive-first-order: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../boo... | HTML | clean/Linux-x86_64-4.08.1-2.0.5/released/8.10.2/reflexive-first-order/8.5.0.html | coq-bench/coq-bench.github.io | mit | 7,012 | 172 | codeparrot/github-code |
6ea5d128294cf3d3312151e74514b38a75ca0c6020e14cd6a9c639b89057cb59 | module RestFtpDaemon
module ViewsHelper
def dashboard_feature name, enabled, message_on = "enabled", message_of = "disabled"
# Build classes
class_status = enabled ? 'enabled' : 'disabled'
classes = "btn btn-default feature-#{class_status} disabled"
# Build title
title_status = ena... | Ruby | lib/rest-ftp-daemon/helpers/views.rb | bmedici/rest-ftp-daemon | mit | 3,695 | 151 | codeparrot/github-code |
01c96200337d9664a1fc335abae4f6bddcfa21be1dc63008b1f61f18a75f0b95 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import argparse
import logging
import numpy as np
from sklearn.cross_validation import StratifiedKFold, train_test_split
def read_triples(path):
with open(path, 'rt') as f:
lines = f.readlines()
triples = [(s.strip(), p.strip(), o.... | Python | data/nations/make_folds_stratified.py | uclmr/inferbeddings | mit | 3,031 | 83 | codeparrot/github-code |
66b3f15b4d112ae59bc226c300e940c7af50007ff872836e09c9c4a7a41a25cc | // Copyright (c) 2001 Per M.A. Bothner and Brainfood Inc.
// This is free software; for terms and warranty disclaimer see ./COPYING.
package gnu.lists;
import java.io.IOException;
/** Various static utility methods for general strings (CharSeqs). */
public class Strings
{
/** Change every character to be upperca... | Java | gnu/lists/Strings.java | alain91/kawa | mit | 3,240 | 101 | codeparrot/github-code |
700a094bfdec8bf76d7c3d78861fbcd4f06f3269ebe3d64ce42bf331a115550f | package dingo
import (
"errors"
"sync"
)
//
// default implementation
//
type remoteBridge struct {
producerLock sync.RWMutex
producer Producer
consumerLock sync.RWMutex
consumer Consumer
namedConsumer NamedConsumer
reporterLock sync.RWMutex
reporter Reporter
storeLock sync.RWMutex
s... | GO | bridge_remote.go | mission-liao/dingo | mit | 9,415 | 501 | codeparrot/github-code |
25dc0cbf805527ccd6704902d5596891b3fde50631544b668c6848a8334f119f | # frozen_string_literal: true
module PaginateResponder
#
# Pagination adapter for pagy.
#
class PagyAdapter < Base
def paginate
self.pagy, self.pagy_resource = controller.send(self.class.pagy_method(resource), resource, page: page,
items: per_page,)
pagy_resource
end
def total_pages
... | Ruby | lib/paginate-responder/pagy_adapter.rb | jgraichen/paginate-responder | mit | 1,058 | 55 | codeparrot/github-code |
6acf5a8d99689201f8efbbae691a13c70ab84059478d9644f5869f6fae833d00 | import { Injectable, OpaqueToken } from '@angular/core';
import { Plugin } from './plugin';
export const HttpPluginsToken = new OpaqueToken('HTTP_PLUGINS');
const EventsMethods = [ 'preRequest', 'postRequest', 'postRequestSuccess', 'postRequestError' ];
const AllPlugins = '*';
@Injectable()
export class Plugins {
... | TypeScript | src/providers/plugins/plugins.ts | ramonornela/http | mit | 4,231 | 191 | codeparrot/github-code |
46956e6549f73fad9f84ba1baac66f773384b66c5c0b617d257308125f405199 | /** @module {object} lib/utilities **/
var fs = require('fs')
, path = require('path');
/**
* @namespace _ - Alias for exports object
* @exports lib/utilities
*/
var _ = exports;
/**
* Merge an original object with any number of other objects
* @param {object} original - The original object to be extended
* ... | JavaScript | lib/utilities.js | davidglivar/brutal | mit | 2,672 | 104 | codeparrot/github-code |
0c736c3ae3b02c797ae3c09b443f4eed98c3b0389a4ede746d7d3f22bfa30e6f | <?php
namespace Projet2\FrontBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class BasketController extends Controller
{
/**
* @Route("/basket", name... | PHP | src/Projet2/FrontBundle/Controller/BasketController.php | doroharlay/projet2dh | mit | 5,187 | 171 | codeparrot/github-code |
09245582b8ebdb3be90c468d054bec4161d890692a0bfca82c008db7eddda645 | 'use strict';
var util = require('util');
var chainlib = require('chainlib');
var BaseDB = chainlib.DB;
var Transaction = require('./transaction');
var Wallet = require('./wallet');
var async = require('async');
var bitcore = require('bitcore');
var BufferWriter = bitcore.encoding.BufferWriter;
var errors = require('.... | JavaScript | lib/db.js | pnagurny/chainlib-bitcoin | mit | 12,162 | 506 | codeparrot/github-code |
104d25f53e2a69da6c02831a3226db10408749f351bb6b45728ab3b457d8ecb1 | using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace Estimatorx.Data.Mongo.Security
{
public class User
{
public User()
{
Claims = new List<Claim>();
Logins = new List<Login>();
Roles = new HashSet<string>();
Orga... | C# | migration/Estimatorx.Data.Mongo/Security/User.cs | loresoft/Estimatorx | mit | 1,483 | 68 | codeparrot/github-code |
842da5b13573ad088491ba70f20c83adda3303a4bde1af20ffdb759f4bff5a41 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace TS.FormsToTokenAccessAuthentication.Sample.Service.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Modify t... | C# | src/Sample.Service/Controllers/HomeController.cs | twistedstream/FormsToTokenAccessAuthentication | mit | 709 | 33 | codeparrot/github-code |
14dd1e6350f2efeb3f8d00afdf7bb1ad877fa99d371453934f1dec944e94f274 | # frozen_string_literal: true
module SuperAdmin
class NotificationsController < ApplicationController
before_action :set_notification, only: %i[show edit update destroy acknowledge]
before_action :set_notifications, only: :index
helper PaginableHelper
# GET /notifications
# GET /notifications... | Ruby | app/controllers/super_admin/notifications_controller.rb | CDLUC3/roadmap | mit | 2,888 | 102 | codeparrot/github-code |
27b4c7772cc38933f62db0f5258565db91277fb5fbd67e2e6eecaee93654ca8b | package io.github.yzernik.bitcoinscodec.messages
import io.github.yzernik.bitcoinscodec.structures.{Message, MessageCompanion, VarList, VarStr}
import scodec.codecs._
import scodec.{HListCodecEnrichedWithHListSupport, ValueCodecEnrichedWithHListSupport}
case class Alert(
version: Int,
relay_until: Long,
expirat... | Scala | src/main/scala/io/github/yzernik/bitcoinscodec/messages/Alert.scala | yzernik/bitcoin-scodec | mit | 1,142 | 43 | codeparrot/github-code |
95f1f58a5405d33942a10626e8b48a8ef73c223924ca11813045afe96f5c4061 | import { Injectable } from '@angular/core';
import { Form } from '../form-factory/form';
import { ValueAdapter } from './value.adapter';
import * as _ from 'lodash';
@Injectable()
export class OrderValueAdapter implements ValueAdapter {
private formOrderNodes = [];
private provider = '';
generateFormPayloa... | TypeScript | src/form-entry/value-adapters/order.adapter.ts | AMPATH/ng2-opemmrs-formentry | mit | 7,493 | 211 | codeparrot/github-code |
c3940438ab247f3ffc78ccc0051687d6750e352df34dab9c05719dd85d0e14c4 | <?php use Roots\Sage\Titles; ?>
<header class="page-header page-header-wide">
<?php
$page_subtitle = get_post_meta( get_the_ID(), '_cmb2_page_subtitle', true );
$page_copyright = get_post_meta( get_the_ID(), '_cmb2_page_copyright', true );
?>
<?php if ( is_home() && get_option('page_for_posts'... | PHP | templates/page-header.php | lukesmmr/wildff | mit | 2,420 | 50 | codeparrot/github-code |
25fa6de16273c0f3779a1c1ffcfbdac07747b32473855a9a1df029e1b9d98e4b | <?php
//initilize the page
require_once("inc/init.php");
//require UI configuration (nav, ribbon, etc.)
require_once("inc/config.ui.php");
/*---------------- PHP Custom Scripts ---------
YOU CAN SET CONFIGURATION VARIABLES HERE BEFORE IT GOES TO NAV, RIBBON, ETC.
E.G. $page_title = "Custom Title" */
$page_title = ... | PHP | calender/admin/DEVELOPER/PHP_version/PHP_HTML_Version/widgets.php | ttimt/startupweek | mit | 54,577 | 1,516 | codeparrot/github-code |
1d081356af9054a1f21f6b04f289df9d1474d360bd20144e187c08e005175f18 | package com.firozansari.budgetbookapp;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.... | Java | app/src/main/java/com/firozansari/budgetbookapp/MainActivity.java | firozansar/BudgetBookApp | mit | 3,402 | 98 | codeparrot/github-code |
77e4efdd01909ac62c82913b33fb98c61202dd6c36682223ad43c3fbdca69871 | <?php
namespace Modules\Bcrud;
use Route;
class CrudRouter
{
protected $extraRoutes = [];
protected $name = null;
protected $options = null;
protected $controller = null;
public function __construct($module,$name, $controller, $options)
{
$this->module = $module;
$this->name... | PHP | CrudRouter.php | imagina/asgardcms-bcrud | mit | 4,153 | 131 | codeparrot/github-code |
a828df6d8eeb98c28fbcae607632b4c0739dc9ed382c8847dd0d4146a67f1dcd | package com.combustiblelemons.thrillingtales;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.vie... | Java | src/com/combustiblelemons/thrillingtales/SaveFragment.java | bhm/Thrilling-Tales | mit | 3,034 | 103 | codeparrot/github-code |
830e0baeede672618aab02e004324151616baf285a13e5f0410d204678718b2b | using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Excess.Compiler;
using Excess.Compiler.Roslyn;
namespace xslang
{
using System;
using CSharp = Microsoft.CodeAnalysis.CSharp.SyntaxFa... | C# | Excess.Compiler/xslang/Match.cs | xs-admin/Excess | mit | 5,510 | 166 | codeparrot/github-code |
c9801404b1098195b8ce94c0f8c09aa17c4d8f161804e1839f0fc78eedf88962 | #include <iostream>
#include "Config.h"
#include "Process.h"
#include "INotify.h"
#include "FileDispatcher.h"
#include "UnistdError.h"
#include "utils.h"
#include "file.h"
#include "arguments.h"
std::vector<std::string> getFiles()
{
Process proc = Process({"find", ".", "-iname", "*.cpp"});
std::string file_l... | C++ | src/cook.cpp | green7ea/cook | mit | 2,578 | 87 | codeparrot/github-code |
ad9acee54b2af0336bfcd8517c89d4fd13d3f08197814c306692dc45e0d07d98 | <?php
namespace Itech\FormulaireBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class ReponseType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $opti... | PHP | src/Itech/FormulaireBundle/Form/ReponseType.php | ItechSup-Ariane/Quest-TPE | mit | 961 | 42 | codeparrot/github-code |
a1152e15c31938b750f4b3dbdb636e0a940b007b31d10eb91365b946c7b3dbe6 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | Python | CIM14/ENTSOE/Equipment/Core/Curve.py | rwl/PyCIM | mit | 4,106 | 78 | codeparrot/github-code |
119f925c313b86b7741728397bb2072c76ffbf4307406ee8853ed2b02e2a0852 | package com.heroku.api.request.addon;
import com.heroku.api.Addon;
import com.heroku.api.Heroku;
import com.heroku.api.exception.RequestFailedException;
import com.heroku.api.http.Http;
import com.heroku.api.request.Request;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import static com... | Java | heroku-api/src/main/java/com/heroku/api/request/addon/AddonList.java | heroku/heroku.jar | mit | 1,488 | 67 | codeparrot/github-code |
f1cd3beb300fa661ededc75d21ff181d3668e95e85bab66f805d82027b04629b | //15* Modify your last program and try to make it work with any number type, not just integer
//(e.g. ecimal, float, byte, etc.). Use generic method (read in Internet about generic methods in C#).
using System;
using System.Collections.Generic;
class MinMaxSumAverageProduct
{
static T GetMax<T>(params T[] num)
... | C# | Programming/2. CSharpPartTwo/CS2_03.Methods/15. MinMaxSumAverageProduct/MinMaxSumAverageProduct.cs | kalinalazarova1/TelerikAcademy | mit | 1,705 | 69 | codeparrot/github-code |
ca1be3d5d181040647f4ad0b9f70a57d021f62ff520293c862d2c8df2c8f6c3c | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpModule } from '@angular/http';
import { AbstractComponent } from './components/abstract/abstract.component';
import { HeaderModule } from '../header/header.module';
import { ServicesComponent } from './components/s... | TypeScript | src/app/modules/profile/profile.module.ts | rogerioyokoi/rogerioyokoi | mit | 1,346 | 42 | codeparrot/github-code |
88c666e19cc03c528a2d48c47eea209d8078f1271a2a30a1d1d8188159f29bba | package dk.doggycraft.hq;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Set;
import o... | Java | src/dk/doggycraft/hq/QuestManager.java | DoggyCraftDK/Hardcore-Quest | mit | 2,174 | 82 | codeparrot/github-code |
9dfb4cddec14b4d8a5029a9d2151319f3e835d02be96310af34d38195e348687 | class CompaniesController < ApplicationController
skip_before_filter :check_current_company
def index
@companies = current_user.companies.order('name asc')
end
def show
@company = current_user.companies.find(params[:id])
end
def new
@company = Company.new
end
def create
@company = Co... | Ruby | app/controllers/companies_controller.rb | rescuedcode/staffplan_redux | mit | 1,419 | 62 | codeparrot/github-code |
8b56b194ec37bdedf2355ba84a1a3334b9ecb60b52c7be8a9b24bc35bb220f14 | var __ = require('underscore'),
Backbone = require('backbone'),
$ = require('jquery'),
//userProfileModel = require('../models/userProfileMd'),
loadTemplate = require('../utils/loadTemplate'),
domUtils = require('../utils/dom'),
app = require('../App.js').getApp(),
timezonesModel = requi... | JavaScript | js/views/settingsVw.js | Kirvx/OpenBazaar-Client | mit | 28,981 | 838 | codeparrot/github-code |
52d10b4231c7407af5209b13fa7328004710c0a1017ecaee29e8ce4650247fa1 | <?php
/**
* ALIPAY API: alipay.marketing.card.delete request
*
* @author auto create
* @since 1.0, 2017-06-23 09:40:06
*/
class AlipayMarketingCardDeleteRequest
{
/**
* 会员卡删卡
**/
private $bizContent;
private $apiParas = array();
private $terminalType;
private $terminalInfo;
private $pr... | PHP | alipay-sdk-PHP-20170725114612/aop/request/AlipayMarketingCardDeleteRequest.php | naturalation/AliyunSdks | mit | 1,975 | 119 | codeparrot/github-code |
7b11ee08a9b9344825988c0c83dd88fcf73abb603167a7c43532cfe8559870b5 | require "bindable_block/version"
require 'bindable_block/bound_block'
class BindableBlock < Proc
def initialize(klass=BasicObject, &block)
@klass = klass
@original_block = block
if curried_values = block.instance_variable_get(:@curried_values)
@original_block = curried_values[:original_b... | Ruby | lib/bindable_block.rb | JoshCheek/bindable_block | mit | 1,946 | 62 | codeparrot/github-code |
e05885575a5a22000ed5d3873486ab9ff39ba7983fb8d4f26e914cf050a780ff | export default class CustomGeometry extends THREE.BufferGeometry {
constructor(opts) {
super();
this.width = opts.width || 128;
this.height = opts.height || 128;
this.widthSegment = opts.widthSegment || 2;
this.heightSegment = opts.heightSegment || 2;
this.halfwidt... | JavaScript | sketches/theme/procedural-mesh/generative-plane/geometry.js | kenjiSpecial/webgl-sketch-dojo | mit | 2,182 | 62 | codeparrot/github-code |
693f607733f3e29123351fe797f91a6a463706c27c314efc001dded1b1d411d6 | package com.audit.bl.servlets;
import com.audit.bl.beans.User;
import com.audit.bl.services.UserService;
import com.audit.bl.utils.EncryptUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiring... | Java | src/main/java/com/audit/bl/servlets/ChangePasswordServlet.java | dyzhxsl3897/audit | mit | 1,985 | 58 | codeparrot/github-code |
020f91f4fe28fe17efc3d23fb85d0a375e8180e4b94f4c1ae69647c62a6bd1e5 | //
//
//
#include "FreeRoam.h"
#include "Robot.h"
#include "utilities.h"
uint16_t getDist() {
uint16_t readings[5];
for (uint8_t i = 0; i < 5;i++) {
delay(50);
robot.sensors.sonar.read();
Serial.println(robot.sensors.sonar.dist());
readings[i] = robot.sensors.sonar.dist();
}
sort(readings, 5);
return... | C++ | Robot1/FreeRoam.cpp | apardyl/arduino-robot | mit | 2,761 | 131 | codeparrot/github-code |
df0b8340ff1d931683e66c89a762ffa1b8a80869f59c0f7613258fb8c15a5afe | <!doctype html>
<html lang="en">
<head>
<title>Code coverage report for js/app.js</title>
<meta charset="utf-8">
<link rel="stylesheet" href="../prettify.css">
<style>
body, html {
margin:0; padding: 0;
}
body {
font-family: Helvetica Neue, Helvetica,Ari... | HTML | coverage/Chrome 34.0.1847 (Mac OS X 10.8.5)/js/app.js.html | JustinMcConnell/whenshouldi | mit | 11,377 | 329 | codeparrot/github-code |
21d355ec12705946cc470223a30c11e777eb4b0b9ab8fadcae33356fbd715816 | 'use strict';
/**
* svg-sprite is a Node.js module for creating SVG sprites
*
* @see https://github.com/svg-sprite/svg-sprite
*
* @author Joschi Kuphal <joschi@kuphal.net> (https://github.com/jkphl)
* @copyright © 2018 Joschi Kuphal
* @license MIT https://github.com/svg-sprite/svg-sprite/blob/main/LICENSE
*/
... | JavaScript | lib/svg-sprite/mode/defs.js | jkphl/svg-sprite | mit | 3,141 | 103 | codeparrot/github-code |
67ee944613640bde03d9699ff36ccb12f22014810b9df0e5f7a5b2b0bde193ae | package com.microsoft.bingads.v12.api.test.entities.criterions.campaign.device.read;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Paramete... | Java | src/test/java/com/microsoft/bingads/v12/api/test/entities/criterions/campaign/device/read/BulkCampaignDeviceCriterionReadParentIdTest.java | bing-ads-sdk/BingAds-Java-SDK | mit | 1,515 | 47 | codeparrot/github-code |
8fd7902f652fd99e4c9809b196c4d05319e22fade568352cf6ffe6a0de65c017 | '''
The Core of peterhellberg
'''
import requests
from . import metadata
def parse(url, use_ssl=False):
'''Send a http request to the remote server
Return the response, as a dictionary
Raises requests.exceptions.ConnectionError in event of a network error
Raises requests.exceptions.HTTPError in even... | Python | peterhellberg/main.py | forfuturellc/peterhellberg | mit | 1,258 | 37 | codeparrot/github-code |
591042b964c65ef9378ed1c180f895ecd0249e37878e6473a64819c16986d475 | import styled from "@emotion/styled"
import { KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material"
import { FC } from "react"
export interface NumberPickerProps {
value: number
prevValue: () => number
nextValue: () => number
className?: string
onChange: (v: number) => void
}
const Value = styled.... | TypeScript | src/main/components/Toolbar/QuantizeSelector/NumberPicker.tsx | ryohey/signal | mit | 1,328 | 59 | codeparrot/github-code |
679a5a53352bdb8155bf94a3ce73357b5da3843cd3c1ee43082dec08f9f3754f | /*
** $Id: lfunc.c,v 2.45 2014/11/02 19:19:04 roberto Exp $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
#define lfunc_c
#define LUA_CORE
#include "lprefix.h"
#include <stddef.h>
#include "lua.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lo... | C | support/lua/lfunc.c | CaringLabs/MediaFramework | mit | 3,691 | 152 | codeparrot/github-code |
8a7d1e680ca694081d53e2586cff61c887bf0cde6280e446e61066ec305d5038 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using SoundCloud.Api.Endpoints;
using SoundCloud.Api.Entities;
using SoundCloud.Api.Exceptions;
using SoundCloud.Api.Web;
namespace SoundCloud.Api.Test.Endpoints
{
[TestFixture]
p... | C# | test/SoundCloud.Api.Test/Endpoints/CommentsTest.cs | prayzzz/SoundCloud.Api | mit | 3,715 | 113 | codeparrot/github-code |
d5f3fc59b06103f9035fcad24a104e415be2fc153978a3e310f9c78ea60c4544 | """
__/\\\\\\\\\\\\______________________/\\\\\\\\\\\____/\\\________/\\\_
_\/\\\////////\\\__________________/\\\/////////\\\_\/\\\_______\/\\\_
_\/\\\______\//\\\________________\//\\\______\///__\/\\\_______\/\\\_
_\/\\\_______\/\\\_____/\\\\\______\////\\\_________\/\\\_______\/\\\_
_\/\\\_______\/\\\___/... | Python | dosu/utils.py | tsandrini/dosu | mit | 2,092 | 77 | codeparrot/github-code |
9ab1496d1b8e85e55828565ee692ce5a60b4e6df1ae5520fffb0ffa35420a6c5 | /*
* Copyright (c) 2009 - 2012 Deutsches Elektronen-Synchroton,
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; ei... | Java | dcache-nfs/src/main/java/org/dcache/nfs/v4/xdr/LOOKUPP4res.java | devsunny/app-galleries | mit | 1,530 | 47 | codeparrot/github-code |
3794262cd42abb6246003b4fea3974c65bb87a9054dddd5d5b34088ec8b81b3b | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require("babel-runtime/helpers/extends");
var _extends3 = _interopRequireDefault(_extends2);
var _assign = require("babel-runtime/core-js/object/assign");
var _assign2 = _interopRequireDefault(_assign);
exports.pool = p... | JavaScript | lib/reducers/adminReducer.js | cifren/sound-admin | mit | 1,869 | 52 | codeparrot/github-code |
24fc1619db491866fe2a37b647bf946de258fce39dd692b61ef19c1bcc487a65 | """
Functions for reading/writing/manipulating klattgrid files
A klattgrid can be used for speech synthesis/resynthesis.
For more information on the praat klattgrid:
http://www.fon.hum.uva.nl/praat/manual/KlattGrid.html
There are three kinds of data types in a klattgrid:
null tiers (contain no data points -- seem to ... | Python | praatio/klattgrid.py | timmahrt/praatIO | mit | 8,030 | 296 | codeparrot/github-code |
ac725b38f3432710a6764a984c1fc15cc61ff3df42886c22d4238c5fa1acd5b4 | <?php
namespace XeroPHP\Models\PayrollUS;
use XeroPHP\Remote;
class PayRun extends Remote\Object {
/**
* Xero Identifier for the Pay Schedule
*
* @property string PayScheduleID
*/
/**
* Pay run period end date. Needed if it is an unscheduled pay run
*
* @property \DateTi... | PHP | src/XeroPHP/Models/PayrollUS/PayRun.php | commonledger/xero-php | mit | 8,253 | 368 | codeparrot/github-code |
faf28d563151b5711460bfabc2705c8eec71f2b151052d7b410bfe198d6cfbe3 | package com.phonegap.applet;
import java.applet.Applet;
public class PhoneGap extends Applet {
/**
*
*/
private static final long serialVersionUID = -3597778569502049410L;
public PhoneGap ()
{
System.out.println ("PhoneGap Applet: Constructor 1234");
}
public String getAppletInfo ()
{
return ("Writt... | Java | src/com/phonegap/applet/PhoneGap.java | brycecurtis/phonegap-simjs | mit | 767 | 42 | codeparrot/github-code |
61ff5dc1692b9acdfa1959f52b06fedada79232639fdb34b31da6270cb99d5c0 |
/*
* Authors:
* Nicolas Stoiber (nicolas.stoi@gmail.com)
*
* 2016
*/
#ifndef _IM_PROCESSING_UTILS_HPP
#define _IM_PROCESSING_UTILS_HPP
#include <CImg.h>
#include "errCodes.h"
#define MAX_TEMPLATE_DIMENSION 4000
namespace Common
{
/*
* Simple struct to represent image sizes
*/
template <typename IntPrec>
struct ... | C++ | include/im_processing_utils.hpp | spaceapple/cpu-gpu-numerical-optim-bench | mit | 5,387 | 181 | codeparrot/github-code |
a190632500002edf2bb7783f8b2eb789216bd82755d20ede7b6f11ddf0d5e563 | <!DOCTYPE html>
<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-col... | HTML | 2018/04/27/Ubuntu制作windows启动盘-WoeUSB/index.html | jiyangg/jiyangg.github.io | mit | 30,088 | 1,147 | codeparrot/github-code |
50ddf5b2987d24a02c2a3ef7dc1b0e6b8ee08c1daa2c573a06684ef2bb7abffe | import * as Utils from './utils.js';
import './customMarkers.component.js';
import './details.component.js';
import './filters.component.js';
import './layout.component.js';
import './list.component.js';
import './login.component.js';
import './map.component.js';
import './settings.component.js';
// react reducer goes... | JavaScript | public/dashboard.component.js | transistorsoft/background-geolocation-console | mit | 18,519 | 719 | codeparrot/github-code |
7c6444428703b9e286d464315cc27a964bdf7698a57fc93a3d20ba7c9209f462 | module Chao92
# == Estimator
#
# Used to estimate the total number of species
#
# A minimal usage could be:
#
# Chao92::Estimator.run(samples) # => the estimator of the samples
#
class Estimator
def initialize
@samples = []
@observed = {}
@ff = {}
end
def self.run(sa... | Ruby | lib/chao92/estimator.rb | rubyhyd/chao92 | mit | 1,240 | 64 | codeparrot/github-code |
66f9d7cd0fee31d52338dbe94c2efff6e346c2d4341b03e6d131508a430d5dc6 | package jwt
import (
"crypto/rsa"
"fmt"
"log"
"time"
"github.com/SermoDigital/jose/crypto"
"github.com/SermoDigital/jose/jws"
"github.com/nicholasjackson/building-microservices-in-go/chapter8/utils"
)
var rsaPrivate *rsa.PrivateKey
var rsaPublic *rsa.PublicKey
func init() {
var err error
rsaPrivate, err = ... | GO | chapter8/jwt/jwt.go | nicholasjackson/building-microservices-in-go | mit | 1,360 | 58 | codeparrot/github-code |
b8a6c79f813f3e29824e6ee44918d4f7d438b5ff8f59a3b2e9bd70746442ef80 | """
Display all the icons available in :obj:`QtWidgets.QStyle.StandardPixmap` and in
the *standard* Windows DLL/EXE files.
"""
from msl.qt import (
QtWidgets,
QtCore,
application,
convert
)
try:
# check if pythonnet is installed
import clr
has_clr = True
except ImportError:
has_clr = Fa... | Python | msl/examples/qt/show_standard_icons.py | MSLNZ/msl-qt | mit | 5,135 | 173 | codeparrot/github-code |
0da1797ddeabd831ceb0791182c34f338f64f852418be6303f44e622e22da264 | package fi.utu.ville.standardutils.ui;
import fi.utu.ville.standardutils.PreciseDecimal;
import fi.utu.ville.standardutils.ui.MinMaxFieldValidator.ModifyPreference;
public class DecimalField extends RegexField implements ControlWithNumericValue {
private static final long serialVersionUID = -802077291284418987L;
... | Java | src/main/java/fi/utu/ville/standardutils/ui/DecimalField.java | villeteam/ville-standardutils | mit | 4,624 | 164 | codeparrot/github-code |
3021bc6729c768dfd31415fec537c9c6296520ec5e4ce241cadb18891a70dd2a | HOST = null; // localhost
PORT = 80;
// when the daemon started
var starttime = (new Date()).getTime();
var mem = process.memoryUsage();
// every 10 seconds poll for the memory.
setInterval(function () {
mem = process.memoryUsage();
}, 10*1000);
var fu = require("./fu"),
ch = require("./Channel"),
sys = r... | JavaScript | backend/server.js | 7CubedProject/UW-Chat | mit | 11,209 | 445 | codeparrot/github-code |
1b324d8c228ea5756920424884416ff7f05e3658d9c830eff22faa4d54b57b7b | #! /usr/bin/env python3
# This was forked from https://github.com/rustyrussell/lightning-payencode/tree/acc16ec13a3fa1dc16c07af6ec67c261bd8aff23
import re
import time
from hashlib import sha256
from binascii import hexlify
from decimal import Decimal
from typing import Optional, TYPE_CHECKING, Type
import random
impo... | Python | electrum_mona/lnaddr.py | wakiyamap/electrum-mona | mit | 18,219 | 520 | codeparrot/github-code |
ad2288a5c7548db938369165fab76a455da404c5bca5e43d26a330d0b447d2fe | {% extends "nav.html" %}
{% block title %}
View Directory
{% endblock %}
{% block extraHead %}
<link rel="stylesheet" href="https://rawgit.com/enyo/dropzone/master/dist/dropzone.css">
{% endblock %}
{% block body %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h4>Files of... | HTML | gallery/templates/view_filtered.html | liam-middlebrook/gallery | mit | 1,344 | 47 | codeparrot/github-code |
d684b90ca3984d46a0158236ebc87fcd11d0df6d073e9cc3a0924e8e8224ae2f | #include<iostream>
#include<String>
int main()
{
int sideA = 1, sideB = 2, sideC = 3;
int tinput;
int Sinput;
///int rightside
int RightTriangle = 1, IsoscelesTriangle = 2, EquilateralTriangle = 3;
std::cout << " Press 1 for Right Triangle, Press 2 for Isosceles Triangle, Press 3 for Equilateral" << std::endl;
st... | C++ | Triangles3.7/Triangles3.7/Source.cpp | DipeshKazi/C-Repository | mit | 3,055 | 150 | codeparrot/github-code |
a2d7a12759471278c8548caefe6308d3fb9bdd9f790a339aa3ac8d2c84f5fc3f | using System;
using System.Collections.Generic;
using System.Linq;
namespace Pixie.Code
{
/// <summary>
/// Specifies a sparse region of text in a document.
/// </summary>
public sealed class SourceRegion
{
private SourceRegion()
{ }
/// <summary>
/// Creates a sour... | C# | Pixie/Code/SourceRegion.cs | jonathanvdc/Pixie | mit | 6,651 | 193 | codeparrot/github-code |
08cb39d8d1672d89268976a0c450879805a1bdd7a9bd909854d5ce9d9aa694b3 | package com.fly.cj.ui.activity.Register;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import com.fly.cj.MainFragmentActivity;
import com.fly.cj.R;
import com.fly.cj.base.BaseFragment;
import com.fly.cj.ui.activity.FragmentContainerActivity;
import butterknife.ButterKnife;
public class Re... | Java | carijodoh/src/main/java/com/fly/cj/ui/activity/Register/RegisterActivity.java | imalpasha/cj | mit | 1,139 | 43 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.