commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
202206c5cc45b5526ea5857090debd7c8c419347
README.md
README.md
ownCloud upgrade scripts ======================== The scripts on this repository can be used to assist an ownCloud upgrade. They just extract some information from ownCloud that can be used to restore the old state on a clean database.
ownCloud upgrade scripts ======================== The scripts on this repository can be used to assist an ownCloud upgrade. They just extract some information from ownCloud that can be used to restore the old state on a clean database. Read the article [Upgrading a large ownCloud instance](http://jorgelp.com/2015/06/upgrading-a-large-owncloud-instance/) to know when to use them.
Add a link to the ownCloud upgrade article
Add a link to the ownCloud upgrade article
Markdown
mit
adobo/owncloud_upgrade,adobo/owncloud_upgrade
markdown
## Code Before: ownCloud upgrade scripts ======================== The scripts on this repository can be used to assist an ownCloud upgrade. They just extract some information from ownCloud that can be used to restore the old state on a clean database. ## Instruction: Add a link to the ownCloud upgrade article ## Code After: ownCloud upgrade scripts ======================== The scripts on this repository can be used to assist an ownCloud upgrade. They just extract some information from ownCloud that can be used to restore the old state on a clean database. Read the article [Upgrading a large ownCloud instance](http://jorgelp.com/2015/06/upgrading-a-large-owncloud-instance/) to know when to use them.
ownCloud upgrade scripts ======================== The scripts on this repository can be used to assist an ownCloud upgrade. They just extract some information from ownCloud that can be used to restore the old state on a clean database. + + Read the article [Upgrading a large ownCloud instance](http://jorgelp.com/2015/06/upgrading-a-large-owncloud-instance/) to know when to use them.
2
0.285714
2
0
e6e2784595c41299e9ac4d6937efb9ed6d881ca6
src/schema-form.module.ts
src/schema-form.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormElementComponent } from './formelement.component'; import { FormComponent } from './form.component'; import { WidgetChooserComponent } from './widgetchooser.component'; import { ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget } from './defaultwidgets'; import { DefaultWidget } from './default.widget'; @NgModule({ imports : [CommonModule, FormsModule, ReactiveFormsModule], declarations: [ FormElementComponent, FormComponent, WidgetChooserComponent, DefaultWidget, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], entryComponents: [ FormElementComponent, FormComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], exports: [ FormComponent, FormElementComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget ] }) export class SchemaFormModule {}
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormElementComponent } from './formelement.component'; import { FormComponent } from './form.component'; import { WidgetChooserComponent } from './widgetchooser.component'; import { ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget } from './defaultwidgets'; import { DefaultWidget } from './default.widget'; @NgModule({ imports : [CommonModule, FormsModule, ReactiveFormsModule], declarations: [ FormElementComponent, FormComponent, WidgetChooserComponent, DefaultWidget, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], entryComponents: [ FormElementComponent, FormComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], exports: [ FormComponent, FormElementComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget ] }) export class SchemaFormModule {}
Add widget ChooserComponent to exports
Add widget ChooserComponent to exports
TypeScript
mit
SBats/angular2-schema-form,SBats/angular2-schema-form,SBats/angular2-schema-form
typescript
## Code Before: import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormElementComponent } from './formelement.component'; import { FormComponent } from './form.component'; import { WidgetChooserComponent } from './widgetchooser.component'; import { ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget } from './defaultwidgets'; import { DefaultWidget } from './default.widget'; @NgModule({ imports : [CommonModule, FormsModule, ReactiveFormsModule], declarations: [ FormElementComponent, FormComponent, WidgetChooserComponent, DefaultWidget, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], entryComponents: [ FormElementComponent, FormComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], exports: [ FormComponent, FormElementComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget ] }) export class SchemaFormModule {} ## Instruction: Add widget ChooserComponent to exports ## Code After: import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormElementComponent } from './formelement.component'; import { FormComponent } from './form.component'; import { WidgetChooserComponent } from './widgetchooser.component'; import { ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget } from './defaultwidgets'; import { DefaultWidget } from './default.widget'; @NgModule({ imports : [CommonModule, FormsModule, ReactiveFormsModule], declarations: [ FormElementComponent, FormComponent, WidgetChooserComponent, DefaultWidget, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], entryComponents: [ FormElementComponent, FormComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], exports: [ FormComponent, FormElementComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget ] }) export class SchemaFormModule {}
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormElementComponent } from './formelement.component'; import { FormComponent } from './form.component'; import { WidgetChooserComponent } from './widgetchooser.component'; import { ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget } from './defaultwidgets'; import { DefaultWidget } from './default.widget'; @NgModule({ imports : [CommonModule, FormsModule, ReactiveFormsModule], declarations: [ FormElementComponent, FormComponent, WidgetChooserComponent, DefaultWidget, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], entryComponents: [ FormElementComponent, FormComponent, WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget, ], exports: [ FormComponent, FormElementComponent, + WidgetChooserComponent, ArrayWidget, ObjectWidget, CheckboxWidget, FileWidget, IntegerWidget, TextAreaWidget, RadioWidget, RangeWidget, SelectWidget, StringWidget ] }) export class SchemaFormModule {}
1
0.013333
1
0
fd334903e4b511de94df9e5def148b633e75024c
_config.yml
_config.yml
markdown: redcarpet highlighter: pygments # Permalinks permalink: pretty relative_permalinks: true # Setup title: Kevin O'Connor tagline: 'Software Engineer at large' description: "Software engineer at Google. I occasionally write about some of my <a href='https://github.com/kevinoconnor7'>side projects</a>." url: https://kevo.io baseurl: / author: name: "Kevin O'Connor" url: https://kevo.io paginate: 5 # Custom vars version: 2.1.0 github: repo: https://github.com/poole/hyde
permalink: pretty relative_permalinks: true # Setup title: Kevin O'Connor tagline: 'Software Engineer at large' description: "Software engineer at Google. I occasionally write about some of my <a href='https://github.com/kevinoconnor7'>side projects</a>." url: https://kevo.io baseurl: / author: name: "Kevin O'Connor" url: https://kevo.io paginate: 5 # Custom vars version: 2.1.0 github: repo: https://github.com/poole/hyde
Use Jekyll's default renderer and highlighter
Use Jekyll's default renderer and highlighter
YAML
mit
kevinoconnor7/kevinoconnor7.github.io,kevinoconnor7/kevinoconnor7.github.io,kevinoconnor7/kevinoconnor7.github.io
yaml
## Code Before: markdown: redcarpet highlighter: pygments # Permalinks permalink: pretty relative_permalinks: true # Setup title: Kevin O'Connor tagline: 'Software Engineer at large' description: "Software engineer at Google. I occasionally write about some of my <a href='https://github.com/kevinoconnor7'>side projects</a>." url: https://kevo.io baseurl: / author: name: "Kevin O'Connor" url: https://kevo.io paginate: 5 # Custom vars version: 2.1.0 github: repo: https://github.com/poole/hyde ## Instruction: Use Jekyll's default renderer and highlighter ## Code After: permalink: pretty relative_permalinks: true # Setup title: Kevin O'Connor tagline: 'Software Engineer at large' description: "Software engineer at Google. I occasionally write about some of my <a href='https://github.com/kevinoconnor7'>side projects</a>." url: https://kevo.io baseurl: / author: name: "Kevin O'Connor" url: https://kevo.io paginate: 5 # Custom vars version: 2.1.0 github: repo: https://github.com/poole/hyde
- markdown: redcarpet - highlighter: pygments - - # Permalinks permalink: pretty relative_permalinks: true # Setup title: Kevin O'Connor tagline: 'Software Engineer at large' description: "Software engineer at Google. I occasionally write about some of my <a href='https://github.com/kevinoconnor7'>side projects</a>." url: https://kevo.io baseurl: / author: name: "Kevin O'Connor" url: https://kevo.io paginate: 5 # Custom vars version: 2.1.0 github: repo: https://github.com/poole/hyde
4
0.16
0
4
e05daaafb68f4042b0daf12efdc8e3eeab9773a7
test.sh
test.sh
ami_id=${1} function finish { code=$? summon env AMI_ID=${ami_id} chef exec kitchen destroy return ${code} } trap finish EXIT echo "Launching test instance from ${ami_id}" summon env AMI_ID=${ami_id} chef exec kitchen converge echo "Testing health endpoint" public_hostname=$(cat .kitchen/default-coreos-stable.yml | grep hostname | awk -F ' ' '{print $2}') sleep 5 response_code=$(curl -k -s -o health.response -w "%{http_code}" https://${public_hostname}/health) if [ "${response_code}" != "200" ]; then echo "Expected 200" echo "Got ${response_code}" echo "" echo $(cat health.response) exit 1 fi echo "PASSED!"
ami_id=${1} finish() { code=$? summon env AMI_ID=${ami_id} chef exec kitchen destroy return ${code} } trap finish EXIT echo "Launching test instance from ${ami_id}" summon env AMI_ID=${ami_id} chef exec kitchen converge echo "Testing health endpoint" public_hostname=$(cat .kitchen/default-coreos-stable.yml | grep hostname | awk -F ' ' '{print $2}') sleep 5 response_code=$(curl -k -s -o health.response -w "%{http_code}" https://${public_hostname}/health) if [ "${response_code}" != "200" ]; then echo "Expected 200" echo "Got ${response_code}" echo "" echo $(cat health.response) exit 1 fi echo "PASSED!"
Use old-style bash function declaration
Use old-style bash function declaration
Shell
mit
conjurinc/appliance-docker
shell
## Code Before: ami_id=${1} function finish { code=$? summon env AMI_ID=${ami_id} chef exec kitchen destroy return ${code} } trap finish EXIT echo "Launching test instance from ${ami_id}" summon env AMI_ID=${ami_id} chef exec kitchen converge echo "Testing health endpoint" public_hostname=$(cat .kitchen/default-coreos-stable.yml | grep hostname | awk -F ' ' '{print $2}') sleep 5 response_code=$(curl -k -s -o health.response -w "%{http_code}" https://${public_hostname}/health) if [ "${response_code}" != "200" ]; then echo "Expected 200" echo "Got ${response_code}" echo "" echo $(cat health.response) exit 1 fi echo "PASSED!" ## Instruction: Use old-style bash function declaration ## Code After: ami_id=${1} finish() { code=$? summon env AMI_ID=${ami_id} chef exec kitchen destroy return ${code} } trap finish EXIT echo "Launching test instance from ${ami_id}" summon env AMI_ID=${ami_id} chef exec kitchen converge echo "Testing health endpoint" public_hostname=$(cat .kitchen/default-coreos-stable.yml | grep hostname | awk -F ' ' '{print $2}') sleep 5 response_code=$(curl -k -s -o health.response -w "%{http_code}" https://${public_hostname}/health) if [ "${response_code}" != "200" ]; then echo "Expected 200" echo "Got ${response_code}" echo "" echo $(cat health.response) exit 1 fi echo "PASSED!"
ami_id=${1} - function finish { + finish() { code=$? summon env AMI_ID=${ami_id} chef exec kitchen destroy return ${code} } trap finish EXIT echo "Launching test instance from ${ami_id}" summon env AMI_ID=${ami_id} chef exec kitchen converge echo "Testing health endpoint" public_hostname=$(cat .kitchen/default-coreos-stable.yml | grep hostname | awk -F ' ' '{print $2}') sleep 5 response_code=$(curl -k -s -o health.response -w "%{http_code}" https://${public_hostname}/health) if [ "${response_code}" != "200" ]; then echo "Expected 200" echo "Got ${response_code}" echo "" echo $(cat health.response) exit 1 fi echo "PASSED!"
2
0.064516
1
1
8cb4f5d8879c573a4fe690c4f53c2b0a99d18d69
nbresuse/handlers.py
nbresuse/handlers.py
import os import json import psutil from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler def get_metrics(): cur_process = psutil.Process() all_processes = [cur_process] + cur_process.children(recursive=True) rss = sum([p.memory_info().rss for p in all_processes]) return { 'rss': rss, 'limits': { 'memory': int(os.environ.get('MEM_LIMIT', None)) } } class MetricsHandler(IPythonHandler): def get(self): self.finish(json.dumps(get_metrics())) def setup_handlers(web_app): route_pattern = url_path_join(web_app.settings['base_url'], '/metrics') web_app.add_handlers('.*', [(route_pattern, MetricsHandler)])
import os import json import psutil from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler def get_metrics(): cur_process = psutil.Process() all_processes = [cur_process] + cur_process.children(recursive=True) rss = sum([p.memory_info().rss for p in all_processes]) mem_limit = os.environ.get('MEM_LIMIT', None) if mem_limit is not None: mem_limit = int(mem_limit) return { 'rss': rss, 'limits': { 'memory': mem_limit } } class MetricsHandler(IPythonHandler): def get(self): self.finish(json.dumps(get_metrics())) def setup_handlers(web_app): route_pattern = url_path_join(web_app.settings['base_url'], '/metrics') web_app.add_handlers('.*', [(route_pattern, MetricsHandler)])
Handle case of memory limit not set.
Handle case of memory limit not set.
Python
bsd-2-clause
yuvipanda/nbresuse,yuvipanda/nbresuse
python
## Code Before: import os import json import psutil from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler def get_metrics(): cur_process = psutil.Process() all_processes = [cur_process] + cur_process.children(recursive=True) rss = sum([p.memory_info().rss for p in all_processes]) return { 'rss': rss, 'limits': { 'memory': int(os.environ.get('MEM_LIMIT', None)) } } class MetricsHandler(IPythonHandler): def get(self): self.finish(json.dumps(get_metrics())) def setup_handlers(web_app): route_pattern = url_path_join(web_app.settings['base_url'], '/metrics') web_app.add_handlers('.*', [(route_pattern, MetricsHandler)]) ## Instruction: Handle case of memory limit not set. ## Code After: import os import json import psutil from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler def get_metrics(): cur_process = psutil.Process() all_processes = [cur_process] + cur_process.children(recursive=True) rss = sum([p.memory_info().rss for p in all_processes]) mem_limit = os.environ.get('MEM_LIMIT', None) if mem_limit is not None: mem_limit = int(mem_limit) return { 'rss': rss, 'limits': { 'memory': mem_limit } } class MetricsHandler(IPythonHandler): def get(self): self.finish(json.dumps(get_metrics())) def setup_handlers(web_app): route_pattern = url_path_join(web_app.settings['base_url'], '/metrics') web_app.add_handlers('.*', [(route_pattern, MetricsHandler)])
import os import json import psutil from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler def get_metrics(): cur_process = psutil.Process() all_processes = [cur_process] + cur_process.children(recursive=True) rss = sum([p.memory_info().rss for p in all_processes]) + mem_limit = os.environ.get('MEM_LIMIT', None) + if mem_limit is not None: + mem_limit = int(mem_limit) return { 'rss': rss, 'limits': { - 'memory': int(os.environ.get('MEM_LIMIT', None)) + 'memory': mem_limit } } class MetricsHandler(IPythonHandler): def get(self): self.finish(json.dumps(get_metrics())) def setup_handlers(web_app): route_pattern = url_path_join(web_app.settings['base_url'], '/metrics') web_app.add_handlers('.*', [(route_pattern, MetricsHandler)])
5
0.192308
4
1
54a9ff619e3fd3eaf71b3ac27baaa47962be18b8
com.woltlab.wcf/templates/recentActivityListItem.tpl
com.woltlab.wcf/templates/recentActivityListItem.tpl
{foreach from=$eventList item=event} <li> <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($event->getUserProfile()->userID)} ignoredUserContent{/if}"> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" title="{$event->getUserProfile()->username}">{@$event->getUserProfile()->getAvatar()->getImageTag(48)}</a> <div> <div class="containerHeadline"> <h3> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" class="userLink" data-user-id="{@$event->getUserProfile()->userID}">{$event->getUserProfile()->username}</a> <small class="separatorLeft">{@$event->time|time}</small> </h3> <div>{@$event->getTitle()}</div> <small class="containerContentType">{lang}wcf.user.recentActivity.{@$event->getObjectTypeName()}{/lang}</small> </div> <div class="containerContent{if !$event->isRawHtml()} htmlContent{/if}">{@$event->getDescription()}</div> </div> </div> </li> {/foreach}
{foreach from=$eventList item=event} <li> <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($event->getUserProfile()->userID)} ignoredUserContent{/if}"> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" title="{$event->getUserProfile()->username}">{@$event->getUserProfile()->getAvatar()->getImageTag(48)}</a> <div> <div class="containerHeadline"> <h3> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" class="userLink" data-user-id="{@$event->getUserProfile()->userID}">{$event->getUserProfile()->username}</a> <small class="separatorLeft">{@$event->time|time}</small> </h3> <div>{@$event->getTitle()}</div> <small class="containerContentType">{lang}wcf.user.recentActivity.{@$event->getObjectTypeName()}{/lang}</small> </div> {if $event->getDescription()} <div class="containerContent{if !$event->isRawHtml()} htmlContent{/if}">{@$event->getDescription()}</div> {/if} </div> </div> </li> {/foreach}
Hide content element if event has no description
Hide content element if event has no description
Smarty
lgpl-2.1
Cyperghost/WCF,WoltLab/WCF,joshuaruesweg/WCF,MenesesEvandro/WCF,SoftCreatR/WCF,Morik/WCF,Cyperghost/WCF,Morik/WCF,joshuaruesweg/WCF,SoftCreatR/WCF,Cyperghost/WCF,MenesesEvandro/WCF,WoltLab/WCF,Cyperghost/WCF,Morik/WCF,WoltLab/WCF,Cyperghost/WCF,WoltLab/WCF,SoftCreatR/WCF,SoftCreatR/WCF,joshuaruesweg/WCF,Morik/WCF
smarty
## Code Before: {foreach from=$eventList item=event} <li> <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($event->getUserProfile()->userID)} ignoredUserContent{/if}"> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" title="{$event->getUserProfile()->username}">{@$event->getUserProfile()->getAvatar()->getImageTag(48)}</a> <div> <div class="containerHeadline"> <h3> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" class="userLink" data-user-id="{@$event->getUserProfile()->userID}">{$event->getUserProfile()->username}</a> <small class="separatorLeft">{@$event->time|time}</small> </h3> <div>{@$event->getTitle()}</div> <small class="containerContentType">{lang}wcf.user.recentActivity.{@$event->getObjectTypeName()}{/lang}</small> </div> <div class="containerContent{if !$event->isRawHtml()} htmlContent{/if}">{@$event->getDescription()}</div> </div> </div> </li> {/foreach} ## Instruction: Hide content element if event has no description ## Code After: {foreach from=$eventList item=event} <li> <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($event->getUserProfile()->userID)} ignoredUserContent{/if}"> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" title="{$event->getUserProfile()->username}">{@$event->getUserProfile()->getAvatar()->getImageTag(48)}</a> <div> <div class="containerHeadline"> <h3> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" class="userLink" data-user-id="{@$event->getUserProfile()->userID}">{$event->getUserProfile()->username}</a> <small class="separatorLeft">{@$event->time|time}</small> </h3> <div>{@$event->getTitle()}</div> <small class="containerContentType">{lang}wcf.user.recentActivity.{@$event->getObjectTypeName()}{/lang}</small> </div> {if $event->getDescription()} <div class="containerContent{if !$event->isRawHtml()} htmlContent{/if}">{@$event->getDescription()}</div> {/if} </div> </div> </li> {/foreach}
{foreach from=$eventList item=event} <li> <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($event->getUserProfile()->userID)} ignoredUserContent{/if}"> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" title="{$event->getUserProfile()->username}">{@$event->getUserProfile()->getAvatar()->getImageTag(48)}</a> <div> <div class="containerHeadline"> <h3> <a href="{link controller='User' object=$event->getUserProfile()}{/link}" class="userLink" data-user-id="{@$event->getUserProfile()->userID}">{$event->getUserProfile()->username}</a> <small class="separatorLeft">{@$event->time|time}</small> </h3> <div>{@$event->getTitle()}</div> <small class="containerContentType">{lang}wcf.user.recentActivity.{@$event->getObjectTypeName()}{/lang}</small> </div> + {if $event->getDescription()} - <div class="containerContent{if !$event->isRawHtml()} htmlContent{/if}">{@$event->getDescription()}</div> + <div class="containerContent{if !$event->isRawHtml()} htmlContent{/if}">{@$event->getDescription()}</div> ? + + {/if} </div> </div> </li> {/foreach}
4
0.2
3
1
0890fe68f807033151065c5c81933845c19e2022
PoseGallery/PoseGallery/source/application/AppDelegate.swift
PoseGallery/PoseGallery/source/application/AppDelegate.swift
// // AppDelegate.swift // PoseGallery // // Copyright © 2016 Trollwerks Inc. All rights reserved. // import UIKit /** Singleton UIApplication delegate */ @UIApplicationMain public class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Properties /// Root window public var window: UIWindow? // MARK: - UIApplicationDelegate implementations public func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { R.assertValid() startReporting() DataModel.model.intro(launchOptions) return true } public func applicationWillResignActive(application: UIApplication) { } public func applicationDidEnterBackground(application: UIApplication) { DataModel.model.outro() } public func applicationWillEnterForeground(application: UIApplication) { DataModel.model.reintro() } public func applicationDidBecomeActive(application: UIApplication) { } public func applicationWillTerminate(application: UIApplication) { DataModel.model.outro() } }
// // AppDelegate.swift // PoseGallery // // Copyright © 2016 Trollwerks Inc. All rights reserved. // import UIKit /** Singleton UIApplication delegate */ @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Properties /// Root window var window: UIWindow? // MARK: - UIApplicationDelegate implementations func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { R.assertValid() startReporting() DataModel.model.intro(launchOptions) return true } func applicationWillResignActive(application: UIApplication) { } func applicationDidEnterBackground(application: UIApplication) { DataModel.model.outro() } func applicationWillEnterForeground(application: UIApplication) { DataModel.model.reintro() } func applicationDidBecomeActive(application: UIApplication) { } func applicationWillTerminate(application: UIApplication) { DataModel.model.outro() } }
Fix swiftlint missing_docs by depublicizing app delegate
Fix swiftlint missing_docs by depublicizing app delegate No longer needed for testing in Xcode 7.
Swift
mit
alexcurylo/swift-pose-gallery,alexcurylo/swift-pose-gallery,alexcurylo/swift-pose-gallery,alexcurylo/swift-pose-gallery
swift
## Code Before: // // AppDelegate.swift // PoseGallery // // Copyright © 2016 Trollwerks Inc. All rights reserved. // import UIKit /** Singleton UIApplication delegate */ @UIApplicationMain public class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Properties /// Root window public var window: UIWindow? // MARK: - UIApplicationDelegate implementations public func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { R.assertValid() startReporting() DataModel.model.intro(launchOptions) return true } public func applicationWillResignActive(application: UIApplication) { } public func applicationDidEnterBackground(application: UIApplication) { DataModel.model.outro() } public func applicationWillEnterForeground(application: UIApplication) { DataModel.model.reintro() } public func applicationDidBecomeActive(application: UIApplication) { } public func applicationWillTerminate(application: UIApplication) { DataModel.model.outro() } } ## Instruction: Fix swiftlint missing_docs by depublicizing app delegate No longer needed for testing in Xcode 7. ## Code After: // // AppDelegate.swift // PoseGallery // // Copyright © 2016 Trollwerks Inc. All rights reserved. // import UIKit /** Singleton UIApplication delegate */ @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Properties /// Root window var window: UIWindow? // MARK: - UIApplicationDelegate implementations func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { R.assertValid() startReporting() DataModel.model.intro(launchOptions) return true } func applicationWillResignActive(application: UIApplication) { } func applicationDidEnterBackground(application: UIApplication) { DataModel.model.outro() } func applicationWillEnterForeground(application: UIApplication) { DataModel.model.reintro() } func applicationDidBecomeActive(application: UIApplication) { } func applicationWillTerminate(application: UIApplication) { DataModel.model.outro() } }
// // AppDelegate.swift // PoseGallery // // Copyright © 2016 Trollwerks Inc. All rights reserved. // import UIKit /** Singleton UIApplication delegate */ @UIApplicationMain - public class AppDelegate: UIResponder, UIApplicationDelegate { ? ------- + class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Properties /// Root window - public var window: UIWindow? ? ------- + var window: UIWindow? // MARK: - UIApplicationDelegate implementations - public func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { ? ------- + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { R.assertValid() startReporting() DataModel.model.intro(launchOptions) return true } - public func applicationWillResignActive(application: UIApplication) { ? ------- + func applicationWillResignActive(application: UIApplication) { } - public func applicationDidEnterBackground(application: UIApplication) { ? ------- + func applicationDidEnterBackground(application: UIApplication) { DataModel.model.outro() } - public func applicationWillEnterForeground(application: UIApplication) { ? ------- + func applicationWillEnterForeground(application: UIApplication) { DataModel.model.reintro() } - public func applicationDidBecomeActive(application: UIApplication) { ? ------- + func applicationDidBecomeActive(application: UIApplication) { } - public func applicationWillTerminate(application: UIApplication) { ? ------- + func applicationWillTerminate(application: UIApplication) { DataModel.model.outro() } }
16
0.313725
8
8
e3185bd059becaf83aaeed9951f695db4ac32511
schema/remind.py
schema/remind.py
from asyncqlio.orm.schema.column import Column from asyncqlio.orm.schema.table import table_base from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp Table = table_base() class Reminder(Table): # type: ignore id = Column(Serial, primary_key=True) guild_id = Column(BigInt) channel_id = Column(BigInt) message_id = Column(BigInt) user_id = Column(BigInt) time = Column(Timestamp) topic = Column(Text)
from asyncqlio.orm.schema.column import Column from asyncqlio.orm.schema.table import table_base from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp Table = table_base() class Reminder(Table): # type: ignore id = Column(Serial, primary_key=True) guild_id = Column(BigInt) channel_id = Column(BigInt) message_id = Column(BigInt) user_id = Column(BigInt) time = Column(Timestamp) topic = Column(Text, nullable=True)
Allow topic to be nullable in schema
Allow topic to be nullable in schema
Python
mit
BeatButton/beattie-bot,BeatButton/beattie
python
## Code Before: from asyncqlio.orm.schema.column import Column from asyncqlio.orm.schema.table import table_base from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp Table = table_base() class Reminder(Table): # type: ignore id = Column(Serial, primary_key=True) guild_id = Column(BigInt) channel_id = Column(BigInt) message_id = Column(BigInt) user_id = Column(BigInt) time = Column(Timestamp) topic = Column(Text) ## Instruction: Allow topic to be nullable in schema ## Code After: from asyncqlio.orm.schema.column import Column from asyncqlio.orm.schema.table import table_base from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp Table = table_base() class Reminder(Table): # type: ignore id = Column(Serial, primary_key=True) guild_id = Column(BigInt) channel_id = Column(BigInt) message_id = Column(BigInt) user_id = Column(BigInt) time = Column(Timestamp) topic = Column(Text, nullable=True)
from asyncqlio.orm.schema.column import Column from asyncqlio.orm.schema.table import table_base from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp Table = table_base() class Reminder(Table): # type: ignore id = Column(Serial, primary_key=True) guild_id = Column(BigInt) channel_id = Column(BigInt) message_id = Column(BigInt) user_id = Column(BigInt) time = Column(Timestamp) - topic = Column(Text) + topic = Column(Text, nullable=True) ? +++++++++++++++
2
0.133333
1
1
2a5c7648a567c3d8b785fc298fe32184c22e563c
test/integrationTests/testAssets/singleCsproj/.vscode/settings.json
test/integrationTests/testAssets/singleCsproj/.vscode/settings.json
{ //"omnisharp.path": "latest", "omnisharp.path": "C:\\Github\\omnisharp-roslyn\\bin\\Debug\\OmniSharp.Stdio.Driver\\net472\\Omnisharp.exe", "omnisharp.enableRoslynAnalyzers": true }
{ "omnisharp.path": "latest", "omnisharp.enableRoslynAnalyzers": true }
Enable default build instead of local one.
Enable default build instead of local one.
JSON
mit
OmniSharp/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,OmniSharp/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,OmniSharp/omnisharp-vscode,OmniSharp/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,OmniSharp/omnisharp-vscode
json
## Code Before: { //"omnisharp.path": "latest", "omnisharp.path": "C:\\Github\\omnisharp-roslyn\\bin\\Debug\\OmniSharp.Stdio.Driver\\net472\\Omnisharp.exe", "omnisharp.enableRoslynAnalyzers": true } ## Instruction: Enable default build instead of local one. ## Code After: { "omnisharp.path": "latest", "omnisharp.enableRoslynAnalyzers": true }
{ - //"omnisharp.path": "latest", ? -- + "omnisharp.path": "latest", - "omnisharp.path": "C:\\Github\\omnisharp-roslyn\\bin\\Debug\\OmniSharp.Stdio.Driver\\net472\\Omnisharp.exe", "omnisharp.enableRoslynAnalyzers": true }
3
0.6
1
2
70323d2cc7c568fecda66adb0e8ace1922b15b8f
recipes/graphviz/run_test.py
recipes/graphviz/run_test.py
import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=(2,)) for fmt in ['pdf', 'png', 'dot', 'svg']: (x + 1).sum().visualize(filename='graph.%s' % fmt) else: import subprocess subprocess.call(["dot", "-Tpng", "-o", "sample.png", "sample.dot"], shell=True)
import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=(2,)) for fmt in ['pdf', 'png', 'dot', 'svg']: (x + 1).sum().visualize(filename='graph.%s' % fmt) else: import subprocess subprocess.call(["dot", "-Tpng", "-o", "sample.png", "sample.dot"], shell=True) subprocess.call(["dot", "-Tpdf", "-o", "sample.pdf", "sample.dot"], shell=True) subprocess.call(["dot", "-Tsvg", "-o", "sample.svg", "sample.dot"], shell=True)
Add tests for svg and pdf on Windows
Add tests for svg and pdf on Windows
Python
bsd-3-clause
cpaulik/staged-recipes,jerowe/staged-recipes,cpaulik/staged-recipes,asmeurer/staged-recipes,hajapy/staged-recipes,guillochon/staged-recipes,richardotis/staged-recipes,glemaitre/staged-recipes,kwilcox/staged-recipes,patricksnape/staged-recipes,pstjohn/staged-recipes,johannesring/staged-recipes,caspervdw/staged-recipes,petrushy/staged-recipes,sannykr/staged-recipes,isuruf/staged-recipes,birdsarah/staged-recipes,vamega/staged-recipes,sodre/staged-recipes,Cashalow/staged-recipes,khallock/staged-recipes,rmcgibbo/staged-recipes,Juanlu001/staged-recipes,tylere/staged-recipes,scopatz/staged-recipes,vamega/staged-recipes,Savvysherpa/staged-recipes,tylere/staged-recipes,dharhas/staged-recipes,dfroger/staged-recipes,nicoddemus/staged-recipes,JohnGreeley/staged-recipes,shadowwalkersb/staged-recipes,jerowe/staged-recipes,OpenPIV/staged-recipes,jjhelmus/staged-recipes,NOAA-ORR-ERD/staged-recipes,jakirkham/staged-recipes,JohnGreeley/staged-recipes,richardotis/staged-recipes,jakirkham/staged-recipes,data-exp-lab/staged-recipes,ceholden/staged-recipes,sodre/staged-recipes,NOAA-ORR-ERD/staged-recipes,igortg/staged-recipes,hadim/staged-recipes,grlee77/staged-recipes,nicoddemus/staged-recipes,dschreij/staged-recipes,chohner/staged-recipes,rvalieris/staged-recipes,jcb91/staged-recipes,valgur/staged-recipes,larray-project/staged-recipes,birdsarah/staged-recipes,rvalieris/staged-recipes,benvandyke/staged-recipes,goanpeca/staged-recipes,isuruf/staged-recipes,mcernak/staged-recipes,jochym/staged-recipes,sannykr/staged-recipes,data-exp-lab/staged-recipes,petrushy/staged-recipes,sodre/staged-recipes,Juanlu001/staged-recipes,stuertz/staged-recipes,planetarypy/staged-recipes,chrisburr/staged-recipes,mariusvniekerk/staged-recipes,jochym/staged-recipes,chrisburr/staged-recipes,stuertz/staged-recipes,gqmelo/staged-recipes,ocefpaf/staged-recipes,mcernak/staged-recipes,atedstone/staged-recipes,johannesring/staged-recipes,basnijholt/staged-recipes,mariusvniekerk/staged-recipes,patricksnape/staged-recipes,ReimarBauer/staged-recipes,bmabey/staged-recipes,dschreij/staged-recipes,mcs07/staged-recipes,kwilcox/staged-recipes,basnijholt/staged-recipes,koverholt/staged-recipes,atedstone/staged-recipes,SylvainCorlay/staged-recipes,dharhas/staged-recipes,pmlandwehr/staged-recipes,shadowwalkersb/staged-recipes,valgur/staged-recipes,khallock/staged-recipes,barkls/staged-recipes,glemaitre/staged-recipes,dfroger/staged-recipes,hbredin/staged-recipes,benvandyke/staged-recipes,gqmelo/staged-recipes,synapticarbors/staged-recipes,ReimarBauer/staged-recipes,koverholt/staged-recipes,conda-forge/staged-recipes,Cashalow/staged-recipes,caspervdw/staged-recipes,johanneskoester/staged-recipes,ceholden/staged-recipes,rolando-contrib/staged-recipes,hbredin/staged-recipes,rmcgibbo/staged-recipes,conda-forge/staged-recipes,bmabey/staged-recipes,scopatz/staged-recipes,SylvainCorlay/staged-recipes,blowekamp/staged-recipes,ocefpaf/staged-recipes,guillochon/staged-recipes,chohner/staged-recipes,planetarypy/staged-recipes,blowekamp/staged-recipes,asmeurer/staged-recipes,pmlandwehr/staged-recipes,jcb91/staged-recipes,hadim/staged-recipes,barkls/staged-recipes,pstjohn/staged-recipes,igortg/staged-recipes,mcs07/staged-recipes,Savvysherpa/staged-recipes,larray-project/staged-recipes,rolando-contrib/staged-recipes,hajapy/staged-recipes,jjhelmus/staged-recipes,OpenPIV/staged-recipes,johanneskoester/staged-recipes,grlee77/staged-recipes,synapticarbors/staged-recipes,goanpeca/staged-recipes
python
## Code Before: import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=(2,)) for fmt in ['pdf', 'png', 'dot', 'svg']: (x + 1).sum().visualize(filename='graph.%s' % fmt) else: import subprocess subprocess.call(["dot", "-Tpng", "-o", "sample.png", "sample.dot"], shell=True) ## Instruction: Add tests for svg and pdf on Windows ## Code After: import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=(2,)) for fmt in ['pdf', 'png', 'dot', 'svg']: (x + 1).sum().visualize(filename='graph.%s' % fmt) else: import subprocess subprocess.call(["dot", "-Tpng", "-o", "sample.png", "sample.dot"], shell=True) subprocess.call(["dot", "-Tpdf", "-o", "sample.pdf", "sample.dot"], shell=True) subprocess.call(["dot", "-Tsvg", "-o", "sample.svg", "sample.dot"], shell=True)
import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=(2,)) for fmt in ['pdf', 'png', 'dot', 'svg']: (x + 1).sum().visualize(filename='graph.%s' % fmt) else: import subprocess subprocess.call(["dot", "-Tpng", "-o", "sample.png", "sample.dot"], shell=True) + subprocess.call(["dot", "-Tpdf", "-o", "sample.pdf", "sample.dot"], shell=True) + subprocess.call(["dot", "-Tsvg", "-o", "sample.svg", "sample.dot"], shell=True)
2
0.111111
2
0
c876915683222b5e12019b4ba5ed0d5a722f22b6
metadata/de.baumann.thema.txt
metadata/de.baumann.thema.txt
Categories:Theming License:GPLv3+ Web Site: Source Code:https://github.com/scoute-dich/Baumann_Theme Issue Tracker:https://github.com/scoute-dich/Baumann_Theme/issues Changelog:https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/CHANGELOG.md Auto Name:Blue Minimal Summary:Minimalistic CM12+ theme Description: A Material Design inspired theme for Lollipop aiming to provide a consistent and minimalistic look to your device. It is based on several other CM12 themes. A device running the Cyanogenmod 12 ROM or any other rom compatible with the CM12 theme engine is needed to use the theme. [https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/screenshots.md Screenshots] . Repo Type:git Repo:https://github.com/scoute-dich/Baumann_Theme Build:3.1,12 commit=8c20ff6a78020b17e8b60860a5e039ecf5c3ce3d subdir=theme gradle=yes Auto Update Mode:None Update Check Mode:RepoManifest Current Version:3.1 Current Version Code:12
Categories:Theming License:GPLv3+ Web Site: Source Code:https://github.com/scoute-dich/Baumann_Theme Issue Tracker:https://github.com/scoute-dich/Baumann_Theme/issues Changelog:https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/CHANGELOG.md Auto Name:Blue Minimal //Wallpaper Summary:Minimalistic CM12+ theme Description: A Material Design inspired theme for Lollipop aiming to provide a consistent and minimalistic look to your device. It is based on several other CM12 themes. A device running the Cyanogenmod 12 ROM or any other rom compatible with the CM12 theme engine is needed to use the theme. [https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/screenshots.md Screenshots] . Repo Type:git Repo:https://github.com/scoute-dich/Baumann_Theme Build:3.1,12 commit=8c20ff6a78020b17e8b60860a5e039ecf5c3ce3d subdir=theme gradle=yes Auto Update Mode:None Update Check Mode:RepoManifest Current Version:3.1 Current Version Code:12
Set autoname of Blue Minimal //Wallpaper
Set autoname of Blue Minimal //Wallpaper
Text
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
text
## Code Before: Categories:Theming License:GPLv3+ Web Site: Source Code:https://github.com/scoute-dich/Baumann_Theme Issue Tracker:https://github.com/scoute-dich/Baumann_Theme/issues Changelog:https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/CHANGELOG.md Auto Name:Blue Minimal Summary:Minimalistic CM12+ theme Description: A Material Design inspired theme for Lollipop aiming to provide a consistent and minimalistic look to your device. It is based on several other CM12 themes. A device running the Cyanogenmod 12 ROM or any other rom compatible with the CM12 theme engine is needed to use the theme. [https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/screenshots.md Screenshots] . Repo Type:git Repo:https://github.com/scoute-dich/Baumann_Theme Build:3.1,12 commit=8c20ff6a78020b17e8b60860a5e039ecf5c3ce3d subdir=theme gradle=yes Auto Update Mode:None Update Check Mode:RepoManifest Current Version:3.1 Current Version Code:12 ## Instruction: Set autoname of Blue Minimal //Wallpaper ## Code After: Categories:Theming License:GPLv3+ Web Site: Source Code:https://github.com/scoute-dich/Baumann_Theme Issue Tracker:https://github.com/scoute-dich/Baumann_Theme/issues Changelog:https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/CHANGELOG.md Auto Name:Blue Minimal //Wallpaper Summary:Minimalistic CM12+ theme Description: A Material Design inspired theme for Lollipop aiming to provide a consistent and minimalistic look to your device. It is based on several other CM12 themes. A device running the Cyanogenmod 12 ROM or any other rom compatible with the CM12 theme engine is needed to use the theme. [https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/screenshots.md Screenshots] . Repo Type:git Repo:https://github.com/scoute-dich/Baumann_Theme Build:3.1,12 commit=8c20ff6a78020b17e8b60860a5e039ecf5c3ce3d subdir=theme gradle=yes Auto Update Mode:None Update Check Mode:RepoManifest Current Version:3.1 Current Version Code:12
Categories:Theming License:GPLv3+ Web Site: Source Code:https://github.com/scoute-dich/Baumann_Theme Issue Tracker:https://github.com/scoute-dich/Baumann_Theme/issues Changelog:https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/CHANGELOG.md - Auto Name:Blue Minimal + Auto Name:Blue Minimal //Wallpaper Summary:Minimalistic CM12+ theme Description: A Material Design inspired theme for Lollipop aiming to provide a consistent and minimalistic look to your device. It is based on several other CM12 themes. A device running the Cyanogenmod 12 ROM or any other rom compatible with the CM12 theme engine is needed to use the theme. [https://github.com/scoute-dich/Baumann_Theme/blob/HEAD/screenshots.md Screenshots] . Repo Type:git Repo:https://github.com/scoute-dich/Baumann_Theme Build:3.1,12 commit=8c20ff6a78020b17e8b60860a5e039ecf5c3ce3d subdir=theme gradle=yes Auto Update Mode:None Update Check Mode:RepoManifest Current Version:3.1 Current Version Code:12
2
0.064516
1
1
729ebd4f3e1c909b0c0123a37d4ebdf5294aa0d5
lib/rubotium/devices.rb
lib/rubotium/devices.rb
module Rubotium class Devices def initialize(options = {}) @match_serial = options[:serial] || '' @match_name = options[:name] || '' @match_sdk = options[:sdk] || '' end def all raise NoDevicesError if attached_devices.empty? raise NoMatchedDevicesError if matched_devices.empty? matched_devices end private attr_reader :matched, :attached_devices, :match_name, :match_serial, :match_sdk def matched_devices @matched_devices ||=[matched_by_name, matched_by_serial, matched_by_sdk].reject( &:empty? ).reduce( :& ) end def attached_devices @attached_devices ||= adb_devices.attached end def matched_by_serial attached_devices.select { |device| device.serial.eql? match_serial } end def matched_by_name attached_devices.select { |device| device.name.include? match_name } end def matched_by_sdk attached_devices.select { |device| device.sdk.eql? match_sdk } end def adb_devices Adb::Devices.new end end end
module Rubotium class Devices def initialize(options = {}) @match_serial = options[:serial] || '' @match_name = options[:name] || '' @match_sdk = options[:sdk] || '' end def all raise NoDevicesError if attached_devices.empty? raise NoMatchedDevicesError if matched_devices.nil? or matched_devices.empty? matched_devices end private attr_reader :matched, :attached_devices, :match_name, :match_serial, :match_sdk def matched_devices @matched_devices ||=[matched_by_name, matched_by_serial, matched_by_sdk].reject( &:empty? ).reduce( :& ) end def attached_devices @attached_devices ||= adb_devices.attached end def matched_by_serial attached_devices.select { |device| device.serial.eql? match_serial } end def matched_by_name attached_devices.select { |device| device.name.include? match_name } end def matched_by_sdk attached_devices.select { |device| device.sdk.eql? match_sdk } end def adb_devices Adb::Devices.new end end end
Handle cases were no match categories have been specified.
Handle cases were no match categories have been specified. Since [].reduce( :& ) will return nil
Ruby
mit
ssmiech/rubotium
ruby
## Code Before: module Rubotium class Devices def initialize(options = {}) @match_serial = options[:serial] || '' @match_name = options[:name] || '' @match_sdk = options[:sdk] || '' end def all raise NoDevicesError if attached_devices.empty? raise NoMatchedDevicesError if matched_devices.empty? matched_devices end private attr_reader :matched, :attached_devices, :match_name, :match_serial, :match_sdk def matched_devices @matched_devices ||=[matched_by_name, matched_by_serial, matched_by_sdk].reject( &:empty? ).reduce( :& ) end def attached_devices @attached_devices ||= adb_devices.attached end def matched_by_serial attached_devices.select { |device| device.serial.eql? match_serial } end def matched_by_name attached_devices.select { |device| device.name.include? match_name } end def matched_by_sdk attached_devices.select { |device| device.sdk.eql? match_sdk } end def adb_devices Adb::Devices.new end end end ## Instruction: Handle cases were no match categories have been specified. Since [].reduce( :& ) will return nil ## Code After: module Rubotium class Devices def initialize(options = {}) @match_serial = options[:serial] || '' @match_name = options[:name] || '' @match_sdk = options[:sdk] || '' end def all raise NoDevicesError if attached_devices.empty? raise NoMatchedDevicesError if matched_devices.nil? or matched_devices.empty? matched_devices end private attr_reader :matched, :attached_devices, :match_name, :match_serial, :match_sdk def matched_devices @matched_devices ||=[matched_by_name, matched_by_serial, matched_by_sdk].reject( &:empty? ).reduce( :& ) end def attached_devices @attached_devices ||= adb_devices.attached end def matched_by_serial attached_devices.select { |device| device.serial.eql? match_serial } end def matched_by_name attached_devices.select { |device| device.name.include? match_name } end def matched_by_sdk attached_devices.select { |device| device.sdk.eql? match_sdk } end def adb_devices Adb::Devices.new end end end
module Rubotium class Devices def initialize(options = {}) @match_serial = options[:serial] || '' @match_name = options[:name] || '' @match_sdk = options[:sdk] || '' end def all raise NoDevicesError if attached_devices.empty? - raise NoMatchedDevicesError if matched_devices.empty? + raise NoMatchedDevicesError if matched_devices.nil? or matched_devices.empty? ? ++++++++++++++++++++++++ matched_devices end private attr_reader :matched, :attached_devices, :match_name, :match_serial, :match_sdk def matched_devices @matched_devices ||=[matched_by_name, matched_by_serial, matched_by_sdk].reject( &:empty? ).reduce( :& ) end def attached_devices @attached_devices ||= adb_devices.attached end def matched_by_serial attached_devices.select { |device| device.serial.eql? match_serial } end def matched_by_name attached_devices.select { |device| device.name.include? match_name } end def matched_by_sdk attached_devices.select { |device| device.sdk.eql? match_sdk } end def adb_devices Adb::Devices.new end end end
2
0.04
1
1
98a59265790fe4c66d6b2c60fa82aedfea6e874b
docs/spelling_wordlist.txt
docs/spelling_wordlist.txt
AbcConnection aioredis api APIs AppVeyor ASC async asyncio AutoConnector AUTH awaitable behavior bitwise blpop bool brpop brpoplpush cardinality ClientInfo CPython codec ConnectionsPool convertion coroutine coroutines dataset decrement DESC dev devel dict downloadable EventLoop failover fallback favour geo geohash geospatial getrange getset google hack'ish hgetall hiredis hkeys hmget honor HOWTO hvals hyperloglog HyperLogLog HyperLogLogs ie IDLETIME indices inline ing ip IPv ish iter JSON kwargs len libuv lindex linting lpop lrange lua maxsize mget minsize mixin mixins MPSC multi namedtuple namespace newkey NODELAY ofcourse pexpire pipelined pipelining pubsub PyPi PyPy pytest randomkey README redis RedisConnection RedisPool redises refactored Reflow REFCOUNT repo rpop rpoplpush rst runnable SHA smembers spop srandmember ssl str substring syscalls TBD TCP timestamp TLS trollius tuple tuples TypeError TypeErrors unclosed unittest unix unixsocket unreceived unsubscribe unsubscribed unsubscribing URI util uvloop UVLoop ValueErrors WIP yield'ing
AbcConnection aioredis api APIs AppVeyor args ASC async asyncio AutoConnector AUTH awaitable behavior bitwise blpop bool brpop brpoplpush cardinality ClientInfo CPython codec ConnectionsPool convertion coroutine coroutines dataset decrement DESC dev devel dict downloadable EventLoop failover fallback favour geo geohash geospatial getrange getset google hack'ish hgetall hiredis hkeys hmget honor HOWTO hvals hyperloglog HyperLogLog HyperLogLogs ie IDLETIME indices inline ing ip IPv ish iter JSON kwargs len libuv lindex linting lpop lrange lua maxsize mget minsize mixin mixins MPSC multi namedtuple namespace newkey NODELAY ofcourse pexpire pipelined pipelining pubsub PyPi PyPy pytest randomkey README redis RedisConnection RedisPool redises refactored Reflow REFCOUNT repo rpop rpoplpush rst runnable SHA smembers spop srandmember ssl str substring syscalls TBD TCP timestamp TLS trollius tuple tuples TypeError TypeErrors Ubuntu unclosed unittest unix unixsocket unreceived unsubscribe unsubscribed unsubscribing URI util uvloop UVLoop ValueErrors WIP yield'ing
Add args to spelling check list
Add args to spelling check list
Text
mit
aio-libs/aioredis,aio-libs/aioredis
text
## Code Before: AbcConnection aioredis api APIs AppVeyor ASC async asyncio AutoConnector AUTH awaitable behavior bitwise blpop bool brpop brpoplpush cardinality ClientInfo CPython codec ConnectionsPool convertion coroutine coroutines dataset decrement DESC dev devel dict downloadable EventLoop failover fallback favour geo geohash geospatial getrange getset google hack'ish hgetall hiredis hkeys hmget honor HOWTO hvals hyperloglog HyperLogLog HyperLogLogs ie IDLETIME indices inline ing ip IPv ish iter JSON kwargs len libuv lindex linting lpop lrange lua maxsize mget minsize mixin mixins MPSC multi namedtuple namespace newkey NODELAY ofcourse pexpire pipelined pipelining pubsub PyPi PyPy pytest randomkey README redis RedisConnection RedisPool redises refactored Reflow REFCOUNT repo rpop rpoplpush rst runnable SHA smembers spop srandmember ssl str substring syscalls TBD TCP timestamp TLS trollius tuple tuples TypeError TypeErrors unclosed unittest unix unixsocket unreceived unsubscribe unsubscribed unsubscribing URI util uvloop UVLoop ValueErrors WIP yield'ing ## Instruction: Add args to spelling check list ## Code After: AbcConnection aioredis api APIs AppVeyor args ASC async asyncio AutoConnector AUTH awaitable behavior bitwise blpop bool brpop brpoplpush cardinality ClientInfo CPython codec ConnectionsPool convertion coroutine coroutines dataset decrement DESC dev devel dict downloadable EventLoop failover fallback favour geo geohash geospatial getrange getset google hack'ish hgetall hiredis hkeys hmget honor HOWTO hvals hyperloglog HyperLogLog HyperLogLogs ie IDLETIME indices inline ing ip IPv ish iter JSON kwargs len libuv lindex linting lpop lrange lua maxsize mget minsize mixin mixins MPSC multi namedtuple namespace newkey NODELAY ofcourse pexpire pipelined pipelining pubsub PyPi PyPy pytest randomkey README redis RedisConnection RedisPool redises refactored Reflow REFCOUNT repo rpop rpoplpush rst runnable SHA smembers spop srandmember ssl str substring syscalls TBD TCP timestamp TLS trollius tuple tuples TypeError TypeErrors Ubuntu unclosed unittest unix unixsocket unreceived unsubscribe unsubscribed unsubscribing URI util uvloop UVLoop ValueErrors WIP yield'ing
AbcConnection aioredis api APIs AppVeyor + args ASC async asyncio AutoConnector AUTH awaitable behavior bitwise blpop bool brpop brpoplpush cardinality ClientInfo CPython codec ConnectionsPool convertion coroutine coroutines dataset decrement DESC dev devel dict downloadable EventLoop failover fallback favour geo geohash geospatial getrange getset google hack'ish hgetall hiredis hkeys hmget honor HOWTO hvals hyperloglog HyperLogLog HyperLogLogs ie IDLETIME indices inline ing ip IPv ish iter JSON kwargs len libuv lindex linting lpop lrange lua maxsize mget minsize mixin mixins MPSC multi namedtuple namespace newkey NODELAY ofcourse pexpire pipelined pipelining pubsub PyPi PyPy pytest randomkey README redis RedisConnection RedisPool redises refactored Reflow REFCOUNT repo rpop rpoplpush rst runnable SHA smembers spop srandmember ssl str substring syscalls TBD TCP timestamp TLS trollius tuple tuples TypeError TypeErrors + Ubuntu unclosed unittest unix unixsocket unreceived unsubscribe unsubscribed unsubscribing URI util uvloop UVLoop ValueErrors WIP yield'ing
2
0.014706
2
0
18fc15c5ee8a0d216e4ff6f97b98b648f7b695f6
osx/set-defaults.sh
osx/set-defaults.sh
defaults write -g ApplePressAndHoldEnabled -bool false # Use AirDrop over every interface. srsly this should be a default. defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 # Always open everything in Finder's list view. This is important. defaults write com.apple.Finder FXPreferredViewStyle Nlsv # Show the ~/Library folder. chflags nohidden ~/Library # Set a really fast key repeat. defaults write NSGlobalDomain KeyRepeat -int 0 # Set the Finder prefs for showing a few different volumes on the Desktop. defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true # Run the screensaver if we're in the bottom-left hot corner. defaults write com.apple.dock wvous-bl-corner -int 5 defaults write com.apple.dock wvous-bl-modifier -int 0 # Hide Safari's bookmark bar. defaults write com.apple.Safari ShowFavoritesBar -bool false # Set up Safari for development. defaults write com.apple.Safari IncludeInternalDebugMenu -bool true defaults write com.apple.Safari IncludeDevelopMenu -bool true defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
defaults write -g ApplePressAndHoldEnabled -bool false # Use AirDrop over every interface. srsly this should be a default. defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 # Always open everything in Finder's list view. This is important. defaults write com.apple.Finder FXPreferredViewStyle Nlsv # Show the ~/Library folder. chflags nohidden ~/Library # Set a really fast key repeat. defaults write NSGlobalDomain KeyRepeat -int 0 # Set the Finder prefs for showing a few different volumes on the Desktop. defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
Remove unwanted OS X Safari defaults.
Remove unwanted OS X Safari defaults.
Shell
mit
MickeyKay/.dotfiles,MickeyKay/dotfiles,MickeyKay/.dotfiles,MickeyKay/dotfiles
shell
## Code Before: defaults write -g ApplePressAndHoldEnabled -bool false # Use AirDrop over every interface. srsly this should be a default. defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 # Always open everything in Finder's list view. This is important. defaults write com.apple.Finder FXPreferredViewStyle Nlsv # Show the ~/Library folder. chflags nohidden ~/Library # Set a really fast key repeat. defaults write NSGlobalDomain KeyRepeat -int 0 # Set the Finder prefs for showing a few different volumes on the Desktop. defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true # Run the screensaver if we're in the bottom-left hot corner. defaults write com.apple.dock wvous-bl-corner -int 5 defaults write com.apple.dock wvous-bl-modifier -int 0 # Hide Safari's bookmark bar. defaults write com.apple.Safari ShowFavoritesBar -bool false # Set up Safari for development. defaults write com.apple.Safari IncludeInternalDebugMenu -bool true defaults write com.apple.Safari IncludeDevelopMenu -bool true defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true defaults write NSGlobalDomain WebKitDeveloperExtras -bool true ## Instruction: Remove unwanted OS X Safari defaults. ## Code After: defaults write -g ApplePressAndHoldEnabled -bool false # Use AirDrop over every interface. srsly this should be a default. defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 # Always open everything in Finder's list view. This is important. defaults write com.apple.Finder FXPreferredViewStyle Nlsv # Show the ~/Library folder. chflags nohidden ~/Library # Set a really fast key repeat. defaults write NSGlobalDomain KeyRepeat -int 0 # Set the Finder prefs for showing a few different volumes on the Desktop. defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
defaults write -g ApplePressAndHoldEnabled -bool false # Use AirDrop over every interface. srsly this should be a default. defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 # Always open everything in Finder's list view. This is important. defaults write com.apple.Finder FXPreferredViewStyle Nlsv # Show the ~/Library folder. chflags nohidden ~/Library # Set a really fast key repeat. defaults write NSGlobalDomain KeyRepeat -int 0 # Set the Finder prefs for showing a few different volumes on the Desktop. defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true - - # Run the screensaver if we're in the bottom-left hot corner. - defaults write com.apple.dock wvous-bl-corner -int 5 - defaults write com.apple.dock wvous-bl-modifier -int 0 - - # Hide Safari's bookmark bar. - defaults write com.apple.Safari ShowFavoritesBar -bool false - - # Set up Safari for development. - defaults write com.apple.Safari IncludeInternalDebugMenu -bool true - defaults write com.apple.Safari IncludeDevelopMenu -bool true - defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true - defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true - defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
14
0.451613
0
14
1bba6bb2366fd59ed711672fe6fda8aaaa758969
src/AppBundle/Entity/User.php
src/AppBundle/Entity/User.php
<?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var \Doctrine\Common\Collections\Collection|UserGroup[] * * @ORM\ManyToMany(targetEntity="UserGroup") * @ORM\JoinTable( * name="user_user_group", * joinColumns={ * @ORM\JoinColumn(name="user_id", referencedColumnName="id") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="user_group_id", referencedColumnName="id") * } * ) */ protected $groups; /** * @var string * * @ORM\Column(type="string") */ private $name; public function __construct() { parent::__construct(); $this->groups = new ArrayCollection(); } /** * @return string */ public function getName() { return $this->name; } /** * @param string $name */ public function setName($name) { $this->name = $name; } }
<?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var \Doctrine\Common\Collections\Collection|UserGroup[] * * @ORM\ManyToMany(targetEntity="UserGroup") * @ORM\JoinTable( * name="user_user_group", * joinColumns={ * @ORM\JoinColumn(name="user_id", referencedColumnName="id") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="user_group_id", referencedColumnName="id") * } * ) */ protected $groups; /** * @var string * * @ORM\Column(type="string") */ private $name; public function __construct() { parent::__construct(); $this->groups = new ArrayCollection(); } /** * @return string */ public function getName() { return $this->name; } /** * @param string $name */ public function setName($name) { $this->name = $name; return $this; } }
Return this object in setName.
Return this object in setName.
PHP
mit
danielnv18/pdevspm,danielnv18/pdevspm,danielnv18/pdevspm,ParallelDevs/pdevspm,ParallelDevs/pdevspm,ParallelDevs/pdevspm
php
## Code Before: <?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var \Doctrine\Common\Collections\Collection|UserGroup[] * * @ORM\ManyToMany(targetEntity="UserGroup") * @ORM\JoinTable( * name="user_user_group", * joinColumns={ * @ORM\JoinColumn(name="user_id", referencedColumnName="id") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="user_group_id", referencedColumnName="id") * } * ) */ protected $groups; /** * @var string * * @ORM\Column(type="string") */ private $name; public function __construct() { parent::__construct(); $this->groups = new ArrayCollection(); } /** * @return string */ public function getName() { return $this->name; } /** * @param string $name */ public function setName($name) { $this->name = $name; } } ## Instruction: Return this object in setName. ## Code After: <?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var \Doctrine\Common\Collections\Collection|UserGroup[] * * @ORM\ManyToMany(targetEntity="UserGroup") * @ORM\JoinTable( * name="user_user_group", * joinColumns={ * @ORM\JoinColumn(name="user_id", referencedColumnName="id") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="user_group_id", referencedColumnName="id") * } * ) */ protected $groups; /** * @var string * * @ORM\Column(type="string") */ private $name; public function __construct() { parent::__construct(); $this->groups = new ArrayCollection(); } /** * @return string */ public function getName() { return $this->name; } /** * @param string $name */ public function setName($name) { $this->name = $name; return $this; } }
<?php namespace AppBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="users") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var \Doctrine\Common\Collections\Collection|UserGroup[] * * @ORM\ManyToMany(targetEntity="UserGroup") * @ORM\JoinTable( * name="user_user_group", * joinColumns={ * @ORM\JoinColumn(name="user_id", referencedColumnName="id") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="user_group_id", referencedColumnName="id") * } * ) */ protected $groups; /** * @var string * * @ORM\Column(type="string") */ private $name; public function __construct() { parent::__construct(); $this->groups = new ArrayCollection(); } /** * @return string */ public function getName() { return $this->name; } /** * @param string $name */ public function setName($name) { $this->name = $name; + + return $this; } }
2
0.030303
2
0
25d25f314c61dd1b07651d18873f73b0d6b21ab5
.travis.yml
.travis.yml
language: python python: - "3.5" - "3.6-dev" install: - pip install tox coveralls script: - if [[ $TRAVIS_PYTHON_VERSION != 3.6-dev ]]; then tox; fi - if [[ $TRAVIS_PYTHON_VERSION == 3.6-dev ]]; then tox -e py36-pytest28,py36-pytest29,py36-pytest30; fi after_success: - coveralls deploy: provider: pypi user: nicoddemus password: secure: bB4adUZVIkt31cmNklskyIDNehujKToGnStnlunp7P8CBF6CGeNqkYU17emAPvfZbTb/ClUpiO9r6AD1ej32Uyr+I8qUyhuYtHG3JGp+WRR/tw+ytAZIJ9i+PMjBv1RAdyLENJ/Tx0LKHKsABr8dQIieLFqKZJuT77f/5ZkvI/U= on: tags: true distributions: sdist bdist_wheel repo: pytest-dev/pytest-mock condition: $TRAVIS_PYTHON_VERSION = 3.5
language: python python: - "3.6" install: - pip install tox coveralls script: - tox after_success: - coveralls deploy: provider: pypi user: nicoddemus password: secure: bB4adUZVIkt31cmNklskyIDNehujKToGnStnlunp7P8CBF6CGeNqkYU17emAPvfZbTb/ClUpiO9r6AD1ej32Uyr+I8qUyhuYtHG3JGp+WRR/tw+ytAZIJ9i+PMjBv1RAdyLENJ/Tx0LKHKsABr8dQIieLFqKZJuT77f/5ZkvI/U= on: tags: true distributions: sdist bdist_wheel repo: pytest-dev/pytest-mock condition: $TRAVIS_PYTHON_VERSION = 3.5
Remove special case for python 3.6-dev from Travis
Remove special case for python 3.6-dev from Travis
YAML
mit
pytest-dev/pytest-mock
yaml
## Code Before: language: python python: - "3.5" - "3.6-dev" install: - pip install tox coveralls script: - if [[ $TRAVIS_PYTHON_VERSION != 3.6-dev ]]; then tox; fi - if [[ $TRAVIS_PYTHON_VERSION == 3.6-dev ]]; then tox -e py36-pytest28,py36-pytest29,py36-pytest30; fi after_success: - coveralls deploy: provider: pypi user: nicoddemus password: secure: bB4adUZVIkt31cmNklskyIDNehujKToGnStnlunp7P8CBF6CGeNqkYU17emAPvfZbTb/ClUpiO9r6AD1ej32Uyr+I8qUyhuYtHG3JGp+WRR/tw+ytAZIJ9i+PMjBv1RAdyLENJ/Tx0LKHKsABr8dQIieLFqKZJuT77f/5ZkvI/U= on: tags: true distributions: sdist bdist_wheel repo: pytest-dev/pytest-mock condition: $TRAVIS_PYTHON_VERSION = 3.5 ## Instruction: Remove special case for python 3.6-dev from Travis ## Code After: language: python python: - "3.6" install: - pip install tox coveralls script: - tox after_success: - coveralls deploy: provider: pypi user: nicoddemus password: secure: bB4adUZVIkt31cmNklskyIDNehujKToGnStnlunp7P8CBF6CGeNqkYU17emAPvfZbTb/ClUpiO9r6AD1ej32Uyr+I8qUyhuYtHG3JGp+WRR/tw+ytAZIJ9i+PMjBv1RAdyLENJ/Tx0LKHKsABr8dQIieLFqKZJuT77f/5ZkvI/U= on: tags: true distributions: sdist bdist_wheel repo: pytest-dev/pytest-mock condition: $TRAVIS_PYTHON_VERSION = 3.5
language: python python: - - "3.5" ? ^ + - "3.6" ? ^ - - "3.6-dev" install: - pip install tox coveralls script: + - tox - - if [[ $TRAVIS_PYTHON_VERSION != 3.6-dev ]]; then tox; fi - - if [[ $TRAVIS_PYTHON_VERSION == 3.6-dev ]]; then tox -e py36-pytest28,py36-pytest29,py36-pytest30; fi after_success: - coveralls deploy: provider: pypi user: nicoddemus password: secure: bB4adUZVIkt31cmNklskyIDNehujKToGnStnlunp7P8CBF6CGeNqkYU17emAPvfZbTb/ClUpiO9r6AD1ej32Uyr+I8qUyhuYtHG3JGp+WRR/tw+ytAZIJ9i+PMjBv1RAdyLENJ/Tx0LKHKsABr8dQIieLFqKZJuT77f/5ZkvI/U= on: tags: true distributions: sdist bdist_wheel repo: pytest-dev/pytest-mock condition: $TRAVIS_PYTHON_VERSION = 3.5
6
0.24
2
4
4cb209ae0092fb23d5b487478a28cb91ee9980af
requirements.txt
requirements.txt
scipy numpy soundfile python-levenshtein torch torchelastic visdom wget librosa numba==0.43.0 llvmlite==0.32.1 tqdm matplotlib flask sox sklearn soundfile pytest hydra-core==1.0.0rc1 google-cloud-storage jupyter
scipy numpy soundfile python-levenshtein torch torchelastic visdom wget librosa numba==0.43.0 llvmlite==0.32.1 tqdm matplotlib flask sox sklearn soundfile pytest hydra-core google-cloud-storage jupyter
Remove hydra-core rc, use latest stable version
Remove hydra-core rc, use latest stable version
Text
mit
SeanNaren/deepspeech.pytorch
text
## Code Before: scipy numpy soundfile python-levenshtein torch torchelastic visdom wget librosa numba==0.43.0 llvmlite==0.32.1 tqdm matplotlib flask sox sklearn soundfile pytest hydra-core==1.0.0rc1 google-cloud-storage jupyter ## Instruction: Remove hydra-core rc, use latest stable version ## Code After: scipy numpy soundfile python-levenshtein torch torchelastic visdom wget librosa numba==0.43.0 llvmlite==0.32.1 tqdm matplotlib flask sox sklearn soundfile pytest hydra-core google-cloud-storage jupyter
scipy numpy soundfile python-levenshtein torch torchelastic visdom wget librosa numba==0.43.0 llvmlite==0.32.1 tqdm matplotlib flask sox sklearn soundfile pytest - hydra-core==1.0.0rc1 + hydra-core google-cloud-storage jupyter
2
0.095238
1
1
f0038b9a13a093b7ac19c04dd0ed3f92bb128718
templates/vote/vote_list.html
templates/vote/vote_list.html
{% for vote in votes %} {% url 'votes:vote' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} <div class="list-group-item"> <a href="{{ vote_url }}"> {{ vote.name }} <a href="#"> <span class="pull-right glyphicon glyphicon-pencil"></span> </a> </a> </div> {% endfor %}
{% for vote in votes %} {% if results == True %} {% url 'votes:results' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} {% else %} {% url 'votes:vote' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} {% endif %} <div class="list-group-item"> <a href="{{ vote_url }}"> {{ vote.name }} <a href="#"> <span class="pull-right glyphicon glyphicon-pencil"></span> </a> </a> </div> {% endfor %}
Add option to generate links to results
Add option to generate links to results
HTML
mit
kuboschek/jay,OpenJUB/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay,kuboschek/jay
html
## Code Before: {% for vote in votes %} {% url 'votes:vote' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} <div class="list-group-item"> <a href="{{ vote_url }}"> {{ vote.name }} <a href="#"> <span class="pull-right glyphicon glyphicon-pencil"></span> </a> </a> </div> {% endfor %} ## Instruction: Add option to generate links to results ## Code After: {% for vote in votes %} {% if results == True %} {% url 'votes:results' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} {% else %} {% url 'votes:vote' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} {% endif %} <div class="list-group-item"> <a href="{{ vote_url }}"> {{ vote.name }} <a href="#"> <span class="pull-right glyphicon glyphicon-pencil"></span> </a> </a> </div> {% endfor %}
{% for vote in votes %} + + {% if results == True %} + {% url 'votes:results' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} + {% else %} - {% url 'votes:vote' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} + {% url 'votes:vote' system_name=vote.system.machine_name vote_name=vote.machine_name as vote_url %} ? ++ + {% endif %} <div class="list-group-item"> <a href="{{ vote_url }}"> {{ vote.name }} <a href="#"> <span class="pull-right glyphicon glyphicon-pencil"></span> </a> </a> </div> {% endfor %}
7
0.5
6
1
4e5e7d8e3c534a8982181b3f9cb665bcda4abb37
src/Language/Scala/Tuple.hs
src/Language/Scala/Tuple.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StaticPointers #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Scala.Tuple where import Control.Distributed.Closure.TH import Language.Java data Tuple2 a b = Tuple2 a b deriving (Show, Eq) withStatic [d| instance (Interpretation a, Interpretation b) => Interpretation (Tuple2 a b) where type Interp (Tuple2 a b) = 'Class "scala.Tuple2" <> '[Interp a, Interp b] instance (Reify a, Reify b) => Reify (Tuple2 a b) where reify jobj = do ja <- call jobj "_1" [] jb <- call jobj "_2" [] Tuple2 <$> (reify $ unsafeCast (ja :: JObject)) <*> (reify $ unsafeCast (jb :: JObject)) instance (Reflect a, Reflect b) => Reflect (Tuple2 a b) where reflect (Tuple2 a b) = do ja <- reflect a jb <- reflect b generic <$> new [coerce $ upcast ja, coerce $ upcast jb] |]
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StaticPointers #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Scala.Tuple where import Control.Distributed.Closure.TH import Language.Java data Tuple2 a b = Tuple2 a b deriving (Show, Eq) withStatic [d| instance (Interpretation a, Interpretation b) => Interpretation (Tuple2 a b) where type Interp (Tuple2 a b) = 'Class "scala.Tuple2" <> '[Interp a, Interp b] instance (Reify a, Reify b) => Reify (Tuple2 a b) where reify jobj = do ja <- call jobj "_1" [] jb <- call jobj "_2" [] Tuple2 <$> (reify $ unsafeCast (ja :: JObject)) <*> (reify $ unsafeCast (jb :: JObject)) instance (Reflect a, Reflect b) => Reflect (Tuple2 a b) where reflect (Tuple2 a b) = do ja <- reflect a jb <- reflect b generic <$> new [coerce $ upcast ja, coerce $ upcast jb] |]
Update sparkle to build with distributed-closure-0.4.0.
Update sparkle to build with distributed-closure-0.4.0.
Haskell
bsd-3-clause
tweag/sparkle,tweag/sparkle
haskell
## Code Before: {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StaticPointers #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Scala.Tuple where import Control.Distributed.Closure.TH import Language.Java data Tuple2 a b = Tuple2 a b deriving (Show, Eq) withStatic [d| instance (Interpretation a, Interpretation b) => Interpretation (Tuple2 a b) where type Interp (Tuple2 a b) = 'Class "scala.Tuple2" <> '[Interp a, Interp b] instance (Reify a, Reify b) => Reify (Tuple2 a b) where reify jobj = do ja <- call jobj "_1" [] jb <- call jobj "_2" [] Tuple2 <$> (reify $ unsafeCast (ja :: JObject)) <*> (reify $ unsafeCast (jb :: JObject)) instance (Reflect a, Reflect b) => Reflect (Tuple2 a b) where reflect (Tuple2 a b) = do ja <- reflect a jb <- reflect b generic <$> new [coerce $ upcast ja, coerce $ upcast jb] |] ## Instruction: Update sparkle to build with distributed-closure-0.4.0. ## Code After: {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StaticPointers #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Scala.Tuple where import Control.Distributed.Closure.TH import Language.Java data Tuple2 a b = Tuple2 a b deriving (Show, Eq) withStatic [d| instance (Interpretation a, Interpretation b) => Interpretation (Tuple2 a b) where type Interp (Tuple2 a b) = 'Class "scala.Tuple2" <> '[Interp a, Interp b] instance (Reify a, Reify b) => Reify (Tuple2 a b) where reify jobj = do ja <- call jobj "_1" [] jb <- call jobj "_2" [] Tuple2 <$> (reify $ unsafeCast (ja :: JObject)) <*> (reify $ unsafeCast (jb :: JObject)) instance (Reflect a, Reflect b) => Reflect (Tuple2 a b) where reflect (Tuple2 a b) = do ja <- reflect a jb <- reflect b generic <$> new [coerce $ upcast ja, coerce $ upcast jb] |]
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} + {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StaticPointers #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Scala.Tuple where import Control.Distributed.Closure.TH import Language.Java data Tuple2 a b = Tuple2 a b deriving (Show, Eq) withStatic [d| instance (Interpretation a, Interpretation b) => Interpretation (Tuple2 a b) where type Interp (Tuple2 a b) = 'Class "scala.Tuple2" <> '[Interp a, Interp b] instance (Reify a, Reify b) => Reify (Tuple2 a b) where reify jobj = do ja <- call jobj "_1" [] jb <- call jobj "_2" [] Tuple2 <$> (reify $ unsafeCast (ja :: JObject)) <*> (reify $ unsafeCast (jb :: JObject)) instance (Reflect a, Reflect b) => Reflect (Tuple2 a b) where reflect (Tuple2 a b) = do ja <- reflect a jb <- reflect b generic <$> new [coerce $ upcast ja, coerce $ upcast jb] |]
1
0.02439
1
0
9e177c40c630083995d75a592c7e6ed569e41cfa
README.md
README.md
My sharing slides ## Topic - [Rock Alfred in NodeJS](https://rwu823.github.io/slides/rock-alfred-in-node)
My sharing slides ## Topic - [Rock Alfred in NodeJS](https://rwu823.github.io/slides/rock-alfred-in-node) - [Selenium for ruten.com](https://rwu823.github.io/slides/selenium-for-ruten)
Add topic: selenium for ruten
Add topic: selenium for ruten
Markdown
mit
rwu823/slides,rwu823/slides
markdown
## Code Before: My sharing slides ## Topic - [Rock Alfred in NodeJS](https://rwu823.github.io/slides/rock-alfred-in-node) ## Instruction: Add topic: selenium for ruten ## Code After: My sharing slides ## Topic - [Rock Alfred in NodeJS](https://rwu823.github.io/slides/rock-alfred-in-node) - [Selenium for ruten.com](https://rwu823.github.io/slides/selenium-for-ruten)
My sharing slides ## Topic - [Rock Alfred in NodeJS](https://rwu823.github.io/slides/rock-alfred-in-node) + - [Selenium for ruten.com](https://rwu823.github.io/slides/selenium-for-ruten)
1
0.142857
1
0
f51eaa04e64d31046d6ab8e44ccbe271f09a410e
README.md
README.md
ts-krinkle-mwSnapshots ====================== ## Install: * Copy `local.php-sample` and rename to `local.php` * Fill in paths for the needed directories (and create them if needed). Keep in mind that the PHP script needs to be able to write, read and remove files from these directories. In the case of `cacheDir`, it needs to be able to create directories as well. * Make sure the path of `mediawikiCoreRepoDir` points to a mediawiki core checkout:<br> `git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core` * Run:<br> `php scripts/updateSnaphots.php` * Symlink `{cacheDir}/snapshots` to `./public_html/builds` * Schedule updateSnaphots.php to run hourly<br> `0 * * * * php /path/to/mwSnapshots/scripts/updateSnaphots.php > {logsDir}/updateSnaphots.log 2>&1` * Symlink `./public_html` to be or to be inside of `/path/to/public_html`
ts-krinkle-mwSnapshots ====================== ## Install: * Copy `local.php-sample` and rename to `local.php` * Fill in paths for the needed directories (and create them if needed). Keep in mind that the PHP script needs to be able to write, read and remove files from these directories. In the case of `cacheDir`, it needs to be able to create directories as well. * Make sure the path of `mediawikiCoreRepoDir` points to a mediawiki core checkout:<br> `git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core` * Run:<br> `php scripts/updateSnaphots.php` * Symlink `{cacheDir}/snapshots` to `./public_html/builds` * Schedule updateSnaphots.php to run hourly<br> `0 * * * * php /path/to/mwSnapshots/scripts/updateSnaphots.php > {logsDir}/updateSnaphots.log 2>&1` * Symlink `./public_html` to be or to be inside of `/path/to/public_html`
Document --depth for mediawiki-core git clone
readme: Document --depth for mediawiki-core git clone
Markdown
mit
Krinkle/mw-tool-snapshots,paladox/mw-tool-snapshots,paladox/mw-tool-snapshots,Krinkle/mw-tool-snapshots
markdown
## Code Before: ts-krinkle-mwSnapshots ====================== ## Install: * Copy `local.php-sample` and rename to `local.php` * Fill in paths for the needed directories (and create them if needed). Keep in mind that the PHP script needs to be able to write, read and remove files from these directories. In the case of `cacheDir`, it needs to be able to create directories as well. * Make sure the path of `mediawikiCoreRepoDir` points to a mediawiki core checkout:<br> `git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core` * Run:<br> `php scripts/updateSnaphots.php` * Symlink `{cacheDir}/snapshots` to `./public_html/builds` * Schedule updateSnaphots.php to run hourly<br> `0 * * * * php /path/to/mwSnapshots/scripts/updateSnaphots.php > {logsDir}/updateSnaphots.log 2>&1` * Symlink `./public_html` to be or to be inside of `/path/to/public_html` ## Instruction: readme: Document --depth for mediawiki-core git clone ## Code After: ts-krinkle-mwSnapshots ====================== ## Install: * Copy `local.php-sample` and rename to `local.php` * Fill in paths for the needed directories (and create them if needed). Keep in mind that the PHP script needs to be able to write, read and remove files from these directories. In the case of `cacheDir`, it needs to be able to create directories as well. * Make sure the path of `mediawikiCoreRepoDir` points to a mediawiki core checkout:<br> `git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core` * Run:<br> `php scripts/updateSnaphots.php` * Symlink `{cacheDir}/snapshots` to `./public_html/builds` * Schedule updateSnaphots.php to run hourly<br> `0 * * * * php /path/to/mwSnapshots/scripts/updateSnaphots.php > {logsDir}/updateSnaphots.log 2>&1` * Symlink `./public_html` to be or to be inside of `/path/to/public_html`
ts-krinkle-mwSnapshots ====================== ## Install: * Copy `local.php-sample` and rename to `local.php` * Fill in paths for the needed directories (and create them if needed). Keep in mind that the PHP script needs to be able to write, read and remove files from these directories. In the case of `cacheDir`, it needs to be able to create directories as well. * Make sure the path of `mediawikiCoreRepoDir` points to a mediawiki core checkout:<br> - `git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core` + `git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki-core` ? ++++++++++ * Run:<br> `php scripts/updateSnaphots.php` * Symlink `{cacheDir}/snapshots` to `./public_html/builds` * Schedule updateSnaphots.php to run hourly<br> `0 * * * * php /path/to/mwSnapshots/scripts/updateSnaphots.php > {logsDir}/updateSnaphots.log 2>&1` * Symlink `./public_html` to be or to be inside of `/path/to/public_html`
2
0.125
1
1
c14e89ab83e035103c58ed57c3681b64278c4a75
lib/utils/cmd.js
lib/utils/cmd.js
const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ module.exports.findPackageFileInPath = input => { if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; };
const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ const findPackageFileInPath = input => { if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; }; module.exports = { findPackageFileInPath };
Change how method is exported.
Change how method is exported.
JavaScript
mit
neogeek/doxdox
javascript
## Code Before: const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ module.exports.findPackageFileInPath = input => { if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; }; ## Instruction: Change how method is exported. ## Code After: const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ const findPackageFileInPath = input => { if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; }; module.exports = { findPackageFileInPath };
const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ - module.exports.findPackageFileInPath = input => { ? ^ ^^^^^^^^^^ ^^ + const findPackageFileInPath = input => { ? ^ ^^ ^ if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; }; + + module.exports = { + findPackageFileInPath + };
6
0.142857
5
1
aa533f5806fbc847cdd2a44f489cc093b31c3be2
tools/check-coding-style.mk
tools/check-coding-style.mk
check-coding-style: @fail=0; \ if test -n "$(check_misc_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-misc.sh \ $(check_misc_sources) || fail=1; \ fi; \ if test -n "$(check_c_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-c-style.sh \ $(check_c_sources) || fail=1; \ fi;\ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \ exit "$$fail";\ else \ exit 0;\ fi
check-coding-style: @fail=0; \ if test -n "$(check_misc_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-misc.sh \ $(addprefix $(srcdir)/,$(check_misc_sources)) || fail=1; \ fi; \ if test -n "$(check_c_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-c-style.sh \ $(addprefix $(srcdir)/,$(check_c_sources)) || fail=1; \ fi;\ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \ exit "$$fail";\ else \ exit 0;\ fi
Fix coding style checks for out-of-tree builds
Fix coding style checks for out-of-tree builds
Makefile
lgpl-2.1
community-ssu/telepathy-gabble,community-ssu/telepathy-gabble,community-ssu/telepathy-gabble,community-ssu/telepathy-gabble
makefile
## Code Before: check-coding-style: @fail=0; \ if test -n "$(check_misc_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-misc.sh \ $(check_misc_sources) || fail=1; \ fi; \ if test -n "$(check_c_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-c-style.sh \ $(check_c_sources) || fail=1; \ fi;\ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \ exit "$$fail";\ else \ exit 0;\ fi ## Instruction: Fix coding style checks for out-of-tree builds ## Code After: check-coding-style: @fail=0; \ if test -n "$(check_misc_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-misc.sh \ $(addprefix $(srcdir)/,$(check_misc_sources)) || fail=1; \ fi; \ if test -n "$(check_c_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-c-style.sh \ $(addprefix $(srcdir)/,$(check_c_sources)) || fail=1; \ fi;\ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \ exit "$$fail";\ else \ exit 0;\ fi
check-coding-style: @fail=0; \ if test -n "$(check_misc_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-misc.sh \ - $(check_misc_sources) || fail=1; \ + $(addprefix $(srcdir)/,$(check_misc_sources)) || fail=1; \ ? +++++++++++++++++++++++ + fi; \ if test -n "$(check_c_sources)"; then \ tools_dir=$(top_srcdir)/tools \ sh $(top_srcdir)/tools/check-c-style.sh \ - $(check_c_sources) || fail=1; \ + $(addprefix $(srcdir)/,$(check_c_sources)) || fail=1; \ fi;\ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \ exit "$$fail";\ else \ exit 0;\ fi
4
0.235294
2
2
44369640952083f1ce20022a70b28d81bec5de0b
pyproject.toml
pyproject.toml
[tool.black] line-length = 88 target-version = ['py36', 'py37', 'py38'] include = '\.pyi?$' extend-exclude = ''' /( | external | build )/ | ^/build ''' [pylint] max-line-length = 88 [pylint.messages_control] disable = C0330, C0326
[tool.black] line-length = 88 target-version = ['py36', 'py37', 'py38'] include = '\.pyi?$' extend-exclude = ''' /( | external | build )/ | ^/build ''' [tool.pylint.messages_control] disable = "C0330, C0326" [tool.pylint.format] max-line-length = "88"
Add pylint restrictions part 3
Add pylint restrictions part 3
TOML
apache-2.0
RoboJackets/robocup-software,RoboJackets/robocup-software,RoboJackets/robocup-software,RoboJackets/robocup-software
toml
## Code Before: [tool.black] line-length = 88 target-version = ['py36', 'py37', 'py38'] include = '\.pyi?$' extend-exclude = ''' /( | external | build )/ | ^/build ''' [pylint] max-line-length = 88 [pylint.messages_control] disable = C0330, C0326 ## Instruction: Add pylint restrictions part 3 ## Code After: [tool.black] line-length = 88 target-version = ['py36', 'py37', 'py38'] include = '\.pyi?$' extend-exclude = ''' /( | external | build )/ | ^/build ''' [tool.pylint.messages_control] disable = "C0330, C0326" [tool.pylint.format] max-line-length = "88"
[tool.black] line-length = 88 target-version = ['py36', 'py37', 'py38'] include = '\.pyi?$' extend-exclude = ''' /( | external | build )/ | ^/build ''' - [pylint] - max-line-length = 88 + [tool.pylint.messages_control] + disable = "C0330, C0326" - [pylint.messages_control] - disable = C0330, C0326 + [tool.pylint.format] + max-line-length = "88"
8
0.470588
4
4
0099781b7ce28fba2c559069c3cf5291f1f032a4
lib/tagooru.rb
lib/tagooru.rb
require 'rubygems' require 'httparty' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'httparty_ext.rb' class Tagooru autoload :Playlist, 'tagooru/playlist' autoload :Track, 'tagooru/track' include HTTParty base_uri 'http://tagoo.ru' default_params :for => :audio def self.search(query, page = 1) playlist = get '/en/search_playlist.php', :query => {:search => query, :page => page} Playlist.new(playlist).parse end def self.first(query, page = 1) search(query, page).detect {|t| t.accessible?} end end
require 'rubygems' require 'httparty' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'httparty_ext.rb' class Tagooru autoload :Playlist, 'tagooru/playlist' autoload :Track, 'tagooru/track' include HTTParty base_uri 'http://tagoo.ru' default_params :for => :audio, :key => '74d8940f' headers 'Referer' => 'http://tagoo.ru/en/webmaster.php?mode=json_api' format :plain # override method from HTTParty to prevent cookies from overriding other # header data (httparty 0.4.4) def self.perform_request(http_method, path, options) #:nodoc: Request.new(http_method, path, default_options.dup.merge(options)).perform end def self.search(query, page = 1) response = get '/api_search.php', :query => {:search => query, :page => page, :seed => generate_seed} data = Crack::JSON.parse(response.sub(/^.+= /, '')) data['data'].map do |d| Track.new d['title'], d['file_url'] end end # seed argument taken from search api # http://tagoo.ru/script/api/search.js def self.generate_seed (rand * 100_000).to_i end def self.first(query, page = 1) search(query, page).detect {|t| t.accessible?} end end
Replace playlist search with api search
Replace playlist search with api search Playlist search now requires authentication, so I'm replacing it with the ajax api search. Currently I'm sending in the api key used in their example on the documentation page, we'll see how long that lasts.
Ruby
mit
sandro/tagooru
ruby
## Code Before: require 'rubygems' require 'httparty' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'httparty_ext.rb' class Tagooru autoload :Playlist, 'tagooru/playlist' autoload :Track, 'tagooru/track' include HTTParty base_uri 'http://tagoo.ru' default_params :for => :audio def self.search(query, page = 1) playlist = get '/en/search_playlist.php', :query => {:search => query, :page => page} Playlist.new(playlist).parse end def self.first(query, page = 1) search(query, page).detect {|t| t.accessible?} end end ## Instruction: Replace playlist search with api search Playlist search now requires authentication, so I'm replacing it with the ajax api search. Currently I'm sending in the api key used in their example on the documentation page, we'll see how long that lasts. ## Code After: require 'rubygems' require 'httparty' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'httparty_ext.rb' class Tagooru autoload :Playlist, 'tagooru/playlist' autoload :Track, 'tagooru/track' include HTTParty base_uri 'http://tagoo.ru' default_params :for => :audio, :key => '74d8940f' headers 'Referer' => 'http://tagoo.ru/en/webmaster.php?mode=json_api' format :plain # override method from HTTParty to prevent cookies from overriding other # header data (httparty 0.4.4) def self.perform_request(http_method, path, options) #:nodoc: Request.new(http_method, path, default_options.dup.merge(options)).perform end def self.search(query, page = 1) response = get '/api_search.php', :query => {:search => query, :page => page, :seed => generate_seed} data = Crack::JSON.parse(response.sub(/^.+= /, '')) data['data'].map do |d| Track.new d['title'], d['file_url'] end end # seed argument taken from search api # http://tagoo.ru/script/api/search.js def self.generate_seed (rand * 100_000).to_i end def self.first(query, page = 1) search(query, page).detect {|t| t.accessible?} end end
require 'rubygems' require 'httparty' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'httparty_ext.rb' class Tagooru autoload :Playlist, 'tagooru/playlist' autoload :Track, 'tagooru/track' include HTTParty base_uri 'http://tagoo.ru' - default_params :for => :audio + default_params :for => :audio, :key => '74d8940f' ? ++++++++++++++++++++ + headers 'Referer' => 'http://tagoo.ru/en/webmaster.php?mode=json_api' + format :plain + + # override method from HTTParty to prevent cookies from overriding other + # header data (httparty 0.4.4) + def self.perform_request(http_method, path, options) #:nodoc: + Request.new(http_method, path, default_options.dup.merge(options)).perform + end def self.search(query, page = 1) - playlist = get '/en/search_playlist.php', :query => {:search => query, :page => page} - Playlist.new(playlist).parse + response = get '/api_search.php', :query => {:search => query, :page => page, :seed => generate_seed} + data = Crack::JSON.parse(response.sub(/^.+= /, '')) + data['data'].map do |d| + Track.new d['title'], d['file_url'] + end + end + + # seed argument taken from search api + # http://tagoo.ru/script/api/search.js + def self.generate_seed + (rand * 100_000).to_i end def self.first(query, page = 1) search(query, page).detect {|t| t.accessible?} end end
23
1
20
3
c25dfbcbcf7f6b66bdcffdcfe76b56340d58557a
src/AwsServiceProvider.php
src/AwsServiceProvider.php
<?php /** * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ namespace Aws\Silex; use Aws\Sdk; use Silex\Application; use Silex\ServiceProviderInterface; /** * AWS SDK for PHP service provider for Silex applications */ class AwsServiceProvider implements ServiceProviderInterface { const VERSION = '2.0.0'; public function register(Application $app) { $app['aws'] = $app->share(function (Application $app) { $aws = new Sdk(isset($app['aws.config']) ? $app['aws.config'] : []); return $aws; }); } public function boot(Application $app) { } }
<?php /** * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ namespace Aws\Silex; use Aws\Sdk; use Silex\Application; use Silex\ServiceProviderInterface; /** * AWS SDK for PHP service provider for Silex applications */ class AwsServiceProvider implements ServiceProviderInterface { const VERSION = '2.0.2'; public function register(Application $app) { $app['aws'] = $app->share(function (Application $app) { $config = isset($app['aws.config']) ? $app['aws.config'] : []; return new Sdk($config + ['ua_append' => [ 'Silex/' . Application::VERSION, 'SXMOD/' . self::VERSION, ]]); }); } public function boot(Application $app) { } }
Update provider registration to add silex version to user agent
Update provider registration to add silex version to user agent
PHP
apache-2.0
aws/aws-sdk-php-silex,jeskew/aws-sdk-php-silex
php
## Code Before: <?php /** * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ namespace Aws\Silex; use Aws\Sdk; use Silex\Application; use Silex\ServiceProviderInterface; /** * AWS SDK for PHP service provider for Silex applications */ class AwsServiceProvider implements ServiceProviderInterface { const VERSION = '2.0.0'; public function register(Application $app) { $app['aws'] = $app->share(function (Application $app) { $aws = new Sdk(isset($app['aws.config']) ? $app['aws.config'] : []); return $aws; }); } public function boot(Application $app) { } } ## Instruction: Update provider registration to add silex version to user agent ## Code After: <?php /** * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ namespace Aws\Silex; use Aws\Sdk; use Silex\Application; use Silex\ServiceProviderInterface; /** * AWS SDK for PHP service provider for Silex applications */ class AwsServiceProvider implements ServiceProviderInterface { const VERSION = '2.0.2'; public function register(Application $app) { $app['aws'] = $app->share(function (Application $app) { $config = isset($app['aws.config']) ? $app['aws.config'] : []; return new Sdk($config + ['ua_append' => [ 'Silex/' . Application::VERSION, 'SXMOD/' . self::VERSION, ]]); }); } public function boot(Application $app) { } }
<?php /** * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ namespace Aws\Silex; use Aws\Sdk; use Silex\Application; use Silex\ServiceProviderInterface; /** * AWS SDK for PHP service provider for Silex applications */ class AwsServiceProvider implements ServiceProviderInterface { - const VERSION = '2.0.0'; ? ^ + const VERSION = '2.0.2'; ? ^ public function register(Application $app) { $app['aws'] = $app->share(function (Application $app) { - $aws = new Sdk(isset($app['aws.config']) ? $app['aws.config'] : []); ? ^^^ -------- - + $config = isset($app['aws.config']) ? $app['aws.config'] : []; ? ^^^^^^ - return $aws; + return new Sdk($config + ['ua_append' => [ + 'Silex/' . Application::VERSION, + 'SXMOD/' . self::VERSION, + ]]); }); } public function boot(Application $app) { } }
9
0.214286
6
3
3fd63987e729647fff4f10a7824a74db8c570ba1
requirements-sphinx.txt
requirements-sphinx.txt
application_repository>=0.5 blinker configobj droplet-planning>=0.2 flatland-fork geo-util ipython ipython-helpers>=0.4 jinja2 matplotlib>=1.5.0 microdrop-device-converter>=0.1.post5 microdrop-plugin-template>=1.1.post30 microdrop_utility>=0.4.post2 networkx numpydoc openpyxl pandas>=0.17.1 path-helpers>=0.2.post3 paver>=1.2.4 pip-helpers>=0.6 pygtk_textbuffer_with_undo pyparsing pyutilib.component.core>=4.4.1 pyutilib.component.loader>=3.3.1 pyyaml pyzmq run-exe>=0.5 si-prefix>=0.4.post10 scipy svgwrite svg-model>=0.6 task_scheduler tornado wheeler.pygtkhelpers>=0.13.post17 zmq-plugin>=0.2.post2
application_repository>=0.5 blinker configobj droplet-planning>=0.2 flatland-fork geo-util ipython ipython-helpers>=0.4 jinja2 matplotlib>=1.5.0 microdrop-device-converter>=0.1.post5 microdrop_utility>=0.4.post2 networkx numpydoc openpyxl pandas>=0.17.1 path-helpers>=0.2.post3 paver>=1.2.4 pip-helpers>=0.6 pygtk_textbuffer_with_undo pyparsing pyutilib.component.core>=4.4.1 pyutilib.component.loader>=3.3.1 pyyaml pyzmq run-exe>=0.5 si-prefix>=0.4.post10 scipy svgwrite svg-model>=0.6 task_scheduler tornado wheeler.pygtkhelpers>=0.13.post17 zmq-plugin>=0.2.post2
Remove package from sphinx requirements
[FIX] Remove package from sphinx requirements Remove `microdrop-plugin-template>=1.1.post30` package from `requirements-sphinx.txt` since it causes the exception below when installing from Python Package Index: Collecting pywin32 (from microdrop-plugin-manager->microdrop-plugin-template>=1.1.post30->-r requirements-sphinx.txt (line 12)) Could not find a version that satisfies the requirement pywin32 (from microdrop-plugin-manager->microdrop-plugin-template>=1.1.post30->-r requirements-sphinx.txt (line 12)) (from versions: ) No matching distribution found for pywin32 (from microdrop-plugin-manager->microdrop-plugin-template>=1.1.post30->-r requirements-sphinx.txt (line 12)) Notes ----- The `pywin32` package is available as a wheel on [the official MicroDrop update server][1]. Therefore, installation of `microdrop-plugin-template` works when installing using the following command: pip install --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 -r requirements.txt **Note** *`192.99.4.95` is the IP address of the official MicroDrop update server where MicroDrop dependencies not available on PyPI are stored as wheels*. [1]: http://192.99.4.95/wheels/
Text
bsd-3-clause
wheeler-microfluidics/microdrop
text
## Code Before: application_repository>=0.5 blinker configobj droplet-planning>=0.2 flatland-fork geo-util ipython ipython-helpers>=0.4 jinja2 matplotlib>=1.5.0 microdrop-device-converter>=0.1.post5 microdrop-plugin-template>=1.1.post30 microdrop_utility>=0.4.post2 networkx numpydoc openpyxl pandas>=0.17.1 path-helpers>=0.2.post3 paver>=1.2.4 pip-helpers>=0.6 pygtk_textbuffer_with_undo pyparsing pyutilib.component.core>=4.4.1 pyutilib.component.loader>=3.3.1 pyyaml pyzmq run-exe>=0.5 si-prefix>=0.4.post10 scipy svgwrite svg-model>=0.6 task_scheduler tornado wheeler.pygtkhelpers>=0.13.post17 zmq-plugin>=0.2.post2 ## Instruction: [FIX] Remove package from sphinx requirements Remove `microdrop-plugin-template>=1.1.post30` package from `requirements-sphinx.txt` since it causes the exception below when installing from Python Package Index: Collecting pywin32 (from microdrop-plugin-manager->microdrop-plugin-template>=1.1.post30->-r requirements-sphinx.txt (line 12)) Could not find a version that satisfies the requirement pywin32 (from microdrop-plugin-manager->microdrop-plugin-template>=1.1.post30->-r requirements-sphinx.txt (line 12)) (from versions: ) No matching distribution found for pywin32 (from microdrop-plugin-manager->microdrop-plugin-template>=1.1.post30->-r requirements-sphinx.txt (line 12)) Notes ----- The `pywin32` package is available as a wheel on [the official MicroDrop update server][1]. Therefore, installation of `microdrop-plugin-template` works when installing using the following command: pip install --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 -r requirements.txt **Note** *`192.99.4.95` is the IP address of the official MicroDrop update server where MicroDrop dependencies not available on PyPI are stored as wheels*. [1]: http://192.99.4.95/wheels/ ## Code After: application_repository>=0.5 blinker configobj droplet-planning>=0.2 flatland-fork geo-util ipython ipython-helpers>=0.4 jinja2 matplotlib>=1.5.0 microdrop-device-converter>=0.1.post5 microdrop_utility>=0.4.post2 networkx numpydoc openpyxl pandas>=0.17.1 path-helpers>=0.2.post3 paver>=1.2.4 pip-helpers>=0.6 pygtk_textbuffer_with_undo pyparsing pyutilib.component.core>=4.4.1 pyutilib.component.loader>=3.3.1 pyyaml pyzmq run-exe>=0.5 si-prefix>=0.4.post10 scipy svgwrite svg-model>=0.6 task_scheduler tornado wheeler.pygtkhelpers>=0.13.post17 zmq-plugin>=0.2.post2
application_repository>=0.5 blinker configobj droplet-planning>=0.2 flatland-fork geo-util ipython ipython-helpers>=0.4 jinja2 matplotlib>=1.5.0 microdrop-device-converter>=0.1.post5 - microdrop-plugin-template>=1.1.post30 microdrop_utility>=0.4.post2 networkx numpydoc openpyxl pandas>=0.17.1 path-helpers>=0.2.post3 paver>=1.2.4 pip-helpers>=0.6 pygtk_textbuffer_with_undo pyparsing pyutilib.component.core>=4.4.1 pyutilib.component.loader>=3.3.1 pyyaml pyzmq run-exe>=0.5 si-prefix>=0.4.post10 scipy svgwrite svg-model>=0.6 task_scheduler tornado wheeler.pygtkhelpers>=0.13.post17 zmq-plugin>=0.2.post2
1
0.028571
0
1
2b0fce8da2f5b6dc9661be540982416a9e2267f8
Documentation/devicetree/bindings/arm/primecell.txt
Documentation/devicetree/bindings/arm/primecell.txt
* ARM Primecell Peripherals ARM, Ltd. Primecell peripherals have a standard id register that can be used to identify the peripheral type, vendor, and revision. This value can be used for driver matching. Required properties: - compatible : should be a specific value for peripheral and "arm,primecell" Optional properties: - arm,primecell-periphid : Value to override the h/w value with Example: serial@fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; };
* ARM Primecell Peripherals ARM, Ltd. Primecell peripherals have a standard id register that can be used to identify the peripheral type, vendor, and revision. This value can be used for driver matching. Required properties: - compatible : should be a specific name for the peripheral and "arm,primecell". The specific name will match the ARM engineering name for the logic block in the form: "arm,pl???" Optional properties: - arm,primecell-periphid : Value to override the h/w value with Example: serial@fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; };
Expand on ARM Primecell binding documentation
Devicetree: Expand on ARM Primecell binding documentation Signed-off-by: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@secretlab.ca>
Text
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
text
## Code Before: * ARM Primecell Peripherals ARM, Ltd. Primecell peripherals have a standard id register that can be used to identify the peripheral type, vendor, and revision. This value can be used for driver matching. Required properties: - compatible : should be a specific value for peripheral and "arm,primecell" Optional properties: - arm,primecell-periphid : Value to override the h/w value with Example: serial@fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; }; ## Instruction: Devicetree: Expand on ARM Primecell binding documentation Signed-off-by: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@secretlab.ca> ## Code After: * ARM Primecell Peripherals ARM, Ltd. Primecell peripherals have a standard id register that can be used to identify the peripheral type, vendor, and revision. This value can be used for driver matching. Required properties: - compatible : should be a specific name for the peripheral and "arm,primecell". The specific name will match the ARM engineering name for the logic block in the form: "arm,pl???" Optional properties: - arm,primecell-periphid : Value to override the h/w value with Example: serial@fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; };
* ARM Primecell Peripherals ARM, Ltd. Primecell peripherals have a standard id register that can be used to identify the peripheral type, vendor, and revision. This value can be used for driver matching. Required properties: - - compatible : should be a specific value for peripheral and "arm,primecell" ? ^ ^^ ---------------- + - compatible : should be a specific name for the peripheral and ? ^ ^ ++++ + "arm,primecell". The specific name will match the ARM + engineering name for the logic block in the form: "arm,pl???" Optional properties: - arm,primecell-periphid : Value to override the h/w value with Example: serial@fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; };
4
0.190476
3
1
dcd6adc5f28ab5148f88567dfc2ec6d11b59b95d
_pages/map.md
_pages/map.md
--- title: Map permalink: /map/ sidebar: nav: "resources" --- <p class='full'> <iframe width="100%" height="520" frameborder="0" src="https://baltimoreheritage.carto.com/builder/ecbad697-aa1d-4f0f-b4dd-b713c96ef86e/embed" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe> </p> ## Inventory <div class="notice--info"> The map is based on an inventory of historic places in an [Airtable](https://airtable.com/) database. You can suggest a place to add to our inventory using this form. We also welcome your comments! Helpful comments including suggesting relevant sites, sharing information about a building or site missing from our inventory, or correcting any inaccurate information. You can also contact us through [our website](http://baltimoreheritage.org/contact/) or send us an email at [info@baltimoreheritage.org](mailto:info@baltimoreheritage.org). </div> <p class="full"><iframe class="airtable-embed" src="https://airtable.com/embed/shrn9C30M3hImSCMX?backgroundColor=yellow&viewControls=on" frameborder="0" onmousewheel="" width="100%" height="533" style="background: transparent; border: 1px solid #ccc;"></iframe></p>
--- title: Map permalink: /map/ sidebar: nav: "resources" --- <p class='full'> <iframe width="100%" height="520" frameborder="0" src="https://baltimoreheritage.carto.com/builder/ecbad697-aa1d-4f0f-b4dd-b713c96ef86e/embed" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe> </p> ## Inventory The map is based on an inventory of historic places in an [Airtable](https://airtable.com/) database. You can suggest a place to add to our inventory using this form. We also welcome your comments! Helpful comments including suggesting relevant sites, sharing information about a building or site missing from our inventory, or correcting any inaccurate information. You can also contact us through [our website](http://baltimoreheritage.org/contact/) or send us an email at [info@baltimoreheritage.org](mailto:info@baltimoreheritage.org).{: .notice--info} <p class="full"><iframe class="airtable-embed" src="https://airtable.com/embed/shrn9C30M3hImSCMX?backgroundColor=yellow&viewControls=on" frameborder="0" onmousewheel="" width="100%" height="533" style="background: transparent; border: 1px solid #ccc;"></iframe></p>
Switch infobox formatting from div to markdown
Switch infobox formatting from div to markdown
Markdown
mit
baltimoreheritage/civil-rights-heritage,baltimoreheritage/civil-rights-heritage,baltimoreheritage/baltimore-civil-rights-heritage,baltimoreheritage/civil-rights-heritage
markdown
## Code Before: --- title: Map permalink: /map/ sidebar: nav: "resources" --- <p class='full'> <iframe width="100%" height="520" frameborder="0" src="https://baltimoreheritage.carto.com/builder/ecbad697-aa1d-4f0f-b4dd-b713c96ef86e/embed" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe> </p> ## Inventory <div class="notice--info"> The map is based on an inventory of historic places in an [Airtable](https://airtable.com/) database. You can suggest a place to add to our inventory using this form. We also welcome your comments! Helpful comments including suggesting relevant sites, sharing information about a building or site missing from our inventory, or correcting any inaccurate information. You can also contact us through [our website](http://baltimoreheritage.org/contact/) or send us an email at [info@baltimoreheritage.org](mailto:info@baltimoreheritage.org). </div> <p class="full"><iframe class="airtable-embed" src="https://airtable.com/embed/shrn9C30M3hImSCMX?backgroundColor=yellow&viewControls=on" frameborder="0" onmousewheel="" width="100%" height="533" style="background: transparent; border: 1px solid #ccc;"></iframe></p> ## Instruction: Switch infobox formatting from div to markdown ## Code After: --- title: Map permalink: /map/ sidebar: nav: "resources" --- <p class='full'> <iframe width="100%" height="520" frameborder="0" src="https://baltimoreheritage.carto.com/builder/ecbad697-aa1d-4f0f-b4dd-b713c96ef86e/embed" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe> </p> ## Inventory The map is based on an inventory of historic places in an [Airtable](https://airtable.com/) database. You can suggest a place to add to our inventory using this form. We also welcome your comments! Helpful comments including suggesting relevant sites, sharing information about a building or site missing from our inventory, or correcting any inaccurate information. You can also contact us through [our website](http://baltimoreheritage.org/contact/) or send us an email at [info@baltimoreheritage.org](mailto:info@baltimoreheritage.org).{: .notice--info} <p class="full"><iframe class="airtable-embed" src="https://airtable.com/embed/shrn9C30M3hImSCMX?backgroundColor=yellow&viewControls=on" frameborder="0" onmousewheel="" width="100%" height="533" style="background: transparent; border: 1px solid #ccc;"></iframe></p>
--- title: Map permalink: /map/ sidebar: nav: "resources" --- + <p class='full'> <iframe width="100%" height="520" frameborder="0" src="https://baltimoreheritage.carto.com/builder/ecbad697-aa1d-4f0f-b4dd-b713c96ef86e/embed" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe> </p> ## Inventory - <div class="notice--info"> - The map is based on an inventory of historic places in an [Airtable](https://airtable.com/) database. You can suggest a place to add to our inventory using this form. We also welcome your comments! Helpful comments including suggesting relevant sites, sharing information about a building or site missing from our inventory, or correcting any inaccurate information. You can also contact us through [our website](http://baltimoreheritage.org/contact/) or send us an email at [info@baltimoreheritage.org](mailto:info@baltimoreheritage.org). + The map is based on an inventory of historic places in an [Airtable](https://airtable.com/) database. You can suggest a place to add to our inventory using this form. We also welcome your comments! Helpful comments including suggesting relevant sites, sharing information about a building or site missing from our inventory, or correcting any inaccurate information. You can also contact us through [our website](http://baltimoreheritage.org/contact/) or send us an email at [info@baltimoreheritage.org](mailto:info@baltimoreheritage.org).{: .notice--info} ? +++++++++++++++++ - </div> <p class="full"><iframe class="airtable-embed" src="https://airtable.com/embed/shrn9C30M3hImSCMX?backgroundColor=yellow&viewControls=on" frameborder="0" onmousewheel="" width="100%" height="533" style="background: transparent; border: 1px solid #ccc;"></iframe></p>
5
0.277778
2
3
98b618c24161bbcefefdcce0680bbbd2ad7e8237
src/main/web/app/app.js
src/main/web/app/app.js
import Ui from "./Ui"; import Generator from "./Generator"; Ui.initializeDefaults(); $.getJSON("/features.json").done(displayFeatures); $.getJSON("/formats.json").done(displayFormats); function displayFeatures(features) { features.forEach(function (feature) { var checkbox = createFeatureCheckbox(feature); var container = $("<div>").addClass("item").append(checkbox); container.appendTo("#feature-list"); }); } function createFeatureCheckbox(feature) { let id = feature.token + "-feature"; let container = $("<div>").data(feature).addClass("ui checkbox"); $("<input type='checkbox' id='" + id + "'>").appendTo(container); $("<label>").attr("for", id).text(feature.name).appendTo(container); return container; } function displayFormats(formats) { formats.forEach(function (format) { let option = $("<div class='item' data-value='" + format.extension + "'>"); option.data(format).text(format.name); option.appendTo("#format-list"); }); Ui.initializeFormats(formats.find(format => format.default)); }
import Ui from "./Ui"; import Generator from "./Generator"; Ui.initializeDefaults(); $.getJSON("/features.json").done(displayFeatures); $.getJSON("/formats.json").done(displayFormats); function displayFeatures(features) { features.forEach(function (feature) { var checkbox = createFeatureCheckbox(feature); var container = $("<div>").addClass("item").append(checkbox); container.appendTo("#feature-list"); }); } function createFeatureCheckbox(feature) { let id = feature.token + "-feature"; let container = $("<div>").data(feature).addClass("ui checkbox"); $("<input type='checkbox' id='" + id + "'>").appendTo(container); $("<label>").attr("for", id).text(feature.name).appendTo(container); return container; } function displayFormats(formats) { formats.forEach(function (format) { let option = $("<div class='item' data-value='" + format.extension + "'>"); option.data(format).text(format.name); option.appendTo("#format-list"); }); formats.some(value => { if (value.default) { Ui.initializeFormats(value); return true; } }); }
Use .some instead of ES6 .find
Use .some instead of ES6 .find
JavaScript
mit
VisualDataWeb/OntoBench,VisualDataWeb/OntoBench,VisualDataWeb/OntoBench
javascript
## Code Before: import Ui from "./Ui"; import Generator from "./Generator"; Ui.initializeDefaults(); $.getJSON("/features.json").done(displayFeatures); $.getJSON("/formats.json").done(displayFormats); function displayFeatures(features) { features.forEach(function (feature) { var checkbox = createFeatureCheckbox(feature); var container = $("<div>").addClass("item").append(checkbox); container.appendTo("#feature-list"); }); } function createFeatureCheckbox(feature) { let id = feature.token + "-feature"; let container = $("<div>").data(feature).addClass("ui checkbox"); $("<input type='checkbox' id='" + id + "'>").appendTo(container); $("<label>").attr("for", id).text(feature.name).appendTo(container); return container; } function displayFormats(formats) { formats.forEach(function (format) { let option = $("<div class='item' data-value='" + format.extension + "'>"); option.data(format).text(format.name); option.appendTo("#format-list"); }); Ui.initializeFormats(formats.find(format => format.default)); } ## Instruction: Use .some instead of ES6 .find ## Code After: import Ui from "./Ui"; import Generator from "./Generator"; Ui.initializeDefaults(); $.getJSON("/features.json").done(displayFeatures); $.getJSON("/formats.json").done(displayFormats); function displayFeatures(features) { features.forEach(function (feature) { var checkbox = createFeatureCheckbox(feature); var container = $("<div>").addClass("item").append(checkbox); container.appendTo("#feature-list"); }); } function createFeatureCheckbox(feature) { let id = feature.token + "-feature"; let container = $("<div>").data(feature).addClass("ui checkbox"); $("<input type='checkbox' id='" + id + "'>").appendTo(container); $("<label>").attr("for", id).text(feature.name).appendTo(container); return container; } function displayFormats(formats) { formats.forEach(function (format) { let option = $("<div class='item' data-value='" + format.extension + "'>"); option.data(format).text(format.name); option.appendTo("#format-list"); }); formats.some(value => { if (value.default) { Ui.initializeFormats(value); return true; } }); }
import Ui from "./Ui"; import Generator from "./Generator"; Ui.initializeDefaults(); $.getJSON("/features.json").done(displayFeatures); $.getJSON("/formats.json").done(displayFormats); function displayFeatures(features) { features.forEach(function (feature) { var checkbox = createFeatureCheckbox(feature); var container = $("<div>").addClass("item").append(checkbox); container.appendTo("#feature-list"); }); } function createFeatureCheckbox(feature) { let id = feature.token + "-feature"; let container = $("<div>").data(feature).addClass("ui checkbox"); $("<input type='checkbox' id='" + id + "'>").appendTo(container); $("<label>").attr("for", id).text(feature.name).appendTo(container); return container; } function displayFormats(formats) { formats.forEach(function (format) { let option = $("<div class='item' data-value='" + format.extension + "'>"); option.data(format).text(format.name); option.appendTo("#format-list"); }); - Ui.initializeFormats(formats.find(format => format.default)); + formats.some(value => { + if (value.default) { + Ui.initializeFormats(value); + return true; + } + }); }
7
0.205882
6
1
ef8cbeeb833c326a8ebf7d2545299f3225e62b06
Home.md
Home.md
* [[Generated Javascript]] An overview of the javascript that opal generates * [[Method Missing]] How Opal implements `method_missing` * [[Using Opal from Javascript]] How to access ruby/opal methods from Javascript ## Usage * [[Static Application]] Just build your app and dependencies to a `build.js` file * [[Using Sprockets]] Use rack/sprockets to auto-recompile an opal application
* [[Generated Javascript]] An overview of the javascript that opal generates * [[Method Missing]] How Opal implements `method_missing` * [[Using Opal from Javascript]] How to access ruby/opal methods from Javascript ## Usage * [[Static Application]] Just build your app and dependencies to a `build.js` file * [[Using Sprockets]] Use rack/sprockets to auto-recompile an opal application * [[External Libraries]] include additional libraries such as opal-jquery or opal-activesupport into your application
Add link to external libs page
Add link to external libs page
Markdown
mit
jannishuebl/opal,kachick/opal,c42engineering/opal,gabrielrios/opal,suyesh/opal,wied03/opal,opal/opal,catprintlabs/opal,Mogztter/opal,jgaskins/opal,catprintlabs/opal,bbatsov/opal,opal/opal,merongivian/opal,suyesh/opal,Ajedi32/opal,Mogztter/opal,gabrielrios/opal,domgetter/opal,jgaskins/opal,c42engineering/opal,castwide/opal,Flikofbluelight747/opal,c42engineering/opal,iliabylich/opal,wied03/opal,iliabylich/opal,castwide/opal,bbatsov/opal,kachick/opal,suyesh/opal,wied03/opal,Flikofbluelight747/opal,bbatsov/opal,iliabylich/opal,Ajedi32/opal,fazibear/opal,domgetter/opal,jannishuebl/opal,gausie/opal,Mogztter/opal,merongivian/opal,merongivian/opal,gausie/opal,fazibear/opal,Mogztter/opal,kachick/opal,jgaskins/opal,fazibear/opal,catprintlabs/opal,castwide/opal,gabrielrios/opal,opal/opal,kachick/opal,opal/opal,Flikofbluelight747/opal,Ajedi32/opal,gausie/opal,jannishuebl/opal
markdown
## Code Before: * [[Generated Javascript]] An overview of the javascript that opal generates * [[Method Missing]] How Opal implements `method_missing` * [[Using Opal from Javascript]] How to access ruby/opal methods from Javascript ## Usage * [[Static Application]] Just build your app and dependencies to a `build.js` file * [[Using Sprockets]] Use rack/sprockets to auto-recompile an opal application ## Instruction: Add link to external libs page ## Code After: * [[Generated Javascript]] An overview of the javascript that opal generates * [[Method Missing]] How Opal implements `method_missing` * [[Using Opal from Javascript]] How to access ruby/opal methods from Javascript ## Usage * [[Static Application]] Just build your app and dependencies to a `build.js` file * [[Using Sprockets]] Use rack/sprockets to auto-recompile an opal application * [[External Libraries]] include additional libraries such as opal-jquery or opal-activesupport into your application
* [[Generated Javascript]] An overview of the javascript that opal generates * [[Method Missing]] How Opal implements `method_missing` * [[Using Opal from Javascript]] How to access ruby/opal methods from Javascript ## Usage * [[Static Application]] Just build your app and dependencies to a `build.js` file * [[Using Sprockets]] Use rack/sprockets to auto-recompile an opal application + * [[External Libraries]] include additional libraries such as opal-jquery or opal-activesupport into your application
1
0.125
1
0
1eb44076af9c2410e7b6a745732276095b2648e1
partials/modal/update_context_modal.html
partials/modal/update_context_modal.html
<div> <div class="modal-header"> <h3 class="modal-title">{{ data.currentContext.contextName }}</h3> </div> <div> <form> <div class="modal-body"> <textarea class="form-control margin-top" row="3" ng-model="data.currentContext.contextDesc"></textarea> </div> <div class="modal-footer"> <button class="btn btn-success" ng-click="updateContext()">Save</button> <button class="btn btn-warning" ng-click="cancel()" type="button">Cancel</button> </div> </form> </div> <div ng-if="!info"> <form> <span class="label label-success" ng-show="data.updateStatus == 'ok'">Context update success</span> <span class="label label-danger" ng-show="data.updateStatus == 'error'">Error while updating context</span> <div class="modal-footer"> <button ng-click="cancel()" class="btn btn-default" ng-show="data.updateStatus == 'ok'">Close</button> </div> </form> </div> </div>
<div> <div class="modal-header"> <h3 class="modal-title">{{ data.currentContext.contextName }}</h3> </div> <div> <form> <div class="modal-body"> <textarea class="form-control margin-top" row="3" ng-model="data.currentContext.contextDesc"></textarea> </div> <div class="modal-footer"> <button class="btn btn-success" ng-click="updateContext()">Save</button> <button class="btn btn-warning" ng-click="cancel()" type="button">Cancel</button> </div> </form> </div> <div ng-if="!info"> <form> <div class="alert alert-success" role="alert" ng-show="data.updateStatus == 'ok'">Context update is a success</div> <div class="alert alert-danger" role="alert" ng-show="data.updateStatus == 'error'">Error while updating context</div> <div class="modal-footer"> <button ng-click="cancel()" class="btn btn-default" ng-show="data.updateStatus == 'ok'">Close</button> </div> </form> </div> </div>
Fix a bad choice of bootstrap component when context saved
Fix a bad choice of bootstrap component when context saved
HTML
mit
pagesjaunes/curiosity,pagesjaunes/curiosity,joebordes/curiosity,ErwanPigneul/curiosity,joebordes/curiosity,joebordes/curiosity,ErwanPigneul/curiosity,ErwanPigneul/curiosity,pagesjaunes/curiosity
html
## Code Before: <div> <div class="modal-header"> <h3 class="modal-title">{{ data.currentContext.contextName }}</h3> </div> <div> <form> <div class="modal-body"> <textarea class="form-control margin-top" row="3" ng-model="data.currentContext.contextDesc"></textarea> </div> <div class="modal-footer"> <button class="btn btn-success" ng-click="updateContext()">Save</button> <button class="btn btn-warning" ng-click="cancel()" type="button">Cancel</button> </div> </form> </div> <div ng-if="!info"> <form> <span class="label label-success" ng-show="data.updateStatus == 'ok'">Context update success</span> <span class="label label-danger" ng-show="data.updateStatus == 'error'">Error while updating context</span> <div class="modal-footer"> <button ng-click="cancel()" class="btn btn-default" ng-show="data.updateStatus == 'ok'">Close</button> </div> </form> </div> </div> ## Instruction: Fix a bad choice of bootstrap component when context saved ## Code After: <div> <div class="modal-header"> <h3 class="modal-title">{{ data.currentContext.contextName }}</h3> </div> <div> <form> <div class="modal-body"> <textarea class="form-control margin-top" row="3" ng-model="data.currentContext.contextDesc"></textarea> </div> <div class="modal-footer"> <button class="btn btn-success" ng-click="updateContext()">Save</button> <button class="btn btn-warning" ng-click="cancel()" type="button">Cancel</button> </div> </form> </div> <div ng-if="!info"> <form> <div class="alert alert-success" role="alert" ng-show="data.updateStatus == 'ok'">Context update is a success</div> <div class="alert alert-danger" role="alert" ng-show="data.updateStatus == 'error'">Error while updating context</div> <div class="modal-footer"> <button ng-click="cancel()" class="btn btn-default" ng-show="data.updateStatus == 'ok'">Close</button> </div> </form> </div> </div>
<div> <div class="modal-header"> <h3 class="modal-title">{{ data.currentContext.contextName }}</h3> </div> <div> <form> <div class="modal-body"> <textarea class="form-control margin-top" row="3" ng-model="data.currentContext.contextDesc"></textarea> </div> <div class="modal-footer"> <button class="btn btn-success" ng-click="updateContext()">Save</button> <button class="btn btn-warning" ng-click="cancel()" type="button">Cancel</button> </div> </form> </div> <div ng-if="!info"> <form> - <span class="label label-success" ng-show="data.updateStatus == 'ok'">Context update success</span> ? ^^^^ ^ ^^^^^^^ ^^^^ + <div class="alert alert-success" role="alert" ng-show="data.updateStatus == 'ok'">Context update is a success</div> ? ^^^ + ++++ ^ ^^ +++++++++++++ +++++ ^^^ - <span class="label label-danger" ng-show="data.updateStatus == 'error'">Error while updating context</span> ? ^^^^ ^ ^^^^^^^ ^^^^ + <div class="alert alert-danger" role="alert" ng-show="data.updateStatus == 'error'">Error while updating context</div> ? ^^^ + ++++ ^ ^^ +++++++++++++ ^^^ <div class="modal-footer"> <button ng-click="cancel()" class="btn btn-default" ng-show="data.updateStatus == 'ok'">Close</button> </div> </form> </div> </div>
4
0.148148
2
2
b6a59b35fce67b7693b021b07c25ebbefc9122d0
test/dummy/app/models/category.rb
test/dummy/app/models/category.rb
=begin This model is used to test: - ActsAsList on resources_controller - Relate and unrelate for has_and_belongs_to_many. =end class Category < ActiveRecord::Base ## # Mixins # acts_as_list ## # Validations # validates :name, :presence => true ## # Associations # has_and_belongs_to_many :entries has_and_belongs_to_many :posts end
=begin This model is used to test: - ActsAsList on resources_controller - Relate and unrelate for has_and_belongs_to_many. =end class Category < ActiveRecord::Base ## # # attr_protected :permalink, :position, :as => :admin attr_protected :permalink, :position ## # Mixins # acts_as_list ## # Validations # validates :name, :presence => true ## # Associations # has_and_belongs_to_many :entries has_and_belongs_to_many :posts end
Mark permalink and position as protected attributes.
Mark permalink and position as protected attributes.
Ruby
mit
typus/typus,thirdthing/typus,brainsome-de/typus,chiragshah/typus,readyfor/typus,wollzelle/typus,wollzelle/typus,readyfor/typus,wollzelle/typus,readyfor/typus,wollzelle/typus,brainsome-de/typus,baban/typus,baban/typus,baban/typus,burn-notice/typus,brainsome-de/typus,typus/typus,thirdthing/typus,typus/typus,chiragshah/typus,readyfor/typus,burn-notice/typus,burn-notice/typus,baban/typus,burn-notice/typus,brainsome-de/typus,thirdthing/typus,typus/typus,chiragshah/typus,chiragshah/typus,thirdthing/typus
ruby
## Code Before: =begin This model is used to test: - ActsAsList on resources_controller - Relate and unrelate for has_and_belongs_to_many. =end class Category < ActiveRecord::Base ## # Mixins # acts_as_list ## # Validations # validates :name, :presence => true ## # Associations # has_and_belongs_to_many :entries has_and_belongs_to_many :posts end ## Instruction: Mark permalink and position as protected attributes. ## Code After: =begin This model is used to test: - ActsAsList on resources_controller - Relate and unrelate for has_and_belongs_to_many. =end class Category < ActiveRecord::Base ## # # attr_protected :permalink, :position, :as => :admin attr_protected :permalink, :position ## # Mixins # acts_as_list ## # Validations # validates :name, :presence => true ## # Associations # has_and_belongs_to_many :entries has_and_belongs_to_many :posts end
=begin This model is used to test: - ActsAsList on resources_controller - Relate and unrelate for has_and_belongs_to_many. =end class Category < ActiveRecord::Base + + ## + # + # + + attr_protected :permalink, :position, :as => :admin + attr_protected :permalink, :position ## # Mixins # acts_as_list ## # Validations # validates :name, :presence => true ## # Associations # has_and_belongs_to_many :entries has_and_belongs_to_many :posts end
7
0.225806
7
0
45a535af0fdfe2062a02c661ed404fdd945f0184
.travis.yml
.travis.yml
language: node_js node_js: 6 branches: except: - /^v?[0-9]/ script: - npm test - npm run coverage - npm run codecov deploy: - provider: script skip_cleanup: true script: /bin/sh scripts/version.sh on: condition: $TRAVIS_TAG = '' - provider: pages skip_cleanup: true github_token: $GITHUB_API_KEY on: branch: master tags: true - provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_API_KEY on: branch: master tags: true
language: node_js node_js: 6 script: - npm test - npm run coverage - npm run codecov deploy: - provider: script skip_cleanup: true script: /bin/sh scripts/version.sh on: condition: $TRAVIS_TAG = ''
Disable delpoyment to gh-pages and npm
Disable delpoyment to gh-pages and npm
YAML
mit
ifrost/starterkit,ifrost/starterkit,ifrost/starterkit
yaml
## Code Before: language: node_js node_js: 6 branches: except: - /^v?[0-9]/ script: - npm test - npm run coverage - npm run codecov deploy: - provider: script skip_cleanup: true script: /bin/sh scripts/version.sh on: condition: $TRAVIS_TAG = '' - provider: pages skip_cleanup: true github_token: $GITHUB_API_KEY on: branch: master tags: true - provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_API_KEY on: branch: master tags: true ## Instruction: Disable delpoyment to gh-pages and npm ## Code After: language: node_js node_js: 6 script: - npm test - npm run coverage - npm run codecov deploy: - provider: script skip_cleanup: true script: /bin/sh scripts/version.sh on: condition: $TRAVIS_TAG = ''
language: node_js node_js: 6 - branches: - except: - - /^v?[0-9]/ script: - npm test - npm run coverage - npm run codecov deploy: - provider: script skip_cleanup: true script: /bin/sh scripts/version.sh on: condition: $TRAVIS_TAG = '' - - provider: pages - skip_cleanup: true - github_token: $GITHUB_API_KEY - on: - branch: master - tags: true - - provider: npm - skip_cleanup: true - email: $NPM_EMAIL - api_key: $NPM_API_KEY - on: - branch: master - tags: true
16
0.571429
0
16
26f10d607f5c3c16a6eb50fcee9543b34466e00c
examples/k8s_openms/k8s_openms.go
examples/k8s_openms/k8s_openms.go
package main import sp "github.com/scipipe/scipipe" const ( workDir = "/scipipe-data/" ) func main() { prun := sp.NewPipelineRunner() peakPicker := sp.NewFromShell("PeakPicker", "PeakPickerHiRes -in {i:sample} -out {o:out} -ini {p:ini}") peakPicker.PathFormatters["out"] = func(t *sp.SciTask) string { // filename = basename("{0}_{2}.{1}".format(*self.sampleFile.rsplit('.', 1) + ["peaks"])) // return luigi.LocalTarget("results/"+filename) return "todo_implement_path_formatting.txt" } prun.AddProcess(peakPicker) prun.Run() }
package main import ( str "strings" sp "github.com/scipipe/scipipe" ) const ( workDir = "/scipipe-data/" ) func main() { prun := sp.NewPipelineRunner() peakPicker := sp.NewFromShell("PeakPicker", "PeakPickerHiRes -in {i:sample} -out {o:out} -ini {p:ini}") peakPicker.PathFormatters["out"] = func(t *sp.SciTask) string { parts := str.Split(t.GetInPath("sample"), ".") outPath := "results/" + str.Join(parts[:len(parts)-1], "_") + ".peaks" return outPath } prun.AddProcess(peakPicker) prun.Run() }
Improve path formatting in k8s openms example
Improve path formatting in k8s openms example
Go
mit
scipipe/scipipe,samuell/scipipe,scipipe/scipipe
go
## Code Before: package main import sp "github.com/scipipe/scipipe" const ( workDir = "/scipipe-data/" ) func main() { prun := sp.NewPipelineRunner() peakPicker := sp.NewFromShell("PeakPicker", "PeakPickerHiRes -in {i:sample} -out {o:out} -ini {p:ini}") peakPicker.PathFormatters["out"] = func(t *sp.SciTask) string { // filename = basename("{0}_{2}.{1}".format(*self.sampleFile.rsplit('.', 1) + ["peaks"])) // return luigi.LocalTarget("results/"+filename) return "todo_implement_path_formatting.txt" } prun.AddProcess(peakPicker) prun.Run() } ## Instruction: Improve path formatting in k8s openms example ## Code After: package main import ( str "strings" sp "github.com/scipipe/scipipe" ) const ( workDir = "/scipipe-data/" ) func main() { prun := sp.NewPipelineRunner() peakPicker := sp.NewFromShell("PeakPicker", "PeakPickerHiRes -in {i:sample} -out {o:out} -ini {p:ini}") peakPicker.PathFormatters["out"] = func(t *sp.SciTask) string { parts := str.Split(t.GetInPath("sample"), ".") outPath := "results/" + str.Join(parts[:len(parts)-1], "_") + ".peaks" return outPath } prun.AddProcess(peakPicker) prun.Run() }
package main + import ( + str "strings" + - import sp "github.com/scipipe/scipipe" ? ^^^^^^^ + sp "github.com/scipipe/scipipe" ? ^ + ) const ( workDir = "/scipipe-data/" ) func main() { prun := sp.NewPipelineRunner() peakPicker := sp.NewFromShell("PeakPicker", "PeakPickerHiRes -in {i:sample} -out {o:out} -ini {p:ini}") peakPicker.PathFormatters["out"] = func(t *sp.SciTask) string { - // filename = basename("{0}_{2}.{1}".format(*self.sampleFile.rsplit('.', 1) + ["peaks"])) - // return luigi.LocalTarget("results/"+filename) - return "todo_implement_path_formatting.txt" + parts := str.Split(t.GetInPath("sample"), ".") + outPath := "results/" + str.Join(parts[:len(parts)-1], "_") + ".peaks" + return outPath } prun.AddProcess(peakPicker) prun.Run() }
12
0.545455
8
4
c95e6d8b683dbe2d4f04e219d1c86dea5990fb70
Clients/webfrontauth-ngx/projects/webfrontauth-ngx/src/lib/AuthServiceClientConfiguration.ts
Clients/webfrontauth-ngx/projects/webfrontauth-ngx/src/lib/AuthServiceClientConfiguration.ts
import { IAuthServiceConfiguration, IEndPoint } from '@signature/webfrontauth'; /** * WebFrontAuth configuration class. * * @export */ export class AuthServiceClientConfiguration implements IAuthServiceConfiguration { /** * Creates an instance of AuthServiceClientConfiguration using the provided login route and endpoint. * @param identityEndPoint The identity endpoint to use in WebFrontAuth * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ constructor( public readonly identityEndPoint: IEndPoint, public readonly loginPath: string = '/login' ) { } } /** * Creates an instance of AuthServiceClientConfiguration using the specified login route, * and the current host as identity endpoint. * * @export * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ export function createAuthConfigUsingCurrentHost( loginPath: string = '/login' ): AuthServiceClientConfiguration { const isHttps = window.location.protocol.toLowerCase() === 'https:'; const identityEndPoint: IEndPoint = { hostname: window.location.hostname, port: window.location.port ? Number(window.location.port) : isHttps ? 443 : 80, disableSsl: !isHttps }; return new AuthServiceClientConfiguration(identityEndPoint, loginPath); }
import { IAuthServiceConfiguration, IEndPoint } from '@signature/webfrontauth'; /** * WebFrontAuth configuration class. * * @export */ export class AuthServiceClientConfiguration implements IAuthServiceConfiguration { /** * Creates an instance of AuthServiceClientConfiguration using the provided login route and endpoint. * @param identityEndPoint The identity endpoint to use in WebFrontAuth * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ constructor( public readonly identityEndPoint: IEndPoint, public readonly loginPath: string = '/login' ) { } } /** * Creates an instance of AuthServiceClientConfiguration using the specified login route, * and the current host as identity endpoint. * * @export * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ export function createAuthConfigUsingCurrentHost( loginPath: string = '/login' ): AuthServiceClientConfiguration { const isHttps = window.location.protocol.toLowerCase() === 'https:'; const identityEndPoint: IEndPoint = { hostname: window.location.hostname, port: window.location.port ? Number(window.location.port) : undefined, disableSsl: !isHttps }; return new AuthServiceClientConfiguration(identityEndPoint, loginPath); }
Fix wfa-ngx specifying default port when it shouldn't in createAuthConfigUsingCurrentHost()
Fix wfa-ngx specifying default port when it shouldn't in createAuthConfigUsingCurrentHost()
TypeScript
mit
Invenietis/CK-AspNet-Auth,Invenietis/CK-AspNet-Auth,Invenietis/CK-AspNet-Auth,Invenietis/CK-AspNet-Auth
typescript
## Code Before: import { IAuthServiceConfiguration, IEndPoint } from '@signature/webfrontauth'; /** * WebFrontAuth configuration class. * * @export */ export class AuthServiceClientConfiguration implements IAuthServiceConfiguration { /** * Creates an instance of AuthServiceClientConfiguration using the provided login route and endpoint. * @param identityEndPoint The identity endpoint to use in WebFrontAuth * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ constructor( public readonly identityEndPoint: IEndPoint, public readonly loginPath: string = '/login' ) { } } /** * Creates an instance of AuthServiceClientConfiguration using the specified login route, * and the current host as identity endpoint. * * @export * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ export function createAuthConfigUsingCurrentHost( loginPath: string = '/login' ): AuthServiceClientConfiguration { const isHttps = window.location.protocol.toLowerCase() === 'https:'; const identityEndPoint: IEndPoint = { hostname: window.location.hostname, port: window.location.port ? Number(window.location.port) : isHttps ? 443 : 80, disableSsl: !isHttps }; return new AuthServiceClientConfiguration(identityEndPoint, loginPath); } ## Instruction: Fix wfa-ngx specifying default port when it shouldn't in createAuthConfigUsingCurrentHost() ## Code After: import { IAuthServiceConfiguration, IEndPoint } from '@signature/webfrontauth'; /** * WebFrontAuth configuration class. * * @export */ export class AuthServiceClientConfiguration implements IAuthServiceConfiguration { /** * Creates an instance of AuthServiceClientConfiguration using the provided login route and endpoint. * @param identityEndPoint The identity endpoint to use in WebFrontAuth * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ constructor( public readonly identityEndPoint: IEndPoint, public readonly loginPath: string = '/login' ) { } } /** * Creates an instance of AuthServiceClientConfiguration using the specified login route, * and the current host as identity endpoint. * * @export * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ export function createAuthConfigUsingCurrentHost( loginPath: string = '/login' ): AuthServiceClientConfiguration { const isHttps = window.location.protocol.toLowerCase() === 'https:'; const identityEndPoint: IEndPoint = { hostname: window.location.hostname, port: window.location.port ? Number(window.location.port) : undefined, disableSsl: !isHttps }; return new AuthServiceClientConfiguration(identityEndPoint, loginPath); }
import { IAuthServiceConfiguration, IEndPoint } from '@signature/webfrontauth'; /** * WebFrontAuth configuration class. * * @export */ export class AuthServiceClientConfiguration implements IAuthServiceConfiguration { /** * Creates an instance of AuthServiceClientConfiguration using the provided login route and endpoint. * @param identityEndPoint The identity endpoint to use in WebFrontAuth * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ constructor( public readonly identityEndPoint: IEndPoint, public readonly loginPath: string = '/login' ) { } } /** * Creates an instance of AuthServiceClientConfiguration using the specified login route, * and the current host as identity endpoint. * * @export * @param [loginPath='/login'] The route path WebFrontAuth should redirect to when authentication is required. */ export function createAuthConfigUsingCurrentHost( loginPath: string = '/login' ): AuthServiceClientConfiguration { const isHttps = window.location.protocol.toLowerCase() === 'https:'; const identityEndPoint: IEndPoint = { hostname: window.location.hostname, port: window.location.port ? Number(window.location.port) + : undefined, - : isHttps - ? 443 - : 80, disableSsl: !isHttps }; return new AuthServiceClientConfiguration(identityEndPoint, loginPath); }
4
0.095238
1
3
20130eb3a9a4a90211ab7a606edb22c0a6a8361d
app/views/incidents/_table.haml
app/views/incidents/_table.haml
- if @incidents.present? %table.incidents %thead %tr %th Driver %th Occurred at %th Run %th Bus %th Location %th Complete? - if current_user.staff? %th Reviewed? %th{ colspan: 4 } - else %th{ colspan: 3 } %tbody - @incidents.each do |incident| %tr %td= incident.driver.name %td= incident.occurred_at_readable %td= incident.driver_incident_report.run %td= incident.driver_incident_report.bus %td= incident.driver_incident_report.location %td= yes_no_image incident.completed? - if current_user.staff? %td= yes_no_image incident.reviewed? %td = link_to incident do %button.btn.btn-default - if current_user.staff? View / Review - else View %td = link_to incident_path(incident, format: :pdf) do %button.btn.btn-default Print %td - if current_user.staff? || !incident.reviewed? = link_to edit_incident_path(incident) do %button.btn.btn-default - if incident.completed? Edit - else Complete - if current_user.staff? %td = link_to incident, method: :delete do %button.btn.btn-default.delete Delete - else %h2 No incidents found.
- if @incidents.present? %table.incidents %thead %tr %th Driver %th Supervisor %th Occurred at %th Run %th Bus %th Location %th Complete? - if current_user.staff? %th Reviewed? %th{ colspan: 4 } - else %th{ colspan: 3 } %tbody - @incidents.each do |incident| %tr %td= incident.driver.name %td= incident.supervisor.name %td= incident.occurred_at_readable %td= incident.driver_incident_report.run %td= incident.driver_incident_report.bus %td= incident.driver_incident_report.location %td= yes_no_image incident.completed? - if current_user.staff? %td= yes_no_image incident.reviewed? %td = link_to incident do %button.btn.btn-default - if current_user.staff? View / Review - else View %td = link_to incident_path(incident, format: :pdf) do %button.btn.btn-default Print %td - if current_user.staff? || !incident.reviewed? = link_to edit_incident_path(incident) do %button.btn.btn-default - if incident.completed? Edit - else Complete - if current_user.staff? %td = link_to incident, method: :delete do %button.btn.btn-default.delete Delete - else %h2 No incidents found.
Add supervisor name to incidents table
Add supervisor name to incidents table
Haml
mit
umts/incidents,umts/incidents,umts/incidents
haml
## Code Before: - if @incidents.present? %table.incidents %thead %tr %th Driver %th Occurred at %th Run %th Bus %th Location %th Complete? - if current_user.staff? %th Reviewed? %th{ colspan: 4 } - else %th{ colspan: 3 } %tbody - @incidents.each do |incident| %tr %td= incident.driver.name %td= incident.occurred_at_readable %td= incident.driver_incident_report.run %td= incident.driver_incident_report.bus %td= incident.driver_incident_report.location %td= yes_no_image incident.completed? - if current_user.staff? %td= yes_no_image incident.reviewed? %td = link_to incident do %button.btn.btn-default - if current_user.staff? View / Review - else View %td = link_to incident_path(incident, format: :pdf) do %button.btn.btn-default Print %td - if current_user.staff? || !incident.reviewed? = link_to edit_incident_path(incident) do %button.btn.btn-default - if incident.completed? Edit - else Complete - if current_user.staff? %td = link_to incident, method: :delete do %button.btn.btn-default.delete Delete - else %h2 No incidents found. ## Instruction: Add supervisor name to incidents table ## Code After: - if @incidents.present? %table.incidents %thead %tr %th Driver %th Supervisor %th Occurred at %th Run %th Bus %th Location %th Complete? - if current_user.staff? %th Reviewed? %th{ colspan: 4 } - else %th{ colspan: 3 } %tbody - @incidents.each do |incident| %tr %td= incident.driver.name %td= incident.supervisor.name %td= incident.occurred_at_readable %td= incident.driver_incident_report.run %td= incident.driver_incident_report.bus %td= incident.driver_incident_report.location %td= yes_no_image incident.completed? - if current_user.staff? %td= yes_no_image incident.reviewed? %td = link_to incident do %button.btn.btn-default - if current_user.staff? View / Review - else View %td = link_to incident_path(incident, format: :pdf) do %button.btn.btn-default Print %td - if current_user.staff? || !incident.reviewed? = link_to edit_incident_path(incident) do %button.btn.btn-default - if incident.completed? Edit - else Complete - if current_user.staff? %td = link_to incident, method: :delete do %button.btn.btn-default.delete Delete - else %h2 No incidents found.
- if @incidents.present? %table.incidents %thead %tr %th Driver + %th Supervisor %th Occurred at %th Run %th Bus %th Location %th Complete? - if current_user.staff? %th Reviewed? %th{ colspan: 4 } - else %th{ colspan: 3 } %tbody - @incidents.each do |incident| %tr %td= incident.driver.name + %td= incident.supervisor.name %td= incident.occurred_at_readable %td= incident.driver_incident_report.run %td= incident.driver_incident_report.bus %td= incident.driver_incident_report.location %td= yes_no_image incident.completed? - if current_user.staff? %td= yes_no_image incident.reviewed? %td = link_to incident do %button.btn.btn-default - if current_user.staff? View / Review - else View %td = link_to incident_path(incident, format: :pdf) do %button.btn.btn-default Print %td - if current_user.staff? || !incident.reviewed? = link_to edit_incident_path(incident) do %button.btn.btn-default - if incident.completed? Edit - else Complete - if current_user.staff? %td = link_to incident, method: :delete do %button.btn.btn-default.delete Delete - else %h2 No incidents found.
2
0.04
2
0
f75947565ea6e47b01e98bb94f64c28c2c0a647c
package.json
package.json
{ "name": "beam-keyboard", "version": "0.3.1", "description": "", "main": "index.js", "scripts": { "test": "xo" }, "author": "Richard Fox", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ProbablePrime/beam-keyboard.git" }, "dependencies": { "async.cargo": "^0.5.2", "beam-client-node": "0.6.1", "beam-interactive-node": "^0.3.1", "bluebird": "^3.4.1", "cli-color": "^1.1.0", "clui": "^0.3.1", "deep-equal": "^1.0.1", "keycode": "^2.1.0", "robot-js": "^1.0.2" }, "xo": { "esnext": true, "rules": { "xo/filename-case": 0 } }, "devDependencies": { "xo": "^0.13.0" } }
{ "name": "beam-keyboard", "version": "0.3.1", "description": "", "main": "index.js", "scripts": { "test": "xo" }, "author": "Richard Fox", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ProbablePrime/beam-keyboard.git" }, "dependencies": { "async.cargo": "^0.5.2", "beam-client-node": "0.6.1", "beam-interactive-node": "^0.3.1", "bluebird": "^3.4.1", "cli-color": "^1.1.0", "clui": "git://github.com/metaa/clui", "deep-equal": "^1.0.1", "keycode": "^2.1.0", "robot-js": "^1.0.2" }, "xo": { "esnext": true, "rules": { "xo/filename-case": 0 } }, "devDependencies": { "xo": "^0.13.0" } }
Update depenency reference for clui
Update depenency reference for clui
JSON
mit
ProbablePrime/beam-keyboard,ProbablePrime/interactive-keyboard
json
## Code Before: { "name": "beam-keyboard", "version": "0.3.1", "description": "", "main": "index.js", "scripts": { "test": "xo" }, "author": "Richard Fox", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ProbablePrime/beam-keyboard.git" }, "dependencies": { "async.cargo": "^0.5.2", "beam-client-node": "0.6.1", "beam-interactive-node": "^0.3.1", "bluebird": "^3.4.1", "cli-color": "^1.1.0", "clui": "^0.3.1", "deep-equal": "^1.0.1", "keycode": "^2.1.0", "robot-js": "^1.0.2" }, "xo": { "esnext": true, "rules": { "xo/filename-case": 0 } }, "devDependencies": { "xo": "^0.13.0" } } ## Instruction: Update depenency reference for clui ## Code After: { "name": "beam-keyboard", "version": "0.3.1", "description": "", "main": "index.js", "scripts": { "test": "xo" }, "author": "Richard Fox", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ProbablePrime/beam-keyboard.git" }, "dependencies": { "async.cargo": "^0.5.2", "beam-client-node": "0.6.1", "beam-interactive-node": "^0.3.1", "bluebird": "^3.4.1", "cli-color": "^1.1.0", "clui": "git://github.com/metaa/clui", "deep-equal": "^1.0.1", "keycode": "^2.1.0", "robot-js": "^1.0.2" }, "xo": { "esnext": true, "rules": { "xo/filename-case": 0 } }, "devDependencies": { "xo": "^0.13.0" } }
{ "name": "beam-keyboard", "version": "0.3.1", "description": "", "main": "index.js", "scripts": { "test": "xo" }, "author": "Richard Fox", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ProbablePrime/beam-keyboard.git" }, "dependencies": { "async.cargo": "^0.5.2", "beam-client-node": "0.6.1", "beam-interactive-node": "^0.3.1", "bluebird": "^3.4.1", "cli-color": "^1.1.0", - "clui": "^0.3.1", + "clui": "git://github.com/metaa/clui", "deep-equal": "^1.0.1", "keycode": "^2.1.0", "robot-js": "^1.0.2" }, "xo": { "esnext": true, "rules": { "xo/filename-case": 0 } }, "devDependencies": { "xo": "^0.13.0" } }
2
0.057143
1
1
35a0bfaf499029fa54d33d6ea712e255cc41e1de
core/migrations/0003_set_homepage.py
core/migrations/0003_set_homepage.py
from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create default site Site.objects.create( hostname='localhost', root_page_id=homepage.id, is_default_site=True ) class Migration(migrations.Migration): dependencies = [ ('core', '0002_create_home_page'), ] operations = [ migrations.RunPython(set_homepage), ]
from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") Site.objects.filter(hostname='localhost').delete() # Create default site Site.objects.get_or_create( hostname='localhost', root_page_id=homepage.id, is_default_site=True ) class Migration(migrations.Migration): dependencies = [ ('core', '0002_create_home_page'), ] operations = [ migrations.RunPython(set_homepage), ]
Delete existing localhost entry for site.
Delete existing localhost entry for site.
Python
mit
albertoconnor/website,albertoconnor/website,OpenCanada/website,OpenCanada/website,OpenCanada/website,albertoconnor/website,albertoconnor/website,OpenCanada/website
python
## Code Before: from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create default site Site.objects.create( hostname='localhost', root_page_id=homepage.id, is_default_site=True ) class Migration(migrations.Migration): dependencies = [ ('core', '0002_create_home_page'), ] operations = [ migrations.RunPython(set_homepage), ] ## Instruction: Delete existing localhost entry for site. ## Code After: from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") Site.objects.filter(hostname='localhost').delete() # Create default site Site.objects.get_or_create( hostname='localhost', root_page_id=homepage.id, is_default_site=True ) class Migration(migrations.Migration): dependencies = [ ('core', '0002_create_home_page'), ] operations = [ migrations.RunPython(set_homepage), ]
from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") + Site.objects.filter(hostname='localhost').delete() + # Create default site - Site.objects.create( + Site.objects.get_or_create( ? +++++++ hostname='localhost', root_page_id=homepage.id, is_default_site=True ) class Migration(migrations.Migration): dependencies = [ ('core', '0002_create_home_page'), ] operations = [ migrations.RunPython(set_homepage), ]
4
0.153846
3
1
9f00392fbcbc4a8b318144fe9c0db7beb1a81819
data/events.yml
data/events.yml
peer_labs: - city: New York schedule: Every Saturday, 10:30am location: Artsy, 401 Broadway, Floor 25 meetup_url: https://www.meetup.com/CocoaPods-NYC/ contact_twitter: ashfurrow contact_email: ash@ashfurrow.com - city: Amsterdam schedule: Every Saturday, 9:00am location: The Coffee Room, Kinkerstraat 110 meetup_url: https://www.meetup.com/Appsterdam/ contact_twitter: samuelgoodwin - city: London schedule: A Monday every month, 7:00pm meetup_url: https://www.meetup.com/swiftlondon/
peer_labs: - city: New York schedule: Every Saturday, 10:30am location: Artsy, 401 Broadway, Floor 25 meetup_url: https://www.meetup.com/CocoaPods-NYC/ contact_twitter: ashfurrow contact_email: ash@ashfurrow.com - city: Amsterdam schedule: Every Saturday, 9:00am location: The Coffee Room, Kinkerstraat 110 meetup_url: https://www.meetup.com/Appsterdam/ contact_twitter: samuelgoodwin - city: London schedule: A Monday every month, 7:00pm meetup_url: https://www.meetup.com/swiftlondon/ - city: Montréal, QC schedule: A Saturday every month, 10:00am location: Gab, 4815-A Boul. St-Laurent meetup_url: https://meetup.com/CocoaHeads-Montreal/ contact_twitter: cocoaheadsmtl contact_email: romain.pouclet@gmail.com
Add Cocoaheads Montreal Side Project Saturday
Add Cocoaheads Montreal Side Project Saturday
YAML
mit
ashfurrow/peerlab.community,ashfurrow/peerlab.community
yaml
## Code Before: peer_labs: - city: New York schedule: Every Saturday, 10:30am location: Artsy, 401 Broadway, Floor 25 meetup_url: https://www.meetup.com/CocoaPods-NYC/ contact_twitter: ashfurrow contact_email: ash@ashfurrow.com - city: Amsterdam schedule: Every Saturday, 9:00am location: The Coffee Room, Kinkerstraat 110 meetup_url: https://www.meetup.com/Appsterdam/ contact_twitter: samuelgoodwin - city: London schedule: A Monday every month, 7:00pm meetup_url: https://www.meetup.com/swiftlondon/ ## Instruction: Add Cocoaheads Montreal Side Project Saturday ## Code After: peer_labs: - city: New York schedule: Every Saturday, 10:30am location: Artsy, 401 Broadway, Floor 25 meetup_url: https://www.meetup.com/CocoaPods-NYC/ contact_twitter: ashfurrow contact_email: ash@ashfurrow.com - city: Amsterdam schedule: Every Saturday, 9:00am location: The Coffee Room, Kinkerstraat 110 meetup_url: https://www.meetup.com/Appsterdam/ contact_twitter: samuelgoodwin - city: London schedule: A Monday every month, 7:00pm meetup_url: https://www.meetup.com/swiftlondon/ - city: Montréal, QC schedule: A Saturday every month, 10:00am location: Gab, 4815-A Boul. St-Laurent meetup_url: https://meetup.com/CocoaHeads-Montreal/ contact_twitter: cocoaheadsmtl contact_email: romain.pouclet@gmail.com
peer_labs: - city: New York schedule: Every Saturday, 10:30am location: Artsy, 401 Broadway, Floor 25 meetup_url: https://www.meetup.com/CocoaPods-NYC/ contact_twitter: ashfurrow contact_email: ash@ashfurrow.com - city: Amsterdam schedule: Every Saturday, 9:00am location: The Coffee Room, Kinkerstraat 110 meetup_url: https://www.meetup.com/Appsterdam/ contact_twitter: samuelgoodwin - city: London schedule: A Monday every month, 7:00pm meetup_url: https://www.meetup.com/swiftlondon/ + + - city: Montréal, QC + schedule: A Saturday every month, 10:00am + location: Gab, 4815-A Boul. St-Laurent + meetup_url: https://meetup.com/CocoaHeads-Montreal/ + contact_twitter: cocoaheadsmtl + contact_email: romain.pouclet@gmail.com
7
0.411765
7
0
7ef36706b2ead8b1da2728b33cb6aa571323d9b8
README.md
README.md
A Chrome extension that instantly likes videos from channels you subscribe to, so you never forget to support your favorite content creators! No login required. >_**[Get it in the Web Store!](https://chrome.google.com/webstore/detail/youtube-auto-like/loodalcnddclgnfekfomcoiipiohcdim)**_ Also, Firefox users—[check this out!](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/) ## Translations Do you know another language? Feel free to contribute with a [pull request](https://github.com/austencm/youtube-auto-like/pulls), or grab [the JSON file](https://raw.githubusercontent.com/austencm/youtube-auto-like/master/app/_locales/en/messages.json), translate it, and [send it back to me](mailto:heyausten@gmail.com). ## Contributors (thank you!) [Taknok](https://github.com/Taknok) ~ [Firefox edition](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/), Language-independent button selection method; ES, FR translations
A Chrome extension that instantly likes videos from channels you subscribe to, so you never forget to support your favorite content creators! No login required. >_**[Get it in the Web Store!](https://chrome.google.com/webstore/detail/youtube-auto-like/loodalcnddclgnfekfomcoiipiohcdim)**_ Also, Firefox users—[check this out!](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/) ## Translations Do you know another language? Feel free to contribute with a [pull request](https://github.com/austencm/youtube-auto-like/pulls), or grab [the JSON file](https://raw.githubusercontent.com/austencm/youtube-auto-like/master/app/_locales/en/messages.json), translate it, and [send it back to me](mailto:heyausten@gmail.com). ## Contributors (thank you!) [Taknok](https://github.com/Taknok) ~ [Firefox edition](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/), Language-independent button selection method; ES, FR translations [JKetelaar](https://github.com/JKetelaar) ~ NL translation
Add contributor credit for NL translation
Add contributor credit for NL translation
Markdown
mit
austencm/youtube-auto-like,austencm/youtube-auto-like
markdown
## Code Before: A Chrome extension that instantly likes videos from channels you subscribe to, so you never forget to support your favorite content creators! No login required. >_**[Get it in the Web Store!](https://chrome.google.com/webstore/detail/youtube-auto-like/loodalcnddclgnfekfomcoiipiohcdim)**_ Also, Firefox users—[check this out!](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/) ## Translations Do you know another language? Feel free to contribute with a [pull request](https://github.com/austencm/youtube-auto-like/pulls), or grab [the JSON file](https://raw.githubusercontent.com/austencm/youtube-auto-like/master/app/_locales/en/messages.json), translate it, and [send it back to me](mailto:heyausten@gmail.com). ## Contributors (thank you!) [Taknok](https://github.com/Taknok) ~ [Firefox edition](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/), Language-independent button selection method; ES, FR translations ## Instruction: Add contributor credit for NL translation ## Code After: A Chrome extension that instantly likes videos from channels you subscribe to, so you never forget to support your favorite content creators! No login required. >_**[Get it in the Web Store!](https://chrome.google.com/webstore/detail/youtube-auto-like/loodalcnddclgnfekfomcoiipiohcdim)**_ Also, Firefox users—[check this out!](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/) ## Translations Do you know another language? Feel free to contribute with a [pull request](https://github.com/austencm/youtube-auto-like/pulls), or grab [the JSON file](https://raw.githubusercontent.com/austencm/youtube-auto-like/master/app/_locales/en/messages.json), translate it, and [send it back to me](mailto:heyausten@gmail.com). ## Contributors (thank you!) [Taknok](https://github.com/Taknok) ~ [Firefox edition](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/), Language-independent button selection method; ES, FR translations [JKetelaar](https://github.com/JKetelaar) ~ NL translation
A Chrome extension that instantly likes videos from channels you subscribe to, so you never forget to support your favorite content creators! No login required. >_**[Get it in the Web Store!](https://chrome.google.com/webstore/detail/youtube-auto-like/loodalcnddclgnfekfomcoiipiohcdim)**_ Also, Firefox users—[check this out!](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/) ## Translations Do you know another language? Feel free to contribute with a [pull request](https://github.com/austencm/youtube-auto-like/pulls), or grab [the JSON file](https://raw.githubusercontent.com/austencm/youtube-auto-like/master/app/_locales/en/messages.json), translate it, and [send it back to me](mailto:heyausten@gmail.com). ## Contributors (thank you!) [Taknok](https://github.com/Taknok) ~ [Firefox edition](https://addons.mozilla.org/en-US/firefox/addon/youtube_auto_like/), Language-independent button selection method; ES, FR translations + [JKetelaar](https://github.com/JKetelaar) ~ NL translation
1
0.090909
1
0
7b2de9c43b4669129f2b99f5da3dd1e99042cfaf
css/putsi.css
css/putsi.css
html { position: relative; min-height: 100%; } body { margin-bottom: 35px; } #logo { text-align: center; } @media (max-width: 500px) { .top-padding { min-height: 10px; } .navbar { text-align: center; } .navbar-nav { display: inline-block; } } @media (min-width: 500px) and (max-width: 992px) { .top-padding { min-height: 10px; } .navbar, #logo { display: inline-flex; } } @media (min-width: 992px) { .top-padding { min-height: 128px; } .navbar-nav .nav-item+.nav-item { margin-left: 0rem; } .navbar-nav .nav-item { float: none; } } .footer { position: absolute; bottom: 1px; width: 100%; height: 35px; line-height: 35px; text-align: center; }
html { position: relative; min-height: 100%; } body { margin-bottom: 35px; } #logo { text-align: center; } @media (max-width: 500px) { .top-padding { min-height: 10px; } .navbar { text-align: center; } .navbar-nav { display: inline-block; } } @media (min-width: 500px) and (max-width: 992px) { .top-padding { min-height: 10px; } .navbar, #logo { display: inline-flex; } } @media (min-width: 992px) { .top-padding { min-height: 10vh; } .navbar-nav .nav-item+.nav-item { margin-left: 0rem; } .navbar-nav .nav-item { float: none; } section { max-height: 75vh; overflow-y: scroll; } } .footer { position: absolute; bottom: 1px; width: 100%; height: 35px; line-height: 35px; text-align: center; }
Add some fancy css so that the site is more responsive
Add some fancy css so that the site is more responsive
CSS
mit
putsi/putsi.github.io,putsi/putsi.github.io
css
## Code Before: html { position: relative; min-height: 100%; } body { margin-bottom: 35px; } #logo { text-align: center; } @media (max-width: 500px) { .top-padding { min-height: 10px; } .navbar { text-align: center; } .navbar-nav { display: inline-block; } } @media (min-width: 500px) and (max-width: 992px) { .top-padding { min-height: 10px; } .navbar, #logo { display: inline-flex; } } @media (min-width: 992px) { .top-padding { min-height: 128px; } .navbar-nav .nav-item+.nav-item { margin-left: 0rem; } .navbar-nav .nav-item { float: none; } } .footer { position: absolute; bottom: 1px; width: 100%; height: 35px; line-height: 35px; text-align: center; } ## Instruction: Add some fancy css so that the site is more responsive ## Code After: html { position: relative; min-height: 100%; } body { margin-bottom: 35px; } #logo { text-align: center; } @media (max-width: 500px) { .top-padding { min-height: 10px; } .navbar { text-align: center; } .navbar-nav { display: inline-block; } } @media (min-width: 500px) and (max-width: 992px) { .top-padding { min-height: 10px; } .navbar, #logo { display: inline-flex; } } @media (min-width: 992px) { .top-padding { min-height: 10vh; } .navbar-nav .nav-item+.nav-item { margin-left: 0rem; } .navbar-nav .nav-item { float: none; } section { max-height: 75vh; overflow-y: scroll; } } .footer { position: absolute; bottom: 1px; width: 100%; height: 35px; line-height: 35px; text-align: center; }
html { - position: relative; ? ^^ + position: relative; ? ^ - min-height: 100%; ? ^^ + min-height: 100%; ? ^ } body { - margin-bottom: 35px; ? ^^ + margin-bottom: 35px; ? ^ } #logo { text-align: center; } @media (max-width: 500px) { .top-padding { min-height: 10px; } .navbar { text-align: center; } .navbar-nav { display: inline-block; } } @media (min-width: 500px) and (max-width: 992px) { .top-padding { min-height: 10px; } .navbar, #logo { display: inline-flex; } } @media (min-width: 992px) { .top-padding { - min-height: 128px; ? ^^^^ + min-height: 10vh; ? ^^^ } .navbar-nav .nav-item+.nav-item { margin-left: 0rem; } .navbar-nav .nav-item { float: none; + } + section { + max-height: 75vh; + overflow-y: scroll; } } .footer { position: absolute; bottom: 1px; width: 100%; height: 35px; line-height: 35px; text-align: center; }
12
0.25
8
4
192777749ccbc85b166699ffa94d49144aa06a6e
src/Chamilo/Application/Weblcms/Tool/Implementation/Ephorus/composer.json
src/Chamilo/Application/Weblcms/Tool/Implementation/Ephorus/composer.json
{ "name": "chamilo/app-weblcms-tool-ephorus", "version": "6.0.0", "description": "Chamilo Ephorus Weblcms Tool", "keywords": [], "homepage": "http://www.chamilo.org", "license": "GPLv3", "authors": [ { "name": "Sven Vanpoucke", "email": "sven.vanpoucke@hogent.be" }, { "name": "Hans De Bisschop", "email": "hans.de.bisschop@ehb.be" } ], "require": { "php": ">=5.4.0", "fergusean/nusoap" : "*" }, "extra": { "install-path": "application/weblcms/tool/ephorus" } }
{ "name": "chamilo/app-weblcms-tool-ephorus", "version": "6.0.0", "description": "Chamilo Ephorus Weblcms Tool", "keywords": [], "homepage": "http://www.chamilo.org", "license": "GPLv3", "authors": [ { "name": "Sven Vanpoucke", "email": "sven.vanpoucke@hogent.be" }, { "name": "Hans De Bisschop", "email": "hans.de.bisschop@ehb.be" } ], "require": { "php": ">=5.4.0", "codecasts/nusoap-php7" : "*" }, "extra": { "install-path": "application/weblcms/tool/ephorus" } }
Use a PHP7 compatible version of NUSOAP
Use a PHP7 compatible version of NUSOAP
JSON
mit
cosnicsTHLU/cosnics,cosnics/cosnics,forelo/cosnics,cosnicsTHLU/cosnics,cosnics/cosnics,forelo/cosnics,cosnics/cosnics,cosnics/cosnics,cosnicsTHLU/cosnics,cosnics/cosnics,forelo/cosnics,cosnicsTHLU/cosnics,cosnics/cosnics,cosnics/cosnics,forelo/cosnics,cosnicsTHLU/cosnics,cosnics/cosnics,cosnicsTHLU/cosnics,forelo/cosnics,forelo/cosnics,forelo/cosnics,forelo/cosnics
json
## Code Before: { "name": "chamilo/app-weblcms-tool-ephorus", "version": "6.0.0", "description": "Chamilo Ephorus Weblcms Tool", "keywords": [], "homepage": "http://www.chamilo.org", "license": "GPLv3", "authors": [ { "name": "Sven Vanpoucke", "email": "sven.vanpoucke@hogent.be" }, { "name": "Hans De Bisschop", "email": "hans.de.bisschop@ehb.be" } ], "require": { "php": ">=5.4.0", "fergusean/nusoap" : "*" }, "extra": { "install-path": "application/weblcms/tool/ephorus" } } ## Instruction: Use a PHP7 compatible version of NUSOAP ## Code After: { "name": "chamilo/app-weblcms-tool-ephorus", "version": "6.0.0", "description": "Chamilo Ephorus Weblcms Tool", "keywords": [], "homepage": "http://www.chamilo.org", "license": "GPLv3", "authors": [ { "name": "Sven Vanpoucke", "email": "sven.vanpoucke@hogent.be" }, { "name": "Hans De Bisschop", "email": "hans.de.bisschop@ehb.be" } ], "require": { "php": ">=5.4.0", "codecasts/nusoap-php7" : "*" }, "extra": { "install-path": "application/weblcms/tool/ephorus" } }
{ "name": "chamilo/app-weblcms-tool-ephorus", "version": "6.0.0", "description": "Chamilo Ephorus Weblcms Tool", "keywords": [], "homepage": "http://www.chamilo.org", "license": "GPLv3", "authors": [ { "name": "Sven Vanpoucke", "email": "sven.vanpoucke@hogent.be" }, { "name": "Hans De Bisschop", "email": "hans.de.bisschop@ehb.be" } ], "require": { "php": ">=5.4.0", - "fergusean/nusoap" : "*" + "codecasts/nusoap-php7" : "*" }, "extra": { "install-path": "application/weblcms/tool/ephorus" } }
2
0.076923
1
1
ad48fa5246b105a91e07ef8268d760c122392dec
.rubocop.yml
.rubocop.yml
AlignParameters: Enabled: false AndOr: Enabled: false CaseEquality: Enabled: false ClassLength: Enabled: false Documentation: Enabled: false DoubleNegation: Enabled: false EndAlignment: AlignWith: variable IndentHash: Enabled: false LineLength: Max: 100 MethodLength: Enabled: false RescueException: Enabled: false SignalException: Enabled: false StringLiterals: EnforcedStyle: double_quotes TrailingComma: Enabled: false TrivialAccessors: AllowPredicates: true
AlignParameters: Enabled: false AndOr: Enabled: false CaseEquality: Enabled: false ClassLength: Enabled: false Documentation: Enabled: false DoubleNegation: Enabled: false EndAlignment: AlignWith: variable IndentHash: Enabled: false LineLength: Max: 100 MethodLength: Enabled: false RescueException: Enabled: false SignalException: Enabled: false SpaceBeforeFirstArg: Enabled: false StringLiterals: EnforcedStyle: double_quotes TrailingComma: Enabled: false TrivialAccessors: AllowPredicates: true
Disable broken SpaceBeforeFirstArg cop in RuboCop 0.20.0.
Disable broken SpaceBeforeFirstArg cop in RuboCop 0.20.0.
YAML
mit
byroot/lita,chriswoodrich/lita,brodock/lita,litaio/lita,natesholland/lita,litaio/lita,tristaneuan/lita,jimmycuadra/lita,sadiqmmm/lita,sadiqmmm/lita,chriswoodrich/lita,jimmycuadra/lita,liamdawson/lita,elia/lita,natesholland/lita,brodock/lita,liamdawson/lita,jaisonerick/lita,mcgain/lita,MatthewKrey/lita,elia/lita,mcgain/lita,crimsonknave/lita,jaisonerick/lita,tristaneuan/lita,byroot/lita,MatthewKrey/lita,crimsonknave/lita
yaml
## Code Before: AlignParameters: Enabled: false AndOr: Enabled: false CaseEquality: Enabled: false ClassLength: Enabled: false Documentation: Enabled: false DoubleNegation: Enabled: false EndAlignment: AlignWith: variable IndentHash: Enabled: false LineLength: Max: 100 MethodLength: Enabled: false RescueException: Enabled: false SignalException: Enabled: false StringLiterals: EnforcedStyle: double_quotes TrailingComma: Enabled: false TrivialAccessors: AllowPredicates: true ## Instruction: Disable broken SpaceBeforeFirstArg cop in RuboCop 0.20.0. ## Code After: AlignParameters: Enabled: false AndOr: Enabled: false CaseEquality: Enabled: false ClassLength: Enabled: false Documentation: Enabled: false DoubleNegation: Enabled: false EndAlignment: AlignWith: variable IndentHash: Enabled: false LineLength: Max: 100 MethodLength: Enabled: false RescueException: Enabled: false SignalException: Enabled: false SpaceBeforeFirstArg: Enabled: false StringLiterals: EnforcedStyle: double_quotes TrailingComma: Enabled: false TrivialAccessors: AllowPredicates: true
AlignParameters: Enabled: false AndOr: Enabled: false CaseEquality: Enabled: false ClassLength: Enabled: false Documentation: Enabled: false DoubleNegation: Enabled: false EndAlignment: AlignWith: variable IndentHash: Enabled: false LineLength: Max: 100 MethodLength: Enabled: false RescueException: Enabled: false SignalException: Enabled: false + SpaceBeforeFirstArg: + Enabled: false StringLiterals: EnforcedStyle: double_quotes TrailingComma: Enabled: false TrivialAccessors: AllowPredicates: true
2
0.066667
2
0
665ca414be14d4608d3ba84b3cdbb66e725f33d8
assets/css/custom.css
assets/css/custom.css
.home-nav { position: absolute; display: inline-flex; bottom: 50px; width: 100%; } .home-nav-logo { width: 20%; background-color: black; padding: 10px; } .home-nav-logo * { float: right; } .home-nav-logo h3 { color: white; margin-top: 0px; margin-bottom: 0px; } .home-nav-logo img { width: 100px; } .home-nav-links { width: 80%; background-color: rgba(0, 0, 0, 0.8); display: inline-block; vertical-align: top; } .home-nav-links ul { position: relative; vertical-align: text-top; transform: translateY(-50%); top: 50%; } .home-nav-links li a { font-size: 22px; color: white; margin-left: 20px; } .home-nav-links a:hover { color: rgb(103, 103, 103); text-decoration: none; }
.home-nav { position: absolute; display: inline-flex; bottom: 50px; width: 100%; } .home-nav-logo { width: 20%; background-color: black; padding: 10px; } .home-nav-logo * { float: right; } .home-nav-logo h3 { color: white; margin-top: 0px; margin-bottom: 0px; } .home-nav-logo img { width: 100px; } .home-nav-links { width: 80%; background-color: rgba(0, 0, 0, 0.8); display: inline-block; vertical-align: top; } .home-nav-links ul { position: relative; vertical-align: text-top; transform: translateY(-50%); top: 50%; } /* Chrome and Safari Specific */ @media screen and (-webkit-min-device-pixel-ratio:0) { .home-nav-links ul { -webkit-transform: translateY(50%); } } .home-nav-links li a { font-size: 22px; color: white; margin-left: 20px; } .home-nav-links a:hover { color: rgb(103, 103, 103); text-decoration: none; }
Add Compatibility with Chrome and Safari on Homepage
Add Compatibility with Chrome and Safari on Homepage
CSS
mit
dinosaurfiles/dinosaurfiles.github.io,dinosaurfiles/dinosaurfiles.github.io
css
## Code Before: .home-nav { position: absolute; display: inline-flex; bottom: 50px; width: 100%; } .home-nav-logo { width: 20%; background-color: black; padding: 10px; } .home-nav-logo * { float: right; } .home-nav-logo h3 { color: white; margin-top: 0px; margin-bottom: 0px; } .home-nav-logo img { width: 100px; } .home-nav-links { width: 80%; background-color: rgba(0, 0, 0, 0.8); display: inline-block; vertical-align: top; } .home-nav-links ul { position: relative; vertical-align: text-top; transform: translateY(-50%); top: 50%; } .home-nav-links li a { font-size: 22px; color: white; margin-left: 20px; } .home-nav-links a:hover { color: rgb(103, 103, 103); text-decoration: none; } ## Instruction: Add Compatibility with Chrome and Safari on Homepage ## Code After: .home-nav { position: absolute; display: inline-flex; bottom: 50px; width: 100%; } .home-nav-logo { width: 20%; background-color: black; padding: 10px; } .home-nav-logo * { float: right; } .home-nav-logo h3 { color: white; margin-top: 0px; margin-bottom: 0px; } .home-nav-logo img { width: 100px; } .home-nav-links { width: 80%; background-color: rgba(0, 0, 0, 0.8); display: inline-block; vertical-align: top; } .home-nav-links ul { position: relative; vertical-align: text-top; transform: translateY(-50%); top: 50%; } /* Chrome and Safari Specific */ @media screen and (-webkit-min-device-pixel-ratio:0) { .home-nav-links ul { -webkit-transform: translateY(50%); } } .home-nav-links li a { font-size: 22px; color: white; margin-left: 20px; } .home-nav-links a:hover { color: rgb(103, 103, 103); text-decoration: none; }
.home-nav { position: absolute; display: inline-flex; bottom: 50px; width: 100%; } .home-nav-logo { width: 20%; background-color: black; padding: 10px; } .home-nav-logo * { float: right; } .home-nav-logo h3 { color: white; margin-top: 0px; margin-bottom: 0px; } .home-nav-logo img { width: 100px; } .home-nav-links { width: 80%; background-color: rgba(0, 0, 0, 0.8); display: inline-block; vertical-align: top; } .home-nav-links ul { position: relative; vertical-align: text-top; transform: translateY(-50%); top: 50%; } + + /* Chrome and Safari Specific */ + + @media screen and (-webkit-min-device-pixel-ratio:0) { + .home-nav-links ul { + -webkit-transform: translateY(50%); + } + } .home-nav-links li a { font-size: 22px; color: white; margin-left: 20px; } .home-nav-links a:hover { color: rgb(103, 103, 103); text-decoration: none; }
8
0.186047
8
0
2a02a3da47f54e7b7049fbac36d40c44f09d22fa
README.md
README.md
Style import\_tree Proof Of Concept =================================== This is a dummy exampe of `import_tree` implementation. Consider you have a directory with files you need to import, instead of writing bunch of `@import` statements in your stylus file, you might want to simply call `import_tree()`: ``` stylus import_tree('./foobar'); // insted of: // @import 'foobar/a' // @import 'foobar/b' // @import 'foobar/c/d' ``` **NOTICE** you can't flexibly control order of inclusions in this case. The only way you can control the order in this example is filenames, imports are done in alphabetical order. For total controll over what is included when and where, use [Mincer][1], which will give you awesome cow power! [1]: https://github.com/nodeca/mincer
Style import\_tree Proof Of Concept =================================== This is a dummy exampe of `import_tree` implementation. Consider you have a directory with files you need to import, instead of writing bunch of `@import` statements in your stylus file, you might want to simply call `import_tree()`: ``` stylus import_tree('./foobar'); // insted of: // @import 'foobar/a' // @import 'foobar/b' // @import 'foobar/c/d' ``` **NOTICE** you can't flexibly control order of inclusions in this case. The only way you can control the order in this example is filenames, imports are done in alphabetical order. For total controll over what is included when and where, use [Mincer][1], which will give you awesome cow power! How to run ---------- npm install node . [1]: https://github.com/nodeca/mincer
Add info how to run
Add info how to run
Markdown
mit
ixti/stylus-import-tree
markdown
## Code Before: Style import\_tree Proof Of Concept =================================== This is a dummy exampe of `import_tree` implementation. Consider you have a directory with files you need to import, instead of writing bunch of `@import` statements in your stylus file, you might want to simply call `import_tree()`: ``` stylus import_tree('./foobar'); // insted of: // @import 'foobar/a' // @import 'foobar/b' // @import 'foobar/c/d' ``` **NOTICE** you can't flexibly control order of inclusions in this case. The only way you can control the order in this example is filenames, imports are done in alphabetical order. For total controll over what is included when and where, use [Mincer][1], which will give you awesome cow power! [1]: https://github.com/nodeca/mincer ## Instruction: Add info how to run ## Code After: Style import\_tree Proof Of Concept =================================== This is a dummy exampe of `import_tree` implementation. Consider you have a directory with files you need to import, instead of writing bunch of `@import` statements in your stylus file, you might want to simply call `import_tree()`: ``` stylus import_tree('./foobar'); // insted of: // @import 'foobar/a' // @import 'foobar/b' // @import 'foobar/c/d' ``` **NOTICE** you can't flexibly control order of inclusions in this case. The only way you can control the order in this example is filenames, imports are done in alphabetical order. For total controll over what is included when and where, use [Mincer][1], which will give you awesome cow power! How to run ---------- npm install node . [1]: https://github.com/nodeca/mincer
Style import\_tree Proof Of Concept =================================== This is a dummy exampe of `import_tree` implementation. Consider you have a directory with files you need to import, instead of writing bunch of `@import` statements in your stylus file, you might want to simply call `import_tree()`: ``` stylus import_tree('./foobar'); // insted of: // @import 'foobar/a' // @import 'foobar/b' // @import 'foobar/c/d' ``` **NOTICE** you can't flexibly control order of inclusions in this case. The only way you can control the order in this example is filenames, imports are done in alphabetical order. For total controll over what is included when and where, use [Mincer][1], which will give you awesome cow power! + How to run + ---------- + + npm install + node . + + [1]: https://github.com/nodeca/mincer
7
0.291667
7
0
43f992cf733be95fc160df57255be5aefb2cccf9
lib/dpl/provider/npm.rb
lib/dpl/provider/npm.rb
require 'json' module DPL class Provider class NPM < Provider NPMRC_FILE = '~/.npmrc' DEFAULT_NPM_REGISTRY = 'registry.npmjs.org' def needs_key? false end def check_app end def setup_auth file = File.open(File.expand_path(NPMRC_FILE), 'w') file.puts(npmrc_file_content) file.flush end def check_auth setup_auth log "Authenticated with email #{option(:email)}" end def push_app log "NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc." log "http://docs.travis-ci.com/user/deployment/npm/" context.shell "env NPM_API_KEY=#{option(:api_key)} npm publish" FileUtils.rm(File.expand_path(NPMRC_FILE)) end def package_registry if File.exists?('package.json') data = JSON.parse(File.read('package.json')) if data['publishConfig'] && data['publishConfig']['registry'] return data['publishConfig']['registry'] end end DEFAULT_NPM_REGISTRY end def npmrc_file_content if npm_version =~ /^1/ "_auth = ${NPM_API_KEY}\nemail = #{option(:email)}" else "//#{package_registry}/:_authToken=${NPM_API_KEY}" end end def npm_version `npm --version` end end end end
require 'json' module DPL class Provider class NPM < Provider NPMRC_FILE = '~/.npmrc' DEFAULT_NPM_REGISTRY = 'registry.npmjs.org' def needs_key? false end def check_app end def setup_auth file = File.open(File.expand_path(NPMRC_FILE), 'w') file.puts(npmrc_file_content) file.flush end def check_auth setup_auth log "Authenticated with email #{option(:email)}" end def push_app log "NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc." log "http://docs.travis-ci.com/user/deployment/npm/" log "#{NPMRC_FILE} size: #{File.size(File.expand_path(NPMRC_FILE))}" context.shell "env NPM_API_KEY=#{option(:api_key)} npm publish" FileUtils.rm(File.expand_path(NPMRC_FILE)) end def package_registry if File.exists?('package.json') data = JSON.parse(File.read('package.json')) if data['publishConfig'] && data['publishConfig']['registry'] return data['publishConfig']['registry'] end end DEFAULT_NPM_REGISTRY end def npmrc_file_content log "NPM version: #{npm_version}" if npm_version =~ /^1/ "_auth = ${NPM_API_KEY}\nemail = #{option(:email)}" else "//#{package_registry}/:_authToken=${NPM_API_KEY}" end end def npm_version `npm --version` end end end end
Add debug output for NPM deployment
Add debug output for NPM deployment Users report persistent 401 while publishing to npmjs. We investigate whether `#flush` was enough or not by dumping the file's size
Ruby
mit
travis-ci/dpl,jsloyer/dpl,testfairy/dpl,johanneswuerbach/dpl,Misfit-SW-China/dpl,georgantasp/dpl,LoicMahieu/dpl,sebest/dpl,pengsrc/dpl,Zyko0/dpl,axelfontaine/dpl,flowlo/dpl,travis-ci/dpl,testfairy/dpl,clayreimann/dpl,mattk42/dpl,kalbasit/dpl,testfairy/dpl,jonathan-s/dpl,mathiasrw/dpl,computology/dpl,travis-ci/dpl
ruby
## Code Before: require 'json' module DPL class Provider class NPM < Provider NPMRC_FILE = '~/.npmrc' DEFAULT_NPM_REGISTRY = 'registry.npmjs.org' def needs_key? false end def check_app end def setup_auth file = File.open(File.expand_path(NPMRC_FILE), 'w') file.puts(npmrc_file_content) file.flush end def check_auth setup_auth log "Authenticated with email #{option(:email)}" end def push_app log "NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc." log "http://docs.travis-ci.com/user/deployment/npm/" context.shell "env NPM_API_KEY=#{option(:api_key)} npm publish" FileUtils.rm(File.expand_path(NPMRC_FILE)) end def package_registry if File.exists?('package.json') data = JSON.parse(File.read('package.json')) if data['publishConfig'] && data['publishConfig']['registry'] return data['publishConfig']['registry'] end end DEFAULT_NPM_REGISTRY end def npmrc_file_content if npm_version =~ /^1/ "_auth = ${NPM_API_KEY}\nemail = #{option(:email)}" else "//#{package_registry}/:_authToken=${NPM_API_KEY}" end end def npm_version `npm --version` end end end end ## Instruction: Add debug output for NPM deployment Users report persistent 401 while publishing to npmjs. We investigate whether `#flush` was enough or not by dumping the file's size ## Code After: require 'json' module DPL class Provider class NPM < Provider NPMRC_FILE = '~/.npmrc' DEFAULT_NPM_REGISTRY = 'registry.npmjs.org' def needs_key? false end def check_app end def setup_auth file = File.open(File.expand_path(NPMRC_FILE), 'w') file.puts(npmrc_file_content) file.flush end def check_auth setup_auth log "Authenticated with email #{option(:email)}" end def push_app log "NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc." log "http://docs.travis-ci.com/user/deployment/npm/" log "#{NPMRC_FILE} size: #{File.size(File.expand_path(NPMRC_FILE))}" context.shell "env NPM_API_KEY=#{option(:api_key)} npm publish" FileUtils.rm(File.expand_path(NPMRC_FILE)) end def package_registry if File.exists?('package.json') data = JSON.parse(File.read('package.json')) if data['publishConfig'] && data['publishConfig']['registry'] return data['publishConfig']['registry'] end end DEFAULT_NPM_REGISTRY end def npmrc_file_content log "NPM version: #{npm_version}" if npm_version =~ /^1/ "_auth = ${NPM_API_KEY}\nemail = #{option(:email)}" else "//#{package_registry}/:_authToken=${NPM_API_KEY}" end end def npm_version `npm --version` end end end end
require 'json' module DPL class Provider class NPM < Provider NPMRC_FILE = '~/.npmrc' DEFAULT_NPM_REGISTRY = 'registry.npmjs.org' def needs_key? false end def check_app end def setup_auth file = File.open(File.expand_path(NPMRC_FILE), 'w') file.puts(npmrc_file_content) file.flush end def check_auth setup_auth log "Authenticated with email #{option(:email)}" end def push_app log "NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc." log "http://docs.travis-ci.com/user/deployment/npm/" + log "#{NPMRC_FILE} size: #{File.size(File.expand_path(NPMRC_FILE))}" context.shell "env NPM_API_KEY=#{option(:api_key)} npm publish" FileUtils.rm(File.expand_path(NPMRC_FILE)) end def package_registry if File.exists?('package.json') data = JSON.parse(File.read('package.json')) if data['publishConfig'] && data['publishConfig']['registry'] return data['publishConfig']['registry'] end end DEFAULT_NPM_REGISTRY end def npmrc_file_content + log "NPM version: #{npm_version}" if npm_version =~ /^1/ "_auth = ${NPM_API_KEY}\nemail = #{option(:email)}" else "//#{package_registry}/:_authToken=${NPM_API_KEY}" end end def npm_version `npm --version` end end end end
2
0.034483
2
0
fd7f63d8a548c1d25c35021e0ce5bf4f3c177fd1
cookbooks/dev/templates/default/rails.setup.rb.erb
cookbooks/dev/templates/default/rails.setup.rb.erb
unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY) OpenStreetMap::Application.config.after_initialize do unless webmaster = User.find_by_email("webmaster@openstreetmap.org") webmaster = User.new webmaster.display_name = "OpenStreetMap Webmaster" webmaster.email = "webmaster@openstreetmap.org" webmaster.pass_crypt = SecureRandom.hex webmaster.status = "active" webmaster.save! end permissions = Hash[ClientApplication.all_permissions.map { |p| [ p, true ] }] unless id = webmaster.client_applications.find_by_name("iD") id = ClientApplication.new id.name = "iD" id.url = "http://<%= @site %>/" id.save! end ID_KEY = id.key unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2") potlatch = ClientApplication.new potlatch.name = "Potlatch 2" potlatch.url = "http://<%= @site %>/" potlatch.save! end POTLATCH2_KEY = potlatch.key unless website = webmaster.client_applications.find_by_name("Web Site") website = ClientApplication.new website.name = "Web Site" website.url = "http://<%= @site %>/" website.save! end OAUTH_KEY = website.key end end
unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY) OpenStreetMap::Application.config.after_initialize do unless webmaster = User.find_by_email("webmaster@openstreetmap.org") webmaster = User.new webmaster.display_name = "OpenStreetMap Webmaster" webmaster.email = "webmaster@openstreetmap.org" webmaster.pass_crypt = SecureRandom.hex webmaster.status = "active" webmaster.save! end unless id = webmaster.client_applications.find_by_name("iD") id = webmaster.client_applications.new id.name = "iD" id.url = "http://<%= @site %>/" ClientApplication.all_permissions.each { |p| id[p] = true } id.save! end ID_KEY = id.key unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2") potlatch = webmaster.client_applications.new potlatch.name = "Potlatch 2" potlatch.url = "http://<%= @site %>/" ClientApplication.all_permissions.each { |p| potlatch[p] = true } potlatch.save! end POTLATCH2_KEY = potlatch.key unless website = webmaster.client_applications.find_by_name("Web Site") website = webmaster.client_applications.new website.name = "Web Site" website.url = "http://<%= @site %>/" ClientApplication.all_permissions.each { |p| website[p] = true } website.save! end OAUTH_KEY = website.key end end
Fix up issues in dev server rails setup script
Fix up issues in dev server rails setup script
HTML+ERB
apache-2.0
openstreetmap/chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,Firefishy/chef,zerebubuth/openstreetmap-chef,gravitystorm/chef,tomhughes/openstreetmap-chef,gravitystorm/chef,Firefishy/chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,zerebubuth/openstreetmap-chef,Firefishy/chef,tomhughes/openstreetmap-chef,Firefishy/chef,gravitystorm/chef,openstreetmap/chef,gravitystorm/chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,gravitystorm/chef,openstreetmap/chef,Firefishy/chef,zerebubuth/openstreetmap-chef,gravitystorm/chef,Firefishy/chef,tomhughes/openstreetmap-chef,openstreetmap/chef,tomhughes/openstreetmap-chef,zerebubuth/openstreetmap-chef,gravitystorm/chef,Firefishy/chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,Firefishy/chef,gravitystorm/chef,openstreetmap/chef,openstreetmap/chef
html+erb
## Code Before: unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY) OpenStreetMap::Application.config.after_initialize do unless webmaster = User.find_by_email("webmaster@openstreetmap.org") webmaster = User.new webmaster.display_name = "OpenStreetMap Webmaster" webmaster.email = "webmaster@openstreetmap.org" webmaster.pass_crypt = SecureRandom.hex webmaster.status = "active" webmaster.save! end permissions = Hash[ClientApplication.all_permissions.map { |p| [ p, true ] }] unless id = webmaster.client_applications.find_by_name("iD") id = ClientApplication.new id.name = "iD" id.url = "http://<%= @site %>/" id.save! end ID_KEY = id.key unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2") potlatch = ClientApplication.new potlatch.name = "Potlatch 2" potlatch.url = "http://<%= @site %>/" potlatch.save! end POTLATCH2_KEY = potlatch.key unless website = webmaster.client_applications.find_by_name("Web Site") website = ClientApplication.new website.name = "Web Site" website.url = "http://<%= @site %>/" website.save! end OAUTH_KEY = website.key end end ## Instruction: Fix up issues in dev server rails setup script ## Code After: unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY) OpenStreetMap::Application.config.after_initialize do unless webmaster = User.find_by_email("webmaster@openstreetmap.org") webmaster = User.new webmaster.display_name = "OpenStreetMap Webmaster" webmaster.email = "webmaster@openstreetmap.org" webmaster.pass_crypt = SecureRandom.hex webmaster.status = "active" webmaster.save! end unless id = webmaster.client_applications.find_by_name("iD") id = webmaster.client_applications.new id.name = "iD" id.url = "http://<%= @site %>/" ClientApplication.all_permissions.each { |p| id[p] = true } id.save! end ID_KEY = id.key unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2") potlatch = webmaster.client_applications.new potlatch.name = "Potlatch 2" potlatch.url = "http://<%= @site %>/" ClientApplication.all_permissions.each { |p| potlatch[p] = true } potlatch.save! end POTLATCH2_KEY = potlatch.key unless website = webmaster.client_applications.find_by_name("Web Site") website = webmaster.client_applications.new website.name = "Web Site" website.url = "http://<%= @site %>/" ClientApplication.all_permissions.each { |p| website[p] = true } website.save! end OAUTH_KEY = website.key end end
unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY) OpenStreetMap::Application.config.after_initialize do unless webmaster = User.find_by_email("webmaster@openstreetmap.org") webmaster = User.new webmaster.display_name = "OpenStreetMap Webmaster" webmaster.email = "webmaster@openstreetmap.org" webmaster.pass_crypt = SecureRandom.hex webmaster.status = "active" webmaster.save! end - permissions = Hash[ClientApplication.all_permissions.map { |p| [ p, true ] }] - unless id = webmaster.client_applications.find_by_name("iD") - id = ClientApplication.new ? ^ ^ + id = webmaster.client_applications.new ? ^^^^^^^^^^^ ^^ + id.name = "iD" id.url = "http://<%= @site %>/" + ClientApplication.all_permissions.each { |p| id[p] = true } id.save! end ID_KEY = id.key unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2") - potlatch = ClientApplication.new ? ^ ^ + potlatch = webmaster.client_applications.new ? ^^^^^^^^^^^ ^^ + potlatch.name = "Potlatch 2" potlatch.url = "http://<%= @site %>/" + ClientApplication.all_permissions.each { |p| potlatch[p] = true } potlatch.save! end POTLATCH2_KEY = potlatch.key unless website = webmaster.client_applications.find_by_name("Web Site") - website = ClientApplication.new ? ^ ^ + website = webmaster.client_applications.new ? ^^^^^^^^^^^ ^^ + website.name = "Web Site" website.url = "http://<%= @site %>/" + ClientApplication.all_permissions.each { |p| website[p] = true } website.save! end OAUTH_KEY = website.key end end
11
0.268293
6
5
7a11a309c3f8b14ad4aab71e9860cf6bf3992b94
.github/ISSUE_TEMPLATE.md
.github/ISSUE_TEMPLATE.md
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> ### Prerequisites * [ ] Put an X between the brackets on this line if you have done all of the following: * Reproduced the problem with clear cache. * (If running the application locally:) Made sure your running the newest version on the development branch * Checked that your issue isn't already filed: https://github.com/UTNkar/moore/issues ### Description [Description of the issue] ### Steps to Reproduce 1. [First Step] 2. [Second Step] 3. [and so on...] <!-- Please select the appropriate "topic category"/blue and "issue type"/yellow label -->
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> ### Description [Description of the issue] ### Steps to Reproduce 1. [First Step] 2. [Second Step] 3. [and so on...] <!-- Please select the appropriate "topic category"/blue and "issue type"/yellow label -->
Remove the prerequisites from the issue template
Remove the prerequisites from the issue template
Markdown
agpl-3.0
Dekker1/moore,Dekker1/moore,UTNkar/moore,Dekker1/moore,UTNkar/moore,Dekker1/moore,UTNkar/moore,UTNkar/moore
markdown
## Code Before: <!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> ### Prerequisites * [ ] Put an X between the brackets on this line if you have done all of the following: * Reproduced the problem with clear cache. * (If running the application locally:) Made sure your running the newest version on the development branch * Checked that your issue isn't already filed: https://github.com/UTNkar/moore/issues ### Description [Description of the issue] ### Steps to Reproduce 1. [First Step] 2. [Second Step] 3. [and so on...] <!-- Please select the appropriate "topic category"/blue and "issue type"/yellow label --> ## Instruction: Remove the prerequisites from the issue template ## Code After: <!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> ### Description [Description of the issue] ### Steps to Reproduce 1. [First Step] 2. [Second Step] 3. [and so on...] <!-- Please select the appropriate "topic category"/blue and "issue type"/yellow label -->
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> - - ### Prerequisites - - * [ ] Put an X between the brackets on this line if you have done all of the - following: - * Reproduced the problem with clear cache. - * (If running the application locally:) Made sure your running the newest version on the development branch - * Checked that your issue isn't already filed: https://github.com/UTNkar/moore/issues ### Description [Description of the issue] ### Steps to Reproduce 1. [First Step] 2. [Second Step] 3. [and so on...] <!-- Please select the appropriate "topic category"/blue and "issue type"/yellow label -->
8
0.380952
0
8
e09b563883b3663f8a619ede638ac651e2f84d55
.travis.yml
.travis.yml
language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success:   - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com
language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success: | sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com
Change the after_success script to be more correct
Change the after_success script to be more correct
YAML
mit
Orbitale/CmsBundle,Orbitale/CmsBundle
yaml
## Code Before: language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success:   - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com ## Instruction: Change the after_success script to be more correct ## Code After: language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success: | sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com
language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml - after_success: + after_success: | ? ++ -   - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' ? ----- ^^^^^^ + sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' ? ^^ notifications: email: pierstoval@gmail.com
4
0.093023
2
2
cd6d6bf924c540ee044165cef8f953d3d0616416
README.md
README.md
photon-core =========== On the fly photo processing
photon-core =========== On the fly photo processing See it in use in an example at https://github.com/1000Memories/photon-example
Update readme a teensy bit
Update readme a teensy bit
Markdown
apache-2.0
1000Memories/photon-core,michaelmior/photon-core,jordan-thoms/photon-notable
markdown
## Code Before: photon-core =========== On the fly photo processing ## Instruction: Update readme a teensy bit ## Code After: photon-core =========== On the fly photo processing See it in use in an example at https://github.com/1000Memories/photon-example
photon-core =========== On the fly photo processing + + See it in use in an example at https://github.com/1000Memories/photon-example
2
0.5
2
0
b395c8f01233e7be40c934014b385dba1a091b28
laravel/resources/css/_review.scss
laravel/resources/css/_review.scss
.review { height: 800px; .title { font-weight: bold; padding: 10px; } .h-scroll { height: 100%; overflow-y: scroll; } .ans { margin: 10px; background-color: #eee; padding: 10px; } .btn { margin:10px; } .feedback { margin: 15px; background-color: #fafafa; padding: 10px; } .danger { background-color: #a94442; } }
.review { height: 800px; .title { font-weight: bold; padding: 10px; } .y-scroll { height: 100%; overflow-y: scroll; } .ans { margin: 10px; background-color: #eee; padding: 10px; } .btn { margin:10px; } .feedback { margin: 15px; background-color: #fafafa; padding: 10px; } .danger { color: red; border: 2px solid red; } }
Set boarder and text to red on application warnings
Set boarder and text to red on application warnings Set the answer box boarder and text to red if the user hasn't answered a question in the review screen. Signed-off-by: Marc Jones <bb1304e98184a66f7e15848bfbd0ff1c09583089@gmail.com>
SCSS
mit
marcj303/weightlifter,playatech/weightlifter,itsrachelfish/weightlifter,playatech/weightlifter,marcj303/weightlifter,itsrachelfish/weightlifter,playatech/weightlifter,marcj303/weightlifter
scss
## Code Before: .review { height: 800px; .title { font-weight: bold; padding: 10px; } .h-scroll { height: 100%; overflow-y: scroll; } .ans { margin: 10px; background-color: #eee; padding: 10px; } .btn { margin:10px; } .feedback { margin: 15px; background-color: #fafafa; padding: 10px; } .danger { background-color: #a94442; } } ## Instruction: Set boarder and text to red on application warnings Set the answer box boarder and text to red if the user hasn't answered a question in the review screen. Signed-off-by: Marc Jones <bb1304e98184a66f7e15848bfbd0ff1c09583089@gmail.com> ## Code After: .review { height: 800px; .title { font-weight: bold; padding: 10px; } .y-scroll { height: 100%; overflow-y: scroll; } .ans { margin: 10px; background-color: #eee; padding: 10px; } .btn { margin:10px; } .feedback { margin: 15px; background-color: #fafafa; padding: 10px; } .danger { color: red; border: 2px solid red; } }
.review { height: 800px; .title { font-weight: bold; padding: 10px; } - .h-scroll { ? ^ + .y-scroll { ? ^ height: 100%; overflow-y: scroll; } .ans { margin: 10px; background-color: #eee; padding: 10px; } .btn { margin:10px; } .feedback { margin: 15px; background-color: #fafafa; padding: 10px; } .danger { - background-color: #a94442; + color: red; + border: 2px solid red; } }
5
0.178571
3
2
9803f912429ea35cc90d975d5568005bb50e5cc2
app/dashboards/package_dashboard.rb
app/dashboards/package_dashboard.rb
require "administrate/base_dashboard" class PackageDashboard < Administrate::BaseDashboard # ATTRIBUTE_TYPES # a hash that describes the type of each of the model's fields. # # Each different type represents an Administrate::Field object, # which determines how the attribute is displayed # on pages throughout the dashboard. ATTRIBUTE_TYPES = { id: Field::Number, name: Field::String, description: Field::Text, created_at: Field::DateTime, updated_at: Field::DateTime, }.freeze # COLLECTION_ATTRIBUTES # an array of attributes that will be displayed on the model's index page. # # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ :id, :name, :description, :created_at, ].freeze # SHOW_PAGE_ATTRIBUTES # an array of attributes that will be displayed on the model's show page. SHOW_PAGE_ATTRIBUTES = [ :id, :name, :description, :created_at, :updated_at, ].freeze # FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. FORM_ATTRIBUTES = [ :name, :description, ].freeze # Overwrite this method to customize how packages are displayed # across all pages of the admin dashboard. # def display_resource(package) package.name end end
require "administrate/base_dashboard" class PackageDashboard < Administrate::BaseDashboard # ATTRIBUTE_TYPES # a hash that describes the type of each of the model's fields. # # Each different type represents an Administrate::Field object, # which determines how the attribute is displayed # on pages throughout the dashboard. ATTRIBUTE_TYPES = { id: Field::Number, name: Field::String, description: Field::Text, country: Field::BelongsTo, created_at: Field::DateTime, updated_at: Field::DateTime, }.freeze # COLLECTION_ATTRIBUTES # an array of attributes that will be displayed on the model's index page. # # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ :id, :name, :description, :country, :created_at, ].freeze # SHOW_PAGE_ATTRIBUTES # an array of attributes that will be displayed on the model's show page. SHOW_PAGE_ATTRIBUTES = [ :id, :name, :description, :country, :created_at, :updated_at, ].freeze # FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. FORM_ATTRIBUTES = [ :name, :description, :country ].freeze # Overwrite this method to customize how packages are displayed # across all pages of the admin dashboard. # def display_resource(package) package.name end end
Add country field to package dashboard
Add country field to package dashboard
Ruby
mit
enoliglesias/shiny-octo-waddle,enoliglesias/shiny-octo-waddle,enoliglesias/shiny-octo-waddle
ruby
## Code Before: require "administrate/base_dashboard" class PackageDashboard < Administrate::BaseDashboard # ATTRIBUTE_TYPES # a hash that describes the type of each of the model's fields. # # Each different type represents an Administrate::Field object, # which determines how the attribute is displayed # on pages throughout the dashboard. ATTRIBUTE_TYPES = { id: Field::Number, name: Field::String, description: Field::Text, created_at: Field::DateTime, updated_at: Field::DateTime, }.freeze # COLLECTION_ATTRIBUTES # an array of attributes that will be displayed on the model's index page. # # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ :id, :name, :description, :created_at, ].freeze # SHOW_PAGE_ATTRIBUTES # an array of attributes that will be displayed on the model's show page. SHOW_PAGE_ATTRIBUTES = [ :id, :name, :description, :created_at, :updated_at, ].freeze # FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. FORM_ATTRIBUTES = [ :name, :description, ].freeze # Overwrite this method to customize how packages are displayed # across all pages of the admin dashboard. # def display_resource(package) package.name end end ## Instruction: Add country field to package dashboard ## Code After: require "administrate/base_dashboard" class PackageDashboard < Administrate::BaseDashboard # ATTRIBUTE_TYPES # a hash that describes the type of each of the model's fields. # # Each different type represents an Administrate::Field object, # which determines how the attribute is displayed # on pages throughout the dashboard. ATTRIBUTE_TYPES = { id: Field::Number, name: Field::String, description: Field::Text, country: Field::BelongsTo, created_at: Field::DateTime, updated_at: Field::DateTime, }.freeze # COLLECTION_ATTRIBUTES # an array of attributes that will be displayed on the model's index page. # # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ :id, :name, :description, :country, :created_at, ].freeze # SHOW_PAGE_ATTRIBUTES # an array of attributes that will be displayed on the model's show page. SHOW_PAGE_ATTRIBUTES = [ :id, :name, :description, :country, :created_at, :updated_at, ].freeze # FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. FORM_ATTRIBUTES = [ :name, :description, :country ].freeze # Overwrite this method to customize how packages are displayed # across all pages of the admin dashboard. # def display_resource(package) package.name end end
require "administrate/base_dashboard" class PackageDashboard < Administrate::BaseDashboard # ATTRIBUTE_TYPES # a hash that describes the type of each of the model's fields. # # Each different type represents an Administrate::Field object, # which determines how the attribute is displayed # on pages throughout the dashboard. ATTRIBUTE_TYPES = { id: Field::Number, name: Field::String, description: Field::Text, + country: Field::BelongsTo, created_at: Field::DateTime, updated_at: Field::DateTime, }.freeze # COLLECTION_ATTRIBUTES # an array of attributes that will be displayed on the model's index page. # # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ :id, :name, :description, + :country, :created_at, ].freeze # SHOW_PAGE_ATTRIBUTES # an array of attributes that will be displayed on the model's show page. SHOW_PAGE_ATTRIBUTES = [ :id, :name, :description, + :country, :created_at, :updated_at, ].freeze # FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. FORM_ATTRIBUTES = [ :name, :description, + :country ].freeze # Overwrite this method to customize how packages are displayed # across all pages of the admin dashboard. # def display_resource(package) package.name end end
4
0.074074
4
0
d83685be7c384a0e6cd41656b4fad56a2c03444a
lib/git_evolution/report_presenter.rb
lib/git_evolution/report_presenter.rb
module GitEvolution class ReportPresenter def initialize(commits) @commits = commits @ownership = Hash.new(0) end def print print_commits puts '-' * 80 puts print_ownership end def print_commits puts 'Commits:' @commits.each do |commit| puts "#{commit.author} (#{Time.at(commit.date.to_i)}) - #{commit.sha}" puts "#{commit.title}" puts @ownership[commit.author] = @ownership[commit.author] + 1 end end def print_ownership puts 'Ownership:' @ownership.each do |author, count| puts "#{author} - #{count}/#{@commits.size} (#{(count.to_f / @commits.size * 100).round(2)}%)" end end end end
module GitEvolution class ReportPresenter def initialize(commits) @commits = commits @ownership = { commits: Hash.new(0), changes: Hash.new(0) } end def print print_commits puts puts '-' * 80 puts print_commit_ownership puts print_changes_ownership puts end def print_commits puts 'Commits:' @commits.each do |commit| puts "#{commit.author} (#{commit.date}) - #{commit.sha}" puts "#{commit.subject}" puts @ownership[:commits][commit.author] = @ownership[:commits][commit.author] + 1 @ownership[:changes][commit.author] = @ownership[:changes][commit.author] + commit.additions + commit.deletions end end def print_commit_ownership puts 'Ownership (Commits):' @ownership[:commits].each do |author, count| puts "#{author} - #{count}/#{@commits.size} (#{(count.to_f / @commits.size * 100).round(2)}%)" end end def print_changes_ownership puts 'Ownership (Changes):' total_additions = @commits.inject(0) { |sum, commit| sum + commit.additions } total_deletions = @commits.inject(0) { |sum, commit| sum + commit.deletions } total_changes = total_additions + total_deletions @ownership[:changes].each do |author, count| puts "#{author} - #{count}/#{total_changes} (#{(count.to_f / total_changes * 100).round(2)}%)" end end end end
Allow the ReportPresenter to print the ownership based on changes
Allow the ReportPresenter to print the ownership based on changes The commit additions/deletions are tallied up as 'changes', and reported in the output.
Ruby
mit
kevinjalbert/git_evolution
ruby
## Code Before: module GitEvolution class ReportPresenter def initialize(commits) @commits = commits @ownership = Hash.new(0) end def print print_commits puts '-' * 80 puts print_ownership end def print_commits puts 'Commits:' @commits.each do |commit| puts "#{commit.author} (#{Time.at(commit.date.to_i)}) - #{commit.sha}" puts "#{commit.title}" puts @ownership[commit.author] = @ownership[commit.author] + 1 end end def print_ownership puts 'Ownership:' @ownership.each do |author, count| puts "#{author} - #{count}/#{@commits.size} (#{(count.to_f / @commits.size * 100).round(2)}%)" end end end end ## Instruction: Allow the ReportPresenter to print the ownership based on changes The commit additions/deletions are tallied up as 'changes', and reported in the output. ## Code After: module GitEvolution class ReportPresenter def initialize(commits) @commits = commits @ownership = { commits: Hash.new(0), changes: Hash.new(0) } end def print print_commits puts puts '-' * 80 puts print_commit_ownership puts print_changes_ownership puts end def print_commits puts 'Commits:' @commits.each do |commit| puts "#{commit.author} (#{commit.date}) - #{commit.sha}" puts "#{commit.subject}" puts @ownership[:commits][commit.author] = @ownership[:commits][commit.author] + 1 @ownership[:changes][commit.author] = @ownership[:changes][commit.author] + commit.additions + commit.deletions end end def print_commit_ownership puts 'Ownership (Commits):' @ownership[:commits].each do |author, count| puts "#{author} - #{count}/#{@commits.size} (#{(count.to_f / @commits.size * 100).round(2)}%)" end end def print_changes_ownership puts 'Ownership (Changes):' total_additions = @commits.inject(0) { |sum, commit| sum + commit.additions } total_deletions = @commits.inject(0) { |sum, commit| sum + commit.deletions } total_changes = total_additions + total_deletions @ownership[:changes].each do |author, count| puts "#{author} - #{count}/#{total_changes} (#{(count.to_f / total_changes * 100).round(2)}%)" end end end end
module GitEvolution class ReportPresenter def initialize(commits) @commits = commits - @ownership = Hash.new(0) + @ownership = { commits: Hash.new(0), changes: Hash.new(0) } end def print print_commits + puts puts '-' * 80 puts - print_ownership + print_commit_ownership ? +++++++ + puts + print_changes_ownership + puts end def print_commits puts 'Commits:' @commits.each do |commit| - puts "#{commit.author} (#{Time.at(commit.date.to_i)}) - #{commit.sha}" ? -------- ------ + puts "#{commit.author} (#{commit.date}) - #{commit.sha}" - puts "#{commit.title}" ? ---- + puts "#{commit.subject}" ? ++++++ puts - @ownership[commit.author] = @ownership[commit.author] + 1 + @ownership[:commits][commit.author] = @ownership[:commits][commit.author] + 1 ? ++++++++++ ++++++++++ + @ownership[:changes][commit.author] = @ownership[:changes][commit.author] + commit.additions + commit.deletions end end - def print_ownership + def print_commit_ownership ? +++++++ - puts 'Ownership:' + puts 'Ownership (Commits):' ? ++++++++++ - @ownership.each do |author, count| + @ownership[:commits].each do |author, count| ? ++++++++++ puts "#{author} - #{count}/#{@commits.size} (#{(count.to_f / @commits.size * 100).round(2)}%)" + end + end + + def print_changes_ownership + puts 'Ownership (Changes):' + + total_additions = @commits.inject(0) { |sum, commit| sum + commit.additions } + total_deletions = @commits.inject(0) { |sum, commit| sum + commit.deletions } + total_changes = total_additions + total_deletions + + @ownership[:changes].each do |author, count| + puts "#{author} - #{count}/#{total_changes} (#{(count.to_f / total_changes * 100).round(2)}%)" end end end end
33
1
25
8
82344afed3636343877719fa3aa03377ec6c4159
app/assets/javascripts/student_signup.js
app/assets/javascripts/student_signup.js
var studentSignUp = function(timeslot_id){ var data = {}; data.subject = $("#subject-input").val(); $("#modal_remote").modal('hide'); $.ajax({ data: data, type: "PATCH", url: "/api/timeslots/" + timeslot_id, beforeSend: customBlockUi(this) }).done(function(){ swal({ title: "Great!", text: "You have scheduled a tutoring session!", confirmButtonColor: "#66BB6A", type: "success" }); $('#tutor-cal').fullCalendar('refetchEvents'); }).fail(function() { swal({ title: "Oops...", text: "Something went wrong!", confirmButtonColor: "#EF5350", type: "error" }); }); }
var studentSignUp = function(timeslot_id){ var data = {}; data.subject = $("#subject-input").val(); $("#modal_remote").modal('hide'); $.ajax({ data: data, type: "PATCH", url: "/api/timeslots/" + timeslot_id, beforeSend: customBlockUi(this) }).done(function(){ swal({ title: "Great!", text: "You have scheduled a tutoring session!", confirmButtonColor: "#FFFFFF", showConfirmButton: false, allowOutsideClick: true, timer: 1500, type: "success" }); $('#tutor-cal').fullCalendar('refetchEvents'); }).fail(function() { swal({ title: "Oops...", text: "Something went wrong!", confirmButtonColor: "#EF5350", type: "error" }); }); }
Add timer and remove confirm buttonk, overall cleanup for better ux
Add timer and remove confirm buttonk, overall cleanup for better ux
JavaScript
mit
theresaboard/theres-a-board,theresaboard/theres-a-board,theresaboard/theres-a-board
javascript
## Code Before: var studentSignUp = function(timeslot_id){ var data = {}; data.subject = $("#subject-input").val(); $("#modal_remote").modal('hide'); $.ajax({ data: data, type: "PATCH", url: "/api/timeslots/" + timeslot_id, beforeSend: customBlockUi(this) }).done(function(){ swal({ title: "Great!", text: "You have scheduled a tutoring session!", confirmButtonColor: "#66BB6A", type: "success" }); $('#tutor-cal').fullCalendar('refetchEvents'); }).fail(function() { swal({ title: "Oops...", text: "Something went wrong!", confirmButtonColor: "#EF5350", type: "error" }); }); } ## Instruction: Add timer and remove confirm buttonk, overall cleanup for better ux ## Code After: var studentSignUp = function(timeslot_id){ var data = {}; data.subject = $("#subject-input").val(); $("#modal_remote").modal('hide'); $.ajax({ data: data, type: "PATCH", url: "/api/timeslots/" + timeslot_id, beforeSend: customBlockUi(this) }).done(function(){ swal({ title: "Great!", text: "You have scheduled a tutoring session!", confirmButtonColor: "#FFFFFF", showConfirmButton: false, allowOutsideClick: true, timer: 1500, type: "success" }); $('#tutor-cal').fullCalendar('refetchEvents'); }).fail(function() { swal({ title: "Oops...", text: "Something went wrong!", confirmButtonColor: "#EF5350", type: "error" }); }); }
var studentSignUp = function(timeslot_id){ var data = {}; data.subject = $("#subject-input").val(); $("#modal_remote").modal('hide'); $.ajax({ data: data, type: "PATCH", url: "/api/timeslots/" + timeslot_id, beforeSend: customBlockUi(this) }).done(function(){ swal({ title: "Great!", text: "You have scheduled a tutoring session!", - confirmButtonColor: "#66BB6A", ? ^^^^^^ + confirmButtonColor: "#FFFFFF", ? ^^^^^^ + showConfirmButton: false, + allowOutsideClick: true, + timer: 1500, type: "success" }); $('#tutor-cal').fullCalendar('refetchEvents'); }).fail(function() { swal({ title: "Oops...", text: "Something went wrong!", confirmButtonColor: "#EF5350", type: "error" }); }); }
5
0.192308
4
1
140ba9640d342b12df3c3b620d64621c1cb3b556
source/chip/STM32/STM32F0/STM32F0-lowLevelInitialization.cpp
source/chip/STM32/STM32F0/STM32F0-lowLevelInitialization.cpp
/** * \file * \brief chip::lowLevelInitialization() implementation for STM32F0 * * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "distortos/chip/lowLevelInitialization.hpp" namespace distortos { namespace chip { /*---------------------------------------------------------------------------------------------------------------------+ | global functions +---------------------------------------------------------------------------------------------------------------------*/ void lowLevelInitialization() { } } // namespace chip } // namespace distortos
/** * \file * \brief chip::lowLevelInitialization() implementation for STM32F0 * * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "distortos/chip/lowLevelInitialization.hpp" #include "distortos/chip/STM32F0-FLASH.hpp" #include "distortos/distortosConfiguration.h" namespace distortos { namespace chip { /*---------------------------------------------------------------------------------------------------------------------+ | global functions +---------------------------------------------------------------------------------------------------------------------*/ void lowLevelInitialization() { #ifdef CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE configurePrefetchBuffer(true); #else // !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE configurePrefetchBuffer(false); #endif // !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE } } // namespace chip } // namespace distortos
Enable flash prefetch in low-level initialization for STM32F0
Enable flash prefetch in low-level initialization for STM32F0 Flash prefetch is enabled or disabled depending on whether CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE is defined or not.
C++
mpl-2.0
DISTORTEC/distortos,DISTORTEC/distortos,jasmin-j/distortos,DISTORTEC/distortos,jasmin-j/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,jasmin-j/distortos,jasmin-j/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,jasmin-j/distortos,CezaryGapinski/distortos
c++
## Code Before: /** * \file * \brief chip::lowLevelInitialization() implementation for STM32F0 * * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "distortos/chip/lowLevelInitialization.hpp" namespace distortos { namespace chip { /*---------------------------------------------------------------------------------------------------------------------+ | global functions +---------------------------------------------------------------------------------------------------------------------*/ void lowLevelInitialization() { } } // namespace chip } // namespace distortos ## Instruction: Enable flash prefetch in low-level initialization for STM32F0 Flash prefetch is enabled or disabled depending on whether CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE is defined or not. ## Code After: /** * \file * \brief chip::lowLevelInitialization() implementation for STM32F0 * * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "distortos/chip/lowLevelInitialization.hpp" #include "distortos/chip/STM32F0-FLASH.hpp" #include "distortos/distortosConfiguration.h" namespace distortos { namespace chip { /*---------------------------------------------------------------------------------------------------------------------+ | global functions +---------------------------------------------------------------------------------------------------------------------*/ void lowLevelInitialization() { #ifdef CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE configurePrefetchBuffer(true); #else // !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE configurePrefetchBuffer(false); #endif // !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE } } // namespace chip } // namespace distortos
/** * \file * \brief chip::lowLevelInitialization() implementation for STM32F0 * * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "distortos/chip/lowLevelInitialization.hpp" + #include "distortos/chip/STM32F0-FLASH.hpp" + + #include "distortos/distortosConfiguration.h" + namespace distortos { namespace chip { /*---------------------------------------------------------------------------------------------------------------------+ | global functions +---------------------------------------------------------------------------------------------------------------------*/ void lowLevelInitialization() { - + #ifdef CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE + configurePrefetchBuffer(true); + #else // !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE + configurePrefetchBuffer(false); + #endif // !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE } } // namespace chip } // namespace distortos
10
0.322581
9
1
19b5b1aa2697331c54b334e645eb49255fcffd75
README.md
README.md
dygraphs-dynamiczooming-example =============================== Demonstrates how to dynamically load down-sampled data, while zooming and panning, without modifying dygraphs. Demos and notes here: * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example1.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example2.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example3.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example4.html [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kaliatech/dygraphs-dynamiczooming-example/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
dygraphs-dynamiczooming-example =============================== Demonstrates how to dynamically load down-sampled data, while zooming and panning, without modifying dygraphs. Demos and notes here: * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example1.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example2.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example3.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example4.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example5.html [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kaliatech/dygraphs-dynamiczooming-example/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Add link to example5 in readme
Add link to example5 in readme
Markdown
mit
kaliatech/dygraphs-dynamiczooming-example,kaliatech/dygraphs-dynamiczooming-example,jayendra03/dygraphs-dynamiczooming-example,jayendra03/dygraphs-dynamiczooming-example
markdown
## Code Before: dygraphs-dynamiczooming-example =============================== Demonstrates how to dynamically load down-sampled data, while zooming and panning, without modifying dygraphs. Demos and notes here: * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example1.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example2.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example3.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example4.html [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kaliatech/dygraphs-dynamiczooming-example/trend.png)](https://bitdeli.com/free "Bitdeli Badge") ## Instruction: Add link to example5 in readme ## Code After: dygraphs-dynamiczooming-example =============================== Demonstrates how to dynamically load down-sampled data, while zooming and panning, without modifying dygraphs. Demos and notes here: * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example1.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example2.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example3.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example4.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example5.html [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kaliatech/dygraphs-dynamiczooming-example/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
dygraphs-dynamiczooming-example =============================== Demonstrates how to dynamically load down-sampled data, while zooming and panning, without modifying dygraphs. Demos and notes here: * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example1.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example2.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example3.html * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example4.html + * http://kaliatech.github.io/dygraphs-dynamiczooming-example/example5.html [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kaliatech/dygraphs-dynamiczooming-example/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
1
0.083333
1
0
c25e3541c6cfc06393af108902fa4c3f768d00b2
src/main.c
src/main.c
const char usage[] = "Usage: %s <filenname>\n"; int main(int argc, char *argv[]) { if (argc != 2) { printf(usage, argv[0]); return 1; } int fd = open(argv[1], O_RDONLY); char buf[SIGNATURE_LENGTH]; ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH); if (bytes == -1) { perror("error reading file"); return 1; } lseek(fd, 0, SEEK_SET); switch (buf[0] << 8 | buf[1]) { case BMP_SIGNATURE: return print_bmp(fd); default: puts("Error: unrecognized file format"); return 1; } }
const char usage[] = "Usage: %s <filenname>\n"; int main(int argc, char *argv[]) { if (argc != 2) { printf(usage, argv[0]); return 1; } int fd = open(argv[1], O_RDONLY); if (fd == -1) { perror("error opening file"); return 1; } char buf[SIGNATURE_LENGTH]; ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH); if (bytes == -1) { perror("error reading file"); return 1; } lseek(fd, 0, SEEK_SET); switch (buf[0] << 8 | buf[1]) { case BMP_SIGNATURE: return print_bmp(fd); default: puts("Error: unrecognized file format"); return 1; } }
Check for error when calling open()
Check for error when calling open()
C
mit
orodley/imgprint
c
## Code Before: const char usage[] = "Usage: %s <filenname>\n"; int main(int argc, char *argv[]) { if (argc != 2) { printf(usage, argv[0]); return 1; } int fd = open(argv[1], O_RDONLY); char buf[SIGNATURE_LENGTH]; ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH); if (bytes == -1) { perror("error reading file"); return 1; } lseek(fd, 0, SEEK_SET); switch (buf[0] << 8 | buf[1]) { case BMP_SIGNATURE: return print_bmp(fd); default: puts("Error: unrecognized file format"); return 1; } } ## Instruction: Check for error when calling open() ## Code After: const char usage[] = "Usage: %s <filenname>\n"; int main(int argc, char *argv[]) { if (argc != 2) { printf(usage, argv[0]); return 1; } int fd = open(argv[1], O_RDONLY); if (fd == -1) { perror("error opening file"); return 1; } char buf[SIGNATURE_LENGTH]; ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH); if (bytes == -1) { perror("error reading file"); return 1; } lseek(fd, 0, SEEK_SET); switch (buf[0] << 8 | buf[1]) { case BMP_SIGNATURE: return print_bmp(fd); default: puts("Error: unrecognized file format"); return 1; } }
const char usage[] = "Usage: %s <filenname>\n"; int main(int argc, char *argv[]) { if (argc != 2) { printf(usage, argv[0]); return 1; } int fd = open(argv[1], O_RDONLY); + if (fd == -1) { + perror("error opening file"); + return 1; + } + char buf[SIGNATURE_LENGTH]; ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH); if (bytes == -1) { perror("error reading file"); return 1; } lseek(fd, 0, SEEK_SET); switch (buf[0] << 8 | buf[1]) { case BMP_SIGNATURE: return print_bmp(fd); default: puts("Error: unrecognized file format"); return 1; } }
5
0.178571
5
0
a6f2abe06879273c426ff7c1cf1f4a4e3365e6ed
app/js/app/services.js
app/js/app/services.js
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "ucam-cl-dtg", name: "isaac-content-2" }) .constant('ApiServer', "https://staging-2.isaacphysics.org/api/any/api") .service('LoginChecker', require("app/services/LoginChecker")) .factory('FileLoader', require("app/services/FileLoader")) .factory('FigureUploader', require("app/services/FigureUploader")) .service('SnippetLoader', require("app/services/SnippetLoader")) .factory('TagLoader', require("app/services/TagLoader")) .factory('IdLoader', require("app/services/IdLoader")) });
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "isaacphysics", name: "isaac-content-2" }) .constant('ApiServer', "https://staging-2.isaacphysics.org/api/any/api") .service('LoginChecker', require("app/services/LoginChecker")) .factory('FileLoader', require("app/services/FileLoader")) .factory('FigureUploader', require("app/services/FigureUploader")) .service('SnippetLoader', require("app/services/SnippetLoader")) .factory('TagLoader', require("app/services/TagLoader")) .factory('IdLoader', require("app/services/IdLoader")) });
Migrate content repo to @isaacphysics
Migrate content repo to @isaacphysics
JavaScript
mit
ucam-cl-dtg/scooter,ucam-cl-dtg/scooter
javascript
## Code Before: 'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "ucam-cl-dtg", name: "isaac-content-2" }) .constant('ApiServer', "https://staging-2.isaacphysics.org/api/any/api") .service('LoginChecker', require("app/services/LoginChecker")) .factory('FileLoader', require("app/services/FileLoader")) .factory('FigureUploader', require("app/services/FigureUploader")) .service('SnippetLoader', require("app/services/SnippetLoader")) .factory('TagLoader', require("app/services/TagLoader")) .factory('IdLoader', require("app/services/IdLoader")) }); ## Instruction: Migrate content repo to @isaacphysics ## Code After: 'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "isaacphysics", name: "isaac-content-2" }) .constant('ApiServer', "https://staging-2.isaacphysics.org/api/any/api") .service('LoginChecker', require("app/services/LoginChecker")) .factory('FileLoader', require("app/services/FileLoader")) .factory('FigureUploader', require("app/services/FigureUploader")) .service('SnippetLoader', require("app/services/SnippetLoader")) .factory('TagLoader', require("app/services/TagLoader")) .factory('IdLoader', require("app/services/IdLoader")) });
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { - owner: "ucam-cl-dtg", + owner: "isaacphysics", name: "isaac-content-2" }) .constant('ApiServer', "https://staging-2.isaacphysics.org/api/any/api") .service('LoginChecker', require("app/services/LoginChecker")) .factory('FileLoader', require("app/services/FileLoader")) .factory('FigureUploader', require("app/services/FigureUploader")) .service('SnippetLoader', require("app/services/SnippetLoader")) .factory('TagLoader', require("app/services/TagLoader")) .factory('IdLoader', require("app/services/IdLoader")) });
2
0.068966
1
1
76b916c6f53d97b4658c16a85f10302e75794bcd
kitsune/upload/storage.py
kitsune/upload/storage.py
import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStorage): """Subclass Django's file system storage to add our file naming conventions.""" def get_available_name(self, name): dir_name, file_name = os.path.split(name) file_root, file_ext = os.path.splitext(file_name) # Set file_root to something we like: clean and all ascii md5_sub = hashlib.md5(file_root.encode('utf8')).hexdigest()[0:6] file_root = time.strftime('%Y-%m-%d-%H-%M-%S-', time.localtime()) + md5_sub name = os.path.join(dir_name, file_root + file_ext) # If the filename already exists, add an underscore and a number # (before the file extension, if one exists) to the filename until # the generated filename doesn't exist. count = itertools.count(1) while self.exists(name): # file_ext includes the dot. name = os.path.join(dir_name, "%s_%s%s" % (file_root, count.next(), file_ext)) return name
import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStorage): """Subclass Django's file system storage to add our file naming conventions.""" def get_available_name(self, name, max_length=None): dir_name, file_name = os.path.split(name) file_root, file_ext = os.path.splitext(file_name) # Set file_root to something we like: clean and all ascii md5_sub = hashlib.md5(file_root.encode('utf8')).hexdigest()[0:6] file_root = time.strftime('%Y-%m-%d-%H-%M-%S-', time.localtime()) + md5_sub name = os.path.join(dir_name, file_root + file_ext) # If the filename already exists, add an underscore and a number # (before the file extension, if one exists) to the filename until # the generated filename doesn't exist. count = itertools.count(1) while self.exists(name): # file_ext includes the dot. name = os.path.join(dir_name, "%s_%s%s" % (file_root, count.next(), file_ext)) return name
Update RenameFileStorage method to be 1.11 compatible
Update RenameFileStorage method to be 1.11 compatible
Python
bsd-3-clause
mozilla/kitsune,anushbmx/kitsune,mozilla/kitsune,anushbmx/kitsune,anushbmx/kitsune,mozilla/kitsune,mozilla/kitsune,anushbmx/kitsune
python
## Code Before: import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStorage): """Subclass Django's file system storage to add our file naming conventions.""" def get_available_name(self, name): dir_name, file_name = os.path.split(name) file_root, file_ext = os.path.splitext(file_name) # Set file_root to something we like: clean and all ascii md5_sub = hashlib.md5(file_root.encode('utf8')).hexdigest()[0:6] file_root = time.strftime('%Y-%m-%d-%H-%M-%S-', time.localtime()) + md5_sub name = os.path.join(dir_name, file_root + file_ext) # If the filename already exists, add an underscore and a number # (before the file extension, if one exists) to the filename until # the generated filename doesn't exist. count = itertools.count(1) while self.exists(name): # file_ext includes the dot. name = os.path.join(dir_name, "%s_%s%s" % (file_root, count.next(), file_ext)) return name ## Instruction: Update RenameFileStorage method to be 1.11 compatible ## Code After: import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStorage): """Subclass Django's file system storage to add our file naming conventions.""" def get_available_name(self, name, max_length=None): dir_name, file_name = os.path.split(name) file_root, file_ext = os.path.splitext(file_name) # Set file_root to something we like: clean and all ascii md5_sub = hashlib.md5(file_root.encode('utf8')).hexdigest()[0:6] file_root = time.strftime('%Y-%m-%d-%H-%M-%S-', time.localtime()) + md5_sub name = os.path.join(dir_name, file_root + file_ext) # If the filename already exists, add an underscore and a number # (before the file extension, if one exists) to the filename until # the generated filename doesn't exist. count = itertools.count(1) while self.exists(name): # file_ext includes the dot. name = os.path.join(dir_name, "%s_%s%s" % (file_root, count.next(), file_ext)) return name
import hashlib import itertools import os import time from django.conf import settings from django.core.files.storage import FileSystemStorage from storages.backends.s3boto3 import S3Boto3Storage DjangoStorage = S3Boto3Storage if settings.AWS_ACCESS_KEY_ID else FileSystemStorage class RenameFileStorage(DjangoStorage): """Subclass Django's file system storage to add our file naming conventions.""" - def get_available_name(self, name): + def get_available_name(self, name, max_length=None): ? +++++++++++++++++ dir_name, file_name = os.path.split(name) file_root, file_ext = os.path.splitext(file_name) # Set file_root to something we like: clean and all ascii md5_sub = hashlib.md5(file_root.encode('utf8')).hexdigest()[0:6] file_root = time.strftime('%Y-%m-%d-%H-%M-%S-', time.localtime()) + md5_sub name = os.path.join(dir_name, file_root + file_ext) # If the filename already exists, add an underscore and a number # (before the file extension, if one exists) to the filename until # the generated filename doesn't exist. count = itertools.count(1) while self.exists(name): # file_ext includes the dot. name = os.path.join(dir_name, "%s_%s%s" % (file_root, count.next(), file_ext)) return name
2
0.052632
1
1
522c739c71cdf07dc301c08fe42316ad75f0720b
src/gol/server.clj
src/gol/server.clj
(ns gol.server (:require [ring.middleware.file :refer [wrap-file]] [ring.middleware.file-info :refer [wrap-file-info]] [hiccup.page :refer [html5 include-js include-css]] [hiccup.middleware :refer [wrap-base-url]] [compojure.core :refer :all] [compojure.route :as route] [compojure.handler :as handler] [ring.util.response :as response])) (defn index-page [request] (html5 [:head (include-css "//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.0/normalize.min.css" "/css/build/styles.css")] [:body [:div#app] (include-js "//fb.me/react-0.9.0.min.js" "/js/build/goog/base.js" "/js/build/gol.js") [:script {:type "text/javascript"} "goog.require('gol.client');"]])) (defroutes main-routes (GET "/" [] index-page) (route/resources "/") (route/not-found "Page not found")) (def app (-> (handler/site main-routes) (wrap-base-url)))
(ns gol.server (:require [ring.middleware.file :refer [wrap-file]] [ring.middleware.file-info :refer [wrap-file-info]] [hiccup.page :refer [html5 include-js include-css]] [hiccup.middleware :refer [wrap-base-url]] [compojure.core :refer :all] [compojure.route :as route] [compojure.handler :as handler] [ring.util.response :as response])) (defn index-page [request] (html5 [:head (include-css "//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.0/normalize.min.css" "/css/build/styles.css")] [:body [:div#app] (include-js "//fb.me/react-with-addons-0.9.0.min.js" "/js/build/goog/base.js" "/js/build/gol.js") [:script {:type "text/javascript"} "goog.require('gol.client');"]])) (defroutes main-routes (GET "/" [] index-page) (route/resources "/") (route/not-found "Page not found")) (def app (-> (handler/site main-routes) (wrap-base-url)))
Switch to react with addons
Switch to react with addons
Clojure
mit
pavel-v-chernykh/gol
clojure
## Code Before: (ns gol.server (:require [ring.middleware.file :refer [wrap-file]] [ring.middleware.file-info :refer [wrap-file-info]] [hiccup.page :refer [html5 include-js include-css]] [hiccup.middleware :refer [wrap-base-url]] [compojure.core :refer :all] [compojure.route :as route] [compojure.handler :as handler] [ring.util.response :as response])) (defn index-page [request] (html5 [:head (include-css "//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.0/normalize.min.css" "/css/build/styles.css")] [:body [:div#app] (include-js "//fb.me/react-0.9.0.min.js" "/js/build/goog/base.js" "/js/build/gol.js") [:script {:type "text/javascript"} "goog.require('gol.client');"]])) (defroutes main-routes (GET "/" [] index-page) (route/resources "/") (route/not-found "Page not found")) (def app (-> (handler/site main-routes) (wrap-base-url))) ## Instruction: Switch to react with addons ## Code After: (ns gol.server (:require [ring.middleware.file :refer [wrap-file]] [ring.middleware.file-info :refer [wrap-file-info]] [hiccup.page :refer [html5 include-js include-css]] [hiccup.middleware :refer [wrap-base-url]] [compojure.core :refer :all] [compojure.route :as route] [compojure.handler :as handler] [ring.util.response :as response])) (defn index-page [request] (html5 [:head (include-css "//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.0/normalize.min.css" "/css/build/styles.css")] [:body [:div#app] (include-js "//fb.me/react-with-addons-0.9.0.min.js" "/js/build/goog/base.js" "/js/build/gol.js") [:script {:type "text/javascript"} "goog.require('gol.client');"]])) (defroutes main-routes (GET "/" [] index-page) (route/resources "/") (route/not-found "Page not found")) (def app (-> (handler/site main-routes) (wrap-base-url)))
(ns gol.server (:require [ring.middleware.file :refer [wrap-file]] [ring.middleware.file-info :refer [wrap-file-info]] [hiccup.page :refer [html5 include-js include-css]] [hiccup.middleware :refer [wrap-base-url]] [compojure.core :refer :all] [compojure.route :as route] [compojure.handler :as handler] [ring.util.response :as response])) (defn index-page [request] (html5 [:head (include-css "//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.0/normalize.min.css" "/css/build/styles.css")] [:body [:div#app] (include-js - "//fb.me/react-0.9.0.min.js" + "//fb.me/react-with-addons-0.9.0.min.js" ? ++++++++++++ "/js/build/goog/base.js" "/js/build/gol.js") [:script {:type "text/javascript"} "goog.require('gol.client');"]])) (defroutes main-routes (GET "/" [] index-page) (route/resources "/") (route/not-found "Page not found")) (def app (-> (handler/site main-routes) (wrap-base-url)))
2
0.057143
1
1
d2424ef95a8bdeca54f07a301572b3a338c22775
source/courses/comp102.rst
source/courses/comp102.rst
.. header:: COMP 102: Web Design and Multimedia Publishing .. footer:: COMP 102: Web Design and Multimedia Publishing .. index:: Web Design and Multimedia Publishing Web Design Multimedia Publishing Design Publishing COMP 102 ############################################## COMP 102: Web Design and Multimedia Publishing ############################################## .. contents:: Table of Contents ****************** Course Information ****************** .. sidebar:: General Information **Credit Hours** * 3 **Prerequisites** * None About ===== This course introduces foundations of the world wide web technology, HTML, and multimedia publishing techniques. Topics include HTML syntax, CSS, XML, RSS, and various multimedia formats. Description =========== An introduction to the basic components and tools used in developing pages for the World Wide Web. Topics will include HTML, HTML Standards and validation, Cascading Style Sheets (CSS), and scripting. Tools appropriate for each of these will be discussed. Other topics may include CGI programming and graphics editors. The course is taught in a laboratory environment with hands-on instruction. Outcome ======= An understanding of the technologies behind web sites and the ability to use them effectively. ******* Syllabi ******* See :doc:`../syllabi/syllabi`.
.. header:: COMP 102: Web Design and Multimedia Publishing .. footer:: COMP 102: Web Design and Multimedia Publishing .. index:: Web Design and Multimedia Publishing Web Design Multimedia Publishing Design Publishing COMP 102 ############################################## COMP 102: Web Design and Multimedia Publishing ############################################## ****************** Course Information ****************** .. sidebar:: General Information **Credit Hours** * 3 **Prerequisites** * None About ===== This course introduces foundations of the world wide web technology, HTML, and multimedia publishing techniques. Topics include HTML syntax, CSS, XML, RSS, and various multimedia formats. Description =========== An introduction to the basic components and tools used in developing pages for the World Wide Web. Topics will include HTML, HTML Standards and validation, Cascading Style Sheets (CSS), and scripting. Tools appropriate for each of these will be discussed. Other topics may include CGI programming and graphics editors. The course is taught in a laboratory environment with hands-on instruction. Outcome ======= An understanding of the technologies behind web sites and the ability to use them effectively. ******* Syllabi ******* See :doc:`../syllabi/syllabi`.
Remove table of contents from COMP 102
Remove table of contents from COMP 102
reStructuredText
apache-2.0
LoyolaChicagoCS/coursedescriptions,LoyolaChicagoCS/coursedescriptions,LoyolaChicagoCS/coursedescriptions
restructuredtext
## Code Before: .. header:: COMP 102: Web Design and Multimedia Publishing .. footer:: COMP 102: Web Design and Multimedia Publishing .. index:: Web Design and Multimedia Publishing Web Design Multimedia Publishing Design Publishing COMP 102 ############################################## COMP 102: Web Design and Multimedia Publishing ############################################## .. contents:: Table of Contents ****************** Course Information ****************** .. sidebar:: General Information **Credit Hours** * 3 **Prerequisites** * None About ===== This course introduces foundations of the world wide web technology, HTML, and multimedia publishing techniques. Topics include HTML syntax, CSS, XML, RSS, and various multimedia formats. Description =========== An introduction to the basic components and tools used in developing pages for the World Wide Web. Topics will include HTML, HTML Standards and validation, Cascading Style Sheets (CSS), and scripting. Tools appropriate for each of these will be discussed. Other topics may include CGI programming and graphics editors. The course is taught in a laboratory environment with hands-on instruction. Outcome ======= An understanding of the technologies behind web sites and the ability to use them effectively. ******* Syllabi ******* See :doc:`../syllabi/syllabi`. ## Instruction: Remove table of contents from COMP 102 ## Code After: .. header:: COMP 102: Web Design and Multimedia Publishing .. footer:: COMP 102: Web Design and Multimedia Publishing .. index:: Web Design and Multimedia Publishing Web Design Multimedia Publishing Design Publishing COMP 102 ############################################## COMP 102: Web Design and Multimedia Publishing ############################################## ****************** Course Information ****************** .. sidebar:: General Information **Credit Hours** * 3 **Prerequisites** * None About ===== This course introduces foundations of the world wide web technology, HTML, and multimedia publishing techniques. Topics include HTML syntax, CSS, XML, RSS, and various multimedia formats. Description =========== An introduction to the basic components and tools used in developing pages for the World Wide Web. Topics will include HTML, HTML Standards and validation, Cascading Style Sheets (CSS), and scripting. Tools appropriate for each of these will be discussed. Other topics may include CGI programming and graphics editors. The course is taught in a laboratory environment with hands-on instruction. Outcome ======= An understanding of the technologies behind web sites and the ability to use them effectively. ******* Syllabi ******* See :doc:`../syllabi/syllabi`.
.. header:: COMP 102: Web Design and Multimedia Publishing .. footer:: COMP 102: Web Design and Multimedia Publishing .. index:: Web Design and Multimedia Publishing Web Design Multimedia Publishing Design Publishing COMP 102 ############################################## COMP 102: Web Design and Multimedia Publishing ############################################## - - .. contents:: Table of Contents ****************** Course Information ****************** .. sidebar:: General Information **Credit Hours** * 3 **Prerequisites** * None About ===== This course introduces foundations of the world wide web technology, HTML, and multimedia publishing techniques. Topics include HTML syntax, CSS, XML, RSS, and various multimedia formats. Description =========== An introduction to the basic components and tools used in developing pages for the World Wide Web. Topics will include HTML, HTML Standards and validation, Cascading Style Sheets (CSS), and scripting. Tools appropriate for each of these will be discussed. Other topics may include CGI programming and graphics editors. The course is taught in a laboratory environment with hands-on instruction. Outcome ======= An understanding of the technologies behind web sites and the ability to use them effectively. ******* Syllabi ******* See :doc:`../syllabi/syllabi`.
2
0.039216
0
2
77265d672c11dcce892a60a3ccbd734cc2870d54
package.json
package.json
{ "name": "azure-functions-typescript", "version": "0.0.1", "description": "Helper library for using TypeScript with Azure Functions", "main": "src/index.js", "scripts": { "pre-build": "typings install", "build": "tsc", "pre-watch":"typings install", "watch": "typings install & tsc -w" }, "author": "christopheranderson", "license": "MIT", "devDependencies": { "typescript": "^1.8.10", "typings": "^1.3.2" } }
{ "name": "azure-functions-typescript", "version": "0.0.1", "description": "Helper library for using TypeScript with Azure Functions", "main": "src/index.js", "typings": "src/index.d.ts", "scripts": { "pre-build": "typings install", "build": "tsc", "pre-watch":"typings install", "watch": "typings install & tsc -w" }, "author": "christopheranderson", "license": "MIT", "devDependencies": { "typescript": "^1.8.10", "typings": "^1.3.2" } }
Add types reference for Typescript compiler
Add types reference for Typescript compiler Added types reference in package.json in order for the typescript compiler to automatically find the module.
JSON
mit
christopheranderson/azure-functions-typescript
json
## Code Before: { "name": "azure-functions-typescript", "version": "0.0.1", "description": "Helper library for using TypeScript with Azure Functions", "main": "src/index.js", "scripts": { "pre-build": "typings install", "build": "tsc", "pre-watch":"typings install", "watch": "typings install & tsc -w" }, "author": "christopheranderson", "license": "MIT", "devDependencies": { "typescript": "^1.8.10", "typings": "^1.3.2" } } ## Instruction: Add types reference for Typescript compiler Added types reference in package.json in order for the typescript compiler to automatically find the module. ## Code After: { "name": "azure-functions-typescript", "version": "0.0.1", "description": "Helper library for using TypeScript with Azure Functions", "main": "src/index.js", "typings": "src/index.d.ts", "scripts": { "pre-build": "typings install", "build": "tsc", "pre-watch":"typings install", "watch": "typings install & tsc -w" }, "author": "christopheranderson", "license": "MIT", "devDependencies": { "typescript": "^1.8.10", "typings": "^1.3.2" } }
{ "name": "azure-functions-typescript", "version": "0.0.1", "description": "Helper library for using TypeScript with Azure Functions", "main": "src/index.js", + "typings": "src/index.d.ts", "scripts": { "pre-build": "typings install", "build": "tsc", "pre-watch":"typings install", "watch": "typings install & tsc -w" }, "author": "christopheranderson", "license": "MIT", "devDependencies": { "typescript": "^1.8.10", "typings": "^1.3.2" } }
1
0.055556
1
0
fa70c8aef02b3659e0e148c04d8f990ac1b4163b
packages/git-url-parse/src/index.js
packages/git-url-parse/src/index.js
import { promisify } from 'util' import findUp from 'find-up' import _gitUrlParse from 'git-url-parse' import gitLocal from 'gitconfiglocal' const gitconfig = promisify(gitLocal) const providers = { github: { template: 'https://github.com/[full_name]/compare/[prev]...[next]', branch: 'HEAD' }, bitbucket: { template: 'https://bitbucket.org/[full_name]/branches/compare/[prev]%0D[next]#diff', branch: 'HEAD' }, gitlab: { template: 'https://gitlab.com/[full_name]/compare?from=[prev]&to=[next]', branch: 'master' } } export async function gitUrlParse ({ url }) { let result if (url) { result = _gitUrlParse(url) } else { const path = await findUp('.git') if (!path) { return null } const info = await gitconfig(path) result = _gitUrlParse(info.remote.origin.url) } if (result.source.length === 0) { return null } let { template, branch } = providers[Object.keys(providers).find(p => result.source.includes(p))] template = template.replace('[full_name]', result.full_name) result.template = template result.branch = branch return result }
import { promisify } from 'util' import findUp from 'find-up' import _gitUrlParse from 'git-url-parse' import gitLocal from 'gitconfiglocal' const gitconfig = promisify(gitLocal) const providers = { github: { template: 'https://github.com/[full_name]/compare/[prev]...[next]', branch: 'HEAD' }, bitbucket: { template: 'https://bitbucket.org/[full_name]/branches/compare/[prev]%0D[next]#diff', branch: 'HEAD' }, gitlab: { template: 'https://gitlab.com/[full_name]/compare?from=[prev]&to=[next]', branch: 'master' } } export async function gitUrlParse ({ url }) { let result if (url) { result = _gitUrlParse(url) } else { const path = findUp.sync('.git', { type: 'directory', cwd: process.cwd() }) if (!path) { return null } const info = await gitconfig(path) result = _gitUrlParse(info.remote.origin.url) } if (result.source.length === 0) { return null } let { template, branch } = providers[Object.keys(providers).find(p => result.source.includes(p))] template = template.replace('[full_name]', result.full_name) result.template = template result.branch = branch return result }
Fix issue with findUp not finding .git directory
Fix issue with findUp not finding .git directory
JavaScript
isc
geut/chan
javascript
## Code Before: import { promisify } from 'util' import findUp from 'find-up' import _gitUrlParse from 'git-url-parse' import gitLocal from 'gitconfiglocal' const gitconfig = promisify(gitLocal) const providers = { github: { template: 'https://github.com/[full_name]/compare/[prev]...[next]', branch: 'HEAD' }, bitbucket: { template: 'https://bitbucket.org/[full_name]/branches/compare/[prev]%0D[next]#diff', branch: 'HEAD' }, gitlab: { template: 'https://gitlab.com/[full_name]/compare?from=[prev]&to=[next]', branch: 'master' } } export async function gitUrlParse ({ url }) { let result if (url) { result = _gitUrlParse(url) } else { const path = await findUp('.git') if (!path) { return null } const info = await gitconfig(path) result = _gitUrlParse(info.remote.origin.url) } if (result.source.length === 0) { return null } let { template, branch } = providers[Object.keys(providers).find(p => result.source.includes(p))] template = template.replace('[full_name]', result.full_name) result.template = template result.branch = branch return result } ## Instruction: Fix issue with findUp not finding .git directory ## Code After: import { promisify } from 'util' import findUp from 'find-up' import _gitUrlParse from 'git-url-parse' import gitLocal from 'gitconfiglocal' const gitconfig = promisify(gitLocal) const providers = { github: { template: 'https://github.com/[full_name]/compare/[prev]...[next]', branch: 'HEAD' }, bitbucket: { template: 'https://bitbucket.org/[full_name]/branches/compare/[prev]%0D[next]#diff', branch: 'HEAD' }, gitlab: { template: 'https://gitlab.com/[full_name]/compare?from=[prev]&to=[next]', branch: 'master' } } export async function gitUrlParse ({ url }) { let result if (url) { result = _gitUrlParse(url) } else { const path = findUp.sync('.git', { type: 'directory', cwd: process.cwd() }) if (!path) { return null } const info = await gitconfig(path) result = _gitUrlParse(info.remote.origin.url) } if (result.source.length === 0) { return null } let { template, branch } = providers[Object.keys(providers).find(p => result.source.includes(p))] template = template.replace('[full_name]', result.full_name) result.template = template result.branch = branch return result }
import { promisify } from 'util' import findUp from 'find-up' import _gitUrlParse from 'git-url-parse' import gitLocal from 'gitconfiglocal' const gitconfig = promisify(gitLocal) const providers = { github: { template: 'https://github.com/[full_name]/compare/[prev]...[next]', branch: 'HEAD' }, bitbucket: { template: 'https://bitbucket.org/[full_name]/branches/compare/[prev]%0D[next]#diff', branch: 'HEAD' }, gitlab: { template: 'https://gitlab.com/[full_name]/compare?from=[prev]&to=[next]', branch: 'master' } } export async function gitUrlParse ({ url }) { let result if (url) { result = _gitUrlParse(url) } else { - const path = await findUp('.git') + const path = findUp.sync('.git', { type: 'directory', cwd: process.cwd() }) if (!path) { return null } const info = await gitconfig(path) result = _gitUrlParse(info.remote.origin.url) } if (result.source.length === 0) { return null } let { template, branch } = providers[Object.keys(providers).find(p => result.source.includes(p))] template = template.replace('[full_name]', result.full_name) result.template = template result.branch = branch return result }
2
0.039216
1
1
fac2314228e66260e13d9eddc65a170dece6504c
README.md
README.md
This is a simple test that you can use Carthage to manage dependencies that have nothing to do with Xcode. To download the dependencies: bin/setup
This is a simple test that you can use Carthage to manage dependencies that have nothing to do with Xcode. Here's the blog post where I discuss it: http://sharplet.me/post/138263056110/using-carthage-to-manage-arbitrary-non-xcode. To download the dependencies: bin/setup
Add a link to the blog post
Add a link to the blog post
Markdown
mit
sharplet/carthage-without-xcode
markdown
## Code Before: This is a simple test that you can use Carthage to manage dependencies that have nothing to do with Xcode. To download the dependencies: bin/setup ## Instruction: Add a link to the blog post ## Code After: This is a simple test that you can use Carthage to manage dependencies that have nothing to do with Xcode. Here's the blog post where I discuss it: http://sharplet.me/post/138263056110/using-carthage-to-manage-arbitrary-non-xcode. To download the dependencies: bin/setup
This is a simple test that you can use Carthage to manage dependencies that have nothing to do with Xcode. + Here's the blog post where I discuss it: + http://sharplet.me/post/138263056110/using-carthage-to-manage-arbitrary-non-xcode. + To download the dependencies: bin/setup
3
0.75
3
0
30f286eae4fc4d92b58ecb55bb5a376c38bbfe8d
blended.jetty.boot/src/main/scala/blended/jetty/boot/internal/JettyActivator.scala
blended.jetty.boot/src/main/scala/blended/jetty/boot/internal/JettyActivator.scala
package blended.jetty.boot.internal import javax.net.ssl.SSLContext import domino.DominoActivator import org.eclipse.jetty.osgi.boot.JettyBootstrapActivator object JettyActivator { var sslContext : Option[SSLContext] = None } class JettyActivator extends DominoActivator { private[this] val log = org.log4s.getLogger whenBundleActive { whenAdvancedServicePresent[SSLContext]("(type=server)") { sslCtxt => JettyActivator.sslContext = Some(sslCtxt) val jettyActivator = new JettyBootstrapActivator() jettyActivator.start(bundleContext) onStop { jettyActivator.stop(bundleContext) JettyActivator.sslContext = None } } } }
package blended.jetty.boot.internal import javax.net.ssl.SSLContext import domino.DominoActivator import org.eclipse.jetty.osgi.boot.JettyBootstrapActivator object JettyActivator { var sslContext: Option[SSLContext] = None } class JettyActivator extends DominoActivator { private[this] val log = org.log4s.getLogger whenBundleActive { whenAdvancedServicePresent[SSLContext]("(type=server)") { sslCtxt => JettyActivator.sslContext = Some(sslCtxt) onStop { JettyActivator.sslContext = None } val jettyActivator = new JettyBootstrapActivator() jettyActivator.start(bundleContext) onStop { jettyActivator.stop(bundleContext) } } } }
Move onStop closer to onStart code
Move onStop closer to onStart code
Scala
apache-2.0
woq-blended/blended,lefou/blended,woq-blended/blended,lefou/blended
scala
## Code Before: package blended.jetty.boot.internal import javax.net.ssl.SSLContext import domino.DominoActivator import org.eclipse.jetty.osgi.boot.JettyBootstrapActivator object JettyActivator { var sslContext : Option[SSLContext] = None } class JettyActivator extends DominoActivator { private[this] val log = org.log4s.getLogger whenBundleActive { whenAdvancedServicePresent[SSLContext]("(type=server)") { sslCtxt => JettyActivator.sslContext = Some(sslCtxt) val jettyActivator = new JettyBootstrapActivator() jettyActivator.start(bundleContext) onStop { jettyActivator.stop(bundleContext) JettyActivator.sslContext = None } } } } ## Instruction: Move onStop closer to onStart code ## Code After: package blended.jetty.boot.internal import javax.net.ssl.SSLContext import domino.DominoActivator import org.eclipse.jetty.osgi.boot.JettyBootstrapActivator object JettyActivator { var sslContext: Option[SSLContext] = None } class JettyActivator extends DominoActivator { private[this] val log = org.log4s.getLogger whenBundleActive { whenAdvancedServicePresent[SSLContext]("(type=server)") { sslCtxt => JettyActivator.sslContext = Some(sslCtxt) onStop { JettyActivator.sslContext = None } val jettyActivator = new JettyBootstrapActivator() jettyActivator.start(bundleContext) onStop { jettyActivator.stop(bundleContext) } } } }
package blended.jetty.boot.internal import javax.net.ssl.SSLContext import domino.DominoActivator import org.eclipse.jetty.osgi.boot.JettyBootstrapActivator object JettyActivator { - var sslContext : Option[SSLContext] = None ? - + var sslContext: Option[SSLContext] = None } class JettyActivator extends DominoActivator { private[this] val log = org.log4s.getLogger whenBundleActive { whenAdvancedServicePresent[SSLContext]("(type=server)") { sslCtxt => JettyActivator.sslContext = Some(sslCtxt) + onStop { + JettyActivator.sslContext = None + } val jettyActivator = new JettyBootstrapActivator() jettyActivator.start(bundleContext) onStop { jettyActivator.stop(bundleContext) - JettyActivator.sslContext = None } } } }
6
0.181818
4
2
83701a14a612345a272794f511b945fafbfafa48
metadata.json
metadata.json
{ "id": "plex", "name": "Plex", "maintainer_name": "Jason Day", "maintainer_link": "https://github.com/jlogday", "version_major": 1, "version_minor": 0, "api_major": 3, "api_minor": 0, "categories": "AudioVideo;Audio;", //"home_url": "http://alfred:32400/web/index.html", "home_url": "http://alfred:32400/web/index.html#!/server/80c8cea5da4e93612c64bd35618fd6f36b1ef658/section/4", "hidden": true }
{ "id": "plex", "name": "Plex Media Server", "maintainer_name": "Jason Day", "maintainer_link": "https://github.com/jlogday", "version_major": 1, "version_minor": 0, "api_major": 3, "api_minor": 0, "categories": "AudioVideo;Audio;", "hidden": true }
Update name and remove home_url
Update name and remove home_url - Change name to "Plex Media Server" - Remove home_url, it is specified in preferences
JSON
bsd-2-clause
jlogday/nuvola-app-plex
json
## Code Before: { "id": "plex", "name": "Plex", "maintainer_name": "Jason Day", "maintainer_link": "https://github.com/jlogday", "version_major": 1, "version_minor": 0, "api_major": 3, "api_minor": 0, "categories": "AudioVideo;Audio;", //"home_url": "http://alfred:32400/web/index.html", "home_url": "http://alfred:32400/web/index.html#!/server/80c8cea5da4e93612c64bd35618fd6f36b1ef658/section/4", "hidden": true } ## Instruction: Update name and remove home_url - Change name to "Plex Media Server" - Remove home_url, it is specified in preferences ## Code After: { "id": "plex", "name": "Plex Media Server", "maintainer_name": "Jason Day", "maintainer_link": "https://github.com/jlogday", "version_major": 1, "version_minor": 0, "api_major": 3, "api_minor": 0, "categories": "AudioVideo;Audio;", "hidden": true }
{ "id": "plex", - "name": "Plex", + "name": "Plex Media Server", "maintainer_name": "Jason Day", "maintainer_link": "https://github.com/jlogday", "version_major": 1, "version_minor": 0, "api_major": 3, "api_minor": 0, "categories": "AudioVideo;Audio;", - //"home_url": "http://alfred:32400/web/index.html", - "home_url": "http://alfred:32400/web/index.html#!/server/80c8cea5da4e93612c64bd35618fd6f36b1ef658/section/4", "hidden": true }
4
0.285714
1
3
84af0e1506356f491ad5156d34778315700044bf
lib/service_desk/configuration.rb
lib/service_desk/configuration.rb
class ServiceDesk::Configuration OPTIONS = [:client_id, :client_secret, :redirect_uri, :api_host, :authenticate_path, :token_storage, :refresh_token] OPTIONS.each do |option| define_method(option) do |value=nil| if value instance_variable_set("@#{option}", value) else instance_variable_get("@#{option}") end end end end
class ServiceDesk::Configuration OPTIONS = [:client_id, :client_secret, :redirect_uri, :api_host, :authenticate_path, :token_storage, :refresh_token] def initialize api_host "https://deskapi.gotoassist.com" authenticate_path "/v2/authenticate/oauth2" end OPTIONS.each do |option| define_method(option) do |value=nil| if value instance_variable_set("@#{option}", value) else instance_variable_get("@#{option}") end end end end
Add some defaults to Configuration
Add some defaults to Configuration
Ruby
mit
mogest/g2asd
ruby
## Code Before: class ServiceDesk::Configuration OPTIONS = [:client_id, :client_secret, :redirect_uri, :api_host, :authenticate_path, :token_storage, :refresh_token] OPTIONS.each do |option| define_method(option) do |value=nil| if value instance_variable_set("@#{option}", value) else instance_variable_get("@#{option}") end end end end ## Instruction: Add some defaults to Configuration ## Code After: class ServiceDesk::Configuration OPTIONS = [:client_id, :client_secret, :redirect_uri, :api_host, :authenticate_path, :token_storage, :refresh_token] def initialize api_host "https://deskapi.gotoassist.com" authenticate_path "/v2/authenticate/oauth2" end OPTIONS.each do |option| define_method(option) do |value=nil| if value instance_variable_set("@#{option}", value) else instance_variable_get("@#{option}") end end end end
class ServiceDesk::Configuration OPTIONS = [:client_id, :client_secret, :redirect_uri, :api_host, :authenticate_path, :token_storage, :refresh_token] + + def initialize + api_host "https://deskapi.gotoassist.com" + authenticate_path "/v2/authenticate/oauth2" + end OPTIONS.each do |option| define_method(option) do |value=nil| if value instance_variable_set("@#{option}", value) else instance_variable_get("@#{option}") end end end end
5
0.384615
5
0
bdbc502c2b83c2a098ababa8f98b344372b48411
frontend/js/feature-detector/fallbacks/body-class-click-cookie.js
frontend/js/feature-detector/fallbacks/body-class-click-cookie.js
const bodyClassNameFallback = support => { const COOKIE_NAME = 'browser-fallback-raised' const CLASS_NAME = '-browser-not-supported' const DISMISS_ID = 'dismiss-browser-not-supported' if (!support) { const alreadyDetected = document.cookie.indexOf(COOKIE_NAME) !== -1 if (!alreadyDetected) { document.body.className += ' ' + CLASS_NAME const $element = document.getElementById(DISMISS_ID) if ($element !== null) { $element.onclick = function() { document.cookie = COOKIE_NAME + '=true' const reg = new RegExp('(\\s|^)' + CLASS_NAME + '(\\s|$)') document.body.className = document.body.className.replace(reg, ' ') } } } } } export default bodyClassNameFallback
/** * In case of an unsupported browser this will add a body className and register a click handler. * Upon clicking the button a cookie will be set to stop showing the information on subsequent loads. * * @param {boolean} support indicates whether the feature is supported */ const bodyClassNameFallback = support => { const COOKIE_NAME = 'browser-fallback-raised' const CLASS_NAME = '-browser-not-supported' const DISMISS_ID = 'dismiss-browser-not-supported' if (!support) { const alreadyDetected = document.cookie.indexOf(COOKIE_NAME) !== -1 if (!alreadyDetected) { document.body.className += ' ' + CLASS_NAME const $element = document.getElementById(DISMISS_ID) if ($element !== null) { $element.onclick = function() { document.cookie = COOKIE_NAME + '=true' const reg = new RegExp('(\\s|^)' + CLASS_NAME + '(\\s|$)') document.body.className = document.body.className.replace(reg, ' ') } } } } } export default bodyClassNameFallback
Add quick documentation to fallback strategy
Add quick documentation to fallback strategy
JavaScript
mit
Goldinteractive/Sackmesser,Goldinteractive/Sackmesser,Goldinteractive/Sackmesser,Goldinteractive/Sackmesser
javascript
## Code Before: const bodyClassNameFallback = support => { const COOKIE_NAME = 'browser-fallback-raised' const CLASS_NAME = '-browser-not-supported' const DISMISS_ID = 'dismiss-browser-not-supported' if (!support) { const alreadyDetected = document.cookie.indexOf(COOKIE_NAME) !== -1 if (!alreadyDetected) { document.body.className += ' ' + CLASS_NAME const $element = document.getElementById(DISMISS_ID) if ($element !== null) { $element.onclick = function() { document.cookie = COOKIE_NAME + '=true' const reg = new RegExp('(\\s|^)' + CLASS_NAME + '(\\s|$)') document.body.className = document.body.className.replace(reg, ' ') } } } } } export default bodyClassNameFallback ## Instruction: Add quick documentation to fallback strategy ## Code After: /** * In case of an unsupported browser this will add a body className and register a click handler. * Upon clicking the button a cookie will be set to stop showing the information on subsequent loads. * * @param {boolean} support indicates whether the feature is supported */ const bodyClassNameFallback = support => { const COOKIE_NAME = 'browser-fallback-raised' const CLASS_NAME = '-browser-not-supported' const DISMISS_ID = 'dismiss-browser-not-supported' if (!support) { const alreadyDetected = document.cookie.indexOf(COOKIE_NAME) !== -1 if (!alreadyDetected) { document.body.className += ' ' + CLASS_NAME const $element = document.getElementById(DISMISS_ID) if ($element !== null) { $element.onclick = function() { document.cookie = COOKIE_NAME + '=true' const reg = new RegExp('(\\s|^)' + CLASS_NAME + '(\\s|$)') document.body.className = document.body.className.replace(reg, ' ') } } } } } export default bodyClassNameFallback
+ /** + * In case of an unsupported browser this will add a body className and register a click handler. + * Upon clicking the button a cookie will be set to stop showing the information on subsequent loads. + * + * @param {boolean} support indicates whether the feature is supported + */ const bodyClassNameFallback = support => { const COOKIE_NAME = 'browser-fallback-raised' const CLASS_NAME = '-browser-not-supported' const DISMISS_ID = 'dismiss-browser-not-supported' if (!support) { const alreadyDetected = document.cookie.indexOf(COOKIE_NAME) !== -1 if (!alreadyDetected) { document.body.className += ' ' + CLASS_NAME const $element = document.getElementById(DISMISS_ID) if ($element !== null) { $element.onclick = function() { document.cookie = COOKIE_NAME + '=true' const reg = new RegExp('(\\s|^)' + CLASS_NAME + '(\\s|$)') document.body.className = document.body.className.replace(reg, ' ') } } } } } export default bodyClassNameFallback
6
0.285714
6
0
793d9e1e1df35f56fdaf9ccb5ecd47dab6f73daa
.travis.yml
.travis.yml
language: ruby sudo: false cache: bundler rvm: - 2.1.10 - 2.2.6 - 2.3.3 before_install: - gem update bundler env: matrix: - SPROCKETS_VERSION="~> 3.3.0" - SPROCKETS_VERSION="~> 3.7.0" - SPROCKETS_VERSION="~> 4.0.0.beta2" - EMBER_SOURCE_VERSION="~> 1.13" - EMBER_SOURCE_VERSION="~> 2.6" - EMBER_SOURCE_VERSION="~> 2.10"
language: ruby sudo: false cache: bundler rvm: - 2.1.10 - 2.2.6 - 2.3.3 - 2.4.0 before_install: - gem update bundler env: matrix: - SPROCKETS_VERSION="~> 3.3.0" - SPROCKETS_VERSION="~> 3.7.0" - SPROCKETS_VERSION="~> 4.0.0.beta2" - EMBER_SOURCE_VERSION="~> 1.13" - EMBER_SOURCE_VERSION="~> 2.6" - EMBER_SOURCE_VERSION="~> 2.10"
Test against Ruby 2.4.0 on Travis CI
Test against Ruby 2.4.0 on Travis CI
YAML
mit
tricknotes/ember-handlebars-template,tricknotes/ember-handlebars-template
yaml
## Code Before: language: ruby sudo: false cache: bundler rvm: - 2.1.10 - 2.2.6 - 2.3.3 before_install: - gem update bundler env: matrix: - SPROCKETS_VERSION="~> 3.3.0" - SPROCKETS_VERSION="~> 3.7.0" - SPROCKETS_VERSION="~> 4.0.0.beta2" - EMBER_SOURCE_VERSION="~> 1.13" - EMBER_SOURCE_VERSION="~> 2.6" - EMBER_SOURCE_VERSION="~> 2.10" ## Instruction: Test against Ruby 2.4.0 on Travis CI ## Code After: language: ruby sudo: false cache: bundler rvm: - 2.1.10 - 2.2.6 - 2.3.3 - 2.4.0 before_install: - gem update bundler env: matrix: - SPROCKETS_VERSION="~> 3.3.0" - SPROCKETS_VERSION="~> 3.7.0" - SPROCKETS_VERSION="~> 4.0.0.beta2" - EMBER_SOURCE_VERSION="~> 1.13" - EMBER_SOURCE_VERSION="~> 2.6" - EMBER_SOURCE_VERSION="~> 2.10"
language: ruby sudo: false cache: bundler rvm: - 2.1.10 - 2.2.6 - 2.3.3 + - 2.4.0 before_install: - gem update bundler env: matrix: - SPROCKETS_VERSION="~> 3.3.0" - SPROCKETS_VERSION="~> 3.7.0" - SPROCKETS_VERSION="~> 4.0.0.beta2" - EMBER_SOURCE_VERSION="~> 1.13" - EMBER_SOURCE_VERSION="~> 2.6" - EMBER_SOURCE_VERSION="~> 2.10"
1
0.058824
1
0
3c64b036f0c5d99758a4500d37748e3753babace
docs/app/src/api/api.ng.jade
docs/app/src/api/api.ng.jade
.api.col-sm-3.col-md-3.sidebar(ng-controller="ApiCtrl") input.eventric-api--search(ng-model="searchText", placeholder="Search API") ul.nav.nav-sidebar(ng-repeat="(moduleName, apis) in API_OVERVIEW", ng-show="(apis| filter:searchText).length") li.module a {{moduleName}} li(ng-repeat="api in apis | filter:searchText", ui-sref-active="active") a(ui-sref="api({ 'functionName' : api.name, 'moduleName' : api.module })") {{api.name}} .col-sm-9.col-sm-offset-3.col-md-9.col-md-offset-3.main .eventric-api--detail(ng-show="api.name") h1 {{api.name}} .eventric-api--missing(ng-hide="api.description") Missing Description .eventric-api--description(ng-show="api.description") blockquote p(ng-bind-html="api.description | unsafe") .eventric-api--missing(ng-hide="api.description") Missing Example Code .eventric-api--example-code(ng-show="api.example") strong Example pre(ng-bind-html="api.example | unsafe")
.api.col-sm-3.col-md-3.sidebar(ng-controller="ApiCtrl") input.eventric-api--search(ng-model="searchText", placeholder="Search API") ul.nav.nav-sidebar(ng-repeat="(moduleName, apis) in API_OVERVIEW", ng-show="(apis| filter:searchText).length") li.module a {{moduleName}} li(ng-repeat="api in apis | filter:searchText", ui-sref-active="active") a(ui-sref="api({ 'functionName' : api.name, 'moduleName' : api.module })") {{api.name}} .col-sm-9.col-sm-offset-3.col-md-9.col-md-offset-3.main .eventric-api--detail(ng-show="api.name") h1 {{api.name}} .eventric-api--missing(ng-hide="api.description") Missing Description .eventric-api--description(ng-show="api.description") blockquote p(ng-bind-html="api.description | unsafe") .eventric-api--missing(ng-hide="api.description") Missing Example Code .eventric-api--example-code(ng-show="api.example") strong Example pre(ng-bind-html="api.example | unsafe") comment-section( disqus-shortname="EventricJS" disqus-identifier="{{api.source}}" disqus-title="{{api.name}}" )
Use the Comment-Section Directive in API-Pages
Use the Comment-Section Directive in API-Pages
Jade
mit
efacilitation/eventric
jade
## Code Before: .api.col-sm-3.col-md-3.sidebar(ng-controller="ApiCtrl") input.eventric-api--search(ng-model="searchText", placeholder="Search API") ul.nav.nav-sidebar(ng-repeat="(moduleName, apis) in API_OVERVIEW", ng-show="(apis| filter:searchText).length") li.module a {{moduleName}} li(ng-repeat="api in apis | filter:searchText", ui-sref-active="active") a(ui-sref="api({ 'functionName' : api.name, 'moduleName' : api.module })") {{api.name}} .col-sm-9.col-sm-offset-3.col-md-9.col-md-offset-3.main .eventric-api--detail(ng-show="api.name") h1 {{api.name}} .eventric-api--missing(ng-hide="api.description") Missing Description .eventric-api--description(ng-show="api.description") blockquote p(ng-bind-html="api.description | unsafe") .eventric-api--missing(ng-hide="api.description") Missing Example Code .eventric-api--example-code(ng-show="api.example") strong Example pre(ng-bind-html="api.example | unsafe") ## Instruction: Use the Comment-Section Directive in API-Pages ## Code After: .api.col-sm-3.col-md-3.sidebar(ng-controller="ApiCtrl") input.eventric-api--search(ng-model="searchText", placeholder="Search API") ul.nav.nav-sidebar(ng-repeat="(moduleName, apis) in API_OVERVIEW", ng-show="(apis| filter:searchText).length") li.module a {{moduleName}} li(ng-repeat="api in apis | filter:searchText", ui-sref-active="active") a(ui-sref="api({ 'functionName' : api.name, 'moduleName' : api.module })") {{api.name}} .col-sm-9.col-sm-offset-3.col-md-9.col-md-offset-3.main .eventric-api--detail(ng-show="api.name") h1 {{api.name}} .eventric-api--missing(ng-hide="api.description") Missing Description .eventric-api--description(ng-show="api.description") blockquote p(ng-bind-html="api.description | unsafe") .eventric-api--missing(ng-hide="api.description") Missing Example Code .eventric-api--example-code(ng-show="api.example") strong Example pre(ng-bind-html="api.example | unsafe") comment-section( disqus-shortname="EventricJS" disqus-identifier="{{api.source}}" disqus-title="{{api.name}}" )
.api.col-sm-3.col-md-3.sidebar(ng-controller="ApiCtrl") input.eventric-api--search(ng-model="searchText", placeholder="Search API") ul.nav.nav-sidebar(ng-repeat="(moduleName, apis) in API_OVERVIEW", ng-show="(apis| filter:searchText).length") li.module a {{moduleName}} li(ng-repeat="api in apis | filter:searchText", ui-sref-active="active") a(ui-sref="api({ 'functionName' : api.name, 'moduleName' : api.module })") {{api.name}} .col-sm-9.col-sm-offset-3.col-md-9.col-md-offset-3.main .eventric-api--detail(ng-show="api.name") h1 {{api.name}} .eventric-api--missing(ng-hide="api.description") Missing Description .eventric-api--description(ng-show="api.description") blockquote p(ng-bind-html="api.description | unsafe") .eventric-api--missing(ng-hide="api.description") Missing Example Code .eventric-api--example-code(ng-show="api.example") strong Example pre(ng-bind-html="api.example | unsafe") + + comment-section( + disqus-shortname="EventricJS" + disqus-identifier="{{api.source}}" + disqus-title="{{api.name}}" + )
6
0.3
6
0
2e8d20a7d56641475de57afc69bdc6fb278214b4
sunspot-rails-tester.gemspec
sunspot-rails-tester.gemspec
$:.push File.expand_path('../lib', __FILE__) require 'sunspot/rails/tester' Gem::Specification.new do |s| s.name = 'sunspot-rails-tester' s.version = Sunspot::Rails::Tester::VERSION s.platform = Gem::Platform::RUBY s.author = 'Justin Ko' s.email = 'jko170@gmail.com' s.homepage = 'https://github.com/justinko/sunspot-rails-tester' s.summary = 'Stub sunspot when you want, and enable it when you want' s.description = 'Enable sunspot during testing for *real* integration tests' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_path = 'lib' s.add_dependency 'sunspot_rails', '>= 1.2' s.add_dependency 'sunspot_solr', '>= 1.2' s.add_development_dependency 'rspec', '~> 2.5' end
$:.push File.expand_path('../lib', __FILE__) require 'sunspot/rails/tester' Gem::Specification.new do |s| s.name = 'sunspot-rails-tester' s.version = Sunspot::Rails::Tester::VERSION s.platform = Gem::Platform::RUBY s.author = 'Justin Ko' s.email = 'jko170@gmail.com' s.homepage = 'https://github.com/justinko/sunspot-rails-tester' s.summary = 'Stub sunspot when you want, and enable it when you want' s.description = 'Enable sunspot during testing for *real* integration tests' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_path = 'lib' s.add_dependency 'sunspot_rails', '>= 1.2' s.add_dependency 'sunspot_solr', '>= 1.2' s.add_development_dependency 'rspec', '~> 2.5' s.add_development_dependency 'rake' end
Add rake as a development dependency so we get the gem task to release to rubygems.org
Add rake as a development dependency so we get the gem task to release to rubygems.org
Ruby
mit
justinko/sunspot-rails-tester
ruby
## Code Before: $:.push File.expand_path('../lib', __FILE__) require 'sunspot/rails/tester' Gem::Specification.new do |s| s.name = 'sunspot-rails-tester' s.version = Sunspot::Rails::Tester::VERSION s.platform = Gem::Platform::RUBY s.author = 'Justin Ko' s.email = 'jko170@gmail.com' s.homepage = 'https://github.com/justinko/sunspot-rails-tester' s.summary = 'Stub sunspot when you want, and enable it when you want' s.description = 'Enable sunspot during testing for *real* integration tests' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_path = 'lib' s.add_dependency 'sunspot_rails', '>= 1.2' s.add_dependency 'sunspot_solr', '>= 1.2' s.add_development_dependency 'rspec', '~> 2.5' end ## Instruction: Add rake as a development dependency so we get the gem task to release to rubygems.org ## Code After: $:.push File.expand_path('../lib', __FILE__) require 'sunspot/rails/tester' Gem::Specification.new do |s| s.name = 'sunspot-rails-tester' s.version = Sunspot::Rails::Tester::VERSION s.platform = Gem::Platform::RUBY s.author = 'Justin Ko' s.email = 'jko170@gmail.com' s.homepage = 'https://github.com/justinko/sunspot-rails-tester' s.summary = 'Stub sunspot when you want, and enable it when you want' s.description = 'Enable sunspot during testing for *real* integration tests' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_path = 'lib' s.add_dependency 'sunspot_rails', '>= 1.2' s.add_dependency 'sunspot_solr', '>= 1.2' s.add_development_dependency 'rspec', '~> 2.5' s.add_development_dependency 'rake' end
$:.push File.expand_path('../lib', __FILE__) require 'sunspot/rails/tester' Gem::Specification.new do |s| s.name = 'sunspot-rails-tester' s.version = Sunspot::Rails::Tester::VERSION s.platform = Gem::Platform::RUBY s.author = 'Justin Ko' s.email = 'jko170@gmail.com' s.homepage = 'https://github.com/justinko/sunspot-rails-tester' s.summary = 'Stub sunspot when you want, and enable it when you want' s.description = 'Enable sunspot during testing for *real* integration tests' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_path = 'lib' s.add_dependency 'sunspot_rails', '>= 1.2' s.add_dependency 'sunspot_solr', '>= 1.2' s.add_development_dependency 'rspec', '~> 2.5' + s.add_development_dependency 'rake' end
1
0.043478
1
0
3d5d9706f74fc53107387a872885fd6248476ffe
wercker.yml
wercker.yml
build: box: id: niaquinto/gradle entrypoint: /bin/bash -c steps: - script: name: Build java code code: | gradle assemble - script: name: Run Junit Tests code: | gradle test deploy: box: coenvl/alpine-git steps: - add-to-known_hosts: hostname: github.com fingerprint: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 - add-ssh-key: keyname: anonymous_github - script: name: Run anonymization script code: | ./anonymyze.sh
build: box: id: niaquinto/gradle entrypoint: /bin/sh -c "/bin/bash" steps: - script: name: Build java code code: | gradle assemble - script: name: Run Junit Tests code: | gradle test deploy: box: coenvl/alpine-git steps: - add-to-known_hosts: hostname: github.com fingerprint: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 - add-ssh-key: keyname: anonymous_github - script: name: Run anonymization script code: | ./anonymyze.sh
Fix from guys at slack
Fix from guys at slack
YAML
apache-2.0
coenvl/jSAM,coenvl/jSAM
yaml
## Code Before: build: box: id: niaquinto/gradle entrypoint: /bin/bash -c steps: - script: name: Build java code code: | gradle assemble - script: name: Run Junit Tests code: | gradle test deploy: box: coenvl/alpine-git steps: - add-to-known_hosts: hostname: github.com fingerprint: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 - add-ssh-key: keyname: anonymous_github - script: name: Run anonymization script code: | ./anonymyze.sh ## Instruction: Fix from guys at slack ## Code After: build: box: id: niaquinto/gradle entrypoint: /bin/sh -c "/bin/bash" steps: - script: name: Build java code code: | gradle assemble - script: name: Run Junit Tests code: | gradle test deploy: box: coenvl/alpine-git steps: - add-to-known_hosts: hostname: github.com fingerprint: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 - add-ssh-key: keyname: anonymous_github - script: name: Run anonymization script code: | ./anonymyze.sh
build: box: id: niaquinto/gradle - entrypoint: /bin/bash -c ? -- + entrypoint: /bin/sh -c "/bin/bash" ? ++++++++++++ steps: - script: name: Build java code code: | gradle assemble - script: name: Run Junit Tests code: | gradle test deploy: box: coenvl/alpine-git steps: - add-to-known_hosts: hostname: github.com fingerprint: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 - add-ssh-key: keyname: anonymous_github - script: name: Run anonymization script code: | ./anonymyze.sh
2
0.076923
1
1
6023fb0f40eab6af3014e9e4d1de02d6d69e2e8e
src/General/Str.hs
src/General/Str.hs
module General.Str( Str, strPack, strUnpack, strReadFile, strSplitInfix, LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks ) where import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as US import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LUS type Str = BS.ByteString type LStr = LBS.ByteString strPack :: String -> Str strPack = US.fromString strUnpack :: Str -> String strUnpack = US.toString strReadFile :: FilePath -> IO Str strReadFile = BS.readFile strSplitInfix :: Str -> Str -> Maybe (Str, Str) strSplitInfix needle haystack | (a,b) <- BS.breakSubstring needle haystack , not $ BS.null b = Just (a, BS.drop (BS.length needle) b) strSplitInfix _ _ = Nothing lstrToChunks :: LStr -> [Str] lstrToChunks = LBS.toChunks lstrFromChunks :: [Str] -> LStr lstrFromChunks = LBS.fromChunks lstrUnpack :: LStr -> String lstrUnpack = LUS.toString lstrPack :: String -> LStr lstrPack = LUS.fromString
{-# LANGUAGE PatternGuards #-} module General.Str( Str, strPack, strUnpack, strReadFile, strSplitInfix, LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks ) where import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as US import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LUS type Str = BS.ByteString type LStr = LBS.ByteString strPack :: String -> Str strPack = US.fromString strUnpack :: Str -> String strUnpack = US.toString strReadFile :: FilePath -> IO Str strReadFile = BS.readFile strSplitInfix :: Str -> Str -> Maybe (Str, Str) strSplitInfix needle haystack | (a,b) <- BS.breakSubstring needle haystack , not $ BS.null b = Just (a, BS.drop (BS.length needle) b) strSplitInfix _ _ = Nothing lstrToChunks :: LStr -> [Str] lstrToChunks = LBS.toChunks lstrFromChunks :: [Str] -> LStr lstrFromChunks = LBS.fromChunks lstrUnpack :: LStr -> String lstrUnpack = LUS.toString lstrPack :: String -> LStr lstrPack = LUS.fromString
Add a missing language pragma
Add a missing language pragma
Haskell
bsd-3-clause
wolftune/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle,ndmitchell/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle,ndmitchell/hoogle,ndmitchell/hoogle,wolftune/hoogle
haskell
## Code Before: module General.Str( Str, strPack, strUnpack, strReadFile, strSplitInfix, LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks ) where import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as US import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LUS type Str = BS.ByteString type LStr = LBS.ByteString strPack :: String -> Str strPack = US.fromString strUnpack :: Str -> String strUnpack = US.toString strReadFile :: FilePath -> IO Str strReadFile = BS.readFile strSplitInfix :: Str -> Str -> Maybe (Str, Str) strSplitInfix needle haystack | (a,b) <- BS.breakSubstring needle haystack , not $ BS.null b = Just (a, BS.drop (BS.length needle) b) strSplitInfix _ _ = Nothing lstrToChunks :: LStr -> [Str] lstrToChunks = LBS.toChunks lstrFromChunks :: [Str] -> LStr lstrFromChunks = LBS.fromChunks lstrUnpack :: LStr -> String lstrUnpack = LUS.toString lstrPack :: String -> LStr lstrPack = LUS.fromString ## Instruction: Add a missing language pragma ## Code After: {-# LANGUAGE PatternGuards #-} module General.Str( Str, strPack, strUnpack, strReadFile, strSplitInfix, LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks ) where import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as US import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LUS type Str = BS.ByteString type LStr = LBS.ByteString strPack :: String -> Str strPack = US.fromString strUnpack :: Str -> String strUnpack = US.toString strReadFile :: FilePath -> IO Str strReadFile = BS.readFile strSplitInfix :: Str -> Str -> Maybe (Str, Str) strSplitInfix needle haystack | (a,b) <- BS.breakSubstring needle haystack , not $ BS.null b = Just (a, BS.drop (BS.length needle) b) strSplitInfix _ _ = Nothing lstrToChunks :: LStr -> [Str] lstrToChunks = LBS.toChunks lstrFromChunks :: [Str] -> LStr lstrFromChunks = LBS.fromChunks lstrUnpack :: LStr -> String lstrUnpack = LUS.toString lstrPack :: String -> LStr lstrPack = LUS.fromString
+ {-# LANGUAGE PatternGuards #-} module General.Str( Str, strPack, strUnpack, strReadFile, strSplitInfix, LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks ) where import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as US import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LUS type Str = BS.ByteString type LStr = LBS.ByteString strPack :: String -> Str strPack = US.fromString strUnpack :: Str -> String strUnpack = US.toString strReadFile :: FilePath -> IO Str strReadFile = BS.readFile strSplitInfix :: Str -> Str -> Maybe (Str, Str) strSplitInfix needle haystack | (a,b) <- BS.breakSubstring needle haystack , not $ BS.null b = Just (a, BS.drop (BS.length needle) b) strSplitInfix _ _ = Nothing lstrToChunks :: LStr -> [Str] lstrToChunks = LBS.toChunks lstrFromChunks :: [Str] -> LStr lstrFromChunks = LBS.fromChunks lstrUnpack :: LStr -> String lstrUnpack = LUS.toString lstrPack :: String -> LStr lstrPack = LUS.fromString
1
0.022222
1
0
de3970d8030bd84851629d781eff0aae1812ddd5
MochaUtilities/Classes/Core/Utils/DocumentsUtil.swift
MochaUtilities/Classes/Core/Utils/DocumentsUtil.swift
// // DocumentsUtil.swift // Pods // // Created by Gregory Sholl e Santos on 19/07/17. // // import UIKit //MARK: - Variables & Accessors public class DocumentsUtil { private init() {} } //MARK: - Path public extension DocumentsUtil { public func path(forDomainMask domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { let documentPaths = NSSearchPathForDirectoriesInDomains(.documentDirectory, domainMask, true) if documentPaths.isEmpty { throw MochaException.fileNotFoundException } return documentPaths[0] } public func path(of filename: String?, with domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { guard let filename = filename, filename.isNotEmpty else { throw MochaException.fileNotFoundException } let documentPath = try path(forDomainMask: domainMask) return documentPath.appendingPathComponent(filename) } }
// // DocumentsUtil.swift // Pods // // Created by Gregory Sholl e Santos on 19/07/17. // // import UIKit //MARK: - Variables & Accessors public class DocumentsUtil { private init() {} } //MARK: - Path public extension DocumentsUtil { public func path(forDomainMask domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { let documentPaths = NSSearchPathForDirectoriesInDomains(.documentDirectory, domainMask, true) if documentPaths.isEmpty { throw MochaException.fileNotFoundException } return documentPaths[0] } public func path(of filename: String?, with domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { guard let filename = filename, filename.isNotEmpty else { throw MochaException.fileNotFoundException } let documentPath = try path(forDomainMask: domainMask) return documentPath.appendingPathComponent(filename) } } //MARK: - Exists public extension DocumentsUtil { public func fileExists(_ filename: String?) -> Bool { do { let path = try self.path(of: filename) return FileManager.default.fileExists(atPath: path) } catch { return false } } public func fileExists(atPath path: String) -> Bool { return FileManager.default.fileExists(atPath: path) } }
Add existential methods for documents
Add existential methods for documents
Swift
mit
gregorysholl/mocha-utilities,gregorysholl/mocha-utilities
swift
## Code Before: // // DocumentsUtil.swift // Pods // // Created by Gregory Sholl e Santos on 19/07/17. // // import UIKit //MARK: - Variables & Accessors public class DocumentsUtil { private init() {} } //MARK: - Path public extension DocumentsUtil { public func path(forDomainMask domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { let documentPaths = NSSearchPathForDirectoriesInDomains(.documentDirectory, domainMask, true) if documentPaths.isEmpty { throw MochaException.fileNotFoundException } return documentPaths[0] } public func path(of filename: String?, with domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { guard let filename = filename, filename.isNotEmpty else { throw MochaException.fileNotFoundException } let documentPath = try path(forDomainMask: domainMask) return documentPath.appendingPathComponent(filename) } } ## Instruction: Add existential methods for documents ## Code After: // // DocumentsUtil.swift // Pods // // Created by Gregory Sholl e Santos on 19/07/17. // // import UIKit //MARK: - Variables & Accessors public class DocumentsUtil { private init() {} } //MARK: - Path public extension DocumentsUtil { public func path(forDomainMask domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { let documentPaths = NSSearchPathForDirectoriesInDomains(.documentDirectory, domainMask, true) if documentPaths.isEmpty { throw MochaException.fileNotFoundException } return documentPaths[0] } public func path(of filename: String?, with domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { guard let filename = filename, filename.isNotEmpty else { throw MochaException.fileNotFoundException } let documentPath = try path(forDomainMask: domainMask) return documentPath.appendingPathComponent(filename) } } //MARK: - Exists public extension DocumentsUtil { public func fileExists(_ filename: String?) -> Bool { do { let path = try self.path(of: filename) return FileManager.default.fileExists(atPath: path) } catch { return false } } public func fileExists(atPath path: String) -> Bool { return FileManager.default.fileExists(atPath: path) } }
// // DocumentsUtil.swift // Pods // // Created by Gregory Sholl e Santos on 19/07/17. // // import UIKit //MARK: - Variables & Accessors public class DocumentsUtil { private init() {} } //MARK: - Path public extension DocumentsUtil { public func path(forDomainMask domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { let documentPaths = NSSearchPathForDirectoriesInDomains(.documentDirectory, domainMask, true) if documentPaths.isEmpty { throw MochaException.fileNotFoundException } return documentPaths[0] } public func path(of filename: String?, with domainMask: FileManager.SearchPathDomainMask = .userDomainMask) throws -> String { guard let filename = filename, filename.isNotEmpty else { throw MochaException.fileNotFoundException } let documentPath = try path(forDomainMask: domainMask) return documentPath.appendingPathComponent(filename) } } + + //MARK: - Exists + + public extension DocumentsUtil { + + public func fileExists(_ filename: String?) -> Bool { + do { + let path = try self.path(of: filename) + return FileManager.default.fileExists(atPath: path) + } catch { + return false + } + } + + public func fileExists(atPath path: String) -> Bool { + return FileManager.default.fileExists(atPath: path) + } + }
18
0.486486
18
0
a16827c0498c107d0449d93f5a2b5f98da83c1e9
spec/javascripts/moments.spec.js
spec/javascripts/moments.spec.js
describe("Moments", function() { var NO_ALLIES = "Unselect all"; var ALL_ALLIES = "Select all"; beforeAll(function() { var elements = []; elements.push("<div id='test_body'></div>"); elements.push("<label id='viewers_label'></label>"); elements.push("<input type='checkbox' id='viewers'></input>"); for (var i = 0; i < elements.length; i++) { $(document.body).append(elements[i]); } }); it("test no functions called", function() { var newOrEdit = spyOn(window, "newOrEdit"); expect(newOrEdit).not.toHaveBeenCalled(); }); it("test onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); expect($('#viewers_label').text()).toBe(""); }); it("test onReadyMoments and newOrEdit to be called", function() { $("body").addClass("moments new"); onReadyMoments(); expect($('#viewers_label').text()).toBe(ALL_ALLIES); onReadyMoments(); }); it("test newOeEdit in onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); }); });
describe("Moments", function() { var NO_ALLIES = "Unselect all"; var ALL_ALLIES = "Select all"; beforeAll(function() { var elements = []; elements.push("<div id='test_body'></div>"); elements.push("<label id='viewers_label'></label>"); elements.push("<input type='checkbox' id='viewers'></input>"); for (var i = 0; i < elements.length; i++) { $(document.body).append(elements[i]); } }); it("test onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); expect($('#viewers_label').text()).toBe(""); }); it("test onReadyMoments and newOrEdit to be called", function() { $("body").addClass("moments new"); onReadyMoments(); expect($('#viewers_label').text()).toBe(ALL_ALLIES); onReadyMoments(); }); it("test newOeEdit in onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); }); });
Remove test no functions called test
Remove test no functions called test
JavaScript
agpl-3.0
HashNotAdam/ifme,julianguyen/ifme,cartothemax/ifme,cartothemax/ifme,cartothemax/ifme,sexybiggetje/ifme,julianguyen/ifme,sexybiggetje/ifme,kkelleey/ifme,HashNotAdam/ifme,julianguyen/ifme,HashNotAdam/ifme,cartothemax/ifme,kkelleey/ifme,julianguyen/ifme,kkelleey/ifme,sexybiggetje/ifme
javascript
## Code Before: describe("Moments", function() { var NO_ALLIES = "Unselect all"; var ALL_ALLIES = "Select all"; beforeAll(function() { var elements = []; elements.push("<div id='test_body'></div>"); elements.push("<label id='viewers_label'></label>"); elements.push("<input type='checkbox' id='viewers'></input>"); for (var i = 0; i < elements.length; i++) { $(document.body).append(elements[i]); } }); it("test no functions called", function() { var newOrEdit = spyOn(window, "newOrEdit"); expect(newOrEdit).not.toHaveBeenCalled(); }); it("test onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); expect($('#viewers_label').text()).toBe(""); }); it("test onReadyMoments and newOrEdit to be called", function() { $("body").addClass("moments new"); onReadyMoments(); expect($('#viewers_label').text()).toBe(ALL_ALLIES); onReadyMoments(); }); it("test newOeEdit in onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); }); }); ## Instruction: Remove test no functions called test ## Code After: describe("Moments", function() { var NO_ALLIES = "Unselect all"; var ALL_ALLIES = "Select all"; beforeAll(function() { var elements = []; elements.push("<div id='test_body'></div>"); elements.push("<label id='viewers_label'></label>"); elements.push("<input type='checkbox' id='viewers'></input>"); for (var i = 0; i < elements.length; i++) { $(document.body).append(elements[i]); } }); it("test onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); expect($('#viewers_label').text()).toBe(""); }); it("test onReadyMoments and newOrEdit to be called", function() { $("body").addClass("moments new"); onReadyMoments(); expect($('#viewers_label').text()).toBe(ALL_ALLIES); onReadyMoments(); }); it("test newOeEdit in onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); }); });
describe("Moments", function() { var NO_ALLIES = "Unselect all"; var ALL_ALLIES = "Select all"; beforeAll(function() { var elements = []; elements.push("<div id='test_body'></div>"); elements.push("<label id='viewers_label'></label>"); elements.push("<input type='checkbox' id='viewers'></input>"); for (var i = 0; i < elements.length; i++) { $(document.body).append(elements[i]); } }); - it("test no functions called", function() { - var newOrEdit = spyOn(window, "newOrEdit"); - expect(newOrEdit).not.toHaveBeenCalled(); - }); it("test onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); expect($('#viewers_label').text()).toBe(""); }); it("test onReadyMoments and newOrEdit to be called", function() { $("body").addClass("moments new"); onReadyMoments(); expect($('#viewers_label').text()).toBe(ALL_ALLIES); onReadyMoments(); }); it("test newOeEdit in onReadyMoments to be called", function() { var newOrEdit = spyOn(window, "newOrEdit"); onReadyMoments(); expect(newOrEdit).toHaveBeenCalled(); }); });
4
0.111111
0
4
13f7b02956c965e6f8ea3327011e20b8ff9fd036
src/GeoExt/data/models/Layer.js
src/GeoExt/data/models/Layer.js
Ext.define('gx_layer', { extend: 'Ext.data.Model', fields: [ 'name', 'id' ], getLayer: function() { return this.raw; } });
/** * @class GeoExt.data.model.Layer * @borrows Ext.data.Model * * Class defines a model for records containing an OpenLayers layer object. * Usually this class is not instantiated directly, but referenced by its mtype 'gx_layer' * or name 'GeoExt.data.model.Layer' as string representation as a config option within creation of a superior component, * such as a store. */ Ext.define('GeoExt.data.model.Layer', { extend: 'Ext.data.Model', alias: ['model.gx_layer'], fields: [ {name: 'title', mapping: 'name'}, {name: 'name', mapping: 'metadata.name'}, 'id' ], /** * Returns the {OpenLayers.Layer} layer object used in this model instance */ getLayer: function() { return this.raw; } });
Update layer model with jsdoc tags and proper class name & alias
Update layer model with jsdoc tags and proper class name & alias
JavaScript
bsd-3-clause
bentrm/geoext2,Sundsvallskommun/geoext2,bentrm/geoext2,geoext/geoext2,Sundsvallskommun/geoext2,m-click/geoext2,marcjansen/geoext2,chrismayer/geoext2,annarieger/geoext2,geographika/geoext2,Sundsvallskommun/geoext2,m-click/geoext2,geoext/geoext2,annarieger/geoext2,chrismayer/geoext2,marcjansen/geoext2,geographika/geoext2
javascript
## Code Before: Ext.define('gx_layer', { extend: 'Ext.data.Model', fields: [ 'name', 'id' ], getLayer: function() { return this.raw; } }); ## Instruction: Update layer model with jsdoc tags and proper class name & alias ## Code After: /** * @class GeoExt.data.model.Layer * @borrows Ext.data.Model * * Class defines a model for records containing an OpenLayers layer object. * Usually this class is not instantiated directly, but referenced by its mtype 'gx_layer' * or name 'GeoExt.data.model.Layer' as string representation as a config option within creation of a superior component, * such as a store. */ Ext.define('GeoExt.data.model.Layer', { extend: 'Ext.data.Model', alias: ['model.gx_layer'], fields: [ {name: 'title', mapping: 'name'}, {name: 'name', mapping: 'metadata.name'}, 'id' ], /** * Returns the {OpenLayers.Layer} layer object used in this model instance */ getLayer: function() { return this.raw; } });
- Ext.define('gx_layer', { + /** + * @class GeoExt.data.model.Layer + * @borrows Ext.data.Model + * + * Class defines a model for records containing an OpenLayers layer object. + * Usually this class is not instantiated directly, but referenced by its mtype 'gx_layer' + * or name 'GeoExt.data.model.Layer' as string representation as a config option within creation of a superior component, + * such as a store. + */ + Ext.define('GeoExt.data.model.Layer', { extend: 'Ext.data.Model', + alias: ['model.gx_layer'], fields: [ - 'name', + {name: 'title', mapping: 'name'}, + {name: 'name', mapping: 'metadata.name'}, 'id' ], + /** + * Returns the {OpenLayers.Layer} layer object used in this model instance + */ getLayer: function() { return this.raw; } });
18
1.636364
16
2
18e8726968127964f18018f57f1865832d969aeb
src/main/java/com/megaport/api/dto/AvailableProductDto.java
src/main/java/com/megaport/api/dto/AvailableProductDto.java
package com.megaport.api.dto; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class AvailableProductDto implements Serializable { private Boolean mcr; private List<Integer> megaport = new ArrayList<>(); public AvailableProductDto() { } public Boolean getmcr() { return mcr; } public void setmcr(Boolean mcr) { this.mcr = mcr; } public List<Integer> getMegaport() { return megaport; } public void setMegaport(List<Integer> megaport) { this.megaport = megaport; } }
package com.megaport.api.dto; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) public class AvailableProductDto implements Serializable { private Boolean mcr; private Integer mcrVersion; private List<Integer> megaport = new ArrayList<>(); public AvailableProductDto() { } public Boolean getmcr() { return mcr; } public void setmcr(Boolean mcr) { this.mcr = mcr; } public List<Integer> getMegaport() { return megaport; } public Integer getMcrVersion() { return mcrVersion; } public void setMcrVersion(Integer mcrVersion) { this.mcrVersion = mcrVersion; } public void setMegaport(List<Integer> megaport) { this.megaport = megaport; } }
Add in MCR version, add annotation to ignore unknown
Add in MCR version, add annotation to ignore unknown
Java
mit
megaport/Java-MegaportAPI
java
## Code Before: package com.megaport.api.dto; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class AvailableProductDto implements Serializable { private Boolean mcr; private List<Integer> megaport = new ArrayList<>(); public AvailableProductDto() { } public Boolean getmcr() { return mcr; } public void setmcr(Boolean mcr) { this.mcr = mcr; } public List<Integer> getMegaport() { return megaport; } public void setMegaport(List<Integer> megaport) { this.megaport = megaport; } } ## Instruction: Add in MCR version, add annotation to ignore unknown ## Code After: package com.megaport.api.dto; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) public class AvailableProductDto implements Serializable { private Boolean mcr; private Integer mcrVersion; private List<Integer> megaport = new ArrayList<>(); public AvailableProductDto() { } public Boolean getmcr() { return mcr; } public void setmcr(Boolean mcr) { this.mcr = mcr; } public List<Integer> getMegaport() { return megaport; } public Integer getMcrVersion() { return mcrVersion; } public void setMcrVersion(Integer mcrVersion) { this.mcrVersion = mcrVersion; } public void setMegaport(List<Integer> megaport) { this.megaport = megaport; } }
package com.megaport.api.dto; + + import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + @JsonIgnoreProperties(ignoreUnknown = true) public class AvailableProductDto implements Serializable { private Boolean mcr; + private Integer mcrVersion; private List<Integer> megaport = new ArrayList<>(); public AvailableProductDto() { } public Boolean getmcr() { return mcr; } public void setmcr(Boolean mcr) { this.mcr = mcr; } public List<Integer> getMegaport() { return megaport; } + public Integer getMcrVersion() { + return mcrVersion; + } + + public void setMcrVersion(Integer mcrVersion) { + this.mcrVersion = mcrVersion; + } + public void setMegaport(List<Integer> megaport) { this.megaport = megaport; } }
12
0.387097
12
0
a8db08f25256768274ecf6bd93df071f6038068d
src/Node.hs
src/Node.hs
module Node where import Network.Socket type ID = String data Node = Node { myPort :: String, sockets :: [Socket] } initNode :: String -> [Socket] -> Node initNode port sockets = Node port sockets
module Node where import qualified Data.ByteString as B import qualified Data.HashMap.Strict as HM import Network.Socket import RoutingData data Node = Node { port :: B.ByteString , id :: ID , tree :: Tree , store :: HM.HashMap B.ByteString B.ByteString , sockets :: [Socket] }
Move all info to routing data, construct (almost) full node
Move all info to routing data, construct (almost) full node
Haskell
bsd-3-clause
semaj/hademlia
haskell
## Code Before: module Node where import Network.Socket type ID = String data Node = Node { myPort :: String, sockets :: [Socket] } initNode :: String -> [Socket] -> Node initNode port sockets = Node port sockets ## Instruction: Move all info to routing data, construct (almost) full node ## Code After: module Node where import qualified Data.ByteString as B import qualified Data.HashMap.Strict as HM import Network.Socket import RoutingData data Node = Node { port :: B.ByteString , id :: ID , tree :: Tree , store :: HM.HashMap B.ByteString B.ByteString , sockets :: [Socket] }
module Node where + import qualified Data.ByteString as B + import qualified Data.HashMap.Strict as HM - import Network.Socket + import Network.Socket ? ++++++++++ + import RoutingData + data Node = Node { port :: B.ByteString + , id :: ID + , tree :: Tree + , store :: HM.HashMap B.ByteString B.ByteString + , sockets :: [Socket] + } - type ID = String - - data Node = Node { - myPort :: String, - sockets :: [Socket] - } - - initNode :: String -> [Socket] -> Node - initNode port sockets = Node port sockets
20
1.666667
10
10
a14654a64f3693c4345e280e1ad4a51eb24f98fb
archiveComponents.sh
archiveComponents.sh
PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin function compressComponents(){ mkdir -p "$2" cd $1 for itemName in *.component ; do itemLength=${#itemName} item=${itemName:0:$itemLength-10} # echo $item if [[ -d $itemName ]] ; then zip -9r "${item}.zip" "$itemName" cp "${item}.zip" "$2" fi done } compressComponents "${BUILT_PRODUCTS_DIR}" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/" if [[ -d "${BUILT_PRODUCTS_DIR}/CoreAudio" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/CoreAudio" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/CoreAudio" fi if [[ -d "${BUILT_PRODUCTS_DIR}/QuickTime" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/QuickTime" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/QuickTime" fi
PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin function compressComponents(){ mkdir -p "$2" cd $1 for itemName in *.component ; do itemLength=${#itemName} item=${itemName:0:$itemLength-10} # echo $item if [[ -d $itemName ]] ; then ditto -c -k --rsrc --keepParent "$itemName" "${item}.zip" cp "${item}.zip" "$2" fi done } compressComponents "${BUILT_PRODUCTS_DIR}" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/" if [[ -d "${BUILT_PRODUCTS_DIR}/CoreAudio" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/CoreAudio" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/CoreAudio" fi if [[ -d "${BUILT_PRODUCTS_DIR}/QuickTime" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/QuickTime" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/QuickTime" fi
Use ditto instead of zip. Creates the same files, but appears to be safer with OS X files. Likely makes no difference, but might as well do it anyway.
Use ditto instead of zip. Creates the same files, but appears to be safer with OS X files. Likely makes no difference, but might as well do it anyway.
Shell
lgpl-2.1
JanX2/Perian,MaddTheSane/perian,JanX2/Perian,MaddTheSane/perian,JanX2/Perian,JanX2/Perian,MaddTheSane/perian,MaddTheSane/perian,MaddTheSane/perian,JanX2/Perian,MaddTheSane/perian
shell
## Code Before: PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin function compressComponents(){ mkdir -p "$2" cd $1 for itemName in *.component ; do itemLength=${#itemName} item=${itemName:0:$itemLength-10} # echo $item if [[ -d $itemName ]] ; then zip -9r "${item}.zip" "$itemName" cp "${item}.zip" "$2" fi done } compressComponents "${BUILT_PRODUCTS_DIR}" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/" if [[ -d "${BUILT_PRODUCTS_DIR}/CoreAudio" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/CoreAudio" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/CoreAudio" fi if [[ -d "${BUILT_PRODUCTS_DIR}/QuickTime" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/QuickTime" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/QuickTime" fi ## Instruction: Use ditto instead of zip. Creates the same files, but appears to be safer with OS X files. Likely makes no difference, but might as well do it anyway. ## Code After: PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin function compressComponents(){ mkdir -p "$2" cd $1 for itemName in *.component ; do itemLength=${#itemName} item=${itemName:0:$itemLength-10} # echo $item if [[ -d $itemName ]] ; then ditto -c -k --rsrc --keepParent "$itemName" "${item}.zip" cp "${item}.zip" "$2" fi done } compressComponents "${BUILT_PRODUCTS_DIR}" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/" if [[ -d "${BUILT_PRODUCTS_DIR}/CoreAudio" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/CoreAudio" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/CoreAudio" fi if [[ -d "${BUILT_PRODUCTS_DIR}/QuickTime" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/QuickTime" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/QuickTime" fi
PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin function compressComponents(){ mkdir -p "$2" cd $1 for itemName in *.component ; do itemLength=${#itemName} item=${itemName:0:$itemLength-10} # echo $item if [[ -d $itemName ]] ; then - zip -9r "${item}.zip" "$itemName" + ditto -c -k --rsrc --keepParent "$itemName" "${item}.zip" cp "${item}.zip" "$2" fi done } compressComponents "${BUILT_PRODUCTS_DIR}" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/" if [[ -d "${BUILT_PRODUCTS_DIR}/CoreAudio" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/CoreAudio" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/CoreAudio" fi if [[ -d "${BUILT_PRODUCTS_DIR}/QuickTime" ]] ; then compressComponents "${BUILT_PRODUCTS_DIR}/QuickTime" "${BUILT_PRODUCTS_DIR}/PerianPane.prefPane/Contents/Resources/Components/QuickTime" fi
2
0.083333
1
1
edc58c7eb43eb1c1988894c8e0fd0c3e644c1e9f
runtests.sh
runtests.sh
bash -c "createdb facebook_auth-test-database || true" rm -rf reports reports3.3 virtualenv .env . .env/bin/activate pip install -e . pip install psycopg2 django-jenkins==0.14.1 pylint coverage pep8 pyflakes factory_boy==2.0.2 django-celery==3.0.23 mock python runtests.py legacy deactivate virtualenv .env3.3 --python=python3.3 . .env3.3/bin/activate export PYTHONPATH=$PYTHONPATH:$(pwd) pip install django==1.6 psycopg2 django-jenkins pylint coverage pep8 pyflakes factory_boy django-celery facepy-pozytywnie==1.0.5 python runtests.py
bash -c "createdb facebook_auth-test-database || true" rm -rf reports reports3.3 virtualenv .env . .env/bin/activate pip install -e . pip install psycopg2 django-jenkins==0.14.1 pylint coverage pep8 pyflakes factory_boy==2.0.2 django-celery==3.0.23 mock python runtests.py legacy deactivate virtualenv .env3.3 --python=python3.3 . .env3.3/bin/activate export PYTHONPATH=$PYTHONPATH:$(pwd) pip install django==1.6 psycopg2 django-jenkins pylint coverage pep8 pyflakes factory_boy django-celery facepy==1.0.6 python runtests.py
Change facepy version in tests.
Change facepy version in tests.
Shell
mit
jgoclawski/django-facebook-auth,jgoclawski/django-facebook-auth,pozytywnie/django-facebook-auth,pozytywnie/django-facebook-auth
shell
## Code Before: bash -c "createdb facebook_auth-test-database || true" rm -rf reports reports3.3 virtualenv .env . .env/bin/activate pip install -e . pip install psycopg2 django-jenkins==0.14.1 pylint coverage pep8 pyflakes factory_boy==2.0.2 django-celery==3.0.23 mock python runtests.py legacy deactivate virtualenv .env3.3 --python=python3.3 . .env3.3/bin/activate export PYTHONPATH=$PYTHONPATH:$(pwd) pip install django==1.6 psycopg2 django-jenkins pylint coverage pep8 pyflakes factory_boy django-celery facepy-pozytywnie==1.0.5 python runtests.py ## Instruction: Change facepy version in tests. ## Code After: bash -c "createdb facebook_auth-test-database || true" rm -rf reports reports3.3 virtualenv .env . .env/bin/activate pip install -e . pip install psycopg2 django-jenkins==0.14.1 pylint coverage pep8 pyflakes factory_boy==2.0.2 django-celery==3.0.23 mock python runtests.py legacy deactivate virtualenv .env3.3 --python=python3.3 . .env3.3/bin/activate export PYTHONPATH=$PYTHONPATH:$(pwd) pip install django==1.6 psycopg2 django-jenkins pylint coverage pep8 pyflakes factory_boy django-celery facepy==1.0.6 python runtests.py
bash -c "createdb facebook_auth-test-database || true" rm -rf reports reports3.3 virtualenv .env . .env/bin/activate pip install -e . pip install psycopg2 django-jenkins==0.14.1 pylint coverage pep8 pyflakes factory_boy==2.0.2 django-celery==3.0.23 mock python runtests.py legacy deactivate virtualenv .env3.3 --python=python3.3 . .env3.3/bin/activate export PYTHONPATH=$PYTHONPATH:$(pwd) - pip install django==1.6 psycopg2 django-jenkins pylint coverage pep8 pyflakes factory_boy django-celery facepy-pozytywnie==1.0.5 ? ----------- ^ + pip install django==1.6 psycopg2 django-jenkins pylint coverage pep8 pyflakes factory_boy django-celery facepy==1.0.6 ? ^ python runtests.py
2
0.117647
1
1
57cf38b3f8299baec2653d67cbe6a5a50303e9e8
spec/celluloid/supervision_group_spec.rb
spec/celluloid/supervision_group_spec.rb
require 'spec_helper' describe Celluloid::SupervisionGroup do before :all do class MyActor include Celluloid def running?; :yep; end end class MyGroup < Celluloid::SupervisionGroup supervise MyActor, :as => :example end end it "runs applications" do MyGroup.run! sleep 0.01 # startup time hax Celluloid::Actor[:example].should be_running end it "accepts a private actor registry" do my_registry = Celluloid::Registry.new MyGroup.run!(my_registry) sleep 0.01 my_registry[:example].should be_running end it "removes actors from the registry when terminating" do group = MyGroup.run! group.terminate Celluloid::Actor[:example].should be_nil end context "pool" do before :all do class MyActor attr_reader :args def initialize *args @args = *args end end class MyGroup pool MyActor, :as => :example_pool, :args => 'foo', :size => 3 end end it "runs applications and passes pool options and actor args" do MyGroup.run! sleep 0.001 # startup time hax Celluloid::Actor[:example_pool].should be_running Celluloid::Actor[:example_pool].args.should eq ['foo'] Celluloid::Actor[:example_pool].size.should be 3 end end end
require 'spec_helper' describe Celluloid::SupervisionGroup do before :all do class MyActor include Celluloid def running?; :yep; end end class MyGroup < Celluloid::SupervisionGroup supervise MyActor, :as => :example end end it "runs applications" do MyGroup.run! sleep 0.01 # startup time hax Celluloid::Actor[:example].should be_running end it "accepts a private actor registry" do my_registry = Celluloid::Registry.new MyGroup.run!(my_registry) sleep 0.01 my_registry[:example].should be_running end it "removes actors from the registry when terminating" do group = MyGroup.run! group.terminate Celluloid::Actor[:example].should be_nil end context "pool" do before :all do class MyActor attr_reader :args def initialize *args @args = *args end end class MyGroup pool MyActor, :as => :example_pool, :args => 'foo', :size => 3 end end it "runs applications and passes pool options and actor args" do MyGroup.run! sleep 0.001 # startup time hax Celluloid::Actor[:example_pool].should be_running Celluloid::Actor[:example_pool].args.should eq ['foo'] Celluloid::Actor[:example_pool].size.should be 3 end it "allows external access to the internal registry" do supervisor = MyGroup.run! supervisor[:example].should be_a MyActor end end end
Add spec for internal registry access
Add spec for internal registry access
Ruby
mit
TiagoCardoso1983/celluloid,seuros/celluloid,davydovanton/celluloid,jstoja/celluloid,dilumn/celluloid,kenichi/celluloid,olleolleolle/celluloid,marshall-lee/celluloid,sideci-sample/sideci-sample-celluloid,celluloid/celluloid,jasonm23/celluloid
ruby
## Code Before: require 'spec_helper' describe Celluloid::SupervisionGroup do before :all do class MyActor include Celluloid def running?; :yep; end end class MyGroup < Celluloid::SupervisionGroup supervise MyActor, :as => :example end end it "runs applications" do MyGroup.run! sleep 0.01 # startup time hax Celluloid::Actor[:example].should be_running end it "accepts a private actor registry" do my_registry = Celluloid::Registry.new MyGroup.run!(my_registry) sleep 0.01 my_registry[:example].should be_running end it "removes actors from the registry when terminating" do group = MyGroup.run! group.terminate Celluloid::Actor[:example].should be_nil end context "pool" do before :all do class MyActor attr_reader :args def initialize *args @args = *args end end class MyGroup pool MyActor, :as => :example_pool, :args => 'foo', :size => 3 end end it "runs applications and passes pool options and actor args" do MyGroup.run! sleep 0.001 # startup time hax Celluloid::Actor[:example_pool].should be_running Celluloid::Actor[:example_pool].args.should eq ['foo'] Celluloid::Actor[:example_pool].size.should be 3 end end end ## Instruction: Add spec for internal registry access ## Code After: require 'spec_helper' describe Celluloid::SupervisionGroup do before :all do class MyActor include Celluloid def running?; :yep; end end class MyGroup < Celluloid::SupervisionGroup supervise MyActor, :as => :example end end it "runs applications" do MyGroup.run! sleep 0.01 # startup time hax Celluloid::Actor[:example].should be_running end it "accepts a private actor registry" do my_registry = Celluloid::Registry.new MyGroup.run!(my_registry) sleep 0.01 my_registry[:example].should be_running end it "removes actors from the registry when terminating" do group = MyGroup.run! group.terminate Celluloid::Actor[:example].should be_nil end context "pool" do before :all do class MyActor attr_reader :args def initialize *args @args = *args end end class MyGroup pool MyActor, :as => :example_pool, :args => 'foo', :size => 3 end end it "runs applications and passes pool options and actor args" do MyGroup.run! sleep 0.001 # startup time hax Celluloid::Actor[:example_pool].should be_running Celluloid::Actor[:example_pool].args.should eq ['foo'] Celluloid::Actor[:example_pool].size.should be 3 end it "allows external access to the internal registry" do supervisor = MyGroup.run! supervisor[:example].should be_a MyActor end end end
require 'spec_helper' describe Celluloid::SupervisionGroup do before :all do class MyActor include Celluloid def running?; :yep; end end class MyGroup < Celluloid::SupervisionGroup supervise MyActor, :as => :example end end it "runs applications" do MyGroup.run! sleep 0.01 # startup time hax Celluloid::Actor[:example].should be_running end it "accepts a private actor registry" do my_registry = Celluloid::Registry.new MyGroup.run!(my_registry) sleep 0.01 my_registry[:example].should be_running end it "removes actors from the registry when terminating" do group = MyGroup.run! group.terminate Celluloid::Actor[:example].should be_nil end context "pool" do before :all do class MyActor attr_reader :args def initialize *args @args = *args end end class MyGroup pool MyActor, :as => :example_pool, :args => 'foo', :size => 3 end end it "runs applications and passes pool options and actor args" do MyGroup.run! sleep 0.001 # startup time hax Celluloid::Actor[:example_pool].should be_running Celluloid::Actor[:example_pool].args.should eq ['foo'] Celluloid::Actor[:example_pool].size.should be 3 end + + it "allows external access to the internal registry" do + supervisor = MyGroup.run! + + supervisor[:example].should be_a MyActor + end end end
6
0.101695
6
0
27cfb99bd5b754955ed9c9ef2a9e1176a5f84aed
vault/policies/provisioner.hcl
vault/policies/provisioner.hcl
path "auth/token/lookup-self" { policy = "read" } # Handle token provisioning path "auth/token/create" { policy = "write" } path "auth/token/revoke/" { policy = "write" } # Handle Endpoint server provisioning path "secret/endpoint/*" { policy = "write" } path "secret/proofreader/*" { policy = "write" } path "secret/auth" { policy = "write" }
path "auth/token/lookup-self" { policy = "read" } # Handle token provisioning path "auth/token/create" { policy = "write" } path "auth/token/revoke/" { policy = "write" } # Handle Endpoint server provisioning path "secret/endpoint/*" { policy = "write" } path "secret/proofreader/*" { policy = "write" } path "secret/auth" { policy = "write" } path "secret/auth/*" { policy = "write" } path "secret/keycloak" { policy = "write" }
Update Vault policies to allow storing new data
Update Vault policies to allow storing new data
HCL
apache-2.0
jhuapl-boss/boss-manage,jhuapl-boss/boss-manage
hcl
## Code Before: path "auth/token/lookup-self" { policy = "read" } # Handle token provisioning path "auth/token/create" { policy = "write" } path "auth/token/revoke/" { policy = "write" } # Handle Endpoint server provisioning path "secret/endpoint/*" { policy = "write" } path "secret/proofreader/*" { policy = "write" } path "secret/auth" { policy = "write" } ## Instruction: Update Vault policies to allow storing new data ## Code After: path "auth/token/lookup-self" { policy = "read" } # Handle token provisioning path "auth/token/create" { policy = "write" } path "auth/token/revoke/" { policy = "write" } # Handle Endpoint server provisioning path "secret/endpoint/*" { policy = "write" } path "secret/proofreader/*" { policy = "write" } path "secret/auth" { policy = "write" } path "secret/auth/*" { policy = "write" } path "secret/keycloak" { policy = "write" }
path "auth/token/lookup-self" { policy = "read" } # Handle token provisioning path "auth/token/create" { policy = "write" } path "auth/token/revoke/" { policy = "write" } # Handle Endpoint server provisioning path "secret/endpoint/*" { policy = "write" } path "secret/proofreader/*" { policy = "write" } path "secret/auth" { policy = "write" } + + path "secret/auth/*" { + policy = "write" + } + + path "secret/keycloak" { + policy = "write" + }
8
0.32
8
0
7e1e525fa50f55ffb2033a6a2f4ae82c9df7c2ed
install.sh
install.sh
PREFIX=${PREFIX:='/usr/local'} # Clone the git repo git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator # cd to the fork-cms-module-generator directory cd $PREFIX/fork-cms-module-generator # Get composer curl -sS https://getcomposer.org/installer | php # Install dependencies using composer php composer.phar install # Symlink to $PREFIX/bin ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator # Get back to where we once belonged cd - if [ -e ~/.bash_profile ] then echo "eval \$(module-generator _completion --generate-hook)" >> ~/.bash_profile fi if [ -e ~/.zshrc ] then echo "eval \$(module-generator _completion --generate-hook)" >> ~/.zshrc fi
PREFIX=${PREFIX:='/usr/local'} # Clone the git repo git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator # cd to the fork-cms-module-generator directory cd $PREFIX/fork-cms-module-generator # Get composer curl -sS https://getcomposer.org/installer | php # Install dependencies using composer php composer.phar install # Symlink to $PREFIX/bin ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator # Get back to where we once belonged cd - if [ -e ~/.bash_profile ] then echo "eval \$(module-generator _completion --generate-hook --shell-type=bash)" >> ~/.bash_profile fi if [ -e ~/.zshrc ] then echo "eval \$(module-generator _completion --generate-hook --shell-type=zsh)" >> ~/.zshrc fi
Add shell definition to be sure
Add shell definition to be sure
Shell
mit
carakas/fork-cms-module-generator,carakas/fork-cms-module-generator,carakas/fork-cms-module-generator
shell
## Code Before: PREFIX=${PREFIX:='/usr/local'} # Clone the git repo git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator # cd to the fork-cms-module-generator directory cd $PREFIX/fork-cms-module-generator # Get composer curl -sS https://getcomposer.org/installer | php # Install dependencies using composer php composer.phar install # Symlink to $PREFIX/bin ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator # Get back to where we once belonged cd - if [ -e ~/.bash_profile ] then echo "eval \$(module-generator _completion --generate-hook)" >> ~/.bash_profile fi if [ -e ~/.zshrc ] then echo "eval \$(module-generator _completion --generate-hook)" >> ~/.zshrc fi ## Instruction: Add shell definition to be sure ## Code After: PREFIX=${PREFIX:='/usr/local'} # Clone the git repo git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator # cd to the fork-cms-module-generator directory cd $PREFIX/fork-cms-module-generator # Get composer curl -sS https://getcomposer.org/installer | php # Install dependencies using composer php composer.phar install # Symlink to $PREFIX/bin ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator # Get back to where we once belonged cd - if [ -e ~/.bash_profile ] then echo "eval \$(module-generator _completion --generate-hook --shell-type=bash)" >> ~/.bash_profile fi if [ -e ~/.zshrc ] then echo "eval \$(module-generator _completion --generate-hook --shell-type=zsh)" >> ~/.zshrc fi
PREFIX=${PREFIX:='/usr/local'} # Clone the git repo git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator # cd to the fork-cms-module-generator directory cd $PREFIX/fork-cms-module-generator # Get composer curl -sS https://getcomposer.org/installer | php # Install dependencies using composer php composer.phar install # Symlink to $PREFIX/bin ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator # Get back to where we once belonged cd - if [ -e ~/.bash_profile ] then - echo "eval \$(module-generator _completion --generate-hook)" >> ~/.bash_profile + echo "eval \$(module-generator _completion --generate-hook --shell-type=bash)" >> ~/.bash_profile ? ++++++++++++++++++ fi if [ -e ~/.zshrc ] then - echo "eval \$(module-generator _completion --generate-hook)" >> ~/.zshrc + echo "eval \$(module-generator _completion --generate-hook --shell-type=zsh)" >> ~/.zshrc ? +++++++++++++++++ fi
4
0.142857
2
2
a610be2a3ae3dfef91353a473b5db9dce81ed1a2
src/gameroom/readme.md
src/gameroom/readme.md
[&#8249; Facebook Gameroom Doc Home](./) <h1>Facebook Gameroom Integration Guide</h1> <<[../../shared/-VERSION-/version.md] ## Integration with Cocos Project ### Using SDKBOX Installer (recommend) - With SDKBOX Installer, you can install Gameroom Plugin in **Windows** easily. Please access [SDKBOX official website](http://www.sdkbox.com) for more information to get SDKBOX Installer. - After getting SDKBOX Installer, you can import Gameroom Plugin with it: ``` sdkbox import gameroom ``` - Or, if the gameroom plugin is in local, you can also import it like this: ``` sdkbox import -b c:\the_path_to_gameroom_plugin\sdkbox-gameroom_v0.01 ``` <<[manual_integration.md] ## Usage <<[usage.md] ## API Reference <<[api_reference.md]
[&#8249; Facebook Gameroom Doc Home](./) <h1>Facebook Gameroom Integration Guide</h1> <<[../../shared/-VERSION-/version.md] ## Precondition Please follow [the guide](https://developers.facebook.com/docs/games/gameroom) from Facebook to setup a Facebook application with Gameroom configurations. ## Integration with Cocos Project ### Using SDKBOX Installer (recommend) - With SDKBOX Installer, you can install Gameroom Plugin in **Windows** easily. Please access [SDKBOX official website](http://www.sdkbox.com) for more information to get SDKBOX Installer. - After getting SDKBOX Installer, you can import Gameroom Plugin with it: ``` sdkbox import gameroom ``` - Or, if the gameroom plugin is in local, you can also import it like this: ``` sdkbox import -b c:\the_path_to_gameroom_plugin\sdkbox-gameroom_v0.01 ``` <<[manual_integration.md] ## Usage <<[usage.md] ## API Reference <<[api_reference.md]
Add Facebook Gameroom Guide as a preconditon in "Integration" page.
Add Facebook Gameroom Guide as a preconditon in "Integration" page.
Markdown
mit
sdkbox-doc/en,sdkbox-doc/en,sdkbox-doc/en,sdkbox-doc/en
markdown
## Code Before: [&#8249; Facebook Gameroom Doc Home](./) <h1>Facebook Gameroom Integration Guide</h1> <<[../../shared/-VERSION-/version.md] ## Integration with Cocos Project ### Using SDKBOX Installer (recommend) - With SDKBOX Installer, you can install Gameroom Plugin in **Windows** easily. Please access [SDKBOX official website](http://www.sdkbox.com) for more information to get SDKBOX Installer. - After getting SDKBOX Installer, you can import Gameroom Plugin with it: ``` sdkbox import gameroom ``` - Or, if the gameroom plugin is in local, you can also import it like this: ``` sdkbox import -b c:\the_path_to_gameroom_plugin\sdkbox-gameroom_v0.01 ``` <<[manual_integration.md] ## Usage <<[usage.md] ## API Reference <<[api_reference.md] ## Instruction: Add Facebook Gameroom Guide as a preconditon in "Integration" page. ## Code After: [&#8249; Facebook Gameroom Doc Home](./) <h1>Facebook Gameroom Integration Guide</h1> <<[../../shared/-VERSION-/version.md] ## Precondition Please follow [the guide](https://developers.facebook.com/docs/games/gameroom) from Facebook to setup a Facebook application with Gameroom configurations. ## Integration with Cocos Project ### Using SDKBOX Installer (recommend) - With SDKBOX Installer, you can install Gameroom Plugin in **Windows** easily. Please access [SDKBOX official website](http://www.sdkbox.com) for more information to get SDKBOX Installer. - After getting SDKBOX Installer, you can import Gameroom Plugin with it: ``` sdkbox import gameroom ``` - Or, if the gameroom plugin is in local, you can also import it like this: ``` sdkbox import -b c:\the_path_to_gameroom_plugin\sdkbox-gameroom_v0.01 ``` <<[manual_integration.md] ## Usage <<[usage.md] ## API Reference <<[api_reference.md]
[&#8249; Facebook Gameroom Doc Home](./) <h1>Facebook Gameroom Integration Guide</h1> <<[../../shared/-VERSION-/version.md] + ## Precondition + + Please follow [the guide](https://developers.facebook.com/docs/games/gameroom) from Facebook to setup a Facebook application with Gameroom configurations. ## Integration with Cocos Project ### Using SDKBOX Installer (recommend) - With SDKBOX Installer, you can install Gameroom Plugin in **Windows** easily. Please access [SDKBOX official website](http://www.sdkbox.com) for more information to get SDKBOX Installer. - After getting SDKBOX Installer, you can import Gameroom Plugin with it: ``` sdkbox import gameroom ``` - Or, if the gameroom plugin is in local, you can also import it like this: ``` sdkbox import -b c:\the_path_to_gameroom_plugin\sdkbox-gameroom_v0.01 ``` <<[manual_integration.md] ## Usage <<[usage.md] ## API Reference <<[api_reference.md]
3
0.088235
3
0
5cd8a8073211831a7753cc54a90c858246cfdde7
appveyor.yml
appveyor.yml
environment: op_build_user: "OpenPublishBuild" op_build_user_email: "vscopbld@microsoft.com" access_token: secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3 before_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { git checkout master -q cinst docfx -y } build_script: - msbuild src/SampleClass1/SampleClass1.sln after_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { docfx docfx.json git config --global credential.helper store Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" git config --global user.email $env:op_build_user_email git config --global user.name $env:op_build_user git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q Copy-Item origin_site/.git _site -recurse CD _site git add -A 2>&1 git commit -m "CI Updates" -q git push origin gh-pages -q }
environment: op_build_user: "OpenPublishBuild" op_build_user_email: "vscopbld@microsoft.com" access_token: secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3 before_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { git checkout $env:APPVEYOR_REPO_BRANCH -q cinst docfx -y } build_script: - msbuild src/SampleClass1/SampleClass1.sln after_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { docfx docfx.json git config --global credential.helper store Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" git config --global user.email $env:op_build_user_email git config --global user.name $env:op_build_user git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q Copy-Item origin_site/.git _site -recurse CD _site git add -A 2>&1 git commit -m "CI Updates" -q git push origin gh-pages -q }
Use APPVEYOR_REPO_BRANCH instead of master branch
Use APPVEYOR_REPO_BRANCH instead of master branch
YAML
mit
ansyral/docfx-seed,docascode/docfx-seed
yaml
## Code Before: environment: op_build_user: "OpenPublishBuild" op_build_user_email: "vscopbld@microsoft.com" access_token: secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3 before_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { git checkout master -q cinst docfx -y } build_script: - msbuild src/SampleClass1/SampleClass1.sln after_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { docfx docfx.json git config --global credential.helper store Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" git config --global user.email $env:op_build_user_email git config --global user.name $env:op_build_user git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q Copy-Item origin_site/.git _site -recurse CD _site git add -A 2>&1 git commit -m "CI Updates" -q git push origin gh-pages -q } ## Instruction: Use APPVEYOR_REPO_BRANCH instead of master branch ## Code After: environment: op_build_user: "OpenPublishBuild" op_build_user_email: "vscopbld@microsoft.com" access_token: secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3 before_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { git checkout $env:APPVEYOR_REPO_BRANCH -q cinst docfx -y } build_script: - msbuild src/SampleClass1/SampleClass1.sln after_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { docfx docfx.json git config --global credential.helper store Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" git config --global user.email $env:op_build_user_email git config --global user.name $env:op_build_user git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q Copy-Item origin_site/.git _site -recurse CD _site git add -A 2>&1 git commit -m "CI Updates" -q git push origin gh-pages -q }
environment: op_build_user: "OpenPublishBuild" op_build_user_email: "vscopbld@microsoft.com" access_token: secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3 before_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { - git checkout master -q + git checkout $env:APPVEYOR_REPO_BRANCH -q cinst docfx -y } build_script: - msbuild src/SampleClass1/SampleClass1.sln after_build: - ps: | if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE) { docfx docfx.json git config --global credential.helper store Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" git config --global user.email $env:op_build_user_email git config --global user.name $env:op_build_user git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q Copy-Item origin_site/.git _site -recurse CD _site git add -A 2>&1 git commit -m "CI Updates" -q git push origin gh-pages -q }
2
0.058824
1
1
ae9c96358478bab59fbc82929160c709d42f702c
lib/dining-table/columns/column.rb
lib/dining-table/columns/column.rb
module DiningTable module Columns class Column attr_accessor :name, :table, :options, :block def initialize( table, name, options = {}, &block) self.table = table self.name = name self.options = options self.block = block end def value(object) if block block.call(object, self) else object.send(name).try(:to_s) if object.respond_to?(name) end end def header @header ||= begin label = determine_label(:header) return label if label object_class = table.collection.first.try(:class) object_class.human_attribute_name( name) if object_class end end def footer @footer ||= determine_label(:footer) end def options_for(identifier) options[ identifier ] || { } end private def determine_label( name ) if options[ name ] label_ = options[ name ] label_ = label_.call if label_.respond_to?(:call) return label_.try(:to_s) end end end end end
module DiningTable module Columns class Column attr_accessor :name, :table, :options, :block def initialize( table, name, options = {}, &block) self.table = table self.name = name self.options = options self.block = block end def value(object) if block block.call(object, self) else object.send(name).try(:to_s) if object.respond_to?(name) end end def header @header ||= begin label = determine_label(:header) return label if label object_class = table.collection.first.try(:class) object_class.human_attribute_name( name ) if object_class && object_class.respond_to?( :human_attribute_name ) end end def footer @footer ||= determine_label(:footer) end def options_for(identifier) options[ identifier ] || { } end private def determine_label( name ) if options[ name ] label_ = options[ name ] label_ = label_.call if label_.respond_to?(:call) return label_.try(:to_s) end end end end end
Remove dependency on Rails' human_attribute_name (check if class responds to it)
Remove dependency on Rails' human_attribute_name (check if class responds to it)
Ruby
mit
mvdamme/dining-table
ruby
## Code Before: module DiningTable module Columns class Column attr_accessor :name, :table, :options, :block def initialize( table, name, options = {}, &block) self.table = table self.name = name self.options = options self.block = block end def value(object) if block block.call(object, self) else object.send(name).try(:to_s) if object.respond_to?(name) end end def header @header ||= begin label = determine_label(:header) return label if label object_class = table.collection.first.try(:class) object_class.human_attribute_name( name) if object_class end end def footer @footer ||= determine_label(:footer) end def options_for(identifier) options[ identifier ] || { } end private def determine_label( name ) if options[ name ] label_ = options[ name ] label_ = label_.call if label_.respond_to?(:call) return label_.try(:to_s) end end end end end ## Instruction: Remove dependency on Rails' human_attribute_name (check if class responds to it) ## Code After: module DiningTable module Columns class Column attr_accessor :name, :table, :options, :block def initialize( table, name, options = {}, &block) self.table = table self.name = name self.options = options self.block = block end def value(object) if block block.call(object, self) else object.send(name).try(:to_s) if object.respond_to?(name) end end def header @header ||= begin label = determine_label(:header) return label if label object_class = table.collection.first.try(:class) object_class.human_attribute_name( name ) if object_class && object_class.respond_to?( :human_attribute_name ) end end def footer @footer ||= determine_label(:footer) end def options_for(identifier) options[ identifier ] || { } end private def determine_label( name ) if options[ name ] label_ = options[ name ] label_ = label_.call if label_.respond_to?(:call) return label_.try(:to_s) end end end end end
module DiningTable module Columns class Column attr_accessor :name, :table, :options, :block def initialize( table, name, options = {}, &block) self.table = table self.name = name self.options = options self.block = block end def value(object) if block block.call(object, self) else object.send(name).try(:to_s) if object.respond_to?(name) end end def header @header ||= begin label = determine_label(:header) return label if label object_class = table.collection.first.try(:class) - object_class.human_attribute_name( name) if object_class + object_class.human_attribute_name( name ) if object_class && object_class.respond_to?( :human_attribute_name ) end end def footer @footer ||= determine_label(:footer) end def options_for(identifier) options[ identifier ] || { } end private def determine_label( name ) if options[ name ] label_ = options[ name ] label_ = label_.call if label_.respond_to?(:call) return label_.try(:to_s) end end end end end
2
0.036364
1
1
1c69d70fbf4173bb0d458f4625bd328e5032afda
README.md
README.md
Probability Distribution ======================== [![Build Status](https://api.travis-ci.org/repositories/mcordingley/ProbabilityDistribution.svg)](https://travis-ci.org/mcordingley/ProbabilityDistribution) In-progress split of the probability distributions from PHPStats into their own project. ## Help This Project! The biggest blocker to getting good statistical software working in PHP is the lack of the special mathematical functions in PHP. We need things like `gamma`, `digamma`, `beta`, et al to be able to implement a number of the distributions here. Commonly-used distributions, like the F distribution and Student's t distribution absolutely require these functions to be able to work. The old PHPStats library does have implementations of these, but I cannot account for their accuracy. What this project needs to succeed are new implementations in a separate PHP package that are of high quality. Making this happen is beyond my ability. Ideally, they would be implemented in the global namespace ---as if PHP had them natively--- and their definitions bracketed by `if (!function_exists('foo')) {` guard clauses, so the library is effectively a shim for functions that we wish PHP had. It'd also be nice to have an RFC submitted to PHP internals to make the functions eventually _be_ native.
Probability Distribution ======================== [![Build Status](https://api.travis-ci.org/repositories/mcordingley/ProbabilityDistribution.svg)](https://travis-ci.org/mcordingley/ProbabilityDistribution) In-progress split of the probability distributions from PHPStats into their own project. ## Installation Add this to your composer.json and update: "mcordingley/probability-distribution": "dev-master" This will eventually switch over to using semantic versioning, but it makes little sense to do so while this is in early development. ## Help This Project! The biggest blocker to getting good statistical software working in PHP is the lack of the special mathematical functions in PHP. We need things like `gamma`, `digamma`, `beta`, et al to be able to implement a number of the distributions here. Commonly-used distributions, like the F distribution and Student's t distribution absolutely require these functions to be able to work. The old PHPStats library does have implementations of these, but I cannot account for their accuracy. What this project needs to succeed are new implementations in a separate PHP package that are of high quality. Making this happen is beyond my ability. I have set up [ExtendedMath](https://github.com/mcordingley/ExtendedMath) as a place where these functions can be gathered, but cannot fill it myself.
Update docs with install information and a reference to the project on which this one depends.
Update docs with install information and a reference to the project on which this one depends.
Markdown
mit
flaxandteal/ProbabilityDistribution
markdown
## Code Before: Probability Distribution ======================== [![Build Status](https://api.travis-ci.org/repositories/mcordingley/ProbabilityDistribution.svg)](https://travis-ci.org/mcordingley/ProbabilityDistribution) In-progress split of the probability distributions from PHPStats into their own project. ## Help This Project! The biggest blocker to getting good statistical software working in PHP is the lack of the special mathematical functions in PHP. We need things like `gamma`, `digamma`, `beta`, et al to be able to implement a number of the distributions here. Commonly-used distributions, like the F distribution and Student's t distribution absolutely require these functions to be able to work. The old PHPStats library does have implementations of these, but I cannot account for their accuracy. What this project needs to succeed are new implementations in a separate PHP package that are of high quality. Making this happen is beyond my ability. Ideally, they would be implemented in the global namespace ---as if PHP had them natively--- and their definitions bracketed by `if (!function_exists('foo')) {` guard clauses, so the library is effectively a shim for functions that we wish PHP had. It'd also be nice to have an RFC submitted to PHP internals to make the functions eventually _be_ native. ## Instruction: Update docs with install information and a reference to the project on which this one depends. ## Code After: Probability Distribution ======================== [![Build Status](https://api.travis-ci.org/repositories/mcordingley/ProbabilityDistribution.svg)](https://travis-ci.org/mcordingley/ProbabilityDistribution) In-progress split of the probability distributions from PHPStats into their own project. ## Installation Add this to your composer.json and update: "mcordingley/probability-distribution": "dev-master" This will eventually switch over to using semantic versioning, but it makes little sense to do so while this is in early development. ## Help This Project! The biggest blocker to getting good statistical software working in PHP is the lack of the special mathematical functions in PHP. We need things like `gamma`, `digamma`, `beta`, et al to be able to implement a number of the distributions here. Commonly-used distributions, like the F distribution and Student's t distribution absolutely require these functions to be able to work. The old PHPStats library does have implementations of these, but I cannot account for their accuracy. What this project needs to succeed are new implementations in a separate PHP package that are of high quality. Making this happen is beyond my ability. I have set up [ExtendedMath](https://github.com/mcordingley/ExtendedMath) as a place where these functions can be gathered, but cannot fill it myself.
Probability Distribution ======================== [![Build Status](https://api.travis-ci.org/repositories/mcordingley/ProbabilityDistribution.svg)](https://travis-ci.org/mcordingley/ProbabilityDistribution) In-progress split of the probability distributions from PHPStats into their own project. + + ## Installation + + Add this to your composer.json and update: + + "mcordingley/probability-distribution": "dev-master" + + This will eventually switch over to using semantic versioning, + but it makes little sense to do so while this is in early + development. ## Help This Project! The biggest blocker to getting good statistical software working in PHP is the lack of the special mathematical functions in PHP. We need things like `gamma`, `digamma`, `beta`, et al to be able to implement a number of the distributions here. Commonly-used distributions, like the F distribution and Student's t distribution absolutely require these functions to be able to work. The old PHPStats library does have implementations of these, but I cannot account for their accuracy. What this project needs to succeed are new implementations in a separate PHP package that are of high quality. Making this - happen is beyond my ability. + happen is beyond my ability. I have set up ? ++++++++++++++ + [ExtendedMath](https://github.com/mcordingley/ExtendedMath) as a place where + these functions can be gathered, but cannot fill it myself. - - Ideally, they would be implemented in the global namespace ---as if PHP had them - natively--- and their definitions bracketed by `if (!function_exists('foo')) {` - guard clauses, so the library is effectively a shim for functions that we wish - PHP had. It'd also be nice to have an RFC submitted to PHP internals to make the - functions eventually _be_ native.
20
0.769231
13
7
57414722175a57e0709a09afc1dc835d0109bf41
run-tests-travis.sh
run-tests-travis.sh
(cd spec/testapp && coffee app.coffee) & (cd spec/testapp && NODE_ENV=production coffee app.coffee) & sleep 1 node_modules/.bin/jasmine-node --coffee spec/
(cd spec/testapp && coffee app.coffee) & (cd spec/testapp && NODE_ENV=production coffee app.coffee) & sleep 1 node_modules/.bin/jasmine-node --coffee spec/ echo "Also review the visual tests" echo " cd spec/testapp/" echo " coffee app.coffee" echo "and open http://localhost:7000/"
Document visual tests in test runner
Document visual tests in test runner
Shell
mit
epeli/piler,epeli/piler,epeli/piler
shell
## Code Before: (cd spec/testapp && coffee app.coffee) & (cd spec/testapp && NODE_ENV=production coffee app.coffee) & sleep 1 node_modules/.bin/jasmine-node --coffee spec/ ## Instruction: Document visual tests in test runner ## Code After: (cd spec/testapp && coffee app.coffee) & (cd spec/testapp && NODE_ENV=production coffee app.coffee) & sleep 1 node_modules/.bin/jasmine-node --coffee spec/ echo "Also review the visual tests" echo " cd spec/testapp/" echo " coffee app.coffee" echo "and open http://localhost:7000/"
(cd spec/testapp && coffee app.coffee) & (cd spec/testapp && NODE_ENV=production coffee app.coffee) & sleep 1 node_modules/.bin/jasmine-node --coffee spec/ + + echo "Also review the visual tests" + echo " cd spec/testapp/" + echo " coffee app.coffee" + echo "and open http://localhost:7000/"
5
0.714286
5
0
185c90d862bccb2061f00bf2f4e6858cbb0eb660
index.js
index.js
'use strict' var express = require('express'), app = express(), bodyParser = require('body-parser'), config = require('./libs/config'), email = require('./libs/email') app.use(bodyParser.json()) app.post('/subscribe', email.subscribe) app.listen(config.port)
'use strict' var express = require('express'), app = express(), bodyParser = require('body-parser'), config = require('./libs/config'), email = require('./libs/email') app.use(bodyParser.json()) app.post('/subscribe', email.subscribe) app.listen(process.env.PORT || config.port)
Allow PORT to be set from cli
Allow PORT to be set from cli
JavaScript
mit
MakerFaireOrlando/mfo-server
javascript
## Code Before: 'use strict' var express = require('express'), app = express(), bodyParser = require('body-parser'), config = require('./libs/config'), email = require('./libs/email') app.use(bodyParser.json()) app.post('/subscribe', email.subscribe) app.listen(config.port) ## Instruction: Allow PORT to be set from cli ## Code After: 'use strict' var express = require('express'), app = express(), bodyParser = require('body-parser'), config = require('./libs/config'), email = require('./libs/email') app.use(bodyParser.json()) app.post('/subscribe', email.subscribe) app.listen(process.env.PORT || config.port)
'use strict' var express = require('express'), app = express(), bodyParser = require('body-parser'), config = require('./libs/config'), email = require('./libs/email') app.use(bodyParser.json()) app.post('/subscribe', email.subscribe) - app.listen(config.port) + app.listen(process.env.PORT || config.port)
2
0.166667
1
1
82fe04f9e478daefb564dad88387f6f1642f66e5
plugins/chruby/README.md
plugins/chruby/README.md
This plugin loads the [chruby](https://github.com/postmodern/chruby). Supports brew and manual installation of chruby. To use it, add `chruby` to the plugins array in your zshrc file: ```zsh plugins=(... chruby) ``` ## Usage If you'd prefer to specify an explicit path to load chruby from you can set variables like so: ``` zstyle :omz:plugins:chruby path /local/path/to/chruby.sh zstyle :omz:plugins:chruby auto /local/path/to/auto.sh ```
This plugin loads [chruby](https://github.com/postmodern/chruby), a tool that changes the current Ruby version, and completion and a prompt function to display the Ruby version. Supports brew and manual installation of chruby. To use it, add `chruby` to the plugins array in your zshrc file: ```zsh plugins=(... chruby) ``` ## Usage If you'd prefer to specify an explicit path to load chruby from you can set variables like so: ``` zstyle :omz:plugins:chruby path /local/path/to/chruby.sh zstyle :omz:plugins:chruby auto /local/path/to/auto.sh ```
Reword and add extra information
Reword and add extra information
Markdown
mit
monological/oh-my-zsh,monological/oh-my-zsh,monological/oh-my-zsh,monological/oh-my-zsh
markdown
## Code Before: This plugin loads the [chruby](https://github.com/postmodern/chruby). Supports brew and manual installation of chruby. To use it, add `chruby` to the plugins array in your zshrc file: ```zsh plugins=(... chruby) ``` ## Usage If you'd prefer to specify an explicit path to load chruby from you can set variables like so: ``` zstyle :omz:plugins:chruby path /local/path/to/chruby.sh zstyle :omz:plugins:chruby auto /local/path/to/auto.sh ``` ## Instruction: Reword and add extra information ## Code After: This plugin loads [chruby](https://github.com/postmodern/chruby), a tool that changes the current Ruby version, and completion and a prompt function to display the Ruby version. Supports brew and manual installation of chruby. To use it, add `chruby` to the plugins array in your zshrc file: ```zsh plugins=(... chruby) ``` ## Usage If you'd prefer to specify an explicit path to load chruby from you can set variables like so: ``` zstyle :omz:plugins:chruby path /local/path/to/chruby.sh zstyle :omz:plugins:chruby auto /local/path/to/auto.sh ```
- This plugin loads the [chruby](https://github.com/postmodern/chruby). Supports brew and manual installation of chruby. + This plugin loads [chruby](https://github.com/postmodern/chruby), a tool that changes the + current Ruby version, and completion and a prompt function to display the Ruby version. + Supports brew and manual installation of chruby. To use it, add `chruby` to the plugins array in your zshrc file: - ```zsh plugins=(... chruby) ``` ## Usage If you'd prefer to specify an explicit path to load chruby from you can set variables like so: ``` zstyle :omz:plugins:chruby path /local/path/to/chruby.sh zstyle :omz:plugins:chruby auto /local/path/to/auto.sh ```
5
0.277778
3
2
af0a7eb97b629ff5f2b163ffe4058f48f2a4ae6e
build-windows.cmd
build-windows.cmd
electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output
electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output --version-string.ProductName=Squiffy --version-string.FileDescription=Squiffy --version-string.LegalCopyright="Copyright (c) 2015 Alex Warren" --version-string.OriginalFilename=Squiffy.exe --version-string.FileVersion=3.9.0 --version-string.ProductVersion=3.9.0 --version-string.InternalName=Squiffy --version-string.CompanyName="Alex Warren"
Set Windows resource version info
Set Windows resource version info
Batchfile
mit
textadventures/squiffy-editor,textadventures/squiffy-editor
batchfile
## Code Before: electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output ## Instruction: Set Windows resource version info ## Code After: electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output --version-string.ProductName=Squiffy --version-string.FileDescription=Squiffy --version-string.LegalCopyright="Copyright (c) 2015 Alex Warren" --version-string.OriginalFilename=Squiffy.exe --version-string.FileVersion=3.9.0 --version-string.ProductVersion=3.9.0 --version-string.InternalName=Squiffy --version-string.CompanyName="Alex Warren"
- electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output + electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output --version-string.ProductName=Squiffy --version-string.FileDescription=Squiffy --version-string.LegalCopyright="Copyright (c) 2015 Alex Warren" --version-string.OriginalFilename=Squiffy.exe --version-string.FileVersion=3.9.0 --version-string.ProductVersion=3.9.0 --version-string.InternalName=Squiffy --version-string.CompanyName="Alex Warren"
2
2
1
1
f1761faea9cc9e77f4035a1fc9569fde6f816109
README.md
README.md
Invader3DViewer ==== A 3D viewer for INVADER, writted in Javascript. ## Description [INVADER](http://artsat.jp/en/project/invader), a nano-satellite developed by [ARTSAT project](http://artsat.jp), can be viewed on your browser. You can zoom in/out and rotate the satellite. ## Demo http://mokk.net/invader3d/ ## Screen shot <img src="https://raw.githubusercontent.com/motokimura/Invader3DViewer/master/screen_capture.png" /> ## Requirement A browser that supports WebGL (Google Chrome is recommended). ## Licence This software is released under the MIT License, see LICENSE.txt. ## Author [Motoki Kimura](https://github.com/motokimura)
Invader3DViewer ==== A 3D viewer for INVADER, writted in Javascript. ## Description [INVADER](http://artsat.jp/en/project/invader), a nano-satellite developed by [ARTSAT project](http://artsat.jp), can be viewed on your browser. You can zoom in/out and rotate the satellite. ## Demo https://motokimura.github.io/invader-3d-viewer/ ## Screen shot <img src="https://raw.githubusercontent.com/motokimura/Invader3DViewer/master/screen_capture.png" /> ## Requirement A browser that supports WebGL (Google Chrome is recommended). ## Licence This software is released under the MIT License, see LICENSE.txt. ## Author [Motoki Kimura](https://github.com/motokimura)
Replace link to the demo with github.io
Replace link to the demo with github.io
Markdown
mit
motokimura/Invader3DViewer,motokimura/Invader3DViewer
markdown
## Code Before: Invader3DViewer ==== A 3D viewer for INVADER, writted in Javascript. ## Description [INVADER](http://artsat.jp/en/project/invader), a nano-satellite developed by [ARTSAT project](http://artsat.jp), can be viewed on your browser. You can zoom in/out and rotate the satellite. ## Demo http://mokk.net/invader3d/ ## Screen shot <img src="https://raw.githubusercontent.com/motokimura/Invader3DViewer/master/screen_capture.png" /> ## Requirement A browser that supports WebGL (Google Chrome is recommended). ## Licence This software is released under the MIT License, see LICENSE.txt. ## Author [Motoki Kimura](https://github.com/motokimura) ## Instruction: Replace link to the demo with github.io ## Code After: Invader3DViewer ==== A 3D viewer for INVADER, writted in Javascript. ## Description [INVADER](http://artsat.jp/en/project/invader), a nano-satellite developed by [ARTSAT project](http://artsat.jp), can be viewed on your browser. You can zoom in/out and rotate the satellite. ## Demo https://motokimura.github.io/invader-3d-viewer/ ## Screen shot <img src="https://raw.githubusercontent.com/motokimura/Invader3DViewer/master/screen_capture.png" /> ## Requirement A browser that supports WebGL (Google Chrome is recommended). ## Licence This software is released under the MIT License, see LICENSE.txt. ## Author [Motoki Kimura](https://github.com/motokimura)
Invader3DViewer ==== A 3D viewer for INVADER, writted in Javascript. ## Description [INVADER](http://artsat.jp/en/project/invader), a nano-satellite developed by [ARTSAT project](http://artsat.jp), can be viewed on your browser. You can zoom in/out and rotate the satellite. ## Demo - http://mokk.net/invader3d/ + https://motokimura.github.io/invader-3d-viewer/ ## Screen shot <img src="https://raw.githubusercontent.com/motokimura/Invader3DViewer/master/screen_capture.png" /> ## Requirement A browser that supports WebGL (Google Chrome is recommended). ## Licence This software is released under the MIT License, see LICENSE.txt. ## Author [Motoki Kimura](https://github.com/motokimura)
2
0.071429
1
1
36f59422fdf9d7dc76c31b096c3b7f909762109a
Lib/compiler/syntax.py
Lib/compiler/syntax.py
from compiler import ast, walk def check(tree, multi=None): v = SyntaxErrorChecker(multi) walk(tree, v) return v.errors class SyntaxErrorChecker: """A visitor to find syntax errors in the AST.""" def __init__(self, multi=None): """Create new visitor object. If optional argument multi is not None, then print messages for each error rather than raising a SyntaxError for the first. """ self.multi = multi self.errors = 0 def error(self, node, msg): self.errors = self.errors + 1 if self.multi is not None: print "%s:%s: %s" % (node.filename, node.lineno, msg) else: raise SyntaxError, "%s (%s:%s)" % (msg, node.filename, node.lineno) def visitAssign(self, node): # the transformer module handles many of these for target in node.nodes: pass ## if isinstance(target, ast.AssList): ## if target.lineno is None: ## target.lineno = node.lineno ## self.error(target, "can't assign to list comprehension")
from compiler import ast, walk def check(tree, multi=None): v = SyntaxErrorChecker(multi) walk(tree, v) return v.errors class SyntaxErrorChecker: """A visitor to find syntax errors in the AST.""" def __init__(self, multi=None): """Create new visitor object. If optional argument multi is not None, then print messages for each error rather than raising a SyntaxError for the first. """ self.multi = multi self.errors = 0 def error(self, node, msg): self.errors = self.errors + 1 if self.multi is not None: print "%s:%s: %s" % (node.filename, node.lineno, msg) else: raise SyntaxError, "%s (%s:%s)" % (msg, node.filename, node.lineno) def visitAssign(self, node): # the transformer module handles many of these pass ## for target in node.nodes: ## if isinstance(target, ast.AssList): ## if target.lineno is None: ## target.lineno = node.lineno ## self.error(target, "can't assign to list comprehension")
Stop looping to do nothing, just pass.
Stop looping to do nothing, just pass.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
python
## Code Before: from compiler import ast, walk def check(tree, multi=None): v = SyntaxErrorChecker(multi) walk(tree, v) return v.errors class SyntaxErrorChecker: """A visitor to find syntax errors in the AST.""" def __init__(self, multi=None): """Create new visitor object. If optional argument multi is not None, then print messages for each error rather than raising a SyntaxError for the first. """ self.multi = multi self.errors = 0 def error(self, node, msg): self.errors = self.errors + 1 if self.multi is not None: print "%s:%s: %s" % (node.filename, node.lineno, msg) else: raise SyntaxError, "%s (%s:%s)" % (msg, node.filename, node.lineno) def visitAssign(self, node): # the transformer module handles many of these for target in node.nodes: pass ## if isinstance(target, ast.AssList): ## if target.lineno is None: ## target.lineno = node.lineno ## self.error(target, "can't assign to list comprehension") ## Instruction: Stop looping to do nothing, just pass. ## Code After: from compiler import ast, walk def check(tree, multi=None): v = SyntaxErrorChecker(multi) walk(tree, v) return v.errors class SyntaxErrorChecker: """A visitor to find syntax errors in the AST.""" def __init__(self, multi=None): """Create new visitor object. If optional argument multi is not None, then print messages for each error rather than raising a SyntaxError for the first. """ self.multi = multi self.errors = 0 def error(self, node, msg): self.errors = self.errors + 1 if self.multi is not None: print "%s:%s: %s" % (node.filename, node.lineno, msg) else: raise SyntaxError, "%s (%s:%s)" % (msg, node.filename, node.lineno) def visitAssign(self, node): # the transformer module handles many of these pass ## for target in node.nodes: ## if isinstance(target, ast.AssList): ## if target.lineno is None: ## target.lineno = node.lineno ## self.error(target, "can't assign to list comprehension")
from compiler import ast, walk def check(tree, multi=None): v = SyntaxErrorChecker(multi) walk(tree, v) return v.errors class SyntaxErrorChecker: """A visitor to find syntax errors in the AST.""" def __init__(self, multi=None): """Create new visitor object. If optional argument multi is not None, then print messages for each error rather than raising a SyntaxError for the first. """ self.multi = multi self.errors = 0 def error(self, node, msg): self.errors = self.errors + 1 if self.multi is not None: print "%s:%s: %s" % (node.filename, node.lineno, msg) else: raise SyntaxError, "%s (%s:%s)" % (msg, node.filename, node.lineno) def visitAssign(self, node): # the transformer module handles many of these + pass - for target in node.nodes: + ## for target in node.nodes: ? ++ - pass ## if isinstance(target, ast.AssList): ## if target.lineno is None: ## target.lineno = node.lineno ## self.error(target, "can't assign to list comprehension")
4
0.111111
2
2
54f844a36334cd332f16021540f05438e37f3a8c
util/travis/linux-cibuild.sh
util/travis/linux-cibuild.sh
export SOURCE_DIRECTORY=`pwd` mkdir -p _build # define the build name if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then export BUILD_NAME=${TRAVIS_PULL_REQUEST} elif [[ -n "${TRAVIS_COMMIT_RANGE}" ]]; then export BUILD_NAME=${TRAVIS_COMMIT_RANGE} else export BUILD_NAME=${TRAVIS_COMMIT} fi # disable OpenMP warnings for clang if [ "$(echo ${CXX} | cut -c1-5)" = "clang" ]; then export CXXFLAGS="${CXXFLAGS} -Qunused-arguments -DSEQAN_IGNORE_MISSING_OPENMP=1" fi ctest -V -S util/travis/linux-cibuild.cmake # we indicate build failures if ctest experienced any errors if [ -f ${SOURCE_DIRECTORY}/failed ]; then exit -1 fi FAILED_TEST=$(find _build -name "Test.xml" -type f | xargs grep "<Test Status=\"failed\">" -c) if [ "${FAILED_TEST}" -gt "0" ]; then exit -1 fi # it seems like everything worked exit 0
export SOURCE_DIRECTORY=`pwd` mkdir -p _build # define the build name if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then export BUILD_NAME=${TRAVIS_PULL_REQUEST} elif [[ -n "${TRAVIS_COMMIT_RANGE}" ]]; then export BUILD_NAME=${TRAVIS_COMMIT_RANGE} else export BUILD_NAME=${TRAVIS_COMMIT} fi # disable OpenMP warnings for clang if [ "$(echo ${CXX} | cut -c1-5)" = "clang" ]; then export CXXFLAGS="${CXXFLAGS} -Qunused-arguments -DSEQAN_IGNORE_MISSING_OPENMP=1" fi # Switch version check default to OFF to prevent checks during app tests CXXFLAGS="${CXXFLAGS} -DSEQAN_VERSION_CHECK_OPT_IN=YES" ctest -V -S util/travis/linux-cibuild.cmake # we indicate build failures if ctest experienced any errors if [ -f ${SOURCE_DIRECTORY}/failed ]; then exit -1 fi FAILED_TEST=$(find _build -name "Test.xml" -type f | xargs grep "<Test Status=\"failed\">" -c) if [ "${FAILED_TEST}" -gt "0" ]; then exit -1 fi # it seems like everything worked exit 0
Switch off version check for apps in travis builds.
[INTERNAL] Switch off version check for apps in travis builds.
Shell
bsd-3-clause
xenigmax/seqan,xenigmax/seqan,xenigmax/seqan,xenigmax/seqan,xenigmax/seqan,bestrauc/seqan,bestrauc/seqan,xenigmax/seqan,bestrauc/seqan,xenigmax/seqan,bestrauc/seqan,bestrauc/seqan,bestrauc/seqan,bestrauc/seqan,xenigmax/seqan,bestrauc/seqan
shell
## Code Before: export SOURCE_DIRECTORY=`pwd` mkdir -p _build # define the build name if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then export BUILD_NAME=${TRAVIS_PULL_REQUEST} elif [[ -n "${TRAVIS_COMMIT_RANGE}" ]]; then export BUILD_NAME=${TRAVIS_COMMIT_RANGE} else export BUILD_NAME=${TRAVIS_COMMIT} fi # disable OpenMP warnings for clang if [ "$(echo ${CXX} | cut -c1-5)" = "clang" ]; then export CXXFLAGS="${CXXFLAGS} -Qunused-arguments -DSEQAN_IGNORE_MISSING_OPENMP=1" fi ctest -V -S util/travis/linux-cibuild.cmake # we indicate build failures if ctest experienced any errors if [ -f ${SOURCE_DIRECTORY}/failed ]; then exit -1 fi FAILED_TEST=$(find _build -name "Test.xml" -type f | xargs grep "<Test Status=\"failed\">" -c) if [ "${FAILED_TEST}" -gt "0" ]; then exit -1 fi # it seems like everything worked exit 0 ## Instruction: [INTERNAL] Switch off version check for apps in travis builds. ## Code After: export SOURCE_DIRECTORY=`pwd` mkdir -p _build # define the build name if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then export BUILD_NAME=${TRAVIS_PULL_REQUEST} elif [[ -n "${TRAVIS_COMMIT_RANGE}" ]]; then export BUILD_NAME=${TRAVIS_COMMIT_RANGE} else export BUILD_NAME=${TRAVIS_COMMIT} fi # disable OpenMP warnings for clang if [ "$(echo ${CXX} | cut -c1-5)" = "clang" ]; then export CXXFLAGS="${CXXFLAGS} -Qunused-arguments -DSEQAN_IGNORE_MISSING_OPENMP=1" fi # Switch version check default to OFF to prevent checks during app tests CXXFLAGS="${CXXFLAGS} -DSEQAN_VERSION_CHECK_OPT_IN=YES" ctest -V -S util/travis/linux-cibuild.cmake # we indicate build failures if ctest experienced any errors if [ -f ${SOURCE_DIRECTORY}/failed ]; then exit -1 fi FAILED_TEST=$(find _build -name "Test.xml" -type f | xargs grep "<Test Status=\"failed\">" -c) if [ "${FAILED_TEST}" -gt "0" ]; then exit -1 fi # it seems like everything worked exit 0
export SOURCE_DIRECTORY=`pwd` mkdir -p _build # define the build name if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then export BUILD_NAME=${TRAVIS_PULL_REQUEST} elif [[ -n "${TRAVIS_COMMIT_RANGE}" ]]; then export BUILD_NAME=${TRAVIS_COMMIT_RANGE} else export BUILD_NAME=${TRAVIS_COMMIT} fi # disable OpenMP warnings for clang if [ "$(echo ${CXX} | cut -c1-5)" = "clang" ]; then export CXXFLAGS="${CXXFLAGS} -Qunused-arguments -DSEQAN_IGNORE_MISSING_OPENMP=1" fi + # Switch version check default to OFF to prevent checks during app tests + CXXFLAGS="${CXXFLAGS} -DSEQAN_VERSION_CHECK_OPT_IN=YES" + ctest -V -S util/travis/linux-cibuild.cmake # we indicate build failures if ctest experienced any errors if [ -f ${SOURCE_DIRECTORY}/failed ]; then exit -1 fi FAILED_TEST=$(find _build -name "Test.xml" -type f | xargs grep "<Test Status=\"failed\">" -c) if [ "${FAILED_TEST}" -gt "0" ]; then exit -1 fi # it seems like everything worked exit 0
3
0.09375
3
0
a1c1287c169c2f3a138878f7b7988686b4825791
spec/controllers/user_spec.rb
spec/controllers/user_spec.rb
require 'spec_helper' describe Cyclid::UI::Controllers::User do include Rack::Test::Methods let :user do u = double('user') allow(u).to receive(:username).and_return('test') allow(u).to receive(:email).and_return('test@example.com') allow(u).to receive(:organizations).and_return(['a','b']) return u end let :klass do class_double(Cyclid::UI::Models::User).as_stubbed_const end before :each do allow(klass).to receive(:get).and_return(user) end before :all do clear_cookies end describe '#/user/:username' do it 'requires authentication' do get '/user/test' expect(last_response.status).to eq(302) end it 'return a valid user' do set_cookie 'cyclid.token=token' get '/user/test', {}, {'rack.session' => {'username' => 'test'}} expect(last_response.status).to eq(200) end end end
require 'spec_helper' describe Cyclid::UI::Controllers::User do include Rack::Test::Methods let :user do u = double('user') allow(u).to receive(:username).and_return('test') allow(u).to receive(:email).and_return('test@example.com') allow(u).to receive(:organizations).and_return(['a','b']) return u end let :klass do class_double(Cyclid::UI::Models::User).as_stubbed_const end before :each do allow(klass).to receive(:get).and_return(user) cfg = instance_double(Cyclid::UI::Config) allow(cfg).to receive_message_chain('api.inspect').and_return('mocked object') allow(cfg).to receive_message_chain('api.host').and_return('example.com') allow(cfg).to receive_message_chain('api.port').and_return(9999) allow(cfg).to receive_message_chain('memcached').and_return('example.com:4242') allow(Cyclid).to receive(:config).and_return(cfg) end before :all do clear_cookies end describe '#get /user/:username' do it 'requires authentication' do get '/user/test' expect(last_response.status).to eq(302) expect(last_response['Location']).to eq 'http://example.org/login' end it 'return a valid user' do set_cookie 'cyclid.token=token' get '/user/test', {}, {'rack.session' => {'username' => 'test'}} expect(last_response.status).to eq(200) end end end
Make the redirect test slightly more robust
Make the redirect test slightly more robust
Ruby
apache-2.0
Cyclid/Cyclid-UI,Cyclid/Cyclid-UI,Cyclid/Cyclid-UI
ruby
## Code Before: require 'spec_helper' describe Cyclid::UI::Controllers::User do include Rack::Test::Methods let :user do u = double('user') allow(u).to receive(:username).and_return('test') allow(u).to receive(:email).and_return('test@example.com') allow(u).to receive(:organizations).and_return(['a','b']) return u end let :klass do class_double(Cyclid::UI::Models::User).as_stubbed_const end before :each do allow(klass).to receive(:get).and_return(user) end before :all do clear_cookies end describe '#/user/:username' do it 'requires authentication' do get '/user/test' expect(last_response.status).to eq(302) end it 'return a valid user' do set_cookie 'cyclid.token=token' get '/user/test', {}, {'rack.session' => {'username' => 'test'}} expect(last_response.status).to eq(200) end end end ## Instruction: Make the redirect test slightly more robust ## Code After: require 'spec_helper' describe Cyclid::UI::Controllers::User do include Rack::Test::Methods let :user do u = double('user') allow(u).to receive(:username).and_return('test') allow(u).to receive(:email).and_return('test@example.com') allow(u).to receive(:organizations).and_return(['a','b']) return u end let :klass do class_double(Cyclid::UI::Models::User).as_stubbed_const end before :each do allow(klass).to receive(:get).and_return(user) cfg = instance_double(Cyclid::UI::Config) allow(cfg).to receive_message_chain('api.inspect').and_return('mocked object') allow(cfg).to receive_message_chain('api.host').and_return('example.com') allow(cfg).to receive_message_chain('api.port').and_return(9999) allow(cfg).to receive_message_chain('memcached').and_return('example.com:4242') allow(Cyclid).to receive(:config).and_return(cfg) end before :all do clear_cookies end describe '#get /user/:username' do it 'requires authentication' do get '/user/test' expect(last_response.status).to eq(302) expect(last_response['Location']).to eq 'http://example.org/login' end it 'return a valid user' do set_cookie 'cyclid.token=token' get '/user/test', {}, {'rack.session' => {'username' => 'test'}} expect(last_response.status).to eq(200) end end end
require 'spec_helper' describe Cyclid::UI::Controllers::User do include Rack::Test::Methods let :user do u = double('user') allow(u).to receive(:username).and_return('test') allow(u).to receive(:email).and_return('test@example.com') allow(u).to receive(:organizations).and_return(['a','b']) return u end let :klass do class_double(Cyclid::UI::Models::User).as_stubbed_const end before :each do allow(klass).to receive(:get).and_return(user) + + cfg = instance_double(Cyclid::UI::Config) + allow(cfg).to receive_message_chain('api.inspect').and_return('mocked object') + allow(cfg).to receive_message_chain('api.host').and_return('example.com') + allow(cfg).to receive_message_chain('api.port').and_return(9999) + allow(cfg).to receive_message_chain('memcached').and_return('example.com:4242') + allow(Cyclid).to receive(:config).and_return(cfg) end before :all do clear_cookies end - describe '#/user/:username' do + describe '#get /user/:username' do ? ++++ it 'requires authentication' do get '/user/test' expect(last_response.status).to eq(302) + expect(last_response['Location']).to eq 'http://example.org/login' end it 'return a valid user' do set_cookie 'cyclid.token=token' get '/user/test', {}, {'rack.session' => {'username' => 'test'}} expect(last_response.status).to eq(200) end end end
10
0.25641
9
1
f91b295755aa726e09b83ae3dd85cb4c7f2f2894
.travis.yml
.travis.yml
language: ruby rvm: - 1.8.7 - 1.9.3 - 2.0.0 gemfile: - ci/Gemfile.rails-3.0.x - ci/Gemfile.rails-3.1.x - ci/Gemfile.rails-3.2.x - ci/Gemfile.rails-4.0.x env: - DB=sqlite - DB=mysql before_script: - "mysql -e 'create database myapp_test;' >/dev/null" matrix: allow_failures: - rvm: 1.8.7 gemfile: ci/Gemfile.rails-4.0.x - rvm: 1.9.3 gemfile: ci/Gemfile.rails-4.0.x - rvm: 2.0.0 gemfile: ci/Gemfile.rails-4.0.x
language: ruby rvm: - 1.8.7 - 1.9.3 - 2.0.0 gemfile: - ci/Gemfile.rails-3.0.x - ci/Gemfile.rails-3.1.x - ci/Gemfile.rails-3.2.x - ci/Gemfile.rails-4.0.x env: - DB=sqlite - DB=mysql before_script: - "mysql -e 'create database myapp_test;' >/dev/null" matrix: exclude: - rvm: 1.8.7 gemfile: ci/Gemfile.rails-4.0.x allow_failures: - gemfile: ci/Gemfile.rails-4.0.x
Exclude Ruby 1.8.7 from testing with Rails 4
Travis: Exclude Ruby 1.8.7 from testing with Rails 4
YAML
mit
allenwq/unread,ledermann/unread,kediaco/unread,mikeki/unread,xzhflying/unread
yaml
## Code Before: language: ruby rvm: - 1.8.7 - 1.9.3 - 2.0.0 gemfile: - ci/Gemfile.rails-3.0.x - ci/Gemfile.rails-3.1.x - ci/Gemfile.rails-3.2.x - ci/Gemfile.rails-4.0.x env: - DB=sqlite - DB=mysql before_script: - "mysql -e 'create database myapp_test;' >/dev/null" matrix: allow_failures: - rvm: 1.8.7 gemfile: ci/Gemfile.rails-4.0.x - rvm: 1.9.3 gemfile: ci/Gemfile.rails-4.0.x - rvm: 2.0.0 gemfile: ci/Gemfile.rails-4.0.x ## Instruction: Travis: Exclude Ruby 1.8.7 from testing with Rails 4 ## Code After: language: ruby rvm: - 1.8.7 - 1.9.3 - 2.0.0 gemfile: - ci/Gemfile.rails-3.0.x - ci/Gemfile.rails-3.1.x - ci/Gemfile.rails-3.2.x - ci/Gemfile.rails-4.0.x env: - DB=sqlite - DB=mysql before_script: - "mysql -e 'create database myapp_test;' >/dev/null" matrix: exclude: - rvm: 1.8.7 gemfile: ci/Gemfile.rails-4.0.x allow_failures: - gemfile: ci/Gemfile.rails-4.0.x
language: ruby rvm: - 1.8.7 - 1.9.3 - 2.0.0 gemfile: - ci/Gemfile.rails-3.0.x - ci/Gemfile.rails-3.1.x - ci/Gemfile.rails-3.2.x - ci/Gemfile.rails-4.0.x env: - DB=sqlite - DB=mysql before_script: - "mysql -e 'create database myapp_test;' >/dev/null" matrix: - allow_failures: + exclude: - rvm: 1.8.7 gemfile: ci/Gemfile.rails-4.0.x - - rvm: 1.9.3 + allow_failures: - gemfile: ci/Gemfile.rails-4.0.x ? ^ + - gemfile: ci/Gemfile.rails-4.0.x ? ^ - - rvm: 2.0.0 - gemfile: ci/Gemfile.rails-4.0.x
8
0.347826
3
5
f888ff1c4cd26d39026ebe9ecbfe21252e997f36
Sources/Publisher/main.swift
Sources/Publisher/main.swift
import ArgumentParser import Foundation import Plot import Publish import SplashPublishPlugin struct PersonalWebsite: Website { enum SectionID: String, WebsiteSectionID { case articles case about } struct ItemMetadata: WebsiteItemMetadata { var title: String var date: String? } var url = URL(string: "http://www.ryanjdavies.com")! var name = "Ryan's Website" var description = "A website by Ryan." var language: Language { .english } var imagePath: Path? { "images/logo.png" } } struct Publisher: ParsableCommand { func run() throws { try! PersonalWebsite().publish( withTheme: .custom, plugins: [.splash(withClassPrefix: "classPrefix")] ) } } Publisher.main()
import ArgumentParser import Foundation import Plot import Publish import SplashPublishPlugin struct PersonalWebsite: Website { enum SectionID: String, WebsiteSectionID { case articles case about } struct ItemMetadata: WebsiteItemMetadata { var title: String var date: String? } var url = URL(string: "http://www.ryanjdavies.com")! var name = "Ryan's Website" var description = "A website by Ryan." var language: Language { .english } var imagePath: Path? { "images/logo.png" } } struct Publisher: ParsableCommand { func run() throws { try! PersonalWebsite().publish( withTheme: .custom, plugins: [.splash(withClassPrefix: "")] ) } } Publisher.main()
Remove class prefix from formatted Swift snippets
Remove class prefix from formatted Swift snippets
Swift
mit
iotize/iotize.github.io
swift
## Code Before: import ArgumentParser import Foundation import Plot import Publish import SplashPublishPlugin struct PersonalWebsite: Website { enum SectionID: String, WebsiteSectionID { case articles case about } struct ItemMetadata: WebsiteItemMetadata { var title: String var date: String? } var url = URL(string: "http://www.ryanjdavies.com")! var name = "Ryan's Website" var description = "A website by Ryan." var language: Language { .english } var imagePath: Path? { "images/logo.png" } } struct Publisher: ParsableCommand { func run() throws { try! PersonalWebsite().publish( withTheme: .custom, plugins: [.splash(withClassPrefix: "classPrefix")] ) } } Publisher.main() ## Instruction: Remove class prefix from formatted Swift snippets ## Code After: import ArgumentParser import Foundation import Plot import Publish import SplashPublishPlugin struct PersonalWebsite: Website { enum SectionID: String, WebsiteSectionID { case articles case about } struct ItemMetadata: WebsiteItemMetadata { var title: String var date: String? } var url = URL(string: "http://www.ryanjdavies.com")! var name = "Ryan's Website" var description = "A website by Ryan." var language: Language { .english } var imagePath: Path? { "images/logo.png" } } struct Publisher: ParsableCommand { func run() throws { try! PersonalWebsite().publish( withTheme: .custom, plugins: [.splash(withClassPrefix: "")] ) } } Publisher.main()
import ArgumentParser import Foundation import Plot import Publish import SplashPublishPlugin struct PersonalWebsite: Website { enum SectionID: String, WebsiteSectionID { case articles case about } struct ItemMetadata: WebsiteItemMetadata { var title: String var date: String? } var url = URL(string: "http://www.ryanjdavies.com")! var name = "Ryan's Website" var description = "A website by Ryan." var language: Language { .english } var imagePath: Path? { "images/logo.png" } } struct Publisher: ParsableCommand { func run() throws { try! PersonalWebsite().publish( withTheme: .custom, - plugins: [.splash(withClassPrefix: "classPrefix")] ? ----------- + plugins: [.splash(withClassPrefix: "")] ) } } Publisher.main()
2
0.058824
1
1
29ce5133cc889d44fdebd2e003b66ce53f386c25
app/instagram.js
app/instagram.js
'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = function(fromTime, callback) { instagram.media_search(60.170833, 24.9375, {}, function(err, medias, remaining, limit) { console.log(medias); if (err) { callback(err, null); } else { if (fromTime) { medias = _.filter(medias, function(media) { return media.created_time > fromTime; }); } medias = _.map(medias, function(media) { return { timestamp: parseInt(media.created_time), url: media.images.standard_resolution.url }; }); callback(null, { images: medias }); } }); };
'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = function(fromTime, callback) { instagram.tag_media_recent('järvi', {}, function(err, medias, remaining, limit) { console.log(medias); if (err) { callback(err, null); } else { if (fromTime) { medias = _.filter(medias, function(media) { return media.created_time > fromTime; }); } medias = _.map(medias, function(media) { return { timestamp: parseInt(media.created_time), url: media.images.standard_resolution.url }; }); callback(null, { images: medias }); } }); };
Change nature endpoint to return lakes
Change nature endpoint to return lakes
JavaScript
mit
Zeikko/beating-forehead-vein-backend
javascript
## Code Before: 'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = function(fromTime, callback) { instagram.media_search(60.170833, 24.9375, {}, function(err, medias, remaining, limit) { console.log(medias); if (err) { callback(err, null); } else { if (fromTime) { medias = _.filter(medias, function(media) { return media.created_time > fromTime; }); } medias = _.map(medias, function(media) { return { timestamp: parseInt(media.created_time), url: media.images.standard_resolution.url }; }); callback(null, { images: medias }); } }); }; ## Instruction: Change nature endpoint to return lakes ## Code After: 'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = function(fromTime, callback) { instagram.tag_media_recent('järvi', {}, function(err, medias, remaining, limit) { console.log(medias); if (err) { callback(err, null); } else { if (fromTime) { medias = _.filter(medias, function(media) { return media.created_time > fromTime; }); } medias = _.map(medias, function(media) { return { timestamp: parseInt(media.created_time), url: media.images.standard_resolution.url }; }); callback(null, { images: medias }); } }); };
'use strict'; var _ = require('lodash'); var instagram = require('instagram-node').instagram(); instagram.use({ access_token: '1035958982.117ba06.4abe0116ea094d489f0b6f2218942979', client_id: '117ba064c0dc48249c0804d1b36f9524', client_secret: '01e9ed98b82a4cee91769631dd3122cb' }); exports.nature = function(fromTime, callback) { - instagram.media_search(60.170833, 24.9375, {}, function(err, medias, remaining, limit) { ? ^ ^ ^^^^^^^^^^^^^^^^^^^^^ + instagram.tag_media_recent('järvi', {}, function(err, medias, remaining, limit) { ? ++++ ^ ^^^^^^^^ ^^^ console.log(medias); if (err) { callback(err, null); } else { if (fromTime) { medias = _.filter(medias, function(media) { return media.created_time > fromTime; }); } medias = _.map(medias, function(media) { return { timestamp: parseInt(media.created_time), url: media.images.standard_resolution.url }; }); callback(null, { images: medias }); } }); };
2
0.057143
1
1
d2734992aa55e52e5aed2b14e6ddd09168985cfe
scripts/run-development.sh
scripts/run-development.sh
if [[ -f ./zoomhub.pid ]] ; then kill $(cat zoomhub.pid) fi BASE_URI='http://localhost:8000' \ HASHIDS_SALT='DEVELOPMENT-ONLY' \ stack exec zoomhub & echo $! > zoomhub.pid
if [[ -f ./zoomhub.pid ]] ; then kill $(cat zoomhub.pid) fi # # Find app binary: # zoomhub=$(find .stack-work/dist -type f -name zoomhub | tr -d '\n') # # Self-sign app to avoid constant Mac OS X firewall warnings: # codesign --force --sign zoomhub.net "$zoomhub" BASE_URI='http://localhost:8000' \ HASHIDS_SALT='DEVELOPMENT-ONLY' \ stack exec zoomhub & echo $! > zoomhub.pid
Add attempt at shushing Mac OS X firewall
Add attempt at shushing Mac OS X firewall
Shell
mit
zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub
shell
## Code Before: if [[ -f ./zoomhub.pid ]] ; then kill $(cat zoomhub.pid) fi BASE_URI='http://localhost:8000' \ HASHIDS_SALT='DEVELOPMENT-ONLY' \ stack exec zoomhub & echo $! > zoomhub.pid ## Instruction: Add attempt at shushing Mac OS X firewall ## Code After: if [[ -f ./zoomhub.pid ]] ; then kill $(cat zoomhub.pid) fi # # Find app binary: # zoomhub=$(find .stack-work/dist -type f -name zoomhub | tr -d '\n') # # Self-sign app to avoid constant Mac OS X firewall warnings: # codesign --force --sign zoomhub.net "$zoomhub" BASE_URI='http://localhost:8000' \ HASHIDS_SALT='DEVELOPMENT-ONLY' \ stack exec zoomhub & echo $! > zoomhub.pid
if [[ -f ./zoomhub.pid ]] ; then kill $(cat zoomhub.pid) fi + + + # # Find app binary: + # zoomhub=$(find .stack-work/dist -type f -name zoomhub | tr -d '\n') + + # # Self-sign app to avoid constant Mac OS X firewall warnings: + # codesign --force --sign zoomhub.net "$zoomhub" BASE_URI='http://localhost:8000' \ HASHIDS_SALT='DEVELOPMENT-ONLY' \ stack exec zoomhub & echo $! > zoomhub.pid
7
0.7
7
0