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 |
|---|---|---|---|---|---|---|---|---|
34a776025ab94a88cbc81d678f76f37e347bcd60cb8f96c8afde6feb932f45b9 | module ConcurrentEnumerable
module EnumerableInterface
module_function
def use(runner, methods)
enumerable_methods = Enumerable.instance_methods.map(&:to_s)
enumerable_methods << 'each'
methods.each do |method|
next unless enumerable_methods.include?(method)
class_eval <<-RU... | Ruby | lib/concurrent_enumerable/enumerable_interface.rb | SebastianEdwards/concurrent-enumerable | mit | 963 | 36 | codeparrot/github-code |
2769b755854c85d42dd83058f37a34b5a2802278e6a518fd6c6a028ac0cc8ebe | // BLASTX IMPLEMENTIERUNG VON ANNKATRIN BRESSIN UND MARJAN FAIZI
// SOFTWAREPROJEKT VOM 2.4. - 29.5.2012
// VERSION VOM 04.MAI.2013
/**@brief finder.cpp
*Findet die Matches von den Reads mit der Proteindatenbank
*/
#include "own_functions.h"
int get_read_position(unsigned & pattern_pos,StringSet<unsign... | C++ | raw/pmsb13/pmsb13-data-20130530/sources/fjt74l9mlcqisdus/2013-05-20T15-26-45.879+0200/sandbox/my_sandbox/apps/blastX/finder.cpp | bkahlert/seqan-research | mit | 6,085 | 140 | codeparrot/github-code |
1b8aa3c259165b6d6dde5ff82fa9b994d927cdeebe42abb5c7aecb8e5a5f162c | //
// CKSubscription.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKDefines.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, CKSubscriptionType) {
CKSubscriptionTypeQuery = 1,
CKSubscriptionTypeRecordZone = 2,
} NS_... | C | deps/iPhoneOS9.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CKSubscription.h | rweichler/cylinder | mit | 6,080 | 112 | codeparrot/github-code |
4b45c9deda649a48d10dc8637ecff1851d4f1c3859ce6474da6e807a2da25175 | /*
* The MIT License (MIT)
*
* Copyright (c) Despector <https://despector.voxelgenesis.com>
* Copyright (c) contributors
*
* 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 rest... | Java | src/main/java/org/spongepowered/despector/emitter/EmitterSet.java | Despector/Despector | mit | 5,197 | 138 | codeparrot/github-code |
f21500ddf0436cd795773a05e608686fee1826beb719dbc17afc6493bcc36fef | package com.vgerbot.orm.influxdb.config;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
public class InfluxDBNamespaceHandler extends NamespaceHandlerSupport {
public static final String NAMESPACE = "http://www.vgerbot.com/schema/influxdb";
public static final String DATASOURCE_ELEMENT = "dat... | Java | spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/config/InfluxDBNamespaceHandler.java | y1j2x34/spring-influxdb-orm | mit | 1,892 | 39 | codeparrot/github-code |
bbd752d177c8ec3b5262ac0d5de6c5b57c56182bb9279ba63c69e30e344bbce0 | #include "Joint.h"
#include "Bone.h"
Joint::Joint(btDiscreteDynamicsWorld* worldN, glm::vec3 posIn, glm::vec3 inAxis,float radiusN)
{
localAxisofRotation = inAxis;
isStatic = false;
world = worldN;
radius = radiusN;
position = glm::translate(position, glm::vec3(posIn.x, posIn.y, posIn.z));
GetVertices().push_... | C++ | LifeSim/Joint.cpp | Behemyth/LifeSim | mit | 9,706 | 193 | codeparrot/github-code |
463f61a7c11ca0ea79834b5c6bf150803aee6fe7a4fe8f230fa19fa6a5e20f46 | module Softlayer
class Network
class Subnet
module Rwhois
class Data < Softlayer::Entity
SERVICE = 'SoftLayer_Network_Subnet_Rwhois_Data'
attr_accessor :abuse_email
attr_accessor :account_id
attr_accessor :address1
attr_accessor :address2
a... | Ruby | lib/softlayer/network/subnet/rwhois/data.rb | zertico/softlayer | mit | 1,975 | 61 | codeparrot/github-code |
a82e717ea4fcbe06240bfe65f781ce5475eb259b86c36d4ed24d4f2b03319504 | from __future__ import unicode_literals
import logging
import mimetypes
import os
from wsgiref.util import FileWrapper
from django.conf import settings
from django.http import HttpResponse
try:
from urllib import quote
except ImportError as ie:
from urllib.parse import quote
log = logging
# Getting file... | Python | multiuploader/utils.py | vinaypost/multiuploader | mit | 2,052 | 64 | codeparrot/github-code |
80477ba3c6ca8af88242354586cbfbee6dad7da54c3414a5c6c01bcabedc65aa | #ifndef IDX_ASSIGNER_HH
#define IDX_ASSIGNER_HH
#include <stack>
#include <unordered_map>
#include "types.hh"
class idx_assigner{
private:
unsigned int max_idx = 0;
std::stack<unsigned int> unused;
std::unordered_map<std::string, idx_t> idx_lookup;
std::unordered_map<idx_t, std::string> token_lookup;
p... | C++ | include/idx_assigner.hh | martinsk/etally_core | mit | 588 | 31 | codeparrot/github-code |
69c3e1cb0cee562c786b70dba6153d6e75e5c5cf17473600179833654c223c9d | # frozen_string_literal: true
class UnifyCircuitService < ChatNotificationService
def title
'Unify Circuit'
end
def description
'Receive event notifications in Unify Circuit'
end
def self.to_param
'unify_circuit'
end
def help
'This service sends notifications about projects events to a... | Ruby | app/models/project_services/unify_circuit_service.rb | mmkassem/gitlabhq | mit | 1,575 | 61 | codeparrot/github-code |
20c8bc25ecc7d2ea260803815a9477059566f9bb75820b7cc981d3048bb2865b | import { cache } from '../../src/reducers/cache';
import { setSize } from '../../src/actions/cache';
import { aggregate } from '../../src/actions/wall';
import { aggregate as aggregateGeo } from '../../src/actions/geo';
import { expect } from 'chai';
describe('cache', () => {
function aggregateSequence(n, initialSt... | JavaScript | test/reducers/cache.js | lightstream-company/redux-ping | mit | 2,495 | 93 | codeparrot/github-code |
b31545f4de4ed85c7e4d2c11986ccbbe0b12bfa87efa88b64667dfc1043a514f | // import { INCONFIG } from '../../../../../public/in.config';
import { Component, OnInit, ViewChild, AfterViewChecked, ChangeDetectorRef } from '@angular/core';
import { NgForm } from '@angular/forms';
import { Observable } from 'rxjs/Observable';
import { ActivatedRoute, Router, Params } from '@angular/router';
impo... | TypeScript | 00/00-00/generator-typical-list/xxx/xxx.component.ts | YestoryFornever/node | mit | 2,687 | 101 | codeparrot/github-code |
cb31fb0af4096fdcfded4f125c8ab04f13c6e70bfe5a0106545c66f4c2812f1c | /**
*
*/
angular.module('controller.setting.radio', [])
.factory("radioList", function RadioList($rootScope, Units, TwStorage, Util) {
var radioList = {};
radioList.type = "";
radioList.title = "";
radioList.list = [];
radioList.value;
radioList.importData = funct... | JavaScript | client/www/js/controller.setting.radio.js | kimalec/TodayWeather | mit | 3,136 | 93 | codeparrot/github-code |
2a844576862b12978256a60603ae14c861e9fa782565c5bcf970c293c7a525cf | <?php
require_once __DIR__ . '/../vendor/autoload.php';
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
GameRocket_Configuration::environment('production');
GameRocket_Configuration::apikey('<use_your_apikey>');
GameRocket_Configuration::secretkey('<use_your_secretkey>');... | PHP | step2/src/app.php | workbandits/gamerocket-php-examples | mit | 2,880 | 90 | codeparrot/github-code |
2a67ed6e81495978be00ffd9a3c67f42536c9a5e51cde93535423127c74239f8 | /*
* Copyright (c) 2017 Public Library of Science
*
* 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, ... | Java | src/main/java/org/ambraproject/rhino/rest/controller/CommentCrudController.java | PLOS/rhino | mit | 13,172 | 244 | codeparrot/github-code |
91c10bced904caeb01ce2958814cd4807edcd70dcc8f4a9adf6f49fbebaa4cfd | package org.wfreitas.jjquery;
import java.util.List;
import org.wfreitas.jjquery.predicate.Predicate;
/**
* JQuery style wrapper for java lists
* @author wilson
*/
public interface Wrapper {
/**
* Updates the attribute with provided name in all wrapped list elements
* @param name Attribute name
* @par... | Java | src/main/java/org/wfreitas/jjquery/Wrapper.java | WilsonBr/jjquery | mit | 715 | 36 | codeparrot/github-code |
e8e0290a46ad4c8acd13261c263d185cad6bc657975653f294e51dcbdedcd13d | define(['src/grid', 'src/robot'], function(Grid, Robot) {
jasmine.getFixtures().fixturesPath = 'base/test/fixtures';
loadFixtures('index.html');
describe('When a robot moves to the goal', function() {
var grid = new Grid(),
robot = new Robot(grid);
grid.loadMaze({
... | JavaScript | test/robot.test.js | danbentley/Nesta-Interactives---Physical-Computing | mit | 1,590 | 50 | codeparrot/github-code |
5698adbd12a5286ead284809710e413cd791a8ecbf372673713138c2e64227f3 | package org.cytoscape.pesca.internal;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//package Pesca;
//import Visualizer2.*;
/**
*
* @author scardoni
*/
public class PescaWindows {
//private Visualizer visualizer;
private PescaStartMenu startmenu;
//private Res... | Java | pesca-3.0.0/src/main/java/org/cytoscape/pesca/internal/PescaWindows.java | ibestvina/multithread-centiscape | mit | 1,077 | 65 | codeparrot/github-code |
f3f4169868d6292bd9afb2075f75df9509e26417032e364c2373eded754eecad | <!DOCTYPE html>
<html lang="en">
<head>
<base href="<%= APP_BASE %>">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><%= APP_TITLE %></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet... | HTML | src/client/index.html | prabhatsharma/bwa2 | mit | 1,124 | 48 | codeparrot/github-code |
3c6673c2ae43aa06bfe306c1a597c14899a3e2e87e0aaf88924bd58cb0215fb6 | /*
The MIT License
Copyright (c) 2004-2016 Paul R. Holser, Jr.
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, mod... | Java | src/test/java/joptsimple/WAsAbbreviationForLongOptionTest.java | pholser/jopt-simple | mit | 2,229 | 65 | codeparrot/github-code |
f53d029e42bb772a5119bcc28b299be8920c7f6de7891e970db819c532721844 | import isAshElement from '../internals/isAshElement';
import isComponentAshElement from '../internals/isComponentAshElement';
import isAshNodeAshElement from '../internals/isAshNodeAshElement';
import isFunctionAshElement from '../internals/isFunctionAshElement';
import constants from '../internals/constants';
const ... | JavaScript | src/core/view/createAshElementTree.js | Datanautika/ash | mit | 3,258 | 105 | codeparrot/github-code |
863c14e3154a76a000f8c691adcd1c9994becd60d3ff8a2d88a1cb2c07e7f204 | <?php
/**
* includes/skins/template/gradient.php
*
* Thanks to the valuable class by Ozh (gradient.class.php) this file, when called,
* outputs a PNG gradient with the given parameters. It should be called directly
* from the browser as an image with the optional GET variables:
* height, width, start, end, typ... | PHP | includes/skins/template/gradient.php | hoonsbara/msc-assets | mit | 2,321 | 104 | codeparrot/github-code |
7b7e6b9691a06215293e5ce2dbe821725bc9e4b8a8accbbb4d5323505b5d3d51 | package se.mah.elis.services.storage.query.test;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import se.mah.elis.services.storage.exceptions.StorageException;
import se.mah.elis.services.storage.query.UserPredicate;
import se.mah.elis.services.storage.quer... | Java | storage api/src/test/java/se/mah/elis/services/storage/query/test/UserPredicateTest.java | iotap-center/elis-platform | mit | 3,377 | 140 | codeparrot/github-code |
f1046062d49bbfee7f037fec3455065553eca4392cc95523c5e775fe7f5a311a | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>goedel: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.03.0-2.0.5/released/8.7.1/goedel/8.5.0.html | coq-bench/coq-bench.github.io | mit | 7,201 | 177 | codeparrot/github-code |
cc016ddf3ae485a00edad9d539394df0c5b6e4663e991e37d268d1d119f50456 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mtac2: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.09.1-2.0.6/released/8.8.0/mtac2/1.4+8.14.html | coq-bench/coq-bench.github.io | mit | 6,982 | 170 | codeparrot/github-code |
3a2248e712a188154e5792cf465e95b504806a7944235622d8c8066710a7fe80 | /**
* Utility Functions
*/
// Dependencies
var _ = require('underscore');
// Module Exports
var utils = module.exports = {};
/**
* Marshall a Config Object into a PG connection object
*/
utils.marshalConfig = function(config) {
return _.extend(config, {
host: config.host,
user: config.user,
passw... | JavaScript | lib/utils.js | GuimieSoft/sails-postgresql | mit | 6,914 | 329 | codeparrot/github-code |
1598fdc19c04ff54670f6c11405edd22ef17e52008ce99d5d33084a7faefa100 | #!/usr/bin/env python3
import os
import sys
import math
from colorsys import hsv_to_rgb
from random import random
from hippietrap.hippietrap import HippieTrap, ALL, NUM_NODES
from hippietrap.color import Color, ColorGenerator, random_color, hue_to_color
from hippietrap.geometry import HippieTrapGeometry
from hippietra... | Python | software/patterns/sweep_two_color_shift.py | mayhem/led-chandelier | mit | 1,663 | 56 | codeparrot/github-code |
c5fd0cb144588c1445b49aa66416d55cd63f13ce708e7ac0493ecac82d74121a | <?php
#use PhpOffice\PhpWord\PhpWord;
/**
* @Leo
* 这是一次性得到所有被试的所有相关数据的方法,解决的是多次访问数据库造成的数据库连接阻滞。本程序设计原则,与数据库连接次数越少越好,放弃在内存方面的优势。
* 文件名EFB=ExcelExport ForZip ByLeo
* 相关的数据结构作者会尽量在/test/test4中保留查看功能,方便阅读
*/
require_once("../app/classes/PHPExcel.php");
class EFB extends \Phalcon\Mvc\Controller{
#从数据库中一次查询所有... | PHP | app/library/EFB.php | liuhenghaha/Questionnaire | mit | 85,442 | 1,980 | codeparrot/github-code |
8df294d4a9c15dcaa66b59f06dd334c4b68d13d1dfe9808c19be83b5d8daf241 | package ch.spacebase.openclassic.api.block.physics;
import ch.spacebase.openclassic.api.block.Block;
import ch.spacebase.openclassic.api.block.BlockFace;
import ch.spacebase.openclassic.api.block.VanillaBlock;
import ch.spacebase.openclassic.api.block.physics.BlockPhysics;
/**
* Physics used in falling blocks like s... | Java | src/main/java/ch/spacebase/openclassic/api/block/physics/FallingBlockPhysics.java | good2000mo/OpenClassicAPI | mit | 1,263 | 48 | codeparrot/github-code |
540e774c5b32f13172b39c2170060b8db0e552e0fbcc182af610f21b3312b4d1 | package cz.muni.fi.pb162.project.demo;
import java.awt.Graphics;
import java.awt.Polygon;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JFrame;
import javax.swing.JPanel;
import... | Java | iteration-09/src/main/java/cz/muni/fi/pb162/project/demo/Draw.java | XuuRee/java-pb162 | mit | 16,920 | 444 | codeparrot/github-code |
d5b36e7ed24c865c24a8a15712b5ce06006ca02dd7390f411784f8f1ac44549f | /*!
* Bootstrap v3.3.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
var version = $.fn.jquery.split... | JavaScript | auctionhouse/js/bootstrap.js | Alex92rus/COMP3013Databases | mit | 67,160 | 2,321 | codeparrot/github-code |
1129c54af22d96ee454fa30a391588c887121e48135ddfc3d49d19864b1cfee6 | package log
import (
"encoding/json"
"os"
"strings"
"sync"
"time"
)
const (
LevelTrace = iota
LevelDebug
LevelNotice
LevelWarn
LevelFatal
)
const (
DefaultKey = "DefaultKey"
DefaultLogId = "000000000000"
DefaultAppTag = "DefaultAppTag"
)
// map TRACE, DEBUG, NOTICE, WARN, FATAL to 0, 1, 2, 3, 4
var... | GO | log/milog.go | wangjild/go-mysql-proxy | mit | 5,084 | 253 | codeparrot/github-code |
82cc6a844387a5dad116ac6488d7cfe10c8bc39d168ab895bde74a8d71fee4f3 | <?php
return [
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be... | PHP | config/app.php | myscreen014/portfolio | mit | 8,999 | 226 | codeparrot/github-code |
7c6d98d1b05e1d34118390b3cc9578c49e051adc4fffbf4dc9fc78582355abc3 | using System;
using System.Windows;
using System.Windows.Controls;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IMB3;
using IMB3.ByteBuffers;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.IO;
namespace SessionsEvents
{
public class Sessions
{
... | C# | framework/csCommonSense/Plugins/USDomainPlugin/SessionsEvents.cs | TNOCS/csTouch | mit | 12,742 | 397 | codeparrot/github-code |
fac0cbc9ffbf2919d402190e9fd6b677b85cc7ce389f01d7b983ef9615f2ce6d | <?php
/**
* Created by PhpStorm.
* User: kargnas
* Date: 2017-06-30
* Time: 06:34
*/
namespace RiotQuest\Dto\Match\Timeline;
use RiotQuest\Dto\BaseDto;
class MatchParticipantFrameDto extends BaseDto
{
/** @var int */
public $totalGold;
/** @var int */
public $teamScore;
/** @var int */
pub... | PHP | src/Dto/Match/Timeline/MatchParticipantFrameDto.php | opgginc/php-riotapi-request | mit | 636 | 35 | codeparrot/github-code |
09cab90ad280810a87954420d55218172356806d15cc6edee34c2dbeb498cd59 | <?php
/**
*
*/
class AdobeDigitalMarketing_Cli
{
const VERSION_MAJOR = 0;
const VERSION_MINOR = 1;
const VERSION_PATCH = 0;
private $supported_commands = array('authorize', 'request', 'profile');
private $parser;
public function __construct()
{
$this->parser = new AdobeDigitalMark... | PHP | lib/AdobeDigitalMarketing/Cli.php | garyr/marketing-cloud-php-sdk | mit | 13,754 | 394 | codeparrot/github-code |
5ef98cad0a8350c244601a2d5b7e6f0f1a39b4c8e19b2e5022fae652de450673 | def get_monyear( fn ):
'''
specialized function to split the filename
pattern of SNAP data and extract
year and month information from it.
'''
fn, ext = os.path.splitext( fn )
return fn.split( '_' )[-2:]
def get_decade( fn ):
''' get decade from snap-style filename '''
month, year = get_monyear( fn )
retur... | Python | snap_scripts/epscor_sc/derived_grids_decadal_monthlies.py | ua-snap/downscale | mit | 5,009 | 149 | codeparrot/github-code |
6ee0d7b53af599be36fddc3e28a1e432798809ff9bbbc13524ecf58bcc7fd2ac | # -*- coding: utf-8 -*-
"""
@author: Chenglong Chen <c.chenglong@gmail.com>
@brief: base class for feature generation
"""
import os
import sys
import numpy as np
import config
from config import TRAIN_SIZE
from utils import np_utils, pkl_utils
# Since we have many features that measure the correlation/similarity/... | Python | Code/Chenglong/feature_base.py | ChenglongChen/Kaggle_HomeDepot | mit | 8,989 | 187 | codeparrot/github-code |
ae32a46c77fa59e5c0f3029cf3d090dd89e2d5fd681451571f7a4e73d162f735 | package com.picscout.depend.dependency.classes;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import com.picscout.depend.dependency.interfaces.IProject;
import com.picscout.depend.dependency.interfaces.IProjectStore;
import javax.inject.Singleton;
/**
* Save projects mapped by guid and... | Java | dependency/src/main/java/com/picscout/depend/dependency/classes/ProjectStore.java | foromer4/netdepend | mit | 1,601 | 64 | codeparrot/github-code |
3163d2f74ee23a71fee834e7cfbe925b7835c76654894547d1fdffea651ff628 | $script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util'
Import-Module -Name $script:SPDscUtilModulePath
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[... | PowerShell | SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 | PowerShell/xSharePoint | mit | 11,071 | 326 | codeparrot/github-code |
df1570685d0ce8f646f4ce28c79cf56a730764f0ada9fe9ebc8948690322cc21 | /* Copyright (c) 2003-2014 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "nfs-workarounds.h"
#include "index-mail.h"
#include "maildir-storage.h"
#include "maildir-filename.h"
#include "maildir-uidlist.h"
#include "maildir-sync.h"
#include <stdio.h>
#include <stdlib.... | C | src/lib-storage/index/maildir/maildir-mail.c | jwm/dovecot-notmuch | mit | 22,863 | 805 | codeparrot/github-code |
948e914078173b6004ba1dfa53a758e2b07083db1023dcf00f98017347136d4c | <?php
// File counts
$list = 500;
// JSONP callback
$cb = empty($_GET['callback']) ? 'callback' : $_GET['callback'];
// JSON header
header('Content-Type: application/json');
// Get given song ids
function get() {
// Check empty
$s = $_GET['s'];
if (empty($s)) {
return '';
}
// 123,456
... | PHP | list.php | kainliu/Luaner | mit | 834 | 46 | codeparrot/github-code |
f2ad9fa6156322ccff8c9ca433ed1277b0921f4be7cf4b4d3bf56c5a5eec0868 | #include "mex.h"
#include <float.h>
#include <memory.h>
#include <math.h>
#include "matrix.h"
#include <iostream>
#include <vector>
typedef unsigned int uint;
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
/* Input parameters
C [ h x w x D] (double)
roffset [ K x ... | C++ | preprocess/gsc/cpp/mex_setupTransductionGraph.cpp | aosokin/highOrderLosses_eccv2014 | mit | 3,008 | 120 | codeparrot/github-code |
b5d4dff6db1098186db1018ae493bc1580aba6b9a3efda555fecc17df51ae06e | package com.bearenterprises.sofiatraffic.utilities.communication;
import com.bearenterprises.sofiatraffic.activities.MainActivity;
import com.bearenterprises.sofiatraffic.constants.Constants;
import com.bearenterprises.sofiatraffic.fragments.FavouritesFragment;
import com.bearenterprises.sofiatraffic.fragments.LinesFr... | Java | app/src/main/java/com/bearenterprises/sofiatraffic/utilities/communication/CommunicationUtility.java | thalvadzhi/Sofia-Traffic | mit | 6,653 | 204 | codeparrot/github-code |
49b0dcab1acc35e4c1abc11a41b5c77d4beec51765b76c101310217fc7688999 | class UsersController < ApplicationController
before_action :require_admin
def new
@user = User.new
end
def create
@user = User.new(user_params)
if @user.save
redirect_to home_path
else
render 'new'
end
end
def edit
@user = current_user
end
def update
@user = cu... | Ruby | app/controllers/users_controller.rb | jgg01/ITPH | mit | 609 | 34 | codeparrot/github-code |
e2b4bd17e5240039a0f2244a5be7dc033c68d327bfa765abb62ecc95f45130de | /*Owner & Copyrights: Vance King Saxbe. A.*//*Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@... | PHP | App/PPL.php | VanceKingSaxbeA/NYSE-Engine | mit | 10,438 | 272 | codeparrot/github-code |
e8f13ac0d18109f72205def662d388e6cbf2b0a5a429ac90344d39677243250c | package mobi.qubits.ex.library.domain.book;
import mobi.qubits.ex.library.domain.commands.RegisterNewBookCommand;
import mobi.qubits.ex.library.domain.events.HotBookEvent;
import mobi.qubits.ex.library.domain.events.LendEvent;
import mobi.qubits.ex.library.domain.events.NewBookRegisteredEvent;
import org.axonf... | Java | src/main/java/mobi/qubits/ex/library/domain/book/Book.java | yizhuan/book-library | mit | 1,948 | 89 | codeparrot/github-code |
08014e66243e414e789c477bdb3ab5fa7965b336a92a5a687f4814d536d0a39a | <?php
namespace Miw\PracticaBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class UserType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options... | PHP | src/Miw/PracticaBundle/Form/UserType.php | 7Alberto7/PruebaSymfony | mit | 1,361 | 55 | codeparrot/github-code |
19138489f37c468f3426d80b888c54d9e3cbd7c12f6be491678a9eda1aef98e8 | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "signverifymessagedialog.h"
#include "ui_signverifymessagedialog.h"
#include "addressbookpage.h"
#include "base58.h"... | C++ | src/qt/signverifymessagedialog.cpp | yolocoin-project/yolocoin | mit | 8,985 | 279 | codeparrot/github-code |
5413b57d1bce4e9d0cb82a7441c7eac2def4b9cd4a9fff285dcdaac40781b9f8 | require "active_model"
class Organisation
include ActiveModel::Model
attr_reader :content_item
HMCTS_CONTENT_ID = "6f757605-ab8f-4b62-84e4-99f79cf085c2".freeze
def initialize(content_item)
@content_item = content_item
end
def self.find!(base_path)
content_item = ContentItem.find!(base_path)
... | Ruby | app/models/organisation.rb | alphagov/collections | mit | 5,072 | 248 | codeparrot/github-code |
912bbbfe198f1236a886a3f83183453f06f87cdb8410077dba9071f573dba272 |
package org.jabref.logic.formatter.bibtexfields;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class RemoveNewlinesFormatterTest {
private RemoveNewlinesFormatter formatter;
@BeforeEach
public void setUp(... | Java | src/test/java/org/jabref/logic/formatter/bibtexfields/RemoveNewlinesFormatterTest.java | JabRef/jabref | mit | 1,143 | 44 | codeparrot/github-code |
6af94f5bcf5922045710e0b445ca33effe27bbbfab2205a14728d418f08ea5fe | package com.otus.alexeenko.l4;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.List;
public class L4 {
private static final long size = 100000L;
public static void main(String[] args) {
System.out.println("Starting pid: " + ManagementFactory.getRuntimeMXBea... | Java | L4/src/main/java/com/otus/alexeenko/l4/L4.java | SCNya/otus-java-2017-04-Alexeenko | mit | 1,046 | 41 | codeparrot/github-code |
2a6c99dbc67f143acabb40384bf16f7e000e7a979355750dfb0569f98bd5a4cc | #include "Game.h"
#ifdef WIN32
#if defined _DEBUG || defined DEBUG
# ifdef _STATIC_CRT
# pragma comment(lib , "../../VS/Output/Debug static CRT/HQEngineRendererD.lib")
# pragma comment(lib,"../../VS/Output/Debug static CRT/HQUtilD.lib")
# pragma comment(lib,"../../VS/Output/StaticDebug static CRT/HQUtilMathD... | C++ | utilities/HQSpritesEditor/main.cpp | kakashidinho/HQEngine | mit | 2,775 | 102 | codeparrot/github-code |
c6e4e8bbddd06fe887826b9db1876a981049611cf3dae639f4f819b0c7851b2c | '''
Created on 10.07.2011
@author: michi
'''
import sys
from PyQt4.QtCore import QObject, QRectF, QPointF, QSizeF, Qt
from PyQt4.QtGui import QTreeWidgetItem, QFontMetrics, QFont, QPrinter
from PyQt4.QtGui import QPalette, QDialogButtonBox, QVBoxLayout, QHBoxLayout
from PyQt4.QtGui import QFormLayout, QGridLayout
f... | Python | ems/qt4/gui/util.py | mtils/ems | mit | 8,464 | 248 | codeparrot/github-code |
43a0ba9292c72a72c4768d4b115a0a1a84a2348919fa1a14c7505081b57314e0 | var elf = require ( "../runtime/runtime" )
, fun = require ( "funargs" )
;
var ParserDSL = elf.Object.clone({
stmt: function (ids, std) {
var args = fun(arguments)
, ids = args.strings()
, std = args.functions()[0]
;
ids.forEach(function (id) {
this.symbol(id).std = ... | JavaScript | lib/parser/dsl.js | pmh/elf | mit | 2,234 | 90 | codeparrot/github-code |
37dc37b1457ce2db20d28b67190a24c04734ac4b418ef38c9e9a9527cdcf1a72 | import React, {Component} from 'react';
import {connect} from 'react-redux';
import _ from 'lodash';
import localization from '../helpers/localization';
import {fetchCustomers, setNavigation} from '../actions';
import CustomersList from '../components/lists/customers_list';
import Command from '../components/commands/c... | JavaScript | src/containers/protected/customers_index.js | hisarkaya/polinsur | mit | 1,430 | 47 | codeparrot/github-code |
316d06a7209c5c4d8b1b3ef8ebafbeb461d612b241a47d9c81c5a1019d72e4bf | package com.mycomp.lob.app.repository;
import com.mycomp.lob.app.config.audit.AuditEventConverter;
import com.mycomp.lob.app.domain.PersistentAuditEvent;
import org.joda.time.LocalDateTime;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository;
imp... | Java | src/main/java/com/mycomp/lob/app/repository/CustomAuditEventRepository.java | sunilp/spring-angular-way | mit | 2,502 | 61 | codeparrot/github-code |
307fb7c74c218ac2d3ffdd9cd3e277b2361518f8eed8f9aee94fb9936a667719 | # Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
class AspectMembershipsController < ApplicationController
before_action :authenticate_user!
respond_to :html, :json
def destroy
aspect = current_u... | Ruby | fetched_code/ruby/aspect_memberships_controller.rb | rokn/Count_Words_2015 | mit | 2,531 | 83 | codeparrot/github-code |
9eed6adb4576da9336e3840f12d9b30061ed75cdb15c8188cdc9218e8f66120d | import assert from "assert";
import sinon from "sinon";
import declareFunc from "../../../src/scapi/utils/declareFunc";
describe("scapi/utils/declareFunc(propDefs, fn)", () => {
it("should apply given arguments", () => {
const fn = sinon.spy();
const gen = declareFunc([ [ "a", 0 ], [ "b", 1 ], [ "c", 2 ] ], ... | JavaScript | test/scapi/utils/declareFunc.js | mohayonao/neume | mit | 946 | 36 | codeparrot/github-code |
d698f10458112cedf8266ca6a189d1ef42461b3156bc700fc859e397fe803ddb | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>站内搜索,(SELECT (CASE WHE... | HTML | wp-content/cache/wp-cache-ba8b026c0f6e4d74c4d8fe4f985ac974.html | me115/me115.github.io | mit | 33,527 | 365 | codeparrot/github-code |
9ea3c47a246a3c89e7464989b8e3dea13202a9238a17e8303c0c11657f176997 | -- Database strucutre for SAL PLUS update
-- Copyright : Luis E. S. Dias 2013
-- smartbyte.systems@gmail.com
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Table structure for table `aditivos_contratos`
--
CREATE TABLE IF NOT EXISTS `aditivos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`numer... | SQL | salplus-database-update.sql | luisdias/sal-plus | mit | 10,517 | 295 | codeparrot/github-code |
9c6b016b0b2a548a53eee4966a04d61b53a05d6f704d97ad7376e4b74451abb2 | /* global describe,it */
'use strict'
let Addr = require('../lib/addr')
let should = require('chai').should()
describe('Addr', function () {
it('should exist', function () {
should.exist(Addr)
should.exist(new Addr())
})
describe('#toBuffer', function () {
it('should convert an addr to a buffer', fu... | JavaScript | test/addr.js | ryanxcharles/fullnode | mit | 1,703 | 56 | codeparrot/github-code |
5a95744cac5212e47ee73aa1b9b99762f574bd2ee53b69f43af5870ecccc54f5 | #!/usr/bin/env python
import os
import argparse
from urlparse import urlparse
import redis
from termcolor import cprint
DEBUG = os.environ.get("DEBUG")
DRY_RUN = os.environ.get("DRY_RUN")
CLEAN_UP = os.environ.get("CLEAN_UP")
if os.environ.get("REPLACE_DST_KEYS"):
REPLACE_DST_KEYS = True
else:
REPLACE_DST_KE... | Python | redis-migrate/migrate.py | artsy/docker-images | mit | 3,144 | 105 | codeparrot/github-code |
501c9b9d4c09c9a142ae2829dab0b025dfa4ee8cf87377f708a3e38567f020d6 | require 'twitter/json_stream'
require "logger"
require "json"
require 'ostruct'
module Hope
class Source::Twitter < Hope::Source::Base
class TwitterUser < Hope::EventType
def self.properties
{
"protected" => "bool",
"default_profile" ... | Ruby | lib/hope/source/twitter.rb | sbellity/hope | mit | 4,933 | 123 | codeparrot/github-code |
865bfac0224009a7de044b337b043e084cbd7c0ea045ea883a923fc061430bfe | % Master File: project-doc.tex
% Document Type: LaTeX
% Document Previewer: xdvi -margins 1.5
\documentclass{article}
%\documentstyle[12pt]{article}
\addtolength{\textheight}{0.5in}
\addtolength{\topmargin}{-0.25in}
\addtolength{\textwidth}{1.0in}
\addtolength{\oddsidemargin}{-0.5in}
\thispagestyle{empty}
\title{%arti... | TeX | project-doc.tex | OS2World/DEV-FORTRAN-UTIL-ftnchek | mit | 20,220 | 492 | codeparrot/github-code |
1801e330df2ab7b142cab91916c68845a919ac4fa45118318f96b00262b9924a | import { inspect } from 'util'
import { testing } from 'bs-logger'
import set from 'lodash.set'
import { backportJestConfig } from './backports'
const logger = testing.createLoggerMock()
const logTarget = logger.target
beforeEach(() => {
logTarget.clear()
})
describe('backportJestConfig', () => {
const makeTes... | TypeScript | src/utils/backports.spec.ts | kulshekhar/ts-jest | mit | 1,681 | 57 | codeparrot/github-code |
c3680651972d547f0c302e87a64ba8d27ec0faf4603a95dc88b79b9262a08645 | package net.respectnetwork.csp.application.csp;
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
* Container for CSP and CloudName
*/
public class CSPCloudName implements Serializable{
private static final long serial... | Java | src/main/java/net/respectnetwork/csp/application/csp/CSPCloudName.java | RespectNetwork/csp-provisioning-application | mit | 1,839 | 76 | codeparrot/github-code |
7796a52bf4d380aa3dce690dccb1028b0bdae42b1928f26cb98c0b409f57d065 | <?php
/**
* Theme
*
* @package Theme
* @version 6.0
*/
class Theme extends ToolkitBase
{
protected $sName;
protected $sPath;
protected $sUrl;
protected $oLayout;
protected $layoutClass = 'ThemeLayout';
protected $actionViewClass = 'ActionView';
protected $componentTemplateClass =... | PHP | src/Theme/Theme.class.php | ruxon/framework | mit | 2,429 | 107 | codeparrot/github-code |
496295492d280672a279b97b9b37e59732657033b638dabfb3ddb63d9db4de02 | "use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... | JavaScript | rules/utils/Scope.js | PerkdAS/tslint-perkd-rules | mit | 3,650 | 85 | codeparrot/github-code |
5707231a7d1420527ea9a9d0ea9856aa94d132a0e49f2d12b8740d4f47d15931 | /*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* 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 l... | Java | core/src/main/java/hudson/model/StreamBuildListener.java | vivek/hudson | mit | 2,768 | 83 | codeparrot/github-code |
aaa93b79b8a2478309664ee0a383875783bc825034f55262ddcd5b55c21e387d | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hardware: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.10.1-2.0.6/released/8.12.0/hardware/8.9.0.html | coq-bench/coq-bench.github.io | mit | 7,094 | 175 | codeparrot/github-code |
ab16df523fe40b9dd9f27c8cea436049bc0ac1eb0fa8b6fa888511fa4fb807af | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ruler-compass-geometry: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../boots... | HTML | clean/Linux-x86_64-4.11.1-2.0.7/released/8.11.1/ruler-compass-geometry/8.5.0.html | coq-bench/coq-bench.github.io | mit | 7,283 | 176 | codeparrot/github-code |
7d979191f940b45b594f66ae0162023ef15d2553886434e04f4c92e206b917e2 | from keras.layers.core import Layer
from keras import initializers, regularizers, constraints
from keras import backend as K
def dot_product(x, kernel):
"""
Wrapper for dot product operation, in order to be compatible with both
Theano and Tensorflow
Args:
x (): input
kernel (): weights... | Python | src/models/attentionBis.py | jeammimi/deepnano5bases | mit | 3,736 | 105 | codeparrot/github-code |
c63ecbd5001076a591c11222b94dbc14cded79a2f8c24909799cb7423528dbda | module MultiConfig
# This module encloses implementations for multiple ORMs
module ORMs
# Implementation for the ActiveRecord ORM
module ActiveRecord
# Method called when the module is included.
# * +mod+ - Name of the class including this module.
# Calls mod.extend with param ClassMethods... | Ruby | lib/multi_config/orms/active_record.rb | shadabahmed/multi_config | mit | 4,863 | 98 | codeparrot/github-code |
37de1655cb155cdd8f39463e66d832601988f7586d8ed76d8f42f3e656bca12b | <?php
/**
* User: Alexander Kononenko <contact@hauntd.me>
* Date: 06.05.15
* Time: 10:51
*/
namespace hauntd\basketjs;
use yii\helpers\Json;
use yii\web\AssetBundle;
use yii\web\View;
class BasketAssetBundle extends AssetBundle
{
/** @var bool */
public $useFromCDN = true;
/** @var string */
pub... | PHP | BasketAssetBundle.php | hauntd/yii2-basketjs-asset | mit | 1,514 | 65 | codeparrot/github-code |
edc161275d271585d976696aaedf2201a35fa31908f21a28d4811ace4e4b6892 |
/**
* Copyright (c) blueback
* Released under the MIT License
* https://github.com/bluebackblue/brownie/blob/master/LICENSE.txt
* http://bbbproject.sakura.ne.jp/wordpress/mitlicense
* @brief デバッグメニュー。
*/
/** include
*/
#include <bsys_pch.h>
/** include
*/
#pragma warning(push)
#pragma war... | C++ | source/bsys/windowmenu/windowmenu_window_closebutton.cpp | bluebackblue/brownie | mit | 4,044 | 201 | codeparrot/github-code |
b9ef35d0ef0ccc1e108dcd31f02021c4934913965bbda7813428c2844a189820 | #ifndef INTERN_OPTIMIZE_H_
#define INTERN_OPTIMIZE_H_
#include "strings.h"
struct strings_frequency;
// Create a new, optimized string repository which stores the most frequently
// seen strings together. The string with the lowest ID (1) is the most
// frequently seen string
struct strings *strings_optimize(struct ... | C | optimize.h | chriso/intern | mit | 1,109 | 31 | codeparrot/github-code |
3cb8e285416e8b041a2ef3d6289c635eceaba0550829e46f80fea04dc8013b0f | #region License
// The MIT License
//
// Copyright (c) 2011 Julien Blin, julien.blin@gmail.com
//
// 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 ... | C# | src/Colombo/CacheSegmentAttribute.cs | julienblin/Colombo | mit | 5,350 | 117 | codeparrot/github-code |
727928b32d7daaae0c6d1dd08048d695638e6118208d374dfbe14e8727c2f855 | (function() {
'use strict';
angular
.module('login.module')
.controller('LoginController', LoginController);
LoginController.$inject = ['$http', '$scope', '$rootScope', '$ionicUser', '$ionicPush', '$ionicModal', '$state', 'Login', 'Toast'];
/* @ngInject */
function LoginController($http, $scope, $r... | JavaScript | www/app/login/login.controller.js | Laylan/E-sim | mit | 4,437 | 156 | codeparrot/github-code |
fd87ad24b75e5264ca707865e388bfe8d67c60c9ee976e69ffbfbaa9ba586b05 | <?php
/**
* Created by haoyiguan.
* User: lele
* Date: 2017/6/4 0004
* Time: 16:14
*/
namespace app\index\controller;
use think\Controller;
use think\Db;
class Login extends Controller
{
//显示登陆页面
public function showLoginPage () :string {
return $this->fetch('',['title'=>'登陆']);
}
... | PHP | application/index/controller/Login.php | MengDianYun/haoyiguan | mit | 873 | 48 | codeparrot/github-code |
21125c0be801ee806c46077c6a949cfc3c7b3ae34db896837a5f09990ab43964 | using System;
namespace TodosLosEventos
{
public class Fuga : Evento
{
System.Random rnd = new System.Random();
int fugado;
int maxFugado;
public Fuga()
{
Nombre = "Air leak";
FechaInicio = GestorTiempo.fechaActual;
}
public override void Inicio()
{
/* TODO
* Mostrar una interfaz con... | C# | Assets/Scripts/Eventos/Fuga.cs | Heber94/Settler | mit | 1,534 | 78 | codeparrot/github-code |
db7de65a34c8ff7a9bda06951b6e3c97d8bc935a65e201eb952a9846bbf6b31e | <?php
namespace Victoire\Bundle\TemplateBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Compon... | PHP | Bundle/TemplateBundle/Controller/TemplateController.php | MadeWilson/victoire | mit | 6,520 | 195 | codeparrot/github-code |
36292319efeeea0a4c2d1f9f142a04a30103801fc83c16b420f14b99b5e3a444 | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ParameterActive | klf-200-api</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../as... | HTML | docs/enums/_klf200_api_gw_command_.parameteractive.html | MiSchroe/klf-200-api | mit | 26,356 | 477 | codeparrot/github-code |
ce8f6bba4d2f71f0f716b8f30b3b6401b717b0e012dd881b1216611bec5f5adf | require_relative 'constants'
require_relative 'parser/stock_parser'
require_relative 'parser/currency_parser'
require_relative 'api_helper'
require_relative 'format_helper'
class CommandHandler
include FormatHelper
include ApiHelper
def initialize
@currency = CurrencyParser.new(CURRENCY_PATH)
@stock = S... | Ruby | src/command_handler.rb | sohwendy/telegram-bot-kabushiki | mit | 1,749 | 66 | codeparrot/github-code |
0cf1e6f3210c210a192127378bd6ac2d6caf6e4da1b13cc0e4622189c10a9acc | /* jshint node:true, esnext:true */
/* global window: false */
/**
@module utilities
@submodule http
*/
/**
Helper functions to generate standard HTTP requests using the
[xhr](https://www.npmjs.com/package/xhr) npm module.
All methods return a Promise.
It is integrated with the rendering engine so that upon complet... | JavaScript | js/component/http.js | Satyam/CTC | mit | 8,539 | 239 | codeparrot/github-code |
3aaae2bb0ee8737d3cc4a509cb00f0495cf884f75460b5192dd8c09a322ae683 | var gulp = require('gulp')
var requireDir = require('require-dir')
var assign = require('lodash.assign')
var gutil = require('gulp-util')
var chalk = require('chalk')
var prettyTime = require('pretty-hrtime')
var path = require('path')
var defConfig = require('./_gulps/config')
module.exports = {
gulp: gulp,
config:... | JavaScript | lib/main.js | dolymood/bifypack | mit | 2,532 | 110 | codeparrot/github-code |
29fba059dd40e931b74395f5f5658cb16987befbad929e2233ce6c22f2c96107 | var fs = require('fs');
var path = require('path');
exports.generate = function (groupsFile,reportFile,testtype) {
var config_reader = require(path.join(__dirname, '../../'+groupsFile));
var tests = config_reader.configure[testtype]["specs"];
var devices = config_reader.configure[testty... | JavaScript | builder.js | raghulraj/protractor-multicapabilities-builder | mit | 2,366 | 69 | codeparrot/github-code |
1ed43171ac7ccaa80af2087727c8cce424bfdf358faf66feb526d9b3c7a60e87 | package gis.iwacu_new.rit.edu.main.tracks;
import java.util.ArrayList;
import android.location.Location;
/**
* @author taiyuchen, TYTung
* @version 0.1
*/
public class ParsedDataSet {
private String trackName;
private String trackDescription;
private String trackStartGMTTime;
priva... | Java | app/src/main/java/gis/iwacu_new/rit/edu/main/tracks/ParsedDataSet.java | btomaszewski/Iwacu | mit | 1,979 | 73 | codeparrot/github-code |
5cca10f2c3456812c1befb3f05603e9f60e805e1c87caeafbdb2d20529243ef9 | /*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2012, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following condition... | C | ThirdParty/assimp/src/OgreBinarySerializer.h | spetz911/almaty3d | mit | 15,438 | 422 | codeparrot/github-code |
361c9b0e19a1d6b98521c486461ad386cd8f2821b3652f1332fd4db60153a15b | use rocket::http::RawStr;
use rocket::request::FromParam;
use diesel::backend::Backend;
use diesel::deserialize::{self, FromSql};
use diesel::serialize::{self, Output, ToSql};
use diesel::sql_types::Integer;
use super::schema::{measurements, sensors};
use super::MeteoError;
use crate::db::models::Node;
use crate::u... | Rust | server/src/meteo/models.rs | mour/ratfist-server | mit | 2,964 | 107 | codeparrot/github-code |
c1f6f91f50d999fc115986651cb930faeae5ae020cb686f3f3e250bd4d9ad92a | /* TETRIS Queen
* Copyright (C) 1999, 2000, 2001 David Capello
*
* This file is released under the terms of the MIT license.
* Read LICENSE.txt for more information.
*/
#ifndef PIECE_H
#define PIECE_H
struct PLAYER;
#define MAX_PIECES 7
#define PIECE_BUFFER_SIZE 0x8000
#define ROT_0 ... | C | src/piece.h | dacap/tetrisqueen | mit | 889 | 45 | codeparrot/github-code |
016b90602a0f24755593715278043a5876e2f4ae9cb8a401dabc1b75035aace3 | <?php
namespace Cardinity\Method\Payment;
use Cardinity\Method\ResultObject;
class PaymentInstrumentRecurring extends ResultObject implements PaymentInstrumentInterface
{
/** @type string Id of the approved payment in the past.
Same card will be used to create a new payment. */
private $paymentId;
... | PHP | src/Method/Payment/PaymentInstrumentRecurring.php | cardinity/cardinity-sdk-php | mit | 689 | 32 | codeparrot/github-code |
74cc8fca02f3e9122229b7b84b2e61cac41760e0439e5324d8244b68f4ac08a7 | #include "common/mysql_helper.js"
var DESCRIPTION="This advisor calculates the percentage of threads_created over threads_cached and"
" adjust the thread_cache_size automatically based on the running workload.";
var UPPER_LIMIT=16384;
var INCREMENT = 256;
var DECREMENT =256;
function needsTuning(host... | JavaScript | s9s/mysql/auto_tuners/thread_cache.js | severalnines/s9s-advisor-bundle | mit | 4,281 | 120 | codeparrot/github-code |
1d0be02ccc1b10afe23917a885966b9f112733f59b2eb53f443b77d7ce072d3f |
let data, focus, g, gAxis, x, y;
const keys = ["amortization", "interest"];
const area = d3.area()
.x(d => x(d.data.date))
.y0(d => y(d[0]))
.y1(d => y(d[1]));
const line = d3.line()
.x(d => x(d.data.date))
.y(d => y(d[1]));
const nettline = d3.line()
.x(d => x(d.date))
.y(d => y(d.net... | JavaScript | src/js/chart/chart.js | nl-hugo/hypotheek-calculator | mit | 3,207 | 120 | codeparrot/github-code |
7424cde2f32c1f10b21ddd846a7b891c30de5d1c63701be3a2d944fd11948038 | /*******************************************************************************
* Copyright (C) 2009 Human Media Interaction, University of Twente, the Netherlands
*
* This file is part of the Elckerlyc BML realizer.
*
* Elckerlyc is free software: you can redistribute it and/or modify
* it under the terms of ... | Java | HmiGraphicsTest/src/hmi/graphics/colladatest/TorusBuffered.java | jankolkmeier/HmiCore | mit | 5,447 | 145 | codeparrot/github-code |
8669a07378162af170fe5548658327533d712ec6688ae4f1f0f8a867c51a8bf1 | <?php
/**
* Kazinduzi Framework (http://framework.kazinduzi.com/)
*
* @author Emmanuel Ndayiragije <endayiragije@gmail.com>
* @link http://kazinduzi.com
* @copyright Copyright (c) 2010-2013 Kazinduzi. (http://www.kazinduzi.com)
* @license http://kazinduzi.com/page/license MIT License
* @package Kazi... | PHP | library/Image/Gd/Editor.php | kazinduzi/kasoko | mit | 17,523 | 549 | codeparrot/github-code |
e9ea6469c4df4f7250518804aeec167751f5b90f1f09669a15536ea3b749ef13 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicObserver.Backfire.Observer {
public class APIDictionary : IReadOnlyDictionary<string, APIBase> {
private readonly IDictionary<string, APIBase> dict;
public APIDictionary()
... | C# | ElectronicObserver/Backfire/Observer/APIDictionary.cs | CNA-Bld/ElectronicObserver | mit | 1,896 | 87 | codeparrot/github-code |
fd6da07c860eb814233ae4627ac1bbe1d62005a4bdac36f136a1c42d76a2e2c7 | <?php
/*
* Copyright 2017 Jack Sleight <http://jacksleight.com/>
* This source file is subject to the MIT license that is bundled with this package in the file LICENCE.md.
*/
namespace Chalk;
use Chalk\Chalk;
use Chalk\Ref;
use Chalk\Entity;
use Closure;
use Coast\Url;
use Coast\Resolver as CoastResolver;
class R... | PHP | app/library/Resolver.php | jacksleight/chalk | mit | 2,942 | 100 | codeparrot/github-code |
bdef62096dd3d87b1147e2ecaf9d7702ac3f36c888df36b8e7090dac5b2c3ebe | from django.http import HttpResponse
from django.shortcuts import render, get_object_or_404, redirect
import numpy
from .admin import RoundReportResource, TeamResource, CompetitionResource
from .forms import TeamForm, RoundReportForm, CompetitionForm, CompetitionSelectForm
from .models import Team, RoundReport, Competi... | Python | scattergun/scattergun_coreapp/views.py | Team4761/Scattergun | mit | 8,417 | 215 | codeparrot/github-code |
60d757c0d6f8bd42f497c1f4c813b94fc6c7117b0d45aa0ab3f8cca9425d2f02 | #ifndef MT_OSL_UTILS_H
#define MT_OSL_UTILS_H
/*
OSL and maya projection nodes have a problem.
A projection node normally works this way:
- Calculate the projection of a point
- Calculate the new uv's
- Get the image based on these new uv's
In OSL this is not possible. Modifying the uv's and evaluate
an ima... | C | src/common/cpp/osl/oslUtils.h | haggi/OpenMaya | mit | 9,092 | 309 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.