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 |
|---|---|---|---|---|---|---|---|---|
5f31efd6c385efaaf57b218aaf951f61bd1185a98a52805391fa1f225382b270 | this.osc = {};
(function(exports) {
exports.path = function() {
var path = {};
path.vals = [];
path.append = function(freq) {
path.vals.push(freq);
return this;
};
return path;
};
exports.create = function(context) {
var osc = {};
osc.raw = context.createOscillator();
osc.raw.connect(context.... | JavaScript | lib/osc.js | KarlGl/audio | mit | 582 | 35 | codeparrot/github-code |
e0136bcd3d7d549a4e0c75273855799e2d16b1e9bd5160a5984bbdbc61644c36 | //========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Special handling for hl2 usable ladders
//
//=============================================================================//
#include "cbase.h"
#include "gamemovement.h"
#include "in_buttons.h"
#include "func_ladder... | C++ | game_shared/hl2/hl_gamemovement.cpp | TotallyMehis/ZM-Updated | mit | 34,011 | 1,279 | codeparrot/github-code |
0c6c11c0774c5c71050408900ae5525e55569bd0b58acfab082cf1b5355ee072 | /* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
t... | C | resources/Pmachine/pmachine.tab.h | arminnh/c-to-p-compiler | mit | 3,690 | 140 | codeparrot/github-code |
d97d523886546d1ea7a600f8ac31825cb38123b9a9fccb6f01cbf4213af89408 | // @flow
import type {
ConfigAction,
ChangeNodeAction,
ChangeLanguageAction,
ChangeGasPriceAction
} from 'actions/config';
import { languages, NODES } from '../config/data';
export type State = {
// FIXME
languageSelection: string,
nodeSelection: string,
gasPriceGwei: number
};
export const INITIAL_ST... | JavaScript | common/reducers/config.js | dyfvicture/LoopringWallet | mit | 1,236 | 59 | codeparrot/github-code |
bfce7e50cd4c6991b86228f9b0883db991aaeaed310f6c6779985e2182d18a48 | <!doctype html>
<html>
<head>
<title>Socket.IO chat</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font: 13px Helvetica, Arial;
}
form {
background: #000;
... | HTML | animation.html | PranavManiar/xIDStory | mit | 5,919 | 215 | codeparrot/github-code |
1e7f5857710c44ff62d78bf22495748ea3f8c50c505a53bc62aafe12586eac5e | import { useCallback, useContext } from 'react';
import { useMutation } from '@apollo/react-hooks';
import gql from 'graphql-tag';
import { t } from 'ttag';
import Dialog from '@material-ui/core/Dialog';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import useCurrentUser from 'lib/useCurrentUser';
impo... | JavaScript | components/NewReplySection/index.js | cofacts/rumors-site | mit | 4,509 | 174 | codeparrot/github-code |
ec2b081611f672a813bf98bae2327ca29e23741d7047a7264312d030764ddeef | using Markdig;
using Markdig.Extensions.Tables;
using Microsoft.Extensions.DependencyInjection;
using System;
using ITGlobal.MarkDocs.Format.Impl.Extensions.Admonition;
using ITGlobal.MarkDocs.Format.Impl.Extensions.Alerts;
using ITGlobal.MarkDocs.Format.Impl.Extensions.ChildrenList;
using ITGlobal.MarkDocs.Format.Impl... | C# | src/ITGlobal.MarkDocs.Markdown/Format/MarkdownOptions.CreateMarkdownPipeline.cs | ITGlobal/MarkDocs | mit | 5,816 | 198 | codeparrot/github-code |
8038acee0ef64111e6d95aa9dd14010c33e7c6e9d1908e820d45f9c979e36846 | #include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <types.h>
#include "boot_information.h"
#include "load_script.h"
#include "symbol_db.h"
static int (*debug_handler)() = NULL;
static int (*print_str_handler)(const char *) = NULL;
static void (*set_str_handler)(const char *) = NU... | C | kernel/src/platform/x86_64/pc/main.c | himanshugoel2797/Cardinal-semicolon | mit | 3,039 | 131 | codeparrot/github-code |
adce6a8b07ff311de8edbdac601d976288c25b3d0a8e0935ff4f793760e8d3d2 | package be
import (
"database/sql"
"fmt"
"os"
"time"
"github.com/coocood/qbs"
_ "github.com/lib/pq" // Needed to make the postgres driver available
)
var NilTime = new(time.Time) // NilTime.Equal(record.field) will reveal whether the timestamp is set
var DBName = os.Getenv("POSTGRES_DB_NAME")
var DBUser = os.... | GO | go/src/podipo.com/skellago/be/db.go | podipo/skellago | mit | 1,954 | 99 | codeparrot/github-code |
55628773c4c7817c249dace8d66f6d5f2e7227dbff40799f78d4ac1054098478 | 'use strict';
import { isQuote } from '@emmetio/stream-reader-utils';
import Token from './token';
import interpolation from './interpolation';
/**
* Consumes quoted string from current string and returns token with consumed
* data or `null`, if string wasn’t consumed
* @param {StreamReader} stream
* @return {St... | JavaScript | lib/tokens/string.js | emmetio/css-parser | mit | 1,672 | 67 | codeparrot/github-code |
6fe402ad2bdf031a30dba80c8fef9a813f3ec1845688e0988874f1b746edf12e | // Package gpx provides convenience types for reading and writing GPX
// documents.
// See http://www.topografix.com/gpx.asp.
package gpx
import (
"encoding/xml"
"fmt"
"io"
"strconv"
"strings"
"time"
geom "github.com/twpayne/go-geom"
"golang.org/x/net/html/charset"
)
const timeLayout = time.RFC3339Nano
// S... | GO | gpx.go | twpayne/go-gpx | mit | 15,955 | 578 | codeparrot/github-code |
85971167b92bf13a043d078e7232c801d4f1b49577d34034b8d4b6193467adbb | package catgirl.oneesama.activity.main.fragments.ondevice.fragments.series.presenter;
import catgirl.oneesama.activity.common.presenter.AutoRefreshableRecyclerPresenter;
import catgirl.oneesama.activity.main.fragments.ondevice.fragments.series.data.SeriesProvider;
import catgirl.oneesama.activity.main.fragments.ondevi... | Java | app/src/main/java/catgirl/oneesama/activity/main/fragments/ondevice/fragments/series/presenter/SeriesPresenter.java | DefiantCatgirl/Oneesama | mit | 1,101 | 32 | codeparrot/github-code |
283e802ae1fe9bd222b2d638c8d75125a1e6ee417d0fc8bdb0972f31b37a10c9 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using ExtensionBlocks;
namespace RegistryPlugin.LastVisitedPidlMRU.ShellItems
{
public class ShellBag0X00 : ShellBag
{
private string _classId;
... | C# | RegistryPlugin.LastVisitedPidlMRU/ShellItems/ShellBag0x00.cs | EricZimmerman/RegistryPlugins | mit | 22,063 | 746 | codeparrot/github-code |
cd1b4c16f3a2a7a5894270b9dc409c8ed9a1376b742cafa4fb44d436310312cc | package cn.jmessage.api.message;
import cn.jiguang.common.connection.HttpProxy;
import cn.jiguang.common.resp.APIConnectionException;
import cn.jiguang.common.resp.APIRequestException;
import cn.jiguang.common.resp.ResponseWrapper;
import cn.jiguang.common.utils.Preconditions;
import cn.jmessage.api.chatroom.ChatRoomH... | Java | src/main/java/cn/jmessage/api/message/MessageClient.java | jpush/jmessage-api-java-client | mit | 12,964 | 275 | codeparrot/github-code |
6c63838fd5df8d1eb07c659aa8801d895a40635a09a1354fd526b6dd8468d716 | // This helper remembers the size and position of your windows (and restores
// them in that place after app relaunch).
// Can be used for more than one window, just construct many
// instances of it and give each different name.
import { app, BrowserWindow, screen } from 'electron';
import jetpack from 'fs-jetpack';
... | JavaScript | src/helpers/window.js | Faithlife/FaithlifeMessages | mit | 2,320 | 85 | codeparrot/github-code |
56237671317df5604a3c4b1412bbff8f5ff7bb22c9ea767aee6e72a4a00fa187 | #! /usr/bin/env ruby
# -*- mode:ruby, coding:utf-8 -*-
require 'mongo'
# --------------------------------------
# Parameter Check
# --------------------------------------
unless RUBY_VERSION >= '1.9.0'
puts 'Please use Ruby 1.9.0 or newer'
exit(1)
end
unless ARGV.length == 1
puts 'Usage: loader.rb data_filena... | Ruby | mongodb-ruby/loader.rb | tatsuya6502/nosql-ja | mit | 2,432 | 111 | codeparrot/github-code |
af2b3c97ddf4cc7d5547feaf17492829436cae15d024b108cd848746f38dd5c5 | import socket
from user_agents import parse
import multiprocessing
import ssl
import sys
from datetime import *
class HTTP_Server(object):
"""This is the http page spoofing Server"""
def __init__(self, bind_address, payloads_folder):
global http_responce, s, html
super(HTTP_Server, self).__init__()
bind_port =... | Python | src/server/server.py | Dylan-halls/Theseus | mit | 2,762 | 109 | codeparrot/github-code |
746b3827921fb0315f99347e1a5da4a8037c1e36fa96e4c28eb4053d8de8891e | using System;
using System.Collections;
using TESUnity.ESM;
using TESUnity.Inputs;
using UnityEngine;
using UnityEngine.UI;
namespace TESUnity.UI
{
public class UIScroll : MonoBehaviour
{
private BOOKRecord _bookRecord;
[SerializeField]
private GameObject _container = null;
[S... | C# | Assets/Scripts/TES/UI/UIScroll.cs | demonixis/TESUnity | mit | 2,159 | 86 | codeparrot/github-code |
1f1db6f9888a0032434073dcb7d7b0ed614b45776c3e5ab7c706491e644e56dd | 'use strict';
/**
* Export shared utilities
*/
const { buildQuery, hasDeepFilters } = require('./build-query');
const parseMultipartData = require('./parse-multipart');
const parseType = require('./parse-type');
const policy = require('./policy');
const templateConfiguration = require('./template-configuration');
co... | JavaScript | packages/core/utils/lib/index.js | wistityhq/strapi | mit | 1,947 | 75 | codeparrot/github-code |
e1b534c04d0dfbc89f5ee47928c92ac865f1fa30b98c64f0cd9b0e93f56e3273 | import deepEqual from "deep-equal";
/*
* stream constructor
* constructor returns a stream
* get the current value of stream like: stream.value
*/
export const stream = function(init_value) {
let s = function(value) {
update(s, value);
return s;
};
s.IS_STREAM = true;
s.value = init_value;
s.listene... | JavaScript | src/utils/streamy.js | faboweb/zliq | mit | 9,603 | 345 | codeparrot/github-code |
8a4cd67bf7c49d90cc15fc2d8f7d8c0f797f95bc6e51cfdd6a960aed4e52be72 | /*
FILE: menu/modal/tapeSet.js
Handles the modal menu for editing the tape set alphabet.
-- elements
Textbox to enter new characters into the tape set alphabet
Save button
Cancel button
-- event
Add new characters
Cancel (handled implicitly by modal.js)
*/
/* Add constants in here. */
gModalMenu.tapeSet = {};
/* ... | JavaScript | menu/modal/tapeSet.js | precup/turing-machine-sim | mit | 835 | 33 | codeparrot/github-code |
38e5186cda4a1a0adf394fcb91c0182069c2930eb2021327db4ddb996ac32905 | 'use strict';
var Utils = require('./utils')
, _ = require('lodash')
, DataTypes = require('./data-types')
, SQLiteQueryInterface = require('./dialects/sqlite/query-interface')
, Transaction = require('./transaction')
, Promise = require('./promise')
, QueryTypes = require('./query-types');
/*
* The inte... | JavaScript | lib/query-interface.js | FredKSchott/sequelize | mit | 31,505 | 937 | codeparrot/github-code |
6151445470b5dd4c9cec039b9173a1da1773e57f38d93915aa9bfec9c4ea587c | <!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="ut... | HTML | examples/deadLinks/ui/app/index.html | daniel-trinh/sprawler | mit | 2,778 | 64 | codeparrot/github-code |
6db2fa10057b7f8eb1ff0ff4b2058b33387eff3b2828e250ddab40493103bb34 | $(function () {
// navigation - scroll to content
$('.navigation .nav a').click(function (e) {
e.preventDefault();
var href = $(this).attr('href');
var name = href.substring(1, href.length);
var targetOffset = $('[name=' + name + ']').position().top;
$('html,body').anima... | JavaScript | src/AppBundle/Resources/public/js/index.js | wehmoen/survey | mit | 3,827 | 88 | codeparrot/github-code |
2540a37c9b4e45fe51bb50a5c0474297efbb7a58aec69ccb5f6aff19b3398187 | <?php
/* ::modulesUsed/navigation.html.twig */
class __TwigTemplate_45f8b3ce7f8bbedad474584ad42fd09357fd07ed3dcdad40ede0cc9429e1d663 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
... | PHP | app/cache/dev/twig/45/f8/b3ce7f8bbedad474584ad42fd09357fd07ed3dcdad40ede0cc9429e1d663.php | thamerbelfkihthamer/EbookShop | mit | 1,074 | 45 | codeparrot/github-code |
ba40f365fdf4a2b389d170ee64edc5a55628b70f54ce15a283b9f25e9146d209 | <?php
namespace Haven\Bundle\CmsBundle\Lib;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Security\Core\SecurityContext;
use Haven\Bundle\CoreBundle\Lib\NestedSet\Manager as NestedSetManager;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Router;
class MenuPer... | PHP | src/Haven/Bundle/CmsBundle/Lib/MenuPersistenceHandler.php | siegfried1e/perso | mit | 5,258 | 141 | codeparrot/github-code |
599f277cdc53e8d31d6da54c939e149a066e11be03e7036acd3dd84b457e07a0 | package com.cmput301f17t07.ingroove.MapActivities;
import android.Manifest;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.PackageManager;
import android.location.Location;
import android.net.Uri;
import android.os.Looper;
import android.provi... | Java | inGroove/app/src/main/java/com/cmput301f17t07/ingroove/MapActivities/MapOptionsActivity.java | CMPUT301F17T07/inGroove | mit | 28,110 | 726 | codeparrot/github-code |
f89f686d9c045b47abaec430f833c7e1dedf035c7c10275314e3be7040f58acb | define("p3/widget/DataItemFormatter", [
'dojo/_base/lang', 'dojo/date/locale', 'dojo/dom-construct', 'dojo/dom-class',
'dijit/form/Button', '../JobManager', 'dijit/TitlePane', './formatter', 'dojo/on',
'dojo/query', '../util/PathJoin', 'dojo/request', 'dojo/when', 'dojo/NodeList-traverse'
], function (
lang, lo... | JavaScript | public/js/release/p3/widget/DataItemFormatter.js | dmachi/p3_web | mit | 52,794 | 1,918 | codeparrot/github-code |
8c2c41f561d226204d6f1488aba3cb30bb36cd39f15a214da5275d0e5fd0f533 | // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/bitcoinunits.h>
#include <QStringList>
BitcoinUnits::BitcoinUnits(QObject *parent):
QAbstractListModel... | C++ | src/qt/bitcoinunits.cpp | namecoin/namecore | mit | 6,106 | 233 | codeparrot/github-code |
f154ed904d150634c2ee954af94b182b07c712391880a7f7f7682c2f1f8b46a4 | <!DOCTYPE HTML>
<html lang="en-US" class="fade">
<!--
^ You can control a few things with the <html> element's classes:
"fade" - smooth fade between slides
"nonumbers" - remove the slide numbering after the progress bar
-->
<head>
<title>Firefox OS - User experience & design guidelines</title>
<!--
... | HTML | make_app.html | OlavHN/shower | mit | 14,915 | 494 | codeparrot/github-code |
11ca10e0f6d0a889083f95703cfa7683318b279d56a68f016ca02e8fa4f2996d | require 'prct09/matriz.rb'
class Matriz_dispersa < Matriz
attr_accessor :fil, :col, :m, :pos_fil, :pos_col
#INITIALIZE
def initialize (*args) # nC:meros de argumentos variables *
raise IndexError unless ((args[0] > 0) && (args[1] > 0)) # Error, si dimensiC3n <0
fil = args[0]
col = args[1]
@dat = Ar... | Ruby | lib/prct09/matriz_dispersa.rb | alu0100600674/prct10 | mit | 3,866 | 218 | codeparrot/github-code |
6ca233716138b08f9a91aca24e5049b47e5a00a4fbc701beb0e8108648fa8128 | package edu.rit.csh.agargiulo.Gatekeeper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.... | Java | src/edu/rit/csh/agargiulo/Gatekeeper/HttpsPostAsyncTask.java | agargiulo/gatekeeper-android | mit | 3,864 | 155 | codeparrot/github-code |
2f871c0f4d874fcea65972cd2b042d8cddc1e2fe7fb49a8d279237864e2d7c4a | # frozen_string_literal: true
module RouteTranslator
module Translator
# Add standard route helpers for default locale e.g.
# I18n.locale = :de
# people_path -> people_de_path
# I18n.locale = :fr
# people_path -> people_fr_path
def self.add_untranslated_helpers_to_controllers_and_views... | Ruby | lib/route_translator/translator.rb | MarkusHarmsen/route_translator | mit | 7,501 | 172 | codeparrot/github-code |
65f214f189aeddcb07a267aaaada559d02e8e6099bc756a77b09646e09d62257 | 'use strict';
var test = require('tape');
var jockey = require('..');
//
// add(item)
//
test('throws if no `item`', function(t) {
t.plan(2);
var j = jockey();
t.throws(function() {
j.add();
});
t.looseEqual(j.items, []);
});
test('appends `item` to the end of the playlist', function(t) {
t.plan(2);... | JavaScript | test/add.js | yuanqing/jockey | mit | 1,644 | 81 | codeparrot/github-code |
a4df920d14dd8bb1f42bdb6d3e122b8021519655a4e7304cbe85b8113a3a0b19 | package onionscan
import (
"fmt"
"github.com/s-rah/onionscan/config"
"github.com/s-rah/onionscan/protocol"
"github.com/s-rah/onionscan/report"
"github.com/s-rah/onionscan/utils"
"strings"
"time"
)
type OnionScan struct {
Config *config.OnionScanConfig
}
func (os *OnionScan) GetAllActions() []string {
return... | GO | onionscan/onionscan.go | sainslie/onionscan | mit | 3,107 | 113 | codeparrot/github-code |
9f65f99388889fdedd2909c7e68cfe5e546ebc51654065014b2df55956637346 | // - Project: smacrotools (https://github.com/jokade/smacrotools)
// Description:
//
// Distributed under the MIT License (see included file LICENSE)
// - Project: smacrotools (https://github.com/jokade/smacrotools)
// Description:
//
// Distributed under the MIT License (see included file LICENSE)
// Project... | Scala | shared/src/main/scala/de/surfice/smacrotools/MacroAnnotationHandler.scala | jokade/smacrotools | mit | 10,820 | 230 | codeparrot/github-code |
8d6cef40cc7ef43b3b86b9109a2e0e60aa290aec825f2178492ba5904d1ae914 | (function()
{
var Bacon, BufferingSource, Bus, CompositeUnsubscribe, Desc, Dispatcher, End, Error, Event, EventStream, Initial, Next, None, Observable, Property, PropertyDispatcher, Some, Source, UpdateBarrier, addPropertyInitValueToStream, assert, assertArray, assertEventStream, assertFunction, assertNoArguments, a... | JavaScript | invoke/bacon.js | SpaceTimeProgrammingLanguage/SpaceTimeProgrammingLanguage.github.io | mit | 74,059 | 3,758 | codeparrot/github-code |
510188cae8547b10e046305d54df83a01265b10ac350a0eedd3334344819e53e | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>color: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.06.1-2.0.5/extra-dev/8.10.dev/color/8.7.dev.html | coq-bench/coq-bench.github.io | mit | 10,059 | 247 | codeparrot/github-code |
293b57bf8fa2f7bac1d2608e0aa5d805bb11217110fabf4cac8a42bdac53e98f | /*
99Lime.com HTML KickStart by Joshua Gatcke
kickstart.css
Don't edit the file if you want HTML KickStart to be upgradeable.
Instead, copy any CSS selectors you want to modify to your style.css file.
// Colors
blue: #4D99E0;
*/
/*---------------------------------
IMPORTS
-----------------------------------*/
... | CSS | css/kickstart.css | chasingdonis/final | mit | 10,563 | 509 | codeparrot/github-code |
ee56faebea5baa85676d536c50dd26f748f6ffae8c7025d261092d290e47034e | #include "TString.h"
#include "TFile.h"
#include "TTree.h"
#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
int ConvertSFrameOutput(TString filename)
{
TFile *f;
std::stringstream indexes;
indexes.str("");
indexes << filename;
std::string input_file=indexes.str();
f= TFile... | C++ | ZHtautauAnalysis/macros/TMVA_2/tmva/test/ConvertSFrameOutput.C | jpavel/cms-ucl-tau | mit | 8,879 | 281 | codeparrot/github-code |
91e3ae96f7d9ab12eac4dde600ff291874be12e4307bd1f729ae4f8f265a81bd | autowatch = 1;
function chord() {
var chord = arrayfromargs(arguments)[0];
var root_pitch = get_root(chord);
var symbol = chord.substring(root_pitch.length);
var pitch_classes = get_pitch_classes(root_pitch, symbol);
outlet(0, pitch_classes);
}
function get_root(c) {
if (c.substring(1, 3) === "bb") {
return ... | JavaScript | MaxMSPJitter/chord_parse/chord_parse.js | nikhilsinghmus/Utilities | mit | 3,699 | 168 | codeparrot/github-code |
72218bac207d660b239bff22d9e8cbed6efde683933166afe552944521bfe007 | 'use strict';
/* jshint indent: 2*/
// Set the jasmine fixture path
// jasmine.getFixtures().fixturesPath = 'base/';
describe('ngCsv directive', function () {
var $compile;
var $rootScope;
var $timeout;
// Load the myApp module, which contains the directive
beforeEach(module('ngCsv.directives'));
// Sto... | JavaScript | test/unit/ngCsv/directives/ngCsv.js | asafdav/ng-csv | mit | 18,078 | 558 | codeparrot/github-code |
dbc6273de83358edaefd455533dd8444baf32cbd608cda7c09b46b412ba3545c | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Campaignmanager extends CI_Controller {
var $data = array();
function __construct() {
parent::__construct();
// $this->output->enable_profiler(TRUE);
$this->data['pageBodyClass'] = "actions";
... | PHP | application/controllers/campaignmanager.php | amaljo/emailCampaign | mit | 8,382 | 207 | codeparrot/github-code |
b3be305e309f622322dced60cb77f4f3d4d421842dd29b382a54dcff396cb63c | #include <bits/stdc++.h>
#define N 200005
using namespace std;
inline int MIN(int a,int b){return (a>b)?b:a;}
inline int MAX(int a,int b){return (a>b)?a:b;}
int ans[N]={0};
vector<pair<int,int> > tab;
set<pair<int,int> > order;
int n,a;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>n;
for(int i=1;i<... | C++ | codeforces/547B.cpp | rstancioiu/uva-online-judge | mit | 953 | 43 | codeparrot/github-code |
d522321f6000664289eb2b0c9285969a66a50f1d6f3d7ca9d62bb45860e5c6fb | from ceph_deploy.lib import remoto
from ceph_deploy.hosts.centos.install import repo_install, mirror_install # noqa
from ceph_deploy.hosts.util import install_yum_priorities
def install(distro, version_kind, version, adjust_repos, **kw):
# note: when split packages for ceph land for Fedora,
# `kw['components... | Python | ceph_deploy/hosts/fedora/install.py | alfredodeza/ceph-deploy | mit | 3,044 | 88 | codeparrot/github-code |
348ecc7621936ec0ac4688f2671e77ac55fb2bca098852c468636adb738c7951 | 'use strict'
const Log = require('../../src/log.js')
class LogCreator {
static async createLogWithSixteenEntries (ipfs, access, identities) {
const create = async () => {
let logA = new Log(ipfs, access, identities[0], 'X')
let logB = new Log(ipfs, access, identities[1], 'X')
let log3 = new Lo... | JavaScript | test/utils/log-creator.js | haadcode/ipfs-log | mit | 1,857 | 67 | codeparrot/github-code |
c1097792b5beea7db7f4ad391320b7026dc5c26eb649e67e07091ec2e8bdba07 | package org.combo.app.net;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;
public class RequestContext {
private HttpServl... | Java | src/main/java/org/combo/app/net/RequestContext.java | comboent/project-factory | mit | 1,203 | 49 | codeparrot/github-code |
e9856c441b0ca32a55336ccd9bca4dd5cf9ce303ee79237939157dfb0d4ede95 | <?php
namespace Site\GalleryBundle\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Site\GalleryBundle\Controller\DefaultController;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\File\File;
class ValidateController extends DefaultControl... | PHP | src/Site/GalleryBundle/Controller/ValidateController.php | LNV326/nfsko-gallery | mit | 5,265 | 153 | codeparrot/github-code |
7e376e41dc6b52f4a3f251a37965e96eee62858ce686d12701278d308de061be | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tarski-geometry: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.mi... | HTML | clean/Linux-x86_64-4.05.0-2.0.6/extra-dev/8.10.dev/tarski-geometry/8.5.0.html | coq-bench/coq-bench.github.io | mit | 7,685 | 172 | codeparrot/github-code |
bdca2292addf8e2e9bf3a8a695c2a3246070f94be668e14737f0a0a64a621fed | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
if (!function_exists('role_name')) {
function role_name($slug) {
$CI = & get_instance();
$roles = $CI->config->item('permissions');
if(isset($roles['user_roles'][$slug])) {
return $roles['user_roles'][$slug]['name'];
}... | PHP | application/helpers/permissions_helper.php | kingareka/testproject | mit | 1,771 | 73 | codeparrot/github-code |
deb2fc10afb6c1192c5ca1a1d51f2ad6d19660c7dbbb987fea02b9274d7d5388 | var renderer, camera;
var scene, element;
var ambient, point;
var aspectRatio, windowHalf;
var mouse, time;
var controls;
var clock;
var useRift = false;
var riftCam;
var boxes = [];
var core = [];
var dataPackets = [];
var ground, groundGeometry, groundMaterial;
var bodyAngle;
var bodyAxis;
var bodyPosition;
var... | JavaScript | examples/js/first_person.js | nirshuk/vr3d2 | mit | 12,526 | 440 | codeparrot/github-code |
0e70abec59ab7d933b706b05747e9ed53c5e893ac6335263691841dd3372f517 | <?php
namespace FBN\GuideBundle\Menu;
use Knp\Menu\FactoryInterface;
class MenuBuilder
{
private $factory;
/**
* @param FactoryInterface $factory
*/
public function __construct(FactoryInterface $factory)
{
$this->factory = $factory;
}
/**
* @return string
*/
... | PHP | src/FBN/GuideBundle/Menu/MenuBuilder.php | CruzyCruz/FoodieByNature | mit | 1,740 | 63 | codeparrot/github-code |
0c798e157f4ca69beb992b6ddce6d7d6512779533b14da09aede0d19e0ec062b | #include "AppClass.h"
void AppClass::InitWindow(String a_sWindowName)
{
super::InitWindow("Sandbox"); // Window Name
// Set the clear color based on Microsoft's CornflowerBlue (default in XNA)
//if this line is in Init Application it will depend on the .cfg file, if it
//is on the InitVariables it will always forc... | C++ | E06_Lerp/AppClass.cpp | wolfshire/ReEngineApp_2015s | mit | 3,310 | 105 | codeparrot/github-code |
5eade50546d64cfe62b467f313afa411a41e82a85858c0f30831d064a867e1c2 | package spoiwo.model
//TODO conversion utility
import org.apache.poi.ss.util.CellReference
object CellRange {
val None: CellRange = CellRange(0 -> 0, 0 -> 0)
}
case class CellRange(rowRange: (Int, Int), columnRange: (Int, Int)) {
require(rowRange._1 <= rowRange._2, "First row can't be greater than the last row... | Scala | core/src/main/scala/spoiwo/model/Range.scala | norbert-radyk/spoiwo | mit | 1,321 | 45 | codeparrot/github-code |
90c33eb62848844e5f39b2abfc5c337972dc5b3dbd25ba8994d1533bfb38405b | <?php
namespace Rost\Http;
/**
* Immutable container for an array of named parameters.
*/
class Parameters
{
/**
* @var mixed[]
*/
protected $parameters;
/**
* Constructs a new object, accepts an array of parameters to wrap.
*
* @param mixed[] $parameters
*/
function __construct(array $parameters)
{
$t... | PHP | Rost/Http/Parameters.php | codualex/rost-framework | mit | 1,044 | 61 | codeparrot/github-code |
3237b30b1923ada2271a7dc25dba5af3a4b868be2126c96337bb25373c340167 | 'use strict';
var chai = require('chai');
var should = chai.should();
var Field = require('../../lib/method/field');
var Scalar = require('../../lib/method/scalar');
describe('Field', function() {
var f;
beforeEach(function() {
f = new Field('foo');
});
it('instantiates from constructor', function() {
... | JavaScript | test/method/field.js | carnesen/bitcoin-rpc-spec | mit | 1,566 | 61 | codeparrot/github-code |
d8518ac0c6ab4def48a9d798311acb3eeea835846a98d80f9f67829daca65522 | #ifndef __PLASP__PDDL__TRANSLATION__CONDITIONAL_EFFECT_H
#define __PLASP__PDDL__TRANSLATION__CONDITIONAL_EFFECT_H
#include <colorlog/Formatting.h>
#include <pddl/NormalizedAST.h>
#include <plasp/TranslatorException.h>
#include <plasp/pddl/translation/Predicate.h>
#include <plasp/pddl/translation/Primitives.h>
#incl... | C | include/plasp/pddl/translation/ConditionalEffect.h | potassco/plasp | mit | 3,343 | 111 | codeparrot/github-code |
f8dbb7a7d1bf29800e19f7afcfaa3b963b5bbe0c45daa3265cd045d60520b003 | \chapter*{Appendix} % (fold)
\label{cha:appendix}
\section*{Details on the practical procedure} % (fold)
\label{sec:details_on_the_practical_procedure}
We briefly describe of the procedure for constructing the crossing tree on time series
data $(t_i, x_i)_{i=0}^N$.
Recall that the tree is constructed in two passes: ... | TeX | year_14_15/course_project/report/appendix.tex | ivannz/study_notes | mit | 4,270 | 77 | codeparrot/github-code |
05c96dc577f7e32b06b43bbea1c0834b5c7feb4a78599f343d8fcbcf1c0d0e95 | 'use strict';
/**
* Module dependencies
*/
// Public node modules.
const _ = require('lodash');
const async = require('async');
/**
* `Lusty.prototype.stop()`
*
* The inverse of `start()`, this method
* shuts down all attached servers.
*
* It also unbinds listeners and terminates child processes.
*
* @api ... | JavaScript | lib/stop.js | Seldszar/lusty | mit | 1,418 | 65 | codeparrot/github-code |
d58aa715e47318220a9604be8f4586bf0e5478418ee92e53d6a87e32a33315f9 | import webapp2
from google.appengine.ext import db
from google.appengine.ext import ndb
from db_class import DerivedClass as OldDerivedClass
from ndb_class import BaseClass as NewBaseClass
from ndb_class import DerivedClass as NewDerivedClass
class Repro(webapp2.RequestHandler):
def get(self):
self.response... | Python | repro.py | lantius/ndb-key | mit | 1,545 | 47 | codeparrot/github-code |
816be531cde6d6a1acb1e720173966bd5b638d85f53dd1a851a99d1c61ab66e8 | package test;
import avis.SocialNetwork;
import exception.BadEntry;
import exception.ItemBookAlreadyExists;
import exception.NotMember;
import java.util.HashMap;
public class TestsAddItemBook implements SocialNetworkTest {
private int addItemBookOKTest(String idTest, SocialNetwork sn, String pseudo1,... | Java | INF112/ToutAvis/src/test/TestsAddItemBook.java | maxmouchet/tb | mit | 7,230 | 137 | codeparrot/github-code |
64b0197fd6312a6d6a3d66640881cff1d97f76fcf0f68d1c6a20542ec5d428e6 | class UpdateAttachmentLegislativeListSyntax < ActiveRecord::Migration
class Attachment < ApplicationRecord; end
def self.fix_attachment(attachment)
# This regex is the one used for matching legislative lists in the previous
# version of govspeak. The intent is to add an `$EndLegislativeList` tag in
# t... | Ruby | db/migrate/20140820093930_update_attachment_legislative_list_syntax.rb | alphagov/whitehall | mit | 914 | 31 | codeparrot/github-code |
90cbe69b564cea99c75c74adf34d312e533e1dc5c816b523a6509454ec35ce02 | import React from 'react'
import { Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
import Highlight from '../components/highlight'
import {baseValLarge} from '../components/Item'
export default class Index extends React.Component {
render() {
return (
<div>
<h1 style={{padd... | JavaScript | pages/aboutUs.js | etaiklein/gameghost | mit | 1,447 | 40 | codeparrot/github-code |
1328b2f189f0aee83450fc15c05880f4737b97f9b11065d0888d8c78d4f91b21 | define([
'gc/MediaGallery/app/thumbView'], function(ThumbView) {
var view = Backbone.View.extend({
el: $('#mediaGallery ul.thumbnails'),
initialize: function(options) {
var that = this;
_.bindAll(this, 'render');
this.collection.bind('add', function(asset) {
that.... | JavaScript | assets/js/gc/MediaGallery/app/assetIndexView.js | delorenj/groovecrowd | mit | 739 | 33 | codeparrot/github-code |
5cfaa59514eee524b6b0f36e47897807d706a759347988ee83703bdf322f3ce1 | <?php
/*
* iDimensionz/{sendgrid-webapi-v3}
* HttpClient.php
*
* The MIT License (MIT)
*
* Copyright (c) 2015 iDimensionz
*
* 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 witho... | PHP | lib/iDimensionz/SendGridWebApiV3/Guzzle/HttpClient.php | idimensionz/sendgrid-webapi-v3-php | mit | 3,351 | 105 | codeparrot/github-code |
107eb52cbb8af7d7a063900cf56e03492e21a988ae3ff6545d319955125be393 | import * as path from "path";
import logger from "../../lib/Logger";
const log = logger.get(module);
const chalk: any = require("chalk");
var module_require: any = require("module");
var Module = module_require.Module;
var oldLoad = Module._load;
Module._load = function(request, parent, isMain) {
var extension = pa... | TypeScript | src/server/config/alias.ts | llyys/trible | mit | 1,186 | 34 | codeparrot/github-code |
8772d08d78833bba6633e18625df34f5319a64841389e138d786ee1efd367f06 | #include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include <stdio.h>
#define IMAGE_WIDTH 640
#define IMAGE_HEIGHT 480
#define BYTES_PER_PIXEL 3
#define FRAMES_PER_SECOND 25
#define BIT_RATE 400000
#define GOP_SIZE 10
#define MAX_B_FR... | C | examples/rgb_2_mpeg_file.c | troystribling/kinect_machine | mit | 3,384 | 105 | codeparrot/github-code |
eee0336f086ee44c1cbd392a7e9f69e156d25cb15e954014185cf291b943bda9 | package io.kevinlee.skala.math
/**
* @author Lee, Seong Hyun (Kevin)
* @since 2015-07-18
*/
object CommonMath {
import io.kevinlee.skala.SkalaPredef.AnyEquals
def isOdd(number: Int):Boolean = (number & 1) !== 0
def isEven(number: Int):Boolean = !isOdd(number)
def isOdd(number: Long):Boolean = (number & 1)... | Scala | src/main/scala/io/kevinlee/skala/math/CommonMath.scala | Kevin-Lee/skala | mit | 1,655 | 55 | codeparrot/github-code |
a59638b13d3a8f00487cb2cd2b9732177e383fc72834f9ded682d3eeecd48b8c | import java.util.ArrayList;
import javax.sound.sampled.FloatControl;
/**
* Bonus types:
* - Passed into constructor via the int "bonuses"
* - Bonuses function somewhat like chmod:
* Autoaim: 1
* Piercing: 2
* Pulse: 4 (pulse weapons fire multiple projectiles (default 200, for Pulse Laser), one after another, ea... | Java | StarshipArena/src/Turret.java | TheDujin/StarshipArena | mit | 10,859 | 320 | codeparrot/github-code |
5367ba977092765e50d776a4ed0229826c96b30ba5e9be276672c6efee0eedaa | define(['exports', 'module', 'react', 'classnames', './BootstrapMixin', './utils/ValidComponentChildren'], function (exports, module, _react, _classnames, _BootstrapMixin, _utilsValidComponentChildren) {
/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsStyle"]}]*/
/* BootstrapMixin contains `bs... | JavaScript | bower_components/react-bootstrap/PanelGroup.js | sanjay1909/as-me | mit | 2,984 | 97 | codeparrot/github-code |
ade30d5f7e5454efb4800b72f76aa915ad3367e5b1479dc08d0e327887807269 | import React, {PropTypes, Children, cloneElement} from 'react'
import {elementType, validateAccordionChildren} from './helpers'
const containerStyle = {
display: 'flex',
position: 'fixed',
left: 0,
top: 0,
bottom: 0
}
export const Accordion = ({opened = {}, onChange = () => null, children, style}) => {
co... | JavaScript | source/FlexAccordion/FlexAccordion.js | emilebres/react-flex-accordion | mit | 2,183 | 92 | codeparrot/github-code |
849d649b5c2899559771347a8cd7f0b17b25a5f10527d67e5b536c028775d36b | package com.iappsam.managers.sessions;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import com.iappsam.Log;
import com.iappsam.Unit;
import com.iappsam.managers.AbstractManager;
import com.iappsam.managers.LogManage... | Java | src/main/com/iappsam/managers/sessions/LogManagerSession.java | jdbaltazar/CMSC-198-IAPPSAM-System | mit | 886 | 33 | codeparrot/github-code |
194ca99eb02c5bdd81cbeaf5885b41f66f495f019379f313db0e0d8a588dc6e0 |
import "reflect-metadata";
import {expect} from "chai";
import {MetadataKeys} from "../../../main/Apha/Decorators/MetadataKeys";
import {AnnotatedCommandHandler} from "../../../main/Apha/CommandHandling/AnnotatedCommandHandler";
import {Command} from "../../../main/Apha/Message/Command";
import {
CommandHandler,
... | TypeScript | src/test/Apha/CommandHandling/CommandHandlerDecorator.spec.ts | martyn82/aphajs | mit | 5,243 | 139 | codeparrot/github-code |
f343701a5bbf42b8cba8abcf78908c54bbf32c4a123761f9cf48fc9ee27a33ba | /*
* Qt4 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2012
* The Litecoin Developers 2011-2013
* The ButterflyBits Developers 2013
*/
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
#include "sendcoinsdialog.h"
#include "signverifymessagedialo... | C++ | src/qt/bitcoingui.cpp | mammix2/BFB | mit | 34,953 | 968 | codeparrot/github-code |
72cd31bceb3a28065ea04b744781866264e9bb1158d8bed9be049d85d8b6c0a3 | package com.myconnector.webservice;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import com.myconnector.domain.UserData;
import com.myconnector.service.SecurityService;
/**
*
* @author Nilesh Kapadia (nileshka@gmail.com)
*/
public ... | Java | src/main/java/com/myconnector/webservice/BaseWSImpl.java | nileshk/truedolist-java | mit | 2,470 | 93 | codeparrot/github-code |
15c518d1021c294c4c7d1a351515fcca8616a62de8fadb9ee5a9d43bf28f498a | <?php
namespace LeProxy\LeProxy;
/**
* Domain specific logger, formats and writes out log messages to STDOUT
*/
class Logger
{
/**
* Logs a successful connection attempt
*
* @param ?string $source client source address
* @param ?string $destination target destination host or IP
* @... | PHP | src/Logger.php | leproxy/leproxy | mit | 3,082 | 103 | codeparrot/github-code |
cf4f0ccd23092db660ffe71e803361e9491b3a8a9cd1f6d00af2bbd22caed6b8 | package bg.softuni.library.entity.client;
import java.io.Serializable;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="LIB_CLIENTS")
public class Client implements Serializable, Comparable<Client... | Java | OpenCourses/JavaWebDevelopment/Project/ThemBooks/src/main/java/bg/softuni/library/entity/client/Client.java | sholev/SoftUni | mit | 1,239 | 74 | codeparrot/github-code |
c0d2d9308d4857640be91a59b6a93a244cf3ce4abc2852f5b6d695cadbbffd24 | package com.baidu.translate.demo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
... | Java | client/chatsoftware/src/com/baidu/translate/demo/MD5.java | Li-GuangCheng/Chat-Software-project-of-SE-course | mit | 3,366 | 123 | codeparrot/github-code |
db7612cd1df7fda3a412237794ee23d46d86347c5925730828c1963ed34bef20 | <!doctype html>
<meta charset="utf-8">
<script src="../js/d3.js" charset="utf-8"></script>
<script src="../build/vistk.js"></script>
<link href="../css/vistk.css" rel="stylesheet">
<body>
<div id="viz_dotplot" style="float:left"></div>
<div id="viz_sparkline" style="float:left"></div>
<script>
d3.tsv("../../vis-toolki... | HTML | examples/dotplot_sparkline.html | cid-harvard/vis-toolkit | mit | 3,770 | 155 | codeparrot/github-code |
ddb8f3c39c21e05d6d847ed5fbaf1075d8e45eeefa82fa2c3d69477b80cd5bc2 | Rails.application.configure do
config.react.variant = :development
config.react.jsx_transformer_class = React::JSX::JSXTransformer
config.react.jsx_transform_options = {
harmony: true,
strip_types: true, # for removing Flow type annotations
asset_path: "path/to/JSXTransformer.js", # if your JSXTransfo... | Ruby | config/environments/development.rb | 1UnboundedSentience/MoneyFriends | mit | 2,044 | 51 | codeparrot/github-code |
70676e67281d49deef3703101c1f28b4c98abc4b192959fb39be93f4c87d4cca | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>interval: 5 m 52 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel... | HTML | clean/Linux-x86_64-4.09.1-2.0.6/released/8.10.0/interval/4.1.1.html | coq-bench/coq-bench.github.io | mit | 11,936 | 215 | codeparrot/github-code |
73c80faa21b5d70194d4008a62bbde471a67875c848e620da873ccd2bf500390 | """@author: Bryan Silverthorn <bcs@cargo-cult.org>"""
import numpy
import sklearn.svm
import sklearn.pipeline
import sklearn.linear_model
import sklearn.decomposition
import sklearn.kernel_approximation
import borg
logger = borg.get_logger(__name__, default_level = "INFO")
class MultiClassifier(object):
def __in... | Python | borg/regression.py | borg-project/borg | mit | 4,929 | 158 | codeparrot/github-code |
5232fef8b9034d9924c58df68b2fd835a8c8ba485fdb586b0eb1e28203b60cff | #include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include "FancyDisplay.h"
FancyMsg FancyDisplay_newMessage(char *msg, FancyClr clr, FancyType type)
{
FancyMsg new;
if ((new = malloc(sizeof(*new))) == NULL)
return (NULL);
new->msg = strdup(msg);
new->clr = clr;
new->typ = type;
return (new);
}
voi... | C | srcs/FancyDisplay_message.c | hug33k/FancyDisplay | mit | 660 | 36 | codeparrot/github-code |
4828d0070ba8563c7ea01f9d1e78014ca48e9e8f0adbb568a9653d990b96babd | require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
require "ffcrm_plivo"
module Dummy
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in confi... | Ruby | test/dummy/config/application.rb | webgradus/ffcrm_plivo | mit | 2,575 | 60 | codeparrot/github-code |
3a5f5440cc7768c768adbd16ad417e9466d66a0399e034a4fb663eadce0d1897 | /*
* MIT License
*
* Copyright 2017-2018 Sabre GLBL Inc.
*
* 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,... | Java | conf4j-core/src/main/java/com/sabre/oss/conf4j/converter/UrlConverter.java | SabreOSS/conf4j | mit | 2,397 | 69 | codeparrot/github-code |
2fbfe864e4c519d03081131b7a1abfa72e9443b77f0e42edc3359508c02bb97e | package utils
import (
"bufio"
"fmt"
"os"
"strings"
)
// AskForConfirmation asks the user for confirmation. A user must type in "yes" or "no" and
// then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as
// confirmations. If the input is not recognized, it will ask again. The f... | GO | pkg/utils/confirm.go | alok87/github-cli | mit | 1,007 | 41 | codeparrot/github-code |
08cb87491a926df97aa83bf2a5ed3e56b410e08bbd2deac9a34f07a76cfc1112 | import {
Point,
Physics,
RandomDataGenerator,
} from 'Phaser';
import _ from 'Underscore';
var RNG = new RandomDataGenerator();
// Should only be a factory, and have kill method (and static emitter) in asteroid class,
// but it seems overkill in this case...
class AsteroidFactory {
constructor(game) {
this.game... | JavaScript | src/Components/AsteroidFactory.js | rbrochot/PhaserGulpBoilerplate | mit | 2,117 | 84 | codeparrot/github-code |
a2b2065c82b69808ab89906832fe6de56c50834995ed11aa432e02c8feba3eed | # Your Names
# 1) Jack Huang
# 2) Daniel Woznicki
# We spent [#] hours on this challenge.
# Bakery Serving Size portion calculator.
def serving_size_calc(item_to_make, ingredient_quantity)
#menu is the items and quantity we need to make for one.
menu = {"cookie" => 1, "cake" => 5, "pie" => 7}
#will check whet... | Ruby | week-6/gps.rb | jhack32/phase-0 | mit | 2,813 | 62 | codeparrot/github-code |
6c6166a84e937d6cda501e2db9144a89820bfb377f1293bde545034fcd790f25 | <?php
namespace Kni\ThomasBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class TestType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
... | PHP | src/Kni/ThomasBundle/Form/TestType.php | KNIPK/thomas | mit | 902 | 36 | codeparrot/github-code |
ca9b6eb718b00b930a88d21950ad18f88b703f86c59b38ca14263d12a6076315 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | TypeScript | src/vs/workbench/parts/update/electron-browser/update.ts | rishii7/vscode | mit | 20,828 | 565 | codeparrot/github-code |
e707c0dd296b8faef8083f9256125eac9624084539cfd637aee105faa018b640 | 'use strict'
const activeCacheName = 'cyclops-v1'
self.addEventListener('install', (e) => {
const assets = [
'/',
'index.html',
'index.js',
'favicon.png',
'thumb-003.png',
'thumb-003.webp',
'thumb-004.png',
'thumb-004.webp'
]
const action = caches.open(activeCacheName).then(cach... | JavaScript | service-worker.js | thewhodidthis/cyclops | mit | 887 | 44 | codeparrot/github-code |
f37cbe23d9409f9ff91061643002a07319c5a48f2bd6590025c682d4c18efdb4 | package ee.telekom.workflow.util;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Collection;
import... | Java | telekom-workflow-engine/src/main/java/ee/telekom/workflow/util/JsonUtil.java | zutnop/telekom-workflow-engine | mit | 31,166 | 804 | codeparrot/github-code |
8b1079e659be67bb97397ffe5e4bea2129fa9d83b452f6b612ef4659bca42c6f | """
ICH flash descriptor
"""
import struct
from raw import RAW
from fd import FD
_SIG = '5AA5F00F'.decode('hex')
_SIG_OFFSET = 0x10
_SIG_SIZE = 0x4
_S_HEADER = struct.Struct('< 16s 4s BBBB BBBB BBBB')
_S_REGION = struct.Struct('< H H')
_REGIONS = [('ich', RAW), ('bios', FD), ('me', RAW), ('gbe', RAW), ('plat', RA... | Python | ichdesc.py | fesh0r/romdump | mit | 3,000 | 96 | codeparrot/github-code |
73c4a605cd3dd78add763ac86c6f2067ba14806e120256c4bfdb2be28f99c440 | /******************************************************************************
Developed and Copyright (c) by
Erik Unger
Contact: erik@erikunger.com
... | C++ | source/System/Thread_Possix.cpp | ungerik/BaseLib | mit | 3,686 | 220 | codeparrot/github-code |
6f8d85a0206e39315d7916cd667003d8add3b594c56e8d82881ef4b99438f02a | extern crate log;
extern crate env_logger;
extern crate clap;
extern crate ctrlc;
extern crate gauc;
extern crate iron;
extern crate urlencoded;
use clap::{App, Arg};
use gauc::cli;
use gauc::web;
use gauc::client::Client;
use std::env;
use std::process::exit;
use std::sync::{Arc, Mutex};
use std::sync::atomic::{At... | Rust | src/main.rs | ApolloCrawler/gauc | mit | 2,903 | 108 | codeparrot/github-code |
bf0c67961d9121e4ff260d6e278b825b35ee3894a8603a4c2d8e2da1b5e3d448 | import sys, tty, termios
class _Getch:
def __call__(self, a):
return self._get_key(a)
def _get_key(self, a):
fd = sys.stdin.fileno()
old = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
ch = sys.stdin.read(a)
finally:
termi... | Python | python/inputkeyboard/Inputkey.py | gotankgo/practice | mit | 937 | 39 | codeparrot/github-code |
3fae9b55077f029e18307ca977a50bd607326ecb42b1626874b913193715fa93 | using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using IronSharp.Core;
namespace IronSharp.IronMQ
{
public class QueueClient<T> : QueueClient
{
private int? _delay;
private Action<QueueMessageContext<T>, Exception> _errorHandler;
... | C# | src/IronSharp.IronMQ/QueueClient.cs | grcodemonkey/iron_dotnet | mit | 27,276 | 686 | codeparrot/github-code |
7b3f13c87f4a4cb85c0810725d206c69aeb8b369863328a7b954c9108f71b453 | /***********************************************************************
* b5500emulator
************************************************************************
* Copyright (c) 2016-2018, Reinhard Meyer, DL5UY
* Licensed under the MIT License,
* see LICENSE
* based on work by Nigel Williams and Paul Kimpel
* see... | C | emulator/io.h | stacklover/b5500emulator | mit | 4,621 | 143 | codeparrot/github-code |
840078bbb2025d498e3225530d6a22ec60346a5ee6f565f998de6ae4551f933e | namespace BitKing
{
partial class frmAbout
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param n... | C# | BitKing/BitKing/frmAbout.Designer.cs | MrFS/BitKing | mit | 1,369 | 46 | codeparrot/github-code |
d7abd688083f0dd4fa33a439e8c8bd8deb323823b78032f933d34acdb187b787 | package CrackingCoding;
import java.util.Arrays;
public class c17_12 {
public static void printPairSums(int[] array, int sum) {
Arrays.sort(array);
int first = 0;
int last = array.length - 1;
while (first < last) {
int s = array[first] + array[last];
... | Java | src/CrackingCoding/c17_12.java | dingxwsimon/codingquestions | mit | 808 | 31 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.