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
7c38630a04da5a319e72f59f364d657f63ea41ea
spec/yelp/client_spec.rb
spec/yelp/client_spec.rb
require 'yelp' describe Yelp::Client do describe 'client initialization' do it 'should create a client with the appropriate keys set' do keys = { consumer_key: 'abc', consumer_secret: 'def', token: 'ghi', token_secret: 'jkl' } client = Yelp::Client.new(keys) Yelp::Client::AUTH_KEYS.each do |key| client.send(key).should eql keys[key] end end end end
require 'yelp' describe Yelp::Client do let(:keys) { Hash[consumer_key: 'abc', consumer_secret: 'def', token: 'ghi', token_secret: 'jkl'] } before do @client = Yelp::Client.new(keys) end describe 'client initialization' do it 'should create a client with the appropriate keys set' do Yelp::Client::AUTH_KEYS.each do |key| @client.send(key).should eql keys[key] end end end end
Refactor client spec to prevent reused code
Refactor client spec to prevent reused code
Ruby
mit
Yelp/yelp-ruby,glarson284/yelp-ruby,pducks32/yelp-ruby,nickuya/yelp-ruby,thatoddmailbox/yelp-ruby
ruby
## Code Before: require 'yelp' describe Yelp::Client do describe 'client initialization' do it 'should create a client with the appropriate keys set' do keys = { consumer_key: 'abc', consumer_secret: 'def', token: 'ghi', token_secret: 'jkl' } client = Yelp::Client.new(keys) Yelp::Client::AUTH_KEYS.each do |key| client.send(key).should eql keys[key] end end end end ## Instruction: Refactor client spec to prevent reused code ## Code After: require 'yelp' describe Yelp::Client do let(:keys) { Hash[consumer_key: 'abc', consumer_secret: 'def', token: 'ghi', token_secret: 'jkl'] } before do @client = Yelp::Client.new(keys) end describe 'client initialization' do it 'should create a client with the appropriate keys set' do Yelp::Client::AUTH_KEYS.each do |key| @client.send(key).should eql keys[key] end end end end
require 'yelp' describe Yelp::Client do + let(:keys) { Hash[consumer_key: 'abc', + consumer_secret: 'def', + token: 'ghi', + token_secret: 'jkl'] } + + before do + @client = Yelp::Client.new(keys) + end + describe 'client initialization' do it 'should create a client with the appropriate keys set' do - keys = { consumer_key: 'abc', - consumer_secret: 'def', - token: 'ghi', - token_secret: 'jkl' } - - client = Yelp::Client.new(keys) Yelp::Client::AUTH_KEYS.each do |key| - client.send(key).should eql keys[key] + @client.send(key).should eql keys[key] ? + end end end end
17
1
10
7
4a071b27cb6b65eb35b7ecacfc5ea4739ad45d7c
app/Popup.js
app/Popup.js
import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' class Popup extends React.Component { constructor() { super() this.state = { accessToken: null } } afterLogOutClick() { this.setState({ accessToken: null }) } componentDidMount() { getToken().then((token) => { this.setState({ accessToken: token }) }) } render() { let feed let popupClass = `${styles.popup}` if (this.state.accessToken) { feed = <FeedContainer accessToken={this.state.accessToken} /> } else { popupClass = `${popupClass} ${styles['popup-tiny']}` } return ( <div className={ popupClass }> <PopupHeader loggedIn={ !!this.state.accessToken } /> <div className={ styles.wrapper }> { feed } <div className={ styles['auth-wrapper'] }> <AuthPanel accessToken={ this.state.accessToken } afterLogOutClick={ () => this.afterLogOutClick() } /> </div> </div> </div> ) } } ReactDOM.render(<Popup />, document.getElementById('app'));
import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' class Popup extends React.Component { constructor() { super() this.state = { accessToken: null } } afterLogOutClick() { this.setState({ accessToken: null }) } async componentDidMount() { const accessToken = await getToken() this.setState({ accessToken }) } render() { let feed let popupClass = `${styles.popup}` if (this.state.accessToken) { feed = <FeedContainer accessToken={this.state.accessToken} /> } else { popupClass = `${popupClass} ${styles['popup-tiny']}` } return ( <div className={ popupClass }> <PopupHeader loggedIn={ !!this.state.accessToken } /> <div className={ styles.wrapper }> { feed } <div className={ styles['auth-wrapper'] }> <AuthPanel accessToken={ this.state.accessToken } afterLogOutClick={ () => this.afterLogOutClick() } /> </div> </div> </div> ) } } ReactDOM.render(<Popup />, document.getElementById('app'));
Use async/await which getting token
Use async/await which getting token
JavaScript
mit
jastkand/vk-notifications,jastkand/vk-notifications
javascript
## Code Before: import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' class Popup extends React.Component { constructor() { super() this.state = { accessToken: null } } afterLogOutClick() { this.setState({ accessToken: null }) } componentDidMount() { getToken().then((token) => { this.setState({ accessToken: token }) }) } render() { let feed let popupClass = `${styles.popup}` if (this.state.accessToken) { feed = <FeedContainer accessToken={this.state.accessToken} /> } else { popupClass = `${popupClass} ${styles['popup-tiny']}` } return ( <div className={ popupClass }> <PopupHeader loggedIn={ !!this.state.accessToken } /> <div className={ styles.wrapper }> { feed } <div className={ styles['auth-wrapper'] }> <AuthPanel accessToken={ this.state.accessToken } afterLogOutClick={ () => this.afterLogOutClick() } /> </div> </div> </div> ) } } ReactDOM.render(<Popup />, document.getElementById('app')); ## Instruction: Use async/await which getting token ## Code After: import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' class Popup extends React.Component { constructor() { super() this.state = { accessToken: null } } afterLogOutClick() { this.setState({ accessToken: null }) } async componentDidMount() { const accessToken = await getToken() this.setState({ accessToken }) } render() { let feed let popupClass = `${styles.popup}` if (this.state.accessToken) { feed = <FeedContainer accessToken={this.state.accessToken} /> } else { popupClass = `${popupClass} ${styles['popup-tiny']}` } return ( <div className={ popupClass }> <PopupHeader loggedIn={ !!this.state.accessToken } /> <div className={ styles.wrapper }> { feed } <div className={ styles['auth-wrapper'] }> <AuthPanel accessToken={ this.state.accessToken } afterLogOutClick={ () => this.afterLogOutClick() } /> </div> </div> </div> ) } } ReactDOM.render(<Popup />, document.getElementById('app'));
import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' class Popup extends React.Component { constructor() { super() this.state = { accessToken: null } } afterLogOutClick() { this.setState({ accessToken: null }) } - componentDidMount() { + async componentDidMount() { ? ++++++ - getToken().then((token) => { + const accessToken = await getToken() - this.setState({ accessToken: token }) ? -- ------- + this.setState({ accessToken }) - }) } render() { let feed let popupClass = `${styles.popup}` if (this.state.accessToken) { feed = <FeedContainer accessToken={this.state.accessToken} /> } else { popupClass = `${popupClass} ${styles['popup-tiny']}` } return ( <div className={ popupClass }> <PopupHeader loggedIn={ !!this.state.accessToken } /> <div className={ styles.wrapper }> { feed } <div className={ styles['auth-wrapper'] }> <AuthPanel accessToken={ this.state.accessToken } afterLogOutClick={ () => this.afterLogOutClick() } /> </div> </div> </div> ) } } ReactDOM.render(<Popup />, document.getElementById('app'));
7
0.12069
3
4
d6e3adb97474ca4a48bbac052a991a4e479a9594
package.json
package.json
{ "name": "react-native-audio-streaming", "version": "1.0.0", "description": "React native audio streaming library for android and iOS", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ "react-native" ], "author": "Thibault Lenclos", "license": "MIT", "peerDependencies": { "react-native": "^0.30.0" }, "devDependencies": { "react-native": "^0.30.0" } }
{ "name": "react-native-audio-streaming", "version": "1.0.0", "description": "React native audio streaming library for android and iOS", "main": "index.js", "scripts": { "test": "echo \"Not test yet sadly :(\" && exit 0" }, "keywords": [ "react-native" ], "author": "Thibault Lenclos", "license": "MIT", "peerDependencies": { "react-native": "^0.30.0" }, "devDependencies": { "react-native": "^0.30.0" } }
Remove error on npm test
Remove error on npm test
JSON
mit
broberson/react-native-audio-streaming,broberson/react-native-audio-streaming,broberson/react-native-audio-streaming,ark-react-native/audio-player,ark-react-native/audio-player,tlenclos/react-native-audio-streaming,tlenclos/react-native-audio-streaming,tlenclos/react-native-audio-streaming,broberson/react-native-audio-streaming,tlenclos/react-native-audio-streaming,broberson/react-native-audio-streaming,ark-react-native/audio-player
json
## Code Before: { "name": "react-native-audio-streaming", "version": "1.0.0", "description": "React native audio streaming library for android and iOS", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ "react-native" ], "author": "Thibault Lenclos", "license": "MIT", "peerDependencies": { "react-native": "^0.30.0" }, "devDependencies": { "react-native": "^0.30.0" } } ## Instruction: Remove error on npm test ## Code After: { "name": "react-native-audio-streaming", "version": "1.0.0", "description": "React native audio streaming library for android and iOS", "main": "index.js", "scripts": { "test": "echo \"Not test yet sadly :(\" && exit 0" }, "keywords": [ "react-native" ], "author": "Thibault Lenclos", "license": "MIT", "peerDependencies": { "react-native": "^0.30.0" }, "devDependencies": { "react-native": "^0.30.0" } }
{ "name": "react-native-audio-streaming", "version": "1.0.0", "description": "React native audio streaming library for android and iOS", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Not test yet sadly :(\" && exit 0" }, "keywords": [ "react-native" ], "author": "Thibault Lenclos", "license": "MIT", "peerDependencies": { "react-native": "^0.30.0" }, "devDependencies": { "react-native": "^0.30.0" } }
2
0.1
1
1
f5620c58f4000e1731aee50edf477e05da089c36
src/InvalidArgumentException.php
src/InvalidArgumentException.php
<?php declare(strict_types=1); namespace HansOtt\PSR7Cookies; use Exception; /** * @deprecated Exception is not used and will be removed in future versions */ final class InvalidArgumentException extends Exception { }
<?php declare(strict_types=1); namespace HansOtt\PSR7Cookies; use Exception; final class InvalidArgumentException extends Exception { }
Revert "🗑 Add deprecation warning"
Revert "🗑 Add deprecation warning" This reverts commit 10151d7522980429e960b883e09b95a1c393172e.
PHP
mit
hansott/psr7-cookies
php
## Code Before: <?php declare(strict_types=1); namespace HansOtt\PSR7Cookies; use Exception; /** * @deprecated Exception is not used and will be removed in future versions */ final class InvalidArgumentException extends Exception { } ## Instruction: Revert "🗑 Add deprecation warning" This reverts commit 10151d7522980429e960b883e09b95a1c393172e. ## Code After: <?php declare(strict_types=1); namespace HansOtt\PSR7Cookies; use Exception; final class InvalidArgumentException extends Exception { }
<?php declare(strict_types=1); namespace HansOtt\PSR7Cookies; use Exception; - /** - * @deprecated Exception is not used and will be removed in future versions - */ final class InvalidArgumentException extends Exception { }
3
0.230769
0
3
2269d295e06155cd8871934cd2e578ae40c380cf
app/config/parameters.yml
app/config/parameters.yml
database: driver: pdo_mysql user: cmsv4 password: cmsv4 dbname: cmsv4 host: localhost mail: use: mandrill php_mailer: charset: utf-8 smtp_auth: true host: username: password: port: 587 mandrill: api_key: template_name: template_content: [] global_merge_vars: COMPANY: myCompany SENDERMAIL: sender@company.com swiftmailer: charset: utf-8 smtp_auth: true host: username: password: port: template: path: default
database: driver: pdo_mysql user: cmsv4 password: cmsv4 dbname: cmsv4 host: localhost mail: use: swift_mailer php_mailer: charset: utf-8 smtp_auth: true host: username: password: port: 587 mandrill: api_key: template_name: template_content: [] global_merge_vars: COMPANY: myCompany SENDERMAIL: sender@company.com swift_mailer: charset: utf-8 smtp_auth: true host: username: password: port: template: path: default
Adjust naming of swiftmailer > swift_mailer
Adjust naming of swiftmailer > swift_mailer
YAML
mit
rmatil/angular-cms,rmatil/angular-cms
yaml
## Code Before: database: driver: pdo_mysql user: cmsv4 password: cmsv4 dbname: cmsv4 host: localhost mail: use: mandrill php_mailer: charset: utf-8 smtp_auth: true host: username: password: port: 587 mandrill: api_key: template_name: template_content: [] global_merge_vars: COMPANY: myCompany SENDERMAIL: sender@company.com swiftmailer: charset: utf-8 smtp_auth: true host: username: password: port: template: path: default ## Instruction: Adjust naming of swiftmailer > swift_mailer ## Code After: database: driver: pdo_mysql user: cmsv4 password: cmsv4 dbname: cmsv4 host: localhost mail: use: swift_mailer php_mailer: charset: utf-8 smtp_auth: true host: username: password: port: 587 mandrill: api_key: template_name: template_content: [] global_merge_vars: COMPANY: myCompany SENDERMAIL: sender@company.com swift_mailer: charset: utf-8 smtp_auth: true host: username: password: port: template: path: default
database: driver: pdo_mysql user: cmsv4 password: cmsv4 dbname: cmsv4 host: localhost mail: - use: mandrill + use: swift_mailer php_mailer: charset: utf-8 smtp_auth: true host: username: password: port: 587 mandrill: api_key: template_name: template_content: [] global_merge_vars: COMPANY: myCompany SENDERMAIL: sender@company.com - swiftmailer: + swift_mailer: ? + charset: utf-8 smtp_auth: true host: username: password: port: template: path: default
4
0.121212
2
2
b027fc3df836c1be8a8e396678640432adce5982
pkgs/tools/misc/gotify-cli/default.nix
pkgs/tools/misc/gotify-cli/default.nix
{ buildGoModule, fetchFromGitHub, lib }: buildGoModule rec { pname = "gotify-cli"; version = "2.1.1"; src = fetchFromGitHub { owner = "gotify"; repo = "cli"; rev = "v${version}"; sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4"; }; vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh"; doCheck = false; postInstall = '' mv $out/bin/cli $out/bin/gotify ''; meta = with lib; { license = licenses.mit; homepage = "https://github.com/gotify/cli"; description = "A command line interface for pushing messages to gotify/server."; maintainers = with maintainers; [ ma27 ]; }; }
{ buildGoModule, fetchFromGitHub, lib }: buildGoModule rec { pname = "gotify-cli"; version = "2.1.1"; src = fetchFromGitHub { owner = "gotify"; repo = "cli"; rev = "v${version}"; sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4"; }; vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh"; doCheck = false; postInstall = '' mv $out/bin/cli $out/bin/gotify ''; buildFlagsArray = [ "-ldflags=-X main.Version=${version} -X main.Commit=${version} -X main.BuildDate=1970-01-01" ]; meta = with lib; { license = licenses.mit; homepage = "https://github.com/gotify/cli"; description = "A command line interface for pushing messages to gotify/server."; maintainers = with maintainers; [ ma27 ]; }; }
Add version and commit to ldflags
gotify-cli: Add version and commit to ldflags
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs
nix
## Code Before: { buildGoModule, fetchFromGitHub, lib }: buildGoModule rec { pname = "gotify-cli"; version = "2.1.1"; src = fetchFromGitHub { owner = "gotify"; repo = "cli"; rev = "v${version}"; sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4"; }; vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh"; doCheck = false; postInstall = '' mv $out/bin/cli $out/bin/gotify ''; meta = with lib; { license = licenses.mit; homepage = "https://github.com/gotify/cli"; description = "A command line interface for pushing messages to gotify/server."; maintainers = with maintainers; [ ma27 ]; }; } ## Instruction: gotify-cli: Add version and commit to ldflags ## Code After: { buildGoModule, fetchFromGitHub, lib }: buildGoModule rec { pname = "gotify-cli"; version = "2.1.1"; src = fetchFromGitHub { owner = "gotify"; repo = "cli"; rev = "v${version}"; sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4"; }; vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh"; doCheck = false; postInstall = '' mv $out/bin/cli $out/bin/gotify ''; buildFlagsArray = [ "-ldflags=-X main.Version=${version} -X main.Commit=${version} -X main.BuildDate=1970-01-01" ]; meta = with lib; { license = licenses.mit; homepage = "https://github.com/gotify/cli"; description = "A command line interface for pushing messages to gotify/server."; maintainers = with maintainers; [ ma27 ]; }; }
{ buildGoModule, fetchFromGitHub, lib }: buildGoModule rec { pname = "gotify-cli"; version = "2.1.1"; src = fetchFromGitHub { owner = "gotify"; repo = "cli"; rev = "v${version}"; sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4"; }; vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh"; doCheck = false; postInstall = '' mv $out/bin/cli $out/bin/gotify ''; + buildFlagsArray = [ + "-ldflags=-X main.Version=${version} -X main.Commit=${version} -X main.BuildDate=1970-01-01" + ]; + meta = with lib; { license = licenses.mit; homepage = "https://github.com/gotify/cli"; description = "A command line interface for pushing messages to gotify/server."; maintainers = with maintainers; [ ma27 ]; }; }
4
0.142857
4
0
d0d87f5f86e1621ee1c92fc9621e0fd59ce90fb0
README.md
README.md
- [Node.js] (https://nodejs.org/download/) - [npm] (https://github.com/npm/npm) ### Building First install the require packages: cd <repo directory> npm install Now run the build: cd <repo directory> npm run build ### Running dev server cd <repo directory> npm run dev-server Point your browser to http://localhost:8000 The dev server will watch resources and rebuild as necessary. #### Setting dev server port npm config set chemphyweb:dev_server:port <port>
- [Node.js] (https://nodejs.org/download/) - [npm] (https://github.com/npm/npm) ### Building First install the require packages: cd <repo directory> npm install Now run the build: cd <repo directory> npm run build ### Running dev server cd <repo directory> npm start Point your browser to http://localhost:8000 The dev server will watch resources and rebuild as necessary. #### Setting dev server port npm config set chemphyweb:dev_server:port <port>
Update dev server start instructions
Update dev server start instructions
Markdown
bsd-3-clause
OpenChemistry/mongochemclient,OpenChemistry/mongochemclient
markdown
## Code Before: - [Node.js] (https://nodejs.org/download/) - [npm] (https://github.com/npm/npm) ### Building First install the require packages: cd <repo directory> npm install Now run the build: cd <repo directory> npm run build ### Running dev server cd <repo directory> npm run dev-server Point your browser to http://localhost:8000 The dev server will watch resources and rebuild as necessary. #### Setting dev server port npm config set chemphyweb:dev_server:port <port> ## Instruction: Update dev server start instructions ## Code After: - [Node.js] (https://nodejs.org/download/) - [npm] (https://github.com/npm/npm) ### Building First install the require packages: cd <repo directory> npm install Now run the build: cd <repo directory> npm run build ### Running dev server cd <repo directory> npm start Point your browser to http://localhost:8000 The dev server will watch resources and rebuild as necessary. #### Setting dev server port npm config set chemphyweb:dev_server:port <port>
- [Node.js] (https://nodejs.org/download/) - [npm] (https://github.com/npm/npm) ### Building First install the require packages: cd <repo directory> npm install Now run the build: cd <repo directory> npm run build ### Running dev server cd <repo directory> - npm run dev-server + npm start Point your browser to http://localhost:8000 The dev server will watch resources and rebuild as necessary. #### Setting dev server port npm config set chemphyweb:dev_server:port <port>
2
0.074074
1
1
6ae3bd366466edffb80b04310deed19f31962bf6
templates/base.html
templates/base.html
{% load static %} {% load i18n %} <!DOCTYPE html> {% get_current_language as LANGUAGE_CODE %} <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns#"> <head> <!-- Meta content --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- CSS --> <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" /> <link rel="stylesheet" href="{% static 'css/open-iconic-bootstrap.css' %}" /> <link rel="stylesheet" href="{% static 'css/dissemin.css' %}" /> <!-- JavaScript --> <script src="{% static 'js/jquery.min.js' %}"></script> <script src="{% static 'js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'js/dissemin.js' %}"></script> {% block scripts %}{% endblock %} <!-- Title --> {% comment %} Set a title with block title {% endcomment %} <title>{% block title %}{% endblock %} - Dissemin</title> </head> <body> <div class="container"> {% include 'navbar.html' %} {% block content %}{% endblock %} {% include 'footer.html' %} </div> </body> </html>
{% load static %} {% load i18n %} <!DOCTYPE html> {% get_current_language as LANGUAGE_CODE %} <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns#"> <head> <!-- Meta content --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- CSS --> <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" /> <link rel="stylesheet" href="{% static 'css/open-iconic-bootstrap.css' %}" /> <link rel="stylesheet" href="{% static 'css/dissemin.css' %}" /> <!-- JavaScript --> <script src="{% static 'js/jquery.min.js' %}"></script> <script src="{% static 'js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'js/dissemin.js' %}"></script> {% block scripts %}{% endblock %} <!-- Title --> {% comment %} Set a title with block title {% endcomment %} <title>{% block title %}{% endblock %} - Dissemin</title> </head> <body> <div class="container"> {% include 'navbar.html' %} {% block content %}{% endblock %} {% include 'footer.html' %} {% comment %} This is the beta ribbon, indicating, that it's not a production instance {% endcomment %} {% if settings.DISPLAY_BETA_RIBBON %} <img style="position:absolute; top:0; left:0; border:0; opacity: 0.8; pointer-events: none;" src="{% static "img/beta-ribbon.png" %}" alt="Beta version" /> {% endif %} </div> </body> </html>
Add beta ribbon for test and dev instances
Add beta ribbon for test and dev instances
HTML
agpl-3.0
dissemin/dissemin,wetneb/dissemin,wetneb/dissemin,dissemin/dissemin,dissemin/dissemin,wetneb/dissemin,dissemin/dissemin,wetneb/dissemin,dissemin/dissemin
html
## Code Before: {% load static %} {% load i18n %} <!DOCTYPE html> {% get_current_language as LANGUAGE_CODE %} <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns#"> <head> <!-- Meta content --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- CSS --> <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" /> <link rel="stylesheet" href="{% static 'css/open-iconic-bootstrap.css' %}" /> <link rel="stylesheet" href="{% static 'css/dissemin.css' %}" /> <!-- JavaScript --> <script src="{% static 'js/jquery.min.js' %}"></script> <script src="{% static 'js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'js/dissemin.js' %}"></script> {% block scripts %}{% endblock %} <!-- Title --> {% comment %} Set a title with block title {% endcomment %} <title>{% block title %}{% endblock %} - Dissemin</title> </head> <body> <div class="container"> {% include 'navbar.html' %} {% block content %}{% endblock %} {% include 'footer.html' %} </div> </body> </html> ## Instruction: Add beta ribbon for test and dev instances ## Code After: {% load static %} {% load i18n %} <!DOCTYPE html> {% get_current_language as LANGUAGE_CODE %} <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns#"> <head> <!-- Meta content --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- CSS --> <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" /> <link rel="stylesheet" href="{% static 'css/open-iconic-bootstrap.css' %}" /> <link rel="stylesheet" href="{% static 'css/dissemin.css' %}" /> <!-- JavaScript --> <script src="{% static 'js/jquery.min.js' %}"></script> <script src="{% static 'js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'js/dissemin.js' %}"></script> {% block scripts %}{% endblock %} <!-- Title --> {% comment %} Set a title with block title {% endcomment %} <title>{% block title %}{% endblock %} - Dissemin</title> </head> <body> <div class="container"> {% include 'navbar.html' %} {% block content %}{% endblock %} {% include 'footer.html' %} {% comment %} This is the beta ribbon, indicating, that it's not a production instance {% endcomment %} {% if settings.DISPLAY_BETA_RIBBON %} <img style="position:absolute; top:0; left:0; border:0; opacity: 0.8; pointer-events: none;" src="{% static "img/beta-ribbon.png" %}" alt="Beta version" /> {% endif %} </div> </body> </html>
{% load static %} {% load i18n %} <!DOCTYPE html> {% get_current_language as LANGUAGE_CODE %} <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns#"> <head> <!-- Meta content --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- CSS --> <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" /> <link rel="stylesheet" href="{% static 'css/open-iconic-bootstrap.css' %}" /> <link rel="stylesheet" href="{% static 'css/dissemin.css' %}" /> <!-- JavaScript --> <script src="{% static 'js/jquery.min.js' %}"></script> <script src="{% static 'js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'js/dissemin.js' %}"></script> {% block scripts %}{% endblock %} <!-- Title --> {% comment %} Set a title with block title {% endcomment %} <title>{% block title %}{% endblock %} - Dissemin</title> </head> <body> <div class="container"> {% include 'navbar.html' %} {% block content %}{% endblock %} {% include 'footer.html' %} + {% comment %} + This is the beta ribbon, indicating, that it's not a production instance + {% endcomment %} + {% if settings.DISPLAY_BETA_RIBBON %} + <img style="position:absolute; top:0; left:0; border:0; opacity: 0.8; pointer-events: none;" src="{% static "img/beta-ribbon.png" %}" alt="Beta version" /> + {% endif %} </div> </body> </html>
6
0.153846
6
0
9e39f72a677f6453a5ac9cf7f53590f044391130
package.json
package.json
{ "name": "hyperapp", "description": "1kb JavaScript library for building modern UI applications", "version": "0.0.12", "main": "index.js", "license": "MIT", "repository": "github:hyperapp/hyperapp", "author": "Jorge Bucaran", "keywords": [ "hyperx", "hypertext", "functional", "virtual-dom", "template string", "hyperscript", "vanilla" ], "scripts": { "test": "jest --coverage --colors --cache", "b": "npm run b:all > /dev/null", "b:all": "npm run b:hyperapp && npm run b:hyperapp:hx", "b:hyperapp": "rollup -n hyperapp -cmf umd -o dist/hyperapp.js -- index.js", "b:hyperapp:hx": "rollup -n hyperapp -cmf umd -o dist/hyperapp.hx.js -- hx.js" }, "dependencies": { "hyperx": "^2.0.5" }, "devDependencies": { "jest": "^18.1.0", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-uglify": "^1.0.1" }, "jest": { "verbose": true } }
{ "name": "hyperapp", "description": "1kb JavaScript library for building modern UI applications", "version": "0.0.12", "main": "index.js", "license": "MIT", "repository": "github:hyperapp/hyperapp", "author": "Jorge Bucaran", "keywords": [ "hyperx", "hypertext", "functional", "virtual-dom", "template string", "hyperscript", "vanilla" ], "scripts": { "test": "jest --coverage --colors --cache", "build": "npm run b:hyperapp > /dev/null && npm run b:hyperapp.hx > /dev/null", "b:hyperapp": "rollup -n hyperapp -cmf umd -o dist/hyperapp.js -- src/hyperapp.js", "b:hyperapp.hx": "rollup -n hyperapp -cmf umd -o dist/hyperapp.hx.js -- src/index.js" }, "dependencies": { "hyperx": "^2.0.5" }, "devDependencies": { "jest": "^18.1.0", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-uglify": "^1.0.1" }, "jest": { "verbose": true } }
Remove hyperapp/hx in favor of using only hyperapp.
Remove hyperapp/hx in favor of using only hyperapp. This change does not affect how hyperapp is distributed. In other words, NEITHER the CDN urls or browser usage is changed. * Simpler and more intuitive require syntax, "hyperapp/hx" is no more. const { app, html, h } = require("hyperapp") import { app, html, h } from "hyperapp" * Hyperx is no longer a second-class citizen and you don't need to require "hyperapp/hx" in order to use it when hacking via node. * Users bundling with rollup/webpack or another mechanism that supports tree-shaking, will only include what they use. This is a good fit, because a large number of users bundling via rollup/webpack are probably going to be using JSX as well, which means the "hyperx" module will not be included in their result application bundles. * Usually, users bundling with browserify can't take advantage of the tree-shaking capabilities found in rollup/webpack, but since HyperApp html dependency is only hyperx, users can bundle with the hyperxify transform that will REMOVE the hyperx module from the result bundle as well as transform html`...` calls into h(...) direct calls, so you have the best of both worlds. browserify -t hyperxify index.js > bundle.js, which
JSON
mit
jbucaran/hyperapp,hyperapp/hyperapp,hyperapp/hyperapp
json
## Code Before: { "name": "hyperapp", "description": "1kb JavaScript library for building modern UI applications", "version": "0.0.12", "main": "index.js", "license": "MIT", "repository": "github:hyperapp/hyperapp", "author": "Jorge Bucaran", "keywords": [ "hyperx", "hypertext", "functional", "virtual-dom", "template string", "hyperscript", "vanilla" ], "scripts": { "test": "jest --coverage --colors --cache", "b": "npm run b:all > /dev/null", "b:all": "npm run b:hyperapp && npm run b:hyperapp:hx", "b:hyperapp": "rollup -n hyperapp -cmf umd -o dist/hyperapp.js -- index.js", "b:hyperapp:hx": "rollup -n hyperapp -cmf umd -o dist/hyperapp.hx.js -- hx.js" }, "dependencies": { "hyperx": "^2.0.5" }, "devDependencies": { "jest": "^18.1.0", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-uglify": "^1.0.1" }, "jest": { "verbose": true } } ## Instruction: Remove hyperapp/hx in favor of using only hyperapp. This change does not affect how hyperapp is distributed. In other words, NEITHER the CDN urls or browser usage is changed. * Simpler and more intuitive require syntax, "hyperapp/hx" is no more. const { app, html, h } = require("hyperapp") import { app, html, h } from "hyperapp" * Hyperx is no longer a second-class citizen and you don't need to require "hyperapp/hx" in order to use it when hacking via node. * Users bundling with rollup/webpack or another mechanism that supports tree-shaking, will only include what they use. This is a good fit, because a large number of users bundling via rollup/webpack are probably going to be using JSX as well, which means the "hyperx" module will not be included in their result application bundles. * Usually, users bundling with browserify can't take advantage of the tree-shaking capabilities found in rollup/webpack, but since HyperApp html dependency is only hyperx, users can bundle with the hyperxify transform that will REMOVE the hyperx module from the result bundle as well as transform html`...` calls into h(...) direct calls, so you have the best of both worlds. browserify -t hyperxify index.js > bundle.js, which ## Code After: { "name": "hyperapp", "description": "1kb JavaScript library for building modern UI applications", "version": "0.0.12", "main": "index.js", "license": "MIT", "repository": "github:hyperapp/hyperapp", "author": "Jorge Bucaran", "keywords": [ "hyperx", "hypertext", "functional", "virtual-dom", "template string", "hyperscript", "vanilla" ], "scripts": { "test": "jest --coverage --colors --cache", "build": "npm run b:hyperapp > /dev/null && npm run b:hyperapp.hx > /dev/null", "b:hyperapp": "rollup -n hyperapp -cmf umd -o dist/hyperapp.js -- src/hyperapp.js", "b:hyperapp.hx": "rollup -n hyperapp -cmf umd -o dist/hyperapp.hx.js -- src/index.js" }, "dependencies": { "hyperx": "^2.0.5" }, "devDependencies": { "jest": "^18.1.0", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-uglify": "^1.0.1" }, "jest": { "verbose": true } }
{ "name": "hyperapp", "description": "1kb JavaScript library for building modern UI applications", "version": "0.0.12", "main": "index.js", "license": "MIT", "repository": "github:hyperapp/hyperapp", "author": "Jorge Bucaran", "keywords": [ "hyperx", "hypertext", "functional", "virtual-dom", "template string", "hyperscript", "vanilla" ], "scripts": { "test": "jest --coverage --colors --cache", - "b": "npm run b:all > /dev/null", - "b:all": "npm run b:hyperapp && npm run b:hyperapp:hx", ? ^^ ^ ^ + "build": "npm run b:hyperapp > /dev/null && npm run b:hyperapp.hx > /dev/null", ? ^^ ^ ++++++++++++ ^ ++++++++++++ - "b:hyperapp": "rollup -n hyperapp -cmf umd -o dist/hyperapp.js -- index.js", ? ^^^ ^ + "b:hyperapp": "rollup -n hyperapp -cmf umd -o dist/hyperapp.js -- src/hyperapp.js", ? ^^^^^^^ ^^^^ - "b:hyperapp:hx": "rollup -n hyperapp -cmf umd -o dist/hyperapp.hx.js -- hx.js" ? ^ ^ + "b:hyperapp.hx": "rollup -n hyperapp -cmf umd -o dist/hyperapp.hx.js -- src/index.js" ? ^ ^^^^^^^^ }, "dependencies": { "hyperx": "^2.0.5" }, "devDependencies": { "jest": "^18.1.0", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-uglify": "^1.0.1" }, "jest": { "verbose": true } }
7
0.184211
3
4
d2c972f744c484e54683557ffe04923934599d47
app/assets/javascripts/templates/entries/entryShow.hbs
app/assets/javascripts/templates/entries/entryShow.hbs
<div class="entry" id="{{slug}}"> <div class="info"> <h1 class="title">{{title}}</h1> <h3 class="blogger-name"> <a href="{{blogger.blogUrl}}">{{blogger.name}}</a>, <a href="/semesters/{{semesterSlug}}">{{semesterName}}</a> </h3> <h4 class="published-date"> <span class="glyphicon glyphicon-calendar"></span> {{formattedDateTime}} </h4> </div> <p class="content">{{{content}}}</p> <h4 class="originally-published">Originally published here: <a href="{{blogUrl}}">{{blogUrl}}</a></h5> </div>
<div class="entry" id="{{slug}}"> <div class="info"> <h1 class="title">{{title}}</h1> <h3 class="blogger-name"> <a href="{{blogger.blogUrl}}">{{blogger.name}}</a>, <a href="/semesters/{{semesterSlug}}">{{semesterName}}</a> </h3> <h4 class="published-date"> <span class="glyphicon glyphicon-calendar"></span> {{formattedDateTime}} </h4> </div> <p class="content">{{{content}}}</p> <div class="tags"> <h3>Tags</h3> <ul class="tags-list list-inline"> {{#each tags}} <li class="tag well well-sm">{{tag}}</li> {{/each}} </ul> </div> <h4 class="originally-published">Originally published here: <a href="{{blogUrl}}">{{blogUrl}}</a></h5> </div>
Revert "Don't display tags, to avoid confusion"
Revert "Don't display tags, to avoid confusion" This reverts commit de84ef7c1fc881e2c3f35a31de55767a2ad03a7d.
Handlebars
mit
california-pizza-kitchen/flatiron-blogs,california-pizza-kitchen/flatiron-blogs
handlebars
## Code Before: <div class="entry" id="{{slug}}"> <div class="info"> <h1 class="title">{{title}}</h1> <h3 class="blogger-name"> <a href="{{blogger.blogUrl}}">{{blogger.name}}</a>, <a href="/semesters/{{semesterSlug}}">{{semesterName}}</a> </h3> <h4 class="published-date"> <span class="glyphicon glyphicon-calendar"></span> {{formattedDateTime}} </h4> </div> <p class="content">{{{content}}}</p> <h4 class="originally-published">Originally published here: <a href="{{blogUrl}}">{{blogUrl}}</a></h5> </div> ## Instruction: Revert "Don't display tags, to avoid confusion" This reverts commit de84ef7c1fc881e2c3f35a31de55767a2ad03a7d. ## Code After: <div class="entry" id="{{slug}}"> <div class="info"> <h1 class="title">{{title}}</h1> <h3 class="blogger-name"> <a href="{{blogger.blogUrl}}">{{blogger.name}}</a>, <a href="/semesters/{{semesterSlug}}">{{semesterName}}</a> </h3> <h4 class="published-date"> <span class="glyphicon glyphicon-calendar"></span> {{formattedDateTime}} </h4> </div> <p class="content">{{{content}}}</p> <div class="tags"> <h3>Tags</h3> <ul class="tags-list list-inline"> {{#each tags}} <li class="tag well well-sm">{{tag}}</li> {{/each}} </ul> </div> <h4 class="originally-published">Originally published here: <a href="{{blogUrl}}">{{blogUrl}}</a></h5> </div>
<div class="entry" id="{{slug}}"> <div class="info"> <h1 class="title">{{title}}</h1> <h3 class="blogger-name"> <a href="{{blogger.blogUrl}}">{{blogger.name}}</a>, <a href="/semesters/{{semesterSlug}}">{{semesterName}}</a> </h3> <h4 class="published-date"> <span class="glyphicon glyphicon-calendar"></span> {{formattedDateTime}} </h4> </div> <p class="content">{{{content}}}</p> + <div class="tags"> + <h3>Tags</h3> + <ul class="tags-list list-inline"> + {{#each tags}} + <li class="tag well well-sm">{{tag}}</li> + {{/each}} + </ul> + </div> + <h4 class="originally-published">Originally published here: <a href="{{blogUrl}}">{{blogUrl}}</a></h5> </div>
9
0.6
9
0
b116360ed4f37ae9612295ef186f92f7f8210760
project/plugins/acVinDRMPlugin/lib/model/CSV/CSVDRM.class.php
project/plugins/acVinDRMPlugin/lib/model/CSV/CSVDRM.class.php
<?php /** * Model for CSV * */ class CSVDRM extends BaseCSVDRM { public function __construct() { $this->type = "CSVDRM"; parent::__construct(); } public function getFileContent() { return file_get_contents($this->getAttachmentUri($this->getFileName())); } public function getFileName() { return 'import_edi_' . $this->identifiant . '_' . $this->periode . '.csv'; } public function hasErreurs() { return count($this->erreurs); } public function addErreur($erreur) { $erreurNode = $this->erreurs->getOrAdd($erreur->num_ligne); $erreurNode->num_ligne = $erreur->num_ligne; $erreurNode->csv_erreur = $erreur->erreur_csv; $erreurNode->diagnostic = $erreur->raison; return $erreurNode; } public function clearErreurs() { $this->remove('erreurs'); $this->add('erreurs'); $this->statut = null; } }
<?php /** * Model for CSV * */ class CSVDRM extends BaseCSVDRM { public function __construct() { parent::__construct(); $this->type = "CSVDRM"; } public function getFileContent() { return file_get_contents($this->getAttachmentUri($this->getFileName())); } public function getFileName() { return 'import_edi_' . $this->identifiant . '_' . $this->periode . '.csv'; } public function hasErreurs() { return count($this->erreurs); } public function addErreur($erreur) { $erreurNode = $this->erreurs->getOrAdd($erreur->num_ligne); $erreurNode->num_ligne = $erreur->num_ligne; $erreurNode->csv_erreur = $erreur->erreur_csv; $erreurNode->diagnostic = $erreur->raison; return $erreurNode; } public function clearErreurs() { $this->remove('erreurs'); $this->add('erreurs'); $this->statut = null; } }
Set type après le construct
Set type après le construct
PHP
agpl-3.0
24eme/giilde,24eme/giilde,24eme/giilda,24eme/giilde,24eme/giilda,24eme/giilde,24eme/giilde,24eme/giilda,24eme/giilde,24eme/giilda,24eme/giilda,24eme/giilda,24eme/giilda
php
## Code Before: <?php /** * Model for CSV * */ class CSVDRM extends BaseCSVDRM { public function __construct() { $this->type = "CSVDRM"; parent::__construct(); } public function getFileContent() { return file_get_contents($this->getAttachmentUri($this->getFileName())); } public function getFileName() { return 'import_edi_' . $this->identifiant . '_' . $this->periode . '.csv'; } public function hasErreurs() { return count($this->erreurs); } public function addErreur($erreur) { $erreurNode = $this->erreurs->getOrAdd($erreur->num_ligne); $erreurNode->num_ligne = $erreur->num_ligne; $erreurNode->csv_erreur = $erreur->erreur_csv; $erreurNode->diagnostic = $erreur->raison; return $erreurNode; } public function clearErreurs() { $this->remove('erreurs'); $this->add('erreurs'); $this->statut = null; } } ## Instruction: Set type après le construct ## Code After: <?php /** * Model for CSV * */ class CSVDRM extends BaseCSVDRM { public function __construct() { parent::__construct(); $this->type = "CSVDRM"; } public function getFileContent() { return file_get_contents($this->getAttachmentUri($this->getFileName())); } public function getFileName() { return 'import_edi_' . $this->identifiant . '_' . $this->periode . '.csv'; } public function hasErreurs() { return count($this->erreurs); } public function addErreur($erreur) { $erreurNode = $this->erreurs->getOrAdd($erreur->num_ligne); $erreurNode->num_ligne = $erreur->num_ligne; $erreurNode->csv_erreur = $erreur->erreur_csv; $erreurNode->diagnostic = $erreur->raison; return $erreurNode; } public function clearErreurs() { $this->remove('erreurs'); $this->add('erreurs'); $this->statut = null; } }
<?php /** * Model for CSV * */ class CSVDRM extends BaseCSVDRM { public function __construct() { + parent::__construct(); $this->type = "CSVDRM"; - parent::__construct(); } public function getFileContent() { return file_get_contents($this->getAttachmentUri($this->getFileName())); } public function getFileName() { return 'import_edi_' . $this->identifiant . '_' . $this->periode . '.csv'; } public function hasErreurs() { return count($this->erreurs); } public function addErreur($erreur) { $erreurNode = $this->erreurs->getOrAdd($erreur->num_ligne); $erreurNode->num_ligne = $erreur->num_ligne; $erreurNode->csv_erreur = $erreur->erreur_csv; $erreurNode->diagnostic = $erreur->raison; return $erreurNode; } public function clearErreurs() { $this->remove('erreurs'); $this->add('erreurs'); $this->statut = null; } }
2
0.05
1
1
d48cbdcb0944be2b529e5a2cfba9926a72bf87a1
app/views/home/index.html.erb
app/views/home/index.html.erb
<% content_for :head do -%> <%= stylesheet_pack_tag "hello_world_graphql" %> <% end -%> <%= render "shared/default_client_settings" %> <div id="main-app"></div> <%= javascript_packs_with_chunks_tag "hello_world_graphql", "data-turbolinks-track": "reload" %>
<% content_for :head do -%> <%= stylesheet_pack_tag "hello_world" %> <% end -%> <%= render "shared/default_client_settings" %> <div id="main-app"></div> <%= javascript_packs_with_chunks_tag "hello_world", "data-turbolinks-track": "reload" %>
Change back to hello world
Change back to hello world
HTML+ERB
mit
atomicjolt/react_rails_starter_app,atomicjolt/react_rails_starter_app,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/react_starter_app,atomicjolt/react_rails_starter_app,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/react_starter_app,atomicjolt/react_starter_app,atomicjolt/react_rails_starter_app,atomicjolt/lti_starter_app,atomicjolt/react_starter_app,atomicjolt/adhesion
html+erb
## Code Before: <% content_for :head do -%> <%= stylesheet_pack_tag "hello_world_graphql" %> <% end -%> <%= render "shared/default_client_settings" %> <div id="main-app"></div> <%= javascript_packs_with_chunks_tag "hello_world_graphql", "data-turbolinks-track": "reload" %> ## Instruction: Change back to hello world ## Code After: <% content_for :head do -%> <%= stylesheet_pack_tag "hello_world" %> <% end -%> <%= render "shared/default_client_settings" %> <div id="main-app"></div> <%= javascript_packs_with_chunks_tag "hello_world", "data-turbolinks-track": "reload" %>
<% content_for :head do -%> - <%= stylesheet_pack_tag "hello_world_graphql" %> ? -------- + <%= stylesheet_pack_tag "hello_world" %> <% end -%> <%= render "shared/default_client_settings" %> <div id="main-app"></div> - <%= javascript_packs_with_chunks_tag "hello_world_graphql", "data-turbolinks-track": "reload" %> ? -------- + <%= javascript_packs_with_chunks_tag "hello_world", "data-turbolinks-track": "reload" %>
4
0.571429
2
2
4c0685e5cb897fd3dbb2f4c05a8e12189b924899
app/sync/change/drop.js
app/sync/change/drop.js
var fs = require('fs-extra'); var helper = require('helper'); var forEach = helper.forEach; var ensure = helper.ensure; var LocalPath = helper.localPath; var Entry = require('entry'); var Metadata = require('metadata'); var Ignored = require('ignored'); var Rename = require('./set/catchRename'); var Preview = require('../../modules/preview'); var isDraft = require('../../drafts').isDraft; var rebuildDependents = require('./rebuildDependents'); module.exports = function (blogID, path, callback){ ensure(blogID, 'string') .and(path, 'string') .and(callback, 'function'); // We don't know if this file used to be a draft based // on its metadata. We should probably look this up? isDraft(blogID, path, function(err, is_draft){ // Build a queue. This assumes each method // can handle folders properly. And accepts a callback var queue = [ Metadata.drop.bind(this, blogID, path), Ignored.drop.bind(this, blogID, path), Rename.forDeleted.bind(this, blogID, path), rebuildDependents.bind(this, blogID, path), Entry.drop.bind(this, blogID, path), fs.remove.bind(this, LocalPath(blogID, path)) ]; if (is_draft) Preview.remove(blogID, path); forEach(queue, function(method, next){ method(next); }, callback); }); };
var fs = require('fs-extra'); var helper = require('helper'); var forEach = helper.forEach; // Order is important, don't do parallel var ensure = helper.ensure; var LocalPath = helper.localPath; var Entry = require('entry'); var Metadata = require('metadata'); var Ignored = require('ignored'); var Rename = require('./set/catchRename'); var Preview = require('../../modules/preview'); var isDraft = require('../../drafts').isDraft; var rebuildDependents = require('./rebuildDependents'); module.exports = function (blogID, path, callback){ ensure(blogID, 'string') .and(path, 'string') .and(callback, 'function'); // We don't know if this file used to be a draft based // on its metadata. We should probably look this up? isDraft(blogID, path, function(err, is_draft){ // ORDER IS IMPORTANT // Rebuild must happen after we remove the file from disk var queue = [ fs.remove.bind(this, LocalPath(blogID, path)), Metadata.drop.bind(this, blogID, path), Ignored.drop.bind(this, blogID, path), Rename.forDeleted.bind(this, blogID, path), Entry.drop.bind(this, blogID, path), rebuildDependents.bind(this, blogID, path) ]; if (is_draft) Preview.remove(blogID, path); forEach(queue, function(method, next){ method(next); }, callback); }); };
Fix order of functions when a file is deleted
Fix order of functions when a file is deleted
JavaScript
cc0-1.0
davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot
javascript
## Code Before: var fs = require('fs-extra'); var helper = require('helper'); var forEach = helper.forEach; var ensure = helper.ensure; var LocalPath = helper.localPath; var Entry = require('entry'); var Metadata = require('metadata'); var Ignored = require('ignored'); var Rename = require('./set/catchRename'); var Preview = require('../../modules/preview'); var isDraft = require('../../drafts').isDraft; var rebuildDependents = require('./rebuildDependents'); module.exports = function (blogID, path, callback){ ensure(blogID, 'string') .and(path, 'string') .and(callback, 'function'); // We don't know if this file used to be a draft based // on its metadata. We should probably look this up? isDraft(blogID, path, function(err, is_draft){ // Build a queue. This assumes each method // can handle folders properly. And accepts a callback var queue = [ Metadata.drop.bind(this, blogID, path), Ignored.drop.bind(this, blogID, path), Rename.forDeleted.bind(this, blogID, path), rebuildDependents.bind(this, blogID, path), Entry.drop.bind(this, blogID, path), fs.remove.bind(this, LocalPath(blogID, path)) ]; if (is_draft) Preview.remove(blogID, path); forEach(queue, function(method, next){ method(next); }, callback); }); }; ## Instruction: Fix order of functions when a file is deleted ## Code After: var fs = require('fs-extra'); var helper = require('helper'); var forEach = helper.forEach; // Order is important, don't do parallel var ensure = helper.ensure; var LocalPath = helper.localPath; var Entry = require('entry'); var Metadata = require('metadata'); var Ignored = require('ignored'); var Rename = require('./set/catchRename'); var Preview = require('../../modules/preview'); var isDraft = require('../../drafts').isDraft; var rebuildDependents = require('./rebuildDependents'); module.exports = function (blogID, path, callback){ ensure(blogID, 'string') .and(path, 'string') .and(callback, 'function'); // We don't know if this file used to be a draft based // on its metadata. We should probably look this up? isDraft(blogID, path, function(err, is_draft){ // ORDER IS IMPORTANT // Rebuild must happen after we remove the file from disk var queue = [ fs.remove.bind(this, LocalPath(blogID, path)), Metadata.drop.bind(this, blogID, path), Ignored.drop.bind(this, blogID, path), Rename.forDeleted.bind(this, blogID, path), Entry.drop.bind(this, blogID, path), rebuildDependents.bind(this, blogID, path) ]; if (is_draft) Preview.remove(blogID, path); forEach(queue, function(method, next){ method(next); }, callback); }); };
var fs = require('fs-extra'); var helper = require('helper'); - var forEach = helper.forEach; + var forEach = helper.forEach; // Order is important, don't do parallel var ensure = helper.ensure; var LocalPath = helper.localPath; var Entry = require('entry'); var Metadata = require('metadata'); var Ignored = require('ignored'); var Rename = require('./set/catchRename'); var Preview = require('../../modules/preview'); var isDraft = require('../../drafts').isDraft; var rebuildDependents = require('./rebuildDependents'); module.exports = function (blogID, path, callback){ ensure(blogID, 'string') .and(path, 'string') .and(callback, 'function'); // We don't know if this file used to be a draft based // on its metadata. We should probably look this up? isDraft(blogID, path, function(err, is_draft){ - // Build a queue. This assumes each method - // can handle folders properly. And accepts a callback + // ORDER IS IMPORTANT + // Rebuild must happen after we remove the file from disk var queue = [ + fs.remove.bind(this, LocalPath(blogID, path)), Metadata.drop.bind(this, blogID, path), Ignored.drop.bind(this, blogID, path), Rename.forDeleted.bind(this, blogID, path), - rebuildDependents.bind(this, blogID, path), Entry.drop.bind(this, blogID, path), - fs.remove.bind(this, LocalPath(blogID, path)) + rebuildDependents.bind(this, blogID, path) ]; if (is_draft) Preview.remove(blogID, path); forEach(queue, function(method, next){ method(next); }, callback); }); };
10
0.227273
5
5
1c879ba5b61a94ea5370a74760f0bb08407ffcf0
feedpaper-web/params.js
feedpaper-web/params.js
var fs = require('fs'); var p = require('path'); var slug = require('slug'); var url = require('url'); var util = require('util'); slug.defaults.mode ='rfc3986'; var env = process.env['FEEDPAPER_ENV']; var feedsCategories = JSON.parse(fs.readFileSync(p.join('..', 'conf', env, 'feeds.json'))); var conf = JSON.parse(fs.readFileSync(p.join('..', 'conf', env, 'feedpaper.json'))); // in lieu of AE86 pre-hook var apiBase = url.format({ protocol: conf.api.protocol, hostname: conf.api.host, pathname: util.format('v%d/%s', conf.api.version, conf.api.path) }); var globalJs = fs.readFileSync(p.join('static', 'scripts', 'global.js.tpl'), 'utf-8'); globalJs = globalJs.replace(/var apiBase = 'PLACEHOLDER';/, util.format('var apiBase = \'%s\';', apiBase)); fs.writeFileSync(p.join('static', 'scripts', 'global.js'), globalJs) exports.params = { slug: function(title, cb) { cb(slug(title)); }, sitemap: { 'index.html': { title: 'Feedpaper' } }, categories: feedsCategories };
var fs = require('fs'); var p = require('path'); var slug = require('slug'); var url = require('url'); var util = require('util'); slug.defaults.mode ='rfc3986'; var env = process.env['FEEDPAPER_ENV']; var feedsCategories = JSON.parse(fs.readFileSync(p.join('../conf', env, 'feeds.json'))); var conf = JSON.parse(fs.readFileSync(p.join('../../config/studio/feedpaper', env, 'feedpaper.json'))); // in lieu of AE86 pre-hook var apiBase = url.format({ protocol: conf.api.protocol, hostname: conf.api.host, pathname: util.format('v%d/%s', conf.api.version, conf.api.path) }); var globalJs = fs.readFileSync(p.join('static', 'scripts', 'global.js.tpl'), 'utf-8'); globalJs = globalJs.replace(/var apiBase = 'PLACEHOLDER';/, util.format('var apiBase = \'%s\';', apiBase)); fs.writeFileSync(p.join('static', 'scripts', 'global.js'), globalJs) exports.params = { slug: function(title, cb) { cb(slug(title)); }, sitemap: { 'index.html': { title: 'Feedpaper' } }, categories: feedsCategories };
Split feeds and app config locations.
Split feeds and app config locations.
JavaScript
mit
cliffano/feedpaper,cliffano/feedpaper,cliffano/feedpaper
javascript
## Code Before: var fs = require('fs'); var p = require('path'); var slug = require('slug'); var url = require('url'); var util = require('util'); slug.defaults.mode ='rfc3986'; var env = process.env['FEEDPAPER_ENV']; var feedsCategories = JSON.parse(fs.readFileSync(p.join('..', 'conf', env, 'feeds.json'))); var conf = JSON.parse(fs.readFileSync(p.join('..', 'conf', env, 'feedpaper.json'))); // in lieu of AE86 pre-hook var apiBase = url.format({ protocol: conf.api.protocol, hostname: conf.api.host, pathname: util.format('v%d/%s', conf.api.version, conf.api.path) }); var globalJs = fs.readFileSync(p.join('static', 'scripts', 'global.js.tpl'), 'utf-8'); globalJs = globalJs.replace(/var apiBase = 'PLACEHOLDER';/, util.format('var apiBase = \'%s\';', apiBase)); fs.writeFileSync(p.join('static', 'scripts', 'global.js'), globalJs) exports.params = { slug: function(title, cb) { cb(slug(title)); }, sitemap: { 'index.html': { title: 'Feedpaper' } }, categories: feedsCategories }; ## Instruction: Split feeds and app config locations. ## Code After: var fs = require('fs'); var p = require('path'); var slug = require('slug'); var url = require('url'); var util = require('util'); slug.defaults.mode ='rfc3986'; var env = process.env['FEEDPAPER_ENV']; var feedsCategories = JSON.parse(fs.readFileSync(p.join('../conf', env, 'feeds.json'))); var conf = JSON.parse(fs.readFileSync(p.join('../../config/studio/feedpaper', env, 'feedpaper.json'))); // in lieu of AE86 pre-hook var apiBase = url.format({ protocol: conf.api.protocol, hostname: conf.api.host, pathname: util.format('v%d/%s', conf.api.version, conf.api.path) }); var globalJs = fs.readFileSync(p.join('static', 'scripts', 'global.js.tpl'), 'utf-8'); globalJs = globalJs.replace(/var apiBase = 'PLACEHOLDER';/, util.format('var apiBase = \'%s\';', apiBase)); fs.writeFileSync(p.join('static', 'scripts', 'global.js'), globalJs) exports.params = { slug: function(title, cb) { cb(slug(title)); }, sitemap: { 'index.html': { title: 'Feedpaper' } }, categories: feedsCategories };
var fs = require('fs'); var p = require('path'); var slug = require('slug'); var url = require('url'); var util = require('util'); slug.defaults.mode ='rfc3986'; var env = process.env['FEEDPAPER_ENV']; - var feedsCategories = JSON.parse(fs.readFileSync(p.join('..', 'conf', env, 'feeds.json'))); ? ^^^^ + var feedsCategories = JSON.parse(fs.readFileSync(p.join('../conf', env, 'feeds.json'))); ? ^ - var conf = JSON.parse(fs.readFileSync(p.join('..', 'conf', env, 'feedpaper.json'))); ? ^^^^ + var conf = JSON.parse(fs.readFileSync(p.join('../../config/studio/feedpaper', env, 'feedpaper.json'))); ? ^^^^ +++++++++++++++++++ // in lieu of AE86 pre-hook var apiBase = url.format({ protocol: conf.api.protocol, hostname: conf.api.host, pathname: util.format('v%d/%s', conf.api.version, conf.api.path) }); var globalJs = fs.readFileSync(p.join('static', 'scripts', 'global.js.tpl'), 'utf-8'); globalJs = globalJs.replace(/var apiBase = 'PLACEHOLDER';/, util.format('var apiBase = \'%s\';', apiBase)); fs.writeFileSync(p.join('static', 'scripts', 'global.js'), globalJs) exports.params = { slug: function(title, cb) { cb(slug(title)); }, sitemap: { 'index.html': { title: 'Feedpaper' } }, categories: feedsCategories };
4
0.129032
2
2
a9666ecaa7ed904cb9ded38e41ea381eb08d7d65
citrination_client/models/design/target.py
citrination_client/models/design/target.py
from citrination_client.base.errors import CitrinationClientError class Target(object): """ The optimization target for a design run. Consists of the name of the output column to optimize and the objective (either "Max" or "Min") """ def __init__(self, name, objective): """ Constructor. :param name: The name of the target output column :type name: str :param objective: The optimization objective; "Min", "Max", or a scalar value (such as "5.0") :type objective: str """ try: self._objective = float(objective) except ValueError: if objective.lower() not in ["max", "min"]: raise CitrinationClientError( "Target objective must either be \"min\" or \"max\"" ) self._objective = objective self._name = name def to_dict(self): return { "descriptor": self._name, "objective": self._objective }
from citrination_client.base.errors import CitrinationClientError class Target(object): """ The optimization target for a design run. Consists of the name of the output column to optimize and the objective (either "Max" or "Min", or a scalar value (such as "5.0")) """ def __init__(self, name, objective): """ Constructor. :param name: The name of the target output column :type name: str :param objective: The optimization objective; "Min", "Max", or a scalar value (such as "5.0") :type objective: str """ try: self._objective = float(objective) except ValueError: if objective.lower() not in ["max", "min"]: raise CitrinationClientError( "Target objective must either be \"min\" or \"max\"" ) self._objective = objective self._name = name def to_dict(self): return { "descriptor": self._name, "objective": self._objective }
Update outdated design Target docstring
Update outdated design Target docstring
Python
apache-2.0
CitrineInformatics/python-citrination-client
python
## Code Before: from citrination_client.base.errors import CitrinationClientError class Target(object): """ The optimization target for a design run. Consists of the name of the output column to optimize and the objective (either "Max" or "Min") """ def __init__(self, name, objective): """ Constructor. :param name: The name of the target output column :type name: str :param objective: The optimization objective; "Min", "Max", or a scalar value (such as "5.0") :type objective: str """ try: self._objective = float(objective) except ValueError: if objective.lower() not in ["max", "min"]: raise CitrinationClientError( "Target objective must either be \"min\" or \"max\"" ) self._objective = objective self._name = name def to_dict(self): return { "descriptor": self._name, "objective": self._objective } ## Instruction: Update outdated design Target docstring ## Code After: from citrination_client.base.errors import CitrinationClientError class Target(object): """ The optimization target for a design run. Consists of the name of the output column to optimize and the objective (either "Max" or "Min", or a scalar value (such as "5.0")) """ def __init__(self, name, objective): """ Constructor. :param name: The name of the target output column :type name: str :param objective: The optimization objective; "Min", "Max", or a scalar value (such as "5.0") :type objective: str """ try: self._objective = float(objective) except ValueError: if objective.lower() not in ["max", "min"]: raise CitrinationClientError( "Target objective must either be \"min\" or \"max\"" ) self._objective = objective self._name = name def to_dict(self): return { "descriptor": self._name, "objective": self._objective }
from citrination_client.base.errors import CitrinationClientError class Target(object): """ The optimization target for a design run. Consists of the name of the output column to optimize and the objective - (either "Max" or "Min") + (either "Max" or "Min", or a scalar value (such as "5.0")) """ def __init__(self, name, objective): """ Constructor. :param name: The name of the target output column :type name: str :param objective: The optimization objective; "Min", "Max", or a scalar value (such as "5.0") :type objective: str """ try: self._objective = float(objective) except ValueError: if objective.lower() not in ["max", "min"]: raise CitrinationClientError( "Target objective must either be \"min\" or \"max\"" ) self._objective = objective self._name = name def to_dict(self): return { "descriptor": self._name, "objective": self._objective }
2
0.055556
1
1
95e99a02357558606f9e0f991dd702550d5bc040
Magic/src/main/resources/defaults/config/block_skins.yml
Magic/src/main/resources/defaults/config/block_skins.yml
block_skins: cactus: MHF_Cactus; chest: MHF_Chest; melon_block: MHF_Melon tnt: MHF_TNT # There is also MHF_TNT2 but we aren't using it now. log: MHF_OakLog pumpkin: MHF_Pumpkin # 1.13 oak_log: MHF_OakLog # Other MHF blocks we don't use: # MHF_ArrowUp # MHF_ArrowDown # MHF_ArrowLeft # MHF_ArrowRight # MHF_Exclamation # MHF_Question
block_skins: cactus: MHF_Cactus chest: MHF_Chest melon_block: MHF_Melon tnt: MHF_TNT # There is also MHF_TNT2 but we aren't using it now. log: MHF_OakLog pumpkin: MHF_Pumpkin # 1.13 oak_log: MHF_OakLog melon: MHF_Melon # Other MHF blocks we don't use: # MHF_ArrowUp # MHF_ArrowDown # MHF_ArrowLeft # MHF_ArrowRight # MHF_Exclamation # MHF_Question
Fix melon skin in 1.13, thanks Yanis48!
Fix melon skin in 1.13, thanks Yanis48!
YAML
mit
elBukkit/MagicPlugin,elBukkit/MagicPlugin,elBukkit/MagicPlugin
yaml
## Code Before: block_skins: cactus: MHF_Cactus; chest: MHF_Chest; melon_block: MHF_Melon tnt: MHF_TNT # There is also MHF_TNT2 but we aren't using it now. log: MHF_OakLog pumpkin: MHF_Pumpkin # 1.13 oak_log: MHF_OakLog # Other MHF blocks we don't use: # MHF_ArrowUp # MHF_ArrowDown # MHF_ArrowLeft # MHF_ArrowRight # MHF_Exclamation # MHF_Question ## Instruction: Fix melon skin in 1.13, thanks Yanis48! ## Code After: block_skins: cactus: MHF_Cactus chest: MHF_Chest melon_block: MHF_Melon tnt: MHF_TNT # There is also MHF_TNT2 but we aren't using it now. log: MHF_OakLog pumpkin: MHF_Pumpkin # 1.13 oak_log: MHF_OakLog melon: MHF_Melon # Other MHF blocks we don't use: # MHF_ArrowUp # MHF_ArrowDown # MHF_ArrowLeft # MHF_ArrowRight # MHF_Exclamation # MHF_Question
block_skins: - cactus: MHF_Cactus; ? - + cactus: MHF_Cactus - chest: MHF_Chest; ? - + chest: MHF_Chest melon_block: MHF_Melon tnt: MHF_TNT # There is also MHF_TNT2 but we aren't using it now. log: MHF_OakLog pumpkin: MHF_Pumpkin # 1.13 oak_log: MHF_OakLog + melon: MHF_Melon # Other MHF blocks we don't use: # MHF_ArrowUp # MHF_ArrowDown # MHF_ArrowLeft # MHF_ArrowRight # MHF_Exclamation # MHF_Question
5
0.277778
3
2
4a9be853d4143f7f2db304ac1471cbf4e91b8124
static/markdown/mailing-lists.md
static/markdown/mailing-lists.md
General Haskell questions; extended discussions. Forum in which it's acceptable to ask anything, no matter how naive, and get polite replies. [Subscribe now →](http://haskell.org/mailman/listinfo/haskell-cafe) [Archives](http://www.haskell.org/pipermail/haskell-cafe/) ## Announcements Announcements only. Intended to be a low-bandwidth list, to which it is safe to subscribe without risking being buried in email. If a thread becomes longer than a handful of messages, please transfer to Haskell-Cafe. [Subscribe now →](http://haskell.org/mailman/listinfo/haskell) [Archives](http://www.haskell.org/pipermail/haskell/) ## Beginners Beginner-level, i.e., elementary, Haskell questions and discussions. Any newbie question is welcome. [Subscribe now →](http://haskell.org/mailman/listinfo/beginners) [Archives](http://www.haskell.org/pipermail/beginners/) ## Other mailing lists There are many lists hosted on haskell.org, the complete list is [here](http://www.haskell.org/mailman/listinfo).
General Haskell questions; extended discussions. Forum in which it's acceptable to ask anything, no matter how naive, and get polite replies. [Subscribe now →](http://mail.haskell.org/mailman/listinfo/haskell-cafe) [Archives](http://mail.haskell.org/pipermail/haskell-cafe/) ## Haskell Announcements Announcements only. Intended to be a low-bandwidth list, to which it is safe to subscribe without risking being buried in email. If a thread becomes longer than a handful of messages, please transfer to Haskell-Cafe. [Subscribe now →](http://mail.haskell.org/mailman/listinfo/haskell) [Archives](http://mail.haskell.org/pipermail/haskell/) ## Beginners Beginner-level, i.e., elementary, Haskell questions and discussions. Any newbie question is welcome. [Subscribe now →](http://mail.haskell.org/mailman/listinfo/beginners) [Archives](http://mail.haskell.org/pipermail/beginners/) ## Other mailing lists There are many lists hosted on haskell.org, though be warned some are no longer active. The complete list is [here](http://mail.haskell.org).
Change mail links to dereference a redirect, clarify number of dead lists in the full listing.
Change mail links to dereference a redirect, clarify number of dead lists in the full listing.
Markdown
bsd-3-clause
kxxoling/hl,kxxoling/hl,josefs/hl,kxxoling/hl,erantapaa/hl,haskell-lang/haskell-lang,josefs/hl,haskell-infra/hl,snoyberg/hl,erantapaa/hl,haskell-lang/haskell-lang,bitemyapp/commercialhaskell.com,haskell-infra/hl,josefs/hl,gbaz/hl,imalsogreg/hl,gbaz/hl,bitemyapp/commercialhaskell.com,haskell-infra/hl,commercialhaskell/commercialhaskell.com,imalsogreg/hl,gbaz/hl,haskell-lang/haskell-lang,imalsogreg/hl,snoyberg/hl,commercialhaskell/commercialhaskell.com,commercialhaskell/commercialhaskell.com,bitemyapp/commercialhaskell.com,snoyberg/hl,erantapaa/hl
markdown
## Code Before: General Haskell questions; extended discussions. Forum in which it's acceptable to ask anything, no matter how naive, and get polite replies. [Subscribe now →](http://haskell.org/mailman/listinfo/haskell-cafe) [Archives](http://www.haskell.org/pipermail/haskell-cafe/) ## Announcements Announcements only. Intended to be a low-bandwidth list, to which it is safe to subscribe without risking being buried in email. If a thread becomes longer than a handful of messages, please transfer to Haskell-Cafe. [Subscribe now →](http://haskell.org/mailman/listinfo/haskell) [Archives](http://www.haskell.org/pipermail/haskell/) ## Beginners Beginner-level, i.e., elementary, Haskell questions and discussions. Any newbie question is welcome. [Subscribe now →](http://haskell.org/mailman/listinfo/beginners) [Archives](http://www.haskell.org/pipermail/beginners/) ## Other mailing lists There are many lists hosted on haskell.org, the complete list is [here](http://www.haskell.org/mailman/listinfo). ## Instruction: Change mail links to dereference a redirect, clarify number of dead lists in the full listing. ## Code After: General Haskell questions; extended discussions. Forum in which it's acceptable to ask anything, no matter how naive, and get polite replies. [Subscribe now →](http://mail.haskell.org/mailman/listinfo/haskell-cafe) [Archives](http://mail.haskell.org/pipermail/haskell-cafe/) ## Haskell Announcements Announcements only. Intended to be a low-bandwidth list, to which it is safe to subscribe without risking being buried in email. If a thread becomes longer than a handful of messages, please transfer to Haskell-Cafe. [Subscribe now →](http://mail.haskell.org/mailman/listinfo/haskell) [Archives](http://mail.haskell.org/pipermail/haskell/) ## Beginners Beginner-level, i.e., elementary, Haskell questions and discussions. Any newbie question is welcome. [Subscribe now →](http://mail.haskell.org/mailman/listinfo/beginners) [Archives](http://mail.haskell.org/pipermail/beginners/) ## Other mailing lists There are many lists hosted on haskell.org, though be warned some are no longer active. The complete list is [here](http://mail.haskell.org).
General Haskell questions; extended discussions. Forum in which it's acceptable to ask anything, no matter how naive, and get polite replies. - [Subscribe now →](http://haskell.org/mailman/listinfo/haskell-cafe) + [Subscribe now →](http://mail.haskell.org/mailman/listinfo/haskell-cafe) ? +++++ - [Archives](http://www.haskell.org/pipermail/haskell-cafe/) ? ^^^ + [Archives](http://mail.haskell.org/pipermail/haskell-cafe/) ? ^^^^ - ## Announcements + ## Haskell Announcements ? ++++++++ Announcements only. Intended to be a low-bandwidth list, to which it is safe to subscribe without risking being buried in email. If a thread becomes longer than a handful of messages, please transfer to Haskell-Cafe. - [Subscribe now →](http://haskell.org/mailman/listinfo/haskell) + [Subscribe now →](http://mail.haskell.org/mailman/listinfo/haskell) ? +++++ - [Archives](http://www.haskell.org/pipermail/haskell/) ? ^^^ + [Archives](http://mail.haskell.org/pipermail/haskell/) ? ^^^^ ## Beginners Beginner-level, i.e., elementary, Haskell questions and discussions. Any newbie question is welcome. - [Subscribe now →](http://haskell.org/mailman/listinfo/beginners) + [Subscribe now →](http://mail.haskell.org/mailman/listinfo/beginners) ? +++++ - [Archives](http://www.haskell.org/pipermail/beginners/) ? ^^^ + [Archives](http://mail.haskell.org/pipermail/beginners/) ? ^^^^ ## Other mailing lists - There are many lists hosted on haskell.org, the complete list is ? ^ ---- ^^^^^^^ + There are many lists hosted on haskell.org, though be warned some are ? ++++++ ^^^^^^^^ ^^^ - [here](http://www.haskell.org/mailman/listinfo). + no longer active. The complete list is + [here](http://mail.haskell.org).
19
0.542857
10
9
8dc057b796b34150de611314f27800da70df690a
src/tizen/SplashScreenProxy.js
src/tizen/SplashScreenProxy.js
var exec = require('cordova/exec'); module.exports = { splashscreen: { win: null, show: function() { win= window.open('splashscreen.html'); }, hide: function() { win.close(); win = null; } } }; require("cordova/tizen/commandProxy").add("SplashScreen", module.exports);
( function() { win = null; module.exports = { show: function() { if ( win === null ) { win = window.open('splashscreen.html'); } }, hide: function() { if ( win !== null ) { win.close(); win = null; } } }; require("cordova/tizen/commandProxy").add("SplashScreen", module.exports); })();
Correct structure, and only ever create one splashscreen window.
Proxy: Correct structure, and only ever create one splashscreen window.
JavaScript
apache-2.0
Panajev/cordova-plugin-splashscreen,editweb/cordova-plugin-splashscreen,Newstex/cordova-plugin-splashscreen,polyvi/cordova-plugin-splashscreen,Seedstars/cordova-plugin-splashscreen,polyvi/cordova-plugin-splashscreen,corimf/cordova-plugin-splashscreen,petermetz/cordova-plugin-splashscreen,IWAtech/cordova-plugin-splashscreen,caseywebdev/cordova-plugin-splashscreen,purplecabbage/cordova-plugin-splashscreen,Seedstars/cordova-plugin-splashscreen,asiFarran/cordova-plugin-splashscreen,kitmaxdevelop/cordova-plugin-splashscreen,Panajev/cordova-plugin-splashscreen,hebert-nr/spin,petermetz/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen,dpolivy/cordova-plugin-splashscreen,hebert-nr/spin,hebert-nr/spin,petermetz/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,bamlab/cordova-plugin-splashscreen,Panajev/cordova-plugin-splashscreen,Panajev/cordova-plugin-splashscreen,dpolivy/cordova-plugin-splashscreen,caseywebdev/cordova-plugin-splashscreen,polyvi/cordova-plugin-splashscreen,blackberry-webworks/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,blackberry-webworks/cordova-plugin-splashscreen,apache/cordova-plugin-splashscreen,Icenium/cordova-plugin-splashscreen,asiFarran/cordova-plugin-splashscreen,jfrumar/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen,Choppel/cordova-plugin-splashscreen,kitmaxdevelop/cordova-plugin-splashscreen,kitmaxdevelop/cordova-plugin-splashscreen,bamlab/cordova-plugin-splashscreen,purplecabbage/cordova-plugin-splashscreen,blackberry-webworks/cordova-plugin-splashscreen,asiFarran/cordova-plugin-splashscreen,Newstex/cordova-plugin-splashscreen,Icenium/cordova-plugin-splashscreen,purplecabbage/cordova-plugin-splashscreen,caseywebdev/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,corimf/cordova-plugin-splashscreen,jfrumar/cordova-plugin-splashscreen,dpolivy/cordova-plugin-splashscreen,Seedstars/cordova-plugin-splashscreen,blackberry-webworks/cordova-plugin-splashscreen,purplecabbage/cordova-plugin-splashscreen,editweb/cordova-plugin-splashscreen,dpolivy/cordova-plugin-splashscreen,IWAtech/cordova-plugin-splashscreen,jfrumar/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,Choppel/cordova-plugin-splashscreen,kitmaxdevelop/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,Icenium/cordova-plugin-splashscreen,corimf/cordova-plugin-splashscreen,Lazza/cordova-plugin-splashscreen,caseywebdev/cordova-plugin-splashscreen,Seedstars/cordova-plugin-splashscreen,Lazza/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,IWAtech/cordova-plugin-splashscreen,petermetz/cordova-plugin-splashscreen,editweb/cordova-plugin-splashscreen,Newstex/cordova-plugin-splashscreen,corimf/cordova-plugin-splashscreen,editweb/cordova-plugin-splashscreen,hebert-nr/spin,bamlab/cordova-plugin-splashscreen,Choppel/cordova-plugin-splashscreen,Icenium/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,jfrumar/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,Lazza/cordova-plugin-splashscreen,Newstex/cordova-plugin-splashscreen,IWAtech/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,Choppel/cordova-plugin-splashscreen,polyvi/cordova-plugin-splashscreen,asiFarran/cordova-plugin-splashscreen,hebert-nr/spin,Lazza/cordova-plugin-splashscreen,bamlab/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen
javascript
## Code Before: var exec = require('cordova/exec'); module.exports = { splashscreen: { win: null, show: function() { win= window.open('splashscreen.html'); }, hide: function() { win.close(); win = null; } } }; require("cordova/tizen/commandProxy").add("SplashScreen", module.exports); ## Instruction: Proxy: Correct structure, and only ever create one splashscreen window. ## Code After: ( function() { win = null; module.exports = { show: function() { if ( win === null ) { win = window.open('splashscreen.html'); } }, hide: function() { if ( win !== null ) { win.close(); win = null; } } }; require("cordova/tizen/commandProxy").add("SplashScreen", module.exports); })();
- var exec = require('cordova/exec'); + ( function() { + + win = null; module.exports = { - splashscreen: { - win: null, + show: function() { + if ( win === null ) { + win = window.open('splashscreen.html'); + } + }, - show: function() { - win= window.open('splashscreen.html'); - }, - - hide: function() { ? ---- + hide: function() { + if ( win !== null ) { win.close(); win = null; } } }; require("cordova/tizen/commandProxy").add("SplashScreen", module.exports); + + })();
20
1.111111
12
8
14739212f41c77a469d8792ebcc9ef9e911a7274
.travis.yml
.travis.yml
sudo: false addons: apt: sources: - deadsnakes - ubuntu-toolchain-r-test packages: - python3.5 - python3.5-dev - python-pip - python-virtualenv - gcc-4.9 - g++-4.9 # Needed for ARM gcc - lib32bz2-1.0 - lib32ncurses5 - lib32z1 language: cpp matrix: include: - compiler: clang env: BUILD_TYPE="tests" - compiler: gcc env: BUILD_TYPE="tests" - compiler: clang env: BUILD_TYPE="client-tests" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="motor-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="rc-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="olimex-e407" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="can-io-board" before_install: - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi install: - ci/install.sh script: - ci/build.sh
sudo: false addons: apt: sources: - deadsnakes - ubuntu-toolchain-r-test packages: - python3.5 - python3.5-dev - python-pip - python-virtualenv - gcc-4.9 - g++-4.9 # Needed for ARM gcc - lib32bz2-1.0 - lib32ncurses5 - lib32z1 language: cpp matrix: include: - compiler: clang env: BUILD_TYPE="tests" - compiler: gcc env: BUILD_TYPE="tests" - compiler: clang env: BUILD_TYPE="client-tests" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="motor-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="rc-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="olimex-e407" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="can-io-board" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="nucleo-board-stm32f103rb" before_install: - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi install: - ci/install.sh script: - ci/build.sh
Add CI for Nucleo STM32F103 platform
Add CI for Nucleo STM32F103 platform
YAML
bsd-2-clause
cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader
yaml
## Code Before: sudo: false addons: apt: sources: - deadsnakes - ubuntu-toolchain-r-test packages: - python3.5 - python3.5-dev - python-pip - python-virtualenv - gcc-4.9 - g++-4.9 # Needed for ARM gcc - lib32bz2-1.0 - lib32ncurses5 - lib32z1 language: cpp matrix: include: - compiler: clang env: BUILD_TYPE="tests" - compiler: gcc env: BUILD_TYPE="tests" - compiler: clang env: BUILD_TYPE="client-tests" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="motor-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="rc-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="olimex-e407" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="can-io-board" before_install: - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi install: - ci/install.sh script: - ci/build.sh ## Instruction: Add CI for Nucleo STM32F103 platform ## Code After: sudo: false addons: apt: sources: - deadsnakes - ubuntu-toolchain-r-test packages: - python3.5 - python3.5-dev - python-pip - python-virtualenv - gcc-4.9 - g++-4.9 # Needed for ARM gcc - lib32bz2-1.0 - lib32ncurses5 - lib32z1 language: cpp matrix: include: - compiler: clang env: BUILD_TYPE="tests" - compiler: gcc env: BUILD_TYPE="tests" - compiler: clang env: BUILD_TYPE="client-tests" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="motor-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="rc-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="olimex-e407" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="can-io-board" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="nucleo-board-stm32f103rb" before_install: - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi install: - ci/install.sh script: - ci/build.sh
sudo: false addons: apt: sources: - deadsnakes - ubuntu-toolchain-r-test packages: - python3.5 - python3.5-dev - python-pip - python-virtualenv - gcc-4.9 - g++-4.9 # Needed for ARM gcc - lib32bz2-1.0 - lib32ncurses5 - lib32z1 language: cpp matrix: include: - compiler: clang env: BUILD_TYPE="tests" - compiler: gcc env: BUILD_TYPE="tests" - compiler: clang env: BUILD_TYPE="client-tests" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="motor-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="rc-board-v1" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="olimex-e407" - compiler: gcc env: BUILD_TYPE="build" PLATFORM="can-io-board" + - compiler: gcc + env: BUILD_TYPE="build" PLATFORM="nucleo-board-stm32f103rb" before_install: - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi install: - ci/install.sh script: - ci/build.sh
2
0.042553
2
0
1fdb94783831bdd8e0608dc95a008f9344753a58
setup.py
setup.py
from setuptools import setup setup( name='Flask-Babel', version='0.12.0', url='http://github.com/python-babel/flask-babel', license='BSD', author='Armin Ronacher', author_email='armin.ronacher@active-4.com', description='Adds i18n/l10n support to Flask applications', long_description=__doc__, packages=['flask_babel'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'Babel>=2.3', 'Jinja2>=2.5' ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='Flask-Babel', version='0.12.0', url='http://github.com/python-babel/flask-babel', license='BSD', author='Armin Ronacher', author_email='armin.ronacher@active-4.com', description='Adds i18n/l10n support to Flask applications', long_description=long_description, long_description_content_type='text/markdown', packages=['flask_babel'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'Babel>=2.3', 'Jinja2>=2.5' ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
Switch to using README.md for project description on pypi.
Switch to using README.md for project description on pypi.
Python
bsd-3-clause
mitsuhiko/flask-babel,mitsuhiko/flask-babel
python
## Code Before: from setuptools import setup setup( name='Flask-Babel', version='0.12.0', url='http://github.com/python-babel/flask-babel', license='BSD', author='Armin Ronacher', author_email='armin.ronacher@active-4.com', description='Adds i18n/l10n support to Flask applications', long_description=__doc__, packages=['flask_babel'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'Babel>=2.3', 'Jinja2>=2.5' ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] ) ## Instruction: Switch to using README.md for project description on pypi. ## Code After: from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='Flask-Babel', version='0.12.0', url='http://github.com/python-babel/flask-babel', license='BSD', author='Armin Ronacher', author_email='armin.ronacher@active-4.com', description='Adds i18n/l10n support to Flask applications', long_description=long_description, long_description_content_type='text/markdown', packages=['flask_babel'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'Babel>=2.3', 'Jinja2>=2.5' ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
from setuptools import setup + + from os import path + this_directory = path.abspath(path.dirname(__file__)) + with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: + long_description = f.read() setup( name='Flask-Babel', version='0.12.0', url='http://github.com/python-babel/flask-babel', license='BSD', author='Armin Ronacher', author_email='armin.ronacher@active-4.com', description='Adds i18n/l10n support to Flask applications', - long_description=__doc__, + long_description=long_description, + long_description_content_type='text/markdown', packages=['flask_babel'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'Babel>=2.3', 'Jinja2>=2.5' ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
8
0.235294
7
1
f79734300f55f791c0e08d4cdf92ba16663a7cb2
.travis.yml
.travis.yml
language: elixir elixir: - 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 sudo: false before_script: - mix deps.get --only test env: - MIX_ENV=test script: - mix test - mix coveralls.travis after_script: - mix deps.get --only docs - MIX_ENV=docs mix inch.report
language: elixir elixir: - 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 sudo: false before_script: - mix deps.get --only test env: - MIX_ENV=test script: - mix coveralls.travis after_script: - mix deps.get --only docs - MIX_ENV=docs mix inch.report
Remove redundant call to mix test
Remove redundant call to mix test
YAML
mit
beatrichartz/parallel_stream
yaml
## Code Before: language: elixir elixir: - 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 sudo: false before_script: - mix deps.get --only test env: - MIX_ENV=test script: - mix test - mix coveralls.travis after_script: - mix deps.get --only docs - MIX_ENV=docs mix inch.report ## Instruction: Remove redundant call to mix test ## Code After: language: elixir elixir: - 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 sudo: false before_script: - mix deps.get --only test env: - MIX_ENV=test script: - mix coveralls.travis after_script: - mix deps.get --only docs - MIX_ENV=docs mix inch.report
language: elixir elixir: - 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 sudo: false before_script: - mix deps.get --only test env: - MIX_ENV=test script: - - mix test - mix coveralls.travis after_script: - mix deps.get --only docs - MIX_ENV=docs mix inch.report
1
0.047619
0
1
56ef8cf12d3128273bb279cb2af50c27b926af21
phpunit.xml.dist
phpunit.xml.dist
<?xml version="1.0" encoding="UTF-8"?> <phpunit colors="true" bootstrap="./tests/bootstrap.php" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"> <testsuites> <testsuite name="Banana BodyBuilder tests"> <directory>./tests/Banana/</directory> </testsuite> </testsuites> </phpunit>
<?xml version="1.0" encoding="UTF-8"?> <phpunit colors="true" bootstrap="./tests/bootstrap.php" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"> <testsuites> <testsuite name="Banana BodyBuilder tests"> <directory>./tests/Banana/</directory> </testsuite> </testsuites> <filter> <whitelist processUncoveredFilesFromWhitelist="true"> <directory suffix=".php">./src</directory> <exclude> <directory suffix=".php">./vendor</directory> </exclude> </whitelist> </filter> </phpunit>
Update phpunit config for coverage reports more correct
Update phpunit config for coverage reports more correct
unknown
mit
gromopuk/banana-bodybuilder
unknown
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <phpunit colors="true" bootstrap="./tests/bootstrap.php" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"> <testsuites> <testsuite name="Banana BodyBuilder tests"> <directory>./tests/Banana/</directory> </testsuite> </testsuites> </phpunit> ## Instruction: Update phpunit config for coverage reports more correct ## Code After: <?xml version="1.0" encoding="UTF-8"?> <phpunit colors="true" bootstrap="./tests/bootstrap.php" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"> <testsuites> <testsuite name="Banana BodyBuilder tests"> <directory>./tests/Banana/</directory> </testsuite> </testsuites> <filter> <whitelist processUncoveredFilesFromWhitelist="true"> <directory suffix=".php">./src</directory> <exclude> <directory suffix=".php">./vendor</directory> </exclude> </whitelist> </filter> </phpunit>
<?xml version="1.0" encoding="UTF-8"?> <phpunit colors="true" bootstrap="./tests/bootstrap.php" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"> <testsuites> <testsuite name="Banana BodyBuilder tests"> <directory>./tests/Banana/</directory> </testsuite> </testsuites> + <filter> + <whitelist processUncoveredFilesFromWhitelist="true"> + <directory suffix=".php">./src</directory> + <exclude> + <directory suffix=".php">./vendor</directory> + </exclude> + </whitelist> + </filter> </phpunit>
8
0.615385
8
0
8e5ca49016b80b5ac63e11ca1207ad0cb33b3f1e
src/Behat/Testwork/Ordering/Orderer/RandomOrderer.php
src/Behat/Testwork/Ordering/Orderer/RandomOrderer.php
<?php /* * This file is part of the Behat. * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Behat\Testwork\Ordering\Orderer; use Behat\Testwork\Specification\SpecificationArrayIterator; /** * Prioritises Suites and Features into random order * * @author Ciaran McNulty <mail@ciaranmcnulty.com> */ final class RandomOrderer implements Orderer { /** * @param SpecificationIterator[] $scenarioIterators * @return SpecificationIterator[] */ public function order(array $scenarioIterators) { $orderedFeatures = $this->orderFeatures($scenarioIterators); shuffle($orderedFeatures); return $orderedFeatures; } /** * @param array $scenarioIterators * @return array */ private function orderFeatures(array $scenarioIterators) { $orderedSuites = array(); foreach ($scenarioIterators as $scenarioIterator) { $orderedSpecifications = iterator_to_array($scenarioIterator); shuffle($orderedSpecifications); $orderedSuites[] = new SpecificationArrayIterator( $scenarioIterator->getSuite(), $orderedSpecifications ); } return $orderedSuites; } /** * @return string */ public function getName() { return 'random'; } }
<?php /* * This file is part of the Behat. * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Behat\Testwork\Ordering\Orderer; use Behat\Testwork\Specification\SpecificationArrayIterator; use Behat\Testwork\Specification\SpecificationIterator; /** * Prioritises Suites and Features into random order * * @author Ciaran McNulty <mail@ciaranmcnulty.com> */ final class RandomOrderer implements Orderer { /** * @param SpecificationIterator[] $scenarioIterators * @return SpecificationIterator[] */ public function order(array $scenarioIterators) { $orderedFeatures = $this->orderFeatures($scenarioIterators); shuffle($orderedFeatures); return $orderedFeatures; } /** * @param array $scenarioIterators * @return array */ private function orderFeatures(array $scenarioIterators) { $orderedSuites = array(); foreach ($scenarioIterators as $scenarioIterator) { $orderedSpecifications = iterator_to_array($scenarioIterator); shuffle($orderedSpecifications); $orderedSuites[] = new SpecificationArrayIterator( $scenarioIterator->getSuite(), $orderedSpecifications ); } return $orderedSuites; } /** * @return string */ public function getName() { return 'random'; } }
Add use statement for SpecificationIterator
Add use statement for SpecificationIterator
PHP
mit
Behat/Behat
php
## Code Before: <?php /* * This file is part of the Behat. * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Behat\Testwork\Ordering\Orderer; use Behat\Testwork\Specification\SpecificationArrayIterator; /** * Prioritises Suites and Features into random order * * @author Ciaran McNulty <mail@ciaranmcnulty.com> */ final class RandomOrderer implements Orderer { /** * @param SpecificationIterator[] $scenarioIterators * @return SpecificationIterator[] */ public function order(array $scenarioIterators) { $orderedFeatures = $this->orderFeatures($scenarioIterators); shuffle($orderedFeatures); return $orderedFeatures; } /** * @param array $scenarioIterators * @return array */ private function orderFeatures(array $scenarioIterators) { $orderedSuites = array(); foreach ($scenarioIterators as $scenarioIterator) { $orderedSpecifications = iterator_to_array($scenarioIterator); shuffle($orderedSpecifications); $orderedSuites[] = new SpecificationArrayIterator( $scenarioIterator->getSuite(), $orderedSpecifications ); } return $orderedSuites; } /** * @return string */ public function getName() { return 'random'; } } ## Instruction: Add use statement for SpecificationIterator ## Code After: <?php /* * This file is part of the Behat. * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Behat\Testwork\Ordering\Orderer; use Behat\Testwork\Specification\SpecificationArrayIterator; use Behat\Testwork\Specification\SpecificationIterator; /** * Prioritises Suites and Features into random order * * @author Ciaran McNulty <mail@ciaranmcnulty.com> */ final class RandomOrderer implements Orderer { /** * @param SpecificationIterator[] $scenarioIterators * @return SpecificationIterator[] */ public function order(array $scenarioIterators) { $orderedFeatures = $this->orderFeatures($scenarioIterators); shuffle($orderedFeatures); return $orderedFeatures; } /** * @param array $scenarioIterators * @return array */ private function orderFeatures(array $scenarioIterators) { $orderedSuites = array(); foreach ($scenarioIterators as $scenarioIterator) { $orderedSpecifications = iterator_to_array($scenarioIterator); shuffle($orderedSpecifications); $orderedSuites[] = new SpecificationArrayIterator( $scenarioIterator->getSuite(), $orderedSpecifications ); } return $orderedSuites; } /** * @return string */ public function getName() { return 'random'; } }
<?php /* * This file is part of the Behat. * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Behat\Testwork\Ordering\Orderer; use Behat\Testwork\Specification\SpecificationArrayIterator; + use Behat\Testwork\Specification\SpecificationIterator; /** * Prioritises Suites and Features into random order * * @author Ciaran McNulty <mail@ciaranmcnulty.com> */ final class RandomOrderer implements Orderer { /** * @param SpecificationIterator[] $scenarioIterators * @return SpecificationIterator[] */ public function order(array $scenarioIterators) { $orderedFeatures = $this->orderFeatures($scenarioIterators); shuffle($orderedFeatures); return $orderedFeatures; } /** * @param array $scenarioIterators * @return array */ private function orderFeatures(array $scenarioIterators) { $orderedSuites = array(); foreach ($scenarioIterators as $scenarioIterator) { $orderedSpecifications = iterator_to_array($scenarioIterator); shuffle($orderedSpecifications); $orderedSuites[] = new SpecificationArrayIterator( $scenarioIterator->getSuite(), $orderedSpecifications ); } return $orderedSuites; } /** * @return string */ public function getName() { return 'random'; } }
1
0.016393
1
0
1f11cb611f59e13c6637f2198f5d6b1876589428
proj/ios/component/view/Text.mm
proj/ios/component/view/Text.mm
// // Created by Dawid Drozd aka Gelldur on 6/15/16. // #include <component/view/Text.h> #include <platform/Context.h> #include <log.h> #include <ColorUtils.h> #import <UIKit/UIKit.h> void Text::setText(const char* text) { auto context = getContext(); // @formatter:off UILabel* label = context->getNative(); label.text = [NSString stringWithUTF8String:text]; // @formatter:on } void Text::setText(const std::string& text) { setText(text.c_str()); } void Text::setTextColor(int color) { auto context = getContext(); UILabel* label = context->getNative(); label.textColor = UIColorFromRGB(color); }
// // Created by Dawid Drozd aka Gelldur on 6/15/16. // #include <component/view/Text.h> #include <platform/Context.h> #include <log.h> #include <ColorUtils.h> #include <Utils.h> #include <acme/text/AttributedText.h> #import <UIKit/UIKit.h> void Text::setText(const char* text) { auto context = getContext(); UILabel* label = context->getNative(); label.text = [NSString stringWithUTF8String:text]; } void Text::setText(const std::string& text) { setText(text.c_str()); } void Text::setTextColor(int color) { auto context = getContext(); UILabel* label = context->getNative(); label.textColor = UIColorFromRGB(color); } void Text::setTextAttributed(const AttributedText& attributedText) { NSMutableAttributedString* attributedString= [[NSMutableAttributedString alloc] initWithString:@""]; for(auto& element : attributedText.getElements()) { NSAttributedString* attachmentString; if(element.type == AttributedText::ElementType::IMAGE_LOCAL) { NSTextAttachment* attachment = [[NSTextAttachment alloc] init]; attachment.image = [UIImage imageNamed:stringConvert(element.value)]; attachmentString = [NSAttributedString attributedStringWithAttachment:attachment]; } else { attachmentString = [[NSAttributedString alloc] initWithString:stringConvert(element.value)]; } [attributedString appendAttributedString:attachmentString]; } auto context = getContext(); UILabel* label = context->getNative(); label.attributedText = attributedString; }
Add iOS attributed text implementation
Add iOS attributed text implementation
Objective-C++
apache-2.0
gelldur/DexodeEngine,gelldur/DexodeEngine,gelldur/DexodeEngine
objective-c++
## Code Before: // // Created by Dawid Drozd aka Gelldur on 6/15/16. // #include <component/view/Text.h> #include <platform/Context.h> #include <log.h> #include <ColorUtils.h> #import <UIKit/UIKit.h> void Text::setText(const char* text) { auto context = getContext(); // @formatter:off UILabel* label = context->getNative(); label.text = [NSString stringWithUTF8String:text]; // @formatter:on } void Text::setText(const std::string& text) { setText(text.c_str()); } void Text::setTextColor(int color) { auto context = getContext(); UILabel* label = context->getNative(); label.textColor = UIColorFromRGB(color); } ## Instruction: Add iOS attributed text implementation ## Code After: // // Created by Dawid Drozd aka Gelldur on 6/15/16. // #include <component/view/Text.h> #include <platform/Context.h> #include <log.h> #include <ColorUtils.h> #include <Utils.h> #include <acme/text/AttributedText.h> #import <UIKit/UIKit.h> void Text::setText(const char* text) { auto context = getContext(); UILabel* label = context->getNative(); label.text = [NSString stringWithUTF8String:text]; } void Text::setText(const std::string& text) { setText(text.c_str()); } void Text::setTextColor(int color) { auto context = getContext(); UILabel* label = context->getNative(); label.textColor = UIColorFromRGB(color); } void Text::setTextAttributed(const AttributedText& attributedText) { NSMutableAttributedString* attributedString= [[NSMutableAttributedString alloc] initWithString:@""]; for(auto& element : attributedText.getElements()) { NSAttributedString* attachmentString; if(element.type == AttributedText::ElementType::IMAGE_LOCAL) { NSTextAttachment* attachment = [[NSTextAttachment alloc] init]; attachment.image = [UIImage imageNamed:stringConvert(element.value)]; attachmentString = [NSAttributedString attributedStringWithAttachment:attachment]; } else { attachmentString = [[NSAttributedString alloc] initWithString:stringConvert(element.value)]; } [attributedString appendAttributedString:attachmentString]; } auto context = getContext(); UILabel* label = context->getNative(); label.attributedText = attributedString; }
// // Created by Dawid Drozd aka Gelldur on 6/15/16. // #include <component/view/Text.h> #include <platform/Context.h> #include <log.h> #include <ColorUtils.h> + #include <Utils.h> + #include <acme/text/AttributedText.h> #import <UIKit/UIKit.h> void Text::setText(const char* text) { auto context = getContext(); - // @formatter:off UILabel* label = context->getNative(); label.text = [NSString stringWithUTF8String:text]; - // @formatter:on } void Text::setText(const std::string& text) { setText(text.c_str()); } void Text::setTextColor(int color) { auto context = getContext(); UILabel* label = context->getNative(); label.textColor = UIColorFromRGB(color); } + void Text::setTextAttributed(const AttributedText& attributedText) + { + NSMutableAttributedString* attributedString= [[NSMutableAttributedString alloc] initWithString:@""]; + for(auto& element : attributedText.getElements()) + { + NSAttributedString* attachmentString; + if(element.type == AttributedText::ElementType::IMAGE_LOCAL) + { + NSTextAttachment* attachment = [[NSTextAttachment alloc] init]; + attachment.image = [UIImage imageNamed:stringConvert(element.value)]; + attachmentString = [NSAttributedString attributedStringWithAttachment:attachment]; + } + else + { + attachmentString = [[NSAttributedString alloc] initWithString:stringConvert(element.value)]; + } + + [attributedString appendAttributedString:attachmentString]; + } + + auto context = getContext(); + + UILabel* label = context->getNative(); + label.attributedText = attributedString; + }
29
0.805556
27
2
8484a66d46dc3d0fdc027a759fd2eecc925f04d9
RELEASE.md
RELEASE.md
* Version: 0.2.0 * Build Date: 20221114 * Paxml commit: 16fd2143827522acfb7a7e22767a008eaae07e24 * Praxis version: 0.2.0 * Praxis commit: 413da1ad8148f27faebca119f8c5deedca66228b # Version: 0.1.0 ## Major Features and Improvements ## Breaking changes ## Deprecations ## Note * Version: 0.1.0 * Build Date: 20220702 * Commit: 546370f5323ef8b27d38ddc32445d7d3d1e4da9a * Praxis version: 0.1.0
* Revamp training and evaluation/decoding loops in preparation of multi-task learning support * Better seqio metrics and clu metrics support * Suppot per-core batch size < 1 * Introduction of training input specifications * Add GPT-3-like Language Modeling configuration * Add ResNet-50 image classification configuration * Checkpointing - Save on-demand checkpoint when preemption signal is received - Migration to Orbax checkpointing - Save checkpoints more consistently after pre-emption and when training completes * Summaries - Add support for aggregation across steps * TPU profiling can be configured and automated * Improvements to Auto-ML and hyperparameters sweeping using PyGlove * Use etils for handling filenames / directories ## Note * Version: 0.2.0 * Build Date: 20221114 * Paxml commit: 16fd2143827522acfb7a7e22767a008eaae07e24 * Praxis version: 0.2.0 * Praxis commit: 413da1ad8148f27faebca119f8c5deedca66228b # Version: 0.1.0 ## Major Features and Improvements ## Breaking changes ## Deprecations ## Note * Version: 0.1.0 * Build Date: 20220702 * Commit: 546370f5323ef8b27d38ddc32445d7d3d1e4da9a * Praxis version: 0.1.0
Add release notes for upcoming 2.0 version.
Add release notes for upcoming 2.0 version. PiperOrigin-RevId: 488504579
Markdown
apache-2.0
google/paxml,google/paxml
markdown
## Code Before: * Version: 0.2.0 * Build Date: 20221114 * Paxml commit: 16fd2143827522acfb7a7e22767a008eaae07e24 * Praxis version: 0.2.0 * Praxis commit: 413da1ad8148f27faebca119f8c5deedca66228b # Version: 0.1.0 ## Major Features and Improvements ## Breaking changes ## Deprecations ## Note * Version: 0.1.0 * Build Date: 20220702 * Commit: 546370f5323ef8b27d38ddc32445d7d3d1e4da9a * Praxis version: 0.1.0 ## Instruction: Add release notes for upcoming 2.0 version. PiperOrigin-RevId: 488504579 ## Code After: * Revamp training and evaluation/decoding loops in preparation of multi-task learning support * Better seqio metrics and clu metrics support * Suppot per-core batch size < 1 * Introduction of training input specifications * Add GPT-3-like Language Modeling configuration * Add ResNet-50 image classification configuration * Checkpointing - Save on-demand checkpoint when preemption signal is received - Migration to Orbax checkpointing - Save checkpoints more consistently after pre-emption and when training completes * Summaries - Add support for aggregation across steps * TPU profiling can be configured and automated * Improvements to Auto-ML and hyperparameters sweeping using PyGlove * Use etils for handling filenames / directories ## Note * Version: 0.2.0 * Build Date: 20221114 * Paxml commit: 16fd2143827522acfb7a7e22767a008eaae07e24 * Praxis version: 0.2.0 * Praxis commit: 413da1ad8148f27faebca119f8c5deedca66228b # Version: 0.1.0 ## Major Features and Improvements ## Breaking changes ## Deprecations ## Note * Version: 0.1.0 * Build Date: 20220702 * Commit: 546370f5323ef8b27d38ddc32445d7d3d1e4da9a * Praxis version: 0.1.0
+ * Revamp training and evaluation/decoding loops in preparation of multi-task + learning support + * Better seqio metrics and clu metrics support + * Suppot per-core batch size < 1 + * Introduction of training input specifications + * Add GPT-3-like Language Modeling configuration + * Add ResNet-50 image classification configuration + * Checkpointing + - Save on-demand checkpoint when preemption signal is received + - Migration to Orbax checkpointing + - Save checkpoints more consistently after pre-emption and when training + completes + * Summaries + - Add support for aggregation across steps + * TPU profiling can be configured and automated + * Improvements to Auto-ML and hyperparameters sweeping using PyGlove + * Use etils for handling filenames / directories + ## Note * Version: 0.2.0 * Build Date: 20221114 * Paxml commit: 16fd2143827522acfb7a7e22767a008eaae07e24 * Praxis version: 0.2.0 * Praxis commit: 413da1ad8148f27faebca119f8c5deedca66228b # Version: 0.1.0 ## Major Features and Improvements ## Breaking changes ## Deprecations ## Note * Version: 0.1.0 * Build Date: 20220702 * Commit: 546370f5323ef8b27d38ddc32445d7d3d1e4da9a * Praxis version: 0.1.0
18
1.285714
18
0
cb7170785af4bf853ff8495aaade520d3b133332
casexml/apps/stock/admin.py
casexml/apps/stock/admin.py
from django.contrib import admin from .models import * class StockReportAdmin(admin.ModelAdmin): model = StockReport list_display = ['date', 'type', 'form_id'] list_filter = ['date', 'type'] class StockTransactionAdmin(admin.ModelAdmin): model = StockTransaction list_display = ['report_date', 'section_id', 'type', 'subtype', 'case_id', 'product_id', 'quantity', 'stock_on_hand'] list_filter = ['report__date', 'section_id', 'type', 'subtype'] def report_date(self, obj): return obj.report.date report_date.admin_order_field = 'report__date' admin.site.register(StockReport, StockReportAdmin) admin.site.register(StockTransaction, StockTransactionAdmin)
from django.contrib import admin from .models import * class StockReportAdmin(admin.ModelAdmin): model = StockReport list_display = ['date', 'type', 'form_id'] list_filter = ['date', 'type'] search_fields = ['form_id'] class StockTransactionAdmin(admin.ModelAdmin): model = StockTransaction list_display = ['report_date', 'section_id', 'type', 'subtype', 'case_id', 'product_id', 'quantity', 'stock_on_hand'] list_filter = ['report__date', 'section_id', 'type', 'subtype'] search_fields = ['case_id', 'product_id'] def report_date(self, obj): return obj.report.date report_date.admin_order_field = 'report__date' admin.site.register(StockReport, StockReportAdmin) admin.site.register(StockTransaction, StockTransactionAdmin)
Add search fields to stock models
Add search fields to stock models
Python
bsd-3-clause
dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq
python
## Code Before: from django.contrib import admin from .models import * class StockReportAdmin(admin.ModelAdmin): model = StockReport list_display = ['date', 'type', 'form_id'] list_filter = ['date', 'type'] class StockTransactionAdmin(admin.ModelAdmin): model = StockTransaction list_display = ['report_date', 'section_id', 'type', 'subtype', 'case_id', 'product_id', 'quantity', 'stock_on_hand'] list_filter = ['report__date', 'section_id', 'type', 'subtype'] def report_date(self, obj): return obj.report.date report_date.admin_order_field = 'report__date' admin.site.register(StockReport, StockReportAdmin) admin.site.register(StockTransaction, StockTransactionAdmin) ## Instruction: Add search fields to stock models ## Code After: from django.contrib import admin from .models import * class StockReportAdmin(admin.ModelAdmin): model = StockReport list_display = ['date', 'type', 'form_id'] list_filter = ['date', 'type'] search_fields = ['form_id'] class StockTransactionAdmin(admin.ModelAdmin): model = StockTransaction list_display = ['report_date', 'section_id', 'type', 'subtype', 'case_id', 'product_id', 'quantity', 'stock_on_hand'] list_filter = ['report__date', 'section_id', 'type', 'subtype'] search_fields = ['case_id', 'product_id'] def report_date(self, obj): return obj.report.date report_date.admin_order_field = 'report__date' admin.site.register(StockReport, StockReportAdmin) admin.site.register(StockTransaction, StockTransactionAdmin)
from django.contrib import admin from .models import * + class StockReportAdmin(admin.ModelAdmin): model = StockReport list_display = ['date', 'type', 'form_id'] list_filter = ['date', 'type'] + search_fields = ['form_id'] + class StockTransactionAdmin(admin.ModelAdmin): model = StockTransaction list_display = ['report_date', 'section_id', 'type', 'subtype', 'case_id', 'product_id', 'quantity', 'stock_on_hand'] list_filter = ['report__date', 'section_id', 'type', 'subtype'] + search_fields = ['case_id', 'product_id'] def report_date(self, obj): return obj.report.date report_date.admin_order_field = 'report__date' admin.site.register(StockReport, StockReportAdmin) admin.site.register(StockTransaction, StockTransactionAdmin)
4
0.210526
4
0
ed3ae3360041aff7db62f3cdd2911a4119fea7a7
modules/jenkins/templates/plugin/github-oauth.xml
modules/jenkins/templates/plugin/github-oauth.xml
<useSecurity>true</useSecurity> <authorizationStrategy class="org.jenkinsci.plugins.GithubAuthorizationStrategy" plugin="github-oauth@0.14"> <rootACL> <organizationNameList class="linked-list"> <% @organization_name_list.each do |organization_name| -%> <string><%= organization_name %></string> <% end %> </organizationNameList> <adminUserNameList class="linked-list"> <% @admin_user_name_list.each do |admin_user_name| -%> <string><%= admin_user_name %></string> <% end %> </adminUserNameList> <authenticatedUserReadPermission>false</authenticatedUserReadPermission> <allowGithubWebHookPermission>false</allowGithubWebHookPermission> <allowCcTrayPermission>false</allowCcTrayPermission> <allowAnonymousReadPermission>false</allowAnonymousReadPermission> </rootACL> </authorizationStrategy> <securityRealm class="org.jenkinsci.plugins.GithubSecurityRealm"> <githubWebUri>https://github.com</githubWebUri> <githubApiUri>https://api.github.com</githubApiUri> <clientID><%= @client_id %></clientID> <clientSecret><%= @client_secret %></clientSecret> </securityRealm>
<useSecurity>true</useSecurity> <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"> <permission>hudson.model.Item.ViewStatus:anonymous</permission> <% @organization_name_list.each do |organization_name| -%> <permission>hudson.model.Item.Read:<%= organization_name %></permission> <permission>hudson.model.Hudson.Read:<%= organization_name %></permission> <% end %> <% @admin_user_name_list.each do |admin_user_name| -%> <permission>hudson.model.Hudson.Administer:<%= admin_user_name %></permission> <% end %> </authorizationStrategy> <securityRealm class="org.jenkinsci.plugins.GithubSecurityRealm"> <githubWebUri>https://github.com</githubWebUri> <githubApiUri>https://api.github.com</githubApiUri> <clientID><%= @client_id %></clientID> <clientSecret><%= @client_secret %></clientSecret> </securityRealm>
Use matrix authorization strategy for jenkins github oauth plugin
Use matrix authorization strategy for jenkins github oauth plugin
XML
mit
cargomedia/puppet-packages,njam/puppet-packages,njam/puppet-packages,njam/puppet-packages,cargomedia/puppet-packages,vrenetic/puppet-packages,zazabe/puppet-packages,cargomedia/puppet-packages,zazabe/puppet-packages,vrenetic/puppet-packages,njam/puppet-packages,ppp0/puppet-packages,ppp0/puppet-packages,tomaszdurka/puppet-packages,tomaszdurka/puppet-packages,zazabe/puppet-packages,tomaszdurka/puppet-packages,tomaszdurka/puppet-packages,njam/puppet-packages,vrenetic/puppet-packages,zazabe/puppet-packages,vrenetic/puppet-packages,cargomedia/puppet-packages,ppp0/puppet-packages,ppp0/puppet-packages,zazabe/puppet-packages,tomaszdurka/puppet-packages,ppp0/puppet-packages,vrenetic/puppet-packages,tomaszdurka/puppet-packages,vrenetic/puppet-packages,cargomedia/puppet-packages
xml
## Code Before: <useSecurity>true</useSecurity> <authorizationStrategy class="org.jenkinsci.plugins.GithubAuthorizationStrategy" plugin="github-oauth@0.14"> <rootACL> <organizationNameList class="linked-list"> <% @organization_name_list.each do |organization_name| -%> <string><%= organization_name %></string> <% end %> </organizationNameList> <adminUserNameList class="linked-list"> <% @admin_user_name_list.each do |admin_user_name| -%> <string><%= admin_user_name %></string> <% end %> </adminUserNameList> <authenticatedUserReadPermission>false</authenticatedUserReadPermission> <allowGithubWebHookPermission>false</allowGithubWebHookPermission> <allowCcTrayPermission>false</allowCcTrayPermission> <allowAnonymousReadPermission>false</allowAnonymousReadPermission> </rootACL> </authorizationStrategy> <securityRealm class="org.jenkinsci.plugins.GithubSecurityRealm"> <githubWebUri>https://github.com</githubWebUri> <githubApiUri>https://api.github.com</githubApiUri> <clientID><%= @client_id %></clientID> <clientSecret><%= @client_secret %></clientSecret> </securityRealm> ## Instruction: Use matrix authorization strategy for jenkins github oauth plugin ## Code After: <useSecurity>true</useSecurity> <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"> <permission>hudson.model.Item.ViewStatus:anonymous</permission> <% @organization_name_list.each do |organization_name| -%> <permission>hudson.model.Item.Read:<%= organization_name %></permission> <permission>hudson.model.Hudson.Read:<%= organization_name %></permission> <% end %> <% @admin_user_name_list.each do |admin_user_name| -%> <permission>hudson.model.Hudson.Administer:<%= admin_user_name %></permission> <% end %> </authorizationStrategy> <securityRealm class="org.jenkinsci.plugins.GithubSecurityRealm"> <githubWebUri>https://github.com</githubWebUri> <githubApiUri>https://api.github.com</githubApiUri> <clientID><%= @client_id %></clientID> <clientSecret><%= @client_secret %></clientSecret> </securityRealm>
<useSecurity>true</useSecurity> + <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"> + <permission>hudson.model.Item.ViewStatus:anonymous</permission> - <authorizationStrategy class="org.jenkinsci.plugins.GithubAuthorizationStrategy" plugin="github-oauth@0.14"> - <rootACL> - <organizationNameList class="linked-list"> - <% @organization_name_list.each do |organization_name| -%> ? -- + <% @organization_name_list.each do |organization_name| -%> - <string><%= organization_name %></string> + <permission>hudson.model.Item.Read:<%= organization_name %></permission> + <permission>hudson.model.Hudson.Read:<%= organization_name %></permission> - <% end %> ? -- + <% end %> - </organizationNameList> - <adminUserNameList class="linked-list"> - <% @admin_user_name_list.each do |admin_user_name| -%> ? -- + <% @admin_user_name_list.each do |admin_user_name| -%> - <string><%= admin_user_name %></string> + <permission>hudson.model.Hudson.Administer:<%= admin_user_name %></permission> - <% end %> ? -- + <% end %> - </adminUserNameList> - <authenticatedUserReadPermission>false</authenticatedUserReadPermission> - <allowGithubWebHookPermission>false</allowGithubWebHookPermission> - <allowCcTrayPermission>false</allowCcTrayPermission> - <allowAnonymousReadPermission>false</allowAnonymousReadPermission> - </rootACL> </authorizationStrategy> <securityRealm class="org.jenkinsci.plugins.GithubSecurityRealm"> <githubWebUri>https://github.com</githubWebUri> <githubApiUri>https://api.github.com</githubApiUri> <clientID><%= @client_id %></clientID> <clientSecret><%= @client_secret %></clientSecret> </securityRealm>
26
1.04
9
17
e115dae8d7c0ff928b791cb1a94c0a838c22525f
.travis.yml
.travis.yml
--- rvm: - 1.8.7 - 1.9.2 - 1.9.3 - rbx-18mode - rbx-19mode - jruby - ruby-head
--- branches: only: master matrix: allow_failures: - rvm: ruby-head rvm: - 1.8.7 - 1.9.2 - 1.9.3 - rbx-18mode - rbx-19mode - jruby - ruby-head
Allow failure on ruby 2.
Allow failure on ruby 2.
YAML
mit
mikamai/rack-policy,peter-murach/rack-policy
yaml
## Code Before: --- rvm: - 1.8.7 - 1.9.2 - 1.9.3 - rbx-18mode - rbx-19mode - jruby - ruby-head ## Instruction: Allow failure on ruby 2. ## Code After: --- branches: only: master matrix: allow_failures: - rvm: ruby-head rvm: - 1.8.7 - 1.9.2 - 1.9.3 - rbx-18mode - rbx-19mode - jruby - ruby-head
--- + branches: + only: master + matrix: + allow_failures: + - rvm: ruby-head rvm: - 1.8.7 - 1.9.2 - 1.9.3 - rbx-18mode - rbx-19mode - jruby - ruby-head
5
0.555556
5
0
957a0f6b35ecf0f079525d90e74a01a5c42271db
.github/workflows/main.yml
.github/workflows/main.yml
name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Install apt dependencies run: | sudo apt install -y apt-utils clang curl git libblocksruntime-dev libxml2 - uses: actions/setup-python@v1 with: python-version: '3.6' architecture: 'x64' - name: Install the library run: | pip install packaging pip install nbdev - name: Read all notebooks run: | nbdev_read_nbs - name: Check if all notebooks are cleaned run: | echo "Check we are starting with clean git checkout" if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi echo "Trying to strip out notebooks" nbdev_clean_nbs echo "Check that strip out was unnecessary" git status -s # display the status to see which nbs need cleaning up if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi - name: Check if there is no diff library/notebooks run: | if [-n "$(nbdev_diff_nbs)"]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi # - name: Run tests # run: | # nbdev_test_nbs
name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 with: python-version: '3.6' architecture: 'x64' - name: Install the library run: | pip install nbdev jupyter pip install -e . - name: Read all notebooks run: | nbdev_read_nbs - name: Check if all notebooks are cleaned run: | echo "Check we are starting with clean git checkout" if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi echo "Trying to strip out notebooks" nbdev_clean_nbs echo "Check that strip out was unnecessary" git status -s # display the status to see which nbs need cleaning up if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi - name: Check if there is no diff library/notebooks run: | if [-n "$(nbdev_diff_nbs)"]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi # - name: Run tests # run: | # nbdev_test_nbs
Prepare CI for all tests
Prepare CI for all tests
YAML
apache-2.0
fastai/fastai
yaml
## Code Before: name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Install apt dependencies run: | sudo apt install -y apt-utils clang curl git libblocksruntime-dev libxml2 - uses: actions/setup-python@v1 with: python-version: '3.6' architecture: 'x64' - name: Install the library run: | pip install packaging pip install nbdev - name: Read all notebooks run: | nbdev_read_nbs - name: Check if all notebooks are cleaned run: | echo "Check we are starting with clean git checkout" if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi echo "Trying to strip out notebooks" nbdev_clean_nbs echo "Check that strip out was unnecessary" git status -s # display the status to see which nbs need cleaning up if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi - name: Check if there is no diff library/notebooks run: | if [-n "$(nbdev_diff_nbs)"]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi # - name: Run tests # run: | # nbdev_test_nbs ## Instruction: Prepare CI for all tests ## Code After: name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 with: python-version: '3.6' architecture: 'x64' - name: Install the library run: | pip install nbdev jupyter pip install -e . - name: Read all notebooks run: | nbdev_read_nbs - name: Check if all notebooks are cleaned run: | echo "Check we are starting with clean git checkout" if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi echo "Trying to strip out notebooks" nbdev_clean_nbs echo "Check that strip out was unnecessary" git status -s # display the status to see which nbs need cleaning up if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi - name: Check if there is no diff library/notebooks run: | if [-n "$(nbdev_diff_nbs)"]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi # - name: Run tests # run: | # nbdev_test_nbs
name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Install apt dependencies - run: | - sudo apt install -y apt-utils clang curl git libblocksruntime-dev libxml2 - uses: actions/setup-python@v1 with: python-version: '3.6' architecture: 'x64' - name: Install the library run: | - pip install packaging - pip install nbdev + pip install nbdev jupyter ? ++++++++ + pip install -e . - name: Read all notebooks run: | nbdev_read_nbs - name: Check if all notebooks are cleaned run: | echo "Check we are starting with clean git checkout" if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi echo "Trying to strip out notebooks" nbdev_clean_nbs echo "Check that strip out was unnecessary" git status -s # display the status to see which nbs need cleaning up if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi - name: Check if there is no diff library/notebooks run: | if [-n "$(nbdev_diff_nbs)"]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi # - name: Run tests # run: | # nbdev_test_nbs
7
0.194444
2
5
918f42a01be8fad5aa9d5367e384d8a393a6b2f4
{{cookiecutter.project_slug}}/dev-compose.yml
{{cookiecutter.project_slug}}/dev-compose.yml
version: '2' services: django: build: context: . dockerfile: ./compose/develop/django/Dockerfile volumes: - .:/app ports: - "8000:8000"
version: '2' services: django: build: context: . dockerfile: ./compose/develop/django/Dockerfile volumes: - .:/app environment: - USE_DOCKER=yes ports: - "8000:8000"
Set env to make django-debug-toolbar working
Set env to make django-debug-toolbar working
YAML
mit
panuta/cookiecutter-django-startup,panuta/cookiecutter-django-startup,panuta/cookiecutter-django-startup,panuta/cookiecutter-django-startup
yaml
## Code Before: version: '2' services: django: build: context: . dockerfile: ./compose/develop/django/Dockerfile volumes: - .:/app ports: - "8000:8000" ## Instruction: Set env to make django-debug-toolbar working ## Code After: version: '2' services: django: build: context: . dockerfile: ./compose/develop/django/Dockerfile volumes: - .:/app environment: - USE_DOCKER=yes ports: - "8000:8000"
version: '2' services: django: build: context: . dockerfile: ./compose/develop/django/Dockerfile volumes: - .:/app + environment: + - USE_DOCKER=yes ports: - "8000:8000"
2
0.181818
2
0
4a9e5b8400456fdb397ec1e737c47ca3d861d804
streaming/main.go
streaming/main.go
package main import ( "fmt" "github.com/ant0ine/go-json-rest/rest" "log" "net/http" "time" ) func main() { router, err := rest.MakeRouter( &rest.Route{"GET", "/stream", StreamThings}, ) if err != nil { log.Fatal(err) } api := rest.NewApi(router) api.Use(&rest.AccessLogApacheMiddleware{}) api.Use(&rest.TimerMiddleware{}) api.Use(&rest.RecorderMiddleware{}) api.Use(&rest.RecoverMiddleware{}) log.Fatal(http.ListenAndServe(":8080", api.MakeHandler())) } type Thing struct { Name string } func StreamThings(w rest.ResponseWriter, r *rest.Request) { cpt := 0 for { cpt++ w.WriteJson( &Thing{ Name: fmt.Sprintf("thing #%d", cpt), }, ) w.(http.ResponseWriter).Write([]byte("\n")) // Flush the buffer to client w.(http.Flusher).Flush() // wait 3 seconds time.Sleep(time.Duration(3) * time.Second) } }
package main import ( "fmt" "github.com/ant0ine/go-json-rest/rest" "log" "net/http" "time" ) func main() { router, err := rest.MakeRouter( &rest.Route{"GET", "/stream", StreamThings}, ) if err != nil { log.Fatal(err) } api := rest.NewApi(router) api.Use(&rest.AccessLogApacheMiddleware{}) api.Use(rest.DefaultCommonStack...) log.Fatal(http.ListenAndServe(":8080", api.MakeHandler())) } type Thing struct { Name string } func StreamThings(w rest.ResponseWriter, r *rest.Request) { cpt := 0 for { cpt++ w.WriteJson( &Thing{ Name: fmt.Sprintf("thing #%d", cpt), }, ) w.(http.ResponseWriter).Write([]byte("\n")) // Flush the buffer to client w.(http.Flusher).Flush() // wait 3 seconds time.Sleep(time.Duration(3) * time.Second) } }
Make use of the common stack
Make use of the common stack
Go
mit
jacobxk/go-json-rest-examples,ant0ine/go-json-rest-examples,snowsnail/go-json-rest-examples
go
## Code Before: package main import ( "fmt" "github.com/ant0ine/go-json-rest/rest" "log" "net/http" "time" ) func main() { router, err := rest.MakeRouter( &rest.Route{"GET", "/stream", StreamThings}, ) if err != nil { log.Fatal(err) } api := rest.NewApi(router) api.Use(&rest.AccessLogApacheMiddleware{}) api.Use(&rest.TimerMiddleware{}) api.Use(&rest.RecorderMiddleware{}) api.Use(&rest.RecoverMiddleware{}) log.Fatal(http.ListenAndServe(":8080", api.MakeHandler())) } type Thing struct { Name string } func StreamThings(w rest.ResponseWriter, r *rest.Request) { cpt := 0 for { cpt++ w.WriteJson( &Thing{ Name: fmt.Sprintf("thing #%d", cpt), }, ) w.(http.ResponseWriter).Write([]byte("\n")) // Flush the buffer to client w.(http.Flusher).Flush() // wait 3 seconds time.Sleep(time.Duration(3) * time.Second) } } ## Instruction: Make use of the common stack ## Code After: package main import ( "fmt" "github.com/ant0ine/go-json-rest/rest" "log" "net/http" "time" ) func main() { router, err := rest.MakeRouter( &rest.Route{"GET", "/stream", StreamThings}, ) if err != nil { log.Fatal(err) } api := rest.NewApi(router) api.Use(&rest.AccessLogApacheMiddleware{}) api.Use(rest.DefaultCommonStack...) log.Fatal(http.ListenAndServe(":8080", api.MakeHandler())) } type Thing struct { Name string } func StreamThings(w rest.ResponseWriter, r *rest.Request) { cpt := 0 for { cpt++ w.WriteJson( &Thing{ Name: fmt.Sprintf("thing #%d", cpt), }, ) w.(http.ResponseWriter).Write([]byte("\n")) // Flush the buffer to client w.(http.Flusher).Flush() // wait 3 seconds time.Sleep(time.Duration(3) * time.Second) } }
package main import ( "fmt" "github.com/ant0ine/go-json-rest/rest" "log" "net/http" "time" ) func main() { - router, err := rest.MakeRouter( &rest.Route{"GET", "/stream", StreamThings}, ) if err != nil { log.Fatal(err) } api := rest.NewApi(router) api.Use(&rest.AccessLogApacheMiddleware{}) + api.Use(rest.DefaultCommonStack...) - api.Use(&rest.TimerMiddleware{}) - api.Use(&rest.RecorderMiddleware{}) - api.Use(&rest.RecoverMiddleware{}) - log.Fatal(http.ListenAndServe(":8080", api.MakeHandler())) } type Thing struct { Name string } func StreamThings(w rest.ResponseWriter, r *rest.Request) { cpt := 0 for { cpt++ w.WriteJson( &Thing{ Name: fmt.Sprintf("thing #%d", cpt), }, ) w.(http.ResponseWriter).Write([]byte("\n")) // Flush the buffer to client w.(http.Flusher).Flush() // wait 3 seconds time.Sleep(time.Duration(3) * time.Second) } }
6
0.125
1
5
a7ef84f88ed620bd1ba94480a4aa0517b06e76fc
README.md
README.md
Nebula Grails Plugin ==================== ![Support Status](https://img.shields.io/badge/nebula-supported-brightgreen.svg) [![Build Status](https://travis-ci.org/nebula-plugins/nebula-grails-plugin.svg?branch=master)](https://travis-ci.org/nebula-plugins/nebula-grails-plugin) [![Coverage Status](https://coveralls.io/repos/nebula-plugins/nebula-grails-plugin/badge.svg?branch=master&service=github)](https://coveralls.io/github/nebula-plugins/nebula-grails-plugin?branch=master) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nebula-plugins/nebula-grails-plugin?utm_source=badgeutm_medium=badgeutm_campaign=pr-badge) [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-metrics-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) Fork of the Grails 2.x Gradle plugin providing later Gradle version and plugin portal support. # Quick Start Refer to the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/nebula.grails) for instructions on how to apply the plugin.
Nebula Grails Plugin ==================== ![Support Status](https://img.shields.io/badge/nebula-inactive-red.svg) [![Build Status](https://travis-ci.org/nebula-plugins/nebula-grails-plugin.svg?branch=master)](https://travis-ci.org/nebula-plugins/nebula-grails-plugin) [![Coverage Status](https://coveralls.io/repos/nebula-plugins/nebula-grails-plugin/badge.svg?branch=master&service=github)](https://coveralls.io/github/nebula-plugins/nebula-grails-plugin?branch=master) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nebula-plugins/nebula-grails-plugin?utm_source=badgeutm_medium=badgeutm_campaign=pr-badge) [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-metrics-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) Fork of the Grails 2.x Gradle plugin providing later Gradle version and plugin portal support. # Quick Start Refer to the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/nebula.grails) for instructions on how to apply the plugin.
Mark this project as inactive
Mark this project as inactive
Markdown
mit
nebula-plugins/nebula-grails-plugin
markdown
## Code Before: Nebula Grails Plugin ==================== ![Support Status](https://img.shields.io/badge/nebula-supported-brightgreen.svg) [![Build Status](https://travis-ci.org/nebula-plugins/nebula-grails-plugin.svg?branch=master)](https://travis-ci.org/nebula-plugins/nebula-grails-plugin) [![Coverage Status](https://coveralls.io/repos/nebula-plugins/nebula-grails-plugin/badge.svg?branch=master&service=github)](https://coveralls.io/github/nebula-plugins/nebula-grails-plugin?branch=master) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nebula-plugins/nebula-grails-plugin?utm_source=badgeutm_medium=badgeutm_campaign=pr-badge) [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-metrics-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) Fork of the Grails 2.x Gradle plugin providing later Gradle version and plugin portal support. # Quick Start Refer to the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/nebula.grails) for instructions on how to apply the plugin. ## Instruction: Mark this project as inactive ## Code After: Nebula Grails Plugin ==================== ![Support Status](https://img.shields.io/badge/nebula-inactive-red.svg) [![Build Status](https://travis-ci.org/nebula-plugins/nebula-grails-plugin.svg?branch=master)](https://travis-ci.org/nebula-plugins/nebula-grails-plugin) [![Coverage Status](https://coveralls.io/repos/nebula-plugins/nebula-grails-plugin/badge.svg?branch=master&service=github)](https://coveralls.io/github/nebula-plugins/nebula-grails-plugin?branch=master) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nebula-plugins/nebula-grails-plugin?utm_source=badgeutm_medium=badgeutm_campaign=pr-badge) [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-metrics-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) Fork of the Grails 2.x Gradle plugin providing later Gradle version and plugin portal support. # Quick Start Refer to the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/nebula.grails) for instructions on how to apply the plugin.
Nebula Grails Plugin ==================== - ![Support Status](https://img.shields.io/badge/nebula-supported-brightgreen.svg) ? ^^^^^ - ------------ + ![Support Status](https://img.shields.io/badge/nebula-inactive-red.svg) ? ^^^^^^^^^ [![Build Status](https://travis-ci.org/nebula-plugins/nebula-grails-plugin.svg?branch=master)](https://travis-ci.org/nebula-plugins/nebula-grails-plugin) [![Coverage Status](https://coveralls.io/repos/nebula-plugins/nebula-grails-plugin/badge.svg?branch=master&service=github)](https://coveralls.io/github/nebula-plugins/nebula-grails-plugin?branch=master) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nebula-plugins/nebula-grails-plugin?utm_source=badgeutm_medium=badgeutm_campaign=pr-badge) [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-metrics-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) Fork of the Grails 2.x Gradle plugin providing later Gradle version and plugin portal support. # Quick Start Refer to the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/nebula.grails) for instructions on how to apply the plugin.
2
0.142857
1
1
cfa32de7fb24d29cd7fbf52e1d1822f61a6db8c5
index.js
index.js
'use strict'; var fs = require('fs'); var spawnSync = require('child_process').spawnSync; var HttpResponse = require('http-response-object'); require('concat-stream'); require('then-request'); var JSON = require('./lib/json-buffer'); Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8')); module.exports = doRequest; function doRequest(method, url, options) { if (!spawnSync) { throw new Error( 'Sync-request requires node version 0.12 or later. If you need to use it with an older version of node\n' + 'you can `npm install spawn-sync@2.2.0`, which was the last version to support older versions of node.' ); } var req = JSON.stringify({ method: method, url: url, options: options }); var res = spawnSync(process.execPath, [require.resolve('./lib/worker.js')], {input: req}); if (res.status !== 0) { throw new Error(res.stderr.toString()); } if (res.error) { if (typeof res.error === 'string') res.error = new Error(res.error); throw res.error; } var response = JSON.parse(res.stdout); if (response.success) { return new HttpResponse(response.response.statusCode, response.response.headers, response.response.body, response.response.url); } else { throw new Error(response.error.message || response.error || response); } }
'use strict'; var fs = require('fs'); var spawnSync = require('child_process').spawnSync; var HttpResponse = require('http-response-object'); require('concat-stream'); require('then-request'); var JSON = require('./lib/json-buffer'); Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8')); module.exports = doRequest; function doRequest(method, url, options) { if (!spawnSync) { throw new Error( 'Sync-request requires node version 0.12 or later. If you need to use it with an older version of node\n' + 'you can `npm install sync-request@2.2.0`, which was the last version to support older versions of node.' ); } var req = JSON.stringify({ method: method, url: url, options: options }); var res = spawnSync(process.execPath, [require.resolve('./lib/worker.js')], {input: req}); if (res.status !== 0) { throw new Error(res.stderr.toString()); } if (res.error) { if (typeof res.error === 'string') res.error = new Error(res.error); throw res.error; } var response = JSON.parse(res.stdout); if (response.success) { return new HttpResponse(response.response.statusCode, response.response.headers, response.response.body, response.response.url); } else { throw new Error(response.error.message || response.error || response); } }
Fix suggested npm install command.
Fix suggested npm install command. Instructions were pointing to the wrong project.
JavaScript
mit
ForbesLindesay/sync-request,ForbesLindesay/sync-request
javascript
## Code Before: 'use strict'; var fs = require('fs'); var spawnSync = require('child_process').spawnSync; var HttpResponse = require('http-response-object'); require('concat-stream'); require('then-request'); var JSON = require('./lib/json-buffer'); Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8')); module.exports = doRequest; function doRequest(method, url, options) { if (!spawnSync) { throw new Error( 'Sync-request requires node version 0.12 or later. If you need to use it with an older version of node\n' + 'you can `npm install spawn-sync@2.2.0`, which was the last version to support older versions of node.' ); } var req = JSON.stringify({ method: method, url: url, options: options }); var res = spawnSync(process.execPath, [require.resolve('./lib/worker.js')], {input: req}); if (res.status !== 0) { throw new Error(res.stderr.toString()); } if (res.error) { if (typeof res.error === 'string') res.error = new Error(res.error); throw res.error; } var response = JSON.parse(res.stdout); if (response.success) { return new HttpResponse(response.response.statusCode, response.response.headers, response.response.body, response.response.url); } else { throw new Error(response.error.message || response.error || response); } } ## Instruction: Fix suggested npm install command. Instructions were pointing to the wrong project. ## Code After: 'use strict'; var fs = require('fs'); var spawnSync = require('child_process').spawnSync; var HttpResponse = require('http-response-object'); require('concat-stream'); require('then-request'); var JSON = require('./lib/json-buffer'); Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8')); module.exports = doRequest; function doRequest(method, url, options) { if (!spawnSync) { throw new Error( 'Sync-request requires node version 0.12 or later. If you need to use it with an older version of node\n' + 'you can `npm install sync-request@2.2.0`, which was the last version to support older versions of node.' ); } var req = JSON.stringify({ method: method, url: url, options: options }); var res = spawnSync(process.execPath, [require.resolve('./lib/worker.js')], {input: req}); if (res.status !== 0) { throw new Error(res.stderr.toString()); } if (res.error) { if (typeof res.error === 'string') res.error = new Error(res.error); throw res.error; } var response = JSON.parse(res.stdout); if (response.success) { return new HttpResponse(response.response.statusCode, response.response.headers, response.response.body, response.response.url); } else { throw new Error(response.error.message || response.error || response); } }
'use strict'; var fs = require('fs'); var spawnSync = require('child_process').spawnSync; var HttpResponse = require('http-response-object'); require('concat-stream'); require('then-request'); var JSON = require('./lib/json-buffer'); Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8')); module.exports = doRequest; function doRequest(method, url, options) { if (!spawnSync) { throw new Error( 'Sync-request requires node version 0.12 or later. If you need to use it with an older version of node\n' + - 'you can `npm install spawn-sync@2.2.0`, which was the last version to support older versions of node.' ? ------ + 'you can `npm install sync-request@2.2.0`, which was the last version to support older versions of node.' ? ++++++++ ); } var req = JSON.stringify({ method: method, url: url, options: options }); var res = spawnSync(process.execPath, [require.resolve('./lib/worker.js')], {input: req}); if (res.status !== 0) { throw new Error(res.stderr.toString()); } if (res.error) { if (typeof res.error === 'string') res.error = new Error(res.error); throw res.error; } var response = JSON.parse(res.stdout); if (response.success) { return new HttpResponse(response.response.statusCode, response.response.headers, response.response.body, response.response.url); } else { throw new Error(response.error.message || response.error || response); } }
2
0.051282
1
1
f99b027ac28f32b26cbf4138c77c319d3f6a193e
public/modules/oauth2/views/authorization.view.html
public/modules/oauth2/views/authorization.view.html
<p>Hi {{ oauth2.user.displayName }}!</p> <p><b>{{ oauth2.client.name }}</b> is requesting access to your account.</p> <p>Do you approve?</p> <form method="post" action="/dialog/authorize/decision"> <input name="transaction_id" type="hidden" ng-value="oauth2.transactionID"> <div> <input type="submit" name="allow" value="Allow"> <input type="submit" name="deny" value ="Deny"> </div> </form>
<p>Hi {{ oauth2.user.displayName }}!</p> <p><b>{{ oauth2.client.name }}</b> is requesting access to your account.</p> <p>Do you approve?</p> <form method="post" action="/dialog/authorize/decision"> <input name="transaction_id" type="hidden" ng-value="oauth2.transactionID"> <div> <input type="submit" value="Allow"> <input type="submit" name="cancel" value="Deny"> </div> </form>
Fix bug ignoring user's refusal
Fix bug ignoring user's refusal
HTML
agpl-3.0
BuggleInc/PLM-accounts,MatthieuNICOLAS/PLMAccounts,BuggleInc/PLM-accounts,MatthieuNICOLAS/PLMAccounts,BuggleInc/PLM-accounts,MatthieuNICOLAS/PLMAccounts
html
## Code Before: <p>Hi {{ oauth2.user.displayName }}!</p> <p><b>{{ oauth2.client.name }}</b> is requesting access to your account.</p> <p>Do you approve?</p> <form method="post" action="/dialog/authorize/decision"> <input name="transaction_id" type="hidden" ng-value="oauth2.transactionID"> <div> <input type="submit" name="allow" value="Allow"> <input type="submit" name="deny" value ="Deny"> </div> </form> ## Instruction: Fix bug ignoring user's refusal ## Code After: <p>Hi {{ oauth2.user.displayName }}!</p> <p><b>{{ oauth2.client.name }}</b> is requesting access to your account.</p> <p>Do you approve?</p> <form method="post" action="/dialog/authorize/decision"> <input name="transaction_id" type="hidden" ng-value="oauth2.transactionID"> <div> <input type="submit" value="Allow"> <input type="submit" name="cancel" value="Deny"> </div> </form>
<p>Hi {{ oauth2.user.displayName }}!</p> <p><b>{{ oauth2.client.name }}</b> is requesting access to your account.</p> <p>Do you approve?</p> <form method="post" action="/dialog/authorize/decision"> <input name="transaction_id" type="hidden" ng-value="oauth2.transactionID"> <div> - <input type="submit" name="allow" value="Allow"> ? ------------- + <input type="submit" value="Allow"> - <input type="submit" name="deny" value ="Deny"> ? ^ ^^ - + <input type="submit" name="cancel" value="Deny"> ? ^^^^ ^ </div> </form>
4
0.363636
2
2
317a34d603af75c96e2ed3fe972cb93824b840d0
cookbooks/fish/files/.config/fish/conf.d/basic.fish
cookbooks/fish/files/.config/fish/conf.d/basic.fish
export EDITOR="nvim" export XDG_CONFIG_HOME="$HOME/.config" export PAGER="less" export LESS="-g -i -M -R -S -W -z-4 -x4" export PATH="$HOME/.bin:$PATH" export PATH="$PATH:/usr/local/sbin" ## Set Locale export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LANG="en_US.UTF-8"
export EDITOR="nvim" export XDG_CONFIG_HOME="$HOME/.config" export PAGER="less" export LESS="-g -i -M -R -S -W -z-4 -x4" export PATH="$HOME/.bin:$PATH" ## Set Locale export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LANG="en_US.UTF-8"
Revert "Add /usr/local/sbin in $PATH"
Revert "Add /usr/local/sbin in $PATH" This reverts commit fd131ca67fab8608af69a652b06989c6dbfbd10d.
fish
mit
tsub/dotfiles,tsub/dotfiles,tsub/dotfiles,tsub/dotfiles,tsub/dotfiles
fish
## Code Before: export EDITOR="nvim" export XDG_CONFIG_HOME="$HOME/.config" export PAGER="less" export LESS="-g -i -M -R -S -W -z-4 -x4" export PATH="$HOME/.bin:$PATH" export PATH="$PATH:/usr/local/sbin" ## Set Locale export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LANG="en_US.UTF-8" ## Instruction: Revert "Add /usr/local/sbin in $PATH" This reverts commit fd131ca67fab8608af69a652b06989c6dbfbd10d. ## Code After: export EDITOR="nvim" export XDG_CONFIG_HOME="$HOME/.config" export PAGER="less" export LESS="-g -i -M -R -S -W -z-4 -x4" export PATH="$HOME/.bin:$PATH" ## Set Locale export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LANG="en_US.UTF-8"
export EDITOR="nvim" export XDG_CONFIG_HOME="$HOME/.config" export PAGER="less" export LESS="-g -i -M -R -S -W -z-4 -x4" export PATH="$HOME/.bin:$PATH" - export PATH="$PATH:/usr/local/sbin" ## Set Locale export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LANG="en_US.UTF-8"
1
0.090909
0
1
dea1046b6d7c4feddf1ba75b6f39240c7e660796
.travis.yml
.travis.yml
language: php before_script: - sudo apt-get install liblocal-lib-perl - perl --version - curl -L http://cpanmin.us | sudo perl - --self-upgrade # - export CI_USER=$USER # - mkdir ~/perl5 - perl -Mlocal::lib >> /tmp/local_lib_junk.sh && source /tmp/local_lib_junk.sh - sudo chown -R $CI_USER ~/.cpanm - sudo chown -R $CI_USER ~/perl5 - cpanm -n Test::Most Test::WWW::Mechanize Test::JSON URL::Encode php: - 5.2 - 5.3 - 5.4 script: "make fulltest" env: - export CASHMUSIC_TEST_URL = 'http://dev.cashmusic.org:8080'
language: php before_script: - env - sudo apt-get install liblocal-lib-perl - perl --version - curl -L http://cpanmin.us | sudo perl - --self-upgrade # - export CI_USER=$USER # - mkdir ~/perl5 - perl -Mlocal::lib >> /tmp/local_lib_junk.sh && source /tmp/local_lib_junk.sh - sudo chown -R $CI_USER ~/.cpanm - sudo chown -R $CI_USER ~/perl5 - cpanm -n Test::Most Test::WWW::Mechanize Test::JSON URL::Encode php: - 5.2 - 5.3 - 5.4 script: "make fulltest" env: - CI_USER=vagrant CASHMUSIC_TEST_URL = 'http://dev.cashmusic.org:8080'
Fix permissions related to worker changes
[ci] Fix permissions related to worker changes
YAML
agpl-3.0
kidaa30/platform,kidaa30/platform,gabrielbellamy/platform,kidaa30/platform,gabrielbellamy/platform,gabrielbellamy/platform
yaml
## Code Before: language: php before_script: - sudo apt-get install liblocal-lib-perl - perl --version - curl -L http://cpanmin.us | sudo perl - --self-upgrade # - export CI_USER=$USER # - mkdir ~/perl5 - perl -Mlocal::lib >> /tmp/local_lib_junk.sh && source /tmp/local_lib_junk.sh - sudo chown -R $CI_USER ~/.cpanm - sudo chown -R $CI_USER ~/perl5 - cpanm -n Test::Most Test::WWW::Mechanize Test::JSON URL::Encode php: - 5.2 - 5.3 - 5.4 script: "make fulltest" env: - export CASHMUSIC_TEST_URL = 'http://dev.cashmusic.org:8080' ## Instruction: [ci] Fix permissions related to worker changes ## Code After: language: php before_script: - env - sudo apt-get install liblocal-lib-perl - perl --version - curl -L http://cpanmin.us | sudo perl - --self-upgrade # - export CI_USER=$USER # - mkdir ~/perl5 - perl -Mlocal::lib >> /tmp/local_lib_junk.sh && source /tmp/local_lib_junk.sh - sudo chown -R $CI_USER ~/.cpanm - sudo chown -R $CI_USER ~/perl5 - cpanm -n Test::Most Test::WWW::Mechanize Test::JSON URL::Encode php: - 5.2 - 5.3 - 5.4 script: "make fulltest" env: - CI_USER=vagrant CASHMUSIC_TEST_URL = 'http://dev.cashmusic.org:8080'
language: php before_script: + - env - sudo apt-get install liblocal-lib-perl - perl --version - curl -L http://cpanmin.us | sudo perl - --self-upgrade # - export CI_USER=$USER # - mkdir ~/perl5 - perl -Mlocal::lib >> /tmp/local_lib_junk.sh && source /tmp/local_lib_junk.sh - sudo chown -R $CI_USER ~/.cpanm - sudo chown -R $CI_USER ~/perl5 - cpanm -n Test::Most Test::WWW::Mechanize Test::JSON URL::Encode php: - 5.2 - 5.3 - 5.4 script: "make fulltest" env: - - export CASHMUSIC_TEST_URL = 'http://dev.cashmusic.org:8080' ? ^^^^ + - CI_USER=vagrant CASHMUSIC_TEST_URL = 'http://dev.cashmusic.org:8080' ? ^^^^^^^^^^^ ++
3
0.166667
2
1
d56522b88d9204f090ccffc94f2773b34faab712
src/lib/stitching/vortex/schema.ts
src/lib/stitching/vortex/schema.ts
import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {}) => { const vortexLink = createVortexLink() const vortexTypeDefs = readFileSync("src/data/vortex.graphql", "utf8") // Setup the default Schema const schema = makeRemoteExecutableSchema({ schema: vortexTypeDefs, link: vortexLink, }) const removeRootFieldList = [ "pricingContext", "partnerStat", "userStat", "BigInt", ] const filterTransform = new FilterRootFields( (_operation, name) => !removeRootFieldList.includes(name) ) const transforms = [ ...(removeRootFields ? [filterTransform] : []), new RenameTypes((name) => { if ( name.includes("PriceInsight") || name.includes("PageCursor") || ["BigInt", "ISO8601DateTime"].includes(name) ) { return name } else { return `Analytics${name}` } }), new RenameRootFields((_operation, name) => { if (["priceInsights", "marketPriceInsights"].includes(name)) { return name } else { return `analytics${name.charAt(0).toUpperCase() + name.slice(1)}` } }), ] return transformSchema(schema, transforms) }
import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {}) => { const vortexLink = createVortexLink() const vortexTypeDefs = readFileSync("src/data/vortex.graphql", "utf8") // Setup the default Schema const schema = makeRemoteExecutableSchema({ schema: vortexTypeDefs, link: vortexLink, }) const rootFieldsToFilter = [ "pricingContext", "partnerStat", "userStat", "BigInt", ] const filterTransform = new FilterRootFields( (_operation, name) => !rootFieldsToFilter.includes(name) ) const transforms = [ ...(removeRootFields ? [filterTransform] : []), new RenameTypes((name) => { if ( name.includes("PriceInsight") || name.includes("PageCursor") || ["BigInt", "ISO8601DateTime"].includes(name) ) { return name } else { return `Analytics${name}` } }), new RenameRootFields((_operation, name) => { if (["priceInsights", "marketPriceInsights"].includes(name)) { return name } else { return `analytics${name.charAt(0).toUpperCase() + name.slice(1)}` } }), ] return transformSchema(schema, transforms) }
Use better name for list of fields to filter
Use better name for list of fields to filter
TypeScript
mit
artsy/metaphysics,artsy/metaphysics,artsy/metaphysics
typescript
## Code Before: import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {}) => { const vortexLink = createVortexLink() const vortexTypeDefs = readFileSync("src/data/vortex.graphql", "utf8") // Setup the default Schema const schema = makeRemoteExecutableSchema({ schema: vortexTypeDefs, link: vortexLink, }) const removeRootFieldList = [ "pricingContext", "partnerStat", "userStat", "BigInt", ] const filterTransform = new FilterRootFields( (_operation, name) => !removeRootFieldList.includes(name) ) const transforms = [ ...(removeRootFields ? [filterTransform] : []), new RenameTypes((name) => { if ( name.includes("PriceInsight") || name.includes("PageCursor") || ["BigInt", "ISO8601DateTime"].includes(name) ) { return name } else { return `Analytics${name}` } }), new RenameRootFields((_operation, name) => { if (["priceInsights", "marketPriceInsights"].includes(name)) { return name } else { return `analytics${name.charAt(0).toUpperCase() + name.slice(1)}` } }), ] return transformSchema(schema, transforms) } ## Instruction: Use better name for list of fields to filter ## Code After: import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {}) => { const vortexLink = createVortexLink() const vortexTypeDefs = readFileSync("src/data/vortex.graphql", "utf8") // Setup the default Schema const schema = makeRemoteExecutableSchema({ schema: vortexTypeDefs, link: vortexLink, }) const rootFieldsToFilter = [ "pricingContext", "partnerStat", "userStat", "BigInt", ] const filterTransform = new FilterRootFields( (_operation, name) => !rootFieldsToFilter.includes(name) ) const transforms = [ ...(removeRootFields ? [filterTransform] : []), new RenameTypes((name) => { if ( name.includes("PriceInsight") || name.includes("PageCursor") || ["BigInt", "ISO8601DateTime"].includes(name) ) { return name } else { return `Analytics${name}` } }), new RenameRootFields((_operation, name) => { if (["priceInsights", "marketPriceInsights"].includes(name)) { return name } else { return `analytics${name.charAt(0).toUpperCase() + name.slice(1)}` } }), ] return transformSchema(schema, transforms) }
import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {}) => { const vortexLink = createVortexLink() const vortexTypeDefs = readFileSync("src/data/vortex.graphql", "utf8") // Setup the default Schema const schema = makeRemoteExecutableSchema({ schema: vortexTypeDefs, link: vortexLink, }) - const removeRootFieldList = [ ? ------ ^ ^ + const rootFieldsToFilter = [ ? ^^^^ ^ ++ "pricingContext", "partnerStat", "userStat", "BigInt", ] const filterTransform = new FilterRootFields( - (_operation, name) => !removeRootFieldList.includes(name) ? ------ ^ ^ + (_operation, name) => !rootFieldsToFilter.includes(name) ? ^^^^ ^ ++ ) const transforms = [ ...(removeRootFields ? [filterTransform] : []), new RenameTypes((name) => { if ( name.includes("PriceInsight") || name.includes("PageCursor") || ["BigInt", "ISO8601DateTime"].includes(name) ) { return name } else { return `Analytics${name}` } }), new RenameRootFields((_operation, name) => { if (["priceInsights", "marketPriceInsights"].includes(name)) { return name } else { return `analytics${name.charAt(0).toUpperCase() + name.slice(1)}` } }), ] return transformSchema(schema, transforms) }
4
0.070175
2
2
bc661f593af30833729b69fec4a961a77cc43ff9
data/districts.json
data/districts.json
[ { "name": "Mitte", "lat" : "52.5316627", "lng" : "13.3897105", "zoom": "15" }, { "name": "Prenzlauer Berg", "lat" : "52.5377114", "lng" : "13.4284134", "zoom": "15" }, { "name": "Neukolln", "lat" : "52.4772373", "lng" : "13.4386168", "zoom": "14" }, { "name": "Kreuzberg", "lat" : "52.4965738", "lng" : "13.4108379", "zoom": "15" }, { "name": "Friedrichain", "lat" : "52.5085378", "lng" : "13.4557724", "zoom": "15" } ]
[ { "name": "Mitte", "lat" : "52.5316627", "lng" : "13.3897105", "zoom": 15 }, { "name": "Prenzlauer Berg", "lat" : "52.5377114", "lng" : "13.4284134", "zoom": 15 }, { "name": "Neukolln", "lat" : "52.4772373", "lng" : "13.4386168", "zoom": 14 }, { "name": "Kreuzberg", "lat" : "52.4965738", "lng" : "13.4108379", "zoom": 15 }, { "name": "Friedrichain", "lat" : "52.5085378", "lng" : "13.4557724", "zoom": 15 } ]
Fix zoom levels should be integers not string
Fix zoom levels should be integers not string
JSON
agpl-3.0
kostspielig/eatout,kostspielig/eatout,kostspielig/eatout,kostspielig/eatout,kostspielig/eatout,kostspielig/eatout
json
## Code Before: [ { "name": "Mitte", "lat" : "52.5316627", "lng" : "13.3897105", "zoom": "15" }, { "name": "Prenzlauer Berg", "lat" : "52.5377114", "lng" : "13.4284134", "zoom": "15" }, { "name": "Neukolln", "lat" : "52.4772373", "lng" : "13.4386168", "zoom": "14" }, { "name": "Kreuzberg", "lat" : "52.4965738", "lng" : "13.4108379", "zoom": "15" }, { "name": "Friedrichain", "lat" : "52.5085378", "lng" : "13.4557724", "zoom": "15" } ] ## Instruction: Fix zoom levels should be integers not string ## Code After: [ { "name": "Mitte", "lat" : "52.5316627", "lng" : "13.3897105", "zoom": 15 }, { "name": "Prenzlauer Berg", "lat" : "52.5377114", "lng" : "13.4284134", "zoom": 15 }, { "name": "Neukolln", "lat" : "52.4772373", "lng" : "13.4386168", "zoom": 14 }, { "name": "Kreuzberg", "lat" : "52.4965738", "lng" : "13.4108379", "zoom": 15 }, { "name": "Friedrichain", "lat" : "52.5085378", "lng" : "13.4557724", "zoom": 15 } ]
[ { "name": "Mitte", "lat" : "52.5316627", "lng" : "13.3897105", - "zoom": "15" ? - - + "zoom": 15 }, { "name": "Prenzlauer Berg", "lat" : "52.5377114", "lng" : "13.4284134", - "zoom": "15" ? - -- + "zoom": 15 }, { "name": "Neukolln", "lat" : "52.4772373", "lng" : "13.4386168", - "zoom": "14" ? - - + "zoom": 14 }, { "name": "Kreuzberg", "lat" : "52.4965738", "lng" : "13.4108379", - "zoom": "15" ? - - + "zoom": 15 }, { "name": "Friedrichain", "lat" : "52.5085378", "lng" : "13.4557724", - "zoom": "15" ? - - + "zoom": 15 } ]
10
0.37037
5
5
5506d18d9d3621e5c9b3cc16b7d34e9b2b1fb4fe
cookbooks/sysfs/recipes/default.rb
cookbooks/sysfs/recipes/default.rb
if node[:virtualization][:role] == "guest" && node[:virtualization][:system] == "lxd" package "sysfsutils" do action :purge end else package "sysfsutils" service "sysfsutils" do action :enable supports :status => false, :restart => true, :reload => false end template "/etc/sysfs.conf" do source "sysfs.conf.erb" owner "root" group "root" mode 0o644 notifies :restart, "service[sysfsutils]" end node[:sysfs].each_value do |group| group[:parameters].each do |key, value| sysfs_file = "/sys/#{key}" file sysfs_file do content "#{value}\n" atomic_update false ignore_failure true end end end end
if node[:virtualization][:role] == "guest" && node[:virtualization][:system] == "lxd" package "sysfsutils" do action :purge end else package "sysfsutils" service "sysfsutils" do action :enable supports :status => false, :restart => true, :reload => false end file "/etc/sysfs.conf" do action :delete end template "/etc/sysfs.d/99-chef.conf" do source "sysfs.conf.erb" owner "root" group "root" mode 0o644 notifies :restart, "service[sysfsutils]" end node[:sysfs].each_value do |group| group[:parameters].each do |key, value| sysfs_file = "/sys/#{key}" file sysfs_file do content "#{value}\n" atomic_update false ignore_failure true end end end end
Use a dropin file to configure sysfsutils
Use a dropin file to configure sysfsutils
Ruby
apache-2.0
zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,openstreetmap/chef,zerebubuth/openstreetmap-chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,openstreetmap/chef,openstreetmap/chef,openstreetmap/chef,openstreetmap/chef,tomhughes/openstreetmap-chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,tomhughes/openstreetmap-chef,zerebubuth/openstreetmap-chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,openstreetmap/chef,openstreetmap/chef,zerebubuth/openstreetmap-chef
ruby
## Code Before: if node[:virtualization][:role] == "guest" && node[:virtualization][:system] == "lxd" package "sysfsutils" do action :purge end else package "sysfsutils" service "sysfsutils" do action :enable supports :status => false, :restart => true, :reload => false end template "/etc/sysfs.conf" do source "sysfs.conf.erb" owner "root" group "root" mode 0o644 notifies :restart, "service[sysfsutils]" end node[:sysfs].each_value do |group| group[:parameters].each do |key, value| sysfs_file = "/sys/#{key}" file sysfs_file do content "#{value}\n" atomic_update false ignore_failure true end end end end ## Instruction: Use a dropin file to configure sysfsutils ## Code After: if node[:virtualization][:role] == "guest" && node[:virtualization][:system] == "lxd" package "sysfsutils" do action :purge end else package "sysfsutils" service "sysfsutils" do action :enable supports :status => false, :restart => true, :reload => false end file "/etc/sysfs.conf" do action :delete end template "/etc/sysfs.d/99-chef.conf" do source "sysfs.conf.erb" owner "root" group "root" mode 0o644 notifies :restart, "service[sysfsutils]" end node[:sysfs].each_value do |group| group[:parameters].each do |key, value| sysfs_file = "/sys/#{key}" file sysfs_file do content "#{value}\n" atomic_update false ignore_failure true end end end end
if node[:virtualization][:role] == "guest" && node[:virtualization][:system] == "lxd" package "sysfsutils" do action :purge end else package "sysfsutils" service "sysfsutils" do action :enable supports :status => false, :restart => true, :reload => false end - template "/etc/sysfs.conf" do ? ^^^^ -- + file "/etc/sysfs.conf" do ? ^^ + action :delete + end + + template "/etc/sysfs.d/99-chef.conf" do source "sysfs.conf.erb" owner "root" group "root" mode 0o644 notifies :restart, "service[sysfsutils]" end node[:sysfs].each_value do |group| group[:parameters].each do |key, value| sysfs_file = "/sys/#{key}" file sysfs_file do content "#{value}\n" atomic_update false ignore_failure true end end end end
6
0.176471
5
1
39e3614c7136029acb6b18cd71e12ef2feaeaac7
ui/minigraph.h
ui/minigraph.h
class ContextMenuManager; class DisassemblyView; class Menu; class ViewFrame; class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockContextHandler { Q_OBJECT DisassemblyView* m_disassemblyView = nullptr; public: MiniGraph(QWidget* parent); ~MiniGraph(); virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; virtual void mouseMoveEvent(QMouseEvent* event) override; virtual void mousePressEvent(QMouseEvent* event) override; virtual void paintEvent(QPaintEvent* event) override; virtual void scrollTo(int x, int y); public Q_SLOTS: void notifyUpdate(); };
class ContextMenuManager; class FlowGraphWidget; class Menu; class ViewFrame; class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockContextHandler { Q_OBJECT FlowGraphWidget* m_flowGraphWidget = nullptr; public: MiniGraph(QWidget* parent); ~MiniGraph(); virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; virtual void mouseMoveEvent(QMouseEvent* event) override; virtual void mousePressEvent(QMouseEvent* event) override; virtual void paintEvent(QPaintEvent* event) override; virtual void scrollTo(int x, int y); public Q_SLOTS: void notifyUpdate(); };
Update MiniGraph to work with FlowGraphWidet.
Update MiniGraph to work with FlowGraphWidet.
C
mit
Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api
c
## Code Before: class ContextMenuManager; class DisassemblyView; class Menu; class ViewFrame; class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockContextHandler { Q_OBJECT DisassemblyView* m_disassemblyView = nullptr; public: MiniGraph(QWidget* parent); ~MiniGraph(); virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; virtual void mouseMoveEvent(QMouseEvent* event) override; virtual void mousePressEvent(QMouseEvent* event) override; virtual void paintEvent(QPaintEvent* event) override; virtual void scrollTo(int x, int y); public Q_SLOTS: void notifyUpdate(); }; ## Instruction: Update MiniGraph to work with FlowGraphWidet. ## Code After: class ContextMenuManager; class FlowGraphWidget; class Menu; class ViewFrame; class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockContextHandler { Q_OBJECT FlowGraphWidget* m_flowGraphWidget = nullptr; public: MiniGraph(QWidget* parent); ~MiniGraph(); virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; virtual void mouseMoveEvent(QMouseEvent* event) override; virtual void mousePressEvent(QMouseEvent* event) override; virtual void paintEvent(QPaintEvent* event) override; virtual void scrollTo(int x, int y); public Q_SLOTS: void notifyUpdate(); };
class ContextMenuManager; - class DisassemblyView; + class FlowGraphWidget; class Menu; class ViewFrame; class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockContextHandler { Q_OBJECT - DisassemblyView* m_disassemblyView = nullptr; + FlowGraphWidget* m_flowGraphWidget = nullptr; public: MiniGraph(QWidget* parent); ~MiniGraph(); virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; virtual void mouseMoveEvent(QMouseEvent* event) override; virtual void mousePressEvent(QMouseEvent* event) override; virtual void paintEvent(QPaintEvent* event) override; virtual void scrollTo(int x, int y); public Q_SLOTS: void notifyUpdate(); };
4
0.137931
2
2
728f1a16c44ed7a3eac24b4a6d49ff601ba88f0d
spec/support/postgres.rb
spec/support/postgres.rb
require 'sequel' require 'rspec/sequel' module RSpec::Sequel::Test def self.postgres @pg_db ||= connect_to_postgres end private DEFAULT_TEST_DATABASE = 'postgres:///rspec-sequel-test' def self.connect_to_postgres test_database = unless ENV['TEST_DATABASE'] STDERR.puts "TEST_DATABASE environment variable not found, defaulting to #{DEFAULT_TEST_DATABASE}" DEFAULT_TEST_DATABASE end Sequel::connect test_database end end
require 'sequel' require 'rspec/sequel' module RSpec::Sequel::Test def self.postgres @pg_db ||= connect_to_postgres end private DEFAULT_TEST_DATABASE = 'postgres:///rspec-sequel-test' def self.connect_to_postgres test_database = ENV['TEST_DATABASE'] || begin STDERR.puts "TEST_DATABASE environment variable not found, defaulting to #{DEFAULT_TEST_DATABASE}" DEFAULT_TEST_DATABASE end Sequel::connect test_database end end
Fix test database connection string setup
Fix test database connection string setup
Ruby
mit
dividedmind/rspec-sequel
ruby
## Code Before: require 'sequel' require 'rspec/sequel' module RSpec::Sequel::Test def self.postgres @pg_db ||= connect_to_postgres end private DEFAULT_TEST_DATABASE = 'postgres:///rspec-sequel-test' def self.connect_to_postgres test_database = unless ENV['TEST_DATABASE'] STDERR.puts "TEST_DATABASE environment variable not found, defaulting to #{DEFAULT_TEST_DATABASE}" DEFAULT_TEST_DATABASE end Sequel::connect test_database end end ## Instruction: Fix test database connection string setup ## Code After: require 'sequel' require 'rspec/sequel' module RSpec::Sequel::Test def self.postgres @pg_db ||= connect_to_postgres end private DEFAULT_TEST_DATABASE = 'postgres:///rspec-sequel-test' def self.connect_to_postgres test_database = ENV['TEST_DATABASE'] || begin STDERR.puts "TEST_DATABASE environment variable not found, defaulting to #{DEFAULT_TEST_DATABASE}" DEFAULT_TEST_DATABASE end Sequel::connect test_database end end
require 'sequel' require 'rspec/sequel' module RSpec::Sequel::Test def self.postgres @pg_db ||= connect_to_postgres end private DEFAULT_TEST_DATABASE = 'postgres:///rspec-sequel-test' def self.connect_to_postgres - test_database = unless ENV['TEST_DATABASE'] ? ------- + test_database = ENV['TEST_DATABASE'] || begin ? +++++++++ STDERR.puts "TEST_DATABASE environment variable not found, defaulting to #{DEFAULT_TEST_DATABASE}" DEFAULT_TEST_DATABASE end Sequel::connect test_database end end
2
0.095238
1
1
fa418ed5a6769a369d4b5cddfc6e215f551c57cf
events/cms_app.py
events/cms_app.py
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook)
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" namespace = "events" apphook_pool.register(EventsApphook)
Add namespace to support djangoCMS v3
Add namespace to support djangoCMS v3
Python
bsd-3-clause
theherk/django-theherk-events
python
## Code Before: from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook) ## Instruction: Add namespace to support djangoCMS v3 ## Code After: from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" namespace = "events" apphook_pool.register(EventsApphook)
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" + namespace = "events" apphook_pool.register(EventsApphook)
1
0.090909
1
0
339ad35bb2429725c1aada1a6759b416f3f05e1e
examples/vector_random.sh
examples/vector_random.sh
geoc vector randompoints -g -180,-90,180,90 -n 100 > points.csv cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld geoc map draw -f vector_random.png -l "layertype=layer file=naturalearth.gpkg layername=ocean style=ocean.sld" \ -l "layertype=layer file=naturalearth.gpkg layername=countries style=countries.sld" \ -l "layertype=layer file=points.csv style=points.sld"
geoc vector randompoints -g -180,-90,180,90 -n 100 > points.csv cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld geoc map draw -f vector_random.png -l "layertype=layer file=naturalearth.gpkg layername=ocean style=ocean.sld" \ -l "layertype=layer file=naturalearth.gpkg layername=countries style=countries.sld" \ -l "layertype=layer file=points.csv style=points.sld"
Remove duplicate line in script
Remove duplicate line in script
Shell
mit
jericks/geoc,jericks/geoc
shell
## Code Before: geoc vector randompoints -g -180,-90,180,90 -n 100 > points.csv cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld geoc map draw -f vector_random.png -l "layertype=layer file=naturalearth.gpkg layername=ocean style=ocean.sld" \ -l "layertype=layer file=naturalearth.gpkg layername=countries style=countries.sld" \ -l "layertype=layer file=points.csv style=points.sld" ## Instruction: Remove duplicate line in script ## Code After: geoc vector randompoints -g -180,-90,180,90 -n 100 > points.csv cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld geoc map draw -f vector_random.png -l "layertype=layer file=naturalearth.gpkg layername=ocean style=ocean.sld" \ -l "layertype=layer file=naturalearth.gpkg layername=countries style=countries.sld" \ -l "layertype=layer file=points.csv style=points.sld"
geoc vector randompoints -g -180,-90,180,90 -n 100 > points.csv - - cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld cat points.csv | geoc vector defaultstyle --color navy -o 0.75 > points.sld geoc map draw -f vector_random.png -l "layertype=layer file=naturalearth.gpkg layername=ocean style=ocean.sld" \ -l "layertype=layer file=naturalearth.gpkg layername=countries style=countries.sld" \ -l "layertype=layer file=points.csv style=points.sld"
2
0.2
0
2
dadbbafbae84a58f7639e415a4dbed30b2c85e43
app/controllers/exercise_submissions_controller.rb
app/controllers/exercise_submissions_controller.rb
class ExerciseSubmissionsController < ApplicationController before_action :set_submission, only: [:show] before_action :set_exercise, only: [:create, :new, :show, :index] before_action :set_previous_submission_content, only: [:new] before_filter :authenticate! def index @submissions = paginated @exercise.submissions end def show end def new @submission = Submission.new end def create @submission = current_user.submissions.build(submission_params) if @submission.save redirect_to [@exercise, @submission], notice: 'Submission was successfully created.' else render :new end end private def set_submission @submission = Submission.find(params[:id]) end def set_previous_submission_content @previous_submission_content = @exercise.default_content_for(current_user) end def set_exercise @exercise = Exercise.find(params[:exercise_id]) end def submission_params params.require(:submission).permit(:content).merge(exercise: @exercise) end end
class ExerciseSubmissionsController < ApplicationController before_action :set_submission, only: [:show] before_action :set_exercise, only: [:create, :new, :show, :index] before_action :set_previous_submission_content, only: [:new] before_filter :authenticate! def index @submissions = paginated @exercise.submissions_for current_user end def show end def new @submission = Submission.new end def create @submission = current_user.submissions.build(submission_params) if @submission.save redirect_to [@exercise, @submission], notice: 'Submission was successfully created.' else render :new end end private def set_submission @submission = Submission.find(params[:id]) end def set_previous_submission_content @previous_submission_content = @exercise.default_content_for(current_user) end def set_exercise @exercise = Exercise.find(params[:exercise_id]) end def submission_params params.require(:submission).permit(:content).merge(exercise: @exercise) end end
Fix exercise submissions for current user only
Fix exercise submissions for current user only
Ruby
agpl-3.0
mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory
ruby
## Code Before: class ExerciseSubmissionsController < ApplicationController before_action :set_submission, only: [:show] before_action :set_exercise, only: [:create, :new, :show, :index] before_action :set_previous_submission_content, only: [:new] before_filter :authenticate! def index @submissions = paginated @exercise.submissions end def show end def new @submission = Submission.new end def create @submission = current_user.submissions.build(submission_params) if @submission.save redirect_to [@exercise, @submission], notice: 'Submission was successfully created.' else render :new end end private def set_submission @submission = Submission.find(params[:id]) end def set_previous_submission_content @previous_submission_content = @exercise.default_content_for(current_user) end def set_exercise @exercise = Exercise.find(params[:exercise_id]) end def submission_params params.require(:submission).permit(:content).merge(exercise: @exercise) end end ## Instruction: Fix exercise submissions for current user only ## Code After: class ExerciseSubmissionsController < ApplicationController before_action :set_submission, only: [:show] before_action :set_exercise, only: [:create, :new, :show, :index] before_action :set_previous_submission_content, only: [:new] before_filter :authenticate! def index @submissions = paginated @exercise.submissions_for current_user end def show end def new @submission = Submission.new end def create @submission = current_user.submissions.build(submission_params) if @submission.save redirect_to [@exercise, @submission], notice: 'Submission was successfully created.' else render :new end end private def set_submission @submission = Submission.find(params[:id]) end def set_previous_submission_content @previous_submission_content = @exercise.default_content_for(current_user) end def set_exercise @exercise = Exercise.find(params[:exercise_id]) end def submission_params params.require(:submission).permit(:content).merge(exercise: @exercise) end end
class ExerciseSubmissionsController < ApplicationController before_action :set_submission, only: [:show] before_action :set_exercise, only: [:create, :new, :show, :index] before_action :set_previous_submission_content, only: [:new] before_filter :authenticate! def index - @submissions = paginated @exercise.submissions + @submissions = paginated @exercise.submissions_for current_user ? +++++++++++++++++ end def show end def new @submission = Submission.new end def create @submission = current_user.submissions.build(submission_params) if @submission.save redirect_to [@exercise, @submission], notice: 'Submission was successfully created.' else render :new end end private def set_submission @submission = Submission.find(params[:id]) end def set_previous_submission_content @previous_submission_content = @exercise.default_content_for(current_user) end def set_exercise @exercise = Exercise.find(params[:exercise_id]) end def submission_params params.require(:submission).permit(:content).merge(exercise: @exercise) end end
2
0.045455
1
1
8ca841f2cc30e13cbefcc10e0b2ae669c8aed23f
pythonforandroid/recipes/libnacl/__init__.py
pythonforandroid/recipes/libnacl/__init__.py
from pythonforandroid.toolchain import PythonRecipe class LibNaClRecipe(PythonRecipe): version = '1.4.4' url = 'https://github.com/saltstack/libnacl/archive/v{version}.tar.gz' depends = ['hostpython2', 'setuptools'] site_packages_name = 'libnacl' call_hostpython_via_targetpython = False recipe = LibNaClRecipe()
from pythonforandroid.toolchain import PythonRecipe class LibNaClRecipe(PythonRecipe): version = '1.4.4' url = 'https://github.com/saltstack/libnacl/archive/v{version}.tar.gz' depends = ['hostpython2', 'setuptools', 'libsodium'] site_packages_name = 'libnacl' call_hostpython_via_targetpython = False recipe = LibNaClRecipe()
Fix libnacl recipe missing libsodium
Fix libnacl recipe missing libsodium
Python
mit
kivy/python-for-android,germn/python-for-android,germn/python-for-android,rnixx/python-for-android,germn/python-for-android,germn/python-for-android,kivy/python-for-android,rnixx/python-for-android,kronenpj/python-for-android,kivy/python-for-android,PKRoma/python-for-android,rnixx/python-for-android,kronenpj/python-for-android,PKRoma/python-for-android,rnixx/python-for-android,kronenpj/python-for-android,PKRoma/python-for-android,kronenpj/python-for-android,rnixx/python-for-android,kivy/python-for-android,kronenpj/python-for-android,rnixx/python-for-android,PKRoma/python-for-android,PKRoma/python-for-android,germn/python-for-android,germn/python-for-android,kivy/python-for-android
python
## Code Before: from pythonforandroid.toolchain import PythonRecipe class LibNaClRecipe(PythonRecipe): version = '1.4.4' url = 'https://github.com/saltstack/libnacl/archive/v{version}.tar.gz' depends = ['hostpython2', 'setuptools'] site_packages_name = 'libnacl' call_hostpython_via_targetpython = False recipe = LibNaClRecipe() ## Instruction: Fix libnacl recipe missing libsodium ## Code After: from pythonforandroid.toolchain import PythonRecipe class LibNaClRecipe(PythonRecipe): version = '1.4.4' url = 'https://github.com/saltstack/libnacl/archive/v{version}.tar.gz' depends = ['hostpython2', 'setuptools', 'libsodium'] site_packages_name = 'libnacl' call_hostpython_via_targetpython = False recipe = LibNaClRecipe()
from pythonforandroid.toolchain import PythonRecipe class LibNaClRecipe(PythonRecipe): version = '1.4.4' url = 'https://github.com/saltstack/libnacl/archive/v{version}.tar.gz' - depends = ['hostpython2', 'setuptools'] + depends = ['hostpython2', 'setuptools', 'libsodium'] ? +++++++++++++ site_packages_name = 'libnacl' call_hostpython_via_targetpython = False recipe = LibNaClRecipe()
2
0.2
1
1
3df671407f83f5bcd51f466ef88b5b91109b42f6
extra/trees/trees-docs.factor
extra/trees/trees-docs.factor
USING: help.syntax help.markup trees assocs ; HELP: TREE{ { $syntax "TREE{ { key value }... }" } { $values { "key" "a key" } { "value" "a value" } } { $description "Literal syntax for an unbalanced tree." } ; HELP: <tree> { $values { "tree" tree } } { $description "Creates an empty unbalanced binary tree" } ; HELP: >tree { $values { "assoc" assoc } { "tree" tree } } { $description "Converts any " { $link assoc } " into an unbalanced binary tree." } ; HELP: tree { $class-description "This is the class for unbalanced binary search trees. It is not usually intended to be used directly but rather as a basis for other trees." } ; ARTICLE: { "trees" "intro" } "Binary search trees" "This is a library for unbalanced binary search trees. It is not intended to be used directly in most situations but rather as a base class for new trees, because performance can degrade to linear time storage/retrieval by the number of keys. These binary search trees conform to the assoc protocol." { $subsection tree } { $subsection <tree> } { $subsection >tree } { $subsection POSTPONE: TREE{ } ; IN: trees ABOUT: { "trees" "intro" }
USING: help.syntax help.markup assocs ; IN: trees HELP: TREE{ { $syntax "TREE{ { key value }... }" } { $values { "key" "a key" } { "value" "a value" } } { $description "Literal syntax for an unbalanced tree." } ; HELP: <tree> { $values { "tree" tree } } { $description "Creates an empty unbalanced binary tree" } ; HELP: >tree { $values { "assoc" assoc } { "tree" tree } } { $description "Converts any " { $link assoc } " into an unbalanced binary tree." } ; HELP: tree { $class-description "This is the class for unbalanced binary search trees. It is not usually intended to be used directly but rather as a basis for other trees." } ; ARTICLE: { "trees" "intro" } "Binary search trees" "This is a library for unbalanced binary search trees. It is not intended to be used directly in most situations but rather as a base class for new trees, because performance can degrade to linear time storage/retrieval by the number of keys. These binary search trees conform to the assoc protocol." { $subsection tree } { $subsection <tree> } { $subsection >tree } { $subsection POSTPONE: TREE{ } ; IN: trees ABOUT: { "trees" "intro" }
Update trees for factor changes
Update trees for factor changes
Factor
bsd-2-clause
bjourne/factor,slavapestov/factor,AlexIljin/factor,erg/factor,seckar/factor,mecon/factor,cataska/factor,cataska/factor,jwmerrill/factor,littledan/Factor,mrjbq7/factor,mecon/factor,kingcons/factor,mcandre/factor,bpollack/factor,cataska/factor,dch/factor,dch/factor,factor/factor,slavapestov/factor,erg/factor,ceninan/factor,mrjbq7/factor,mecon/factor,sarvex/factor-lang,mrjbq7/factor,dch/factor,AlexIljin/factor,dch/factor,nicolas-p/factor,dharmatech/factor,mcandre/factor,mecon/factor,factor/factor,erg/factor,seckar/factor,slavapestov/factor,AlexIljin/factor,mrjbq7/factor,bpollack/factor,sarvex/factor-lang,nicolas-p/factor,sarvex/factor-lang,littledan/Factor,bpollack/factor,factor/factor,nicolas-p/factor,littledan/Factor,tgunr/factor,bjourne/factor,AlexIljin/factor,Keyholder/factor,ceninan/factor,kingcons/factor,bpollack/factor,mecon/factor,Keyholder/factor,nicolas-p/factor,ehird/factor,slavapestov/factor,mcandre/factor,littledan/Factor,seckar/factor,tgunr/factor,tgunr/factor,factor/factor,tgunr/factor,bjourne/factor,ehird/factor,dch/factor,dharmatech/factor,erg/factor,cataska/factor,slavapestov/factor,dch/factor,erg/factor,kingcons/factor,jwmerrill/factor,bpollack/factor,bjourne/factor,jwmerrill/factor,kingcons/factor,bjourne/factor,sarvex/factor-lang,tgunr/factor,Keyholder/factor,mrjbq7/factor,bjourne/factor,dharmatech/factor,sarvex/factor-lang,slavapestov/factor,mcandre/factor,erg/factor,AlexIljin/factor,AlexIljin/factor,ceninan/factor,mcandre/factor,mcandre/factor,bjourne/factor,factor/factor,erg/factor,nicolas-p/factor,bpollack/factor,mcandre/factor,slavapestov/factor,nicolas-p/factor,sarvex/factor-lang,tgunr/factor,nicolas-p/factor,factor/factor,ehird/factor,AlexIljin/factor,mecon/factor,mrjbq7/factor,bpollack/factor,sarvex/factor-lang,ceninan/factor,mecon/factor
factor
## Code Before: USING: help.syntax help.markup trees assocs ; HELP: TREE{ { $syntax "TREE{ { key value }... }" } { $values { "key" "a key" } { "value" "a value" } } { $description "Literal syntax for an unbalanced tree." } ; HELP: <tree> { $values { "tree" tree } } { $description "Creates an empty unbalanced binary tree" } ; HELP: >tree { $values { "assoc" assoc } { "tree" tree } } { $description "Converts any " { $link assoc } " into an unbalanced binary tree." } ; HELP: tree { $class-description "This is the class for unbalanced binary search trees. It is not usually intended to be used directly but rather as a basis for other trees." } ; ARTICLE: { "trees" "intro" } "Binary search trees" "This is a library for unbalanced binary search trees. It is not intended to be used directly in most situations but rather as a base class for new trees, because performance can degrade to linear time storage/retrieval by the number of keys. These binary search trees conform to the assoc protocol." { $subsection tree } { $subsection <tree> } { $subsection >tree } { $subsection POSTPONE: TREE{ } ; IN: trees ABOUT: { "trees" "intro" } ## Instruction: Update trees for factor changes ## Code After: USING: help.syntax help.markup assocs ; IN: trees HELP: TREE{ { $syntax "TREE{ { key value }... }" } { $values { "key" "a key" } { "value" "a value" } } { $description "Literal syntax for an unbalanced tree." } ; HELP: <tree> { $values { "tree" tree } } { $description "Creates an empty unbalanced binary tree" } ; HELP: >tree { $values { "assoc" assoc } { "tree" tree } } { $description "Converts any " { $link assoc } " into an unbalanced binary tree." } ; HELP: tree { $class-description "This is the class for unbalanced binary search trees. It is not usually intended to be used directly but rather as a basis for other trees." } ; ARTICLE: { "trees" "intro" } "Binary search trees" "This is a library for unbalanced binary search trees. It is not intended to be used directly in most situations but rather as a base class for new trees, because performance can degrade to linear time storage/retrieval by the number of keys. These binary search trees conform to the assoc protocol." { $subsection tree } { $subsection <tree> } { $subsection >tree } { $subsection POSTPONE: TREE{ } ; IN: trees ABOUT: { "trees" "intro" }
- USING: help.syntax help.markup trees assocs ; ? ------ + USING: help.syntax help.markup assocs ; + IN: trees HELP: TREE{ { $syntax "TREE{ { key value }... }" } { $values { "key" "a key" } { "value" "a value" } } { $description "Literal syntax for an unbalanced tree." } ; HELP: <tree> { $values { "tree" tree } } { $description "Creates an empty unbalanced binary tree" } ; HELP: >tree { $values { "assoc" assoc } { "tree" tree } } { $description "Converts any " { $link assoc } " into an unbalanced binary tree." } ; HELP: tree { $class-description "This is the class for unbalanced binary search trees. It is not usually intended to be used directly but rather as a basis for other trees." } ; ARTICLE: { "trees" "intro" } "Binary search trees" "This is a library for unbalanced binary search trees. It is not intended to be used directly in most situations but rather as a base class for new trees, because performance can degrade to linear time storage/retrieval by the number of keys. These binary search trees conform to the assoc protocol." { $subsection tree } { $subsection <tree> } { $subsection >tree } { $subsection POSTPONE: TREE{ } ; IN: trees ABOUT: { "trees" "intro" }
3
0.111111
2
1
4e7c7b2cb3d8c99406f43def42be4982ec8f0bcb
test/whitman/db_test.clj
test/whitman/db_test.clj
(ns whitman.db-test (:require [clojure.test :refer :all] [whitman.db :as db])) (deftest test-db-url-with-default (let [cfg {"database" "test"}] (is (= (db/db-url cfg) "mongodb://localhost:27017/test")))) (deftest test-db-url-when-specified (let [cfg {"connection" "whitman.monkey-robot.com:27017" "database" "test"}] (is (= (db/db-url cfg) "mongodb://whitman.monkey-robot.com:27017/test")))) (deftest test-db-with-default (let [cfg {"database" "test"}] (-> cfg db/db nil? not is))) (deftest test-db-when-specified (let [cfg {"connection" "whitman.monkey-robot.com:27017" "database" "test"}] (-> cfg db/db nil? not is)))
(ns whitman.db-test (:require [clojure.test :refer :all] [whitman.db :as db])) (deftest test-db-url-with-default (let [cfg {"database" "test"}] (is (= (db/db-url cfg) "mongodb://localhost:27017/test")))) (deftest test-db-url-when-specified (let [cfg {"connection" "monkey-robot.com:27017" "database" "test"}] (is (= (db/db-url cfg) "mongodb://monkey-robot.com:27017/test")))) (deftest test-db-with-default (let [cfg {"database" "test"}] (-> cfg db/db nil? not is))) (deftest test-db-when-specified (let [cfg {"connection" "monkey-robot.com:27017" "database" "test"}] (-> cfg db/db nil? not is)))
Use monkey-robot.com:27017 as MongoDB test URL
Use monkey-robot.com:27017 as MongoDB test URL Unlike whitman.monkey-robot.com, monkey-robot.com actually exists, so it won't throw an error when trying to connect.
Clojure
bsd-3-clause
mdippery/whitman
clojure
## Code Before: (ns whitman.db-test (:require [clojure.test :refer :all] [whitman.db :as db])) (deftest test-db-url-with-default (let [cfg {"database" "test"}] (is (= (db/db-url cfg) "mongodb://localhost:27017/test")))) (deftest test-db-url-when-specified (let [cfg {"connection" "whitman.monkey-robot.com:27017" "database" "test"}] (is (= (db/db-url cfg) "mongodb://whitman.monkey-robot.com:27017/test")))) (deftest test-db-with-default (let [cfg {"database" "test"}] (-> cfg db/db nil? not is))) (deftest test-db-when-specified (let [cfg {"connection" "whitman.monkey-robot.com:27017" "database" "test"}] (-> cfg db/db nil? not is))) ## Instruction: Use monkey-robot.com:27017 as MongoDB test URL Unlike whitman.monkey-robot.com, monkey-robot.com actually exists, so it won't throw an error when trying to connect. ## Code After: (ns whitman.db-test (:require [clojure.test :refer :all] [whitman.db :as db])) (deftest test-db-url-with-default (let [cfg {"database" "test"}] (is (= (db/db-url cfg) "mongodb://localhost:27017/test")))) (deftest test-db-url-when-specified (let [cfg {"connection" "monkey-robot.com:27017" "database" "test"}] (is (= (db/db-url cfg) "mongodb://monkey-robot.com:27017/test")))) (deftest test-db-with-default (let [cfg {"database" "test"}] (-> cfg db/db nil? not is))) (deftest test-db-when-specified (let [cfg {"connection" "monkey-robot.com:27017" "database" "test"}] (-> cfg db/db nil? not is)))
(ns whitman.db-test (:require [clojure.test :refer :all] [whitman.db :as db])) (deftest test-db-url-with-default (let [cfg {"database" "test"}] (is (= (db/db-url cfg) "mongodb://localhost:27017/test")))) (deftest test-db-url-when-specified - (let [cfg {"connection" "whitman.monkey-robot.com:27017" ? -------- + (let [cfg {"connection" "monkey-robot.com:27017" "database" "test"}] - (is (= (db/db-url cfg) "mongodb://whitman.monkey-robot.com:27017/test")))) ? -------- + (is (= (db/db-url cfg) "mongodb://monkey-robot.com:27017/test")))) (deftest test-db-with-default (let [cfg {"database" "test"}] (-> cfg db/db nil? not is))) (deftest test-db-when-specified - (let [cfg {"connection" "whitman.monkey-robot.com:27017" ? -------- + (let [cfg {"connection" "monkey-robot.com:27017" "database" "test"}] (-> cfg db/db nil? not is)))
6
0.206897
3
3
8a1965ade9e48b7c3aebb30e27697960a14f9f29
spec/spec_helper_acceptance.rb
spec/spec_helper_acceptance.rb
require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' hosts.each do |host| if host['platform'] =~ /debian/ on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc' end if host.is_pe? install_pe else # Install Puppet install_package host, 'rubygems' on host, 'gem install puppet --no-ri --no-rdoc' on host, "mkdir -p #{host['distmoduledir']}" end end RSpec.configure do |c| # Project root proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'concat') hosts.each do |host| on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } end end c.before(:all) do shell('mkdir -p /tmp/concat') end c.after(:all) do shell('rm -rf /tmp/concat /var/lib/puppet/concat') end c.treat_symbols_as_metadata_keys_with_true_values = true end
require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' if hosts.first.is_pe? install_pe else install_puppet end hosts.each do |host| on hosts, "mkdir -p #{host['distmoduledir']}" end end RSpec.configure do |c| # Project root proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'concat') hosts.each do |host| on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } end end c.before(:all) do shell('mkdir -p /tmp/concat') end c.after(:all) do shell('rm -rf /tmp/concat /var/lib/puppet/concat') end c.treat_symbols_as_metadata_keys_with_true_values = true end
Improve this so it works on Ubuntu 14.04.
Improve this so it works on Ubuntu 14.04.
Ruby
apache-2.0
puppetlabs/puppetlabs-concat
ruby
## Code Before: require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' hosts.each do |host| if host['platform'] =~ /debian/ on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc' end if host.is_pe? install_pe else # Install Puppet install_package host, 'rubygems' on host, 'gem install puppet --no-ri --no-rdoc' on host, "mkdir -p #{host['distmoduledir']}" end end RSpec.configure do |c| # Project root proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'concat') hosts.each do |host| on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } end end c.before(:all) do shell('mkdir -p /tmp/concat') end c.after(:all) do shell('rm -rf /tmp/concat /var/lib/puppet/concat') end c.treat_symbols_as_metadata_keys_with_true_values = true end ## Instruction: Improve this so it works on Ubuntu 14.04. ## Code After: require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' if hosts.first.is_pe? install_pe else install_puppet end hosts.each do |host| on hosts, "mkdir -p #{host['distmoduledir']}" end end RSpec.configure do |c| # Project root proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'concat') hosts.each do |host| on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } end end c.before(:all) do shell('mkdir -p /tmp/concat') end c.after(:all) do shell('rm -rf /tmp/concat /var/lib/puppet/concat') end c.treat_symbols_as_metadata_keys_with_true_values = true end
require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' + unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - hosts.each do |host| - if host['platform'] =~ /debian/ - on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc' - end - if host.is_pe? + if hosts.first.is_pe? ? +++++++ install_pe else - # Install Puppet ? ^^^ ^^ + install_puppet ? ^ ^^ - install_package host, 'rubygems' - on host, 'gem install puppet --no-ri --no-rdoc' + end + hosts.each do |host| - on host, "mkdir -p #{host['distmoduledir']}" + on hosts, "mkdir -p #{host['distmoduledir']}" ? + end end RSpec.configure do |c| # Project root proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'concat') hosts.each do |host| on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } end end c.before(:all) do shell('mkdir -p /tmp/concat') end c.after(:all) do shell('rm -rf /tmp/concat /var/lib/puppet/concat') end c.treat_symbols_as_metadata_keys_with_true_values = true end
15
0.357143
6
9
6b7d339542c759482b952265c68bca7da106a07d
README.md
README.md
[![Build Status](https://travis-ci.org/dbmdz/blueprints.svg?branch=master)](https://travis-ci.org/dbmdz/blueprints) [![Code coverage](https://codecov.io/gh/dbmdz/blueprints/branch/master/graph/badge.svg)](https://codecov.io/gh/dbmdz/blueprints) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) Blueprint applications for showcasing production ready applications. - Blueprint 1: Webapp (Spring MVC + Thymeleaf + JavaConfig) - Blueprint 2: Webapp (Spring MVC + Thymeleaf + JavaConfig + Security + JPA/Hibernate (CRUD)) - Blueprint 3: REST Webservice (Spring Boot Server) - Blueprint 4: Webapp (Spring Boot + Thymeleaf)
[![Build Status](https://travis-ci.org/dbmdz/blueprints.svg?branch=master)](https://travis-ci.org/dbmdz/blueprints) [![Code coverage](https://codecov.io/gh/dbmdz/blueprints/branch/master/graph/badge.svg)](https://codecov.io/gh/dbmdz/blueprints) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) Blueprint applications for showcasing production ready applications. - [Blueprint 1: Webapp (Spring MVC + Thymeleaf + JavaConfig)](./springmvc-thymeleaf) - [Blueprint 2: Webapp (Spring MVC + Thymeleaf + JavaConfig + Security + JPA/Hibernate (CRUD))](./blueprint-springmvc-thymeleaf-javaconfig-security-database) - [Blueprint 3: REST Webservice (Spring Boot Server)](./rest-webservice) - [Blueprint 4: Webapp (Spring Boot + Thymeleaf)](./webapp-springboot-thymeleaf) - [Blueprint 5: Console Application for XML/XSL transformation (Spring Boot + Saxon)](./console-application-springboot)
Add console application and links to sub directories
Add console application and links to sub directories
Markdown
mit
dbmdz/blueprints,dbmdz/blueprints,dbmdz/blueprints
markdown
## Code Before: [![Build Status](https://travis-ci.org/dbmdz/blueprints.svg?branch=master)](https://travis-ci.org/dbmdz/blueprints) [![Code coverage](https://codecov.io/gh/dbmdz/blueprints/branch/master/graph/badge.svg)](https://codecov.io/gh/dbmdz/blueprints) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) Blueprint applications for showcasing production ready applications. - Blueprint 1: Webapp (Spring MVC + Thymeleaf + JavaConfig) - Blueprint 2: Webapp (Spring MVC + Thymeleaf + JavaConfig + Security + JPA/Hibernate (CRUD)) - Blueprint 3: REST Webservice (Spring Boot Server) - Blueprint 4: Webapp (Spring Boot + Thymeleaf) ## Instruction: Add console application and links to sub directories ## Code After: [![Build Status](https://travis-ci.org/dbmdz/blueprints.svg?branch=master)](https://travis-ci.org/dbmdz/blueprints) [![Code coverage](https://codecov.io/gh/dbmdz/blueprints/branch/master/graph/badge.svg)](https://codecov.io/gh/dbmdz/blueprints) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) Blueprint applications for showcasing production ready applications. - [Blueprint 1: Webapp (Spring MVC + Thymeleaf + JavaConfig)](./springmvc-thymeleaf) - [Blueprint 2: Webapp (Spring MVC + Thymeleaf + JavaConfig + Security + JPA/Hibernate (CRUD))](./blueprint-springmvc-thymeleaf-javaconfig-security-database) - [Blueprint 3: REST Webservice (Spring Boot Server)](./rest-webservice) - [Blueprint 4: Webapp (Spring Boot + Thymeleaf)](./webapp-springboot-thymeleaf) - [Blueprint 5: Console Application for XML/XSL transformation (Spring Boot + Saxon)](./console-application-springboot)
[![Build Status](https://travis-ci.org/dbmdz/blueprints.svg?branch=master)](https://travis-ci.org/dbmdz/blueprints) [![Code coverage](https://codecov.io/gh/dbmdz/blueprints/branch/master/graph/badge.svg)](https://codecov.io/gh/dbmdz/blueprints) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) Blueprint applications for showcasing production ready applications. - - Blueprint 1: Webapp (Spring MVC + Thymeleaf + JavaConfig) + - [Blueprint 1: Webapp (Spring MVC + Thymeleaf + JavaConfig)](./springmvc-thymeleaf) ? + ++++++++++++++++++++++++ - - Blueprint 2: Webapp (Spring MVC + Thymeleaf + JavaConfig + Security + JPA/Hibernate (CRUD)) + - [Blueprint 2: Webapp (Spring MVC + Thymeleaf + JavaConfig + Security + JPA/Hibernate (CRUD))](./blueprint-springmvc-thymeleaf-javaconfig-security-database) - - Blueprint 3: REST Webservice (Spring Boot Server) + - [Blueprint 3: REST Webservice (Spring Boot Server)](./rest-webservice) ? + ++++++++++++++++++++ - - Blueprint 4: Webapp (Spring Boot + Thymeleaf) + - [Blueprint 4: Webapp (Spring Boot + Thymeleaf)](./webapp-springboot-thymeleaf) + - [Blueprint 5: Console Application for XML/XSL transformation (Spring Boot + Saxon)](./console-application-springboot)
9
0.818182
5
4
2bfdaadfdefd72463489fffed734b973fd506afc
cluster/addons/calico-policy-controller/calico-clusterrole.yaml
cluster/addons/calico-policy-controller/calico-clusterrole.yaml
kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: calico namespace: kube-system labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: - namespaces verbs: - get - list - watch - apiGroups: [""] resources: - endpoints verbs: - get - apiGroups: [""] resources: - services verbs: - get - apiGroups: [""] resources: - pods/status verbs: - update - apiGroups: [""] resources: - pods verbs: - get - list - watch - patch - apiGroups: [""] resources: - nodes verbs: - get - list - update - watch - apiGroups: ["extensions"] resources: - networkpolicies verbs: - get - list - watch - apiGroups: ["networking.k8s.io"] resources: - networkpolicies verbs: - watch - list - apiGroups: ["crd.projectcalico.org"] resources: - globalfelixconfigs - felixconfigurations - bgppeers - globalbgpconfigs - bgpconfigurations - ippools - globalnetworkpolicies - globalnetworksets - networkpolicies - clusterinformations - hostendpoints verbs: - create - get - list - update - watch
kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: calico namespace: kube-system labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: - namespaces - serviceaccounts verbs: - get - list - watch - apiGroups: [""] resources: - endpoints verbs: - get - apiGroups: [""] resources: - services verbs: - get - apiGroups: [""] resources: - pods/status verbs: - update - apiGroups: [""] resources: - pods verbs: - get - list - watch - patch - apiGroups: [""] resources: - nodes verbs: - get - list - update - watch - apiGroups: ["extensions"] resources: - networkpolicies verbs: - get - list - watch - apiGroups: ["networking.k8s.io"] resources: - networkpolicies verbs: - watch - list - apiGroups: ["crd.projectcalico.org"] resources: - globalfelixconfigs - felixconfigurations - bgppeers - globalbgpconfigs - bgpconfigurations - ippools - globalnetworkpolicies - globalnetworksets - networkpolicies - clusterinformations - hostendpoints verbs: - create - get - list - update - watch
Add serviceaccounts permission for ClusterRole, required by Calico v3.2.0+.
Add serviceaccounts permission for ClusterRole, required by Calico v3.2.0+.
YAML
apache-2.0
bluebreezecf/kubernetes,kubernetes/kubernetes,yujuhong/kubernetes,andrewsykim/kubernetes,csrwng/kubernetes,carlory/kubernetes,pmorie/kubernetes,gnufied/kubernetes,stevesloka/kubernetes,fanzhangio/kubernetes,matthyx/kubernetes,fabriziopandini/kubernetes,jingax10/kubernetes,thockin/kubernetes,hex108/kubernetes,jingax10/kubernetes,fgimenez/kubernetes,brendandburns/kubernetes,salewski/kubernetes,dereknex/kubernetes,ateleshev/kubernetes,jennybuckley/kubernetes,PiotrProkop/kubernetes,yarntime/kubernetes,eparis/kubernetes,hex108/kubernetes,krmayankk/kubernetes,dereknex/kubernetes,nckturner/kubernetes,kargakis/kubernetes,jfrazelle/kubernetes,k82cn/kubernetes,sputnik13/kubernetes,quinton-hoole/kubernetes,johscheuer/kubernetes,hzxuzhonghu/kubernetes,carlory/kubernetes,x13n/kubernetes,maisem/kubernetes,GulajavaMinistudio/kubernetes,kpgriffith/kubernetes,cmluciano/kubernetes,cblecker/kubernetes,tcharding/kubernetes,kevin-wangzefeng/kubernetes,fgimenez/kubernetes,wongma7/kubernetes,liggitt/kubernetes,zetaab/kubernetes,matthyx/kubernetes,dereknex/kubernetes,bsalamat/kubernetes,micahhausler/kubernetes,mYmNeo/kubernetes,marun/kubernetes,tomzhang/kubernetes,iterion/kubernetes,openshift/kubernetes,maciaszczykm/kubernetes,ymqytw/kubernetes,krmayankk/kubernetes,mbohlool/kubernetes,tengqm/kubernetes,intelsdi-x/kubernetes,LalatenduMohanty/kubernetes,wongma7/kubernetes,pwittrock/kubernetes,mahak/kubernetes,idvoretskyi/kubernetes,errordeveloper/kubernetes,ravisantoshgudimetla/kubernetes,du2016/kubernetes,stevesloka/kubernetes,luxas/kubernetes,sdminonne/kubernetes,fanzhangio/kubernetes,NickrenREN/kubernetes,Lion-Wei/kubernetes,resouer/kubernetes,maciaszczykm/kubernetes,pires/kubernetes,resouer/kubernetes,leblancd/kubernetes,dashpole/kubernetes,ping035627/kubernetes,spzala/kubernetes,njuicsgz/kubernetes-1,JacobTanenbaum/kubernetes,kevin-wangzefeng/kubernetes,deads2k/kubernetes,xychu/kubernetes,chrislovecnm/kubernetes,intelsdi-x/kubernetes,frodenas/kubernetes,jfrazelle/kubernetes,ConnorDoyle/kubernetes,qiujian16/kubernetes,ixdy/kubernetes,jackfrancis/kubernetes,mbohlool/kubernetes,grepory/kubernetes,MHBauer/kubernetes,huangjiuyuan/kubernetes,x13n/kubernetes,ingvagabund/kubernetes,li-ang/kubernetes,idvoretskyi/kubernetes,andrewrynhard/kubernetes,cmluciano/kubernetes,grepory/kubernetes,spiffxp/kubernetes,dims/kubernetes,cosmincojocar/kubernetes,huangjiuyuan/kubernetes,rpothier/kubernetes,screeley44/kubernetes,vmware/kubernetes,mboersma/kubernetes,grepory/kubernetes,resouer/kubernetes,aledbf/kubernetes,PI-Victor/kubernetes,bluebreezecf/kubernetes,u2takey/kubernetes,wangxing1517/kubernetes,qiujian16/kubernetes,juanvallejo/kubernetes,clairew/kubernetes,jennybuckley/kubernetes,mkumatag/kubernetes,kevin-wangzefeng/kubernetes,caseydavenport/kubernetes,fejta/kubernetes,tomerf/kubernetes,khenidak/kubernetes,cmluciano/kubernetes,bparees/kubernetes,ii/kubernetes,Acidburn0zzz/kubernetes,odacremolbap/kubernetes,andrewsykim/kubernetes,pmorie/kubernetes,GulajavaMinistudio/kubernetes,frodenas/kubernetes,ravisantoshgudimetla/kubernetes,mYmNeo/kubernetes,hzxuzhonghu/kubernetes,juju-solutions/kubernetes,dereknex/kubernetes,derekwaynecarr/kubernetes,luxas/kubernetes,csrwng/kubernetes,PI-Victor/kubernetes,DiamantiCom/kubernetes,MikeSpreitzer/kubernetes,marun/kubernetes,xychu/kubernetes,ii/kubernetes,tengqm/kubernetes,lojies/kubernetes,yarntime/kubernetes,gnufied/kubernetes,mattjmcnaughton/kubernetes,Acidburn0zzz/kubernetes,ncdc/kubernetes,joelsmith/kubernetes,juju-solutions/kubernetes,k82/kubernetes,caseydavenport/kubernetes,fejta/kubernetes,sanjeevm0/kubernetes,feiskyer/kubernetes,Hui-Zhi/kubernetes,kargakis/kubernetes,DiamantiCom/kubernetes,therc/kubernetes,tpounds/kubernetes,joelsmith/kubernetes,bparees/kubernetes,dixudx/kubernetes,klaus1982/kubernetes,juanvallejo/kubernetes,jdef/kubernetes,brendandburns/kubernetes,ymqytw/kubernetes,quinton-hoole/kubernetes,bruceauyeung/kubernetes,mosoft521/kubernetes,verult/kubernetes,deads2k/kubernetes,quinton-hoole/kubernetes,ping035627/kubernetes,luxas/kubernetes,mYmNeo/kubernetes,andrewrynhard/kubernetes,jackfrancis/kubernetes,rnaveiras/kubernetes,haySwim/kubernetes,cblecker/kubernetes,k82cn/kubernetes,eparis/kubernetes,kow3ns/kubernetes,weiwei04/kubernetes,olivierlemasle/kubernetes,enisoc/kubernetes,mikedanese/kubernetes,jackfrancis/kubernetes,humblec/kubernetes,krzyzacy/kubernetes,odacremolbap/kubernetes,jfchevrette/kubernetes,rrati/kubernetes,Hui-Zhi/kubernetes,eparis/kubernetes,tomerf/kubernetes,rrati/kubernetes,wenlxie/kubernetes,yarntime/kubernetes,zhangxiaoyu-zidif/kubernetes,fabriziopandini/kubernetes,madhanrm/kubernetes,tallclair/kubernetes,jsafrane/kubernetes,hex108/kubernetes,pweil-/kubernetes,weiwei04/kubernetes,du2016/kubernetes,zhangxiaoyu-zidif/kubernetes,liyinan926/kubernetes,liggitt/kubernetes,caseydavenport/kubernetes,dereknex/kubernetes,linux-on-ibm-z/kubernetes,ymqytw/kubernetes,zetaab/kubernetes,wanghaoran1988/kubernetes,cadmuxe/kubernetes,errordeveloper/kubernetes,Clarifai/kubernetes,iterion/kubernetes,mml/kubernetes,aveshagarwal/kubernetes,thockin/kubernetes,caseydavenport/kubernetes,tallclair/kubernetes,goblain/kubernetes,maciaszczykm/kubernetes,YuPengZTE/kubernetes,zhangmingld/kubernetes,lojies/kubernetes,nilebox/kubernetes,Clarifai/kubernetes,Lion-Wei/kubernetes,imcsk8/kubernetes,msau42/kubernetes,juanvallejo/kubernetes,PiotrProkop/kubernetes,mbohlool/kubernetes,bowei/kubernetes,dlorenc/kubernetes,xychu/kubernetes,xlgao-zju/kubernetes,chrislovecnm/kubernetes,cadmuxe/kubernetes,davidz627/kubernetes,khenidak/kubernetes,rnaveiras/kubernetes,roberthbailey/kubernetes,therc/kubernetes,salewski/kubernetes,intelsdi-x/kubernetes,erwinvaneyk/kubernetes,matthyx/kubernetes,pwittrock/kubernetes,jessfraz/kubernetes,Hui-Zhi/kubernetes,micahhausler/kubernetes,kargakis/kubernetes,ping035627/kubernetes,nckturner/kubernetes,errordeveloper/kubernetes,mikebrow/kubernetes,bparees/kubernetes,errordeveloper/kubernetes,tcnghia/kubernetes,enj/kubernetes,deads2k/kubernetes,cantbewong/kubernetes,rpothier/kubernetes,k82cn/kubernetes,YuPengZTE/kubernetes,u2takey/kubernetes,juju-solutions/kubernetes,ravilr/kubernetes,warmchang/kubernetes,jingxu97/kubernetes,ingvagabund/kubernetes,mboersma/kubernetes,iameli/kubernetes,sputnik13/kubernetes,khenidak/kubernetes,pires/kubernetes,tpepper/kubernetes,bowei/kubernetes,msau42/kubernetes,tomerf/kubernetes,sanjeevm0/kubernetes,goblain/kubernetes,warmchang/kubernetes,chestack/kubernetes,fejta/kubernetes,clairew/kubernetes,ravisantoshgudimetla/kubernetes,maisem/kubernetes,rnaveiras/kubernetes,errordeveloper/kubernetes,jagosan/kubernetes,soltysh/kubernetes,njuicsgz/kubernetes-1,nak3/kubernetes,mml/kubernetes,openshift/kubernetes,mikedanese/kubernetes,vikaschoudhary16/kubernetes,zhangmingld/kubernetes,marun/kubernetes,php-coder/kubernetes,ncdc/kubernetes,mengqiy/kubernetes,intelsdi-x/kubernetes,huangjiuyuan/kubernetes,sputnik13/kubernetes,saad-ali/kubernetes,sethpollack/kubernetes,weiwei04/kubernetes,salewski/kubernetes,verult/kubernetes,tallclair/kubernetes,PiotrProkop/kubernetes,MikeSpreitzer/kubernetes,jsafrane/kubernetes,saad-ali/kubernetes,hzxuzhonghu/kubernetes,kubernetes/kubernetes,Lion-Wei/kubernetes,alejandroEsc/kubernetes,davidz627/kubernetes,linyouchong/kubernetes,carlory/kubernetes,xlgao-zju/kubernetes,maciaszczykm/kubernetes,mYmNeo/kubernetes,DiamantiCom/kubernetes,bruceauyeung/kubernetes,juanvallejo/kubernetes,caseydavenport/kubernetes,tomerf/kubernetes,sethpollack/kubernetes,msau42/kubernetes,jfrazelle/kubernetes,shyamjvs/kubernetes,nak3/kubernetes,pires/kubernetes,kpgriffith/kubernetes,cblecker/kubernetes,feiskyer/kubernetes,sputnik13/kubernetes,linux-on-ibm-z/kubernetes,jingxu97/kubernetes,ixdy/kubernetes,mbohlool/kubernetes,mml/kubernetes,tcnghia/kubernetes,olivierlemasle/kubernetes,yujuhong/kubernetes,vmware/kubernetes,vikaschoudhary16/kubernetes,wanghaoran1988/kubernetes,eparis/kubernetes,vladimirvivien/kubernetes,odacremolbap/kubernetes,rnaveiras/kubernetes,zhangxiaoyu-zidif/kubernetes,aledbf/kubernetes,thockin/kubernetes,thockin/kubernetes,rrati/kubernetes,du2016/kubernetes,maisem/kubernetes,php-coder/kubernetes,idvoretskyi/kubernetes,cofyc/kubernetes,imcsk8/kubernetes,liggitt/kubernetes,odacremolbap/kubernetes,weiwei04/kubernetes,ravisantoshgudimetla/kubernetes,liyinan926/kubernetes,grepory/kubernetes,zhouhaibing089/kubernetes,GulajavaMinistudio/kubernetes,kubernetes/kubernetes,fgimenez/kubernetes,NickrenREN/kubernetes,chestack/kubernetes,mahak/kubernetes,weiwei04/kubernetes,tpounds/kubernetes,linyouchong/kubernetes,YuPengZTE/kubernetes,tpepper/kubernetes,krzyzacy/kubernetes,coolsvap/kubernetes,aveshagarwal/kubernetes,chestack/kubernetes,haySwim/kubernetes,yujuhong/kubernetes,tpounds/kubernetes,kubernetes/kubernetes,erwinvaneyk/kubernetes,xlgao-zju/kubernetes,k82/kubernetes,k82cn/kubernetes,ravilr/kubernetes,spzala/kubernetes,jingax10/kubernetes,feiskyer/kubernetes,matthyx/kubernetes,ixdy/kubernetes,wongma7/kubernetes,mengqiy/kubernetes,tomzhang/kubernetes,joelsmith/kubernetes,MikeSpreitzer/kubernetes,ncdc/kubernetes,nikhita/kubernetes,yujuhong/kubernetes,linyouchong/kubernetes,x13n/kubernetes,maisem/kubernetes,yuexiao-wang/kubernetes,justinsb/kubernetes,zetaab/kubernetes,enisoc/kubernetes,intelsdi-x/kubernetes,bsalamat/kubernetes,GulajavaMinistudio/kubernetes,warmchang/kubernetes,dlorenc/kubernetes,tcharding/kubernetes,saad-ali/kubernetes,cadmuxe/kubernetes,alejandroEsc/kubernetes,jingax10/kubernetes,fejta/kubernetes,verb/kubernetes,justinsb/kubernetes,therc/kubernetes,php-coder/kubernetes,sanjeevm0/kubernetes,humblec/kubernetes,mbohlool/kubernetes,csrwng/kubernetes,vladimirvivien/kubernetes,madhanrm/kubernetes,ateleshev/kubernetes,stevesloka/kubernetes,vmware/kubernetes,andrewsykim/kubernetes,YuPengZTE/kubernetes,nckturner/kubernetes,yujuhong/kubernetes,bowei/kubernetes,cadmuxe/kubernetes,jackfrancis/kubernetes,aveshagarwal/kubernetes,dereknex/kubernetes,MHBauer/kubernetes,mosoft521/kubernetes,tcharding/kubernetes,monopole/kubernetes,mosoft521/kubernetes,clairew/kubernetes,ConnorDoyle/kubernetes,xlgao-zju/kubernetes,andrewrynhard/kubernetes,zetaab/kubernetes,tcharding/kubernetes,sdminonne/kubernetes,JacobTanenbaum/kubernetes,sdminonne/kubernetes,imcsk8/kubernetes,nckturner/kubernetes,grepory/kubernetes,mikedanese/kubernetes,Acidburn0zzz/kubernetes,BenTheElder/kubernetes,dlorenc/kubernetes,roberthbailey/kubernetes,ConnorDoyle/kubernetes,wanghaoran1988/kubernetes,MHBauer/kubernetes,jsafrane/kubernetes,mikebrow/kubernetes,monopole/kubernetes,PI-Victor/kubernetes,alejandroEsc/kubernetes,wenlxie/kubernetes,kpgriffith/kubernetes,cadmuxe/kubernetes,dlorenc/kubernetes,php-coder/kubernetes,kubernetes/kubernetes,vladimirvivien/kubernetes,feiskyer/kubernetes,grepory/kubernetes,pmorie/kubernetes,dashpole/kubernetes,wenlxie/kubernetes,justinsb/kubernetes,jingxu97/kubernetes,humblec/kubernetes,ncdc/kubernetes,kargakis/kubernetes,spzala/kubernetes,yujuhong/kubernetes,davidz627/kubernetes,spiffxp/kubernetes,yuexiao-wang/kubernetes,openshift/kubernetes,enisoc/kubernetes,msau42/kubernetes,jackfrancis/kubernetes,li-ang/kubernetes,krmayankk/kubernetes,tcnghia/kubernetes,clairew/kubernetes,bluebreezecf/kubernetes,bsalamat/kubernetes,resouer/kubernetes,tallclair/kubernetes,fabriziopandini/kubernetes,MHBauer/kubernetes,linux-on-ibm-z/kubernetes,huangjiuyuan/kubernetes,php-coder/kubernetes,klaus1982/kubernetes,spiffxp/kubernetes,php-coder/kubernetes,jfchevrette/kubernetes,gnufied/kubernetes,huangjiuyuan/kubernetes,jdef/kubernetes,sethpollack/kubernetes,therc/kubernetes,salewski/kubernetes,DiamantiCom/kubernetes,kow3ns/kubernetes,vmware/kubernetes,mahak/kubernetes,haySwim/kubernetes,frodenas/kubernetes,kpgriffith/kubernetes,krmayankk/kubernetes,lojies/kubernetes,jennybuckley/kubernetes,pweil-/kubernetes,roberthbailey/kubernetes,tengqm/kubernetes,wanghaoran1988/kubernetes,iterion/kubernetes,rafax/kubernetes,mboersma/kubernetes,verb/kubernetes,rrati/kubernetes,krzyzacy/kubernetes,enisoc/kubernetes,ixdy/kubernetes,madhanrm/kubernetes,kow3ns/kubernetes,sdminonne/kubernetes,pwittrock/kubernetes,ymqytw/kubernetes,liyinan926/kubernetes,jfrazelle/kubernetes,luxas/kubernetes,ncdc/kubernetes,ConnorDoyle/kubernetes,goblain/kubernetes,tpepper/kubernetes,juanvallejo/kubernetes,yuexiao-wang/kubernetes,tallclair/kubernetes,mikebrow/kubernetes,tpounds/kubernetes,brendandburns/kubernetes,Acidburn0zzz/kubernetes,mfojtik/kubernetes,spiffxp/kubernetes,mattjmcnaughton/kubernetes,quinton-hoole/kubernetes,lichuqiang/kubernetes,mboersma/kubernetes,ingvagabund/kubernetes,kow3ns/kubernetes,ravisantoshgudimetla/kubernetes,stevesloka/kubernetes,li-ang/kubernetes,fgimenez/kubernetes,lichuqiang/kubernetes,kevensen/kubernetes,jagosan/kubernetes,kevensen/kubernetes,therc/kubernetes,dixudx/kubernetes,Lion-Wei/kubernetes,msau42/kubernetes,quinton-hoole/kubernetes,kitt1987/kubernetes,aveshagarwal/kubernetes,bparees/kubernetes,leblancd/kubernetes,ConnorDoyle/kubernetes,cosmincojocar/kubernetes,chrislovecnm/kubernetes,nak3/kubernetes,zhangmingld/kubernetes,vladimirvivien/kubernetes,shyamjvs/kubernetes,micahhausler/kubernetes,bsalamat/kubernetes,pweil-/kubernetes,juanvallejo/kubernetes,errordeveloper/kubernetes,dlorenc/kubernetes,linyouchong/kubernetes,mikedanese/kubernetes,warmchang/kubernetes,jdef/kubernetes,jennybuckley/kubernetes,justinsb/kubernetes,kitt1987/kubernetes,nak3/kubernetes,cantbewong/kubernetes,du2016/kubernetes,screeley44/kubernetes,mikedanese/kubernetes,kevensen/kubernetes,iterion/kubernetes,ravilr/kubernetes,eparis/kubernetes,vikaschoudhary16/kubernetes,PI-Victor/kubernetes,Hui-Zhi/kubernetes,nikhita/kubernetes,NickrenREN/kubernetes,njuicsgz/kubernetes-1,resouer/kubernetes,sanjeevm0/kubernetes,ravilr/kubernetes,lichuqiang/kubernetes,cmluciano/kubernetes,verb/kubernetes,cblecker/kubernetes,alejandroEsc/kubernetes,bruceauyeung/kubernetes,tcnghia/kubernetes,nilebox/kubernetes,andrewsykim/kubernetes,hzxuzhonghu/kubernetes,mfojtik/kubernetes,rpothier/kubernetes,lojies/kubernetes,caseydavenport/kubernetes,xychu/kubernetes,feiskyer/kubernetes,andrewrynhard/kubernetes,wenlxie/kubernetes,soltysh/kubernetes,justinsb/kubernetes,verult/kubernetes,coolsvap/kubernetes,khenidak/kubernetes,thockin/kubernetes,kow3ns/kubernetes,jfchevrette/kubernetes,mfojtik/kubernetes,kitt1987/kubernetes,chrislovecnm/kubernetes,derekwaynecarr/kubernetes,DiamantiCom/kubernetes,micahhausler/kubernetes,therc/kubernetes,hex108/kubernetes,DiamantiCom/kubernetes,imcsk8/kubernetes,cantbewong/kubernetes,LalatenduMohanty/kubernetes,zhangxiaoyu-zidif/kubernetes,liggitt/kubernetes,lichuqiang/kubernetes,lichuqiang/kubernetes,nilebox/kubernetes,rnaveiras/kubernetes,jennybuckley/kubernetes,aledbf/kubernetes,ravisantoshgudimetla/kubernetes,humblec/kubernetes,screeley44/kubernetes,BenTheElder/kubernetes,nikhita/kubernetes,dims/kubernetes,bizhao/kubernetes,mengqiy/kubernetes,verult/kubernetes,mYmNeo/kubernetes,bruceauyeung/kubernetes,bowei/kubernetes,sanjeevm0/kubernetes,MHBauer/kubernetes,x13n/kubernetes,mengqiy/kubernetes,PI-Victor/kubernetes,monopole/kubernetes,qiujian16/kubernetes,xlgao-zju/kubernetes,rafax/kubernetes,johscheuer/kubernetes,clairew/kubernetes,humblec/kubernetes,aledbf/kubernetes,fanzhangio/kubernetes,tpepper/kubernetes,xlgao-zju/kubernetes,gnufied/kubernetes,bizhao/kubernetes,dixudx/kubernetes,pires/kubernetes,yuexiao-wang/kubernetes,zhangmingld/kubernetes,cosmincojocar/kubernetes,yuexiao-wang/kubernetes,jdef/kubernetes,enj/kubernetes,mattjmcnaughton/kubernetes,cadmuxe/kubernetes,andrewrynhard/kubernetes,cosmincojocar/kubernetes,mkumatag/kubernetes,kow3ns/kubernetes,k82/kubernetes,nak3/kubernetes,derekwaynecarr/kubernetes,Lion-Wei/kubernetes,tomzhang/kubernetes,pires/kubernetes,nckturner/kubernetes,ii/kubernetes,resouer/kubernetes,njuicsgz/kubernetes-1,clairew/kubernetes,lichuqiang/kubernetes,monopole/kubernetes,bowei/kubernetes,jfrazelle/kubernetes,x13n/kubernetes,ping035627/kubernetes,chrislovecnm/kubernetes,salewski/kubernetes,saad-ali/kubernetes,mboersma/kubernetes,LalatenduMohanty/kubernetes,NickrenREN/kubernetes,mfojtik/kubernetes,frodenas/kubernetes,khenidak/kubernetes,PiotrProkop/kubernetes,mahak/kubernetes,mikebrow/kubernetes,krzyzacy/kubernetes,jessfraz/kubernetes,JacobTanenbaum/kubernetes,leblancd/kubernetes,spzala/kubernetes,carlory/kubernetes,ii/kubernetes,johscheuer/kubernetes,roberthbailey/kubernetes,bsalamat/kubernetes,zhangmingld/kubernetes,verb/kubernetes,pmorie/kubernetes,wongma7/kubernetes,pweil-/kubernetes,juju-solutions/kubernetes,carlory/kubernetes,andrewsykim/kubernetes,jingax10/kubernetes,Clarifai/kubernetes,mYmNeo/kubernetes,cantbewong/kubernetes,hzxuzhonghu/kubernetes,haySwim/kubernetes,mfojtik/kubernetes,nikhita/kubernetes,linux-on-ibm-z/kubernetes,PI-Victor/kubernetes,fabriziopandini/kubernetes,johscheuer/kubernetes,jagosan/kubernetes,zhouhaibing089/kubernetes,nikhita/kubernetes,vikaschoudhary16/kubernetes,Acidburn0zzz/kubernetes,nak3/kubernetes,fanzhangio/kubernetes,qiujian16/kubernetes,tomzhang/kubernetes,ingvagabund/kubernetes,saad-ali/kubernetes,dashpole/kubernetes,u2takey/kubernetes,kitt1987/kubernetes,liggitt/kubernetes,coolsvap/kubernetes,JacobTanenbaum/kubernetes,tomzhang/kubernetes,jdef/kubernetes,YuPengZTE/kubernetes,cmluciano/kubernetes,mml/kubernetes,kpgriffith/kubernetes,Clarifai/kubernetes,chestack/kubernetes,qiujian16/kubernetes,vikaschoudhary16/kubernetes,wenlxie/kubernetes,Acidburn0zzz/kubernetes,warmchang/kubernetes,enisoc/kubernetes,sputnik13/kubernetes,zhouhaibing089/kubernetes,BenTheElder/kubernetes,mattjmcnaughton/kubernetes,tpepper/kubernetes,kpgriffith/kubernetes,wanghaoran1988/kubernetes,maciaszczykm/kubernetes,openshift/kubernetes,tengqm/kubernetes,fejta/kubernetes,fabriziopandini/kubernetes,nilebox/kubernetes,cofyc/kubernetes,linux-on-ibm-z/kubernetes,maisem/kubernetes,PiotrProkop/kubernetes,nilebox/kubernetes,mboersma/kubernetes,liyinan926/kubernetes,tcharding/kubernetes,huangjiuyuan/kubernetes,JacobTanenbaum/kubernetes,verb/kubernetes,fgimenez/kubernetes,sputnik13/kubernetes,tomzhang/kubernetes,ateleshev/kubernetes,dashpole/kubernetes,NickrenREN/kubernetes,cofyc/kubernetes,li-ang/kubernetes,wangxing1517/kubernetes,vladimirvivien/kubernetes,dixudx/kubernetes,leblancd/kubernetes,mengqiy/kubernetes,sethpollack/kubernetes,idvoretskyi/kubernetes,cofyc/kubernetes,jagosan/kubernetes,Clarifai/kubernetes,yarntime/kubernetes,krmayankk/kubernetes,spiffxp/kubernetes,mkumatag/kubernetes,davidz627/kubernetes,kitt1987/kubernetes,ingvagabund/kubernetes,jfchevrette/kubernetes,mikebrow/kubernetes,ateleshev/kubernetes,k82/kubernetes,erwinvaneyk/kubernetes,JacobTanenbaum/kubernetes,kevensen/kubernetes,jessfraz/kubernetes,jdef/kubernetes,coolsvap/kubernetes,qiujian16/kubernetes,bsalamat/kubernetes,mml/kubernetes,u2takey/kubernetes,tpepper/kubernetes,k82cn/kubernetes,pwittrock/kubernetes,aveshagarwal/kubernetes,GulajavaMinistudio/kubernetes,deads2k/kubernetes,jfchevrette/kubernetes,zhouhaibing089/kubernetes,kevin-wangzefeng/kubernetes,dashpole/kubernetes,kargakis/kubernetes,eparis/kubernetes,davidz627/kubernetes,ii/kubernetes,dims/kubernetes,aledbf/kubernetes,joelsmith/kubernetes,tcnghia/kubernetes,enisoc/kubernetes,tcnghia/kubernetes,bizhao/kubernetes,cantbewong/kubernetes,pmorie/kubernetes,iameli/kubernetes,dims/kubernetes,bizhao/kubernetes,juju-solutions/kubernetes,wanghaoran1988/kubernetes,bparees/kubernetes,erwinvaneyk/kubernetes,LalatenduMohanty/kubernetes,goblain/kubernetes,rafax/kubernetes,YuPengZTE/kubernetes,bluebreezecf/kubernetes,zhangmingld/kubernetes,rafax/kubernetes,bruceauyeung/kubernetes,mkumatag/kubernetes,luxas/kubernetes,spzala/kubernetes,Clarifai/kubernetes,alejandroEsc/kubernetes,MikeSpreitzer/kubernetes,kitt1987/kubernetes,frodenas/kubernetes,wenlxie/kubernetes,derekwaynecarr/kubernetes,ncdc/kubernetes,coolsvap/kubernetes,monopole/kubernetes,cofyc/kubernetes,fanzhangio/kubernetes,jennybuckley/kubernetes,yarntime/kubernetes,u2takey/kubernetes,enj/kubernetes,cosmincojocar/kubernetes,iameli/kubernetes,tengqm/kubernetes,mfojtik/kubernetes,sanjeevm0/kubernetes,Hui-Zhi/kubernetes,fejta/kubernetes,mbohlool/kubernetes,yarntime/kubernetes,linyouchong/kubernetes,quinton-hoole/kubernetes,Hui-Zhi/kubernetes,erwinvaneyk/kubernetes,odacremolbap/kubernetes,tomerf/kubernetes,mml/kubernetes,dims/kubernetes,vikaschoudhary16/kubernetes,xychu/kubernetes,madhanrm/kubernetes,ixdy/kubernetes,aveshagarwal/kubernetes,pweil-/kubernetes,marun/kubernetes,gnufied/kubernetes,maciaszczykm/kubernetes,msau42/kubernetes,pwittrock/kubernetes,bluebreezecf/kubernetes,kevensen/kubernetes,matthyx/kubernetes,jsafrane/kubernetes,tpounds/kubernetes,soltysh/kubernetes,rpothier/kubernetes,screeley44/kubernetes,brendandburns/kubernetes,justinsb/kubernetes,iameli/kubernetes,enj/kubernetes,brendandburns/kubernetes,njuicsgz/kubernetes-1,goblain/kubernetes,micahhausler/kubernetes,fanzhangio/kubernetes,pmorie/kubernetes,wangxing1517/kubernetes,linyouchong/kubernetes,mattjmcnaughton/kubernetes,vmware/kubernetes,andrewsykim/kubernetes,roberthbailey/kubernetes,hex108/kubernetes,LalatenduMohanty/kubernetes,zetaab/kubernetes,haySwim/kubernetes,tomerf/kubernetes,fgimenez/kubernetes,ixdy/kubernetes,idvoretskyi/kubernetes,khenidak/kubernetes,iterion/kubernetes,LalatenduMohanty/kubernetes,jingax10/kubernetes,wangxing1517/kubernetes,juju-solutions/kubernetes,lojies/kubernetes,intelsdi-x/kubernetes,spiffxp/kubernetes,tallclair/kubernetes,liyinan926/kubernetes,xychu/kubernetes,jingxu97/kubernetes,andrewrynhard/kubernetes,tomzhang/kubernetes,olivierlemasle/kubernetes,cantbewong/kubernetes,bowei/kubernetes,MHBauer/kubernetes,bluebreezecf/kubernetes,mahak/kubernetes,shyamjvs/kubernetes,cofyc/kubernetes,u2takey/kubernetes,krmayankk/kubernetes,rpothier/kubernetes,imcsk8/kubernetes,krzyzacy/kubernetes,joelsmith/kubernetes,dashpole/kubernetes,imcsk8/kubernetes,vmware/kubernetes,liyinan926/kubernetes,cblecker/kubernetes,derekwaynecarr/kubernetes,k82/kubernetes,njuicsgz/kubernetes-1,chrislovecnm/kubernetes,tomzhang/kubernetes,jagosan/kubernetes,klaus1982/kubernetes,stevesloka/kubernetes,salewski/kubernetes,vladimirvivien/kubernetes,kevin-wangzefeng/kubernetes,weiwei04/kubernetes,bizhao/kubernetes,shyamjvs/kubernetes,tpounds/kubernetes,verult/kubernetes,iterion/kubernetes,mosoft521/kubernetes,wangxing1517/kubernetes,odacremolbap/kubernetes,dlorenc/kubernetes,ping035627/kubernetes,leblancd/kubernetes,du2016/kubernetes,yuexiao-wang/kubernetes,krzyzacy/kubernetes,rrati/kubernetes,li-ang/kubernetes,jfchevrette/kubernetes,johscheuer/kubernetes,bizhao/kubernetes,soltysh/kubernetes,ConnorDoyle/kubernetes,ateleshev/kubernetes,cmluciano/kubernetes,zetaab/kubernetes,hzxuzhonghu/kubernetes,pires/kubernetes,luxas/kubernetes,hex108/kubernetes,NickrenREN/kubernetes,marun/kubernetes,joelsmith/kubernetes,csrwng/kubernetes,iameli/kubernetes,erwinvaneyk/kubernetes,rpothier/kubernetes,davidz627/kubernetes,tomzhang/kubernetes,chestack/kubernetes,stevesloka/kubernetes,sdminonne/kubernetes,saad-ali/kubernetes,enj/kubernetes,tcharding/kubernetes,leblancd/kubernetes,ingvagabund/kubernetes,openshift/kubernetes,deads2k/kubernetes,zhouhaibing089/kubernetes,verult/kubernetes,jessfraz/kubernetes,jessfraz/kubernetes,jingxu97/kubernetes,ymqytw/kubernetes,idvoretskyi/kubernetes,frodenas/kubernetes,pwittrock/kubernetes,johscheuer/kubernetes,ateleshev/kubernetes,coolsvap/kubernetes,mkumatag/kubernetes,x13n/kubernetes,cosmincojocar/kubernetes,wongma7/kubernetes,Lion-Wei/kubernetes,madhanrm/kubernetes,shyamjvs/kubernetes,bruceauyeung/kubernetes,mboersma/kubernetes,mattjmcnaughton/kubernetes,mosoft521/kubernetes,BenTheElder/kubernetes,zhangxiaoyu-zidif/kubernetes,soltysh/kubernetes,brendandburns/kubernetes,BenTheElder/kubernetes,sethpollack/kubernetes,dixudx/kubernetes,kargakis/kubernetes,njuicsgz/kubernetes-1,goblain/kubernetes,zhangxiaoyu-zidif/kubernetes,marun/kubernetes,olivierlemasle/kubernetes,maisem/kubernetes,MikeSpreitzer/kubernetes,klaus1982/kubernetes,haySwim/kubernetes,pweil-/kubernetes,nilebox/kubernetes,olivierlemasle/kubernetes,ravilr/kubernetes,madhanrm/kubernetes,screeley44/kubernetes,jsafrane/kubernetes,mboersma/kubernetes,derekwaynecarr/kubernetes,njuicsgz/kubernetes-1,screeley44/kubernetes,csrwng/kubernetes
yaml
## Code Before: kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: calico namespace: kube-system labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: - namespaces verbs: - get - list - watch - apiGroups: [""] resources: - endpoints verbs: - get - apiGroups: [""] resources: - services verbs: - get - apiGroups: [""] resources: - pods/status verbs: - update - apiGroups: [""] resources: - pods verbs: - get - list - watch - patch - apiGroups: [""] resources: - nodes verbs: - get - list - update - watch - apiGroups: ["extensions"] resources: - networkpolicies verbs: - get - list - watch - apiGroups: ["networking.k8s.io"] resources: - networkpolicies verbs: - watch - list - apiGroups: ["crd.projectcalico.org"] resources: - globalfelixconfigs - felixconfigurations - bgppeers - globalbgpconfigs - bgpconfigurations - ippools - globalnetworkpolicies - globalnetworksets - networkpolicies - clusterinformations - hostendpoints verbs: - create - get - list - update - watch ## Instruction: Add serviceaccounts permission for ClusterRole, required by Calico v3.2.0+. ## Code After: kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: calico namespace: kube-system labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: - namespaces - serviceaccounts verbs: - get - list - watch - apiGroups: [""] resources: - endpoints verbs: - get - apiGroups: [""] resources: - services verbs: - get - apiGroups: [""] resources: - pods/status verbs: - update - apiGroups: [""] resources: - pods verbs: - get - list - watch - patch - apiGroups: [""] resources: - nodes verbs: - get - list - update - watch - apiGroups: ["extensions"] resources: - networkpolicies verbs: - get - list - watch - apiGroups: ["networking.k8s.io"] resources: - networkpolicies verbs: - watch - list - apiGroups: ["crd.projectcalico.org"] resources: - globalfelixconfigs - felixconfigurations - bgppeers - globalbgpconfigs - bgpconfigurations - ippools - globalnetworkpolicies - globalnetworksets - networkpolicies - clusterinformations - hostendpoints verbs: - create - get - list - update - watch
kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: calico namespace: kube-system labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: - namespaces + - serviceaccounts verbs: - get - list - watch - apiGroups: [""] resources: - endpoints verbs: - get - apiGroups: [""] resources: - services verbs: - get - apiGroups: [""] resources: - pods/status verbs: - update - apiGroups: [""] resources: - pods verbs: - get - list - watch - patch - apiGroups: [""] resources: - nodes verbs: - get - list - update - watch - apiGroups: ["extensions"] resources: - networkpolicies verbs: - get - list - watch - apiGroups: ["networking.k8s.io"] resources: - networkpolicies verbs: - watch - list - apiGroups: ["crd.projectcalico.org"] resources: - globalfelixconfigs - felixconfigurations - bgppeers - globalbgpconfigs - bgpconfigurations - ippools - globalnetworkpolicies - globalnetworksets - networkpolicies - clusterinformations - hostendpoints verbs: - create - get - list - update - watch
1
0.012658
1
0
ba115c2087b7fc5b07073ee42af6e2548d462245
scripts/scripts/current_track.py
scripts/scripts/current_track.py
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(lin[0].split("-")[-1] + " " + duration[2]) else: print("stopped") else: print("stopped") if __name__ == "__main__": main()
import subprocess def text_split(text): new_text = text.split() new_text_len = len(new_text) if new_text_len < 2: return new_text[0] elif new_text_len == 2: return text else: return " ".join(new_text[0:2]) + "..." def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(lin[0].split("-")[-1] + " " + duration[2]) else: print("stopped") else: title = subprocess.getoutput("spotify-now -i %title -p 'paused' -e stopped") if title == "paused" or title == "stopped": print(title) elif title == "": print("empty") else: artist = subprocess.getoutput("spotify-now -i '%artist'") new_title = text_split(title) new_artist = text_split(artist) print(new_title + ' - ' + new_artist) if __name__ == "__main__": main()
Use `spotify-now` to get current song info in i3blocks
[track] Use `spotify-now` to get current song info in i3blocks
Python
mit
iAmMrinal0/dotfiles,iAmMrinal0/dotfiles
python
## Code Before: import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(lin[0].split("-")[-1] + " " + duration[2]) else: print("stopped") else: print("stopped") if __name__ == "__main__": main() ## Instruction: [track] Use `spotify-now` to get current song info in i3blocks ## Code After: import subprocess def text_split(text): new_text = text.split() new_text_len = len(new_text) if new_text_len < 2: return new_text[0] elif new_text_len == 2: return text else: return " ".join(new_text[0:2]) + "..." def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(lin[0].split("-")[-1] + " " + duration[2]) else: print("stopped") else: title = subprocess.getoutput("spotify-now -i %title -p 'paused' -e stopped") if title == "paused" or title == "stopped": print(title) elif title == "": print("empty") else: artist = subprocess.getoutput("spotify-now -i '%artist'") new_title = text_split(title) new_artist = text_split(artist) print(new_title + ' - ' + new_artist) if __name__ == "__main__": main()
import subprocess + + def text_split(text): + new_text = text.split() + new_text_len = len(new_text) + if new_text_len < 2: + return new_text[0] + elif new_text_len == 2: + return text + else: + return " ".join(new_text[0:2]) + "..." def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(lin[0].split("-")[-1] + " " + duration[2]) else: print("stopped") else: - print("stopped") + title = subprocess.getoutput("spotify-now -i %title -p 'paused' -e stopped") + if title == "paused" or title == "stopped": + print(title) + elif title == "": + print("empty") + else: + artist = subprocess.getoutput("spotify-now -i '%artist'") + new_title = text_split(title) + new_artist = text_split(artist) + print(new_title + ' - ' + new_artist) if __name__ == "__main__": main()
21
1
20
1
8b5fb25581aa3b6e8dc3d315522c7e0fece22b5a
docs/recipes/README.md
docs/recipes/README.md
Recipes ======= Here you'll find recipes to help get your Brisket apps started. Got your own recipe? Submit a pull request. * [Fetching Multiple Models](fetching-multiple-models.md)
Recipes ======= Here you'll find recipes to help get your Brisket apps started. Got your own recipe? Submit a pull request. * [Fetching Multiple Models](fetching-multiple-models.md) * [Bundling with Browserify](bundling-with-browserify.md)
Add Bundling with Browserify to the recipes page
Add Bundling with Browserify to the recipes page
Markdown
apache-2.0
zomaish/brisket,wawjr3d/brisket,ankurp/brisket,stsvilik/brisket,yhagio/brisket,jmptrader/brisket,wawjr3d/brisket,sylnp0201/brisket,bloomberg/brisket,jpatel3/brisket,yhagio/brisket,jpatel3/brisket,stsvilik/brisket,jmptrader/brisket,zomaish/brisket,leochen1216/brisket,ankurp/brisket,leochen1216/brisket,bloomberg/brisket
markdown
## Code Before: Recipes ======= Here you'll find recipes to help get your Brisket apps started. Got your own recipe? Submit a pull request. * [Fetching Multiple Models](fetching-multiple-models.md) ## Instruction: Add Bundling with Browserify to the recipes page ## Code After: Recipes ======= Here you'll find recipes to help get your Brisket apps started. Got your own recipe? Submit a pull request. * [Fetching Multiple Models](fetching-multiple-models.md) * [Bundling with Browserify](bundling-with-browserify.md)
Recipes ======= Here you'll find recipes to help get your Brisket apps started. Got your own recipe? Submit a pull request. * [Fetching Multiple Models](fetching-multiple-models.md) + * [Bundling with Browserify](bundling-with-browserify.md)
1
0.166667
1
0
d5344ad6b7319d90c4ac47ef5efd53d09a0f1dd0
middleware/lua/my_middleware.lua
middleware/lua/my_middleware.lua
function MyPreMiddleware(request, session, spec) print("MyPreMiddleware, request=", request, "session=", session, "spec=", spec) tyk.req.set_header("myluaheader", "myluavalue") -- print("User-Agent header:", tyk.header["User-Agent"]) return request, session end
function MyPreMiddleware(request, session, spec) print("MyPreMiddleware, request=", request, "session=", session, "spec=", spec) tyk.req.set_header("myluaheader", "myluavalue") local headers = tyk.req.get_headers() print(headers) tyk.req.clear_header("User-Agent") -- print("User-Agent header:", tyk.header["User-Agent"]) return request, session end
Update Lua sample with header transformations.
Update Lua sample with header transformations.
Lua
mpl-2.0
nebolsin/tyk,nebolsin/tyk,lonelycode/tyk,nebolsin/tyk,lonelycode/tyk,mvdan/tyk,mvdan/tyk,nebolsin/tyk,lonelycode/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,mvdan/tyk,mvdan/tyk,mvdan/tyk,mvdan/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk
lua
## Code Before: function MyPreMiddleware(request, session, spec) print("MyPreMiddleware, request=", request, "session=", session, "spec=", spec) tyk.req.set_header("myluaheader", "myluavalue") -- print("User-Agent header:", tyk.header["User-Agent"]) return request, session end ## Instruction: Update Lua sample with header transformations. ## Code After: function MyPreMiddleware(request, session, spec) print("MyPreMiddleware, request=", request, "session=", session, "spec=", spec) tyk.req.set_header("myluaheader", "myluavalue") local headers = tyk.req.get_headers() print(headers) tyk.req.clear_header("User-Agent") -- print("User-Agent header:", tyk.header["User-Agent"]) return request, session end
function MyPreMiddleware(request, session, spec) print("MyPreMiddleware, request=", request, "session=", session, "spec=", spec) tyk.req.set_header("myluaheader", "myluavalue") + local headers = tyk.req.get_headers() + print(headers) + tyk.req.clear_header("User-Agent") -- print("User-Agent header:", tyk.header["User-Agent"]) return request, session end
3
0.5
3
0
8f7640fd5a145dba724974ca5a46f73b9c991c45
cloud_notes/templatetags/markdown_filters.py
cloud_notes/templatetags/markdown_filters.py
from django import template import markdown as md import bleach register = template.Library() def markdown(value): """convert to markdown""" return md.markdown(bleach.clean(value)) register.filter('markdown', markdown)
from django import template import markdown as md import bleach import copy register = template.Library() def markdown(value): """convert to markdown""" allowed_tags = bleach.ALLOWED_TAGS + ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] return bleach.clean(md.markdown(value), tags = allowed_tags) register.filter('markdown', markdown)
Fix blockquote missing from markdown filter
Fix blockquote missing from markdown filter
Python
apache-2.0
kiwiheretic/logos-v2,kiwiheretic/logos-v2,kiwiheretic/logos-v2,kiwiheretic/logos-v2
python
## Code Before: from django import template import markdown as md import bleach register = template.Library() def markdown(value): """convert to markdown""" return md.markdown(bleach.clean(value)) register.filter('markdown', markdown) ## Instruction: Fix blockquote missing from markdown filter ## Code After: from django import template import markdown as md import bleach import copy register = template.Library() def markdown(value): """convert to markdown""" allowed_tags = bleach.ALLOWED_TAGS + ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] return bleach.clean(md.markdown(value), tags = allowed_tags) register.filter('markdown', markdown)
from django import template import markdown as md import bleach + import copy register = template.Library() def markdown(value): """convert to markdown""" - return md.markdown(bleach.clean(value)) + allowed_tags = bleach.ALLOWED_TAGS + ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] + return bleach.clean(md.markdown(value), tags = allowed_tags) register.filter('markdown', markdown)
4
0.363636
3
1
b774c9e57079ee81ca2c32baf1c8bc2be791998e
.github/workflows/plugin_compatibility.yml
.github/workflows/plugin_compatibility.yml
name: Plugin compatibility on: [push] jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Setup Java uses: actions/setup-java@v1 with: java-version: 8 - name: Build the plugin using Gradle run: ./gradlew buildPlugin - uses: thepieterdc/intellij-plugin-verifier-action@v1.1.1 with: plugin: '/home/runner/work/idea-gradle-dependencies-formatter/idea-gradle-dependencies-formatter/build/distributions/idea-gradle-dependencies-formatter-*' versions: | 2020.1
name: Plugin compatibility on: [push] jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Setup Java uses: actions/setup-java@v1 with: java-version: 8 - name: Build the plugin using Gradle run: ./gradlew buildPlugin - uses: thepieterdc/intellij-plugin-verifier-action@v1.1.1 with: plugin: '/home/runner/work/idea-gradle-dependencies-formatter/idea-gradle-dependencies-formatter/build/distributions/idea-gradle-dependencies-formatter-*' versions: | 2019.1.4 2019.2.4 2019.3.4 2020.1 LATEST-EAP-SNAPSHOT
Check compatibility with multiple versions
Check compatibility with multiple versions
YAML
mit
platan/idea-gradle-dependencies-formatter,platan/idea-gradle-dependencies-formatter,platan/idea-gradle-dependencies-formatter,platan/idea-gradle-dependencies-formatter
yaml
## Code Before: name: Plugin compatibility on: [push] jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Setup Java uses: actions/setup-java@v1 with: java-version: 8 - name: Build the plugin using Gradle run: ./gradlew buildPlugin - uses: thepieterdc/intellij-plugin-verifier-action@v1.1.1 with: plugin: '/home/runner/work/idea-gradle-dependencies-formatter/idea-gradle-dependencies-formatter/build/distributions/idea-gradle-dependencies-formatter-*' versions: | 2020.1 ## Instruction: Check compatibility with multiple versions ## Code After: name: Plugin compatibility on: [push] jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Setup Java uses: actions/setup-java@v1 with: java-version: 8 - name: Build the plugin using Gradle run: ./gradlew buildPlugin - uses: thepieterdc/intellij-plugin-verifier-action@v1.1.1 with: plugin: '/home/runner/work/idea-gradle-dependencies-formatter/idea-gradle-dependencies-formatter/build/distributions/idea-gradle-dependencies-formatter-*' versions: | 2019.1.4 2019.2.4 2019.3.4 2020.1 LATEST-EAP-SNAPSHOT
name: Plugin compatibility on: [push] jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Setup Java uses: actions/setup-java@v1 with: java-version: 8 - name: Build the plugin using Gradle run: ./gradlew buildPlugin - uses: thepieterdc/intellij-plugin-verifier-action@v1.1.1 with: plugin: '/home/runner/work/idea-gradle-dependencies-formatter/idea-gradle-dependencies-formatter/build/distributions/idea-gradle-dependencies-formatter-*' versions: | + 2019.1.4 + 2019.2.4 + 2019.3.4 2020.1 + LATEST-EAP-SNAPSHOT
4
0.222222
4
0
e00b2440502e974715f44f54aa811c3bf7789175
main.cpp
main.cpp
int main (int argc, char *argv[]) { QtSingleApplication a (argc, argv); if (a.sendMessage (QString ())) { return 0; } a.setQuitOnLastWindowClosed (false); a.setApplicationName (settings_values::appName); a.setOrganizationName (settings_values::companyName); QTranslator translator; // Set default to english. if (translator.load (QLocale::system (), "translation", "_", ":/translations") || translator.load (":/translations/translation_en")) { a.installTranslator (&translator); } Manager manager; return a.exec (); }
int main (int argc, char *argv[]) { QtSingleApplication a (argc, argv); if (a.sendMessage (QString ())) { return 0; } #ifdef Q_OS_LINUX setlocale (LC_NUMERIC, "C"); #endif a.setQuitOnLastWindowClosed (false); a.setApplicationName (settings_values::appName); a.setOrganizationName (settings_values::companyName); QTranslator translator; // Set default to english. if (translator.load (QLocale::system (), "translation", "_", ":/translations") || translator.load (":/translations/translation_en")) { a.installTranslator (&translator); } Manager manager; return a.exec (); }
Set numeric locale to C for proper tesseract-orc-* packages work on linux.
Set numeric locale to C for proper tesseract-orc-* packages work on linux.
C++
mit
OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator,OneMoreGres/ScreenTranslator
c++
## Code Before: int main (int argc, char *argv[]) { QtSingleApplication a (argc, argv); if (a.sendMessage (QString ())) { return 0; } a.setQuitOnLastWindowClosed (false); a.setApplicationName (settings_values::appName); a.setOrganizationName (settings_values::companyName); QTranslator translator; // Set default to english. if (translator.load (QLocale::system (), "translation", "_", ":/translations") || translator.load (":/translations/translation_en")) { a.installTranslator (&translator); } Manager manager; return a.exec (); } ## Instruction: Set numeric locale to C for proper tesseract-orc-* packages work on linux. ## Code After: int main (int argc, char *argv[]) { QtSingleApplication a (argc, argv); if (a.sendMessage (QString ())) { return 0; } #ifdef Q_OS_LINUX setlocale (LC_NUMERIC, "C"); #endif a.setQuitOnLastWindowClosed (false); a.setApplicationName (settings_values::appName); a.setOrganizationName (settings_values::companyName); QTranslator translator; // Set default to english. if (translator.load (QLocale::system (), "translation", "_", ":/translations") || translator.load (":/translations/translation_en")) { a.installTranslator (&translator); } Manager manager; return a.exec (); }
int main (int argc, char *argv[]) { QtSingleApplication a (argc, argv); if (a.sendMessage (QString ())) { return 0; } + #ifdef Q_OS_LINUX + setlocale (LC_NUMERIC, "C"); + #endif a.setQuitOnLastWindowClosed (false); a.setApplicationName (settings_values::appName); a.setOrganizationName (settings_values::companyName); QTranslator translator; // Set default to english. if (translator.load (QLocale::system (), "translation", "_", ":/translations") || translator.load (":/translations/translation_en")) { a.installTranslator (&translator); } Manager manager; return a.exec (); }
3
0.142857
3
0
36cdb5df74b275f734cbae6822de2aa8f2d4eaa9
test/utils.wisp
test/utils.wisp
(import [object? vector? keys vals dec] "../lib/runtime") (def to-string Object.prototype.to-string) (defn ^boolean date? "Returns true if x is a date" [x] (identical? (.call to-string x) "[object Date]")) (defn ^boolean equivalent? [actual expected] (or (identical? actual expected) (and (= actual expected)) (and (date? actual) (date? expected) (= (.get-time actual) (.get-time expected))) (if (and (vector? actual) (vector? expected)) (and (= (.-length actual) (.-length expected)) (loop [index (dec (.-length actual))] (if (< index 0) true (if (equivalent? (get actual index) (get expected index)) (recur (dec index)) false)))) (and (object? actual) (object? expected) (equivalent? (keys actual) (keys expected)) (equivalent? (vals actual) (vals expected)))))) (export equivalent? date?)
(import [object? vector? keys vals dec] "../lib/runtime") (def to-string Object.prototype.to-string) (defn ^boolean date? "Returns true if x is a date" [x] (identical? (.call to-string x) "[object Date]")) (defn ^boolean equivalent? [actual expected] (or (identical? actual expected) (and (= actual expected)) (and (date? actual) (date? expected) (= (.get-time actual) (.get-time expected))) (if (and (vector? actual) (vector? expected)) (and (= (.-length actual) (.-length expected)) (loop [index (dec (.-length actual))] (if (< index 0) true (if (equivalent? (get actual index) (get expected index)) (recur (dec index)) false)))) (and (object? actual) (object? expected) (equivalent? (.sort (keys actual)) (.sort (keys expected))) (equivalent? (.sort (vals actual)) (.sort (vals expected))))))) (export equivalent? date?)
Update equivalent? function to make it indifferent of key, value order.
Update equivalent? function to make it indifferent of key, value order.
wisp
bsd-3-clause
devesu/wisp,lawrenceAIO/wisp,theunknownxy/wisp,egasimus/wisp
wisp
## Code Before: (import [object? vector? keys vals dec] "../lib/runtime") (def to-string Object.prototype.to-string) (defn ^boolean date? "Returns true if x is a date" [x] (identical? (.call to-string x) "[object Date]")) (defn ^boolean equivalent? [actual expected] (or (identical? actual expected) (and (= actual expected)) (and (date? actual) (date? expected) (= (.get-time actual) (.get-time expected))) (if (and (vector? actual) (vector? expected)) (and (= (.-length actual) (.-length expected)) (loop [index (dec (.-length actual))] (if (< index 0) true (if (equivalent? (get actual index) (get expected index)) (recur (dec index)) false)))) (and (object? actual) (object? expected) (equivalent? (keys actual) (keys expected)) (equivalent? (vals actual) (vals expected)))))) (export equivalent? date?) ## Instruction: Update equivalent? function to make it indifferent of key, value order. ## Code After: (import [object? vector? keys vals dec] "../lib/runtime") (def to-string Object.prototype.to-string) (defn ^boolean date? "Returns true if x is a date" [x] (identical? (.call to-string x) "[object Date]")) (defn ^boolean equivalent? [actual expected] (or (identical? actual expected) (and (= actual expected)) (and (date? actual) (date? expected) (= (.get-time actual) (.get-time expected))) (if (and (vector? actual) (vector? expected)) (and (= (.-length actual) (.-length expected)) (loop [index (dec (.-length actual))] (if (< index 0) true (if (equivalent? (get actual index) (get expected index)) (recur (dec index)) false)))) (and (object? actual) (object? expected) (equivalent? (.sort (keys actual)) (.sort (keys expected))) (equivalent? (.sort (vals actual)) (.sort (vals expected))))))) (export equivalent? date?)
(import [object? vector? keys vals dec] "../lib/runtime") (def to-string Object.prototype.to-string) (defn ^boolean date? "Returns true if x is a date" [x] (identical? (.call to-string x) "[object Date]")) (defn ^boolean equivalent? [actual expected] (or (identical? actual expected) (and (= actual expected)) (and (date? actual) (date? expected) (= (.get-time actual) (.get-time expected))) (if (and (vector? actual) (vector? expected)) (and (= (.-length actual) (.-length expected)) (loop [index (dec (.-length actual))] (if (< index 0) true (if (equivalent? (get actual index) (get expected index)) (recur (dec index)) false)))) (and (object? actual) (object? expected) - (equivalent? (keys actual) + (equivalent? (.sort (keys actual)) ? +++++++ + - (keys expected)) + (.sort (keys expected))) ? +++++++ + - (equivalent? (vals actual) + (equivalent? (.sort (vals actual)) ? +++++++ + - (vals expected)))))) + (.sort (vals expected))))))) ? +++++++ + (export equivalent? date?)
8
0.216216
4
4
b698edfab083dc19724a1f61bfb9154b75a855cf
app/code/community/MageFM/CDN/sql/magefm_cdn_setup/mysql4-install-0.2.0.php
app/code/community/MageFM/CDN/sql/magefm_cdn_setup/mysql4-install-0.2.0.php
<?php $this->startSetup(); $this->run(" CREATE TABLE `{$this->getTable('magefm_cdn/cache')}` ( id integer UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, store_id smallint UNSIGNED NOT NULL, path text NOT NULL, created_at timestamp NULL DEFAULT NULL ) ENGINE=InnoDB ; "); $this->endSetup();
<?php $this->startSetup(); $this->run(" CREATE TABLE `{$this->getTable('magefm_cdn/cache')}` ( id integer UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, store_id smallint UNSIGNED NOT NULL, path text NOT NULL, created_at timestamp NULL DEFAULT NULL ) ENGINE=InnoDB ; CREATE TABLE `magefm_cdn_cache_idx1` ON `{$this->getTable('magefm_cdn/cache')}` (store_id, path(512)); "); $this->endSetup();
Index on magefm_cdn_cache table (path limited to 512)
Index on magefm_cdn_cache table (path limited to 512)
PHP
mit
magefm/cdn
php
## Code Before: <?php $this->startSetup(); $this->run(" CREATE TABLE `{$this->getTable('magefm_cdn/cache')}` ( id integer UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, store_id smallint UNSIGNED NOT NULL, path text NOT NULL, created_at timestamp NULL DEFAULT NULL ) ENGINE=InnoDB ; "); $this->endSetup(); ## Instruction: Index on magefm_cdn_cache table (path limited to 512) ## Code After: <?php $this->startSetup(); $this->run(" CREATE TABLE `{$this->getTable('magefm_cdn/cache')}` ( id integer UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, store_id smallint UNSIGNED NOT NULL, path text NOT NULL, created_at timestamp NULL DEFAULT NULL ) ENGINE=InnoDB ; CREATE TABLE `magefm_cdn_cache_idx1` ON `{$this->getTable('magefm_cdn/cache')}` (store_id, path(512)); "); $this->endSetup();
<?php $this->startSetup(); $this->run(" + CREATE TABLE `{$this->getTable('magefm_cdn/cache')}` ( id integer UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, store_id smallint UNSIGNED NOT NULL, path text NOT NULL, created_at timestamp NULL DEFAULT NULL ) ENGINE=InnoDB ; + + CREATE TABLE `magefm_cdn_cache_idx1` + ON `{$this->getTable('magefm_cdn/cache')}` (store_id, path(512)); + "); $this->endSetup();
5
0.357143
5
0
5ab64ad7fad9fcbaea8b1e4a3f09585f5097739a
lib/tickly.rb
lib/tickly.rb
require File.dirname(__FILE__) + "/tickly/parser" module Tickly def self.to_tcl(e) if e.is_a?(Tickly::LiteralExpr) '{%s}' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Tickly::StringExpr) '[%s]' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(String) && (e.include?('"') || e.include?("'")) e.inspect else e.to_s end end def self.split_array(arr, separator = nil) return arr unless arr.include?(separator) subarrays = arr.class.new subarrays.push(arr.class.new) arr.each do | element | if element == separator subarrays.push(arr.class.new) else subarrays[-1].push(element) end end return subarrays end end
require File.dirname(__FILE__) + "/tickly/parser" require 'forwardable' module Tickly class Expr extend Forwardable def_delegators :@e, :push, :<<, :any?, :reject!, :map!, :[], :delete_at, :include?, :each, :empty?, :join, :length def initialize(elements = []) @e = elements end def map(&blk) self.class.new(@e.map(&blk)) end def to_a @e end def ==(another) another.to_a == to_a end end # Represents an expression between curly braces (within which no text substitution will be done) # like { 1 2 3 } class LiteralExpr < Expr def inspect "le%s" % @e.inspect end end # Represents an expression between square brackets (where text substitution will be done) # like [1 2 3] class StringExpr < Expr def inspect "se%s" % @e.inspect end end def self.to_tcl(e) if e.is_a?(Tickly::LiteralExpr) '{%s}' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Tickly::StringExpr) '[%s]' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(String) && (e.include?('"') || e.include?("'")) e.inspect else e.to_s end end def self.split_array(arr, separator = nil) return arr unless arr.include?(separator) subarrays = arr.class.new subarrays.push(arr.class.new) arr.each do | element | if element == separator subarrays.push(arr.class.new) else subarrays[-1].push(element) end end return subarrays end end
Use an Enumerable for expression containers
Use an Enumerable for expression containers
Ruby
mit
julik/tickly
ruby
## Code Before: require File.dirname(__FILE__) + "/tickly/parser" module Tickly def self.to_tcl(e) if e.is_a?(Tickly::LiteralExpr) '{%s}' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Tickly::StringExpr) '[%s]' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(String) && (e.include?('"') || e.include?("'")) e.inspect else e.to_s end end def self.split_array(arr, separator = nil) return arr unless arr.include?(separator) subarrays = arr.class.new subarrays.push(arr.class.new) arr.each do | element | if element == separator subarrays.push(arr.class.new) else subarrays[-1].push(element) end end return subarrays end end ## Instruction: Use an Enumerable for expression containers ## Code After: require File.dirname(__FILE__) + "/tickly/parser" require 'forwardable' module Tickly class Expr extend Forwardable def_delegators :@e, :push, :<<, :any?, :reject!, :map!, :[], :delete_at, :include?, :each, :empty?, :join, :length def initialize(elements = []) @e = elements end def map(&blk) self.class.new(@e.map(&blk)) end def to_a @e end def ==(another) another.to_a == to_a end end # Represents an expression between curly braces (within which no text substitution will be done) # like { 1 2 3 } class LiteralExpr < Expr def inspect "le%s" % @e.inspect end end # Represents an expression between square brackets (where text substitution will be done) # like [1 2 3] class StringExpr < Expr def inspect "se%s" % @e.inspect end end def self.to_tcl(e) if e.is_a?(Tickly::LiteralExpr) '{%s}' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Tickly::StringExpr) '[%s]' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(String) && (e.include?('"') || e.include?("'")) e.inspect else e.to_s end end def self.split_array(arr, separator = nil) return arr unless arr.include?(separator) subarrays = arr.class.new subarrays.push(arr.class.new) arr.each do | element | if element == separator subarrays.push(arr.class.new) else subarrays[-1].push(element) end end return subarrays end end
require File.dirname(__FILE__) + "/tickly/parser" + require 'forwardable' module Tickly + + class Expr + extend Forwardable + + def_delegators :@e, :push, :<<, :any?, :reject!, :map!, :[], :delete_at, :include?, :each, :empty?, :join, :length + + def initialize(elements = []) + @e = elements + end + + def map(&blk) + self.class.new(@e.map(&blk)) + end + + def to_a + @e + end + + def ==(another) + another.to_a == to_a + end + end + + # Represents an expression between curly braces (within which no text substitution will be done) + # like { 1 2 3 } + class LiteralExpr < Expr + def inspect + "le%s" % @e.inspect + end + end + + # Represents an expression between square brackets (where text substitution will be done) + # like [1 2 3] + class StringExpr < Expr + def inspect + "se%s" % @e.inspect + end + end + def self.to_tcl(e) if e.is_a?(Tickly::LiteralExpr) '{%s}' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Tickly::StringExpr) '[%s]' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(String) && (e.include?('"') || e.include?("'")) e.inspect else e.to_s end end def self.split_array(arr, separator = nil) return arr unless arr.include?(separator) subarrays = arr.class.new subarrays.push(arr.class.new) arr.each do | element | if element == separator subarrays.push(arr.class.new) else subarrays[-1].push(element) end end return subarrays end end
40
1.290323
40
0
cd5ceceffef29fcd87b465d9a29ab5975acab6a7
src/js/helpers/qajaxWrapper.js
src/js/helpers/qajaxWrapper.js
var qajax = require("qajax"); var qajaxWrapper = function (options) { var response = { status: null, body: null }; var parseResponse = function (xhr) { response.status = xhr.status; try { response.body = JSON.parse(xhr.responseText); } catch (e) { response.body = xhr.responseText; } }; var api = qajax(options); api.error = function (callback) { var promise = this; // Bind callback also for non 200 status promise.then( // not a 2* response function (xhr) { if (xhr.status.toString()[0] !== "2") { parseResponse(xhr); callback(response); } }, // the promise is only rejected if the server has failed // to reply to the client (network problem or timeout reached). function (xhr) { parseResponse(xhr); callback(response); } ); return promise; }; api.success = function (callback) { var promise = this; promise .then(qajax.filterStatus(function (status) { return status.toString()[0] === "2"; })) .then(function (xhr) { parseResponse(xhr); callback(response); }); return promise; }; return api; }; module.exports = qajaxWrapper;
var qajax = require("qajax"); var uniqueCalls = []; function removeCall(options) { uniqueCalls.splice(uniqueCalls.indexOf(options.url), 1); } var qajaxWrapper = function (options) { if (!options.concurrent) { if (uniqueCalls.indexOf(options.url) > -1) { return { error: () => { return this; }, success: function () { return this; } }; } uniqueCalls.push(options.url); } var response = { status: null, body: null }; var parseResponse = function (xhr) { response.status = xhr.status; try { response.body = JSON.parse(xhr.responseText); } catch (e) { response.body = xhr.responseText; } }; var api = qajax(options); api.error = function (callback) { var promise = this; // Bind callback also for non 200 status promise.then( // not a 2* response function (xhr) { if (xhr.status.toString()[0] !== "2") { parseResponse(xhr); removeCall(options); callback(response); } }, // the promise is only rejected if the server has failed // to reply to the client (network problem or timeout reached). function (xhr) { parseResponse(xhr); removeCall(options); callback(response); } ); return promise; }; api.success = function (callback) { var promise = this; promise .then(qajax.filterStatus(function (status) { return status.toString()[0] === "2"; })) .then(function (xhr) { parseResponse(xhr); removeCall(options); callback(response); }); return promise; }; return api; }; module.exports = qajaxWrapper;
Return stub request object on concurrent request
Return stub request object on concurrent request
JavaScript
apache-2.0
watonyweng/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,yp-engineering/marathon-ui,janisz/marathon-ui,mesosphere/marathon-ui,yp-engineering/marathon-ui,Raffo/marathon-ui,watonyweng/marathon-ui,janisz/marathon-ui,Raffo/marathon-ui
javascript
## Code Before: var qajax = require("qajax"); var qajaxWrapper = function (options) { var response = { status: null, body: null }; var parseResponse = function (xhr) { response.status = xhr.status; try { response.body = JSON.parse(xhr.responseText); } catch (e) { response.body = xhr.responseText; } }; var api = qajax(options); api.error = function (callback) { var promise = this; // Bind callback also for non 200 status promise.then( // not a 2* response function (xhr) { if (xhr.status.toString()[0] !== "2") { parseResponse(xhr); callback(response); } }, // the promise is only rejected if the server has failed // to reply to the client (network problem or timeout reached). function (xhr) { parseResponse(xhr); callback(response); } ); return promise; }; api.success = function (callback) { var promise = this; promise .then(qajax.filterStatus(function (status) { return status.toString()[0] === "2"; })) .then(function (xhr) { parseResponse(xhr); callback(response); }); return promise; }; return api; }; module.exports = qajaxWrapper; ## Instruction: Return stub request object on concurrent request ## Code After: var qajax = require("qajax"); var uniqueCalls = []; function removeCall(options) { uniqueCalls.splice(uniqueCalls.indexOf(options.url), 1); } var qajaxWrapper = function (options) { if (!options.concurrent) { if (uniqueCalls.indexOf(options.url) > -1) { return { error: () => { return this; }, success: function () { return this; } }; } uniqueCalls.push(options.url); } var response = { status: null, body: null }; var parseResponse = function (xhr) { response.status = xhr.status; try { response.body = JSON.parse(xhr.responseText); } catch (e) { response.body = xhr.responseText; } }; var api = qajax(options); api.error = function (callback) { var promise = this; // Bind callback also for non 200 status promise.then( // not a 2* response function (xhr) { if (xhr.status.toString()[0] !== "2") { parseResponse(xhr); removeCall(options); callback(response); } }, // the promise is only rejected if the server has failed // to reply to the client (network problem or timeout reached). function (xhr) { parseResponse(xhr); removeCall(options); callback(response); } ); return promise; }; api.success = function (callback) { var promise = this; promise .then(qajax.filterStatus(function (status) { return status.toString()[0] === "2"; })) .then(function (xhr) { parseResponse(xhr); removeCall(options); callback(response); }); return promise; }; return api; }; module.exports = qajaxWrapper;
var qajax = require("qajax"); + var uniqueCalls = []; + + function removeCall(options) { + uniqueCalls.splice(uniqueCalls.indexOf(options.url), 1); + } + var qajaxWrapper = function (options) { + if (!options.concurrent) { + if (uniqueCalls.indexOf(options.url) > -1) { + return { + error: () => { return this; }, + success: function () { return this; } + }; + } + uniqueCalls.push(options.url); + } + var response = { status: null, body: null }; var parseResponse = function (xhr) { response.status = xhr.status; try { response.body = JSON.parse(xhr.responseText); } catch (e) { response.body = xhr.responseText; } }; var api = qajax(options); api.error = function (callback) { var promise = this; // Bind callback also for non 200 status promise.then( // not a 2* response function (xhr) { if (xhr.status.toString()[0] !== "2") { parseResponse(xhr); + removeCall(options); callback(response); } }, // the promise is only rejected if the server has failed // to reply to the client (network problem or timeout reached). function (xhr) { parseResponse(xhr); + removeCall(options); callback(response); } ); return promise; }; api.success = function (callback) { var promise = this; promise .then(qajax.filterStatus(function (status) { return status.toString()[0] === "2"; })) .then(function (xhr) { parseResponse(xhr); + removeCall(options); callback(response); }); return promise; }; return api; }; module.exports = qajaxWrapper;
19
0.339286
19
0
aba52e3821311d3e8269049dead7072b33d06d80
app/World/Retro.php
app/World/Retro.php
<?php namespace ALttP\World; class Retro extends Open { /** * Create a new world and initialize all of the Regions within it. * In Retro we force certain config values that cannot be overriden. * * @param int $id Id of this world * @param array $config config for this world * * @return void */ public function __construct(int $id = 0, array $config = []) { parent::__construct($id, array_merge($config, [ 'rom.rupeeBow' => true, 'rom.genericKeys' => true, 'region.takeAnys' => true, 'region.wildKeys' => true, ])); } }
<?php namespace ALttP\World; class Retro extends Open { /** * Create a new world and initialize all of the Regions within it. * In Retro we force certain config values that cannot be overriden. * * @param int $id Id of this world * @param array $config config for this world * * @return void */ public function __construct(int $id = 0, array $config = []) { parent::__construct($id, array_merge($config, [ 'rom.rupeeBow' => true, 'rom.genericKeys' => true, 'region.takeAnys' => true, 'region.wildKeys' => true, ])); if ($this->config('difficulty') !== 'custom') { switch ($this->config('item.pool')) { case 'hard': case 'expert': case 'crowd_control': $this->config['item.count.KeyD1'] = 0; $this->config['item.count.KeyA2'] = 0; $this->config['item.count.KeyD7'] = 0; $this->config['item.count.KeyD2'] = 0; $this->config['item.count.TwentyRupees2'] = 15 + $this->config('item.count.TwentyRupees2', 0); break; case 'normal': $this->config['item.count.KeyD1'] = 0; $this->config['item.count.KeyA2'] = 0; $this->config['item.count.TwentyRupees2'] = 10 + $this->config('item.count.TwentyRupees2', 0); } } } }
Remove 10-15 keys from retro (replace with green 20 rupees).
Remove 10-15 keys from retro (replace with green 20 rupees).
PHP
mit
sporchia/alttp_vt_randomizer,sporchia/alttp_vt_randomizer,sporchia/alttp_vt_randomizer,sporchia/alttp_vt_randomizer
php
## Code Before: <?php namespace ALttP\World; class Retro extends Open { /** * Create a new world and initialize all of the Regions within it. * In Retro we force certain config values that cannot be overriden. * * @param int $id Id of this world * @param array $config config for this world * * @return void */ public function __construct(int $id = 0, array $config = []) { parent::__construct($id, array_merge($config, [ 'rom.rupeeBow' => true, 'rom.genericKeys' => true, 'region.takeAnys' => true, 'region.wildKeys' => true, ])); } } ## Instruction: Remove 10-15 keys from retro (replace with green 20 rupees). ## Code After: <?php namespace ALttP\World; class Retro extends Open { /** * Create a new world and initialize all of the Regions within it. * In Retro we force certain config values that cannot be overriden. * * @param int $id Id of this world * @param array $config config for this world * * @return void */ public function __construct(int $id = 0, array $config = []) { parent::__construct($id, array_merge($config, [ 'rom.rupeeBow' => true, 'rom.genericKeys' => true, 'region.takeAnys' => true, 'region.wildKeys' => true, ])); if ($this->config('difficulty') !== 'custom') { switch ($this->config('item.pool')) { case 'hard': case 'expert': case 'crowd_control': $this->config['item.count.KeyD1'] = 0; $this->config['item.count.KeyA2'] = 0; $this->config['item.count.KeyD7'] = 0; $this->config['item.count.KeyD2'] = 0; $this->config['item.count.TwentyRupees2'] = 15 + $this->config('item.count.TwentyRupees2', 0); break; case 'normal': $this->config['item.count.KeyD1'] = 0; $this->config['item.count.KeyA2'] = 0; $this->config['item.count.TwentyRupees2'] = 10 + $this->config('item.count.TwentyRupees2', 0); } } } }
<?php namespace ALttP\World; class Retro extends Open { /** * Create a new world and initialize all of the Regions within it. * In Retro we force certain config values that cannot be overriden. * * @param int $id Id of this world * @param array $config config for this world * * @return void */ public function __construct(int $id = 0, array $config = []) { parent::__construct($id, array_merge($config, [ 'rom.rupeeBow' => true, 'rom.genericKeys' => true, 'region.takeAnys' => true, 'region.wildKeys' => true, ])); + + if ($this->config('difficulty') !== 'custom') { + switch ($this->config('item.pool')) { + case 'hard': + case 'expert': + case 'crowd_control': + $this->config['item.count.KeyD1'] = 0; + $this->config['item.count.KeyA2'] = 0; + $this->config['item.count.KeyD7'] = 0; + $this->config['item.count.KeyD2'] = 0; + + $this->config['item.count.TwentyRupees2'] = 15 + $this->config('item.count.TwentyRupees2', 0); + break; + case 'normal': + $this->config['item.count.KeyD1'] = 0; + $this->config['item.count.KeyA2'] = 0; + $this->config['item.count.TwentyRupees2'] = 10 + $this->config('item.count.TwentyRupees2', 0); + } + } } }
19
0.76
19
0
d9ca0504346c4019ada86650389ffe54b045a068
spec/features/admin/contact_create_spec.rb
spec/features/admin/contact_create_spec.rb
require "spec_helper" describe "Contact creation", auth: :user do include Admin::ContactSteps let!(:contact_group) { create(:contact_group, :with_organisation, title: "new contact type") } let(:contact) { build :contact } let!(:contact_organisation) { create :organisation } before { verify !contact_exists(contact) } specify "it can be created" do expect { create_contact( title: contact.title, description: contact.description, contact_information: contact.contact_information ) do select contact_organisation, from: "contact_organisation_id" select contact_group, from: "contact_contact_group_ids" end }.to change { Contact.count }.by(1) end end
require "spec_helper" describe "Contact creation", auth: :user do include Admin::ContactSteps let!(:contact_group) { create(:contact_group, :with_organisation, title: "new contact type") } let(:contact) { attributes_for :contact } let!(:contact_organisation) { create :organisation } before { verify !contact_exists(contact) } specify "it can be created" do expect { create_contact( title: contact[:title], description: contact[:description], contact_information: contact[:contact_information] ) do select contact_organisation, from: "contact_organisation_id" select contact_group, from: "contact_contact_group_ids" end }.to change { Contact.count }.by(1) end end
Use `attributes_for` to generate test data
Use `attributes_for` to generate test data The `contact` model here isn't used as an object, it's just created to have test values. `attributes_for` can be used to get a hash with the same information. This makes it clear we won't be using the `Contact` object.
Ruby
mit
alphagov/contacts-admin,alphagov/contacts-admin,alphagov/contacts-admin
ruby
## Code Before: require "spec_helper" describe "Contact creation", auth: :user do include Admin::ContactSteps let!(:contact_group) { create(:contact_group, :with_organisation, title: "new contact type") } let(:contact) { build :contact } let!(:contact_organisation) { create :organisation } before { verify !contact_exists(contact) } specify "it can be created" do expect { create_contact( title: contact.title, description: contact.description, contact_information: contact.contact_information ) do select contact_organisation, from: "contact_organisation_id" select contact_group, from: "contact_contact_group_ids" end }.to change { Contact.count }.by(1) end end ## Instruction: Use `attributes_for` to generate test data The `contact` model here isn't used as an object, it's just created to have test values. `attributes_for` can be used to get a hash with the same information. This makes it clear we won't be using the `Contact` object. ## Code After: require "spec_helper" describe "Contact creation", auth: :user do include Admin::ContactSteps let!(:contact_group) { create(:contact_group, :with_organisation, title: "new contact type") } let(:contact) { attributes_for :contact } let!(:contact_organisation) { create :organisation } before { verify !contact_exists(contact) } specify "it can be created" do expect { create_contact( title: contact[:title], description: contact[:description], contact_information: contact[:contact_information] ) do select contact_organisation, from: "contact_organisation_id" select contact_group, from: "contact_contact_group_ids" end }.to change { Contact.count }.by(1) end end
require "spec_helper" describe "Contact creation", auth: :user do include Admin::ContactSteps let!(:contact_group) { create(:contact_group, :with_organisation, title: "new contact type") } - let(:contact) { build :contact } ? ^^^ + let(:contact) { attributes_for :contact } ? +++++ ^^^^^^^ let!(:contact_organisation) { create :organisation } before { verify !contact_exists(contact) } specify "it can be created" do expect { create_contact( - title: contact.title, ? ^ + title: contact[:title], ? ^^ + - description: contact.description, ? ^ + description: contact[:description], ? ^^ + - contact_information: contact.contact_information ? ^ + contact_information: contact[:contact_information] ? ^^ + ) do select contact_organisation, from: "contact_organisation_id" select contact_group, from: "contact_contact_group_ids" end }.to change { Contact.count }.by(1) end end
8
0.307692
4
4
f0d4fccdc2fd7d89c7d7cdeac350faa384652bc5
build_tools/jenkins_win_build.bat
build_tools/jenkins_win_build.bat
set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE%
set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE%
Update new windows build script
Update new windows build script
Batchfile
bsd-3-clause
lewisodriscoll/sasview,SasView/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,lewisodriscoll/sasview
batchfile
## Code Before: set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% ## Instruction: Update new windows build script ## Code After: set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE%
set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% - + set PYLINT=c:\python27\scripts\pylint cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist + cd %WORKSPACE% + %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt + cd %WORKSPACE%
5
0.102041
4
1
68bef70bdea00728f40dbcbcbbc08dc5f7d761a9
lib/croissant.rb
lib/croissant.rb
require 'imgkit' require 'asciiart' require 'tempfile' module Croissant class Engine def initialize(source) @source = source end def render img_path = create_image format_ascii(img_path) end private def format_ascii(img_path) ascii = "<!DOCTYPE html><html><head></head><body class='ascii-page' style='font-size: 5px'>" ascii << AsciiArt.new(img_path). to_ascii_art(format: 'html', width: 400, color: true) ascii << "</body></html>" ascii end def create_image img = IMGKit.new(@source) img_file = Tempfile.new('foo', encoding: 'ascii-8bit') img_file.write(img.to_png) img_file.close img_file.path end end end Mime::Type.register "text/ascii", :ascii, [], %w( html ) ActionController::Renderers.add :ascii do |filename, options| options[:formats] = :html self.content_type = 'text/html' ascii = ::Croissant::Engine.new(render_to_string(options)).render ascii end
require 'imgkit' require 'asciiart' require 'tempfile' module Croissant class Engine def initialize(source) @source = source end def render img_path = create_image format_ascii(img_path) end private def format_ascii(img_path) ascii = "<!DOCTYPE html><html><head></head><body class='ascii-page' style='font-size: 5px'>" ascii << AsciiArt.new(img_path). to_ascii_art(format: 'html', width: 400, color: true) ascii << "</body></html>" ascii end def create_image img = IMGKit.new(@source) img_file = Tempfile.new('foo', encoding: 'ascii-8bit') img_file.write(img.to_png) img_file.close img_file.path end end end Mime::Type.register "text/ascii", :ascii ActionController::Renderers.add :ascii do |filename, options| options[:formats] = :html self.content_type = 'text/html' ::Croissant::Engine.new(render_to_string(options)).render end
Remove excess alias from register mime type
Remove excess alias from register mime type
Ruby
mit
gazay/croissant,gazay/croissant
ruby
## Code Before: require 'imgkit' require 'asciiart' require 'tempfile' module Croissant class Engine def initialize(source) @source = source end def render img_path = create_image format_ascii(img_path) end private def format_ascii(img_path) ascii = "<!DOCTYPE html><html><head></head><body class='ascii-page' style='font-size: 5px'>" ascii << AsciiArt.new(img_path). to_ascii_art(format: 'html', width: 400, color: true) ascii << "</body></html>" ascii end def create_image img = IMGKit.new(@source) img_file = Tempfile.new('foo', encoding: 'ascii-8bit') img_file.write(img.to_png) img_file.close img_file.path end end end Mime::Type.register "text/ascii", :ascii, [], %w( html ) ActionController::Renderers.add :ascii do |filename, options| options[:formats] = :html self.content_type = 'text/html' ascii = ::Croissant::Engine.new(render_to_string(options)).render ascii end ## Instruction: Remove excess alias from register mime type ## Code After: require 'imgkit' require 'asciiart' require 'tempfile' module Croissant class Engine def initialize(source) @source = source end def render img_path = create_image format_ascii(img_path) end private def format_ascii(img_path) ascii = "<!DOCTYPE html><html><head></head><body class='ascii-page' style='font-size: 5px'>" ascii << AsciiArt.new(img_path). to_ascii_art(format: 'html', width: 400, color: true) ascii << "</body></html>" ascii end def create_image img = IMGKit.new(@source) img_file = Tempfile.new('foo', encoding: 'ascii-8bit') img_file.write(img.to_png) img_file.close img_file.path end end end Mime::Type.register "text/ascii", :ascii ActionController::Renderers.add :ascii do |filename, options| options[:formats] = :html self.content_type = 'text/html' ::Croissant::Engine.new(render_to_string(options)).render end
require 'imgkit' require 'asciiart' require 'tempfile' module Croissant class Engine def initialize(source) @source = source end def render img_path = create_image format_ascii(img_path) end private def format_ascii(img_path) ascii = "<!DOCTYPE html><html><head></head><body class='ascii-page' style='font-size: 5px'>" ascii << AsciiArt.new(img_path). to_ascii_art(format: 'html', width: 400, color: true) ascii << "</body></html>" ascii end def create_image img = IMGKit.new(@source) img_file = Tempfile.new('foo', encoding: 'ascii-8bit') img_file.write(img.to_png) img_file.close img_file.path end end end - Mime::Type.register "text/ascii", :ascii, [], %w( html ) ? ---------------- + Mime::Type.register "text/ascii", :ascii ActionController::Renderers.add :ascii do |filename, options| options[:formats] = :html self.content_type = 'text/html' - ascii = ::Croissant::Engine.new(render_to_string(options)).render ? -------- + ::Croissant::Engine.new(render_to_string(options)).render - ascii end
5
0.111111
2
3
692433fe427ebb6485a765451615b22605bbe9e4
manifest.json
manifest.json
{ "id": "sm", "blackList": ["sackmesser\\.(svg|png)"] }
{ "id": "sm", "blackList": [ "sackmesser\\.(svg|png)" ], "dependencies": { "@goldinteractive/feature-icons": "^0.0.6", "@goldinteractive/feature-object-fit": "^0.0.6", "@goldinteractive/js-base": "^0.0.7" }, "devDependencies": { "@goldinteractive/ignore-assets-webpack-plugin": "^3.0.0", "autoprefixer": "^8.6.3", "babel-core": "^6.26.3", "babel-loader": "^7.1.4", "babel-plugin-syntax-async-functions": "^6.13.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.5", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.7.0", "babel-preset-es2015": "^6.24.1", "babel-preset-stage-2": "^6.24.1", "clean-webpack-plugin": "^0.1.19", "copy-webpack-plugin": "^4.5.2", "css-loader": "^1.0.0", "cssnano": "^4.0.2", "cssnano-preset-default": "^4.0.0", "dotenv": "^6.0.0", "extract-loader": "^2.0.1", "file-loader": "^1.1.11", "image-webpack-loader": "^4.3.1", "mini-css-extract-plugin": "^0.4.1", "node-sass": "^4.9.0", "node-sass-json-importer": "^3.3.1", "null-loader": "^0.1.1", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.5", "postcss-pxtorem": "^4.0.1", "sass-loader": "^7.0.3", "style-loader": "^0.21.0", "svgo": "^1.0.5", "webpack": "^4.16.1", "webpack-cli": "^3.0.8" } }
Update Manifest to contain dependencies
Update Manifest to contain dependencies
JSON
mit
Goldinteractive/Sackmesser,Goldinteractive/Sackmesser,Goldinteractive/Sackmesser,Goldinteractive/Sackmesser
json
## Code Before: { "id": "sm", "blackList": ["sackmesser\\.(svg|png)"] } ## Instruction: Update Manifest to contain dependencies ## Code After: { "id": "sm", "blackList": [ "sackmesser\\.(svg|png)" ], "dependencies": { "@goldinteractive/feature-icons": "^0.0.6", "@goldinteractive/feature-object-fit": "^0.0.6", "@goldinteractive/js-base": "^0.0.7" }, "devDependencies": { "@goldinteractive/ignore-assets-webpack-plugin": "^3.0.0", "autoprefixer": "^8.6.3", "babel-core": "^6.26.3", "babel-loader": "^7.1.4", "babel-plugin-syntax-async-functions": "^6.13.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.5", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.7.0", "babel-preset-es2015": "^6.24.1", "babel-preset-stage-2": "^6.24.1", "clean-webpack-plugin": "^0.1.19", "copy-webpack-plugin": "^4.5.2", "css-loader": "^1.0.0", "cssnano": "^4.0.2", "cssnano-preset-default": "^4.0.0", "dotenv": "^6.0.0", "extract-loader": "^2.0.1", "file-loader": "^1.1.11", "image-webpack-loader": "^4.3.1", "mini-css-extract-plugin": "^0.4.1", "node-sass": "^4.9.0", "node-sass-json-importer": "^3.3.1", "null-loader": "^0.1.1", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.5", "postcss-pxtorem": "^4.0.1", "sass-loader": "^7.0.3", "style-loader": "^0.21.0", "svgo": "^1.0.5", "webpack": "^4.16.1", "webpack-cli": "^3.0.8" } }
{ "id": "sm", + "blackList": [ - "blackList": ["sackmesser\\.(svg|png)"] ? ------------ ^ - + "sackmesser\\.(svg|png)" ? ^ + ], + "dependencies": { + "@goldinteractive/feature-icons": "^0.0.6", + "@goldinteractive/feature-object-fit": "^0.0.6", + "@goldinteractive/js-base": "^0.0.7" + }, + "devDependencies": { + "@goldinteractive/ignore-assets-webpack-plugin": "^3.0.0", + "autoprefixer": "^8.6.3", + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", + "babel-plugin-syntax-async-functions": "^6.13.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-decorators-legacy": "^1.3.5", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-preset-env": "^1.7.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-stage-2": "^6.24.1", + "clean-webpack-plugin": "^0.1.19", + "copy-webpack-plugin": "^4.5.2", + "css-loader": "^1.0.0", + "cssnano": "^4.0.2", + "cssnano-preset-default": "^4.0.0", + "dotenv": "^6.0.0", + "extract-loader": "^2.0.1", + "file-loader": "^1.1.11", + "image-webpack-loader": "^4.3.1", + "mini-css-extract-plugin": "^0.4.1", + "node-sass": "^4.9.0", + "node-sass-json-importer": "^3.3.1", + "null-loader": "^0.1.1", + "postcss-import": "^11.1.0", + "postcss-loader": "^2.1.5", + "postcss-pxtorem": "^4.0.1", + "sass-loader": "^7.0.3", + "style-loader": "^0.21.0", + "svgo": "^1.0.5", + "webpack": "^4.16.1", + "webpack-cli": "^3.0.8" + } }
43
10.75
42
1
3b89ceb9fd02799e5899f80fe1d4af9ac0ca0793
app/assets/javascripts/materials_file_picker.js
app/assets/javascripts/materials_file_picker.js
function MaterialsFilePicker(callback) { this.doneCallback = callback; this.selectedMaterials = {}; this.treeElement = $('#file-picker-tree'); var courseId = gon.course; var that = this; $.ajax({ url: '/courses/' + courseId + '/materials.json', success: that.onWorkbinStructureReceived }); } MaterialsFilePicker.prototype.onSelectionCompleted = function() { var selectedItems = []; for (var id in selectedMaterials) { var currentTuple = selectedMaterials[id]; selectedItems.push(currentTuple); } this.doneCallback(selectedItems); }; MaterialsFilePicker.prototype.onWorkbinStructureReceived = function(rootNode) { }
function MaterialsFilePicker(callback) { this.doneCallback = callback; this.selectedMaterials = {}; this.treeElement = $('#file-picker-tree'); var courseId = gon.course; var that = this; $.ajax({ url: '/courses/' + courseId + '/materials.json', success: that.onWorkbinStructureReceived }); } MaterialsFilePicker.prototype.onSelectionCompleted = function() { var selectedItems = []; for (var id in selectedMaterials) { var currentTuple = selectedMaterials[id]; selectedItems.push(currentTuple); } this.doneCallback(selectedItems); }; MaterialsFilePicker.prototype.onWorkbinStructureReceived = function(rootNode) { var shouldIncludeFiles = true; var treeData = parseFileJsonForJqTree(rootNode, shouldIncludeFiles); treeElement.tree({ data: treeData, autoOpen: true, keyboardSupport: false }); };
Add initialization callback for file picker.
Add initialization callback for file picker.
JavaScript
mit
Coursemology/coursemology.org,nusedutech/coursemology.org,allenwq/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,nusedutech/coursemology.org,dariusf/coursemology.org,nnamon/coursemology.org,nusedutech/coursemology.org,Coursemology/coursemology.org,nnamon/coursemology.org,nusedutech/coursemology.org,dariusf/coursemology.org,nnamon/coursemology.org,allenwq/coursemology.org,allenwq/coursemology.org,nusedutech/coursemology.org,Coursemology/coursemology.org,nnamon/coursemology.org,nnamon/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org
javascript
## Code Before: function MaterialsFilePicker(callback) { this.doneCallback = callback; this.selectedMaterials = {}; this.treeElement = $('#file-picker-tree'); var courseId = gon.course; var that = this; $.ajax({ url: '/courses/' + courseId + '/materials.json', success: that.onWorkbinStructureReceived }); } MaterialsFilePicker.prototype.onSelectionCompleted = function() { var selectedItems = []; for (var id in selectedMaterials) { var currentTuple = selectedMaterials[id]; selectedItems.push(currentTuple); } this.doneCallback(selectedItems); }; MaterialsFilePicker.prototype.onWorkbinStructureReceived = function(rootNode) { } ## Instruction: Add initialization callback for file picker. ## Code After: function MaterialsFilePicker(callback) { this.doneCallback = callback; this.selectedMaterials = {}; this.treeElement = $('#file-picker-tree'); var courseId = gon.course; var that = this; $.ajax({ url: '/courses/' + courseId + '/materials.json', success: that.onWorkbinStructureReceived }); } MaterialsFilePicker.prototype.onSelectionCompleted = function() { var selectedItems = []; for (var id in selectedMaterials) { var currentTuple = selectedMaterials[id]; selectedItems.push(currentTuple); } this.doneCallback(selectedItems); }; MaterialsFilePicker.prototype.onWorkbinStructureReceived = function(rootNode) { var shouldIncludeFiles = true; var treeData = parseFileJsonForJqTree(rootNode, shouldIncludeFiles); treeElement.tree({ data: treeData, autoOpen: true, keyboardSupport: false }); };
function MaterialsFilePicker(callback) { this.doneCallback = callback; this.selectedMaterials = {}; this.treeElement = $('#file-picker-tree'); var courseId = gon.course; var that = this; $.ajax({ url: '/courses/' + courseId + '/materials.json', success: that.onWorkbinStructureReceived }); } MaterialsFilePicker.prototype.onSelectionCompleted = function() { var selectedItems = []; for (var id in selectedMaterials) { var currentTuple = selectedMaterials[id]; selectedItems.push(currentTuple); } this.doneCallback(selectedItems); }; MaterialsFilePicker.prototype.onWorkbinStructureReceived = function(rootNode) { + var shouldIncludeFiles = true; + var treeData = parseFileJsonForJqTree(rootNode, shouldIncludeFiles); - } + treeElement.tree({ + data: treeData, + autoOpen: true, + keyboardSupport: false + }); + };
9
0.346154
8
1
f04d579ce4246c078ae3fcc1fd02a35e88b41cd5
example.ini
example.ini
[mario] strict content lookup = True include = matches.d notifications = on [ISBN] type is = text data matches = (isbn):([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) plumb open = firefox http://www.amazon.com/s/?field-keywords={1} [github] type is = url arg is = {netloc} github.com github.com content is = text/x-python arg rewrite = {data} github.com,raw.githubusercontent.com blob/, plumb open = firefox {data}
[mario] strict content lookup = True include = matches.d notifications = on [ISBN] type is = text data matches = (isbn):([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) plumb open = firefox http://www.amazon.com/s/?field-keywords={1} [github] type is = url arg is = {netloc} github.com github.com content is = text/x-python arg rewrite = {data} github.com,raw.githubusercontent.com blob/, plumb open = firefox {data} [url-fallback] type is = url plumb open = firefox {data}
Add fallback url rule which sends it to a browser.
Add fallback url rule which sends it to a browser. Added to the example.ini config.
INI
isc
poljar/mario
ini
## Code Before: [mario] strict content lookup = True include = matches.d notifications = on [ISBN] type is = text data matches = (isbn):([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) plumb open = firefox http://www.amazon.com/s/?field-keywords={1} [github] type is = url arg is = {netloc} github.com github.com content is = text/x-python arg rewrite = {data} github.com,raw.githubusercontent.com blob/, plumb open = firefox {data} ## Instruction: Add fallback url rule which sends it to a browser. Added to the example.ini config. ## Code After: [mario] strict content lookup = True include = matches.d notifications = on [ISBN] type is = text data matches = (isbn):([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) plumb open = firefox http://www.amazon.com/s/?field-keywords={1} [github] type is = url arg is = {netloc} github.com github.com content is = text/x-python arg rewrite = {data} github.com,raw.githubusercontent.com blob/, plumb open = firefox {data} [url-fallback] type is = url plumb open = firefox {data}
[mario] strict content lookup = True include = matches.d notifications = on [ISBN] type is = text data matches = (isbn):([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) plumb open = firefox http://www.amazon.com/s/?field-keywords={1} [github] type is = url arg is = {netloc} github.com github.com content is = text/x-python arg rewrite = {data} github.com,raw.githubusercontent.com blob/, plumb open = firefox {data} + + [url-fallback] + type is = url + plumb open = firefox {data}
4
0.210526
4
0
c0c0357473e58b1bb531b94a6959f1a4d1fada5b
examples/minimal_pipeline_k8s/minimal_k8s.go
examples/minimal_pipeline_k8s/minimal_k8s.go
package main import sp "github.com/scipipe/scipipe" func main() { // -------------------------------- // Set up a pipeline runner // -------------------------------- run := sp.NewPipelineRunner() // -------------------------------- // Initialize processes and add to runner // -------------------------------- foo := sp.NewFromShell("fooer", "echo foo > {o:foo}") foo.SetPathStatic("foo", "/hostshare/foo.txt") foo.ExecMode = sp.ExecModeK8s run.AddProcess(foo) f2b := sp.NewFromShell("foo2bar", "sed 's/foo/bar/g' {i:foo} > {o:bar}") f2b.SetPathExtend("foo", "bar", ".bar.txt") f2b.ExecMode = sp.ExecModeK8s run.AddProcess(f2b) snk := sp.NewSink() run.AddProcess(snk) // -------------------------------- // Connect workflow dependency network // -------------------------------- f2b.In["foo"].Connect(foo.Out["foo"]) snk.Connect(f2b.Out["bar"]) // -------------------------------- // Run the pipeline! // -------------------------------- run.Run() }
package main import sp "github.com/scipipe/scipipe" func main() { // -------------------------------- // Set up a pipeline runner // -------------------------------- run := sp.NewPipelineRunner() // -------------------------------- // Initialize processes and add to runner // -------------------------------- foo := sp.NewFromShell("fooer", "echo foo > {o:foo}") foo.SetPathStatic("foo", "/scipipe-data/foo.txt") foo.ExecMode = sp.ExecModeK8s run.AddProcess(foo) f2b := sp.NewFromShell("foo2bar", "sed 's/foo/bar/g' {i:foo} > {o:bar}") f2b.SetPathExtend("foo", "bar", ".bar.txt") f2b.ExecMode = sp.ExecModeK8s run.AddProcess(f2b) snk := sp.NewSink() run.AddProcess(snk) // -------------------------------- // Connect workflow dependency network // -------------------------------- f2b.In["foo"].Connect(foo.Out["foo"]) snk.Connect(f2b.Out["bar"]) // -------------------------------- // Run the pipeline! // -------------------------------- run.Run() }
Fix wrong default data folder path in k8s example
Fix wrong default data folder path in k8s example
Go
mit
scipipe/scipipe,scipipe/scipipe,samuell/scipipe
go
## Code Before: package main import sp "github.com/scipipe/scipipe" func main() { // -------------------------------- // Set up a pipeline runner // -------------------------------- run := sp.NewPipelineRunner() // -------------------------------- // Initialize processes and add to runner // -------------------------------- foo := sp.NewFromShell("fooer", "echo foo > {o:foo}") foo.SetPathStatic("foo", "/hostshare/foo.txt") foo.ExecMode = sp.ExecModeK8s run.AddProcess(foo) f2b := sp.NewFromShell("foo2bar", "sed 's/foo/bar/g' {i:foo} > {o:bar}") f2b.SetPathExtend("foo", "bar", ".bar.txt") f2b.ExecMode = sp.ExecModeK8s run.AddProcess(f2b) snk := sp.NewSink() run.AddProcess(snk) // -------------------------------- // Connect workflow dependency network // -------------------------------- f2b.In["foo"].Connect(foo.Out["foo"]) snk.Connect(f2b.Out["bar"]) // -------------------------------- // Run the pipeline! // -------------------------------- run.Run() } ## Instruction: Fix wrong default data folder path in k8s example ## Code After: package main import sp "github.com/scipipe/scipipe" func main() { // -------------------------------- // Set up a pipeline runner // -------------------------------- run := sp.NewPipelineRunner() // -------------------------------- // Initialize processes and add to runner // -------------------------------- foo := sp.NewFromShell("fooer", "echo foo > {o:foo}") foo.SetPathStatic("foo", "/scipipe-data/foo.txt") foo.ExecMode = sp.ExecModeK8s run.AddProcess(foo) f2b := sp.NewFromShell("foo2bar", "sed 's/foo/bar/g' {i:foo} > {o:bar}") f2b.SetPathExtend("foo", "bar", ".bar.txt") f2b.ExecMode = sp.ExecModeK8s run.AddProcess(f2b) snk := sp.NewSink() run.AddProcess(snk) // -------------------------------- // Connect workflow dependency network // -------------------------------- f2b.In["foo"].Connect(foo.Out["foo"]) snk.Connect(f2b.Out["bar"]) // -------------------------------- // Run the pipeline! // -------------------------------- run.Run() }
package main import sp "github.com/scipipe/scipipe" func main() { // -------------------------------- // Set up a pipeline runner // -------------------------------- run := sp.NewPipelineRunner() // -------------------------------- // Initialize processes and add to runner // -------------------------------- foo := sp.NewFromShell("fooer", "echo foo > {o:foo}") - foo.SetPathStatic("foo", "/hostshare/foo.txt") ? -- -- -- + foo.SetPathStatic("foo", "/scipipe-data/foo.txt") ? +++++++++ foo.ExecMode = sp.ExecModeK8s run.AddProcess(foo) f2b := sp.NewFromShell("foo2bar", "sed 's/foo/bar/g' {i:foo} > {o:bar}") f2b.SetPathExtend("foo", "bar", ".bar.txt") f2b.ExecMode = sp.ExecModeK8s run.AddProcess(f2b) snk := sp.NewSink() run.AddProcess(snk) // -------------------------------- // Connect workflow dependency network // -------------------------------- f2b.In["foo"].Connect(foo.Out["foo"]) snk.Connect(f2b.Out["bar"]) // -------------------------------- // Run the pipeline! // -------------------------------- run.Run() }
2
0.046512
1
1
11da15ac991afc2d7cf2fcbda40e2b870b5fc827
benchmark/benchmark-bootstrap.coffee
benchmark/benchmark-bootstrap.coffee
{$$} = require 'space-pen' nakedLoad 'jasmine' nakedLoad 'jasmine-html' nakedLoad 'jasmine-focused' $ = require 'jquery' document.title = "Benchmark Suite" $('head').append $$ -> @link rel: "stylesheet", type: "text/css", href: "static/jasmine.css" $('body').append $$ -> @div id: 'jasmine_runner' @div id: 'jasmine-content' jasmineEnv = jasmine.getEnv() trivialReporter = new jasmine.TrivialReporter(document, 'jasmine_runner') jasmineEnv.addReporter(trivialReporter) jasmineEnv.specFilter = (spec) -> trivialReporter.specFilter(spec) require 'benchmark-suite' jasmineEnv.execute()
{$$} = require 'space-pen' nakedLoad 'jasmine' nakedLoad 'jasmine-html' nakedLoad 'jasmine-focused' $ = require 'jquery' document.title = "Benchmark Suite" $('head').append $$ -> @link rel: "stylesheet", type: "text/css", href: "static/jasmine.css" $('body').append $$ -> @div id: 'jasmine_runner' @div id: 'jasmine-content' if atom.exitOnCompletion? originalFinishCallback = jasmine.Runner.prototype.finishCallback jasmine.Runner.prototype.finishCallback = -> originalFinishCallback.call(this) $native.exit() jasmineEnv = jasmine.getEnv() trivialReporter = new jasmine.TrivialReporter(document, 'jasmine_runner') jasmineEnv.addReporter(trivialReporter) jasmineEnv.specFilter = (spec) -> trivialReporter.specFilter(spec) require 'benchmark-suite' jasmineEnv.execute()
Exit app if exitAppWhenFinished is set
Exit app if exitAppWhenFinished is set
CoffeeScript
mit
GHackAnonymous/atom,beni55/atom,sxgao3001/atom,niklabh/atom,florianb/atom,bsmr-x-script/atom,charleswhchan/atom,deepfox/atom,me-benni/atom,darwin/atom,nvoron23/atom,FoldingText/atom,hagb4rd/atom,synaptek/atom,dannyflax/atom,Jdesk/atom,darwin/atom,sxgao3001/atom,gisenberg/atom,PKRoma/atom,kc8wxm/atom,GHackAnonymous/atom,liuderchi/atom,dkfiresky/atom,Jandersolutions/atom,mostafaeweda/atom,dannyflax/atom,niklabh/atom,ppamorim/atom,elkingtonmcb/atom,pombredanne/atom,basarat/atom,me6iaton/atom,hpham04/atom,ardeshirj/atom,sxgao3001/atom,mdumrauf/atom,bsmr-x-script/atom,bencolon/atom,kjav/atom,dijs/atom,ralphtheninja/atom,SlimeQ/atom,harshdattani/atom,sotayamashita/atom,jordanbtucker/atom,vcarrera/atom,dsandstrom/atom,ilovezy/atom,DiogoXRP/atom,FoldingText/atom,crazyquark/atom,ReddTea/atom,jacekkopecky/atom,bj7/atom,nvoron23/atom,001szymon/atom,kevinrenaers/atom,yomybaby/atom,splodingsocks/atom,ivoadf/atom,sillvan/atom,einarmagnus/atom,Rychard/atom,Austen-G/BlockBuilder,efatsi/atom,oggy/atom,constanzaurzua/atom,mostafaeweda/atom,h0dgep0dge/atom,n-riesco/atom,chengky/atom,matthewclendening/atom,efatsi/atom,florianb/atom,qskycolor/atom,fredericksilva/atom,elkingtonmcb/atom,Arcanemagus/atom,rjattrill/atom,florianb/atom,ashneo76/atom,basarat/atom,gisenberg/atom,johnrizzo1/atom,yalexx/atom,ali/atom,jacekkopecky/atom,Austen-G/BlockBuilder,gabrielPeart/atom,Arcanemagus/atom,rsvip/aTom,execjosh/atom,t9md/atom,deepfox/atom,darwin/atom,FoldingText/atom,Klozz/atom,seedtigo/atom,kc8wxm/atom,stuartquin/atom,ilovezy/atom,synaptek/atom,omarhuanca/atom,hagb4rd/atom,codex8/atom,kdheepak89/atom,acontreras89/atom,tisu2tisu/atom,Andrey-Pavlov/atom,hpham04/atom,lisonma/atom,nvoron23/atom,t9md/atom,florianb/atom,kittens/atom,sxgao3001/atom,yamhon/atom,champagnez/atom,johnhaley81/atom,liuxiong332/atom,charleswhchan/atom,tmunro/atom,g2p/atom,splodingsocks/atom,mrodalgaard/atom,avdg/atom,fredericksilva/atom,sillvan/atom,yamhon/atom,vjeux/atom,medovob/atom,Mokolea/atom,daxlab/atom,G-Baby/atom,bcoe/atom,ardeshirj/atom,Austen-G/BlockBuilder,AlisaKiatkongkumthon/atom,tmunro/atom,svanharmelen/atom,RuiDGoncalves/atom,avdg/atom,fscherwi/atom,dsandstrom/atom,Sangaroonaom/atom,gzzhanghao/atom,phord/atom,kjav/atom,john-kelly/atom,ReddTea/atom,FoldingText/atom,Huaraz2/atom,amine7536/atom,kandros/atom,Jandersoft/atom,hagb4rd/atom,hharchani/atom,sekcheong/atom,sotayamashita/atom,AdrianVovk/substance-ide,sotayamashita/atom,tjkr/atom,DiogoXRP/atom,targeter21/atom,harshdattani/atom,helber/atom,BogusCurry/atom,tony612/atom,mnquintana/atom,palita01/atom,Huaraz2/atom,paulcbetts/atom,Abdillah/atom,Abdillah/atom,amine7536/atom,kandros/atom,lovesnow/atom,champagnez/atom,john-kelly/atom,crazyquark/atom,daxlab/atom,lisonma/atom,wiggzz/atom,g2p/atom,xream/atom,kittens/atom,toqz/atom,AlisaKiatkongkumthon/atom,Neron-X5/atom,oggy/atom,splodingsocks/atom,toqz/atom,seedtigo/atom,scippio/atom,folpindo/atom,scv119/atom,Locke23rus/atom,florianb/atom,gzzhanghao/atom,Shekharrajak/atom,dijs/atom,Hasimir/atom,synaptek/atom,ironbox360/atom,charleswhchan/atom,rxkit/atom,vinodpanicker/atom,basarat/atom,chengky/atom,YunchengLiao/atom,n-riesco/atom,rjattrill/atom,GHackAnonymous/atom,abcP9110/atom,vhutheesing/atom,dkfiresky/atom,rmartin/atom,kevinrenaers/atom,constanzaurzua/atom,liuxiong332/atom,rookie125/atom,davideg/atom,mnquintana/atom,decaffeinate-examples/atom,acontreras89/atom,GHackAnonymous/atom,dsandstrom/atom,Galactix/atom,pengshp/atom,Ju2ender/atom,chengky/atom,abcP9110/atom,ReddTea/atom,originye/atom,deepfox/atom,Jdesk/atom,Jandersolutions/atom,bryonwinger/atom,Jandersolutions/atom,Ju2ender/atom,AlbertoBarrago/atom,jordanbtucker/atom,targeter21/atom,CraZySacX/atom,Abdillah/atom,codex8/atom,RobinTec/atom,YunchengLiao/atom,xream/atom,nrodriguez13/atom,nvoron23/atom,fredericksilva/atom,RuiDGoncalves/atom,jjz/atom,oggy/atom,rlugojr/atom,vinodpanicker/atom,ppamorim/atom,CraZySacX/atom,svanharmelen/atom,kittens/atom,john-kelly/atom,transcranial/atom,ilovezy/atom,me6iaton/atom,t9md/atom,nucked/atom,G-Baby/atom,gabrielPeart/atom,rlugojr/atom,bradgearon/atom,bcoe/atom,ilovezy/atom,abe33/atom,palita01/atom,targeter21/atom,n-riesco/atom,YunchengLiao/atom,acontreras89/atom,bcoe/atom,mertkahyaoglu/atom,Ju2ender/atom,originye/atom,ardeshirj/atom,pengshp/atom,0x73/atom,dannyflax/atom,stinsonga/atom,deoxilix/atom,hakatashi/atom,crazyquark/atom,lpommers/atom,mostafaeweda/atom,dannyflax/atom,KENJU/atom,mostafaeweda/atom,me6iaton/atom,fedorov/atom,MjAbuz/atom,gisenberg/atom,deepfox/atom,yomybaby/atom,codex8/atom,jjz/atom,sekcheong/atom,qiujuer/atom,isghe/atom,liuxiong332/atom,davideg/atom,boomwaiza/atom,NunoEdgarGub1/atom,kc8wxm/atom,vinodpanicker/atom,prembasumatary/atom,kjav/atom,tony612/atom,scv119/atom,panuchart/atom,yamhon/atom,ezeoleaf/atom,chfritz/atom,hellendag/atom,Austen-G/BlockBuilder,burodepeper/atom,RobinTec/atom,me6iaton/atom,Shekharrajak/atom,rlugojr/atom,hharchani/atom,001szymon/atom,lpommers/atom,kc8wxm/atom,hharchani/atom,cyzn/atom,dkfiresky/atom,0x73/atom,hellendag/atom,einarmagnus/atom,palita01/atom,decaffeinate-examples/atom,efatsi/atom,lisonma/atom,woss/atom,Galactix/atom,sebmck/atom,rsvip/aTom,burodepeper/atom,Jonekee/atom,Andrey-Pavlov/atom,sxgao3001/atom,nucked/atom,woss/atom,dannyflax/atom,Jdesk/atom,isghe/atom,Neron-X5/atom,devoncarew/atom,CraZySacX/atom,sekcheong/atom,nrodriguez13/atom,anuwat121/atom,RobinTec/atom,kittens/atom,pombredanne/atom,Rodjana/atom,dijs/atom,vhutheesing/atom,h0dgep0dge/atom,AlbertoBarrago/atom,hharchani/atom,ironbox360/atom,stinsonga/atom,toqz/atom,hakatashi/atom,johnrizzo1/atom,jeremyramin/atom,bj7/atom,beni55/atom,yangchenghu/atom,mostafaeweda/atom,Mokolea/atom,Ju2ender/atom,ObviouslyGreen/atom,rookie125/atom,batjko/atom,helber/atom,Shekharrajak/atom,fscherwi/atom,MjAbuz/atom,sebmck/atom,hagb4rd/atom,einarmagnus/atom,SlimeQ/atom,n-riesco/atom,ralphtheninja/atom,devoncarew/atom,ppamorim/atom,bencolon/atom,panuchart/atom,nucked/atom,Hasimir/atom,jjz/atom,ezeoleaf/atom,bj7/atom,yomybaby/atom,tony612/atom,ObviouslyGreen/atom,tanin47/atom,jacekkopecky/atom,bryonwinger/atom,tanin47/atom,YunchengLiao/atom,rmartin/atom,paulcbetts/atom,sebmck/atom,omarhuanca/atom,rookie125/atom,bencolon/atom,FIT-CSE2410-A-Bombs/atom,paulcbetts/atom,KENJU/atom,rmartin/atom,targeter21/atom,Hasimir/atom,Andrey-Pavlov/atom,kaicataldo/atom,wiggzz/atom,fedorov/atom,Jandersolutions/atom,jlord/atom,liuderchi/atom,ralphtheninja/atom,rjattrill/atom,daxlab/atom,fredericksilva/atom,bcoe/atom,erikhakansson/atom,helber/atom,ReddTea/atom,AdrianVovk/substance-ide,yalexx/atom,rsvip/aTom,brettle/atom,jeremyramin/atom,hpham04/atom,dkfiresky/atom,001szymon/atom,hpham04/atom,ali/atom,stinsonga/atom,ppamorim/atom,Andrey-Pavlov/atom,constanzaurzua/atom,devoncarew/atom,jtrose2/atom,Galactix/atom,originye/atom,johnrizzo1/atom,brumm/atom,charleswhchan/atom,RobinTec/atom,NunoEdgarGub1/atom,ReddTea/atom,bcoe/atom,vjeux/atom,basarat/atom,anuwat121/atom,jacekkopecky/atom,0x73/atom,Abdillah/atom,mrodalgaard/atom,omarhuanca/atom,Rychard/atom,Jonekee/atom,gontadu/atom,githubteacher/atom,woss/atom,folpindo/atom,SlimeQ/atom,Sangaroonaom/atom,burodepeper/atom,hpham04/atom,sekcheong/atom,phord/atom,mertkahyaoglu/atom,abcP9110/atom,amine7536/atom,bradgearon/atom,fedorov/atom,pombredanne/atom,Hasimir/atom,githubteacher/atom,synaptek/atom,ironbox360/atom,Jonekee/atom,kjav/atom,pengshp/atom,yomybaby/atom,pombredanne/atom,kdheepak89/atom,qiujuer/atom,gisenberg/atom,basarat/atom,Shekharrajak/atom,andrewleverette/atom,sebmck/atom,Sangaroonaom/atom,kaicataldo/atom,bryonwinger/atom,DiogoXRP/atom,jacekkopecky/atom,yalexx/atom,qskycolor/atom,russlescai/atom,davideg/atom,fang-yufeng/atom,qiujuer/atom,codex8/atom,omarhuanca/atom,lisonma/atom,Jandersoft/atom,oggy/atom,ppamorim/atom,rxkit/atom,mnquintana/atom,gontadu/atom,Austen-G/BlockBuilder,Locke23rus/atom,transcranial/atom,kdheepak89/atom,devmario/atom,liuxiong332/atom,alfredxing/atom,alfredxing/atom,lovesnow/atom,devmario/atom,mertkahyaoglu/atom,kaicataldo/atom,jjz/atom,Austen-G/BlockBuilder,tisu2tisu/atom,russlescai/atom,Galactix/atom,russlescai/atom,nvoron23/atom,Ingramz/atom,NunoEdgarGub1/atom,MjAbuz/atom,vcarrera/atom,dannyflax/atom,MjAbuz/atom,harshdattani/atom,BogusCurry/atom,devoncarew/atom,fedorov/atom,KENJU/atom,ali/atom,ezeoleaf/atom,devoncarew/atom,abcP9110/atom,jlord/atom,tjkr/atom,Mokolea/atom,vjeux/atom,bsmr-x-script/atom,execjosh/atom,Ingramz/atom,KENJU/atom,mnquintana/atom,kittens/atom,transcranial/atom,russlescai/atom,bolinfest/atom,Neron-X5/atom,russlescai/atom,ivoadf/atom,lovesnow/atom,toqz/atom,deoxilix/atom,Rychard/atom,boomwaiza/atom,abe33/atom,chengky/atom,johnhaley81/atom,kdheepak89/atom,prembasumatary/atom,yalexx/atom,kevinrenaers/atom,Jandersolutions/atom,stuartquin/atom,bolinfest/atom,fang-yufeng/atom,vinodpanicker/atom,toqz/atom,kandros/atom,ashneo76/atom,AlisaKiatkongkumthon/atom,alexandergmann/atom,oggy/atom,rsvip/aTom,FIT-CSE2410-A-Bombs/atom,YunchengLiao/atom,batjko/atom,batjko/atom,Dennis1978/atom,jtrose2/atom,RuiDGoncalves/atom,githubteacher/atom,n-riesco/atom,execjosh/atom,NunoEdgarGub1/atom,john-kelly/atom,pkdevbox/atom,BogusCurry/atom,Dennis1978/atom,chfritz/atom,vjeux/atom,qiujuer/atom,jacekkopecky/atom,prembasumatary/atom,Neron-X5/atom,bradgearon/atom,abcP9110/atom,gzzhanghao/atom,nrodriguez13/atom,rmartin/atom,rsvip/aTom,tmunro/atom,MjAbuz/atom,Dennis1978/atom,yomybaby/atom,ObviouslyGreen/atom,ykeisuke/atom,Huaraz2/atom,h0dgep0dge/atom,hakatashi/atom,mnquintana/atom,dsandstrom/atom,Locke23rus/atom,dkfiresky/atom,jlord/atom,ykeisuke/atom,yangchenghu/atom,matthewclendening/atom,elkingtonmcb/atom,hharchani/atom,AdrianVovk/substance-ide,FoldingText/atom,john-kelly/atom,Jandersoft/atom,fredericksilva/atom,matthewclendening/atom,tony612/atom,champagnez/atom,alfredxing/atom,chengky/atom,svanharmelen/atom,pkdevbox/atom,Arcanemagus/atom,gontadu/atom,vhutheesing/atom,brettle/atom,me-benni/atom,me-benni/atom,fscherwi/atom,davideg/atom,amine7536/atom,qiujuer/atom,mdumrauf/atom,rxkit/atom,pombredanne/atom,einarmagnus/atom,ilovezy/atom,avdg/atom,AlbertoBarrago/atom,g2p/atom,devmario/atom,batjko/atom,atom/atom,synaptek/atom,kc8wxm/atom,Galactix/atom,cyzn/atom,jlord/atom,crazyquark/atom,kdheepak89/atom,cyzn/atom,amine7536/atom,isghe/atom,SlimeQ/atom,Jandersoft/atom,brettle/atom,Rodjana/atom,paulcbetts/atom,crazyquark/atom,constanzaurzua/atom,woss/atom,prembasumatary/atom,niklabh/atom,ivoadf/atom,atom/atom,rmartin/atom,G-Baby/atom,NunoEdgarGub1/atom,ashneo76/atom,pkdevbox/atom,devmario/atom,Neron-X5/atom,jeremyramin/atom,jtrose2/atom,Ingramz/atom,fedorov/atom,lisonma/atom,folpindo/atom,ali/atom,sekcheong/atom,FIT-CSE2410-A-Bombs/atom,mdumrauf/atom,basarat/atom,phord/atom,yangchenghu/atom,panuchart/atom,AlexxNica/atom,Andrey-Pavlov/atom,andrewleverette/atom,scv119/atom,erikhakansson/atom,anuwat121/atom,liuxiong332/atom,jjz/atom,johnhaley81/atom,boomwaiza/atom,scippio/atom,rjattrill/atom,Klozz/atom,yalexx/atom,woss/atom,fang-yufeng/atom,batjko/atom,Hasimir/atom,vjeux/atom,GHackAnonymous/atom,vinodpanicker/atom,dsandstrom/atom,decaffeinate-examples/atom,Jandersoft/atom,targeter21/atom,mertkahyaoglu/atom,alexandergmann/atom,lovesnow/atom,Jdesk/atom,atom/atom,davideg/atom,charleswhchan/atom,chfritz/atom,scv119/atom,ykeisuke/atom,stinsonga/atom,brumm/atom,deoxilix/atom,hellendag/atom,matthewclendening/atom,RobinTec/atom,sillvan/atom,beni55/atom,vcarrera/atom,liuderchi/atom,hakatashi/atom,bryonwinger/atom,bolinfest/atom,sillvan/atom,lpommers/atom,omarhuanca/atom,abe33/atom,deepfox/atom,0x73/atom,Jdesk/atom,Ju2ender/atom,wiggzz/atom,me6iaton/atom,matthewclendening/atom,fang-yufeng/atom,tisu2tisu/atom,codex8/atom,FoldingText/atom,alexandergmann/atom,stuartquin/atom,SlimeQ/atom,ezeoleaf/atom,Klozz/atom,andrewleverette/atom,KENJU/atom,AlexxNica/atom,medovob/atom,Rodjana/atom,sebmck/atom,AlexxNica/atom,tjkr/atom,tanin47/atom,decaffeinate-examples/atom,devmario/atom,fang-yufeng/atom,jlord/atom,gabrielPeart/atom,liuderchi/atom,scippio/atom,jtrose2/atom,acontreras89/atom,seedtigo/atom,splodingsocks/atom,jtrose2/atom,qskycolor/atom,sillvan/atom,Abdillah/atom,prembasumatary/atom,gisenberg/atom,PKRoma/atom,kjav/atom,constanzaurzua/atom,acontreras89/atom,Shekharrajak/atom,qskycolor/atom,vcarrera/atom,ali/atom,xream/atom,hagb4rd/atom,PKRoma/atom,mertkahyaoglu/atom,jordanbtucker/atom,tony612/atom,qskycolor/atom,lovesnow/atom,mrodalgaard/atom,einarmagnus/atom,medovob/atom,isghe/atom,vcarrera/atom,brumm/atom,h0dgep0dge/atom,isghe/atom,erikhakansson/atom
coffeescript
## Code Before: {$$} = require 'space-pen' nakedLoad 'jasmine' nakedLoad 'jasmine-html' nakedLoad 'jasmine-focused' $ = require 'jquery' document.title = "Benchmark Suite" $('head').append $$ -> @link rel: "stylesheet", type: "text/css", href: "static/jasmine.css" $('body').append $$ -> @div id: 'jasmine_runner' @div id: 'jasmine-content' jasmineEnv = jasmine.getEnv() trivialReporter = new jasmine.TrivialReporter(document, 'jasmine_runner') jasmineEnv.addReporter(trivialReporter) jasmineEnv.specFilter = (spec) -> trivialReporter.specFilter(spec) require 'benchmark-suite' jasmineEnv.execute() ## Instruction: Exit app if exitAppWhenFinished is set ## Code After: {$$} = require 'space-pen' nakedLoad 'jasmine' nakedLoad 'jasmine-html' nakedLoad 'jasmine-focused' $ = require 'jquery' document.title = "Benchmark Suite" $('head').append $$ -> @link rel: "stylesheet", type: "text/css", href: "static/jasmine.css" $('body').append $$ -> @div id: 'jasmine_runner' @div id: 'jasmine-content' if atom.exitOnCompletion? originalFinishCallback = jasmine.Runner.prototype.finishCallback jasmine.Runner.prototype.finishCallback = -> originalFinishCallback.call(this) $native.exit() jasmineEnv = jasmine.getEnv() trivialReporter = new jasmine.TrivialReporter(document, 'jasmine_runner') jasmineEnv.addReporter(trivialReporter) jasmineEnv.specFilter = (spec) -> trivialReporter.specFilter(spec) require 'benchmark-suite' jasmineEnv.execute()
{$$} = require 'space-pen' nakedLoad 'jasmine' nakedLoad 'jasmine-html' nakedLoad 'jasmine-focused' $ = require 'jquery' document.title = "Benchmark Suite" $('head').append $$ -> @link rel: "stylesheet", type: "text/css", href: "static/jasmine.css" $('body').append $$ -> @div id: 'jasmine_runner' @div id: 'jasmine-content' + if atom.exitOnCompletion? + originalFinishCallback = jasmine.Runner.prototype.finishCallback + jasmine.Runner.prototype.finishCallback = -> + originalFinishCallback.call(this) + $native.exit() + jasmineEnv = jasmine.getEnv() trivialReporter = new jasmine.TrivialReporter(document, 'jasmine_runner') jasmineEnv.addReporter(trivialReporter) jasmineEnv.specFilter = (spec) -> trivialReporter.specFilter(spec) require 'benchmark-suite' jasmineEnv.execute()
6
0.24
6
0
ad816e6ea67dcfbbce05812b87995b952223d233
Minter/src/main/java/com/hida/model/UsedSetting.java
Minter/src/main/java/com/hida/model/UsedSetting.java
package com.hida.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.NotNull; import org.hibernate.annotations.Type; /** * * @author lruffin */ @Entity @Table(name = "USED_SETTING") public class UsedSetting extends Setting{ @NotNull @Column(name="AMOUNT") @Type(type="long") private long Amount; /** * Constructor; missing javadoc * * @param Prepend * @param Prefix * @param TokenType * @param CharMap * @param RootLength * @param SansVowels * @param Amount */ public UsedSetting(String Prepend, String Prefix, TokenType TokenType, String CharMap, int RootLength, boolean SansVowels, long Amount) { super(Prefix, TokenType, CharMap, RootLength, SansVowels); this.Amount = Amount; } /** * Default constructor */ public UsedSetting() { } public long getAmount() { return Amount; } public void setAmount(long Amount) { this.Amount = Amount; } }
package com.hida.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.NotNull; import org.hibernate.annotations.Type; /** * * @author lruffin */ @Entity @Table(name = "USED_SETTING") public class UsedSetting extends Setting{ @NotNull @Column(name="AMOUNT") @Type(type="long") private long Amount; /** * Constructor; missing javadoc * * @param Prefix * @param TokenType * @param CharMap * @param RootLength * @param SansVowels * @param Amount */ public UsedSetting(String Prefix, TokenType TokenType, String CharMap, int RootLength, boolean SansVowels, long Amount) { super(Prefix, TokenType, CharMap, RootLength, SansVowels); this.Amount = Amount; } /** * Default constructor */ public UsedSetting() { } public long getAmount() { return Amount; } public void setAmount(long Amount) { this.Amount = Amount; } }
Remove all instances of Prepend
Remove all instances of Prepend Prepend was removed because it does not strictly contribute to the creation of Pids; instead it is added to turn Pids into a URL specific to the organization that created them.
Java
apache-2.0
HawaiiStateDigitalArchives/PID-webservice,HawaiiStateDigitalArchives/PID-webservice,Khyzad/PID-webservice,Khyzad/PID-webservice
java
## Code Before: package com.hida.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.NotNull; import org.hibernate.annotations.Type; /** * * @author lruffin */ @Entity @Table(name = "USED_SETTING") public class UsedSetting extends Setting{ @NotNull @Column(name="AMOUNT") @Type(type="long") private long Amount; /** * Constructor; missing javadoc * * @param Prepend * @param Prefix * @param TokenType * @param CharMap * @param RootLength * @param SansVowels * @param Amount */ public UsedSetting(String Prepend, String Prefix, TokenType TokenType, String CharMap, int RootLength, boolean SansVowels, long Amount) { super(Prefix, TokenType, CharMap, RootLength, SansVowels); this.Amount = Amount; } /** * Default constructor */ public UsedSetting() { } public long getAmount() { return Amount; } public void setAmount(long Amount) { this.Amount = Amount; } } ## Instruction: Remove all instances of Prepend Prepend was removed because it does not strictly contribute to the creation of Pids; instead it is added to turn Pids into a URL specific to the organization that created them. ## Code After: package com.hida.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.NotNull; import org.hibernate.annotations.Type; /** * * @author lruffin */ @Entity @Table(name = "USED_SETTING") public class UsedSetting extends Setting{ @NotNull @Column(name="AMOUNT") @Type(type="long") private long Amount; /** * Constructor; missing javadoc * * @param Prefix * @param TokenType * @param CharMap * @param RootLength * @param SansVowels * @param Amount */ public UsedSetting(String Prefix, TokenType TokenType, String CharMap, int RootLength, boolean SansVowels, long Amount) { super(Prefix, TokenType, CharMap, RootLength, SansVowels); this.Amount = Amount; } /** * Default constructor */ public UsedSetting() { } public long getAmount() { return Amount; } public void setAmount(long Amount) { this.Amount = Amount; } }
package com.hida.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.NotNull; import org.hibernate.annotations.Type; /** * * @author lruffin */ @Entity @Table(name = "USED_SETTING") public class UsedSetting extends Setting{ @NotNull @Column(name="AMOUNT") @Type(type="long") private long Amount; /** * Constructor; missing javadoc * - * @param Prepend * @param Prefix * @param TokenType * @param CharMap * @param RootLength * @param SansVowels * @param Amount */ - public UsedSetting(String Prepend, String Prefix, TokenType TokenType, String CharMap, ? ---------------- + public UsedSetting(String Prefix, TokenType TokenType, String CharMap, int RootLength, boolean SansVowels, long Amount) { super(Prefix, TokenType, CharMap, RootLength, SansVowels); this.Amount = Amount; } /** * Default constructor */ public UsedSetting() { } public long getAmount() { return Amount; } public void setAmount(long Amount) { this.Amount = Amount; } }
3
0.051724
1
2
473b7d3498857cd0aff4ecca9ca31ea64558e959
tests/AlgorithmTest.php
tests/AlgorithmTest.php
<?php namespace Tests; use PHPUnit\Framework\TestCase; use App\Contracts\SortingAlgorithm; class AlgorithmTest extends TestCase { /** * List of algorithms to test * * @var array */ private $algorithms = [ \App\Algorithms\BubbleSort::class, \App\Algorithms\MergeSort::class, \App\Algorithms\SelectionSort::class, \App\Algorithms\InsertionSort::class, \App\Algorithms\QuickSort::class, ]; /** * Generate numbers to sort. */ public function __construct() { $this->numbers = $this->sorted = range(1, 100); shuffle($this->numbers); } /** * Test each algorithm */ public function testAlgorithms() { foreach ($this->algorithms as $algorithm) { // Assert it can really sort $this->assertAlgorithmCanSort(new $algorithm($this->numbers)); // The original still must be shufled! $this->assertNotEquals($this->numbers, $this->sorted); } } /** * Check if given algorithm can sort * * @param SortingAlgorithm $algorithm */ private function assertAlgorithmCanSort(SortingAlgorithm $algorithm) { $actual = $algorithm->sort(); $this->assertEquals($this->sorted, $actual); } }
<?php namespace Tests; use PHPUnit\Framework\TestCase; use App\Contracts\SortingAlgorithm; use App\Contracts\ProvidesFeedback; class AlgorithmTest extends TestCase { /** * List of algorithms to test * * @var array */ private $algorithms = [ \App\Algorithms\BubbleSort::class, \App\Algorithms\MergeSort::class, \App\Algorithms\SelectionSort::class, \App\Algorithms\InsertionSort::class, \App\Algorithms\QuickSort::class, ]; /** * Generate numbers to sort. */ public function __construct() { $this->numbers = $this->sorted = range(1, 100); shuffle($this->numbers); } /** * Test each algorithm */ public function testAlgorithms() { foreach ($this->algorithms as $algorithm) { $sorter = new $algorithm($this->numbers); // Assert it can really sort $this->assertAlgorithmCanSort($sorter); // The original still must be shufled! $this->assertNotEquals($this->numbers, $this->sorted); // Check if it implements and extends the neccessary interfaces and classes $this->assertInstanceOf(\App\Contracts\ProvidesFeedback::class, $sorter); $this->assertInstanceOf(\App\Sorter::class, $sorter); } } /** * Check if given algorithm can sort * * @param SortingAlgorithm $algorithm */ private function assertAlgorithmCanSort(SortingAlgorithm $algorithm) { $actual = $algorithm->sort(); $this->assertEquals($this->sorted, $actual); } }
Check interfaces, and abstract classes
Check interfaces, and abstract classes
PHP
mit
tbence94/php-sorting-analysis
php
## Code Before: <?php namespace Tests; use PHPUnit\Framework\TestCase; use App\Contracts\SortingAlgorithm; class AlgorithmTest extends TestCase { /** * List of algorithms to test * * @var array */ private $algorithms = [ \App\Algorithms\BubbleSort::class, \App\Algorithms\MergeSort::class, \App\Algorithms\SelectionSort::class, \App\Algorithms\InsertionSort::class, \App\Algorithms\QuickSort::class, ]; /** * Generate numbers to sort. */ public function __construct() { $this->numbers = $this->sorted = range(1, 100); shuffle($this->numbers); } /** * Test each algorithm */ public function testAlgorithms() { foreach ($this->algorithms as $algorithm) { // Assert it can really sort $this->assertAlgorithmCanSort(new $algorithm($this->numbers)); // The original still must be shufled! $this->assertNotEquals($this->numbers, $this->sorted); } } /** * Check if given algorithm can sort * * @param SortingAlgorithm $algorithm */ private function assertAlgorithmCanSort(SortingAlgorithm $algorithm) { $actual = $algorithm->sort(); $this->assertEquals($this->sorted, $actual); } } ## Instruction: Check interfaces, and abstract classes ## Code After: <?php namespace Tests; use PHPUnit\Framework\TestCase; use App\Contracts\SortingAlgorithm; use App\Contracts\ProvidesFeedback; class AlgorithmTest extends TestCase { /** * List of algorithms to test * * @var array */ private $algorithms = [ \App\Algorithms\BubbleSort::class, \App\Algorithms\MergeSort::class, \App\Algorithms\SelectionSort::class, \App\Algorithms\InsertionSort::class, \App\Algorithms\QuickSort::class, ]; /** * Generate numbers to sort. */ public function __construct() { $this->numbers = $this->sorted = range(1, 100); shuffle($this->numbers); } /** * Test each algorithm */ public function testAlgorithms() { foreach ($this->algorithms as $algorithm) { $sorter = new $algorithm($this->numbers); // Assert it can really sort $this->assertAlgorithmCanSort($sorter); // The original still must be shufled! $this->assertNotEquals($this->numbers, $this->sorted); // Check if it implements and extends the neccessary interfaces and classes $this->assertInstanceOf(\App\Contracts\ProvidesFeedback::class, $sorter); $this->assertInstanceOf(\App\Sorter::class, $sorter); } } /** * Check if given algorithm can sort * * @param SortingAlgorithm $algorithm */ private function assertAlgorithmCanSort(SortingAlgorithm $algorithm) { $actual = $algorithm->sort(); $this->assertEquals($this->sorted, $actual); } }
<?php namespace Tests; use PHPUnit\Framework\TestCase; use App\Contracts\SortingAlgorithm; + use App\Contracts\ProvidesFeedback; class AlgorithmTest extends TestCase { + /** * List of algorithms to test * * @var array */ private $algorithms = [ \App\Algorithms\BubbleSort::class, \App\Algorithms\MergeSort::class, \App\Algorithms\SelectionSort::class, \App\Algorithms\InsertionSort::class, \App\Algorithms\QuickSort::class, ]; /** * Generate numbers to sort. */ - public function __construct() { ? -- + public function __construct() + { $this->numbers = $this->sorted = range(1, 100); shuffle($this->numbers); } /** * Test each algorithm */ public function testAlgorithms() { foreach ($this->algorithms as $algorithm) { + $sorter = new $algorithm($this->numbers); + - // Assert it can really sort ? - + // Assert it can really sort - $this->assertAlgorithmCanSort(new $algorithm($this->numbers)); ? ---- ^^^ - -------------- -- + $this->assertAlgorithmCanSort($sorter); ? ^ // The original still must be shufled! $this->assertNotEquals($this->numbers, $this->sorted); + + // Check if it implements and extends the neccessary interfaces and classes + $this->assertInstanceOf(\App\Contracts\ProvidesFeedback::class, $sorter); + $this->assertInstanceOf(\App\Sorter::class, $sorter); } } /** * Check if given algorithm can sort - * ? - + * * @param SortingAlgorithm $algorithm */ private function assertAlgorithmCanSort(SortingAlgorithm $algorithm) { $actual = $algorithm->sort(); $this->assertEquals($this->sorted, $actual); } }
17
0.309091
13
4
d5e3e40fb7dcf7cefddac661f2ebc8ed92740895
root/usr/bin/transmission-blocklist-update.sh
root/usr/bin/transmission-blocklist-update.sh
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json) BLOCKLIST_URL=$(jq -r '.["blocklist-url"]' /config/settings.json | sed 's/\&amp;/\&/g') if [ "${BLOCKLIST_ENABLED:-false}" == "true" -a -n "$BLOCKLIST_URL" ]; then mkdir -p /tmp/blocklists rm -rf /tmp/blocklists/* cd /tmp/blocklists wget -q -O blocklist.gz "$BLOCKLIST_URL" if [ $? == 0 ]; then gunzip *.gz if [ $? == 0 ]; then chmod go+r * rm -rf /config/blocklists/* cp /tmp/blocklists/blocklist.gz /config/blocklists/ s6-svc -h /var/run/s6/services/transmission fi fi fi
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json) BLOCKLIST_URL=$(jq -r '.["blocklist-url"]' /config/settings.json | sed 's/\&amp;/\&/g') if [ "${BLOCKLIST_ENABLED:-false}" == "true" -a -n "$BLOCKLIST_URL" ]; then mkdir -p /tmp/blocklists rm -rf /tmp/blocklists/* cd /tmp/blocklists wget -q -O blocklist.gz "$BLOCKLIST_URL" if [ $? == 0 ]; then gunzip *.gz if [ $? == 0 ]; then chmod go+r * rm -rf /config/blocklists/* cp /tmp/blocklists/* /config/blocklists/ s6-svc -h /var/run/s6/services/transmission fi fi fi
Fix bug with blacklist update
Fix bug with blacklist update
Shell
mit
Turgon37/docker-transmission
shell
## Code Before: BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json) BLOCKLIST_URL=$(jq -r '.["blocklist-url"]' /config/settings.json | sed 's/\&amp;/\&/g') if [ "${BLOCKLIST_ENABLED:-false}" == "true" -a -n "$BLOCKLIST_URL" ]; then mkdir -p /tmp/blocklists rm -rf /tmp/blocklists/* cd /tmp/blocklists wget -q -O blocklist.gz "$BLOCKLIST_URL" if [ $? == 0 ]; then gunzip *.gz if [ $? == 0 ]; then chmod go+r * rm -rf /config/blocklists/* cp /tmp/blocklists/blocklist.gz /config/blocklists/ s6-svc -h /var/run/s6/services/transmission fi fi fi ## Instruction: Fix bug with blacklist update ## Code After: BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json) BLOCKLIST_URL=$(jq -r '.["blocklist-url"]' /config/settings.json | sed 's/\&amp;/\&/g') if [ "${BLOCKLIST_ENABLED:-false}" == "true" -a -n "$BLOCKLIST_URL" ]; then mkdir -p /tmp/blocklists rm -rf /tmp/blocklists/* cd /tmp/blocklists wget -q -O blocklist.gz "$BLOCKLIST_URL" if [ $? == 0 ]; then gunzip *.gz if [ $? == 0 ]; then chmod go+r * rm -rf /config/blocklists/* cp /tmp/blocklists/* /config/blocklists/ s6-svc -h /var/run/s6/services/transmission fi fi fi
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json) BLOCKLIST_URL=$(jq -r '.["blocklist-url"]' /config/settings.json | sed 's/\&amp;/\&/g') if [ "${BLOCKLIST_ENABLED:-false}" == "true" -a -n "$BLOCKLIST_URL" ]; then mkdir -p /tmp/blocklists rm -rf /tmp/blocklists/* cd /tmp/blocklists wget -q -O blocklist.gz "$BLOCKLIST_URL" if [ $? == 0 ]; then gunzip *.gz if [ $? == 0 ]; then chmod go+r * rm -rf /config/blocklists/* - cp /tmp/blocklists/blocklist.gz /config/blocklists/ ? ^^^^^^^^^^^^ + cp /tmp/blocklists/* /config/blocklists/ ? ^ s6-svc -h /var/run/s6/services/transmission fi fi fi
2
0.105263
1
1
1b673b695cedbb5008db172309de6b4c23ec900f
appengine-experimental/src/models.py
appengine-experimental/src/models.py
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = db.StringProperty() Location = db.StringProperty() Area = db.StringProperty() ThomasBrothers = db.StringProperty() TBXY = db.StringProperty() LogDetails = db.BlobProperty() geolocation = db.GeoPtProperty() created = db.DateTimeProperty(auto_now_add=True) updated = db.DateTimeProperty(auto_now=True) def getStatus(self): if self.created > datetime.utcnow() - timedelta(minutes=5): # less than 5 min old == new return 'new' elif self.updated < datetime.utcnow() - timedelta(minutes=5): # not updated in 5 min == inactive return 'inactive' else: return 'active'
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = db.StringProperty() Location = db.StringProperty() Area = db.StringProperty() ThomasBrothers = db.StringProperty() TBXY = db.StringProperty() LogDetails = db.BlobProperty() geolocation = db.GeoPtProperty() created = db.DateTimeProperty(auto_now_add=True) updated = db.DateTimeProperty(auto_now=True) modified = db.DateTimeProperty() def getStatus(self): if self.created > datetime.utcnow() - timedelta(minutes=5): # less than 5 min old == new return 'new' elif self.updated < datetime.utcnow() - timedelta(minutes=5): # not updated in 5 min == inactive return 'inactive' else: return 'active'
Add a "modified" property that will only be updated when the entity is actually updated.
Add a "modified" property that will only be updated when the entity is actually updated.
Python
isc
lectroidmarc/SacTraffic,lectroidmarc/SacTraffic
python
## Code Before: from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = db.StringProperty() Location = db.StringProperty() Area = db.StringProperty() ThomasBrothers = db.StringProperty() TBXY = db.StringProperty() LogDetails = db.BlobProperty() geolocation = db.GeoPtProperty() created = db.DateTimeProperty(auto_now_add=True) updated = db.DateTimeProperty(auto_now=True) def getStatus(self): if self.created > datetime.utcnow() - timedelta(minutes=5): # less than 5 min old == new return 'new' elif self.updated < datetime.utcnow() - timedelta(minutes=5): # not updated in 5 min == inactive return 'inactive' else: return 'active' ## Instruction: Add a "modified" property that will only be updated when the entity is actually updated. ## Code After: from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = db.StringProperty() Location = db.StringProperty() Area = db.StringProperty() ThomasBrothers = db.StringProperty() TBXY = db.StringProperty() LogDetails = db.BlobProperty() geolocation = db.GeoPtProperty() created = db.DateTimeProperty(auto_now_add=True) updated = db.DateTimeProperty(auto_now=True) modified = db.DateTimeProperty() def getStatus(self): if self.created > datetime.utcnow() - timedelta(minutes=5): # less than 5 min old == new return 'new' elif self.updated < datetime.utcnow() - timedelta(minutes=5): # not updated in 5 min == inactive return 'inactive' else: return 'active'
from datetime import datetime, timedelta from google.appengine.ext import db class CHPIncident(db.Model): CenterID = db.StringProperty(required=True) DispatchID = db.StringProperty(required=True) LogID = db.StringProperty(required=True) LogTime = db.DateTimeProperty() LogType = db.StringProperty() LogTypeID = db.StringProperty() Location = db.StringProperty() Area = db.StringProperty() ThomasBrothers = db.StringProperty() TBXY = db.StringProperty() LogDetails = db.BlobProperty() geolocation = db.GeoPtProperty() created = db.DateTimeProperty(auto_now_add=True) updated = db.DateTimeProperty(auto_now=True) + modified = db.DateTimeProperty() def getStatus(self): if self.created > datetime.utcnow() - timedelta(minutes=5): # less than 5 min old == new return 'new' elif self.updated < datetime.utcnow() - timedelta(minutes=5): # not updated in 5 min == inactive return 'inactive' else: return 'active'
1
0.033333
1
0
dbe74601e795212fa02bfaef8b490689414e6a69
.circleci/config.yml
.circleci/config.yml
version: 2 jobs: build: # machine has a misc install of node that is good enough for linting # and docker-compose for running the integration test machine: true steps: - checkout - restore_cache: keys: - v1-dep-{{ .Branch }}- # Default branch if above not available - v1-dep-master- - run: npm install - save_cache: key: v1-dep-{{ .Branch }}-{{ epoch }} paths: - ./node_modules - run: npm run test:ci - store_test_results: path: /tmp/circleci-test-results
version: 2 jobs: build: # machine has a misc install of node that is good enough for linting # and docker-compose for running the integration test machine: true steps: - checkout - restore_cache: keys: - v1-dep-{{ .Branch }}- # Default branch if above not available - v1-dep-master- - run: npm install - save_cache: key: v1-dep-{{ .Branch }}-{{ epoch }} paths: - ./node_modules - run: npm run test:ci
Remove unnecessary step from circle ci
Remove unnecessary step from circle ci
YAML
mit
brainsiq/merge-yaml-cli
yaml
## Code Before: version: 2 jobs: build: # machine has a misc install of node that is good enough for linting # and docker-compose for running the integration test machine: true steps: - checkout - restore_cache: keys: - v1-dep-{{ .Branch }}- # Default branch if above not available - v1-dep-master- - run: npm install - save_cache: key: v1-dep-{{ .Branch }}-{{ epoch }} paths: - ./node_modules - run: npm run test:ci - store_test_results: path: /tmp/circleci-test-results ## Instruction: Remove unnecessary step from circle ci ## Code After: version: 2 jobs: build: # machine has a misc install of node that is good enough for linting # and docker-compose for running the integration test machine: true steps: - checkout - restore_cache: keys: - v1-dep-{{ .Branch }}- # Default branch if above not available - v1-dep-master- - run: npm install - save_cache: key: v1-dep-{{ .Branch }}-{{ epoch }} paths: - ./node_modules - run: npm run test:ci
version: 2 jobs: build: # machine has a misc install of node that is good enough for linting # and docker-compose for running the integration test machine: true steps: - checkout - restore_cache: keys: - v1-dep-{{ .Branch }}- # Default branch if above not available - v1-dep-master- - run: npm install - save_cache: key: v1-dep-{{ .Branch }}-{{ epoch }} paths: - ./node_modules - run: npm run test:ci - - store_test_results: - path: /tmp/circleci-test-results
2
0.095238
0
2
a2e722057ca65babf3bfaa55efb0f927f1030df5
.github/workflows/build-jekyll.yml
.github/workflows/build-jekyll.yml
name: Build and Deploy to Github Pages on: push: branches: - master # Here source code branch is `master`, it could be other branch jobs: build_and_deploy: name: deploy runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v2 # Use GitHub Actions' cache to cache dependencies on servers - name: cache uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- # Use GitHub Deploy Action to build and deploy to Github - name: deploy uses: jeffreytse/jekyll-deploy-action@v0.1.1 with: provider: 'github' token: ${{ secrets.GH_TOKEN }} # It's your Personal Access Token(PAT) repository: '' # Default is current repository branch: 'gh-pages' # Default is gh-pages for github provider jekyll_src: './' # Default is root directory jekyll_cfg: '_config.yml' # Default is _config.yml cname: 'blog.liam.kim' # Default is to not use a cname actor: '' # Default is the GITHUB_ACTOR
name: Build and Deploy to Github Pages on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build_and_deploy: name: deploy runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v2 # Use GitHub Actions' cache to cache dependencies on servers - name: cache uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- # Use GitHub Deploy Action to build and deploy to Github - name: deploy uses: jeffreytse/jekyll-deploy-action@v0.2.1 with: provider: 'github' token: ${{ secrets.GH_TOKEN }} # It's your Personal Access Token(PAT) repository: '' # Default is current repository branch: 'gh-pages' # Default is gh-pages for github provider jekyll_src: './' # Default is root directory jekyll_cfg: '_config.yml' # Default is _config.yml cname: 'blog.liam.kim' # Default is to not use a cname bundler_ver: '>=0' # Default is latest bundler version actor: '' # Default is the GITHUB_ACTOR
Change branch name for deployment
Change branch name for deployment
YAML
mit
appleparan/blog,appleparan/blog,appleparan/blog
yaml
## Code Before: name: Build and Deploy to Github Pages on: push: branches: - master # Here source code branch is `master`, it could be other branch jobs: build_and_deploy: name: deploy runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v2 # Use GitHub Actions' cache to cache dependencies on servers - name: cache uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- # Use GitHub Deploy Action to build and deploy to Github - name: deploy uses: jeffreytse/jekyll-deploy-action@v0.1.1 with: provider: 'github' token: ${{ secrets.GH_TOKEN }} # It's your Personal Access Token(PAT) repository: '' # Default is current repository branch: 'gh-pages' # Default is gh-pages for github provider jekyll_src: './' # Default is root directory jekyll_cfg: '_config.yml' # Default is _config.yml cname: 'blog.liam.kim' # Default is to not use a cname actor: '' # Default is the GITHUB_ACTOR ## Instruction: Change branch name for deployment ## Code After: name: Build and Deploy to Github Pages on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build_and_deploy: name: deploy runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v2 # Use GitHub Actions' cache to cache dependencies on servers - name: cache uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- # Use GitHub Deploy Action to build and deploy to Github - name: deploy uses: jeffreytse/jekyll-deploy-action@v0.2.1 with: provider: 'github' token: ${{ secrets.GH_TOKEN }} # It's your Personal Access Token(PAT) repository: '' # Default is current repository branch: 'gh-pages' # Default is gh-pages for github provider jekyll_src: './' # Default is root directory jekyll_cfg: '_config.yml' # Default is _config.yml cname: 'blog.liam.kim' # Default is to not use a cname bundler_ver: '>=0' # Default is latest bundler version actor: '' # Default is the GITHUB_ACTOR
name: Build and Deploy to Github Pages on: push: - branches: - - master # Here source code branch is `master`, it could be other branch + branches: [ main ] + pull_request: + branches: [ main ] jobs: build_and_deploy: name: deploy runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v2 # Use GitHub Actions' cache to cache dependencies on servers - name: cache uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- # Use GitHub Deploy Action to build and deploy to Github - name: deploy - uses: jeffreytse/jekyll-deploy-action@v0.1.1 ? ^ + uses: jeffreytse/jekyll-deploy-action@v0.2.1 ? ^ with: provider: 'github' token: ${{ secrets.GH_TOKEN }} # It's your Personal Access Token(PAT) repository: '' # Default is current repository branch: 'gh-pages' # Default is gh-pages for github provider jekyll_src: './' # Default is root directory jekyll_cfg: '_config.yml' # Default is _config.yml cname: 'blog.liam.kim' # Default is to not use a cname + bundler_ver: '>=0' # Default is latest bundler version actor: '' # Default is the GITHUB_ACTOR
8
0.216216
5
3
dc9ba66bba24237448ced11dc5cea01616741bbe
test/CMakeLists.txt
test/CMakeLists.txt
set(TEST_TARGET_NAME check_sum_and_diff_test) set(${TEST_TARGET_NAME}_SRC check_sum_and_diff.cpp ) add_executable(${TEST_TARGET_NAME} ${${TEST_TARGET_NAME}_SRC}) target_link_libraries(${TEST_TARGET_NAME} LibTemplateCMake) # Add a test to the project to be run by ctest. # See https://cmake.org/cmake/help/latest/command/add_test.html # See https://cmake.org/cmake/help/latest/manual/ctest.1.html # COMMAND tag specifies the test command-line. If it is an executable target # created by add_executable(), it will automatically be replaced by the location # of the executable created at build time. add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME})
set(TEST_TARGET_NAME check_sum_and_diff_test) set(${TEST_TARGET_NAME}_SRC check_sum_and_diff.cpp ) add_executable(${TEST_TARGET_NAME} ${${TEST_TARGET_NAME}_SRC}) target_link_libraries(${TEST_TARGET_NAME} LibTemplateCMake) # Add a test to the project to be run by ctest. # See https://cmake.org/cmake/help/latest/command/add_test.html # See https://cmake.org/cmake/help/latest/manual/ctest.1.html # COMMAND tag specifies the test command-line. If it is an executable target # created by add_executable(), it will automatically be replaced by the location # of the executable created at build time. add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME} WORKING_DIRECTORY $<TARGET_FILE_DIR:${TEST_TARGET_NAME}>)
Add WORKING_DIRECTORY option in add_test
Add WORKING_DIRECTORY option in add_test
Text
mit
robotology-playground/lib-template-cmake
text
## Code Before: set(TEST_TARGET_NAME check_sum_and_diff_test) set(${TEST_TARGET_NAME}_SRC check_sum_and_diff.cpp ) add_executable(${TEST_TARGET_NAME} ${${TEST_TARGET_NAME}_SRC}) target_link_libraries(${TEST_TARGET_NAME} LibTemplateCMake) # Add a test to the project to be run by ctest. # See https://cmake.org/cmake/help/latest/command/add_test.html # See https://cmake.org/cmake/help/latest/manual/ctest.1.html # COMMAND tag specifies the test command-line. If it is an executable target # created by add_executable(), it will automatically be replaced by the location # of the executable created at build time. add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME}) ## Instruction: Add WORKING_DIRECTORY option in add_test ## Code After: set(TEST_TARGET_NAME check_sum_and_diff_test) set(${TEST_TARGET_NAME}_SRC check_sum_and_diff.cpp ) add_executable(${TEST_TARGET_NAME} ${${TEST_TARGET_NAME}_SRC}) target_link_libraries(${TEST_TARGET_NAME} LibTemplateCMake) # Add a test to the project to be run by ctest. # See https://cmake.org/cmake/help/latest/command/add_test.html # See https://cmake.org/cmake/help/latest/manual/ctest.1.html # COMMAND tag specifies the test command-line. If it is an executable target # created by add_executable(), it will automatically be replaced by the location # of the executable created at build time. add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME} WORKING_DIRECTORY $<TARGET_FILE_DIR:${TEST_TARGET_NAME}>)
set(TEST_TARGET_NAME check_sum_and_diff_test) set(${TEST_TARGET_NAME}_SRC check_sum_and_diff.cpp ) add_executable(${TEST_TARGET_NAME} ${${TEST_TARGET_NAME}_SRC}) target_link_libraries(${TEST_TARGET_NAME} LibTemplateCMake) # Add a test to the project to be run by ctest. # See https://cmake.org/cmake/help/latest/command/add_test.html # See https://cmake.org/cmake/help/latest/manual/ctest.1.html # COMMAND tag specifies the test command-line. If it is an executable target # created by add_executable(), it will automatically be replaced by the location # of the executable created at build time. - add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME}) + add_test(NAME ${TEST_TARGET_NAME} + COMMAND ${TEST_TARGET_NAME} + WORKING_DIRECTORY $<TARGET_FILE_DIR:${TEST_TARGET_NAME}>)
4
0.235294
3
1
5b362013706f78b84bf205c6cf04e31065f7b732
src/main.cpp
src/main.cpp
/* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" int main(int argc, char **argv){ try{ initialize_supported_extensions(); ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id()); return app.exec(); }catch (ApplicationAlreadyRunningException &){ return 0; }catch (NoWindowsException &){ return 0; } }
/* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" #include <QImageReader> int main(int argc, char **argv){ try{ //Set the limit to 1 GiB. QImageReader::setAllocationLimit(1024); initialize_supported_extensions(); ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id()); return app.exec(); }catch (ApplicationAlreadyRunningException &){ return 0; }catch (NoWindowsException &){ return 0; } }
Increase the QImageReader allocation limit.
Increase the QImageReader allocation limit.
C++
bsd-2-clause
Helios-vmg/Borderless,Helios-vmg/Borderless,Helios-vmg/Borderless,Helios-vmg/Borderless
c++
## Code Before: /* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" int main(int argc, char **argv){ try{ initialize_supported_extensions(); ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id()); return app.exec(); }catch (ApplicationAlreadyRunningException &){ return 0; }catch (NoWindowsException &){ return 0; } } ## Instruction: Increase the QImageReader allocation limit. ## Code After: /* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" #include <QImageReader> int main(int argc, char **argv){ try{ //Set the limit to 1 GiB. QImageReader::setAllocationLimit(1024); initialize_supported_extensions(); ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id()); return app.exec(); }catch (ApplicationAlreadyRunningException &){ return 0; }catch (NoWindowsException &){ return 0; } }
/* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" + #include <QImageReader> int main(int argc, char **argv){ try{ + //Set the limit to 1 GiB. + QImageReader::setAllocationLimit(1024); initialize_supported_extensions(); ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id()); return app.exec(); }catch (ApplicationAlreadyRunningException &){ return 0; }catch (NoWindowsException &){ return 0; } }
3
0.15
3
0
83f715d3e9ec8592174632962c6d8de10570c70b
app/assets/stylesheets/header.css.sass
app/assets/stylesheets/header.css.sass
header .navbar-inner padding: 0 1em !important
header .navbar-inner padding: 0 1em !important nav.navbar.navbar-inverse.navbar-fixed-top max-height: 4em
Fix navbar cause the text was in it.
Fix navbar cause the text was in it.
Sass
agpl-3.0
ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub
sass
## Code Before: header .navbar-inner padding: 0 1em !important ## Instruction: Fix navbar cause the text was in it. ## Code After: header .navbar-inner padding: 0 1em !important nav.navbar.navbar-inverse.navbar-fixed-top max-height: 4em
header .navbar-inner padding: 0 1em !important + + nav.navbar.navbar-inverse.navbar-fixed-top + max-height: 4em
3
1
3
0
343eec6ecc04a77cd7e96012359133ae60a8a389
README.markdown
README.markdown
This is the membase engine. Initially, somewhat jokingly, it was called the "eventually persistent" engine. The name stuck, we think mostly because it's easy to say. ## Building You will need a storage-engine capable memcached and its included headers. The easiest way to do this if you don't want to install memcached from source would be to just create a source tree and reference it. ### Building Memcached For example, assume you keep all of your projects in `~/prog/`, you can do this: cd ~/prog git clone -b engine git://github.com/membase/memcached.git cd memcached git checkout engine ./config/autorun.sh ./configure make ### Building the Eventually Persistent Engine cd ~/prog git clone git@github.com:membase/ep-engine.git cd ep-engine ./config/autorun.sh ./configure --with-memcached=$HOME/prog/memcached make ## Running An example invocation using the ep engine from your dev tree and keeping the database in `/tmp/ep.db` looks like this: ~/prog/memcached/memcached -v -E ~/prog/ep-engine/.libs/ep.so \ -e dbname=/tmp/ep.db
This is the Couchbase engine, previously known as the membase engine. Initially, somewhat jokingly, it was called the "eventually persistent" engine. The name stuck, we think mostly because it's easy to say. ## Building You will need a storage-engine capable memcached and its included headers. The easiest way to do this if you don't want to install memcached from source would be to just create a source tree and reference it. ### Building Memcached For example, assume you keep all of your projects in `~/prog/`, you can do this: cd ~/prog git clone -b engine git://github.com/membase/memcached.git cd memcached git checkout engine ./config/autorun.sh ./configure make ### Building the Eventually Persistent Engine cd ~/prog git clone git@github.com:membase/ep-engine.git cd ep-engine ./config/autorun.sh ./configure --with-memcached=$HOME/prog/memcached make ## Running An example invocation using the ep engine from your dev tree and keeping the database in `/tmp/ep.db` looks like this: ~/prog/memcached/memcached -v -E ~/prog/ep-engine/.libs/ep.so \ -e dbname=/tmp/ep.db
Fix the engine name in the readme since we've evolved.
MB-100: Fix the engine name in the readme since we've evolved. Change-Id: Icdd348f34a85bafaa24c24f18c9370dff3e93fc7 Reviewed-on: http://review.couchbase.org/29305 Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com> Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>
Markdown
apache-2.0
sriganes/ep-engine,membase/ep-engine,teligent-ru/ep-engine,hisundar/ep-engine,daverigby/ep-engine,daverigby/kv_engine,daverigby/ep-engine,couchbase/ep-engine,sriganes/ep-engine,daverigby/kv_engine,owendCB/ep-engine,couchbase/ep-engine,teligent-ru/ep-engine,jimwwalker/ep-engine,daverigby/kv_engine,hisundar/ep-engine,teligent-ru/ep-engine,sriganes/ep-engine,couchbase/ep-engine,teligent-ru/ep-engine,daverigby/ep-engine,membase/ep-engine,jimwwalker/ep-engine,owendCB/ep-engine,sriganes/ep-engine,hisundar/ep-engine,membase/ep-engine,daverigby/ep-engine,owendCB/ep-engine,hisundar/ep-engine,owendCB/ep-engine,jimwwalker/ep-engine,couchbase/ep-engine,membase/ep-engine,jimwwalker/ep-engine,daverigby/kv_engine
markdown
## Code Before: This is the membase engine. Initially, somewhat jokingly, it was called the "eventually persistent" engine. The name stuck, we think mostly because it's easy to say. ## Building You will need a storage-engine capable memcached and its included headers. The easiest way to do this if you don't want to install memcached from source would be to just create a source tree and reference it. ### Building Memcached For example, assume you keep all of your projects in `~/prog/`, you can do this: cd ~/prog git clone -b engine git://github.com/membase/memcached.git cd memcached git checkout engine ./config/autorun.sh ./configure make ### Building the Eventually Persistent Engine cd ~/prog git clone git@github.com:membase/ep-engine.git cd ep-engine ./config/autorun.sh ./configure --with-memcached=$HOME/prog/memcached make ## Running An example invocation using the ep engine from your dev tree and keeping the database in `/tmp/ep.db` looks like this: ~/prog/memcached/memcached -v -E ~/prog/ep-engine/.libs/ep.so \ -e dbname=/tmp/ep.db ## Instruction: MB-100: Fix the engine name in the readme since we've evolved. Change-Id: Icdd348f34a85bafaa24c24f18c9370dff3e93fc7 Reviewed-on: http://review.couchbase.org/29305 Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com> Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com> ## Code After: This is the Couchbase engine, previously known as the membase engine. Initially, somewhat jokingly, it was called the "eventually persistent" engine. The name stuck, we think mostly because it's easy to say. ## Building You will need a storage-engine capable memcached and its included headers. The easiest way to do this if you don't want to install memcached from source would be to just create a source tree and reference it. ### Building Memcached For example, assume you keep all of your projects in `~/prog/`, you can do this: cd ~/prog git clone -b engine git://github.com/membase/memcached.git cd memcached git checkout engine ./config/autorun.sh ./configure make ### Building the Eventually Persistent Engine cd ~/prog git clone git@github.com:membase/ep-engine.git cd ep-engine ./config/autorun.sh ./configure --with-memcached=$HOME/prog/memcached make ## Running An example invocation using the ep engine from your dev tree and keeping the database in `/tmp/ep.db` looks like this: ~/prog/memcached/memcached -v -E ~/prog/ep-engine/.libs/ep.so \ -e dbname=/tmp/ep.db
- This is the membase engine. Initially, somewhat jokingly, it was - called the "eventually persistent" engine. The name stuck, we think - mostly because it's easy to say. + This is the Couchbase engine, previously known as the membase engine. + Initially, somewhat jokingly, it was called the "eventually + persistent" engine. The name stuck, we think mostly because it's easy + to say. ## Building You will need a storage-engine capable memcached and its included headers. The easiest way to do this if you don't want to install memcached from source would be to just create a source tree and reference it. ### Building Memcached For example, assume you keep all of your projects in `~/prog/`, you can do this: cd ~/prog git clone -b engine git://github.com/membase/memcached.git cd memcached git checkout engine ./config/autorun.sh ./configure make ### Building the Eventually Persistent Engine cd ~/prog git clone git@github.com:membase/ep-engine.git cd ep-engine ./config/autorun.sh ./configure --with-memcached=$HOME/prog/memcached make ## Running An example invocation using the ep engine from your dev tree and keeping the database in `/tmp/ep.db` looks like this: ~/prog/memcached/memcached -v -E ~/prog/ep-engine/.libs/ep.so \ -e dbname=/tmp/ep.db
7
0.166667
4
3
300c97de3b31b7e14d658102df683b8feb86a905
.travis.yml
.travis.yml
language: ruby sudo: false rvm: - 2.0.0 - 2.1 - 2.2 - 2.3.0 - 2.4.0 - ruby-head - jruby-head before_install: gem update --remote bundler && bundle --version install: - bundle install --retry=3 script: - bundle exec rspec - PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} bundle exec pronto run -f github_status github_pr -c origin/master matrix: fast_finish: true allow_failures: - rvm: ruby-head - rvm: jruby-head
language: ruby sudo: false rvm: - 2.2 - 2.3.0 - 2.4.0 - ruby-head - jruby-head before_install: gem update --remote bundler && bundle --version install: - bundle install --retry=3 script: - bundle exec rspec - PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} bundle exec pronto run -f github_status github_pr -c origin/master matrix: fast_finish: true allow_failures: - rvm: ruby-head - rvm: jruby-head
Drop 2.0 and 2.1 builds b/c neither are officially maintained anymore
Drop 2.0 and 2.1 builds b/c neither are officially maintained anymore
YAML
mit
Skookum/bamboozled
yaml
## Code Before: language: ruby sudo: false rvm: - 2.0.0 - 2.1 - 2.2 - 2.3.0 - 2.4.0 - ruby-head - jruby-head before_install: gem update --remote bundler && bundle --version install: - bundle install --retry=3 script: - bundle exec rspec - PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} bundle exec pronto run -f github_status github_pr -c origin/master matrix: fast_finish: true allow_failures: - rvm: ruby-head - rvm: jruby-head ## Instruction: Drop 2.0 and 2.1 builds b/c neither are officially maintained anymore ## Code After: language: ruby sudo: false rvm: - 2.2 - 2.3.0 - 2.4.0 - ruby-head - jruby-head before_install: gem update --remote bundler && bundle --version install: - bundle install --retry=3 script: - bundle exec rspec - PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} bundle exec pronto run -f github_status github_pr -c origin/master matrix: fast_finish: true allow_failures: - rvm: ruby-head - rvm: jruby-head
language: ruby sudo: false rvm: - - 2.0.0 - - 2.1 - 2.2 - 2.3.0 - 2.4.0 - ruby-head - jruby-head before_install: gem update --remote bundler && bundle --version install: - bundle install --retry=3 script: - bundle exec rspec - PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} bundle exec pronto run -f github_status github_pr -c origin/master matrix: fast_finish: true allow_failures: - rvm: ruby-head - rvm: jruby-head
2
0.083333
0
2
051b4642ea7af96560b8629bfe32273ca9a15735
plugin/githubissues.vim
plugin/githubissues.vim
" File: github-issues.vim " Version: 3.0.0b " Description: Pulls github issues into Vim " Maintainer: Jonathan Warner <jaxbot@gmail.com> <http://github.com/jaxbot> " Homepage: http://jaxbot.me/ " Repository: https://github.com/jaxbot/github-issues.vim " License: Copyright (C) 2014 Jonathan Warner " Released under the MIT license " ====================================================================== " do not load twice if exists("g:github_issues_loaded") || &cp finish endif let g:github_issues_loaded = 1 " do not continue if Vim is not compiled with Python2.7 support if !has("python") echo "github-issues.vim requires Python support." finish endif python <<EOF from os import path as p import sys import vim # generate path that needs to base_path = p.abspath(p.join(vim.eval("expand('<sfile>:p:h')"), "..")) sys.path.append(base_path) # print lib_path from lib.issue_list import IssueList from lib.issue import Issue EOF " create issue list command! -nargs=* Gissues :python IssueList.show_issues(<f-args>) " create a new issue command! -nargs=* Gissue :python Issue.open(<f-args>)
" File: github-issues.vim " Version: 3.0.0b " Description: Pulls github issues into Vim " Maintainer: Jonathan Warner <jaxbot@gmail.com> <http://github.com/jaxbot> " Homepage: http://jaxbot.me/ " Repository: https://github.com/jaxbot/github-issues.vim " License: Copyright (C) 2014 Jonathan Warner " Released under the MIT license " ====================================================================== " do not load twice if exists("g:github_issues_loaded") || &cp finish endif let g:github_issues_loaded = 1 " do not continue if Vim is not compiled with Python2.7 support if !has("python") echo "github-issues.vim requires Python support." finish endif python <<EOF from os import path as p import sys import vim import imp # generate path that needs to base_path = p.abspath(p.join(vim.eval("expand('<sfile>:p:h')"), "../lib")) sys.path.insert(0, base_path) import issue import issue_list def reload_vimhub(): imp.reload(issue) imp.reload(issue_list) EOF " create issue list command! -nargs=* Gissues :python issue_list.IssueList.show_issues(<f-args>) " create a new issue command! -nargs=* Gissue :python issue.Issue.open(<f-args>) " reload module command! VimHubReload :python reload_vimhub()
Rebuild out plugin front-facing api and include reload ability. Make development a lot easier!!
Rebuild out plugin front-facing api and include reload ability. Make development a lot easier!!
VimL
mit
jonmorehouse/vimhub
viml
## Code Before: " File: github-issues.vim " Version: 3.0.0b " Description: Pulls github issues into Vim " Maintainer: Jonathan Warner <jaxbot@gmail.com> <http://github.com/jaxbot> " Homepage: http://jaxbot.me/ " Repository: https://github.com/jaxbot/github-issues.vim " License: Copyright (C) 2014 Jonathan Warner " Released under the MIT license " ====================================================================== " do not load twice if exists("g:github_issues_loaded") || &cp finish endif let g:github_issues_loaded = 1 " do not continue if Vim is not compiled with Python2.7 support if !has("python") echo "github-issues.vim requires Python support." finish endif python <<EOF from os import path as p import sys import vim # generate path that needs to base_path = p.abspath(p.join(vim.eval("expand('<sfile>:p:h')"), "..")) sys.path.append(base_path) # print lib_path from lib.issue_list import IssueList from lib.issue import Issue EOF " create issue list command! -nargs=* Gissues :python IssueList.show_issues(<f-args>) " create a new issue command! -nargs=* Gissue :python Issue.open(<f-args>) ## Instruction: Rebuild out plugin front-facing api and include reload ability. Make development a lot easier!! ## Code After: " File: github-issues.vim " Version: 3.0.0b " Description: Pulls github issues into Vim " Maintainer: Jonathan Warner <jaxbot@gmail.com> <http://github.com/jaxbot> " Homepage: http://jaxbot.me/ " Repository: https://github.com/jaxbot/github-issues.vim " License: Copyright (C) 2014 Jonathan Warner " Released under the MIT license " ====================================================================== " do not load twice if exists("g:github_issues_loaded") || &cp finish endif let g:github_issues_loaded = 1 " do not continue if Vim is not compiled with Python2.7 support if !has("python") echo "github-issues.vim requires Python support." finish endif python <<EOF from os import path as p import sys import vim import imp # generate path that needs to base_path = p.abspath(p.join(vim.eval("expand('<sfile>:p:h')"), "../lib")) sys.path.insert(0, base_path) import issue import issue_list def reload_vimhub(): imp.reload(issue) imp.reload(issue_list) EOF " create issue list command! -nargs=* Gissues :python issue_list.IssueList.show_issues(<f-args>) " create a new issue command! -nargs=* Gissue :python issue.Issue.open(<f-args>) " reload module command! VimHubReload :python reload_vimhub()
" File: github-issues.vim " Version: 3.0.0b " Description: Pulls github issues into Vim " Maintainer: Jonathan Warner <jaxbot@gmail.com> <http://github.com/jaxbot> " Homepage: http://jaxbot.me/ " Repository: https://github.com/jaxbot/github-issues.vim " License: Copyright (C) 2014 Jonathan Warner " Released under the MIT license " ====================================================================== " do not load twice if exists("g:github_issues_loaded") || &cp finish endif let g:github_issues_loaded = 1 " do not continue if Vim is not compiled with Python2.7 support if !has("python") echo "github-issues.vim requires Python support." finish endif python <<EOF from os import path as p import sys import vim + import imp # generate path that needs to - base_path = p.abspath(p.join(vim.eval("expand('<sfile>:p:h')"), "..")) + base_path = p.abspath(p.join(vim.eval("expand('<sfile>:p:h')"), "../lib")) ? ++++ - sys.path.append(base_path) ? ^^^ ^^ + sys.path.insert(0, base_path) ? ^^^ ^^ +++ - # print lib_path - from lib.issue_list import IssueList - from lib.issue import Issue + import issue + import issue_list + + def reload_vimhub(): + imp.reload(issue) + imp.reload(issue_list) EOF " create issue list - command! -nargs=* Gissues :python IssueList.show_issues(<f-args>) + command! -nargs=* Gissues :python issue_list.IssueList.show_issues(<f-args>) ? +++++++++++ " create a new issue - command! -nargs=* Gissue :python Issue.open(<f-args>) + command! -nargs=* Gissue :python issue.Issue.open(<f-args>) ? ++++++ + " reload module + command! VimHubReload :python reload_vimhub() +
21
0.488372
14
7
2d5152e72e1813ee7bf040f4033d369d60a44cc2
pipeline/compute_rpp/compute_rpp.py
pipeline/compute_rpp/compute_rpp.py
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of all the *.fit files present inside that directory # Create a list with the files to considered filenames = [] for root, dirs, files in os.walk(data_path): for file in files: if file.endswith('.fit'): filenames.append(os.path.join(root, file)) max_duration_rpp = 30 rpp_rider = Rpp(max_duration_rpp=max_duration_rpp) # Open each file and fit for idx_file, filename in enumerate(filenames): print 'Process file #{} over {}'.format(idx_file+1, len(filenames)) # Open the file power_ride = load_power_from_fit(filename) # Fit the ride rpp_rider.fit(power_ride) # Create a directory to store the data if it is not existing if not os.path.exists(storage_path): os.makedirs(storage_path) # Store the data somewhere np.save(os.path.join(storage_path, 'profile.npy'), rpp_rider.rpp_)
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.restoration import denoise from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of all the *.fit files present inside that directory # Create a list with the files to considered filenames = [] for root, dirs, files in os.walk(data_path): for file in files: if file.endswith('.fit'): filenames.append(os.path.join(root, file)) max_duration_rpp = 30 rpp_rider = Rpp(max_duration_rpp=max_duration_rpp) # Open each file and fit for idx_file, filename in enumerate(filenames): print 'Process file #{} over {}'.format(idx_file+1, len(filenames)) # Open the file power_ride = load_power_from_fit(filename) # Reject the outliers using thresholding method power_ride = denoise.outliers_rejection(power_ride) # Fit the ride rpp_rider.fit(power_ride) # Create a directory to store the data if it is not existing if not os.path.exists(storage_path): os.makedirs(storage_path) # Store the data somewhere np.save(os.path.join(storage_path, 'profile.npy'), rpp_rider.rpp_)
Update the pipeline to take into account the outlier rejection method to compute the RPP
Update the pipeline to take into account the outlier rejection method to compute the RPP
Python
mit
glemaitre/power-profile,glemaitre/power-profile,clemaitre58/power-profile,clemaitre58/power-profile
python
## Code Before: import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of all the *.fit files present inside that directory # Create a list with the files to considered filenames = [] for root, dirs, files in os.walk(data_path): for file in files: if file.endswith('.fit'): filenames.append(os.path.join(root, file)) max_duration_rpp = 30 rpp_rider = Rpp(max_duration_rpp=max_duration_rpp) # Open each file and fit for idx_file, filename in enumerate(filenames): print 'Process file #{} over {}'.format(idx_file+1, len(filenames)) # Open the file power_ride = load_power_from_fit(filename) # Fit the ride rpp_rider.fit(power_ride) # Create a directory to store the data if it is not existing if not os.path.exists(storage_path): os.makedirs(storage_path) # Store the data somewhere np.save(os.path.join(storage_path, 'profile.npy'), rpp_rider.rpp_) ## Instruction: Update the pipeline to take into account the outlier rejection method to compute the RPP ## Code After: import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.restoration import denoise from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of all the *.fit files present inside that directory # Create a list with the files to considered filenames = [] for root, dirs, files in os.walk(data_path): for file in files: if file.endswith('.fit'): filenames.append(os.path.join(root, file)) max_duration_rpp = 30 rpp_rider = Rpp(max_duration_rpp=max_duration_rpp) # Open each file and fit for idx_file, filename in enumerate(filenames): print 'Process file #{} over {}'.format(idx_file+1, len(filenames)) # Open the file power_ride = load_power_from_fit(filename) # Reject the outliers using thresholding method power_ride = denoise.outliers_rejection(power_ride) # Fit the ride rpp_rider.fit(power_ride) # Create a directory to store the data if it is not existing if not os.path.exists(storage_path): os.makedirs(storage_path) # Store the data somewhere np.save(os.path.join(storage_path, 'profile.npy'), rpp_rider.rpp_)
import sys import os import numpy as np from skcycling.utils import load_power_from_fit + from skcycling.restoration import denoise from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of all the *.fit files present inside that directory # Create a list with the files to considered filenames = [] for root, dirs, files in os.walk(data_path): for file in files: if file.endswith('.fit'): filenames.append(os.path.join(root, file)) max_duration_rpp = 30 rpp_rider = Rpp(max_duration_rpp=max_duration_rpp) # Open each file and fit for idx_file, filename in enumerate(filenames): print 'Process file #{} over {}'.format(idx_file+1, len(filenames)) # Open the file power_ride = load_power_from_fit(filename) + # Reject the outliers using thresholding method + power_ride = denoise.outliers_rejection(power_ride) # Fit the ride rpp_rider.fit(power_ride) # Create a directory to store the data if it is not existing if not os.path.exists(storage_path): os.makedirs(storage_path) # Store the data somewhere np.save(os.path.join(storage_path, 'profile.npy'), rpp_rider.rpp_)
3
0.081081
3
0
2cc1a08db1ee19d1b73fe43013ec68a0ae3845f5
library/etc/group_spec.rb
library/etc/group_spec.rb
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/windows', __FILE__) require 'etc' describe "Etc.group" do it_behaves_like(:etc_on_windows, :group) end
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/windows', __FILE__) require 'etc' describe "Etc.group" do it_behaves_like(:etc_on_windows, :group) it "raises a RuntimeError for parallel iteration" do proc { Etc.group do | group | Etc.group do | group2 | end end }.should raise_error(RuntimeError) end end
Add spec for parallel group iteration
Add spec for parallel group iteration Spec is shamelessly taken from #1149 by @cwgem. This way it's ensured it is run and don't have to wait for a Rubyspec pull request.
Ruby
mit
JuanitoFatas/rubyspec,yaauie/rubyspec,ericmeyer/rubyspec,kidaa/rubyspec,bomatson/rubyspec,scooter-dangle/rubyspec,iainbeeston/rubyspec,chesterbr/rubyspec,kachick/rubyspec,BanzaiMan/rubyspec,amarshall/rubyspec,flavio/rubyspec,BanzaiMan/rubyspec,mrkn/rubyspec,alindeman/rubyspec,lucaspinto/rubyspec,Zoxc/rubyspec,flavio/rubyspec,josedonizetti/rubyspec,DawidJanczak/rubyspec,kidaa/rubyspec,ericmeyer/rubyspec,bl4ckdu5t/rubyspec,shirosaki/rubyspec,nevir/rubyspec,yb66/rubyspec,yaauie/rubyspec,DawidJanczak/rubyspec,saturnflyer/rubyspec,shirosaki/rubyspec,sferik/rubyspec,no6v/rubyspec,teleological/rubyspec,ruby/rubyspec,sgarciac/spec,yous/rubyspec,ruby/rubyspec,eregon/rubyspec,alexch/rubyspec,Zoxc/rubyspec,mrkn/rubyspec,benlovell/rubyspec,jannishuebl/rubyspec,neomadara/rubyspec,no6v/rubyspec,lucaspinto/rubyspec,chesterbr/rubyspec,wied03/rubyspec,iainbeeston/rubyspec,JuanitoFatas/rubyspec,benlovell/rubyspec,alexch/rubyspec,askl56/rubyspec,iliabylich/rubyspec,atambo/rubyspec,atambo/rubyspec,nobu/rubyspec,eregon/rubyspec,josedonizetti/rubyspec,rkh/rubyspec,saturnflyer/rubyspec,askl56/rubyspec,eregon/rubyspec,nobu/rubyspec,scooter-dangle/rubyspec,rdp/rubyspec,rkh/rubyspec,sferik/rubyspec,jvshahid/rubyspec,Aesthetikx/rubyspec,markburns/rubyspec,teleological/rubyspec,jannishuebl/rubyspec,iliabylich/rubyspec,alex/rubyspec,alex/rubyspec,mbj/rubyspec,jstepien/rubyspec,amarshall/rubyspec,kachick/rubyspec,neomadara/rubyspec,sgarciac/spec,agrimm/rubyspec,agrimm/rubyspec,wied03/rubyspec,jvshahid/rubyspec,DavidEGrayson/rubyspec,nevir/rubyspec,rdp/rubyspec,wied03/rubyspec,ruby/spec,yous/rubyspec,kachick/rubyspec,jstepien/rubyspec,alindeman/rubyspec,ruby/spec,yb66/rubyspec,sgarciac/spec,bl4ckdu5t/rubyspec,mbj/rubyspec,markburns/rubyspec,ruby/spec,nobu/rubyspec,Aesthetikx/rubyspec,DavidEGrayson/rubyspec,bomatson/rubyspec
ruby
## Code Before: require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/windows', __FILE__) require 'etc' describe "Etc.group" do it_behaves_like(:etc_on_windows, :group) end ## Instruction: Add spec for parallel group iteration Spec is shamelessly taken from #1149 by @cwgem. This way it's ensured it is run and don't have to wait for a Rubyspec pull request. ## Code After: require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/windows', __FILE__) require 'etc' describe "Etc.group" do it_behaves_like(:etc_on_windows, :group) it "raises a RuntimeError for parallel iteration" do proc { Etc.group do | group | Etc.group do | group2 | end end }.should raise_error(RuntimeError) end end
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/windows', __FILE__) require 'etc' describe "Etc.group" do it_behaves_like(:etc_on_windows, :group) + + it "raises a RuntimeError for parallel iteration" do + proc { + Etc.group do | group | + Etc.group do | group2 | + end + end + }.should raise_error(RuntimeError) + end + end
10
1.428571
10
0
0b3499f274a828474ee18979e5b7959cb8ec86c8
public/assets/js/main.js
public/assets/js/main.js
/** * main.js * * Author: Marian Friedmann * */ $(function() { });
/** * main.js * * Author: Marian Friedmann * */ $(function() { $('.modal-open').click(function() { $('.modal').addClass('modal--active'); }); $('.modal-loading').click(function() { $('.modal').removeClass('modal--active'); $('.modal').addClass('modal--loading'); }); $('.modal-close').click(function() { $('.modal').removeClass('modal--active'); $('.modal').removeClass('modal--loading'); }); });
Add modal dummy open/close function
Add modal dummy open/close function
JavaScript
mit
cam5/hostkeeper,frdmn/hostkeeper,cam5/hostkeeper,cam5/hostkeeper,frdmn/hostkeeper,frdmn/hostkeeper
javascript
## Code Before: /** * main.js * * Author: Marian Friedmann * */ $(function() { }); ## Instruction: Add modal dummy open/close function ## Code After: /** * main.js * * Author: Marian Friedmann * */ $(function() { $('.modal-open').click(function() { $('.modal').addClass('modal--active'); }); $('.modal-loading').click(function() { $('.modal').removeClass('modal--active'); $('.modal').addClass('modal--loading'); }); $('.modal-close').click(function() { $('.modal').removeClass('modal--active'); $('.modal').removeClass('modal--loading'); }); });
/** * main.js * * Author: Marian Friedmann * */ $(function() { + $('.modal-open').click(function() { + $('.modal').addClass('modal--active'); + }); + $('.modal-loading').click(function() { + $('.modal').removeClass('modal--active'); + $('.modal').addClass('modal--loading'); + }); + + $('.modal-close').click(function() { + $('.modal').removeClass('modal--active'); + $('.modal').removeClass('modal--loading'); + }); });
12
1.2
12
0
92960c89d5b534e68eb2acb66d225bc4b303355b
README.md
README.md
Automatically assigns mnemonics to menu items and toolbar elements. Use it just like MnemonicSetter.INSTANCE.setComponentMnemonics(menubar, toolbar). All items belonging to given elements are given different mnemonic letters if possible. You can also attach it to a popup menu as a PopupMenuListener so that mnemonics are automatically calculated when the popup menu becomes visible.
Automatically assigns mnemonics to menu items and toolbar elements. Use it just like `MnemonicSetter.INSTANCE.setComponentMnemonics(menubar, toolbar)`. All items belonging to given elements are given different mnemonic letters if possible. You can also attach it to a popup menu as a PopupMenuListener so that mnemonics are automatically calculated when the popup menu becomes visible. ##Maven ``` <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>bintray-freeplane-maven</id> <name>bintray</name> <url>https://dl.bintray.com/freeplane/freeplane</url> </repository> <dependency> <groupId>org.dpolivaev.mnemonicsetter</groupId> <artifactId>mnemonicsetter</artifactId> <version>0.4</version> <type>pom</type> </dependency> ``` ##Gradle ``` repositories { maven { url "http://dl.bintray.com/freeplane/freeplane" } } dependencies { compile 'org.dpolivaev.mnemonicsetter:mnemonicsetter:0.4' } ```
Add maven and gradle repository information
Add maven and gradle repository information
Markdown
apache-2.0
dpolivaev/mnemonicsetter
markdown
## Code Before: Automatically assigns mnemonics to menu items and toolbar elements. Use it just like MnemonicSetter.INSTANCE.setComponentMnemonics(menubar, toolbar). All items belonging to given elements are given different mnemonic letters if possible. You can also attach it to a popup menu as a PopupMenuListener so that mnemonics are automatically calculated when the popup menu becomes visible. ## Instruction: Add maven and gradle repository information ## Code After: Automatically assigns mnemonics to menu items and toolbar elements. Use it just like `MnemonicSetter.INSTANCE.setComponentMnemonics(menubar, toolbar)`. All items belonging to given elements are given different mnemonic letters if possible. You can also attach it to a popup menu as a PopupMenuListener so that mnemonics are automatically calculated when the popup menu becomes visible. ##Maven ``` <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>bintray-freeplane-maven</id> <name>bintray</name> <url>https://dl.bintray.com/freeplane/freeplane</url> </repository> <dependency> <groupId>org.dpolivaev.mnemonicsetter</groupId> <artifactId>mnemonicsetter</artifactId> <version>0.4</version> <type>pom</type> </dependency> ``` ##Gradle ``` repositories { maven { url "http://dl.bintray.com/freeplane/freeplane" } } dependencies { compile 'org.dpolivaev.mnemonicsetter:mnemonicsetter:0.4' } ```
Automatically assigns mnemonics to menu items and toolbar elements. - Use it just like MnemonicSetter.INSTANCE.setComponentMnemonics(menubar, toolbar). + Use it just like `MnemonicSetter.INSTANCE.setComponentMnemonics(menubar, toolbar)`. ? + + All items belonging to given elements are given different mnemonic letters if possible. You can also attach it to a popup menu as a PopupMenuListener so that mnemonics are automatically calculated when the popup menu becomes visible. + + ##Maven + ``` + <repository> + <snapshots> + <enabled>false</enabled> + </snapshots> + <id>bintray-freeplane-maven</id> + <name>bintray</name> + <url>https://dl.bintray.com/freeplane/freeplane</url> + </repository> + + + <dependency> + <groupId>org.dpolivaev.mnemonicsetter</groupId> + <artifactId>mnemonicsetter</artifactId> + <version>0.4</version> + <type>pom</type> + </dependency> + ``` + + ##Gradle + ``` + repositories { + maven { url "http://dl.bintray.com/freeplane/freeplane" } + } + + dependencies { + compile 'org.dpolivaev.mnemonicsetter:mnemonicsetter:0.4' + } + ```
33
4.714286
32
1
669594622ba9933605bc1fdac546eb5433ba836c
lib/plugins/mnet.rb
lib/plugins/mnet.rb
require 'nokogiri' require 'open-uri' module Cinch module Plugins class Mnet include Cinch::Plugin match /(mnet)$/ match /(mnet) (.+)/, method: :with_num match /(help mnet)$/, method: :help def execute(m) num = 1 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) title = page.css('a.MMLI_Song')[num].text artist = page.css('div.MMLITitle_Info')[num].css('a.MMLIInfo_Artist').text date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def with_num(m, prefix, mnet, num) return m.reply 'invalid num bru' if num.to_i < 1 return m.reply 'less than 51 bru' if num.to_i > 50 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) title = page.css('a.MMLI_Song')[num.to_i].text artist = page.css('div.MMLITitle_Info')[num.to_i].css('a.MMLIInfo_Artist').text date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def help(m) m.reply 'returns current song at specified mnet rank' end end end end
require 'nokogiri' require 'open-uri' module Cinch module Plugins class Mnet include Cinch::Plugin match /(mnet)$/ match /(mnet) (.+)/, method: :with_num match /(help mnet)$/, method: :help def execute(m) with_num(m, '.', 'mnet', 1) end def with_num(m, prefix, mnet, num) return m.reply 'invalid num bru' if num.to_i < 1 return m.reply 'less than 51 bru' if num.to_i > 50 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) title = page.css('a.MMLI_Song')[num.to_i - 1].text artist = page.css('div.MMLITitle_Info')[num.to_i - 1].css('a.MMLIInfo_Artist').text date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def help(m) m.reply 'returns current song at specified mnet rank' end end end end
Correct index for song at specified rank
Correct index for song at specified rank
Ruby
mit
dhanesana/yongBot
ruby
## Code Before: require 'nokogiri' require 'open-uri' module Cinch module Plugins class Mnet include Cinch::Plugin match /(mnet)$/ match /(mnet) (.+)/, method: :with_num match /(help mnet)$/, method: :help def execute(m) num = 1 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) title = page.css('a.MMLI_Song')[num].text artist = page.css('div.MMLITitle_Info')[num].css('a.MMLIInfo_Artist').text date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def with_num(m, prefix, mnet, num) return m.reply 'invalid num bru' if num.to_i < 1 return m.reply 'less than 51 bru' if num.to_i > 50 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) title = page.css('a.MMLI_Song')[num.to_i].text artist = page.css('div.MMLITitle_Info')[num.to_i].css('a.MMLIInfo_Artist').text date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def help(m) m.reply 'returns current song at specified mnet rank' end end end end ## Instruction: Correct index for song at specified rank ## Code After: require 'nokogiri' require 'open-uri' module Cinch module Plugins class Mnet include Cinch::Plugin match /(mnet)$/ match /(mnet) (.+)/, method: :with_num match /(help mnet)$/, method: :help def execute(m) with_num(m, '.', 'mnet', 1) end def with_num(m, prefix, mnet, num) return m.reply 'invalid num bru' if num.to_i < 1 return m.reply 'less than 51 bru' if num.to_i > 50 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) title = page.css('a.MMLI_Song')[num.to_i - 1].text artist = page.css('div.MMLITitle_Info')[num.to_i - 1].css('a.MMLIInfo_Artist').text date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def help(m) m.reply 'returns current song at specified mnet rank' end end end end
require 'nokogiri' require 'open-uri' module Cinch module Plugins class Mnet include Cinch::Plugin match /(mnet)$/ match /(mnet) (.+)/, method: :with_num match /(help mnet)$/, method: :help def execute(m) + with_num(m, '.', 'mnet', 1) - num = 1 - page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) - title = page.css('a.MMLI_Song')[num].text - artist = page.css('div.MMLITitle_Info')[num].css('a.MMLIInfo_Artist').text - date = page.css('ul.date li.day span.num_set2').text - m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def with_num(m, prefix, mnet, num) return m.reply 'invalid num bru' if num.to_i < 1 return m.reply 'less than 51 bru' if num.to_i > 50 page = Nokogiri::HTML(open("http://www.mnet.com/chart/top100/")) - title = page.css('a.MMLI_Song')[num.to_i].text + title = page.css('a.MMLI_Song')[num.to_i - 1].text ? ++++ - artist = page.css('div.MMLITitle_Info')[num.to_i].css('a.MMLIInfo_Artist').text + artist = page.css('div.MMLITitle_Info')[num.to_i - 1].css('a.MMLIInfo_Artist').text ? ++++ date = page.css('ul.date li.day span.num_set2').text m.reply "Mnet Rank #{num}: #{artist} - #{title} | #{date}" end def help(m) m.reply 'returns current song at specified mnet rank' end end end end
11
0.289474
3
8
40a21f8df43badd2841a6157825f51b402501be2
spec/shoes/radio_spec.rb
spec/shoes/radio_spec.rb
require 'shoes/spec_helper' describe Shoes::Radio do include_context "dsl app" subject(:radio) { Shoes::Radio.new(app, parent, group, input_opts, input_block) } let(:group) { :a_group } it_behaves_like "checkable" it_behaves_like "object with state" # only one radio in a group can be checked describe "#initialize" do it "sets accessors" do subject.parent.should == parent subject.group.should == group subject.blk.should == input_block end end describe "#group=" do it "changes the group" do subject.group = "New Group" subject.group.should == "New Group" end end end
require 'shoes/spec_helper' describe Shoes::Radio do include_context "dsl app" subject(:radio) { Shoes::Radio.new(app, parent, group, input_opts, input_block) } let(:group) { :a_group } it_behaves_like "checkable" it_behaves_like "object with state" # only one radio in a group can be checked describe "#initialize" do it "sets accessors" do expect(radio.parent).to eq(parent) expect(radio.group).to eq(group) expect(radio.blk).to eq(input_block) end end describe "#group=" do it "changes the group" do radio.group = "New Group" expect(radio.group).to eq("New Group") end end end
Update Radio specs to expect syntax
Update Radio specs to expect syntax
Ruby
apache-2.0
thescientician/lightning-timer,thescientician/lightning-timer,thescientician/lightning-timer
ruby
## Code Before: require 'shoes/spec_helper' describe Shoes::Radio do include_context "dsl app" subject(:radio) { Shoes::Radio.new(app, parent, group, input_opts, input_block) } let(:group) { :a_group } it_behaves_like "checkable" it_behaves_like "object with state" # only one radio in a group can be checked describe "#initialize" do it "sets accessors" do subject.parent.should == parent subject.group.should == group subject.blk.should == input_block end end describe "#group=" do it "changes the group" do subject.group = "New Group" subject.group.should == "New Group" end end end ## Instruction: Update Radio specs to expect syntax ## Code After: require 'shoes/spec_helper' describe Shoes::Radio do include_context "dsl app" subject(:radio) { Shoes::Radio.new(app, parent, group, input_opts, input_block) } let(:group) { :a_group } it_behaves_like "checkable" it_behaves_like "object with state" # only one radio in a group can be checked describe "#initialize" do it "sets accessors" do expect(radio.parent).to eq(parent) expect(radio.group).to eq(group) expect(radio.blk).to eq(input_block) end end describe "#group=" do it "changes the group" do radio.group = "New Group" expect(radio.group).to eq("New Group") end end end
require 'shoes/spec_helper' describe Shoes::Radio do include_context "dsl app" subject(:radio) { Shoes::Radio.new(app, parent, group, input_opts, input_block) } let(:group) { :a_group } it_behaves_like "checkable" it_behaves_like "object with state" # only one radio in a group can be checked describe "#initialize" do it "sets accessors" do - subject.parent.should == parent - subject.group.should == group - subject.blk.should == input_block + expect(radio.parent).to eq(parent) + expect(radio.group).to eq(group) + expect(radio.blk).to eq(input_block) end end describe "#group=" do it "changes the group" do - subject.group = "New Group" ? ^^^^^^^ + radio.group = "New Group" ? ^^^^^ - subject.group.should == "New Group" + expect(radio.group).to eq("New Group") end end end
10
0.357143
5
5
54d56946b02789c60fb29097b626a3338288a736
.travis.yml
.travis.yml
language: rust rust: - nightly-2016-08-18 - nightly matrix: allow_failures: - rust: nightly script: scripts/travis_build.sh before_script: - (cargo install xargo || true) - PATH=$PATH:~/.cargo/bin addons: apt: packages: - cmake - libssl-dev sources: - kalakris-cmake
language: rust rust: nightly cache: cargo script: scripts/travis_build.sh before_script: - (cargo install xargo || true) - PATH=$PATH:~/.cargo/bin addons: apt: packages: - cmake - libssl-dev sources: - kalakris-cmake
Remove old stable nightly builds and use only nightly. Cache cargo.
Remove old stable nightly builds and use only nightly. Cache cargo.
YAML
mit
jemtucker/opsys,jemtucker/opsys,jemtucker/opsys
yaml
## Code Before: language: rust rust: - nightly-2016-08-18 - nightly matrix: allow_failures: - rust: nightly script: scripts/travis_build.sh before_script: - (cargo install xargo || true) - PATH=$PATH:~/.cargo/bin addons: apt: packages: - cmake - libssl-dev sources: - kalakris-cmake ## Instruction: Remove old stable nightly builds and use only nightly. Cache cargo. ## Code After: language: rust rust: nightly cache: cargo script: scripts/travis_build.sh before_script: - (cargo install xargo || true) - PATH=$PATH:~/.cargo/bin addons: apt: packages: - cmake - libssl-dev sources: - kalakris-cmake
language: rust + rust: nightly - rust: - - nightly-2016-08-18 - - nightly + cache: cargo - matrix: - allow_failures: - - rust: nightly script: scripts/travis_build.sh before_script: - (cargo install xargo || true) - PATH=$PATH:~/.cargo/bin addons: apt: packages: - cmake - libssl-dev sources: - kalakris-cmake
8
0.347826
2
6
f857fa5c467ba3799064bd7878f64f270df69b08
spec/hotel_matcher_spec.rb
spec/hotel_matcher_spec.rb
require "spec_helper" RSpec.describe "hotel_matcher", type: :aruba do describe "when no user input" do it "should display information message" do run "hotel_matcher" expect(all_stdout).to be == "Wrong usage of program hotel_matcher see --help\n" end end describe "#read user input" do context "when --help flag is given" do it "should display help message" do run "hotel_matcher --help" expect(all_stdout).to be == "Hotel matcher will search for a given hotel name and print its url\nUsage: hotel_matcher hotel-name e.g hotel_matcher \"DoubleTree Hilton Amsterdam\"\n" end end end end
require "spec_helper" RSpec.describe "hotel_matcher", type: :aruba do describe "when no user input" do it "should display information message" do run "hotel_matcher" expect(all_stdout).to be == "Wrong usage of program hotel_matcher see --help\n" end end describe "#read user input" do context "when --help flag is given" do it "should display help message" do run "hotel_matcher --help" expect(all_stdout).to be == "Hotel matcher will search for a given hotel name and print its url\nUsage: hotel_matcher hotel-name e.g hotel_matcher \"DoubleTree Hilton Amsterdam\"\n" end end context "when no hotel is found" do it "should display a 'no result mesage'" do run "hotel_matcher kakaroto" expect(all_stdout).to include "No results for word kakaroto" end end end end
Add test to check 'no result message' is displayed
Add test to check 'no result message' is displayed
Ruby
mit
bronzdoc/olery_gem,bronzdoc/olery_gem
ruby
## Code Before: require "spec_helper" RSpec.describe "hotel_matcher", type: :aruba do describe "when no user input" do it "should display information message" do run "hotel_matcher" expect(all_stdout).to be == "Wrong usage of program hotel_matcher see --help\n" end end describe "#read user input" do context "when --help flag is given" do it "should display help message" do run "hotel_matcher --help" expect(all_stdout).to be == "Hotel matcher will search for a given hotel name and print its url\nUsage: hotel_matcher hotel-name e.g hotel_matcher \"DoubleTree Hilton Amsterdam\"\n" end end end end ## Instruction: Add test to check 'no result message' is displayed ## Code After: require "spec_helper" RSpec.describe "hotel_matcher", type: :aruba do describe "when no user input" do it "should display information message" do run "hotel_matcher" expect(all_stdout).to be == "Wrong usage of program hotel_matcher see --help\n" end end describe "#read user input" do context "when --help flag is given" do it "should display help message" do run "hotel_matcher --help" expect(all_stdout).to be == "Hotel matcher will search for a given hotel name and print its url\nUsage: hotel_matcher hotel-name e.g hotel_matcher \"DoubleTree Hilton Amsterdam\"\n" end end context "when no hotel is found" do it "should display a 'no result mesage'" do run "hotel_matcher kakaroto" expect(all_stdout).to include "No results for word kakaroto" end end end end
require "spec_helper" RSpec.describe "hotel_matcher", type: :aruba do describe "when no user input" do it "should display information message" do run "hotel_matcher" expect(all_stdout).to be == "Wrong usage of program hotel_matcher see --help\n" end end describe "#read user input" do context "when --help flag is given" do it "should display help message" do run "hotel_matcher --help" expect(all_stdout).to be == "Hotel matcher will search for a given hotel name and print its url\nUsage: hotel_matcher hotel-name e.g hotel_matcher \"DoubleTree Hilton Amsterdam\"\n" end end + + context "when no hotel is found" do + it "should display a 'no result mesage'" do + run "hotel_matcher kakaroto" + expect(all_stdout).to include "No results for word kakaroto" + end + end end end
7
0.368421
7
0
a01105102d379f1588bca915e6c8439a186a5ae0
doc/pip_requirements.txt
doc/pip_requirements.txt
alabaster setuptools>=35.0.0 releases sphinx-click
alabaster setuptools>=35.0.0 sphinx-click # All bellow pinning is due to: https://github.com/bitprophet/releases/issues/84 semantic-version==2.6.0 releases~=1.6.1 Sphinx~=1.7.1
Fix pip requirements for documentaion
Fix pip requirements for documentaion Workaround for a bug with releases package
Text
bsd-3-clause
getweber/weber-cli
text
## Code Before: alabaster setuptools>=35.0.0 releases sphinx-click ## Instruction: Fix pip requirements for documentaion Workaround for a bug with releases package ## Code After: alabaster setuptools>=35.0.0 sphinx-click # All bellow pinning is due to: https://github.com/bitprophet/releases/issues/84 semantic-version==2.6.0 releases~=1.6.1 Sphinx~=1.7.1
alabaster setuptools>=35.0.0 - releases sphinx-click + # All bellow pinning is due to: https://github.com/bitprophet/releases/issues/84 + semantic-version==2.6.0 + releases~=1.6.1 + Sphinx~=1.7.1
5
1.25
4
1
721e9c53eac9e0b3383a9105d3b55fbea19614f1
roles/vim/defaults/main.yml
roles/vim/defaults/main.yml
--- command_t_base: roles/dotfiles/files/.vim/bundle/command-t
--- command_t_base: '{{ ansible_env.PWD }}/roles/dotfiles/files/.vim/bundle/command-t'
Fix base Command-T path in Vim role
Fix base Command-T path in Vim role Although the tasks worked previously, they were re-running needlessly each time. It appears we need an absolute path for the `changes` field.
YAML
unlicense
wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent
yaml
## Code Before: --- command_t_base: roles/dotfiles/files/.vim/bundle/command-t ## Instruction: Fix base Command-T path in Vim role Although the tasks worked previously, they were re-running needlessly each time. It appears we need an absolute path for the `changes` field. ## Code After: --- command_t_base: '{{ ansible_env.PWD }}/roles/dotfiles/files/.vim/bundle/command-t'
--- - command_t_base: roles/dotfiles/files/.vim/bundle/command-t + command_t_base: '{{ ansible_env.PWD }}/roles/dotfiles/files/.vim/bundle/command-t' ? +++++++++++++++++++++++ +
2
1
1
1
4f09756c8daab7c3b4467b7cd88affa01540d3ec
angular_compiler/pubspec.yaml
angular_compiler/pubspec.yaml
name: angular_compiler author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/angular description: Compiler for AngularDart. version: 0.4.0-alpha+2 environment: sdk: '>=2.0.0-dev.3.0 <2.0.0' dependencies: analyzer: '^0.31.0-alpha.1' args: '>=0.13.6 <2.0.0' barback: ^0.15.2+2 build: '>=0.10.0 <0.12.0' code_builder: '>=2.2.0 <3.0.0' collection: ^1.8.0 glob: ^1.0.0 logging: '>=0.9.0 <0.12.0' meta: ^1.0.3 path: ^1.0.0 source_gen: '^0.7.0' dev_dependencies: # This is here in order for it to be resolvable by the analyzer. angular: '^5.0.0-alpha' build_test: ^0.9.0 test: '^0.12.0' # === vvv REMOVE WHEN PUBLISHING vvv === dependency_overrides: analyzer: '^0.31.0-alpha.1' angular: path: ../angular # === ^^^ REMOVE WHEN PUBLISHING ^^^ ===
name: angular_compiler author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/angular description: Compiler for AngularDart. version: 0.4.0-alpha+2 environment: sdk: '>=2.0.0-dev.3.0 <2.0.0' dependencies: analyzer: '^0.31.0-alpha.1' args: '>=0.13.6 <2.0.0' barback: ^0.15.2+2 build: '>=0.10.0 <0.12.0' code_builder: '>=2.2.0 <3.0.0' collection: ^1.8.0 glob: ^1.0.0 logging: '>=0.9.0 <0.12.0' meta: ^1.0.3 path: ^1.0.0 source_gen: '^0.7.0' dev_dependencies: # This is here in order for it to be resolvable by the analyzer. angular: '^5.0.0-alpha' build_test: ^0.9.0 test: '^0.12.0' # === vvv REMOVE WHEN PUBLISHING vvv === dependency_overrides: analyzer: '^0.31.0-alpha.1' angular: path: ../angular angular_ast: path: ../angular_ast # === ^^^ REMOVE WHEN PUBLISHING ^^^ ===
Add dep override for angular_ast.
fix(angular_compiler): Add dep override for angular_ast. PiperOrigin-RevId: 179480913
YAML
mit
matanlurey/angular,angulardart/angular,kevmoo/angular,kevmoo/angular,chalin/angular2,angulardart/angular,angulardart/angular,kevmoo/angular,chalin/angular2,matanlurey/angular,matanlurey/angular,chalin/angular2
yaml
## Code Before: name: angular_compiler author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/angular description: Compiler for AngularDart. version: 0.4.0-alpha+2 environment: sdk: '>=2.0.0-dev.3.0 <2.0.0' dependencies: analyzer: '^0.31.0-alpha.1' args: '>=0.13.6 <2.0.0' barback: ^0.15.2+2 build: '>=0.10.0 <0.12.0' code_builder: '>=2.2.0 <3.0.0' collection: ^1.8.0 glob: ^1.0.0 logging: '>=0.9.0 <0.12.0' meta: ^1.0.3 path: ^1.0.0 source_gen: '^0.7.0' dev_dependencies: # This is here in order for it to be resolvable by the analyzer. angular: '^5.0.0-alpha' build_test: ^0.9.0 test: '^0.12.0' # === vvv REMOVE WHEN PUBLISHING vvv === dependency_overrides: analyzer: '^0.31.0-alpha.1' angular: path: ../angular # === ^^^ REMOVE WHEN PUBLISHING ^^^ === ## Instruction: fix(angular_compiler): Add dep override for angular_ast. PiperOrigin-RevId: 179480913 ## Code After: name: angular_compiler author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/angular description: Compiler for AngularDart. version: 0.4.0-alpha+2 environment: sdk: '>=2.0.0-dev.3.0 <2.0.0' dependencies: analyzer: '^0.31.0-alpha.1' args: '>=0.13.6 <2.0.0' barback: ^0.15.2+2 build: '>=0.10.0 <0.12.0' code_builder: '>=2.2.0 <3.0.0' collection: ^1.8.0 glob: ^1.0.0 logging: '>=0.9.0 <0.12.0' meta: ^1.0.3 path: ^1.0.0 source_gen: '^0.7.0' dev_dependencies: # This is here in order for it to be resolvable by the analyzer. angular: '^5.0.0-alpha' build_test: ^0.9.0 test: '^0.12.0' # === vvv REMOVE WHEN PUBLISHING vvv === dependency_overrides: analyzer: '^0.31.0-alpha.1' angular: path: ../angular angular_ast: path: ../angular_ast # === ^^^ REMOVE WHEN PUBLISHING ^^^ ===
name: angular_compiler author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/angular description: Compiler for AngularDart. version: 0.4.0-alpha+2 environment: sdk: '>=2.0.0-dev.3.0 <2.0.0' dependencies: analyzer: '^0.31.0-alpha.1' args: '>=0.13.6 <2.0.0' barback: ^0.15.2+2 build: '>=0.10.0 <0.12.0' code_builder: '>=2.2.0 <3.0.0' collection: ^1.8.0 glob: ^1.0.0 logging: '>=0.9.0 <0.12.0' meta: ^1.0.3 path: ^1.0.0 source_gen: '^0.7.0' dev_dependencies: # This is here in order for it to be resolvable by the analyzer. angular: '^5.0.0-alpha' build_test: ^0.9.0 test: '^0.12.0' # === vvv REMOVE WHEN PUBLISHING vvv === dependency_overrides: analyzer: '^0.31.0-alpha.1' angular: path: ../angular + angular_ast: + path: ../angular_ast # === ^^^ REMOVE WHEN PUBLISHING ^^^ ===
2
0.058824
2
0
31bbb4d363274725b20580934229e93497196707
src/Oro/Bundle/CalendarBundle/Resources/views/Calendar/Menu/removeCalendar.html.twig
src/Oro/Bundle/CalendarBundle/Resources/views/Calendar/Menu/removeCalendar.html.twig
<% if (removable) { %> {{ block('item_renderer') }} <% } %>
<% if (removable) { %> {% set Label %} {%- if item.getExtra('icon') %} <i class="{{- item.getExtra('icon') -}}"></i> {% endif -%} {% if options.allow_safe_labels and item.getExtra('safe_label', false) %} {{- item.label|trans|raw -}} {% else %} {{- item.label|trans(item.getExtra('translateParams', {}), item.getExtra('translateDomain', 'messages')) -}} {% endif %} {% endset %} <li{{ oro_menu.attributes(itemAttributes) }}> <a href="javascript:void(0);" class="action">{{ Label }}</a> </li> <% } %>
Add color table to popup menu - fix RemoveCalendar pop-up menu item template
BAP-5851: Add color table to popup menu - fix RemoveCalendar pop-up menu item template
Twig
mit
hugeval/platform,Djamy/platform,morontt/platform,ramunasd/platform,morontt/platform,northdakota/platform,hugeval/platform,2ndkauboy/platform,ramunasd/platform,orocrm/platform,2ndkauboy/platform,geoffroycochard/platform,Djamy/platform,2ndkauboy/platform,morontt/platform,geoffroycochard/platform,geoffroycochard/platform,Djamy/platform,orocrm/platform,trustify/oroplatform,ramunasd/platform,hugeval/platform,trustify/oroplatform,northdakota/platform,orocrm/platform,northdakota/platform,trustify/oroplatform
twig
## Code Before: <% if (removable) { %> {{ block('item_renderer') }} <% } %> ## Instruction: BAP-5851: Add color table to popup menu - fix RemoveCalendar pop-up menu item template ## Code After: <% if (removable) { %> {% set Label %} {%- if item.getExtra('icon') %} <i class="{{- item.getExtra('icon') -}}"></i> {% endif -%} {% if options.allow_safe_labels and item.getExtra('safe_label', false) %} {{- item.label|trans|raw -}} {% else %} {{- item.label|trans(item.getExtra('translateParams', {}), item.getExtra('translateDomain', 'messages')) -}} {% endif %} {% endset %} <li{{ oro_menu.attributes(itemAttributes) }}> <a href="javascript:void(0);" class="action">{{ Label }}</a> </li> <% } %>
<% if (removable) { %> - {{ block('item_renderer') }} + {% set Label %} + {%- if item.getExtra('icon') %} + <i class="{{- item.getExtra('icon') -}}"></i> + {% endif -%} + {% if options.allow_safe_labels and item.getExtra('safe_label', false) %} + {{- item.label|trans|raw -}} + {% else %} + {{- item.label|trans(item.getExtra('translateParams', {}), item.getExtra('translateDomain', 'messages')) -}} + {% endif %} + {% endset %} + <li{{ oro_menu.attributes(itemAttributes) }}> + <a href="javascript:void(0);" class="action">{{ Label }}</a> + </li> <% } %>
14
4.666667
13
1
fc0558df0e7cdb16fa55e81c81dabe34b3311fc2
components/commercial_filter/filters/category/category_filter_view.coffee
components/commercial_filter/filters/category/category_filter_view.coffee
Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class CategoryFilterView extends Backbone.View events: 'click .cf-categories__category' : 'toggleCategory' initialize: ({ @params, @aggregations, @categoryMap }) -> throw new Error "Requires a params model" unless @params throw new Error "Requires an aggregations collection" unless @aggregations @listenTo @params, 'change:medium change:gene_id', @render @listenTo @aggregations, 'reset', @render setCategory: (e) -> @params.set gene_id: $(e.currentTarget).data('id') toggleCategory: (e) -> category = $(e.currentTarget).data('id') if @params.get('gene_id') is category @params.unset('gene_id') else @params.set gene_id: category, page: 1 hasResults: (counts, id) -> _.any counts, (count) -> count.id is id render: -> @$el.html template categories: @categoryMap[@params.get('medium') || 'global'] selectedCategory: @params.get('gene_id') hasResults: @hasResults counts: @aggregations.get('MEDIUM')?.get('counts')
Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class CategoryFilterView extends Backbone.View events: 'click .cf-categories__category' : 'toggleCategory' initialize: ({ @params, @aggregations, @categoryMap }) -> throw new Error "Requires a params model" unless @params throw new Error "Requires an aggregations collection" unless @aggregations @listenTo @params, 'change:medium change:gene_id', @render @listenTo @aggregations, 'reset', @render @listenTo @params, 'change:include_artworks_by_followed_artists', @toggleDisplay setCategory: (e) -> @params.set gene_id: $(e.currentTarget).data('id') toggleDisplay: -> if @params.get('include_artworks_by_followed_artists') @params.unset('gene_id') @$el.hide() else @$el.show() toggleCategory: (e) -> category = $(e.currentTarget).data('id') if @params.get('gene_id') is category @params.unset('gene_id') else @params.set gene_id: category, page: 1 hasResults: (counts, id) -> _.any counts, (count) -> count.id is id render: -> return if @params.get('include_artworks_by_followed_artists') @$el.html template categories: @categoryMap[@params.get('medium') || 'global'] selectedCategory: @params.get('gene_id') hasResults: @hasResults counts: @aggregations.get('MEDIUM')?.get('counts')
Hide and unset categories when filtering by followed artists
Hide and unset categories when filtering by followed artists
CoffeeScript
mit
oxaudo/force,izakp/force,izakp/force,artsy/force,mzikherman/force,cavvia/force-1,dblock/force,oxaudo/force,yuki24/force,yuki24/force,xtina-starr/force,anandaroop/force,artsy/force-public,oxaudo/force,anandaroop/force,erikdstock/force,artsy/force,erikdstock/force,kanaabe/force,dblock/force,kanaabe/force,mzikherman/force,xtina-starr/force,damassi/force,kanaabe/force,mzikherman/force,dblock/force,artsy/force-public,joeyAghion/force,erikdstock/force,damassi/force,anandaroop/force,xtina-starr/force,yuki24/force,oxaudo/force,joeyAghion/force,artsy/force,cavvia/force-1,xtina-starr/force,damassi/force,joeyAghion/force,anandaroop/force,izakp/force,cavvia/force-1,eessex/force,yuki24/force,erikdstock/force,eessex/force,mzikherman/force,damassi/force,kanaabe/force,eessex/force,eessex/force,izakp/force,artsy/force,joeyAghion/force,kanaabe/force,cavvia/force-1
coffeescript
## Code Before: Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class CategoryFilterView extends Backbone.View events: 'click .cf-categories__category' : 'toggleCategory' initialize: ({ @params, @aggregations, @categoryMap }) -> throw new Error "Requires a params model" unless @params throw new Error "Requires an aggregations collection" unless @aggregations @listenTo @params, 'change:medium change:gene_id', @render @listenTo @aggregations, 'reset', @render setCategory: (e) -> @params.set gene_id: $(e.currentTarget).data('id') toggleCategory: (e) -> category = $(e.currentTarget).data('id') if @params.get('gene_id') is category @params.unset('gene_id') else @params.set gene_id: category, page: 1 hasResults: (counts, id) -> _.any counts, (count) -> count.id is id render: -> @$el.html template categories: @categoryMap[@params.get('medium') || 'global'] selectedCategory: @params.get('gene_id') hasResults: @hasResults counts: @aggregations.get('MEDIUM')?.get('counts') ## Instruction: Hide and unset categories when filtering by followed artists ## Code After: Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class CategoryFilterView extends Backbone.View events: 'click .cf-categories__category' : 'toggleCategory' initialize: ({ @params, @aggregations, @categoryMap }) -> throw new Error "Requires a params model" unless @params throw new Error "Requires an aggregations collection" unless @aggregations @listenTo @params, 'change:medium change:gene_id', @render @listenTo @aggregations, 'reset', @render @listenTo @params, 'change:include_artworks_by_followed_artists', @toggleDisplay setCategory: (e) -> @params.set gene_id: $(e.currentTarget).data('id') toggleDisplay: -> if @params.get('include_artworks_by_followed_artists') @params.unset('gene_id') @$el.hide() else @$el.show() toggleCategory: (e) -> category = $(e.currentTarget).data('id') if @params.get('gene_id') is category @params.unset('gene_id') else @params.set gene_id: category, page: 1 hasResults: (counts, id) -> _.any counts, (count) -> count.id is id render: -> return if @params.get('include_artworks_by_followed_artists') @$el.html template categories: @categoryMap[@params.get('medium') || 'global'] selectedCategory: @params.get('gene_id') hasResults: @hasResults counts: @aggregations.get('MEDIUM')?.get('counts')
Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class CategoryFilterView extends Backbone.View events: 'click .cf-categories__category' : 'toggleCategory' initialize: ({ @params, @aggregations, @categoryMap }) -> throw new Error "Requires a params model" unless @params throw new Error "Requires an aggregations collection" unless @aggregations @listenTo @params, 'change:medium change:gene_id', @render @listenTo @aggregations, 'reset', @render + @listenTo @params, 'change:include_artworks_by_followed_artists', @toggleDisplay setCategory: (e) -> @params.set gene_id: $(e.currentTarget).data('id') + + toggleDisplay: -> + if @params.get('include_artworks_by_followed_artists') + @params.unset('gene_id') + @$el.hide() + else + @$el.show() toggleCategory: (e) -> category = $(e.currentTarget).data('id') if @params.get('gene_id') is category @params.unset('gene_id') else @params.set gene_id: category, page: 1 hasResults: (counts, id) -> _.any counts, (count) -> count.id is id render: -> + return if @params.get('include_artworks_by_followed_artists') @$el.html template categories: @categoryMap[@params.get('medium') || 'global'] selectedCategory: @params.get('gene_id') hasResults: @hasResults counts: @aggregations.get('MEDIUM')?.get('counts') +
10
0.285714
10
0
0bf3d95f0bce6f69fa6ad81abadd3a1320de7e9f
doc/colon-notation/index.html
doc/colon-notation/index.html
doc_title = "Colon Notation" doc_next = '' {% extends doc.html %} {% block doc %} <p>Aspen&rsquo;s <code><a href="/hooks/">hooks.conf</a></code> file uses colon notation to specify Python objects.</p> <pre>mypackage.sub.another:blah</pre> <p>becomes</p> <pre>from mypackage.sub import another</pre> <p>The <code>blah</code> attribute of <code>another</code> would then be used.</p> <h4>API</h4> <p>To use colon notation in your own application, import the <code>colonize</code> function from <code>aspen.colon</code>. Here is it&rsquo;s signature:</p> <pre>def colonize(name, filename='n/a', lineno=-1): """Given a name in colon notation and some error helpers, return an object. """</pre> <p>And here&rsquo;s a contrived example of how to use it:</p> <pre>from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" colonize = colon.colonize(objdef)</pre> {% end %}
doc_title = "Colon Notation" doc_next = '' from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" colonize = colon.colonize(objdef) assert colonize == colon.colonize {% extends doc.html %} {% block doc %} <p>Aspen&rsquo;s <code><a href="/hooks/">hooks.conf</a></code> file uses colon notation to specify Python objects.</p> <pre>mypackage.sub.another:blah</pre> <p>becomes</p> <pre>from mypackage.sub import another</pre> <p>The <code>blah</code> attribute of <code>another</code> would then be used.</p> <h4>API</h4> <p>To use colon notation in your own application, import the <code>colonize</code> function from <code>aspen.colon</code>. Here is its signature:</p> <pre>def colonize(name, filename='n/a', lineno=-1): """Given a name in colon notation and some error helpers, return an object. """</pre> <p>And here&rsquo;s a contrived example of how to use it:</p> <pre>from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" colonize = colon.colonize(objdef) assert colonize == colon.colonize</pre> {% end %}
Fix a typo and add an assert to the docs.
Fix a typo and add an assert to the docs.
HTML
mit
gratipay/aspen.py,gratipay/aspen.py
html
## Code Before: doc_title = "Colon Notation" doc_next = '' {% extends doc.html %} {% block doc %} <p>Aspen&rsquo;s <code><a href="/hooks/">hooks.conf</a></code> file uses colon notation to specify Python objects.</p> <pre>mypackage.sub.another:blah</pre> <p>becomes</p> <pre>from mypackage.sub import another</pre> <p>The <code>blah</code> attribute of <code>another</code> would then be used.</p> <h4>API</h4> <p>To use colon notation in your own application, import the <code>colonize</code> function from <code>aspen.colon</code>. Here is it&rsquo;s signature:</p> <pre>def colonize(name, filename='n/a', lineno=-1): """Given a name in colon notation and some error helpers, return an object. """</pre> <p>And here&rsquo;s a contrived example of how to use it:</p> <pre>from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" colonize = colon.colonize(objdef)</pre> {% end %} ## Instruction: Fix a typo and add an assert to the docs. ## Code After: doc_title = "Colon Notation" doc_next = '' from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" colonize = colon.colonize(objdef) assert colonize == colon.colonize {% extends doc.html %} {% block doc %} <p>Aspen&rsquo;s <code><a href="/hooks/">hooks.conf</a></code> file uses colon notation to specify Python objects.</p> <pre>mypackage.sub.another:blah</pre> <p>becomes</p> <pre>from mypackage.sub import another</pre> <p>The <code>blah</code> attribute of <code>another</code> would then be used.</p> <h4>API</h4> <p>To use colon notation in your own application, import the <code>colonize</code> function from <code>aspen.colon</code>. Here is its signature:</p> <pre>def colonize(name, filename='n/a', lineno=-1): """Given a name in colon notation and some error helpers, return an object. """</pre> <p>And here&rsquo;s a contrived example of how to use it:</p> <pre>from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" colonize = colon.colonize(objdef) assert colonize == colon.colonize</pre> {% end %}
doc_title = "Colon Notation" doc_next = '' + + from aspen.configuration import colon + + objdef = "aspen.configuration.colon:colonize" + colonize = colon.colonize(objdef) + assert colonize == colon.colonize + {% extends doc.html %} {% block doc %} <p>Aspen&rsquo;s <code><a href="/hooks/">hooks.conf</a></code> file uses colon notation to specify Python objects.</p> <pre>mypackage.sub.another:blah</pre> <p>becomes</p> <pre>from mypackage.sub import another</pre> <p>The <code>blah</code> attribute of <code>another</code> would then be used.</p> <h4>API</h4> <p>To use colon notation in your own application, import the <code>colonize</code> function from <code>aspen.colon</code>. Here is - it&rsquo;s signature:</p> ? ------- + its signature:</p> <pre>def colonize(name, filename='n/a', lineno=-1): """Given a name in colon notation and some error helpers, return an object. """</pre> <p>And here&rsquo;s a contrived example of how to use it:</p> <pre>from aspen.configuration import colon objdef = "aspen.configuration.colon:colonize" - colonize = colon.colonize(objdef)</pre> ? ------ + colonize = colon.colonize(objdef) + + assert colonize == colon.colonize</pre> {% end %}
13
0.342105
11
2
419d2ca4d53e33c58d556b45bcc6910bd28ef91a
djangae/apps.py
djangae/apps.py
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class DjangaeConfig(AppConfig): name = 'djangae' verbose_name = _("Djangae") def ready(self): from .patches.contenttypes import patch patch() from djangae.db.backends.appengine.caching import reset_context from django.core.signals import request_finished, request_started request_finished.connect(reset_context) request_started.connect(reset_context)
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class DjangaeConfig(AppConfig): name = 'djangae' verbose_name = _("Djangae") def ready(self): from .patches.contenttypes import patch patch() from djangae.db.backends.appengine.caching import reset_context from django.core.signals import request_finished, request_started request_finished.connect(reset_context, dispatch_uid="request_finished_context_reset") request_started.connect(reset_context, dispatch_uid="request_started_context_reset")
Make sure we only connect to the signals onces
Make sure we only connect to the signals onces
Python
bsd-3-clause
kirberich/djangae,asendecka/djangae,asendecka/djangae,SiPiggles/djangae,wangjun/djangae,potatolondon/djangae,kirberich/djangae,SiPiggles/djangae,SiPiggles/djangae,leekchan/djangae,armirusco/djangae,chargrizzle/djangae,trik/djangae,grzes/djangae,armirusco/djangae,jscissr/djangae,trik/djangae,jscissr/djangae,wangjun/djangae,asendecka/djangae,leekchan/djangae,chargrizzle/djangae,wangjun/djangae,grzes/djangae,trik/djangae,potatolondon/djangae,grzes/djangae,jscissr/djangae,chargrizzle/djangae,kirberich/djangae,armirusco/djangae,leekchan/djangae
python
## Code Before: from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class DjangaeConfig(AppConfig): name = 'djangae' verbose_name = _("Djangae") def ready(self): from .patches.contenttypes import patch patch() from djangae.db.backends.appengine.caching import reset_context from django.core.signals import request_finished, request_started request_finished.connect(reset_context) request_started.connect(reset_context) ## Instruction: Make sure we only connect to the signals onces ## Code After: from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class DjangaeConfig(AppConfig): name = 'djangae' verbose_name = _("Djangae") def ready(self): from .patches.contenttypes import patch patch() from djangae.db.backends.appengine.caching import reset_context from django.core.signals import request_finished, request_started request_finished.connect(reset_context, dispatch_uid="request_finished_context_reset") request_started.connect(reset_context, dispatch_uid="request_started_context_reset")
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class DjangaeConfig(AppConfig): name = 'djangae' verbose_name = _("Djangae") def ready(self): from .patches.contenttypes import patch patch() from djangae.db.backends.appengine.caching import reset_context from django.core.signals import request_finished, request_started - request_finished.connect(reset_context) - request_started.connect(reset_context) + request_finished.connect(reset_context, dispatch_uid="request_finished_context_reset") + request_started.connect(reset_context, dispatch_uid="request_started_context_reset")
4
0.25
2
2
70a2558679441c4ac12e60917ee7d4a92b9f5c9b
vim/custom/syntastic.vim
vim/custom/syntastic.vim
" ========================================== " Syntastic settings let g:syntastic_javascript_syntax_checker = "jshint" let g:syntastic_coffee_coffeelint_args="--csv --file $HOME/.coffeelint.json" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] let g:syntastic_check_on_open = 0
" ========================================== " Syntastic settings let g:syntastic_javascript_syntax_checker = "jshint" let g:syntastic_coffee_coffeelint_args="--csv --file $HOME/.coffeelint.json" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] let g:syntastic_ruby_rubocop_exec = "$RBENV_ROOT/shims/ruby $RBENV_ROOT/shims/rubocop" let g:syntastic_check_on_open = 0
Add rbenv shims for rubocop
Add rbenv shims for rubocop
VimL
mit
faun/dotfiles,faun/dotfiles
viml
## Code Before: " ========================================== " Syntastic settings let g:syntastic_javascript_syntax_checker = "jshint" let g:syntastic_coffee_coffeelint_args="--csv --file $HOME/.coffeelint.json" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] let g:syntastic_check_on_open = 0 ## Instruction: Add rbenv shims for rubocop ## Code After: " ========================================== " Syntastic settings let g:syntastic_javascript_syntax_checker = "jshint" let g:syntastic_coffee_coffeelint_args="--csv --file $HOME/.coffeelint.json" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] let g:syntastic_ruby_rubocop_exec = "$RBENV_ROOT/shims/ruby $RBENV_ROOT/shims/rubocop" let g:syntastic_check_on_open = 0
" ========================================== " Syntastic settings let g:syntastic_javascript_syntax_checker = "jshint" let g:syntastic_coffee_coffeelint_args="--csv --file $HOME/.coffeelint.json" let g:syntastic_ruby_checkers = ['mri', 'rubocop'] + let g:syntastic_ruby_rubocop_exec = "$RBENV_ROOT/shims/ruby $RBENV_ROOT/shims/rubocop" let g:syntastic_check_on_open = 0
1
0.142857
1
0
bb6ef0fbeb3c665ef5a947f842f55021a1f3a48a
app/assets/javascripts/workbench/workbench/views/datastream/chart_view.js.coffee
app/assets/javascripts/workbench/workbench/views/datastream/chart_view.js.coffee
class Workbench.Views.DatastreamChartView extends Backbone.View initialize: -> render: -> @chart = @$el.GeocensChart datastream: @model this
class Workbench.Views.DatastreamChartView extends Backbone.View initialize: -> render: -> @chart = @$el.GeocensChart datastream: @model chart: rangeSelector: selected: 4 buttons: [{ type: 'minute' count: 120 text: "2h" }, { type: 'day' count: 1 text: "1d" }, { type: 'week' count: 1 text: "1w" }, { type: 'ytd' text: "YTD" }, { type: 'all' text: "All" }] this
Update range selector on charts
Update range selector on charts
CoffeeScript
mit
GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench
coffeescript
## Code Before: class Workbench.Views.DatastreamChartView extends Backbone.View initialize: -> render: -> @chart = @$el.GeocensChart datastream: @model this ## Instruction: Update range selector on charts ## Code After: class Workbench.Views.DatastreamChartView extends Backbone.View initialize: -> render: -> @chart = @$el.GeocensChart datastream: @model chart: rangeSelector: selected: 4 buttons: [{ type: 'minute' count: 120 text: "2h" }, { type: 'day' count: 1 text: "1d" }, { type: 'week' count: 1 text: "1w" }, { type: 'ytd' text: "YTD" }, { type: 'all' text: "All" }] this
class Workbench.Views.DatastreamChartView extends Backbone.View initialize: -> render: -> @chart = @$el.GeocensChart datastream: @model + chart: + rangeSelector: + selected: 4 + buttons: [{ + type: 'minute' + count: 120 + text: "2h" + }, + { + type: 'day' + count: 1 + text: "1d" + }, + { + type: 'week' + count: 1 + text: "1w" + }, + { + type: 'ytd' + text: "YTD" + }, + { + type: 'all' + text: "All" + }] + this
27
3.375
27
0
f03b5c4fde1bd6eb415457e60d3c79fbd9c2e4ee
app/views/projects/_md_preview.html.haml
app/views/projects/_md_preview.html.haml
.md-area .md-header %ul.nav-links %li.active %a.js-md-write-button{ href: "#md-write-holder" } Write %li %a.js-md-preview-button{ href: "#md-preview-holder" } Preview %li.pull-right %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button' } Go full screen .md-write-holder = yield .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))} - if defined?(referenced_users) && referenced_users %div.referenced-users.hide %span = icon('exclamation-triangle') You are about to add %strong %span.js-referenced-users-count 0 people to the discussion. Proceed with caution.
.md-area .md-header %ul.nav-links %li.active %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 } Write %li %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 } Preview %li.pull-right %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button', tabindex: -1 } Go full screen .md-write-holder = yield .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))} - if defined?(referenced_users) && referenced_users %div.referenced-users.hide %span = icon('exclamation-triangle') You are about to add %strong %span.js-referenced-users-count 0 people to the discussion. Proceed with caution.
Remove tab stop from "Write", "Preview", "Go full screen" links
Remove tab stop from "Write", "Preview", "Go full screen" links Closes #15089
Haml
mit
Soullivaneuh/gitlabhq,allysonbarros/gitlabhq,allysonbarros/gitlabhq,screenpages/gitlabhq,screenpages/gitlabhq,icedwater/gitlabhq,htve/GitlabForChinese,LUMC/gitlabhq,SVArago/gitlabhq,allysonbarros/gitlabhq,openwide-java/gitlabhq,daiyu/gitlab-zh,daiyu/gitlab-zh,shinexiao/gitlabhq,LUMC/gitlabhq,jirutka/gitlabhq,darkrasid/gitlabhq,dwrensha/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,htve/GitlabForChinese,mr-dxdy/gitlabhq,dplarson/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,icedwater/gitlabhq,dreampet/gitlab,martijnvermaat/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,darkrasid/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,Soullivaneuh/gitlabhq,dwrensha/gitlabhq,screenpages/gitlabhq,screenpages/gitlabhq,LUMC/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,dplarson/gitlabhq,mmkassem/gitlabhq,icedwater/gitlabhq,daiyu/gitlab-zh,openwide-java/gitlabhq,mmkassem/gitlabhq,mr-dxdy/gitlabhq,dreampet/gitlab,larryli/gitlabhq,SVArago/gitlabhq,SVArago/gitlabhq,htve/GitlabForChinese,larryli/gitlabhq,axilleas/gitlabhq,SVArago/gitlabhq,Soullivaneuh/gitlabhq,iiet/iiet-git,t-zuehlsdorff/gitlabhq,shinexiao/gitlabhq,larryli/gitlabhq,Soullivaneuh/gitlabhq,iiet/iiet-git,openwide-java/gitlabhq,dwrensha/gitlabhq,martijnvermaat/gitlabhq,t-zuehlsdorff/gitlabhq,shinexiao/gitlabhq,dplarson/gitlabhq,martijnvermaat/gitlabhq,iiet/iiet-git,dwrensha/gitlabhq,t-zuehlsdorff/gitlabhq,darkrasid/gitlabhq,dreampet/gitlab,htve/GitlabForChinese,openwide-java/gitlabhq,darkrasid/gitlabhq,larryli/gitlabhq,axilleas/gitlabhq,shinexiao/gitlabhq,icedwater/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,dplarson/gitlabhq,LUMC/gitlabhq,daiyu/gitlab-zh,t-zuehlsdorff/gitlabhq,mr-dxdy/gitlabhq,mr-dxdy/gitlabhq,allysonbarros/gitlabhq,stoplightio/gitlabhq,martijnvermaat/gitlabhq
haml
## Code Before: .md-area .md-header %ul.nav-links %li.active %a.js-md-write-button{ href: "#md-write-holder" } Write %li %a.js-md-preview-button{ href: "#md-preview-holder" } Preview %li.pull-right %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button' } Go full screen .md-write-holder = yield .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))} - if defined?(referenced_users) && referenced_users %div.referenced-users.hide %span = icon('exclamation-triangle') You are about to add %strong %span.js-referenced-users-count 0 people to the discussion. Proceed with caution. ## Instruction: Remove tab stop from "Write", "Preview", "Go full screen" links Closes #15089 ## Code After: .md-area .md-header %ul.nav-links %li.active %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 } Write %li %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 } Preview %li.pull-right %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button', tabindex: -1 } Go full screen .md-write-holder = yield .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))} - if defined?(referenced_users) && referenced_users %div.referenced-users.hide %span = icon('exclamation-triangle') You are about to add %strong %span.js-referenced-users-count 0 people to the discussion. Proceed with caution.
.md-area .md-header %ul.nav-links %li.active - %a.js-md-write-button{ href: "#md-write-holder" } + %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 } ? ++++++++++++++ Write %li - %a.js-md-preview-button{ href: "#md-preview-holder" } + %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 } ? ++++++++++++++ Preview %li.pull-right - %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button' } + %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button', tabindex: -1 } ? ++++++++++++++ Go full screen .md-write-holder = yield .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))} - if defined?(referenced_users) && referenced_users %div.referenced-users.hide %span = icon('exclamation-triangle') You are about to add %strong %span.js-referenced-users-count 0 people to the discussion. Proceed with caution.
6
0.230769
3
3
21bba51d4176aa4188c503a78bba36005b52633f
packages/react-form-with-constraints/src/index.ts
packages/react-form-with-constraints/src/index.ts
export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * from './Async'; import Field from './Field'; export { Field }; export * from './FieldsStore'; export * from './EventEmitter'; export * from './withValidateFieldEventEmitter'; export * from './withFieldWillValidateEventEmitter'; export * from './withFieldDidValidateEventEmitter'; export * from './withResetEventEmitter'; import FieldFeedbackValidation from './FieldFeedbackValidation'; export { FieldFeedbackValidation }; export * from './InputElement'; import Constructor from './Constructor'; export { Constructor }; export * from './Input'; import deepForEach from './deepForEach'; export { deepForEach };
export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * from './Async'; export { default as Field } from './Field'; export * from './FieldsStore'; export * from './EventEmitter'; export * from './withValidateFieldEventEmitter'; export * from './withFieldWillValidateEventEmitter'; export * from './withFieldDidValidateEventEmitter'; export * from './withResetEventEmitter'; export { default as FieldFeedbackValidation } from './FieldFeedbackValidation'; export * from './InputElement'; export { default as Constructor } from './Constructor'; export * from './Input'; export { default as deepForEach } from './deepForEach';
Use export { default as ... } syntax
Use export { default as ... } syntax
TypeScript
mit
tkrotoff/react-form-with-constraints,tkrotoff/react-form-with-constraints,tkrotoff/react-form-with-constraints
typescript
## Code Before: export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * from './Async'; import Field from './Field'; export { Field }; export * from './FieldsStore'; export * from './EventEmitter'; export * from './withValidateFieldEventEmitter'; export * from './withFieldWillValidateEventEmitter'; export * from './withFieldDidValidateEventEmitter'; export * from './withResetEventEmitter'; import FieldFeedbackValidation from './FieldFeedbackValidation'; export { FieldFeedbackValidation }; export * from './InputElement'; import Constructor from './Constructor'; export { Constructor }; export * from './Input'; import deepForEach from './deepForEach'; export { deepForEach }; ## Instruction: Use export { default as ... } syntax ## Code After: export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * from './Async'; export { default as Field } from './Field'; export * from './FieldsStore'; export * from './EventEmitter'; export * from './withValidateFieldEventEmitter'; export * from './withFieldWillValidateEventEmitter'; export * from './withFieldDidValidateEventEmitter'; export * from './withResetEventEmitter'; export { default as FieldFeedbackValidation } from './FieldFeedbackValidation'; export * from './InputElement'; export { default as Constructor } from './Constructor'; export * from './Input'; export { default as deepForEach } from './deepForEach';
export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * from './Async'; + export { default as Field } from './Field'; - import Field from './Field'; - export { Field }; export * from './FieldsStore'; export * from './EventEmitter'; export * from './withValidateFieldEventEmitter'; export * from './withFieldWillValidateEventEmitter'; export * from './withFieldDidValidateEventEmitter'; export * from './withResetEventEmitter'; - import FieldFeedbackValidation from './FieldFeedbackValidation'; ? ^^ + export { default as FieldFeedbackValidation } from './FieldFeedbackValidation'; ? ^^ +++++++++++++ ++ - export { FieldFeedbackValidation }; export * from './InputElement'; - import Constructor from './Constructor'; ? ^^ + export { default as Constructor } from './Constructor'; ? ^^ +++++++++++++ ++ - export { Constructor }; export * from './Input'; - import deepForEach from './deepForEach'; ? ^^ + export { default as deepForEach } from './deepForEach'; ? ^^ +++++++++++++ ++ - export { deepForEach };
12
0.571429
4
8