repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
insin/deduped-babel-presets
plugins/react-inline-elements.js
73
module.exports = require('babel-plugin-transform-react-inline-elements')
mit
WuTheFWasThat/vimflowy
src/assets/ts/utils/browser.ts
2998
/* Utilities for stuff related to being in the browser */ import $ from 'jquery'; import { saveAs } from 'file-saver'; // needed for the browser checks declare var window: any; // TODO: get jquery typing to work? export function scrollDiv($elem: any, amount: number) { // # animate. seems to not actually be great t...
mit
kristianmandrup/prawn_html
lib/html/pdf/actions/position.rb
408
module Prawn module Html module PdfActionHandler module Position def do_break pdf.move_down break_height ypos += break_height end def do_new_page if ypos > options[:position][:page_height] pdf.start_new_page ...
mit
jenkinsci/jenkins-design-language
utils/elementset/ElementSetManip.test.ts
1354
import { $ } from './ElementSet'; import './ElementSetManip'; describe('ElementSetManip', () => { beforeEach(() => { document.documentElement.innerHTML = ` <div class="elem1" title="title 1"> <div class="child1">text 1</div> </div> <div class="elem2"> <div cl...
mit
crummy/codeeval
translation.cpp
1291
// https://www.codeeval.com/open_challenges/121/ #include <fstream> #include <iostream> #include <map> using namespace std; int main(int argc, char** argv) { // couldn't figure out the algorithm, so just hardcode it and guess the two missing chars map<char, char> translation; translation['y'] = 'a';...
mit
Winterfr0st/dfrost
src/Math/Vertex2.cpp
350
#include <Math/Vertex2.h> namespace dfrost { namespace Math { Vertex2::Vertex2(const Vertex2& other) : x_(other.x_), y_(other.y_) { } Vertex2::Vertex2(Vertex2&& other) : x_(other.x_), y_(other.y_) { } Vertex2::Vertex2(float x, float y) : x_(x), y_(y) { } float Vertex2::X() const { return x_; } float Vertex2::Y...
mit
stephen144/ypreg
db/schema.rb
7878
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
mit
Atvaark/insomnia
packages/insomnia-app/webpack/webpack.config.base.babel.js
1713
const webpack = require('webpack'); const path = require('path'); const pkg = require('../package.json'); module.exports = { devtool: 'source-map', context: path.join(__dirname, '../app'), entry: ['./renderer.js', './renderer.html'], output: { path: path.join(__dirname, '../build'), filename: 'bundle.j...
mit
osavchenko/SonataAdminBundle
tests/App/Datagrid/Datagrid.php
1869
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\AdminBundle\Tests\App...
mit
juradoz/jdial
jdial-core/src/test/java/al/jdi/core/devolveregistro/ModificadorResultadoSemAgentesFakeTest.java
3405
package al.jdi.core.devolveregistro; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.sameInstance; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; import org.junit.Before; import org.junit.Te...
mit
UCCNetworkingSociety/lowdown
app/Subscription.php
787
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Subscription extends Model { /** * The database table used by the model. * * @var string */ protected $table = 'subscriptions'; /** * The attributes that are mass assignable. * * @var array */ ...
mit
KIT-MAMID/mamid
master/cmd/master.go
6906
package main import ( "crypto/tls" "crypto/x509" "encoding/pem" "flag" "github.com/KIT-MAMID/mamid/master" "github.com/KIT-MAMID/mamid/master/masterapi" "github.com/KIT-MAMID/mamid/model" "github.com/KIT-MAMID/mamid/msp" "github.com/Sirupsen/logrus" "github.com/gorilla/mux" "io/ioutil" "net/http" "time" )...
mit
tamaracha/wbt-framework
api/controllers/response.js
557
'use strict'; const models = require('../models'); const $ = module.exports={}; $.create = function *create(){ const guess = yield models.Guess.findById(this.params.guess); this.assert(guess,'no guess found',404); this.assert(guess.updatedAt.toUTCString() === this.header['if-unmodified-since'], 412, 'guess has b...
mit
unrolled/tango
handler.go
4558
package tango import ( "html" "net/http" "net/url" "path" "strings" ) type HandlerInterface interface { New() HandlerInterface Head(request *HttpRequest) *HttpResponse Get(request *HttpRequest) *HttpResponse Post(request *HttpRequest) *HttpResponse Put(request *HttpRequest) *Ht...
mit
SaviorXTanren/mixer-client-csharp
Twitch/Twitch.Base.UnitTests/NewAPI/TagsServiceUnitTests.cs
2599
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Twitch.Base.Models.NewAPI.Tags; using Twitch.Base.Models.NewAPI.Users; namespace Twitch.Base.UnitTests.NewAPI { [TestClass] public class TagsServiceUnitTests : UnitTe...
mit
sodash/open-code
winterwell.web/test/com/winterwell/ical/ICalEventTest.java
2220
package com.winterwell.ical; import static org.junit.Assert.*; import java.util.List; import org.junit.Test; import com.winterwell.utils.time.Time; public class ICalEventTest { @Test public void testGetRepeats() { String ical = "BEGIN:VEVENT\n" + "DTSTART;TZID=Europe/London:20210302T103000\n" + "DTEND...
mit
santa01/graphene
example/src/main.cpp
1207
/* * Copyright (c) 2013 Pavlo Lavrenenko * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, pu...
mit
panthole/AndroidChart
src/com/panthole/androidchart/renderer/DialRenderer.java
4553
/** * Copyright (C) 2009 - 2013 SC 4ViewSoft SRL * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
mit
dollarshaveclub/ember-uni-form
app/mixins/finds-parent-form-view.js
71
export { default } from 'ember-uni-form/mixins/finds-parent-form-view'
mit
demansh/chat
server/src/main/java/org/demansh/message/writer/MessageWriter.java
287
package org.demansh.message.writer; import org.demansh.socket.MessageWritable; import org.demansh.message.model.Message; import java.io.IOException; public interface MessageWriter { public void writeToSocket(Message message, MessageWritable messageWritable) throws IOException; }
mit
Nejuf/QuizBuzz
config/initializers/warden.rb
207
Warden::Strategies.add(:guest_user) do def valid? session[:guest_user_id].present? end def authenticate! u = User.find(session[:guest_user_id]) success!(u) if u.present? end end
mit
renber/QuIterables
src/main/java/de/renebergelt/quiterables/PrimitiveArrayTransformer.java
2408
/******************************************************************************* * This file is part of the Java QuIterables Library * * The MIT License (MIT) * * Copyright (c) 2015-2016 René Bergelt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associat...
mit
touchlab/MagicThreads
library/src/main/java/co/touchlab/android/threading/eventbus/EventBusExt.java
1394
package co.touchlab.android.threading.eventbus; import de.greenrobot.event.EventBus; import de.greenrobot.event.SubscriberExceptionEvent; /** * Created by kgalligan on 7/28/14. */ public class EventBusExt { private static EventBusExt instance = new EventBusExt(); private EventBus eventBus; public stati...
mit
ravuthz/ravuthz.github.io
lib/mdx.js
4398
import { bundleMDX } from 'mdx-bundler' import fs from 'fs' import matter from 'gray-matter' import path from 'path' import readingTime from 'reading-time' import { visit } from 'unist-util-visit' import getAllFilesRecursively from './utils/files' // Remark packages import remarkGfm from 'remark-gfm' import remarkFootn...
mit
microstudi/Silex-Grunt-Skeleton
grunt/copy.js
1945
// COPY // Copies remaining files to places other tasks can use module.exports = function(grunt) { 'use strict'; grunt.config('copy', { dist: { files: [{ expand: true, dot: true, cwd: '<%= conf.web %>', dest: '<%= conf.distWeb...
mit
rodzewich/playground
xlib/ui/element/adapters/browser/ol/Element.ts
2929
/// <reference path="./../Element.ts" /> /// <reference path="./../../../elements/ol/IElement.ts" /> /// <reference path="./../../../elements/ol/IOptions.ts" /> module xlib.ui.element.adapters.browser.ol { import IEvent = element.elements.IEvent; export class Element extends browser.Element implements element.el...
mit
BLumia/BLumiaOJ
api/gen_identicon.php
7643
<?php /* generate sprite for corners and sides */ function getsprite($shape,$R,$G,$B,$rotation) { global $spriteZ; $sprite=imagecreatetruecolor($spriteZ,$spriteZ); if (function_exists('imageantialias')) imageantialias($sprite,TRUE); $fg=imagecolorallocate($sprite,$R,$G,$B); $bg=imagecolorallocate($sprite,255,...
mit
Welfenlab/tutor-rethinkdb-database
test/correction.js
14320
/* global it */ var chai = require("chai"); var chaiAsPromised = require("chai-as-promised"); chai.use(chaiAsPromised); chai.should(); var rdb = require("rethinkdb"); var _ = require("lodash"); var moment = require("moment"); var testUtils = require("./test_utils"); after(function(){ return testUtils.closeConne...
mit
eroad/super-stacker
spec/unit/superstacker/template_dsl_spec.rb
2633
require 'superstacker/template_dsl' include SuperStacker describe TemplateDSL do it 'should include the cloudformation_functions module' do TemplateDSL.included_modules.include? SuperStacker::CloudformationFunctions end end describe TemplateDSL, 'when compiled' do context 'with no declarations' do befor...
mit
general01/generalcoin
src/qt/bitcoinunits.cpp
4271
#include "bitcoinunits.h" #include <QStringList> BitcoinUnits::BitcoinUnits(QObject *parent): QAbstractListModel(parent), unitlist(availableUnits()) { } QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits() { QList<BitcoinUnits::Unit> unitlist; unitlist.append(BTC); unitlist.append(mBT...
mit
richardfearn/diirt
pvmanager/pvmanager-jca/src/main/java/org/diirt/datasource/ca/VStringArrayFromDbr.java
1126
/** * Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT * All rights reserved. Use is subject to license terms. See LICENSE.TXT */ package org.diirt.datasource.ca; import gov.aps.jca.dbr.DBR_TIME_String; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.diirt.vtype.VSt...
mit
zhu913104/KMdriod
play.py
306
from websocket import create_connection import sys step = sys.argv[1] serverip = '192.168.141.16' ws = create_connection("ws://"+serverip+":8887") def play(step): url = '{"qrcode":"http://'+serverip+':8080/qrcode.php?qrcode='+step+'"}' ws.send(url.encode()) if __name__ == "__main__": play(step)
mit
ad-tech-group/openssp
open-ssp-parent/open-ssp-common/src/main/java/com/atg/openssp/common/model/Productcategory.java
1544
package com.atg.openssp.common.model; /** * * http://www.google.com/basepages/producttype/taxonomy.en-US.txt * * @author André Schmer * */ public class Productcategory { private int id; private int gpid;// google product id, als referenz in campaign.productcategory.id private int parent_id...
mit
tombatossals/chords-db
src/db/ukulele/chords/Bb/mmaj11.js
309
export default { key: 'Bb', suffix: 'mmaj11', positions: [ { frets: '5354', fingers: '3142' }, { frets: '6353', fingers: '4131', barres: 3, capo: true }, { frets: '6986', fingers: '1431', barres: 6, capo: true } ] };
mit
levibostian/VSAS
kristenTesting/VSASmainScreen.py
4290
""" VSAS main screen mock-up using existing gif image. Author: Kristen Nielsen kristen.e.nielsen@gmail.com References: pythonware.com """ from Tkinter import * from PIL import Image, ImageTk import tkMessageBox as MsgBox from EmailScreen import EmailSettings from PreviousRecordingsScreen import PreviousReco...
mit
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/rendersystems/pipe/vanilla/model/data/VanillaIronPipeModelData.java
624
package de.robotricker.transportpipes.rendersystems.pipe.vanilla.model.data; import de.robotricker.transportpipes.duct.Duct; import de.robotricker.transportpipes.duct.types.BaseDuctType; import de.robotricker.transportpipes.location.TPDirection; public class VanillaIronPipeModelData extends VanillaPipeModelData { ...
mit
rocky/python-spark
test/test_checker.py
2188
#!/usr/bin/env python """ SPARK unit unit test grammar checking """ import unittest from spark_parser.spark import GenericParser class RightRecursive(GenericParser): """A simple expression parser for numbers and arithmetic operators: +, , *, and /. Note: methods that begin p_ have docstrings that are grammar...
mit
GabrielMalakias/CrmMentions
app/assets/javascripts/application.js
719
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
mit
Bochenski/deepbeige
lib/arena.rb
112
#an arena is where tournaments are held #Arenas can define and start tour class Arena def initialize end end
mit
forsak3n/logbay
src/digest/ws.go
3210
package digest import ( "context" "errors" "fmt" "math/rand" "net" "net/http" "sync" "time" "github.com/gorilla/websocket" "logbay/common" ) const ( WriteTimeout = 10 * time.Second MaxWriteAttempts = 10 * time.Second ) type WSDigestCfg struct { Port int URL string Ingests []common.IngestP...
mit
Azure/azure-sdk-for-ruby
management/azure_mgmt_compute/lib/2018-06-01/generated/azure_mgmt_compute/models/rollback_status_info.rb
2234
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Compute::Mgmt::V2018_06_01 module Models # # Information about rollback on failed VM instances after a OS Upgrade # operation. ...
mit
entrustcoin/eTRUST
src/qt/locale/bitcoin_fa_IR.ts
114697
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa_IR" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Entrustcoin</source> <translation type="unfinished"/> </message> <message> <location...
mit
theocodes/translator
test/minitest_helper.rb
258
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'translator' require 'minitest/autorun' require 'minitest/reporters' reporter_options = { color: true } Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(reporter_options)]
mit
kivy/python-for-android
pythonforandroid/recipes/libsecp256k1/__init__.py
1083
from pythonforandroid.logger import shprint from pythonforandroid.util import current_directory from pythonforandroid.recipe import Recipe from multiprocessing import cpu_count from os.path import exists import sh class LibSecp256k1Recipe(Recipe): built_libraries = {'libsecp256k1.so': '.libs'} url = 'https:...
mit
abricot/services.xbmc
src/app/services/xbmc/mockio.js
1123
"use strict"; angular.module('services.io.mock', []) .factory('io', ['$rootScope', '$q', '$http', '$parse', function ($rootScope, $q, $http, $parse) { // We return this object to anything injecting our service var factory = {}; var isConnected = false; factory.isConnected = function () { return ...
mit
carlosantoniodasilva/posgrad-relogio-ponto
leitora/CartaoPontoServer/Services/FuncionarioService.cs
268
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace CartaoPontoServer.Services { public class FuncionarioService { public int Id { get; set; } public string Nome { get; set; } } }
mit
Berkmann18/Essencejs
1.1/node_modules/babel-cli/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/kind-of/node_modules/is-buffer/index.js
438
/** * Determine if an object is Buffer * * Author: Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * License: MIT * * `npm install is-buffer` */ module.exports = function (obj) { return !!(obj != null && (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) (obj.c...
mit
sparkdesignsystem/spark-design-system
angular/projects/spark-angular/src/lib/components/inputs/sprk-radio-item/sprk-radio-item.component.ts
3078
import { Component, Input, Renderer2, ContentChild, OnInit, } from '@angular/core'; import uniqueId from 'lodash/uniqueId'; import { SprkRadioInputDirective } from '../../../directives/inputs/sprk-radio-input/sprk-radio-input.directive'; import { SprkRadioLabelDirective } from '../../../directives/inputs/sprk...
mit
leanovate/swagger-check
swagger-check-core/src/test/scala/de/leanovate/swaggercheck/fixtures/uber/UberProduct.scala
840
package de.leanovate.swaggercheck.fixtures.uber import org.scalacheck.{Arbitrary, Gen} import play.api.libs.json.Json case class UberProduct( product_id: Option[String], description: Option[String], display_name: Option[String], ...
mit
mathiasbynens/unicode-data
4.1.0/blocks/CJK-Unified-Ideographs-Extension-A-symbols.js
72601
// All symbols in the CJK Unified Ideographs Extension A block as per Unicode v4.1.0: [ '\u3400', '\u3401', '\u3402', '\u3403', '\u3404', '\u3405', '\u3406', '\u3407', '\u3408', '\u3409', '\u340A', '\u340B', '\u340C', '\u340D', '\u340E', '\u340F', '\u3410', '\u3411', '\u3412', '\u3413', '\u3414', ...
mit
davidespihernandez/energy_market
public/modules/core/config/core.client.config.js
1906
'use strict'; // Configuring the Core module angular.module('core').run(['Menus', function(Menus) { // Add default menu entry Menus.addMenuItem('sidebar', 'Dashboard', 'dashboard', null, '/dashboard', true, null, null, 'icon-speedometer'); //false -> non public Menus.addSubMenuItem('sidebar', 'das...
mit
roncli/FusionBot
log.js
3902
const util = require("util"), queue = []; /** * @type {typeof import("./discord")} */ let Discord; // # // # // # ### ## # // # # # # # // # # # ## // # # # # // ##### ### ### // # # // ### /** * A class that handles logging. */ ...
mit
eamodio/vscode-gitlens
src/commands/externalDiff.ts
5305
'use strict'; import { env, SourceControlResourceState, Uri, window } from 'vscode'; import { ScmResource } from '../@types/vscode.git.resources'; import { ScmResourceGroupType, ScmStatus } from '../@types/vscode.git.resources.enums'; import { Container } from '../container'; import { GitRevision } from '../git/git'; i...
mit
undees/justplayed
features/step_definitions/snap_steps.rb
799
Given /^the following snaps:$/ do |snaps_table| app.snaps = snaps_from_table(snaps_table, :with_timestamp) end Given /^a current time of (.*)$/ do |time| app.time = time end When /^I press (.*)$/ do |station| app.snap station end When /^I look up my snaps$/ do app.lookup_snaps end When /^I restart ...
mit
ISO-tech/sw-d8
web/2006-1/573/573_03_ChippingAway.php
4907
<html> <head> <title> The chipping away of abortion rights </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <?php include "../../legacy-includes/Script.htmlf" ?> </head> <body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0"> <t...
mit
Karasiq/scalajs-highcharts
src/main/scala/com/highstock/config/SeriesAreasplinerangeLabelStyle.scala
943
/** * Automatically generated file. Please do not edit. * @author Highcharts Config Generator by Karasiq * @see [[http://api.highcharts.com/highstock]] */ package com.highstock.config import scalajs.js, js.`|` import com.highcharts.CleanJsObject import com.highcharts.HighchartsUtils._ /** * @note JavaScript...
mit
sloops77/ngForge
js/forge.js
4593
angular.module('ngForge', []); angular.module('ngForge').provider('$forge', function() { return { testConnectionUrl: 'ping', $get : ['$http', '$interval', '$window', '$forgeLogger', function($http, $interval, $window, $forgeLogger) { var forgeProvider = this; var dummyForge = { ...
mit
pione/pione
lib/pione/location/dropbox-location.rb
8328
module Pione module Location # DropboxLocation represents locations on Dropbox server. class DropboxLocation < DataLocation set_scheme "dropbox" define(:need_caching, true) define(:real_appendable, false) define(:writable, true) class << self attr_reader :client ...
mit
amitkgupta/goodlearn
classifier/randomforest/randomforest_suite_test.go
209
package randomforest_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" ) func TestRandomforest(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Randomforest Suite") }
mit
emacslisp/Java
SpringFrameworkReading/src/org/springframework/core/NestedExceptionUtils.java
2832
/* * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
mit
ltowarek/coding-interview
4_10_check_subtree/4_10_check_subtree.cpp
5468
// Check Subtree: T1 and T2 are two very large binary trees, with T1 much bigger // than T2. Create an algorithm to determine if T2 is a subtree of T1. // A tree T2 is a subtree of T1 if there exists a node n in T1 such that the // subtree of n is identical to T2. That is, if you cut off the tree at node n, // the two ...
mit
Xi-Plus/Xiplus-zhWP
log-move-whatlinkshere.js
661
javascript: (function() { if (mw.config.get('wgCanonicalSpecialPageName') !== 'Log') { return; } mw.loader.using(['mediawiki.util']).done(function() { $('li.mw-logline-move>a.new:not(.mw-userlink)').each(function(_, e) { $(document.createTextNode(")")).insertAfter(e); ...
mit
lobosky/vcf4IonTorrent
inc/colesterolo.php
2874
<?php /** Colesterolo.php Author : Mauro Lobosky Donadello Description : Open a vcf file and add a AD fields, calculating the values of SAF SAR SRF SRR to obtain AD = X , Y where X = SRF+SRR Y = SAF+SAR the output is a file with the same name of original file but with the prefix "modified_" v0.1 Mauro Lobosky ...
mit
ossimlabs/ossim-plugins
cnes/src/ossimErsSarModel.cpp
19169
//---------------------------------------------------------------------------- // // "Copyright Centre National d'Etudes Spatiales" // // License: LGPL // // See LICENSE.txt file in the top level directory for more details. // //---------------------------------------------------------------------------- // $Id$ #inc...
mit
Lucas-Lu/KotlinWorld
KT10/src/main/java/net/println/kt10/LazyThreadSafeSynchronized.java
415
package net.println.kt10; /** * Created by luliju on 2017/7/8. */ public class LazyThreadSafeSynchronized { private static LazyThreadSafeSynchronized INSTANCE; private LazyThreadSafeSynchronized(){} public static synchronized LazyThreadSafeSynchronized getInstance(){ if(INSTANCE == null){ ...
mit
kevinoid/git-branch-is
test-bin/echo-surprise.js
51
'use strict'; process.stdout.write('surprise\n');
mit
nayanshah/python
photos.py
2406
#!/c/Python27/python import json import os import pickle import sys import time import urllib import facebook ID = 'CreativeIdeass' TOKEN = '' # access token SAFE_CHARS = '-_() abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' def save(res, name='data'): """Save data to a file""" with open(...
mit
bertofer/arxivum-web
src/app/pages/files-page/files-page.service.ts
4413
import { SaveFile } from '../../core/downloader/downloader.actions'; import { IFile } from '../../core/files/files.interfaces'; import * as PlayerActions from '../../core/player/player.actions'; import { IDownloadingFile } from '../../core/downloader/downloader.reducer'; import { Router } from '@angular/router'; import...
mit
kercos/TreeGrammars
TreeGrammars/src/tsg/fragStats/FragmentFinder.java
7341
package tsg.fragStats; import java.io.File; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.ListIterator; import java.util.Scanner; import settings.Parameters; import tsg.Label; import tsg.TSNodeLabel; import tsg.co...
mit
pkzxs/Aurora.Music
Source/Aurora.Music/Controls/SleepTimer.xaml.cs
1430
// Copyright (c) Aurora Studio. All rights reserved. // // Licensed under the MIT License. See LICENSE in the project root for license information. using System; using Aurora.Music.Core; using Aurora.Music.Core.Models; using Windows.UI.Xaml.Controls; // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“内容对话框”项模板 ...
mit
fvasquezjatar/fermat-unused
CCP/plugin/transaction/fermat-ccp-plugin-transaction-outgoing-intra-actor-bitdubai/src/main/java/com/bitdubai/fermat_ccp_plugin/layer/transaction/outgoing_intra_actor/developer/bitdubai/version_1/interfaces/OutgoingIntraActorTransactionHandler.java
825
package com.bitdubai.fermat_ccp_plugin.layer.transaction.outgoing_intra_actor.developer.bitdubai.version_1.interfaces; import com.bitdubai.fermat_api.layer.all_definition.transaction_transference_protocol.crypto_transactions.CryptoStatus; import com.bitdubai.fermat_ccp_plugin.layer.transaction.outgoing_intra_actor.dev...
mit
deviqllc/Eventos
Eventos.Core/EventoExceptions.cs
814
using System; using Eventos.Core.Interfaces; namespace Eventos.Core.Exceptions { public class EventoException : Exception { public EventoException () : base() { } public EventoException(string Message) : base(Message) { } } public class EventoExecutionPlanException : EventoException { public Even...
mit
smihica/Fashion
compile.py
4514
#!/usr/bin/python -S import sys import os import re import argparse import random from cStringIO import StringIO class ApplicationException(Exception): pass def gencharset(spec): retval = u'' for item in re.finditer(ur'([^\\-]|\\-|\\\\)(?:-([^\\-]|\\-|\\\\))?', spec): if item.group(2): ...
mit
gongmingqm10/ZhihuDaily
app/src/main/java/net/gongmingqm10/zhihu/presenter/DesignersPresenter.java
351
package net.gongmingqm10.zhihu.presenter; import net.gongmingqm10.zhihu.network.ZhihuApi; public class DesignersPresenter extends Presenter<DesignersPresenter.DesignersView> { public DesignersPresenter(DesignersView view, ZhihuApi zhihuApi) { super(view, zhihuApi); } public interface DesignersVi...
mit
niki-funky/Telerik_Academy
Web Development/ASP.NET MVC/TeamWork/LizardmanCinemas/LizardmanCinemas/LizardmanCinemas.Data/IRepository.cs
350
using System; using System.Linq; namespace LizardmanCinemas.Data { public interface IRepository<T> where T : class { IQueryable<T> All(); T GetById(int? id); void Add(T entity); void Update(T entity); void Delete(T entity); void Delete(int id); voi...
mit
aL3891/RioSharp
RioSharp/RioTcpListener.cs
6048
using System; using System.ComponentModel; using System.Net; using System.Runtime.InteropServices; using System.Threading; namespace RioSharp { public class RioTcpListener : RioConnectionOrientedSocketPool { internal IntPtr _listenerSocket; internal IntPtr _listenIocp; public Action<Ri...
mit
lupidan/Tetris
Assets/Scripts/Sounds/SoundManager.cs
128
 namespace Tetris { public interface SoundManager { void PlaySoundWithIdentifier(string identifier); } }
mit
CiscoUKIDCDev/HP3ParPlugin
3PAR_Plugin/src/com/cisco/matday/ucsd/hp3par/rest/hosts/HP3ParHostList.java
3195
/******************************************************************************* * Copyright (c) 2016 Cisco and/or its affiliates * @author Matt Day * * 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...
mit
SolidPatterns/EasySubtitle
EasySubtitle.WPF/Models/SubtitleLanguage.cs
189
using OSDBnet; namespace EasySubtitle.WPF.Models { public class SubtitleLanguage { public Language Language { get; set; } public bool Checked { get; set; } } }
mit
McVago/UNO-POO
src/UNO/src/andrey/UNO/Client/Client.java
5090
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package andrey.UNO.Client; import andrey.UNO.Card.Card; import andrey.UNO.Server.Action; import andrey.UNO.Server.IServer; import java...
mit
georgecrawford/intro-to-docker-and-k8s-for-node-devs
demos/index.js
5318
const express = require('express'); const app = express(); const fs = require('fs'); const readFile = require('util').promisify(fs.readFile); const readdir = require('util').promisify(fs.readdir); const css = readFile('../asciinema/asciinema-player.css'); const js = readFile('../asciinema/asciinema-player.js'); const ...
mit
Klaital/vitasa-web
db/migrate/20181028180519_create_work_logs.rb
305
class CreateWorkLogs < ActiveRecord::Migration[5.0] def change create_table :work_logs do |t| t.integer :user_id t.integer :site_id t.datetime :start_time t.datetime :end_time t.boolean :approved, default: false t.timestamps end end end
mit
SparkartGroupInc/handlebars-helper
lib/helpers/last.js
745
var _isArray = require('lodash.isarray'); var _reduce = require('lodash.reduce'); module.exports = function( collection, count, options ){ options = options || count; count = ( typeof count === 'number' ) ? count : 1; // if collection is an object, make it an array // otherwise we have no way to clip off the "end"...
mit
colinmarc/impala-ruby
lib/impala/sasl_transport.rb
3276
require 'gssapi' module Impala class SASLTransport < Thrift::FramedTransport STATUS_BYTES = 1 PAYLOAD_LENGTH_BYTES = 4 NEGOTIATION_STATUS = { START: 0x01, OK: 0x02, BAD: 0x03, ERROR: 0x04, COMPLETE: 0x05 } def initialize(transport, mechanism, option...
mit
aspose-html/Aspose.Html-for-.NET
Demos/src/Aspose.HTML.Live.Demos.UI/Controllers/BaseController.cs
2877
using Aspose.HTML.Live.Demos.UI.Config; using Aspose.HTML.Live.Demos.UI.Models; using Aspose.HTML.Live.Demos.UI.Services; using Aspose.HTML.Live.Demos.UI.Helpers; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Net.Http; using Aspose.HTML.Live.Demo...
mit
Igor-Men/AmChartsBundle
Charts/DefaultConfigs/StackedBarChartWithNegativeValuesDefault.php
4983
<?php namespace IK\AmChartsBundle\Charts\DefaultConfigs; class StackedBarChartWithNegativeValuesDefault extends AbstractChartDefault { protected function getChartScript() { return '<script src="https://www.amcharts.com/lib/3/serial.js"></script>'; } public function getDefaultJs() { $stri...
mit
weblogng/angular-weblogng
Gruntfile.js
1709
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { options: { separator: "\n\n" }, dist: { src: [ 'src/main.js' ], dest: 'dist/<%= pkg.name.replace(".js", "") %>.js' } }, uglify...
mit
jugglinmike/es6draft
src/main/java/com/github/anba/es6draft/Executable.java
619
/** * Copyright (c) 2012-2016 André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ package com.github.anba.es6draft; import com.github.anba.es6draft.runtime.internal.RuntimeInfo; /** * <h1>15 ECMAScript Language: Scripts and M...
mit
rosekrans/Lexia
src/org/lexia/core/scope/Scope.java
2517
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.lexia.core.scope; import org.lexia.core.format.Label; import org.lexia.core.format.MemberListFormat; import org.l...
mit
Camyul/Modul_1
Object-Oriented-Programming/05. OOP-Principles-Part-2/02. Bank accounts/DepositAcc.cs
1274
namespace Bank_accounts { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; public class DepositAccount : Accounts, Ideposit, IWithDraw { public DepositAccount(Customers client, decimal balance, decimal interestRate)...
mit
fabiolourenzipucrs/scaling-journey
monopoly/src/test/java/edu/nsu/monopoly/PlayerTest.java
3180
package edu.nsu.monopoly; import static org.junit.Assert.*; import org.junit.*; import edu.ncsu.monopoly.GameBoard; import edu.ncsu.monopoly.GameMaster; import edu.ncsu.monopoly.IOwnable; import edu.ncsu.monopoly.MockGUI; import edu.ncsu.monopoly.Player; import edu.ncsu.monopoly.PropertyCell; import edu....
mit
adiachenko/catchy_api
app/Services/Reporters/Reporter.php
160
<?php namespace App\Services\Reporters; interface Reporter { public function reportMessage($message); public function reportException($exception); }
mit
Seidemann-Web/FACT-Finder-PHP-Library
src/FACTFinder/Custom/Core/XmlConfiguration.php
1560
<?php namespace FACTFinder\Custom\Core; class XmlConfiguration extends \FACTFinder\Core\XmlConfiguration { /** * use user credentials of backend user instead of shop user * * @var bool */ protected $isBackendUser = false; /** * getChannel * * modified to return shop l...
mit
ksdgroep/frontoffice365
src/app/paymentinfo/paymentinfo.component.ts
3041
import { Component, OnInit, ViewChild } from '@angular/core'; import { Order } from '../bll/order'; import { Country } from '../bll/country'; import { Course } from '../bll/course'; import { CountryService } from '../services/country.service'; import { GlobalFunctionsService } from '../services/global-functions.servic...
mit
shellyginelle/Code-With-Venus
Old/dist/extensions/extra/HTMLHinter/parser.js
702
define(function(require){"use strict";var slowparse=require("../../../thirdparty/slowparse/slowparse");var errorMessages=require("strings");function templatify(input,macros){if(!macros){return input.replace(new RegExp("\\[\\[[^\\]]+\\]\\]","g"),"")}return input.replace(new RegExp("\\[\\[([^\\]]+)\\]\\]","g"),function(a...
mit
jscad/csg.js
src/primitives/arc.js
2821
const {EPS} = require('../math/constants') const {radToDeg, degToRad} = require('../math/utils') const vec2 = require('../math/vec2') const path2 = require('../geometry/path2') /** Construct an arc. * @param {Object} options - options for construction * @param {Array} [options.center=[0,0]] - center of arc * @pa...
mit
AlfonzAlfonz/massivemanager
app/Gear/Framework/Stream.php
1005
<?php namespace Gear\Framework; class Stream extends Base { private static $content; private static $handles = []; public static function write(string $content) { self::$content .= $content; foreach (self::$handles as $value) { fwrite($value, $content); } } public static function writeLine($content)...
mit
tamago-db/LinkedinImporterBundle
Form/ReceivePrivate.php
1255
<?php namespace CCC\LinkedinImporterBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Validator\Constraints\EqualTo; use Symf...
mit
koheimiya/extheano
extheano/jit.py
7561
'''Classes related to the auto-compilation''' import copy import inspect import functools # import types import numpy as np import theano import theano.tensor as T from .nodebuffer import UpdateCollector class JITCompiler(object): '''Decorator for your theano-function You can call your theano-function wi...
mit
v2ray/v2ray-core
proxy/vmess/inbound/inbound.go
10028
// +build !confonly package inbound //go:generate go run v2ray.com/core/common/errors/errorgen import ( "context" "io" "strings" "sync" "time" "v2ray.com/core" "v2ray.com/core/common" "v2ray.com/core/common/buf" "v2ray.com/core/common/errors" "v2ray.com/core/common/log" "v2ray.com/core/common/net" "v2ra...
mit